The RuntimeDeviceInformation class allows developers to check if a given
device is supported on a machine at runtime. This allows developers to properly
check for CUDA support before running any worklets.
When writing multiple backend code users of vtkm need to use the
DeviceAdapterTraits classes, so therefore we should move them to vtkm::cont
to signify this.
Like the ability to specify the vectorization level, users of CMake can
now specify what GPU architectures they want to build for. Most users
should just use the default 'native'.
WholeArray tag for ControlSignature
Add WholeArrayIn, WholeArrayInOut, and WholeArrayOut tags for ControlSignature. They tags behave similarly to using an ExecObject tag with an ExecutionWholeArray or ExecutionWholeArrayConst object. However, the WholeArray* tags can simplify some implementations in two ways. First, it allows you to specify more precisely what data is passed in. You have to pass in an ArrayHandle or else an error will occur (as opposed to be able to pass in any type of execution object). Second, this allows you to easily pass in arrays stored in DynamicArrayHandle objects. The Invoke mechanism will automatically find the appropriate static class. This cannot be done easily with ExecutionWholeArray.
See merge request !284
Use std::Min/Max over fmin/fmax
We had a report that vtkm::Min/Max was significantly slower than other
products. This was traced back to the fact that these functions were not
completely inlining because they were calling fmin or fmax, and that
resulted in an actual C library call. It turns out using the templated
functions in the std namespace is faster.
This change has the VTK-m min/max functions use the std version in
almost all circumstances. The one exception (so far) is that fmin and
fmax are used for CUDA devices since the std functions are not declared
to run on the device and the nvcc compiler treats these functions
special.
See merge request !279
The two worklets for marching cubes use tables stored in arrays that
have random access. Previously, they arrays were passed using the
ExecObject tag in ControlSignature along with ExecutionWholeArrayConst.
This changes to using a WholeArrayIn tag and just passing the
ArrayHandle directly to the Invoke method. The end result is the same,
but the code is a bit cleaner.
The WholeArrayIn, WholeArrayInOut, and WholeArrayOut ControlSignature
tags behave similarly to using an ExecObject tag with an
ExecutionWholeArray or ExecutionWholeArrayConst object. However, the
WholeArray* tags can simplify some implementations in two ways. First,
it allows you to specify more precisely what data is passed in. You have
to pass in an ArrayHandle or else an error will occur (as opposed to be
able to pass in any type of execution object). Second, this allows you
to easily pass in arrays stored in DynamicArrayHandle objects. The
Invoke mechanism will automatically find the appropriate static class.
This cannot be done easily with ExecutionWholeArray.
We had a report that vtkm::Min/Max was significantly slower than other
products. This was traced back to the fact that these functions were not
completely inlining because they were calling fmin or fmax, and that
resulted in an actual C library call. It turns out using the templated
functions in the std namespace is faster.
This change has the VTK-m min/max functions use the std version in
almost all circumstances. The one exception (so far) is that fmin and
fmax are used for CUDA devices since the std functions are not declared
to run on the device and the nvcc compiler treats these functions
special.
2df501c7 Suppress failure to vectorize warnings from the Intel Compiler.
68e3032b Properly detect OSX Intel Compiler as Intel not Clang.
646b3ad7 Suppress notification about failure to vectorize on release builds.
05e8f592 Disable vectorization pragma's if we detect the compiler doesn't support them.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !282
Use vtkm::Float32 with OpenGL, not vtkm::FloatDefault.
When vtkm was built with VTKm_USE_DOUBLE_PRECISION, the IsosurfaceUniformGrid
example would not compile. Now it does.
See merge request !283
When a C++ object is constructed, the fields (ivars) of that object are
initialized in the order they are declared in the structure regardless
of the order of initializers listed in the constructor. Thus, it is good
C++ convention to list the initializers of the constructor in the same
order they are declared in the class so that there is no confusion about
the order of initialization (which can matter if there are any
dependencies). To help enforce this convention, some compilers warn if
the order does not match. This commit fixes that issue.
This commit also removes trailing whitespace at the end of some lines in
StreamLineUniformGrid.h. My editor does this automatically because
trailing whitespace bugs some programmers.
vtkm::Id is a signed integer whereas size_t used by standard C++
functions is unsigned. It doesn't matter, but compilers like to complain
about it. Make any such conversions explicit.
4ceb111a Enable vectorization inside the Serial and TBB backends.
514ea09a Teach VTK-m how to enable vectorization for gcc, clang, and icc.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !275
6c4fb856 Add example data file for streamline.
cba0e218 Verify unit test results
3946b0c4 Add unit test, pass all args in Run()
09e43778 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into streamline
02f84a19 StreamLine filter outputs dataset. Add example.
34cc9719 StreamLine particle tracing returns output dataset.
e34aaa02 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into streamline
82d9c102 Pass input and output datasets and not arrays. Support FORWARD, BACKWARD and BOTH.
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !267
8dca9f5f Fix case in reference to UseVTKmCUDA.cmake.
5a4c357c Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m
53bb34b8 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m
5b1a6b36 Adding Clear() method to DataSet.
f5e3c3ac Add missing methods to CellSetPermutation.
cec123c6 CellSetSingleType::Fill now works with custom storage types.
8adbdefd WIP: Install missing header.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !274
Improve CMake module
Some improvements to VTKmConfig.cmake and the device configuration scripts to better support CMake projects using VTK-m.
See merge request !271