Commit Graph

1164 Commits

Author SHA1 Message Date
Patricia Kroll Fasel - 090207
498fc682ca Cell to point compiler errors 2015-11-02 11:05:12 -07:00
Kenneth Moreland
6e5f188b7c Add DeviceAdapterSerial.h to data set permuation test
A recent change to the DeviceAdapter header includes the TBB device if
available instead of the serial device. Thus, DeviceAdapterTagSerial was
not defined automatically in all cases for the build of
UnitTestDataSetPermutation. Add the header for that explicitly.
2015-11-02 10:49:51 -07:00
Robert Maynard
5a4ad3eaf7 Merge topic 'remove_cuda_reduce_no_return_warning'
85d28667 Add a return statement to reduce to stop false positive warnings.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !254
2015-11-02 12:46:06 -05:00
Jeremy Meredith
9b534ff43d Merge branch 'exporter' into 'master'
adding VTK file exporter and test cases

This adds a legacy VTK file exporter which supports unstructured, explicit, and point meshes.  (Single Cell Type cell sets are also supported.)


See merge request !247
2015-10-30 17:39:04 -04:00
Patricia Kroll Fasel - 090207
ed0ecf284d Parallel CellToPoint initial code. 2015-10-30 13:59:36 -06:00
Jeremy Meredith
42d213a898 renaming exporters to writers. 2015-10-30 15:45:38 -04:00
Robert Maynard
85d28667c2 Add a return statement to reduce to stop false positive warnings. 2015-10-30 14:55:13 -04:00
Robert Maynard
52467474aa Merge topic 'DeviceAdapter-preprocessor-logic'
04a48129 Add DeviceAdapter preprocessor logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !168
2015-10-29 16:02:01 -04:00
Robert Maynard
022898072c Update Benchmark code to properly verify all algorithms. 2015-10-28 14:20:06 -04:00
Robert Maynard
adace4e10e Merge topic 'conditionaly_check_for_dynamic_types_in_dispatcher'
ca71d70b Update worklet UnitTests to not try statically known invalid combinations
6b2edb70 Update UnitTestDispatcherBase to use verify DynamicTransform error messages.
9fdc0f09 Improve the error message for Invoke type mismatch at compile time.
54d25fae Only perform DynamicTransformCont if at least one parameter is dynamic.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !249
2015-10-27 08:49:49 -04:00
Robert Maynard
fdb31fc695 Merge topic 'reduce_device_algorithm_template_complexity'
8816642d Move algorithms out of DeviceAdapterAlgorithmGeneral to reduce compilation size
c78e54fa Move algorithms out of DeviceAdapterAlgorithmTBB to reduce compilation size.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !248
2015-10-27 08:40:47 -04:00
Robert Maynard
8816642dfd Move algorithms out of DeviceAdapterAlgorithmGeneral to reduce compilation size 2015-10-26 17:22:49 -04:00
Robert Maynard
ca71d70bed Update worklet UnitTests to not try statically known invalid combinations 2015-10-26 17:21:24 -04:00
Robert Maynard
6b2edb703b Update UnitTestDispatcherBase to use verify DynamicTransform error messages. 2015-10-26 16:36:35 -04:00
Robert Maynard
9fdc0f09fc Improve the error message for Invoke type mismatch at compile time.
Now that we can skip generating the DynamicTransform code when all the
arguments are statically known, we need a way to produce nicer error messages.
2015-10-26 16:35:02 -04:00
Robert Maynard
54d25fae55 Only perform DynamicTransformCont if at least one parameter is dynamic.
Previously we always ran DynamicTransformCont even if we knew all the types.
By checking for Dynamic types first, we save roughly 3% on the binary size.

This also is a good starting point for a redesign of DynamicTransformCont
2015-10-26 13:48:25 -04:00
Robert Maynard
c78e54facc Move algorithms out of DeviceAdapterAlgorithmTBB to reduce compilation size. 2015-10-26 09:47:13 -04:00
Robert Maynard
93dba7782a Merge topic 'reduce_dispatcher_template_complexity'
39142d83 Add convenience tags like FieldInPoint, FieldInCell, to WorkletMapPointToCell
f34119b6 Clarify the name of  worklet for point to cell operations.
2c767e10 Add WorkletMapTopologyBase to make Dispatcher templates easier to read.
05d397cb Remove unnecessary template parameters from DispatcherMapField

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !246
2015-10-26 09:29:05 -04:00
Robert Maynard
39142d8347 Add convenience tags like FieldInPoint, FieldInCell, to WorkletMapPointToCell 2015-10-23 09:50:48 -04:00
Robert Maynard
f34119b62e Clarify the name of worklet for point to cell operations. 2015-10-22 18:46:00 -04:00
Jeremy Meredith
a78e735b3c adding VTK file exporter and test cases. 2015-10-22 17:18:33 -04:00
Kenneth Moreland
dc11d9a917 Merge branch 'cuda-default-constructors' into 'master'
CUDA default constructors, destructors, and assignment operators

Several classes exclusively work in the control environment. However, CUDA likes to add __device__ to constructors, destructors, and assignment operators it automatically creates. This in turn causes warnings about the __device__ function using host-only classes (like boost::shared_ptr). Solve this problem by adding explicit methods for all of these.


See merge request !245
2015-10-22 15:22:43 -04:00
Robert Maynard
2c767e10f7 Add WorkletMapTopologyBase to make Dispatcher templates easier to read. 2015-10-22 12:22:59 -04:00
Robert Maynard
05d397cbf7 Remove unnecessary template parameters from DispatcherMapField
DispatcherMapField was templated on the device adapter but it
actually doesn't need to be, only BasicInvoke and subsequent
methods need to be templated on the device.
2015-10-22 12:22:59 -04:00
Kenneth Moreland
fec9262099 Add default constructors/destructors/assignment to Dynamic* classes
The DynamicArrayHandle and DynamicCellSet classes exclusively work in
the control environment. However, CUDA likes to add __device__ to
constructors, destructors, and assignment operators it automatically
adds. This in turn causes warnings about the __device__ function using
host-only classes (like boost::shared_ptr). Solve this problem by adding
explicit methods for all of these.
2015-10-22 09:44:51 -06:00
Kenneth Moreland
c7e9c1b67c Add default constructors/destructors/assignment to CellSet classes
The CellSet classes all exclusively work in the control environment.
However, CUDA likes to add __device__ to constructors, destructors, and
assignment operators it automatically adds. This in turn causes warnings
about the __device__ function using host-only classes (like
boost::shared_ptr). Solve this problem by adding explicit methods for
all of these.
2015-10-21 16:28:18 -06:00
Kenneth Moreland
65c2261892 Add default constructors/destructors/assignment to ArrayHandle classes
The ArrayHandle classes all exclusively work in the control environment.
However, CUDA likes to add __device__ to constructors, destructors, and
assignment operators it automatically adds. This in turn causes warnings
about the __device__ function using host-only classes (like
boost::shared_ptr). Solve this problem by adding explicit methods for
all of these.

Implemented this by wrapping up all these default objects in a macro.
This also solved the problem of other constructors that are necessary
for array handles such as a constructor that takes the base array
handle.
2015-10-21 13:36:27 -06:00
Kenneth Moreland
b861209a22 Fix nvcc warnings on MSVC
There is a strange nvcc warning in CUDA 7.5 that sometimes happens on MSVC
that causes it to emit a warning for an undefined method that is clearly
defined. The CUDA development team is aware of the problem and is going
to fix it, but these changes will work around the problem for now.

Thanks to Tom Fogal from NVIDIA for these fixes.
2015-10-21 08:33:15 -06:00
Kenneth Moreland
e028f2af99 Supress some warnings about copies in FunctionInterface. 2015-10-21 07:55:59 -06:00
Kenneth Moreland
7ff62d8d6b Explicitly add destructors and copy constructors to ArrayHandle classes
Under CUDA, the default constructors and destructors created are exported
as __host__ and __device__, which causes problems because they used a boost
pointer that only works on the host. The explicit copy constructors and
destructors do the same thing as the default ones except declared to only
work on the host.
2015-10-21 07:50:52 -06:00
Robert Maynard
8de216c088 Propagate vtkm::Id3 scheduling down to the ThreadIndex classes.
This now allows for even more efficient construction of uniform point
coordinates when running under the 3d scheduler, since we don't need to go
from 3d index to flat index to 3d index, instead we stay in 3d index
2015-10-20 09:29:41 -04:00
Kenneth Moreland
1773210635 Merge branch 'shared-indices-in-fetch' into 'master'
Change Fetches to use ThreadIndices instead of Invocation.

Previously, all Fetch objects received an Invocation object in their
Load and Store methods. The point of this was that it allowed the Fetch
to get data from any of the execution objects. However, every Fetch
either just got data directly from its associated execution object or
else used a secondary execution object (the input domain) to get indices
into their own execution object.

This left two potential areas for improvement. First, pulling data out
of the Invocation object was unnecessarily complicated. It would be much
nicer to get data directly from the associated execution object. Second,
when getting index information from the input domain, it was often the
case that extra computations were necessary (particularly on structured
cell sets). There was no way to share the index information among
Fetches, and therefore the computations were replicated.

This change removes the Invocation from the Fetch Load and Store.
Instead, it passes the associated execution object and a new object type
called the ThreadIndices. The ThreadIndices are customized for the input
domain and therefore have all the information needed for a redirected
lookup. It is also a thread-local object so it can cache computed
indices and save on computation time.

See merge request !233
2015-10-19 17:41:43 -04:00
Patricia
58178a3e00 Merge topic 'stat_histogram'
d3d63a0a Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into stat_histogram
4aa57d5c Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into stat_histogram
49940a4c Attempt to fix compiler errors and warnings.
0e0f5d2e Fix compiler warnings.
a6487b3c Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into stat_histogram
c2a9f184 Fix syntax of ArrayHandleCounting usage
6dd8bde6 Merge branch 'master' into stat_histogram

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !190
2015-10-14 15:56:24 -04:00
Sujin Philip
4642889f93 Merge topic 'add-Threshold'
e4a8ae82 Add Threshold worklet and unit tests.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !236
2015-10-14 14:34:17 -04:00
Patricia Kroll Fasel - 090207
d3d63a0a20 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into stat_histogram 2015-10-14 11:51:31 -06:00
Robert Maynard
95f0ed5016 CellSetSingleType::Fill now works with custom storage types. 2015-10-14 11:03:24 -04:00
Robert Maynard
c78aac4650 UnitTestClipping now properly handles 64bit vtkm::FloatDefault. 2015-10-13 10:29:46 -04:00
Robert Maynard
9006b97432 Manually do copy_backwards since ICC was replacing it with copy
When ICC replaced copy_backwards with copy it causes a failure when the
input and output arrays are the same.
2015-10-12 15:19:54 -04:00
Sujin Philip
e4a8ae82ed Add Threshold worklet and unit tests. 2015-10-12 14:37:59 -04:00
T.J. Corona
b1665dcb32 Add an array handle for bare cuda device pointers.
Array handles for cuda device pointers have been implemented. The data for
these handles exists solely on the exec side (info such as length can be
queried from the cont side).
2015-10-09 12:41:33 -04:00
Patricia Kroll Fasel - 090207
65c9de08bd Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_explicit 2015-10-08 16:07:18 -06:00
Patricia
610672a3a1 Merge topic 'tetra_uniform'
5f6a552a Compiler warnings
b7473712 Compiler warnings GL deprecated
2f532bf3 Compiler warnings
5569d8c1 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform
0e8b9b15 Compiler warnings.
810e6b00 Fix CastTo with template to avoid compiler errors.
deceb79e Fix to work with gcc and pgi compilers.  Change to use CellSetSingleType.
f624683e Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !204
2015-10-08 17:36:47 -04:00
Patricia Kroll Fasel - 090207
2b43e52516 Compiler warnings 2015-10-08 11:38:56 -06:00
Patricia Kroll Fasel - 090207
2f532bf379 Compiler warnings 2015-10-08 11:11:08 -06:00
Patricia Kroll Fasel - 090207
cba29a1e67 Fix compiler warnings 2015-10-08 10:52:34 -06:00
Patricia Kroll Fasel - 090207
cbbd7e6edd Initialize variable used in if test. 2015-10-08 10:18:05 -06:00
Sujin Philip
15ad595888 Add support for clipping with implicit functions 2015-10-08 12:12:51 -04:00
Patricia Kroll Fasel - 090207
0b9cffe4f4 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_explicit 2015-10-08 09:56:44 -06:00
Sujin Philip
715ddedd25 Merge topic 'add-implicit-functions'
5ea70b6d Add implicit functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !232
2015-10-08 11:41:17 -04:00
Patricia Kroll Fasel - 090207
5569d8c1b1 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-10-08 09:35:10 -06:00
Patricia Kroll Fasel - 090207
4aa57d5c64 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into stat_histogram 2015-10-08 09:13:28 -06:00
Sujin Philip
5ea70b6ddd Add implicit functions 2015-10-08 09:32:14 -04:00
Kenneth Moreland
99ce66c6fe Change Fetches to use ThreadIndices instead of Invocation.
Previously, all Fetch objects received an Invocation object in their
Load and Store methods. The point of this was that it allowed the Fetch
to get data from any of the execution objects. However, every Fetch
either just got data directly from its associated execution object or
else used a secondary execution object (the input domain) to get indices
into their own execution object.

This left two potential areas for improvement. First, pulling data out
of the Invocation object was unnecessarily complicated. It would be much
nicer to get data directly from the associated execution object. Second,
when getting index information from the input domain, it was often the
case that extra computations were necessary (particularly on structured
cell sets). There was no way to share the index information among
Fetches, and therefore the computations were replicated.

This change removes the Invocation from the Fetch Load and Store.
Instead, it passes the associated execution object and a new object type
called the ThreadIndices. The ThreadIndices are customized for the input
domain and therefore have all the information needed for a redirected
lookup. It is also a thread-local object so it can cache computed
indices and save on computation time.
2015-10-07 17:01:42 -06:00
Kenneth Moreland
bfb26cf71b Do not use _Pragma in code blocks with CUDA
The current CUDA compiler is crashing when using _Pragma in code blocks,
which were being used with clang on apple. Turn these off when compiling
with CUDA.
2015-10-07 15:40:44 -06:00
Robert Maynard
fbddba74a1 Merge topic 'cellset_permutation'
9a8809f9 Add CellSetPermutation which allows custom iteration over a cell set.
66f6db5a IsWriteableArrayHandle now can tell if an array handle can be written too
20f3fb50 Update VertexClustering to use vtkm::cont::CellSetSingleType.
154896b7 Extend the test for DataSetSingleType.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !228
2015-10-07 16:21:40 -04:00
T.J. Corona
a9425ac1bb In DataSet, add the ability to retrieve a cell set by name. 2015-10-02 08:31:57 -04:00
Patricia Kroll Fasel - 090207
49940a4cbf Attempt to fix compiler errors and warnings. 2015-10-01 15:08:36 -06:00
Patricia Kroll Fasel - 090207
0e0f5d2e75 Fix compiler warnings. 2015-10-01 12:26:44 -06:00
Robert Maynard
f38673f618 Replace ErrorControlOutOfMemory with ErrorControlBadAllocation. 2015-10-01 14:25:28 -04:00
Robert Maynard
085711e2d2 Merge topic 'bad-allocation-error'
a88f43db Add Bad Allocation error.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !213
2015-10-01 14:19:57 -04:00
Patricia Kroll Fasel - 090207
a6487b3c79 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into stat_histogram 2015-10-01 10:15:02 -06:00
Robert Maynard
9a8809f933 Add CellSetPermutation which allows custom iteration over a cell set.
When you create a CellSetPermutation you provide an array of the cell ids that
you want to iterate. This allows the user to do custom blanking of a data set,
or to do multi iteration over a set of cells.
2015-10-01 09:23:10 -04:00
Robert Maynard
66f6db5a97 IsWriteableArrayHandle now can tell if an array handle can be written too 2015-10-01 09:23:10 -04:00
Robert Maynard
20f3fb5000 Update VertexClustering to use vtkm::cont::CellSetSingleType. 2015-10-01 09:23:10 -04:00
Robert Maynard
154896b7bc Extend the test for DataSetSingleType. 2015-10-01 08:50:54 -04:00
Robert Maynard
ac48e13c3a Merge topic 'cleanup_cellset_explicit'
8bc40880 Add a test for CellSetExplicit::GetIndices
fa81d1de CellSetExplicit always calls methods using "this->"
9e496306 Allow incremental construction of CellSetSingleType.
3e307879 Mark CellSetExplicit::Fill as host side only.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !227
2015-09-30 13:48:08 -04:00
Sujin Philip
757891cfcc Merge topic 'fix-ArrayHandleTransform'
f3560116 Fix ArrayHandleTransform to use supplied functor object instead of a default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !224
2015-09-30 11:58:55 -04:00
Robert Maynard
8bc4088068 Add a test for CellSetExplicit::GetIndices 2015-09-30 11:29:07 -04:00
Robert Maynard
fa81d1de7f CellSetExplicit always calls methods using "this->" 2015-09-30 11:20:33 -04:00
Robert Maynard
9e4963069b Allow incremental construction of CellSetSingleType. 2015-09-30 11:18:49 -04:00
Robert Maynard
3e3078798c Mark CellSetExplicit::Fill as host side only. 2015-09-30 11:18:49 -04:00
Robert Maynard
9965977f47 Merge topic 'FetchTagTopologyIn_return_shape_type'
a1f5bc9f FetchTagTopologyIn updated to properly return CellShape.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !209
2015-09-30 10:18:17 -04:00
Robert Maynard
ee42cd7c5e Merge topic 'more_efficient_FlatToLogicalCellIndex'
0bd27169 ConnectivityStructuredInternals computes FlatToLogicalCellIndex faster.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !220
2015-09-30 10:17:48 -04:00
Kenneth Moreland
1432b160d5 Remove const from ArrayPortalGroupVec.
Remove the const from the ValueType of the delegate portal in
ArrayPortalGroupVec. This was creating a Vec with a const type, which
was immutable, which was problematic when trying to create the Vec in
the first place.
2015-09-29 16:06:39 -04:00
Sujin Philip
f35601162e Fix ArrayHandleTransform to use supplied functor object instead of a default 2015-09-29 15:44:10 -04:00
Patricia Kroll Fasel - 090207
0e8b9b15a5 Compiler warnings. 2015-09-29 13:39:30 -06:00
Patricia Kroll Fasel - 090207
810e6b002a Fix CastTo with template to avoid compiler errors. 2015-09-29 11:57:39 -06:00
Patricia Kroll Fasel - 090207
5a7b3668ee Correct for gcc and pgi compilers and CastTo. Add CellSetSingleType for output. 2015-09-29 11:20:05 -06:00
Kenneth Moreland
d47417fd20 Use test_equal for comparison.
The testing of ArrayHandleGroupVec was just using the == operator to
check values. Even though we are not doing any math, optimizers can
sometimes make float values slightly different anyway, so test_equal
should give the correct comparison.
2015-09-29 11:28:57 -04:00
Kenneth Moreland
c89647746a Add ArrayHandleGroupVec
This is a fancy array handle that groups consecutive entries in a
delegate array handle and presents them as a single vec.
2015-09-29 11:28:57 -04:00
Kenneth Moreland
2e64a4e296 Fix warning about wrong type in GL call
Was storing a size in std::size_t and giving that to OpenGL functions,
which are using GLsizeiptr.
2015-09-29 10:24:34 -04:00
Patricia Kroll Fasel - 090207
c87b4f50da Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_explicit 2015-09-28 16:25:50 -06:00
Patricia Kroll Fasel - 090207
deceb79edc Fix to work with gcc and pgi compilers. Change to use CellSetSingleType. 2015-09-28 16:23:03 -06:00
Patricia Kroll Fasel - 090207
f624683eea Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-09-28 09:51:25 -06:00
Tyson Neuroth
0bd27169b5 ConnectivityStructuredInternals computes FlatToLogicalCellIndex faster.
By caching the CellDimensions and the size of a XY slice of cells we can
improve the performance of flat index to i,j,k for cells.
2015-09-25 17:07:11 -04:00
Robert Maynard
c0f3b6ff97 Make3DExplicitDataSetCowNose now generates a CellSetSingleType. 2015-09-25 13:41:41 -04:00
Robert Maynard
011849a251 Add CellSetSingleType 2015-09-25 13:41:41 -04:00
Robert Maynard
c58f8ef193 CellSetExplicit Getters now properly deduce the correct handle type.
Previously the CellSetExplicit presumed that the CellToPoint and PointToCell
Storage tags matched, which they don't when using custom storage tags.
2015-09-25 13:41:41 -04:00
Robert Maynard
5a3e7c779e CellSetExplicit CreateConnectivity works even when NumberOfPoints is zero.
Previously if you created a cell set explicit and didn't set the number of
points you would get a runtime error when you over-ran an array's bounds.
Now we account for this use case and properly generate the Cell To Point
Connectivity.
2015-09-25 13:41:41 -04:00
Robert Maynard
9c85c623f0 Merge topic 'cellset_explicit_user_defined_offsets'
dbed8827 Correct issues found in code review.
82b977da CellSetExplicit::CreateConnectivity now works with implicit NumIndices.
30f5d628 ConnectivityExplicit will not generate IndexOffsets when they are implicit.
f04ea6d7 CellSetExplicit has userdefined offset storage.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !212
2015-09-25 13:24:56 -04:00
Robert Maynard
dbed882709 Correct issues found in code review. 2015-09-25 12:32:06 -04:00
Kenneth Moreland
fcfe63ef85 Fix unnecessary warning about divide by zero.
Again. Hopefully I got it right this time.
2015-09-24 21:52:58 -06:00
Kenneth Moreland
fa0c695424 Fix issue with test_equal of 0 numbers
There was an error in the test_equal comparison that would return true
when the second value was 0 (or close to 0) and the first value was not.

This was a bug I introduced with commit
b270438fea8a9fe4200322bfe6344ab2075c4d9a. I clearly misinterpreted how a
conditional worked.
2015-09-24 16:48:03 -06:00
Patricia Kroll Fasel - 090207
78239c5571 Minor corrections for Allocate of shapes, numindices. 2015-09-24 16:17:50 -06:00
Patricia Kroll Fasel - 090207
a821310b6f Changes in CellSetExplicit for shape and numindices types. Made one Run() method
by getting point dimensions from the dataset.
2015-09-24 16:07:45 -06:00
Robert Maynard
5c1e82e837 Merge topic 'suppress_more_host_device_warnings'
fc79055f Add suppression pragmas to exec::Fetch classes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !211
2015-09-24 14:00:29 -04:00
Patricia Kroll Fasel - 090207
3e4ca9ae8f Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-09-24 11:55:33 -06:00
Patricia Kroll Fasel - 090207
3e94b4295b Types for shapes and numindices changed in CellSetExplicit. 2015-09-24 11:52:38 -06:00
Patricia Kroll Fasel - 090207
c7234eedf7 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_explicit 2015-09-24 11:10:20 -06:00
Patricia Kroll Fasel - 090207
a7f7b46169 Add 3D tetrahedralize of explicit cell set. 2015-09-24 10:56:03 -06:00
Robert Maynard
82b977da0e CellSetExplicit::CreateConnectivity now works with implicit NumIndices. 2015-09-24 12:38:34 -04:00
Robert Maynard
30f5d628cc ConnectivityExplicit will not generate IndexOffsets when they are implicit.
Even when using implicit index's the ConnectivityExplicit would generate
the code to compute the IndexOffsets, which would than fail to compile as
the ArrayHandle would only support read operations. This fixes that issue.
2015-09-24 11:57:34 -04:00
Robert Maynard
f04ea6d72e CellSetExplicit has userdefined offset storage. 2015-09-24 11:24:50 -04:00
Robert Maynard
45ad63c770 Merge topic 'update_cell_connectivity_types'
19cebccf Correct issues that buildbot brought up in the code.
c6dbc0f2 GetNumberOfPointsInCell consistently returns a vtkm::IdComponent
25ff1e94 CellSetExplicit storage tags are now easier to override.
935b3fd6 CellSetExplicit uses UInt8 for shape, and IdComponent for numIndices.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !210
2015-09-24 11:23:54 -04:00
Robert Maynard
fc79055f76 Add suppression pragmas to exec::Fetch classes 2015-09-24 10:39:48 -04:00
Robert Maynard
19cebccf11 Correct issues that buildbot brought up in the code. 2015-09-24 10:15:44 -04:00
Patricia Kroll Fasel - 090207
409e94108a Pass in number of indices for use by POLYGON shape.
const on operator() params
2015-09-23 15:25:07 -06:00
Patricia Kroll Fasel - 090207
4e92cd3f33 Tetrahedralize 2D explicit dataset first version with opengl example 2015-09-23 14:43:27 -06:00
Robert Maynard
c6dbc0f20e GetNumberOfPointsInCell consistently returns a vtkm::IdComponent 2015-09-23 15:47:41 -04:00
Robert Maynard
25ff1e9403 CellSetExplicit storage tags are now easier to override. 2015-09-23 15:47:41 -04:00
Robert Maynard
935b3fd6b9 CellSetExplicit uses UInt8 for shape, and IdComponent for numIndices. 2015-09-23 11:17:04 -04:00
Kenneth Moreland
5cb44a7a00 Merge branch 'easier-cast-and-call' into 'master'
Add new version of DynamicArrayHandle::CastToArrayHandle

This takes a reference to an array handle and fills it. This removes a lot of the pain of determining template arguments.

See merge request !205
2015-09-23 11:01:18 -04:00
Robert Maynard
a1f5bc9f0a FetchTagTopologyIn updated to properly return CellShape. 2015-09-23 10:45:06 -04:00
Patricia Kroll Fasel - 090207
1c19a15f51 Triangulate a 2D data set extension 2015-09-22 11:40:01 -06:00
T.J. Corona
a88f43db94 Add Bad Allocation error. 2015-09-22 10:54:22 -04:00
Robert Maynard
17a649da94 Merge branch 'cuda_75_pragma_for_exec_warnings' into 'master'
Cuda 75 pragma for exec warnings

See merge request !207
2015-09-22 10:50:57 -04:00
Patricia Kroll Fasel - 090207
e22e42eacc Use ExecutionWholeArray to pass connectivity as Invoke. 2015-09-21 14:22:27 -06:00
Robert Maynard
778d670ed3 FunctionInterface suppresses warnings on calling host function from host/device 2015-09-21 15:26:28 -04:00
Robert Maynard
00b732056d Make a define to suppress false positive host/device warnings 2015-09-21 14:25:15 -04:00
Robert Maynard
970ec3f426 Remove conversion warning from opengl interop code. 2015-09-21 14:17:25 -04:00
Robert Maynard
056f69bf96 Remove unused variable and conversion warnings from cuda code. 2015-09-21 14:17:25 -04:00
Patricia Kroll Fasel - 090207
c2a9f184cf Fix syntax of ArrayHandleCounting usage 2015-09-21 11:55:10 -06:00
Patricia Kroll Fasel - 090207
6dd8bde6ab Merge branch 'master' into stat_histogram 2015-09-21 10:56:00 -06:00
Patricia Kroll Fasel - 090207
cbcb19a718 Merge branch 'master' into tetra_uniform 2015-09-21 09:07:05 -06:00
Kenneth Moreland
fd8cce93dd Switch VTKM_IS_ARRAY_HANDLE to use VTKM_STATIC_ASSERT
This is an attempt to get around a warning with the PGI compiler.
2015-09-20 15:19:46 -06:00
Kenneth Moreland
c97a90fc13 Add simpler type check for DynamicArrayHandle. 2015-09-20 00:55:54 -06:00
Kenneth Moreland
882c20a2cb Support DynamicArrayHandle::CastToArrayHandle for fancy ArrayHandles
Basically, this entails adding a constructor to each fancy ArrayHandle
that accepts the base ArrayHandle with the appropriate type and storage.
2015-09-20 00:28:11 -06:00
Kenneth Moreland
0ea9ceb1f8 Add an operator== to ArrayHandle.
This allows you to query whether two ArrayHandles have the same pointer.
2015-09-20 00:22:29 -06:00
Kenneth Moreland
77568789ea Make vtkm::Pair behave as a better core type
These changes are basically to support some upcoming changes to
ArrayHandleZip. The major additions are an implementation of VecTraits
for Pair and an overloaded << operator to ostream for Pair.

I also had to declare the operator<< for Pair to be in Types.h. Under
some circumstances the operator has to either be declared before the
template is declared or declared in the vtkm namespace. (The reasons are
described at <http://clang.llvm.org/compatibility.html#dep_lookup> but I
still don't understand.) I tried adding it to the vtkm namespace, but
that caused several of the other operator<< to fail. Since there is no
way to guarantee that Pair.h is declared before, say, ArrayHandle.h, I
moved the implementation to Types.h.

Since I was moving operator<< to Types.h, I went ahead and moved the
TypeTraits and VecTraits to their respective headers. Since Pair is
declared (but not implemented) in Types.h, these templated classes can
be implemented without including Pair.h.
2015-09-20 00:01:04 -06:00
Patricia Kroll Fasel - 090207
685b9bf7c5 Clean up uniform tetrahedralize for merge 2015-09-18 10:49:30 -06:00
Sujin Philip
1d2657f360 Make cuda DeviceAdapter valid only when using nvcc
Before it was valid even on a regular compiler, if cuda was available.
2015-09-18 12:21:11 -04:00
Sujin Philip
a1546942fb Merge topic 'fix-CopyInto'
98885186 Fix CopyInto tests that use different DeviceAdapterTag
69b2ad2a Add unit tests for CopyInto function
2c55b15c Add additional control logic for CopyInto function
20c1a048 CopyInto function for ArrayHandles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !202
2015-09-18 12:18:52 -04:00
Sujin Philip
98885186c8 Fix CopyInto tests that use different DeviceAdapterTag 2015-09-18 10:05:20 -04:00
Kenneth Moreland
e761afc18e Add new version of DynamicArrayHandle::CastToArrayHandle
This takes a reference to an array handle and fills it. This removes a
lot of the pain of determining template arguments.
2015-09-17 22:31:58 -06:00
Kenneth Moreland
fd21a12f4a Merge branch 'xcode-7-warnings' into 'master'
Xcode 7 warnings

The XCode 7 compiler has a new warning for unused typedefs. The Boost code we use has some instances where this warning gets issued. Suppress these warnings.

See merge request !199
2015-09-17 18:12:31 -04:00
Kenneth Moreland
b15940c1e3 Declare new VTKM_STATIC_ASSERT
This is to be used in place of BOOST_STATIC_ASSERT so that we can
control its implementation.

The implementation is designed to fix the issue where the latest XCode
clang compiler gives a warning about a unused typedefs when the boost
static assert is used within a function. (This warning also happens when
using the C++11 static_assert keyword.) You can suppress this warning
with _Pragma commands, but _Pragma commands inside a block is not
supported in GCC. The implementation of VTKM_STATIC_ASSERT handles all
current cases.
2015-09-17 14:40:39 -06:00
Patricia Kroll Fasel - 090207
d57393d142 Fix merge problems with CMakeList files 2015-09-17 13:49:47 -06:00
Patricia Kroll Fasel - 090207
1acd09610e Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-09-17 13:27:45 -06:00
Patricia Kroll Fasel - 090207
02d2eefe22 3d uniform grid to tetrahedra now includes getting actual vertex points. 2015-09-17 13:10:22 -06:00
hschroot
69b2ad2a32 Add unit tests for CopyInto function 2015-09-17 14:26:19 -04:00
hschroot
2c55b15c3f Add additional control logic for CopyInto function
Clean up comments and align code to 80 character width
2015-09-17 14:26:19 -04:00
hschroot
20c1a04894 CopyInto function for ArrayHandles
ArrayHandles in DAX have a CopyInto function which allows the user to copy an array handle's data into a compatible STL type iterator. Originally this was fairly straight forward to implement since array handles in DAX are templated on the DeviceAdapterTag. In contrast, VTKm array handles use a polymorphic ArrayHandleExecutionManager under the hood allowing a single array handle to interface with multiple devices at runtime. To achieve this virtual functions are used. This makes implementing the CopyInto function difficult since it is templated on the IteratorType and virtual functions cannot be templated.

To work around this, I've implemented a concrete templated CopyInto function in the class derived from ArrayHandleExecutionManagerBase. In the ArrayHandle class, CopyInto dynamically casts the base class into the derived class, then calls the CopyInto function defined in the derived class.

The drawback to this approach is that, should the user define their own class that inherits from ArrayHandleExectionManagerBase, they are not forced to implement the CopyInto function, unlike the other virtual functions.
2015-09-17 14:26:19 -04:00
Robert Maynard
b1c96381de Merge branch 'multiple_backend_example' into 'master'
Correct the tbb install rules when tbb is disabled.

See merge request !201
2015-09-17 14:04:37 -04:00
Robert Maynard
0b97d4c458 Correct the tbb install rules when tbb is disabled. 2015-09-17 13:59:26 -04:00
Sujin Philip
2519dd7ef2 Merge topic 'update-clip'
54c30cbc Select step 4 implementation method
6617596f Add a clipping example
7f017c11 Release ArrayHandle resources sooner to avoid OOM
bab41d21 Workaround thrust scan bug
b5e74682 Add support for more cell types
002e5b6c Fix lowerbounds implementation and collect timing information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !197
2015-09-17 10:28:43 -04:00
Robert Maynard
c87e1f5e16 Merge topic 'add-gaussian-splatter'
5e72d3a8 Rename kernels directory to splatkernels to avoid confusion
7a2225cf Add Copyright text
d04e4dfa Remove c++11 constexpr keyword
ed5faf5b Fix for M_PI on windows, use vtkm::Pi()
fe284ffb Add unit test for splat kernel integral.
29001e37 Change GaussianSplatter to KernelSplatter to support other kernels
378cb17e Code cleanup, style, debug, unused vars
65d2980f Fix clang compile error, cleanup debug messages
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !193
2015-09-17 10:03:26 -04:00
Robert Maynard
9b877ef49b Merge topic 'multiple_backend_example'
fd685210 Always install all device headers even when device isn't enabled.
b1663b24 Add an example of using multiple backends from a single translation unit.
fc0ff69d Methods with try/catch need to be host only.
4d635d64 DeviceAdapter Tags now always exist, and contain if the device is valid.
cf32b430 Teach Configure.h to store if TBB and CUDA are enabled.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !198
2015-09-17 09:49:49 -04:00
Kenneth Moreland
9b22a72d6c Only suppress unused-local-typedef warning when it exists
The recently added pragma to suppress warnings about unused local
typedefs caused lots of dashboard failures because many GCC and clang
compiler do not have this warning so did not recognized the pragma to
suppress it. Now only use the pragma on clang compilers with a large
enough version.

I also discovered that the check for VTKM_CLANG was wrong (at least for
the most modern versions of XCode). Fixed that as well as some uses of
VTKM_CLANG that were wrong.
2015-09-17 07:44:56 -06:00
Robert Maynard
fd68521066 Always install all device headers even when device isn't enabled.
vtkm_declare_headers now is able to not test headers, by using the
TESTABLE keyword.
2015-09-17 09:28:21 -04:00
Robert Maynard
fc0ff69d04 Methods with try/catch need to be host only.
When compiling with cuda and tbb enabled in a single translation unit you
need to make sure all try/catch blocks are marked as host only otherwise
the cuda compiler will error out.
2015-09-17 09:28:21 -04:00
Robert Maynard
4d635d642b DeviceAdapter Tags now always exist, and contain if the device is valid.
Previously it was really hard to verify if a device adapter was valid. Since
you would have to check for the existence of the tag. Now the tag always
exists, but instead you query the traits of the DeviceAdapter to see if
it is a valid adapter.

This makes compiling with multiple backends alot easier.
2015-09-17 09:28:21 -04:00
Robert Maynard
cf32b430dc Teach Configure.h to store if TBB and CUDA are enabled. 2015-09-17 09:28:21 -04:00
Kenneth Moreland
2ff6576c65 Add third party wrappers around boost macros.
The boost assert macros seem to have an issue where they define an
unused typedef. This is causing the XCode 7 compiler to issue a warning.
Since the offending code is in a macro, the warning is identified with
the VTK-m header even though the code is in boost. To get around this,
wrap all uses of the boost assert that is causing the warning in the
third party pre/post macros to disable the warning.
2015-09-16 23:34:49 -06:00
Kenneth Moreland
27c4f47411 Boost generates warnings for XCode 7
XCode 7 added a warning for unused typedefs. VTK-m proper does not have
any instances of this, but there are several cases in the Boost code
that we are using. Add an exception to the third party pragmas to
supporess this warning.
2015-09-16 23:32:39 -06:00
Patricia Kroll Fasel - 090207
6398a6a00c Remove histogram and statistics which are in another branch 2015-09-16 11:58:30 -06:00
Patricia Kroll Fasel - 090207
6683c32a9f OpenGL example working for 3d tet uniform, serial and cuda. 2015-09-16 11:52:41 -06:00
Sujin Philip
54c30cbc66 Select step 4 implementation method
Performance testing has shown that the combined lower-bounds + update-connectivity
worklet is marginally, but consistently faster than DeviceAdapterAlgorithm::LowerBounds
followed by an update-connectivity worklet. It also requires less memory.
2015-09-16 10:29:31 -04:00
Sujin Philip
7f017c1106 Release ArrayHandle resources sooner to avoid OOM 2015-09-16 10:07:25 -04:00
Sujin Philip
bab41d2191 Workaround thrust scan bug 2015-09-16 10:07:25 -04:00
Sujin Philip
b5e74682b7 Add support for more cell types 2015-09-16 10:07:25 -04:00
Kenneth Moreland
fd401f0feb Merge branch 'index-array-handle' into 'master'
Add ArrayHandleIndex

Add an ```ArrayHandleIndex``` class that echoes the index. This is really a special version of ```ArrayHandleCounting``` that is of type ```vtkm::Id``` and starts at 0, but it is the most common case and does not need the extra addition.

Also modified ```ArrayHandleCounting``` to support a step, which makes the use a bit more powerful.

See merge request !192
2015-09-15 21:58:29 -04:00
Sujin Philip
002e5b6cda Fix lowerbounds implementation and collect timing information 2015-09-15 17:29:21 -04:00
Kenneth Moreland
e23649d290 Fix use of ArrayHandleCounting in TBB device adapter 2015-09-15 14:19:10 -06:00
Robert Maynard
1d97f886e0 Remove the thrust pragma statements that are not needed. 2015-09-15 14:20:56 -04:00
John Biddiscombe
5e72d3a87a Rename kernels directory to splatkernels to avoid confusion 2015-09-15 19:46:53 +02:00
John Biddiscombe
7a2225cfd1 Add Copyright text 2015-09-15 12:03:09 +02:00
John Biddiscombe
d04e4dfaf4 Remove c++11 constexpr keyword 2015-09-15 11:08:36 +02:00
Kenneth Moreland
44fc339a2e ArrayHandleCounting now supports step
Modify ArrayHandleCounting so that it supports both a starting value and
a step (increment). This adds a multiplication, but the common case that
does not use it is already in a separate class (ArrayHandleIndex).
2015-09-14 22:55:44 -06:00
Kenneth Moreland
891182ee19 Add ArrayHandleIndex class.
This is the most common use case for ArrayHandleCounting, and this class
is a bit easier to use and a bit faster.
2015-09-14 22:11:09 -06:00
Patricia Kroll Fasel - 090207
35b368bb94 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-09-14 14:58:01 -06:00
John Biddiscombe
ed5faf5bac Fix for M_PI on windows, use vtkm::Pi() 2015-09-14 22:52:06 +02:00
Patricia Kroll Fasel - 090207
22c95f102a Update tetrahedralize to output dataset 2015-09-14 14:45:59 -06:00
John Biddiscombe
fe284ffbfb Add unit test for splat kernel integral.
The test computes the integral using simpsons rule and checks
that the value is unity (+/- epsilon)
2015-09-14 21:39:43 +02:00
John Biddiscombe
29001e377f Change GaussianSplatter to KernelSplatter to support other kernels
Template the splatter algorithm over Kernel type and use abstract kernel
interface to fetch the kernel value.

Add Gaussian, Spline3rdOrder kernel classes templated over dimension.
Other kernels can/will be added in future.

Kernel classes are defined such that the integral of the volume is unity
as is the convention in (for example) SPH simulations.
2015-09-14 21:39:35 +02:00
John Biddiscombe
378cb17e8a Code cleanup, style, debug, unused vars
Pass code through formatter to correct indentation.

Put debug routines in debug:: namespace and #ifdef them.

Remove old unused variables and worklets.
2015-09-12 21:08:45 +02:00
John Biddiscombe
65d2980fb7 Fix clang compile error, cleanup debug messages 2015-09-12 16:01:54 +02:00
John Biddiscombe
c03aef932e Rewrite main routine for gaussian splatter
Clean up the implementation to take a uniform grid dataset as input
and splat using the correct world coordinates of the points into
the volume. Kernels are centred around the splat points in world coordinates
(floating point) and not quantized to the nearest voxel.

Skip the generation of all volume points which is unnecessary (memory usage).

Add ability to specify a radius array with one entry per splat point so
that the size of each splat may be controlled arbitrarily.
2015-09-12 16:01:48 +02:00
John Biddiscombe
ed99cbfed4 Some fixes to get a first working splatter test 2015-09-12 16:00:22 +02:00
John Biddiscombe
d14eb28285 Fix compilation of Gaussian splatter worklet 2015-09-12 15:53:37 +02:00
John Biddiscombe
cc3014fbcb Merge remote-tracking branch 'kitware/master' into add-gaussian-splatter 2015-09-12 10:39:15 +02:00
Patricia Kroll Fasel - 090207
73362fb4aa Use CellSet.Fill() to add all tets at one time. 2015-09-11 15:44:53 -06:00
Sujin Philip
4b70770d48 Merge topic 'fix-typos-CellSetExplicit'
f004d344 Fix some typos in CellSetExplicit.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !191
2015-09-11 16:26:34 -04:00
Sujin Philip
f004d344e1 Fix some typos in CellSetExplicit.h 2015-09-11 15:03:18 -04:00
Patricia Kroll Fasel - 090207
d40caf2703 Tetrahedralize a uniform structured grid of hexahedra. 2015-09-10 11:48:05 -06:00
Patricia Kroll Fasel - 090207
ec06d00683 Both FieldHistogram and FieldStatistics operate on point data or cell data in the
form of an ArrayHandle.  Histogram takes the number of bins and returns the bin array.
Statistics returns a structure with standard stats plus raw and central moments.
2015-09-10 11:13:08 -06:00
Kenneth Moreland
13d4087657 Change ExecutionWholeArray interface to match expected for ArrayPortal
When ExecutionWholeArray is passed to a worklet, it is expected to
behave like an array portal. However, it was missing the
GetNumberOfValues method and the ValueType typedef. These are now added.
2015-09-09 13:30:12 -06:00
Robert Maynard
6272fdcc54 Correct multiple signature compile issue. 2015-09-08 09:39:57 -04:00
Robert Maynard
aa7f5c34b9 Resolves Issue #42. Now all thrust API calls are in try/catch blocks. 2015-09-07 12:20:31 -04:00
Robert Maynard
5b8cc44ed4 Merge branch 'improve_sort_perf_on_thrust' into 'master'
Tell thrust to use fast code paths when using our predicates and operators.

See merge request !176
2015-09-07 10:38:17 -04:00
Sujin Philip
9a911a9761 Merge topic 'update-VertexClustering'
6fde5016 Update VertexClustering to use the new features in vtkm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !174
2015-09-04 14:34:44 -04:00
Hendrik Schroots
801d4dd1e5 Merge topic 'make_cont_export_macro_be_device_host'
0d6dfb1e Make it possible to use Cuda TextureMemory from device/host method.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !181
2015-09-04 13:50:13 -04:00
Robert Maynard
6341eb30db Merge branch 'consistent_vtkm_configure_vars' into 'master'
Update VTK-m to export to Configure.h if we have opengl interop enabled.

At the same time I rearranged the CMakeLists.txt so that the configuration
for Configure.h is later so that it catches all CMake Variables.

See merge request !184
2015-09-04 13:27:05 -04:00
Robert Maynard
23b435d031 Update VTK-m to export to Configure.h if we have opengl interop enabled.
At the same time I rearranged the CMakeLists.txt so that the configuration
for Configure.h is later so that it catches all CMake Variables.
2015-09-04 11:43:10 -04:00
Robert Maynard
5bc89c5d8a Correct a member initialization reorder warning. 2015-09-04 09:49:10 -04:00
Robert Maynard
72450e87f3 Make thrust use fast paths when doing sort and scan.
By introducing our own custom thrust execution policy we can make sure
to hit the fastest code paths in thrust for the sort operation. This makes
sure that for UInt32,Int32, and Float32 we use the radix sort from thrust
which offers a 2x to 3x speed improvement over the merge sort implementation.

Secondly by telling thrust that our BinaryOperators are commutative we
make sure that we get the fastest code paths when executing Inclusive
and Exclusive Scan

Benchmark 'Radix Sort on 1048576 random values vtkm::Int32' results:
  median = 0.0117049s
  median abs dev = 0.00324614s
  mean = 0.0167615s
  std dev = 0.00786269s
  min = 0.00845875s
  max = 0.0389063s
Benchmark 'Radix Sort on 1048576 random values vtkm::Float32' results:
  median = 0.0234463s
  median abs dev = 0.000317249s
  mean = 0.021452s
  std dev = 0.00470307s
  min = 0.011255s
  max = 0.0250643s
Benchmark 'Merge Sort on 1048576 random values vtkm::Int32' results:
  median = 0.0310486s
  median abs dev = 0.000182129s
  mean = 0.0286914s
  std dev = 0.00634102s
  min = 0.0116225s
  max = 0.0317379s
Benchmark 'Merge Sort on 1048576 random values vtkm::Float32' results:
  median = 0.0310617s
  median abs dev = 0.000193583s
  mean = 0.0295779s
  std dev = 0.00491531s
  min = 0.0147257s
  max = 0.032307s
2015-09-03 16:00:37 -04:00
Robert Maynard
0d6dfb1e40 Make it possible to use Cuda TextureMemory from device/host method. 2015-09-03 11:52:40 -04:00
Robert Maynard
1906e273d2 Merge branch 'make_cont_export_macro_be_device_host' into 'master'
Revert the VTKM_EXEC_EXPORT changes.

Figuring out a better approach.

See merge request !180
2015-09-02 23:38:45 -04:00
Robert Maynard
8d5765f55f Revert the VTKM_EXEC_EXPORT changes. 2015-09-02 20:01:22 -04:00
Robert Maynard
f2502c2e58 Merge topic 'unused_variable_warning'
7fb4ed12 Fix warnings in IsosurfaceUniformGrid code.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !177
2015-09-02 18:09:12 -04:00
Robert Maynard
7fb4ed12fe Fix warnings in IsosurfaceUniformGrid code. 2015-09-02 17:58:18 -04:00
Kenneth Moreland
20c5819397 Remove unused typedef
A typedef in a method was left over from a copy/paste. Although
harmless, it was causing a (valid) warning on some compilers.
2015-09-02 13:54:54 -07:00
Kenneth Moreland
68428c6487 Add test to make sure uniform coords work in topology map
Although this is labeled as a unit test, this is more of an integration
test to make sure that when a uniform point coordinate is passed as a
field to a WorkletTopologyMap from points to cells with a regular cell
set, you get the specialized VecRectilinearPointCoordinates in the
worklet argument.
2015-09-02 13:54:54 -07:00
Kenneth Moreland
08f9c04fab Add specialization of topology map fetch for regular point coords
In the special case where you are loading the point coordinates for a
structured grid in a point to cell map (an important use case), create a
VecRectilinearPointCoordinates rather than build a Vec of the values.
This will activate the cell specalizations in previous commits.

These changes also added some flat-to-logical index conversion and vice
versa in ConnectivityStructuredInternals. This change also fixed a bug
in getting cells attached to points in 2D grids. (Actually, technically
someone else fixed it and checked it in first. The changes were merged
during a rebase.)

I also added a specalization to Vec for 1D that implicitly converts
between the 1D Vec and the component. This can be convenient when
templating on the Vec length.
2015-09-02 13:54:51 -07:00
Kenneth Moreland
b58543297a Special implementation of cell derivative for rectilinear cells 2015-09-02 13:50:31 -07:00
Kenneth Moreland
284fda03fd Special implementation of cell interpolate for rectilinear cells 2015-09-02 13:50:31 -07:00
Kenneth Moreland
493656e419 Special implementation of parametric coordinates for rectilinear cells 2015-09-02 13:50:31 -07:00
Kenneth Moreland
429f9c0cb7 Add VecRectilinearPointCoordinates class
This class implicitly stores the point coordinates for a rectilinear
cell (such as a voxel) with just the location of the lower left point
and the spacing in each dimension. In addition to saving space, this
class should allow cell-specific functions to specialize for faster
processing.
2015-09-02 13:50:31 -07:00
Kenneth Moreland
294e8843cb Merge branch 'misc-fixes' into 'master'
Misc fixes

Miscellaneous fixes to errors and warnings that are popping up during the code sprint.

See merge request !175
2015-09-02 16:49:14 -04:00
Kenneth Moreland
c5e9ce4769 Fix compiler warnings for isosurface code 2015-09-02 13:47:48 -07:00
Kenneth Moreland
9749e57838 Fix pyexpander errors
There was some inconsistencies between the input and output files for
pyexpander checked into the repository. This just makes them consistent.
2015-09-02 13:47:33 -07:00
Robert Maynard
ed463d903c Merge topic 'opengl_interop_iterator_deref'
41b40ae3 Always pass raw memory pointers to glBufferSubData.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !170
2015-09-02 16:42:06 -04:00
Sujin Philip
6fde50160b Update VertexClustering to use the new features in vtkm 2015-09-02 16:41:54 -04:00
Sujin Philip
8a11f9b302 Merge topic 'missing_install_headers'
ed3949b4 install DispatcherBaseDetailInvoke but don't test build it.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !173
2015-09-02 16:24:55 -04:00
Christopher Meyer Sewell - 188584
493ca4e0c6 Merging with master 2015-09-02 14:18:05 -06:00
Robert Maynard
ed3949b4c7 install DispatcherBaseDetailInvoke but don't test build it. 2015-09-02 16:03:56 -04:00
Kenneth Moreland
06db9fdd29 Merge branch 'topic-additional-Pi-constants' into 'master'
Add other Pi fraction constants and 2Pi

Add Pi constant helper functions for Pi halves, thirds, fourths, and 2 * Pi

See merge request !169
2015-09-02 15:46:45 -04:00
Christopher Meyer Sewell - 188584
a10d1fc237 Removing unnecessary cell fields from isosurface test and example, and adding a few comments 2015-09-02 12:03:49 -06:00
Jeremy Meredith
2ae2df9a8f Merge branch 'newtopology' into 'master'
adding cell-to-point topology support and worklet

This adds code to support a cell-to-point topological mapping worklet.

For explicit cell set, there is code to calculate a cell-to-point topology from the canonical point-to-cell topology.  (It is not parallelized at this point.)  Most of the required code for structured grids was already in place.

See merge request !154
2015-09-02 13:34:54 -04:00
Robert Maynard
82fe85430f Merge branch 'make_cont_export_macro_be_device_host' into 'master'
Make cont export macro be device host

See merge request !166
2015-09-02 13:27:38 -04:00
Robert Maynard
41b40ae380 Always pass raw memory pointers to glBufferSubData. 2015-09-02 13:26:33 -04:00
Robert Maynard
548ab890a0 Merge branch 'make_IsosurfaceUniformGrid_use_FieldType_everywhere' into 'master'
Prefer FieldType over float in IsosurfaceUniformGrid.h

See merge request !167
2015-09-02 13:18:38 -04:00
hschroot
04a4812965 Add DeviceAdapter preprocessor logic 2015-09-02 10:10:07 -07:00
hschroot
2d2ca40b3f Add other Pi fraction constants and 2Pi 2015-09-02 10:06:02 -07:00
Jeremy Meredith
dc14ed4f87 adding unit test to confirm cell-to-point connectivity works. 2015-09-02 12:27:30 -04:00
Jeremy Meredith
8544fb8ca4 adding topology types to explicit cell set connectivity array accessors. 2015-09-02 12:26:37 -04:00
Robert Maynard
3c9da9676e Prefer FieldType over float in IsosurfaceUniformGrid.h 2015-09-02 11:38:26 -04:00
Robert Maynard
37403237c6 Allow us to still use __ldg texture load with the new VTKM_EXEC_CONT_EXPORT. 2015-09-02 11:34:36 -04:00
Robert Maynard
c8e0e2ca62 VTKM_EXEC_EXPORT now functions as __device__ __host__ 2015-09-02 11:30:16 -04:00
Sujin Philip
a313faa8d1 Merge topic 'add-ArrayHandleCast'
a1c74bd1 Add ArrayHandleCast

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !160
2015-09-02 11:05:13 -04:00
Robert Maynard
f413941aa7 Merge branch 'make_sure_to_use_cuda_execution_policy' into 'master'
Cuda copy from host to device can't use the cuda execution policy.

See merge request !165
2015-09-02 10:29:03 -04:00
Robert Maynard
8422108f28 Cuda copy from host to device can't use the cuda execution policy. 2015-09-02 09:53:00 -04:00
Robert Maynard
617e64cd9a Allow the user to use an ArrayHandle for the field for IsoSurface. 2015-09-02 01:04:48 -04:00
Jeremy Meredith
d1492cca24 Merge branch 'master' into newtopology 2015-09-01 19:46:18 -04:00
Robert Maynard
efc9f0c5cf All occurrences of thrust invocation uses an execution policy. 2015-09-01 19:32:49 -04:00
Christopher Meyer Sewell - 188584
30100e2ae8 Adding examples directory with isosurface rendering example 2015-09-01 17:09:36 -06:00
Jeremy Meredith
f027d0335a fixing cell-to-point conn generation to not use intermediate storage. 2015-09-01 18:56:32 -04:00
Robert Maynard
bf4b9309c0 Merge branch 'isosurface-merge-fix' into 'master'
Adding back point coordinate computations in isosurface worklet

See merge request !161
2015-09-01 18:55:25 -04:00
Jeremy Meredith
11708c6ef7 automatically build connectivity as needed. 2015-09-01 18:37:17 -04:00
Sujin Philip
a1c74bd15a Add ArrayHandleCast 2015-09-01 17:42:45 -04:00
Robert Maynard
04e791ad3d Merge branch 'missing_install_headers' into 'master'
Missing install headers

See merge request !159
2015-09-01 17:13:15 -04:00
Christopher Meyer Sewell - 188584
74dcd1c5cc Adding back point coordinate computations in isosurface worklet 2015-09-01 15:00:31 -06:00
Robert Maynard
775acfd30b Install DispatcherBaseDetailInvoke.h header 2015-09-01 16:09:08 -04:00
Jeremy Meredith
407d1619d0 one more warning 2015-09-01 15:06:17 -04:00
Jeremy Meredith
c9d3ae3dcf more warnings 2015-09-01 14:54:56 -04:00
Jeremy Meredith
e28402aed1 yet more warning fixes 2015-09-01 14:22:13 -04:00
Jeremy Meredith
94b8b9f5b0 more warning fixes 2015-09-01 14:11:47 -04:00
Jeremy Meredith
52458e853f fixing some warnings 2015-09-01 14:03:12 -04:00
Jeremy Meredith
1b01d824c6 Merge branch 'fix_structured_pt_to_cell' into 'master'
fixing 2d structured connectivity calc for logical point indices.

`CalculateLogicalPointIndices` in `ConnectivityStructuredInternals.h` for 2D grids was incorrect -- it was using cell dimensions instead of point dimensions.  This fixes the calculation and the unit test for the data set.

See merge request !153
2015-09-01 13:48:04 -04:00
Jeremy Meredith
50cfa823ba applying indexing fixes for structured grids 2015-09-01 12:56:32 -04:00
Jeremy Meredith
4a6c9d540f add more fixes to structured indexing 2015-09-01 12:33:26 -04:00