Commit Graph

1795 Commits

Author SHA1 Message Date
Kenneth Moreland
2c34c1ac9d Move BitmapFont code to library 2016-09-07 16:47:42 -06:00
Kenneth Moreland
07df53d7d1 Move AxisAnnotation classes to rendering library 2016-09-07 16:47:40 -06:00
Kenneth Moreland
0c8919dc6a Add VTKM_OVERRIDE macro
This is using the C++11 override keyword to make the compiler check to
ensure that we are correctly overriding virtual methods when we mean to.
Currently this will not compile without C++11. However, we are planning
on moving to C++11 very soon, and we can fix the macro if we don't.
2016-09-07 16:47:39 -06:00
Kenneth Moreland
ea8602d882 Create configuration for rendering library
I have noticed at least on my windows machine that source code that uses
the rendering package is taking a long time to compile. The rendering
library does not rely much on templates and more on virtual methods.
Thus, it is a good candidate for moving to a library so that it need be
compiled only once.

This sets up the configure scripts to create the library. There is also
a simple port of one class to the library. More will follow.
2016-09-07 16:47:35 -06:00
Robert Maynard
7d031f6187 Merge topic 'divide_by_zero_warnings'
912e2362 Adjust the range so we don't potential divide by zero.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !536
2016-09-07 14:07:13 -04:00
Kenneth Moreland
8cb2803b45 Merge branch 'precision-warnings' into 'master'
Fix precision warnings when FloatDefault is 64 bit

When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).

See merge request !526
2016-09-07 13:54:13 -04:00
Robert Maynard
96692134d2 Merge topic 'error_out_on_non_cxx11_compilers'
1881d375 Explicitly error out if vtk-m is used with a non c++11 compiler.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !532
2016-09-06 09:22:25 -04:00
Robert Maynard
912e236241 Adjust the range so we don't potential divide by zero. 2016-09-03 17:04:25 -04:00
Robert Maynard
310f1bc0a5 Correct missing std::time includes that vtkm::Math was hiding. 2016-09-02 14:44:30 -04:00
Robert Maynard
801473bc58 vtkm::Math now doesn't require boost 2016-09-02 13:32:26 -04:00
Robert Maynard
12a0afa773 Merge topic 'simplify_dispatcherdetail'
aff8c021 Remove DispatcherBaseDetailInvoke as it unnecessary with C++11.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !537
2016-09-02 08:21:25 -04:00
Robert Maynard
1a4d66b7e7 Merge topic 'remove_boost_shared_ptr'
c9834283 Remove vtkm usage of boost::shared and scoped pointers.
f81c42b9 Replace NULL with nullptr where applicable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !535
2016-09-01 16:15:55 -04:00
Robert Maynard
aff8c0211f Remove DispatcherBaseDetailInvoke as it unnecessary with C++11. 2016-09-01 10:41:45 -04:00
Robert Maynard
1881d375f5 Explicitly error out if vtk-m is used with a non c++11 compiler. 2016-09-01 09:45:43 -04:00
Robert Maynard
c9834283ea Remove vtkm usage of boost::shared and scoped pointers.
Now we are using c++11 shared_ptr and unique_ptr
2016-09-01 09:38:25 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
7acbdfa0ea Update StaticAssert.h to use the c++11 static_assert function 2016-09-01 09:35:43 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Mark Kim
387d2a6a76 Stop copying the data in the render call. Instead, upload it on the first
call and then never upload again.

RenderTest: overload the Render function to pass in a Mapper.
UnitTestMapperGLFW: global variable for the MapperGL to pass into RenderTest::Render

MapperGL: Creating the VBO/VAO is now wrapped in check to see if the data's
already been loaded.

Moved some variables to class scope.
2016-08-29 04:33:14 -06:00
Kenneth Moreland
893f3115f2 Fix precision warnings when FloatDefault is 64 bit
When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).
2016-08-26 09:33:37 -06:00
Kenneth Moreland
4fd9ba7e11 Make glfw auto-terminate during testing
The UnitTestMapperGLFW test was coded to run in an interactive mode,
which was problematic when simply running the test. If no one was there
to exit the interactive window, the test would time out. This change
adds a "batch" mode that is on when run by ctest. The batch mode runs
through all configurations and exits.
2016-08-26 08:28:35 -06:00
Kenneth Moreland
b568dcee62 Merge branch 'incorrect-configure-in-rendering' into 'master'
Fix configuration of dependent rendering libraries

The VTKmConfigureComponents.cmake file has lots of careful configuration
of many of VTK-m components and dependent libraries (like OpenGL,
OSMesa, etc.) that takes care of several corner cases. The configuration
is consolidated here so that it can be consistent across the many
directories in VTK-m as well as other projects that use VTK-m.

Recent changes to the configuration in rendering circumvented these and
directly tried to configure dependent rendering libraries. This is wrong
(and more importantly broke my OSX build).

See merge request !519
2016-08-25 18:20:56 -04:00
Kenneth Moreland
7f8ea09f88 Fix configuration of dependent rendering libraries
The VTKmConfigureComponents.cmake file has lots of careful configuration
of many of VTK-m components and dependent libraries (like OpenGL,
OSMesa, etc.) that takes care of several corner cases. The configuration
is consolidated here so that it can be consistent across the many
directories in VTK-m as well as other projects that use VTK-m.

Recent changes to the configuration in rendering circumvented these and
directly tried to configure dependent rendering libraries. This is wrong
(and more importantly broke my OSX build).
2016-08-25 14:44:30 -06:00
Kenneth Moreland
8a961f5b12 Generalize BufferTypePicker
Previously there was a bug where BufferTypePicker was not implemented
correctly when LONG was 32 bits (even though 64 bit integers were
available).

This changes fixes the problem and also makes the implementation more
general by using the TypeTraits already available.
2016-08-25 14:42:12 -06:00
Kenneth Moreland
2da053ce67 Merge branch 'source-in-build-missing' into 'master'
Add RenderTest.h to configure scripts

The SourceInBuild was failing because of that.

See merge request !521
2016-08-25 16:40:19 -04:00
Kenneth Moreland
40db6c1cd1 Merge branch 'faster-compile' into 'master'
Faster compile

Some small change to make modest improvements to the
compile time.

See merge request !520
2016-08-25 16:03:58 -04:00
Kenneth Moreland
1b69a83423 Don't add tests from parent directories
The testing subdirectories were including the tests from the parent
directory. I believe this was a copy-paste error from the tests
originally all being in one file (where the unit_tests variable had all
tests appended) and then moved to subdirectories where they should not
be appended.
2016-08-25 13:20:40 -06:00
Kenneth Moreland
8ac6ce4501 Add back a condition to zip array test with vec as first
In the test for the ArrayHandleZip fancy array handle, re-add a
condition where the first array being zipped is of type Vec.
2016-08-25 13:11:04 -06:00
Kenneth Moreland
8fd0768b39 Add RenderTest.h to configure scripts
The SourceInBuild was failing because of that.
2016-08-25 10:34:40 -06:00
Dave Pugmire
be7a8d5019 Merge branch 'fresh_smelling_branch' into 'master'
Add GLFW unit test.

Simplify the test code with a class templated on mapper, canvas and view.

See merge request !518
2016-08-25 08:39:39 -04:00
Robert Maynard
0413ca10d8 Merge topic 'add_copy_subrange'
14ad996d Update vtk-m to use CopySubRange where applicable.
51e50d29 Add DeviceAdapter::CopySubRange to all device adapters.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !516
2016-08-25 08:22:40 -04:00
Kenneth Moreland
f8442903d8 Replace TryAllTypes with trying exemplar tests
There were many tests that created code paths for every base and Vec
type that VTK-m supports (up to 4 components). Although this is
admirable, it is also excessive, and our compile times for the tests are
very long.

To shorten compile times, remove the TryAllTypes method. Replace it with
a version of TryTypes that uses a default list of "exemplar" set of
integers, floats, and Vecs.
2016-08-24 16:02:18 -06:00
Kenneth Moreland
fc0d804ad0 Reduce conditions to check in TestingFancyArrayHandles
By far the source file that was taking the longest to compile was that
for the fancy array handles. This is because this test was being
pedantic about all the different types it was testing. This change
should drastically reduce the types actually compiled for and,
therefore, also drastically reduce the compile time for this test.
2016-08-24 15:43:33 -06:00
Dave Pugmire
6f30b786f5 Add GLFW unit test.
Simplify the test code with a class templated on mapper, canvas and view.
2016-08-24 16:22:48 -04:00
Robert Maynard
14ad996d93 Update vtk-m to use CopySubRange where applicable. 2016-08-24 15:42:51 -04:00
Robert Maynard
51e50d2933 Add DeviceAdapter::CopySubRange to all device adapters.
This allows callers to copy a subsection of an array into another array,
without clearing the contents of the destination array if a resize
is required.
2016-08-24 15:42:51 -04:00
Dave Pugmire
78f368486c Did a chmod on these files that had the execute bit set. 2016-08-24 13:08:23 -04:00
Kenneth Moreland
6c09bbb64a Merge branch 'msvc-include-directories' into 'master'
Fix config issues with headers and libraries

There were a couple of places where the configure scripts did not add
either includes to VTKm_INCLUDE_DIRS or libraries to VTKm_LIBRARIES.

The biggest offender was when the examples used find_package to load the
VTK-m configuration it needed. find_package cleared out the includes and
libraries, but it did not clear out the VTKm_<COMPONENT>_FOUND
variables. Normally, these variables would not be set before
find_package is called, but in this case the examples were called after
some partial configuration. I got around this issue by clearing out all
the *_FOUND variables in VTKmConfig.cmake.

See merge request !515
2016-08-24 10:47:07 -04:00
Robert Maynard
2d31774b3b Add a Clip filter that can do iso value clipping. 2016-08-23 16:12:22 -04:00
Kenneth Moreland
866c617cbf Fix config issues with headers and libraries
There were a couple of places where the configure scripts did not add
either includes to VTKm_INCLUDE_DIRS or libraries to VTKm_LIBRARIES.

The biggest offender was when the examples used find_package to load the
VTK-m configuration it needed. find_package cleared out the includes and
libraries, but it did not clear out the VTKm_<COMPONENT>_FOUND
variables. Normally, these variables would not be set before
find_package is called, but in this case the examples were called after
some partial configuration. I got around this issue by clearing out all
the *_FOUND variables in VTKmConfig.cmake.
2016-08-23 14:07:38 -06:00
Robert Maynard
ce3c7f64b5 Merge topic 'clip_restructure'
af05ea0e Cleanup clipping so we can use it from a filter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !508
2016-08-22 09:56:21 -04:00
Mark Kim
e920659ab8 Don't need to set uni_tests. 2016-08-19 14:27:40 -06:00
Mark Kim
e3834d1c73 Merge https://gitlab.kitware.com/vtk/vtk-m 2016-08-18 14:33:37 -06:00
Mark Kim
5fbc55fa52 Check to see if osmesa or egl were found before adding testing. 2016-08-18 14:04:37 -06:00
Robert Maynard
9712de8b24 Merge topic 'wavelets'
d677d0d1 small tweaks
816364d2 in an effort to get rid of a warning
778da350 In attempt to fix errors and warnings
bb450c51 fix a warning
49e56b61 two new wavelet filters, HAAR and CDF8/4 supported now
767356bc working on even length filters; need ASYM* support in Extend1D()
a6efad04 half done even length filters implementation
ee32ea4c took off timing code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !482
2016-08-18 15:47:33 -04:00
Kenneth Moreland
069fc69869 Merge branch 'try-run-on-device' into 'master'
Add general purpose TryExecute

The filters directory had a couple of classes designed to try executing
filters on a list of devices until one succeeds. There was quite a bit
of code duplication in these, and the code was inaccessible to other
parts of VTK-m. This resolves both of these issues by moving the
functionality to a TryExecute method located in the vtkm::cont
package.

See merge request !507
2016-08-18 15:05:03 -04:00
Robert Maynard
af05ea0e8d Cleanup clipping so we can use it from a filter. 2016-08-18 12:50:20 -04:00
Samuel Li
d677d0d175 small tweaks 2016-08-18 10:28:41 -06:00
Samuel Li
816364d204 in an effort to get rid of a warning 2016-08-18 09:10:38 -06:00
Robert Maynard
b934c1c71b Remove improper defaults for worklets device adapter.
Without requiring c++11 we can't properly provided default device adapters
to templated functions.
2016-08-18 10:15:05 -04:00
Kenneth Moreland
ece53f514a Fix inappropriate placement of typename keyword
How did any compiler accept that?

Also fix minor warning with topology algorithm benchmark.
2016-08-17 15:51:43 -06:00
Kenneth Moreland
e488967c8f Use general TryExecute for filter execution
The TryExecute function was based off of the ResolveFieldTypeAnd*
classes made for filters. To reduce the amount of code duplication,
modify these two filter classes to use the more general TryExecute
functionality.
2016-08-17 14:13:51 -06:00
Samuel Li
778da350d5 In attempt to fix errors and warnings 2016-08-17 09:37:56 -07:00
Samuel Li
bb450c5156 fix a warning 2016-08-17 09:14:29 -07:00
Samuel Li
49e56b61b5 two new wavelet filters, HAAR and CDF8/4 supported now 2016-08-16 15:20:19 -06:00
Samuel Li
767356bc72 working on even length filters; need ASYM* support in Extend1D() 2016-08-15 17:54:15 -06:00
Kenneth Moreland
dd2edcab6c Add general ability to try execution on multiple devices
There are various reasons why you might want to execute something but
not have a specific device to execute on. To mange this, add a general
function that will try a list of devices in order and attempt to run on
them in order.
2016-08-15 17:16:58 -06:00
Kenneth Moreland
13c19ecf9a Remove unnecessary typename
There was an instance where the typename keyword was used to declare
that an item in a templated class is a type in a place where the full
type is known. Some compilers (e.g. Visual Studio) do not allow using
typename in this case.
2016-08-15 15:59:36 -06:00
Samuel Li
a6efad0448 half done even length filters implementation 2016-08-15 13:46:35 -06:00
Mark Kim
a5c3be294e Not specifying GLFW compatibility mode and OpenGL version allows for
annotation.
2016-08-12 19:29:01 -06:00
Mark Kim
cd27a71e2b Some Windows specific problems:
snprintf is incorrect pre-VS2013.
There are iterator issues (see 2121a36f)
far is a reserved #defined in windows *sigh*
2016-08-12 18:33:27 -06:00
Samuel Li
ee32ea4cf9 took off timing code 2016-08-12 18:07:36 -06:00
Samuel Li
ff5b1b8dbb performance tunes on IDWT worklet 2016-08-12 17:38:04 -06:00
Samuel Li
75d9ffdea2 address a few suggestions by Rob 2016-08-12 16:00:58 -06:00
Robert Maynard
60b63af707 Merge topic 'histogram_filter'
31156d2e Add a histogram filter.
04761975 Refactor FieldHistogram so class is not templated.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !503
2016-08-12 10:01:54 -04:00
Robert Maynard
31156d2e99 Add a histogram filter. 2016-08-12 08:40:11 -04:00
Robert Maynard
ede09ff62d Merge topic 'threshold_worklet_default_deviceadapter'
a8f23ba7 worklet::Threshold now has a default device adapter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !504
2016-08-11 16:01:52 -04:00
Robert Maynard
a8f23ba7ba worklet::Threshold now has a default device adapter. 2016-08-11 14:47:59 -04:00
Robert Maynard
04761975be Refactor FieldHistogram so class is not templated.
Move the template parameters to the Run method.
2016-08-11 14:46:45 -04:00
Samuel Li
986db4f2bc fix a few warnings 2016-08-11 09:39:20 -07:00
Samuel Li
710d59d33a Change on class signatures of Filter and Base 2016-08-10 17:24:22 -06:00
Samuel Li
e7b288dba1 eliminates explicit calling VTKM_DEFAULT_DEVICE_ADAPTER_TAG 2016-08-10 14:33:14 -06:00
Robert Maynard
2bbbc7d38e Rename DynamicArrayHandle::IsArrayHandleType to IsType
This way DynamicArrayHandle and DynamicCellSet have a common set
of methods.
2016-08-10 11:03:57 -04:00
Samuel Li
062aec45f7 some helper functions are in 2016-08-09 17:02:10 -06:00
Mark Kim
7bb3e89e87 Split EGL and OSMesa into separate directories. libGL and libOSMesa do not play well together. 2016-08-08 21:57:38 -04:00
Samuel Li
f3d7aeced1 use std::vector<vtkm::Id> instead of raw arrays for bookkeeping 2016-08-08 17:59:15 -06:00
Samuel Li
8936ef641e fix a warning in ArrayHandleConcatenate, also add tests to TestingFancyArrayHandles 2016-08-08 16:38:41 -06:00
Samuel Li
8210dcda09 fix throw error 2016-08-08 15:55:49 -06:00
Samuel Li
2b3e2f2fc7 throw an error 2016-08-08 15:20:50 -06:00
Robert Maynard
856b8b547d Express in the the threshold filter policy it only handles scalars. 2016-08-08 16:51:09 -04:00
Samuel Li
71454c11b4 took off function in progress 2016-08-08 14:38:38 -06:00
Samuel Li
7ee9c7d949 each enum is now in its own line 2016-08-08 14:35:14 -06:00
Samuel Li
c72b135608 Uncomment other build objects 2016-08-08 12:21:08 -04:00
Robert Maynard
720dc149d1 properly link vtkm::interop to pthread. 2016-08-08 11:14:25 -04:00
Robert Maynard
2406f45cd7 Merge topic 'pass_fields_and_coordinates_to_invoke'
08a33675 Prefer vtkm::cont::CastAndCall function over the member method.
31138293 Pass Fields and CoordinateSystems to Dispatcher::Invoke
146d8009 make CastAndCall a free function instead of a class.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: T.J. Corona <tj.corona@kitware.com>
Merge-request: !497
2016-08-08 08:56:01 -04:00
Robert Maynard
d39d46b997 Merge topic 'field_topology_benchmarks'
02929c79 Add more benchmarks that work at the Worklet level.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !478
2016-08-08 08:33:30 -04:00
Samuel Li
a1bd8ff56d changes to ArrayHandlePermutation reverted 2016-08-06 12:52:55 -07:00
Samuel Li
34ce28576d change unittest for review 2016-08-06 12:34:03 -07:00
Samuel Li
3d29e504cc fixed a memory bug, now I believe it's ready for merge 2016-08-06 00:08:29 -07:00
Samuel Li
7a52b2744a ready for review, but suspect boost is messing up with smart pointers 2016-08-05 19:45:30 -07:00
Samuel Li
8f99f0220b Add throw errors 2016-08-05 17:08:25 -06:00
Samuel Li
69d3a73444 clean up comments 2016-08-05 15:46:52 -07:00
Robert Maynard
02929c79e4 Add more benchmarks that work at the Worklet level.
These benchmarks are the foundation to expanding the benchmarking folder
to verify the performance of more than just the device adapter.
2016-08-05 16:30:20 -04:00
Robert Maynard
0f545c53e3 Merge topic 'now_can_build_with_cxx11'
a6609311 Silence auto_ptr deprecation warnings with older boosts ( < 1.61 )
6d38f44d Update ListTag and DispatcherBase to leverage C++11 features.
ea0d84a8 Remove VTK-m Variadic defines and replace them with a single CXX11 define
77121d18 Add support to VTK-m to build with C++11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !475
2016-08-05 16:03:35 -04:00
Robert Maynard
08a33675f6 Prefer vtkm::cont::CastAndCall function over the member method. 2016-08-05 15:29:39 -04:00
Robert Maynard
31138293f9 Pass Fields and CoordinateSystems to Dispatcher::Invoke
Now that we can handle scheduling Fields and CoordinateSystems, do
2016-08-05 15:26:17 -04:00
Robert Maynard
146d800968 make CastAndCall a free function instead of a class.
Overloading the function serves the same purpose of specializing the
class, but requires less syntax sugar to do.
2016-08-05 15:18:22 -04:00
Samuel Li
6d063154e0 Thresholding avoids a memory transfer 2016-08-03 18:23:34 -04:00
T.J. Corona
9e9e32ace7 Merge topic 'field-coordsystem-invoke'
927387b1 Add vtkm::cont::Field,CoordinateSystem as Invokable parameters.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !494
2016-08-03 17:24:13 -04:00
Samuel Li
0164d38e91 use a worklet to perform array extension 2016-08-03 16:34:02 -04:00