Commit Graph

1263 Commits

Author SHA1 Message Date
Robert Maynard
f96206338f Merge topic 'enable_runtime_detection_of_cuda'
a7127f0f Adding vtkm::cont::RuntimeDeviceInformation.
7d249e89 Move DeviceAdapterTraits into vtkm::cont as they are user API.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !287
2015-12-16 08:48:24 -05:00
Robert Maynard
a7127f0fc3 Adding vtkm::cont::RuntimeDeviceInformation.
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.
2015-12-15 17:25:27 -05:00
Kenneth Moreland
2e8873272d Add parentheses around condition in VTKM_STATIC_ASSERT_MSG
This is necessary for older compilers.
2015-12-15 10:29:53 -07:00
Kenneth Moreland
ea69785009 Disable warning push/pop on older compilers
Older GCC compilers (earlier than 4.6) do not support the diagnostic
pragmas that push and pop the warning levels. This change just disables
the warnings we need to for third party libraries and leaves them off.
This means you might miss some legit warnings on older compilers, but
most developers use newer compilers anyway, and the push/pop should
still work there.
2015-12-14 10:54:02 -07:00
dpugmire
a975ad4a0c final cleanup of file. 2015-12-14 11:52:07 -05:00
Robert Maynard
7b7a56c664 UnitTestCellAverage now properly verifies against an explicit cell set. 2015-12-14 10:07:32 -05:00
dpugmire
611618c405 compiler warnings. 2015-12-11 16:18:11 -05:00
dpugmire
64b52248fd fix compiler warnings. 2015-12-11 13:44:30 -05:00
Matt Larsen
ef0b78b9ff Fixing explicit cell set bug 2015-12-11 13:38:37 -05:00
dpugmire
8e42e5c8dd fix warnings... 2015-12-11 09:53:06 -05:00
Robert Maynard
7d249e8996 Move DeviceAdapterTraits into vtkm::cont as they are user API.
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.
2015-12-11 09:52:18 -05:00
dpugmire
51c35cdd2a Fix warnings. 2015-12-11 09:41:20 -05:00
dpugmire
e674a6c80d Fix issue with PointToCell indices not being computed.
Also, mark them as valid, when valid.
2015-12-08 15:14:43 -05:00
Kenneth Moreland
763de94aca Merge branch 'whole-array-control-signature' into 'master'
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
2015-12-07 18:24:54 -05:00
Kenneth Moreland
6f03f72b49 Use WholeArrayIn instead of ExecObject for MarchingCubes worklets
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.
2015-12-07 09:52:29 -07:00
Kenneth Moreland
2ac8456b5e Add WholeArray* ControlSignature tags
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.
2015-12-07 09:52:29 -07:00
Kenneth Moreland
5d829f2142 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.
2015-12-07 09:26:27 -07:00
dpugmire
25a1e3c36f Cleanup and fix an issue in Explicit dataset testing with the initial merge. 2015-12-04 16:15:51 -05:00
Robert Maynard
03661259b8 Merge topic 'simplify_vectorization_options'
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
2015-12-04 11:00:41 -05:00
T.J. Corona
baa73eaad8 Merge topic 'marching-cubes'
33b0d1bf Move marching cubes edge table out of the worklet.
a5ae4127 Remove IsosurfaceUniformGrid.
35355382 Generalize IsosurfaceUniformGrid to Accept explicit cell sets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !272
2015-12-03 14:54:02 -05:00
Robert Maynard
68e3032b4e Properly detect OSX Intel Compiler as Intel not Clang. 2015-12-03 14:41:07 -05:00
Robert Maynard
05e8f592cd Disable vectorization pragma's if we detect the compiler doesn't support them. 2015-12-03 13:44:52 -05:00
T.J. Corona
33b0d1bfd7 Move marching cubes edge table out of the worklet. 2015-12-02 15:33:52 -05:00
T.J. Corona
a5ae4127e0 Remove IsosurfaceUniformGrid. 2015-12-02 15:11:56 -05:00
dpugmire
ab268c2c18 Fix some compile errors introduced in the merge. 2015-12-02 13:55:37 -05:00
Robert Maynard
6e62b9626a Merge topic 'simplify_vectorization_options'
bfb6c26a Simplify the design of vectorization support.
4ea567ae Remove VTKm_ENABLE_VECTORIZATION, as VTKm_Vectorization handles all use cases.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !277
2015-12-02 08:15:52 -05:00
dpugmire
62bd2394b0 Add support for rectilinear coordinates via ArrayHandleCartesianProduct.
It consists of 3 ArrayHandles, and handles indexing to give each point in the grid.
Added some examples to the test dataset class, and a basic test.
2015-12-01 17:24:56 -05:00
Dave Pugmire
11d59c74b6 Add iterative explicit dataset builder class. 2015-12-01 17:24:56 -05:00
Dave Pugmire
29e4f06691 remove explicitdataset1, which was identical to dataset0. 2015-12-01 17:24:52 -05:00
Dave Pugmire
7dfa1009dc Add dataset builder classes. 2015-12-01 17:22:47 -05:00
Robert Maynard
bfb6c26a98 Simplify the design of vectorization support.
Remove the configured file variables, as that causes problems
when using an installed version of VTK-m.
2015-12-01 11:37:41 -05:00
Kenneth Moreland
a598f03fbb Fix initialization order of fields in MakeStreamLines class
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.
2015-11-30 14:20:00 -07:00
Robert Maynard
c06c54b1fb Merge topic 'enable_vectorization'
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
2015-11-27 09:36:15 -05:00
Robert Maynard
4ceb111a68 Enable vectorization inside the Serial and TBB backends. 2015-11-25 15:59:13 -05:00
Sujin Philip
9c31290619 Merge topic 'io-reader-unsupported-cells'
066e1bf3 Convert unsupported cell types to supported types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !273
2015-11-24 15:29:58 -05:00
Sujin Philip
066e1bf3b1 Convert unsupported cell types to supported types 2015-11-24 13:56:23 -05:00
Patricia Kroll Fasel - 090207
6c4fb856df Add example data file for streamline. 2015-11-23 17:00:22 -07:00
Patricia Kroll Fasel - 090207
cba0e218d8 Verify unit test results 2015-11-23 16:46:23 -07:00
Patricia Kroll Fasel - 090207
3946b0c462 Add unit test, pass all args in Run() 2015-11-23 16:19:26 -07:00
Patricia Kroll Fasel - 090207
02f84a1992 StreamLine filter outputs dataset. Add example. 2015-11-23 12:54:12 -07:00
Robert Maynard
514ea09afc Teach VTK-m how to enable vectorization for gcc, clang, and icc. 2015-11-23 12:44:05 -05:00
T.J. Corona
353553829d Generalize IsosurfaceUniformGrid to Accept explicit cell sets. 2015-11-20 12:38:03 -05:00
Patricia Kroll Fasel - 090207
e34aaa02ea Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into streamline 2015-11-12 16:08:44 -07:00
Patricia Kroll Fasel - 090207
82d9c10206 Pass input and output datasets and not arrays. Support FORWARD, BACKWARD and BOTH. 2015-11-12 15:35:46 -07:00
Sujin Philip
c6a562aeba Fix for MSVC conversion warning 2015-11-12 10:29:30 -05:00
Sujin Philip
503f9197fd Fix VTK DataSet IO to work correctly with DynamicArrayHandle 2015-11-12 10:28:22 -05:00
Sujin Philip
2b771418e6 Update Clip worklets to work with more types 2015-11-12 10:28:22 -05:00
T.J. Corona
9414120b6a Replace ArrayHandleCastForInput with the more versatile ArrayHandleCast. 2015-11-11 17:13:04 -05:00
Kenneth Moreland
1a538ca196 Merge branch 'scatter-worklets' into 'master'
Scatter in worklets

Add the functionality to perform a scatter operation from input to output in a worklet invocation. This allows you to, for example, specify a variable amount of outputs generated for each input.

See merge request !221
2015-11-11 13:09:47 -05:00
Kenneth Moreland
7b05604a66 Add more tolerance to UnitTestParametricCoordinates
I noticed a failure in a dashboard run of UnitTestParametricCoordinates.
This test uses randomly generated numbers to test the behavior of some
cell shapes, and there was an instance that occured with seed 1447261681
that caused one of the comparisons to be just slightly larger than the
default tolerance but still within reasonable value.

I just increased the tolerance of that particular comparison. Hopefully
this will prevent all future failures.
2015-11-11 10:38:17 -07:00
Robert Maynard
88a605549e Merge topic 'more_efficient_opengl_interop'
4d270187 Update the opengl interop code to be significantly faster with cuda.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !261
2015-11-11 09:40:07 -05:00
Kenneth Moreland
2fd2174378 Use bit-wise math to compute MC case. 2015-11-10 14:56:26 -07:00
Robert Maynard
54a8a713e7 Merge topic 'bidirectional-array-transform'
af32a21b Add support for bidirectional array transforms.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !214
2015-11-10 15:47:06 -05:00
T.J. Corona
af32a21b2e Add support for bidirectional array transforms.
Array transforms can now be created with an inverse functor, allowing for
casts back into the native array type. As a result, array transforms with
both a functor and inverse functor defined can perform read and write
operations. As an example, ArrayHandleCast now supports this operation. The
original implementation of ArrayHandleCast (i.e. read only) has been renamed
'ArrayHandleCastForInput'.
2015-11-10 15:13:02 -05:00
Patricia Kroll Fasel - 090207
add67881db Rework stream code 2015-11-10 10:33:21 -07:00
Kenneth Moreland
377b7123ff Remove divide from ClassifyCell.
Previously, there was a table holding the number of vertices produced
for each MC case. However, what we really need is the number of
triangles, so we would have to divide that by 3. Instead, just store the
number of triangles.
2015-11-09 22:13:26 -07:00
Robert Maynard
b3687c6f3c Workaround inclusive_scan issues in thrust 1.8.X for complex value types.
The original workaround for inclusive_scan bugs in thrust 1.8 only solved the
issue for basic arithmetic types such as int, float, double. Now we go one
step further and fix the problem for all types.

The solution is to provide a proper implementation of destructive_accumulate_n
and make sure it exists before any includes of thrust occur.
2015-11-09 17:14:30 -05:00
Patricia Kroll Fasel - 090207
d3e9d5df3b Compiles and runs under cuda. 2015-11-09 12:51:45 -07:00
Kenneth Moreland
1898ab473c Remove unnecessary comment.
It was a TODO comment that is already done.
2015-11-08 18:28:08 -07:00
Kenneth Moreland
8ef0a4ee50 Fix conversion warnings.
Recent changes to algorithm implementations caused CellDerivative to be
called in a way such that it gave conversion warnings on some compilers.
Fix that.
2015-11-07 13:13:17 -07:00
Kenneth Moreland
342a57efcd Fix double reference compile error. 2015-11-07 11:23:03 -07:00
Kenneth Moreland
9409a54191 Make new tetrahedralize functors work on CUDA
The previous implementation was declaring static arrays in methods,
which cannot be used on a CUDA device. Instead, make static tables that
can be passed to the device with array handles (much like clip tables
do).
2015-11-07 10:09:19 -07:00
Kenneth Moreland
0d394db0ce Fix conversion warnings when using double precision.
There were some conversion warnings issued when the default float was set
to 64-bit. Fixed these (on clang).
2015-11-07 06:35:24 -07:00
Kenneth Moreland
bf03243516 Add ability to multiply any Vec by vtkm::Float64.
This has been requested on the mailing list to make it easier to
interpolate integer vectors.

There are a couple of downsides to this addition. First, it implicitly
casts doubles back to whatever the vector type is, which can cause a
loss of precision. Second, it makes it more likely to get overload
errors when multiplying with Vec. In particular, the operator to cast
Vec of size 1 to the component class had to be removed.
2015-11-07 06:33:50 -07:00
Kenneth Moreland
d44860c3cf Change tetrahedralize filters to use new Scatter mechanism
The tetrahedralize algorithms have been changed to use the Scatter
classes to build indices rather than build them on their own.

To implement this efficiently with structured grids, a new ScatterUniform
class was made. I also added a new execution argument tag that allows
you to get the thread indices object from within the worklet.
2015-11-07 04:57:16 -07:00
Kenneth Moreland
740adc70f3 Save triangle counts from isosurface classify as IdComponent.
When compiling with 64-bit ids (which is the default), this can save
quite a bit of time.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
8ab2938b8c When iteratively computing output map in count scatter, compute visit
It is the case that there are two ways to create the output to input map in
a count scatter. The first is to use a parallel find for every output index.
The second, which is used when there are lots of output, is to iterate over
the input and write out the reverse map. In this case, it is trivial to also
write out the visit indices, so do that instead of a bunch more searches.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
45abbb5c75 Share from indices vector.
Previously, each VecFromPortalPermute (the type that held the from field
values) held its own copy of the indices. For point to cell on
structured grids, this was a lot of repeated data values, which has the
potential to fill up cache and registers. Instead, just use pointer
references.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
f7789f0ed7 Fix issue with const types in Thrust array management
Previously, there was a declaration ConstArrayPortalFromThrust<const T>
in ArrayManagerExecutionThrustDevice. This proved problematic because
values read from the array in the worklet were typed as const T rather
than simply T. Any Vec or Matrix built from that type would then fail
because they are not meant to work with a const value (which means they
have to be set on construction and never changed.

Instead, declare ConstArrayPortalFromThrust<T> and internally set all
the Thrust pointers to have type const T. Also declare other thrust
pointers used as method parameters to have const T rather than T. This
should work as conversion from T to const T should be fine, but not the
other way around.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
b7fdbb7294 Fix issue with indexing into triangle table offset
Each triangle in the isosurface table has three index entries. Thus,
each visit index must increment by 3.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
58aa46df74 Fix spacing in Isosurface test code.
The original isosurface code was not treating the origin and spacing of
the point coordinates correctly. Instead, it was ignoring the origin and
spacing and instead scaling all point coordinates to be in the unit cube
in world space (except there was also an off-by-one error in that). This
change recompensates by adjusting the origin and spacing to make the
correct position where the geometry was previously errantly placed.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
5b54af546a Change Isosurface algorithm to work with scatter counting
Now that ScatterCounting is implemented, we can use that to implement a
good part of the triangle generation in the isosurface algorithm. This
changes the worklet from a basic map to a topology map, which also
reduces a lot of code.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
e6a9c96c96 Adding ScatterCounting 2015-11-06 18:05:20 -07:00
Kenneth Moreland
7b6e6e4a66 Enable output to input map in fetch mechanism.
This changes the interface to the ThreadIndices classes to have both
input and output indices. It also adds a visit index to ThreadIndices.

Also added the VisitIndex execution signature tag, which relies on this
behavior.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
b0c5a32611 Add Scatter parameters to Invocation.
We are passing in execution objects with the Invocation when the Worklet
is scheduled, but we are not using it yet.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
e48e3d8086 Implement basic Scatter add to base worklet. 2015-11-06 18:05:20 -07:00
Kenneth Moreland
53d8e98440 Handle unstable sort in test for cell-to-point connectivity.
The parallel implementation in CellSetExplicit that builds cell-to-point
connectivity from point-to-cell connectivity uses a parallel sort-by-
key. The sort-by-key in the device adapter is not guaranteed to be
stable, so values associated with a particular key can be in any order.
The test for the result was expecting the connectivity array to be in a
particular order. Change the test to allow any connectivity ordering
that is still valid.
2015-11-06 14:43:02 -07:00
Patricia Kroll Fasel - 090207
123322f4b9 First code for stream lines worklet 2015-11-05 16:08:54 -07:00
Robert Maynard
4d270187c7 Update the opengl interop code to be significantly faster with cuda.
Now that we hold the state information about the transferring of an array,
we can do a far more efficient transferring.
2015-11-05 13:50:35 -05:00
Patricia Kroll Fasel - 090207
4757c0ae9e Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into cell_to_point 2015-11-04 13:28:08 -07:00
Sujin Philip
3c57cd4388 Merge topic 'add-vtk-legacy-importers'
668b0e47 Change 'writers' to 'writer'
cf372c70 Add legacy VTK file readers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !250
2015-11-04 15:03:07 -05:00
Sujin Philip
668b0e47db Change 'writers' to 'writer' 2015-11-04 14:23:16 -05:00
Sujin Philip
cf372c7014 Add legacy VTK file readers 2015-11-04 14:23:16 -05:00
Patricia Kroll Fasel - 090207
a5f1f823ae Set default device to cuda in unit test of DataSetExplicit to bypass
compiler errors in CellSetExplicit.
2015-11-04 10:16:44 -07:00
Patricia Kroll Fasel - 090207
480f0bd416 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into cell_to_point 2015-11-03 13:48:23 -07:00
Robert Maynard
1b30d6e6de Update Cuda so that SumExclusiveScan supports fancy iterators. 2015-11-03 13:28:07 -05:00
Robert Maynard
97550d5e2d Update Cuda so that UnaryPredictes work with fancy cuda array handles. 2015-11-03 13:28:07 -05:00
Patricia Kroll Fasel - 090207
02e16e7e25 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into cell_to_point 2015-11-03 11:15:26 -07:00
Sujin Philip
1b8fe17f1b Fix for several warnings 2015-11-03 09:11:38 -05:00
Sujin Philip
fd244c4142 Fix errors and warnings caused by recent changes to device adapter tag logic 2015-11-03 09:11:38 -05:00
Robert Maynard
5c886b1927 Merge topic 'missing_cuda_headers'
829c1b1f Install missing cuda device backend header.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !256
2015-11-03 07:51:17 -05:00
Robert Maynard
5469b11266 Merge topic 'remove_cuda_reduce_no_return_warning'
71cf2a7d Fix return statement in DeviceAdapterAlgorithmThrust.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !257
2015-11-03 07:50:57 -05:00
Robert Maynard
abe8b4a37a Merge topic 'missing_cellsetperm_methods'
42643260 Add missing methods to CellSetPermutation.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !258
2015-11-03 07:50:49 -05:00
T.J. Corona
0223f69a9c Adding Clear() method to DataSet. 2015-11-02 16:51:04 -05:00
T.J. Corona
4264326047 Add missing methods to CellSetPermutation. 2015-11-02 16:50:05 -05:00
Robert Maynard
71cf2a7d92 Fix return statement in DeviceAdapterAlgorithmThrust. 2015-11-02 16:46:02 -05:00
T.J. Corona
829c1b1f7f Install missing cuda device backend header. 2015-11-02 16:44:19 -05:00
Patricia Kroll Fasel - 090207
b47a352fcd Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into cell_to_point 2015-11-02 13:00:46 -07:00
Patricia Kroll Fasel - 090207
d167c75596 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into cell_to_point 2015-11-02 11:09:07 -07:00
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