Commit Graph

356 Commits

Author SHA1 Message Date
Kenneth Moreland
b90b1132c7 Fix ArrayHandle test on MSVC
The test was creating a large array on the stack, and this caused a
problem on Windows for some reason. Instead of putting the array on
the stack, use an std::vector. Also reduced the size of the array
used. It seemed unnecessarily large.

Also re-enabled the tests where VTK-m allocates its own ArrayHandle
data.
2015-07-27 15:56:51 -06:00
Kenneth Moreland
85a2545c1e Fix various MSVC warnings.
Most warnings had to do with implicit type conversions and some on
treating an integer (actually a pointer) as a boolean.
2015-07-27 15:56:04 -06:00
Robert Maynard
19aa6b8d62 Update the 3d scheduling benchmark code to use the new 1d scheduler 2015-07-23 16:31:41 -04:00
Robert Maynard
d0d11640ea Cuda now can schedule worklets that require more than 2B instances. 2015-07-23 16:31:28 -04:00
Robert Maynard
e1cd7737c6 Add a test to verify that we can schedule large arrays. 2015-07-23 16:31:23 -04:00
Robert Maynard
98d6e99275 Correct some warnings about 64bit to 32bit conversion. 2015-07-23 09:29:10 -04:00
Will Usher
50fa6f78d3 Fix support for enabling 64bit vtkm::Id and double precision
The CMake flag and define differ in their capitalization of the 'm' in
VTKm so I've made CMake variables that match those used in Configure.h.in,
thereby keeping the original naming of VTKm in CMake code, and VTKM in the
C++ code.

This fix also revealed some areas in CellSet and CellSetExplicit where ints
where used instead of vtkm::Ids which caused errors with child classes who
override the methods and returned a vtkm::Id instead of an int.

Also fixed issues that appeared in TestOutOfMemory which got out of date due
to not being compiled since the `VTKM_USE_64BIT_IDS` flag would never be set.
The test now runs and passes when 64bit ids are enabled.
2015-07-23 09:01:39 -04:00
Sujin Philip
c7d3d0df5c Merge branch 'add-compute-bounds' into 'master'
Add compute bounds to Fields

See merge request !88
2015-07-22 14:26:48 -04:00
Sujin Philip
91b191bf83 Add compute bounds to Fields 2015-07-22 12:17:33 -04:00
Robert Maynard
b2db2e79a2 Remove unneeded typedef. 2015-07-20 15:02:52 -04:00
Robert Maynard
780f3fea29 Merge branch 'correct_cuda_scheduling_over_8m' into 'master'
Correct cuda scheduling over 8m

See merge request !91
2015-07-20 15:01:05 -04:00
Robert Maynard
9f16669e3c Increase the robustness of 3d scheduling when X dim is very small. 2015-07-20 13:27:58 -04:00
Robert Maynard
7a21a08c46 Handle 1D scheduling with over 65k blocks on SM2.X arch.
The initial implementation forgot about the fact that SM2.X architectures
can only handle 65k blocks. Now we gracefully handle when compiling for
SM2.X.
2015-07-20 13:26:16 -04:00
Sujin Philip
1a9e8d1e3d Initial support for generating documentation using Doxygen 2015-07-17 15:35:59 -04:00
Robert Maynard
74377ecc92 Merge branch 'simplify_cuda_iterator_detection' into 'master'
Simplify cuda iterator detection

See merge request !83
2015-07-16 14:19:59 -04:00
Robert Maynard
765cc36ba5 Guard against tbb including windows.h in a damaging fashion.
tbb includes windows.h, and doesn't use the NOMINMAX so we need to do
that ourselves so that we can use std::min/max and limits<T>::min/max.

At the same we also define WIN32_LEAN_AND_MEAN so that the total number of
macros that windows.h defines is reduced.
2015-07-15 09:51:46 -04:00
Robert Maynard
75d11f66cf Merge branch 'add_compositevector_to_fancy_test' into 'master'
Verify ArrayHandleCompositeVector can be used on with each device adapter.

See merge request !82
2015-07-14 10:53:08 -04:00
Robert Maynard
5ec088e916 Remove IteratorType from ArrayHandlePermutation. 2015-07-14 10:11:27 -04:00
Robert Maynard
e74ded809a Defer more thrust iterator deduction logic to ArrayPortalToIterators. 2015-07-14 10:11:12 -04:00
Robert Maynard
4ba1f7c853 Remove the need for any portal to define an IteratorType. 2015-07-13 17:16:27 -04:00
Sujin Philip
1b74eb6073 Add all data members to vtkm::cont::Field constructors' initializer lists 2015-07-13 17:14:57 -04:00
Sujin Philip
c95f265ec0 Make vtkm::cont::Field class const correct 2015-07-13 16:20:39 -04:00
Sujin Philip
9f1f1727a4 Consturct Field from given DynamicArrayHandle
Add un-templated contructors to Field that construct a Field from the given DynamicArrayHandle, without knowing the underlying type.
2015-07-13 15:50:07 -04:00
Sujin Philip
9a20b9e4b7 Changes to follow VTK-m coding conventions 2015-07-13 15:43:48 -04:00
Robert Maynard
c6c072fac1 Verify ArrayHandleCompositeVector can be used on with each device adapter. 2015-07-13 13:01:41 -04:00
Robert Maynard
c28ca7aa41 Up the default tbb grain size, and use the grain size everywhere. 2015-07-09 15:51:29 -04:00
Robert Maynard
2f0205f421 Merge branch 'fix-upper-bounds-out-type' into 'master'
Correct type for the output portal in DeviceAdapterAlgorithmGeneral::UpperBounds

It looks like the type here was accidently written as a `ArrayHandle<T, COut>` when it should (I think) be `ArrayHandle<vtkm::Id, COut>`. I Encountered this causing a compilation error when trying to run some
benchmarks with FloatDefault input and values since it was using the
wrong type for some iterators if I recall correctly and couldn't cast to the vtkm::Id
type. This should fix that by using the correct type for the output
portal.

See merge request !75
2015-07-09 08:40:57 -04:00
Brent Lessley
b8381a1e6b Added an additional storage type template parameter. This addition enables any subclass of ArrayHandle (e.g., ArrayHandleCounting) to have proper printing functionality, without compilation errors. 2015-07-08 19:49:35 -07:00
Kenneth Moreland
d6169e0bb5 Merge branch 'dynamic-array-get-number-of-components' into 'master'
Add data size introspection to DynamicArrayHandle.

Sometimes it is useful to know how big an array held in a
DynamicArrayHandle is. This adds two methods to DynamicArrayHandle:
GetNumberOfValues and GetNumberOfComponents. They allow you to query the
size of the array without having to statically cast to the array itself.

See merge request !76
2015-07-08 17:02:09 -04:00
Kenneth Moreland
a7a8248cfb Add data size introspection to DynamicArrayHandle.
Sometimes it is useful to know how big an array held in a
DynamicArrayHandle is. This adds two methods to DynamicArrayHandle:
GetNumberOfValues and GetNumberOfComponents. They allow you to query the
size of the array without having to statically cast to the array itself.
2015-07-08 14:09:36 -06:00
Will Usher
a6078a6413 It looks like the type here should actually be vtkm::Id
Encountered this causing a compilation error when trying to run some
benchmarks with FloatDefault input and values since it was using the
wrong type for some iterators iirc and couldn't cast to the vtkm::Id
type. This should fix that by using the correct type for the output
portal.
2015-07-08 14:01:30 -06:00
Robert Maynard
faba821809 Merge branch 'remove_unneeded_helpers' into 'master'
Remove unneeded helpers from the TestingDeviceAdapter.

See merge request !74
2015-07-08 12:34:38 -04:00
Robert Maynard
ffa1e4ed50 Remove unneeded helpers from the TestingDeviceAdapter. 2015-07-08 10:58:20 -04:00
Kenneth Moreland
eb870fb045 Fix ICC warning about unused member method
Specifically a conversion operator was not being used in the StringInt
class of UnitTestArrayHandleCounting. Because it was in an anonymous
namespace that could not be used outside of the file, ICC warned about
it. Rather than remove the method, which could cause confusion later,
gave the namespace a name so the compiler assumes that the class could
potentially be used somewhere else.
2015-07-06 10:40:08 -06:00
Kenneth Moreland
4fc3626712 Fix compiler directives for icc
The Intel icc compiler tries to pretend it is gcc, but it sometimes
behaves differently. Add more explicit checks for what compiler is
being used.
2015-07-06 10:35:06 -06:00
Robert Maynard
ef33573d62 Remove unreferenced local variable 2015-07-01 08:33:35 -04:00
Robert Maynard
804166cdba Correct warning C4800 from msvc ( forcing value to bool 'true' or 'false' ). 2015-07-01 08:18:22 -04:00
Robert Maynard
21205d0785 Merge branch 'degagore_warnings' into 'master'
Degagore warnings

See merge request !66
2015-06-30 09:45:05 -04:00
Robert Maynard
e1d1a08161 Correct casting issues ArrayHandleUniformPointCoordinates. 2015-06-30 09:21:19 -04:00
Robert Maynard
b18f59f10c Remove unused typedef in DeviceAdapterAlgorithmGeneral. 2015-06-30 08:38:25 -04:00
Robert Maynard
d12375450f Make ChooseCudaDevice only consider SM3 and above equal. 2015-06-30 08:18:16 -04:00
Robert Maynard
6af949f488 Fix warnings in ChooseCudaDevice by moving performance metric to double. 2015-06-30 08:16:42 -04:00
Robert Maynard
c53f61d4fd Make releasing an implicit storage resources a no-op instead of exception.
See https://gitlab.kitware.com/vtk/vtk-m/issues/16 for the full discussion.
2015-06-29 11:56:53 -04:00
Robert Maynard
40a2ce0645 Merge branch 'MeshSimplifyWorklets' into 'master'
Mesh simplify worklets

Vertex clustering algorithm and a AverageByKey computation are now in vtkm::worklets

See merge request !57
2015-06-29 09:49:19 -04:00
Kenneth Moreland
3b9bb5ffeb Merge branch 'math' into 'master'
Math

Adds a set of portable math functions, most of which are "expected" to be available and are typically useful. They include things like trigonometry (sin, cos, tan, etc.), floating point information (nan, finite, etc), and min/max.

See merge request !58
2015-06-27 20:29:49 -04:00
Kenneth Moreland
4a8d69ca66 Add CUDA math test
Also fix some issues that caused the compile to fail when trying to
run some of the math functions on a CUDA device. In particular, CUDA
is picky about using a global const on a device when the const type is
not one of the basic C types.
2015-06-25 13:54:24 -06:00
Robert Maynard
47f9874132 Extend the array handle testing to be done on a per device basis.
Now we test ArrayHandle with all the vtkm types to make sure all the
transfer logic / access logic works for all T types.
2015-06-25 08:21:49 -04:00
Jimmy
03823d96a1 Fix VertexClustering and missing iteratortype in ArrayHandleImplicit.h for CUDA 2015-06-24 16:35:11 -04:00
Jimmy
4220b37135 Finish testing codes for VertexClustering 2015-06-24 14:55:22 -04:00
Chun-Ming Chen
ebd6e43409 Added VertexClustering test 2015-06-24 14:55:22 -04:00