Commit Graph

1860 Commits

Author SHA1 Message Date
Robert Maynard
223a711f2b Merge topic 'ErrorBadType_IsDeviceIndependent'
80b7f8f18 ErrorBadType should be a device independent exception

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1524
2019-01-24 14:43:06 -05:00
Robert Maynard
24e71d251b VTK-m yet again has properly installed headers.
Fixes the install issues mentioned in #342
2019-01-24 14:26:40 -05:00
Allison Vacanti
4ddcfbc66d Merge topic 'openmp_task_namespace'
91a1c7e2d Fix typo in openmp and tbb task code.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1523
2019-01-24 13:19:33 -05:00
Robert Maynard
80b7f8f187 ErrorBadType should be a device independent exception 2019-01-24 13:01:03 -05:00
Allison Vacanti
91a1c7e2d0 Fix typo in openmp and tbb task code. 2019-01-24 12:02:13 -05:00
Allison Vacanti
03fc7b66d0 Add VTKM_CUDA_DEVICE_PASS preprocessing definition.
This is only set while compiling device code, and is useful
for code that needs different implementations on devices (e.g.
they call CUDA device intrinsics, etc).
2019-01-24 11:23:45 -05:00
Robert Maynard
ed34b632f3 vtkm::cont::Testing RunOnDevice requires argc,argv parameters. 2019-01-23 16:01:58 -05:00
Robert Maynard
d6f66d17a3 Testing run methods now take argc/argv to init logging/runtime device
`vtkm::cont::testing` now initializes with logging enabled and support
for device being passed on the command line, `vtkm::testing` only
enables logging.
2019-01-17 13:16:27 -06:00
Kenneth Moreland
cbf913ad7c Merge topic 'cast-variant-to-storage'
d59ce11c0 Allow VariantArrayHandle CastAndCall to cast to concrete types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1519
2019-01-17 11:34:22 -05:00
Kenneth Moreland
d59ce11c00 Allow VariantArrayHandle CastAndCall to cast to concrete types
When you call VariantArrayHandle::CastAndCall, it now tries both basic
storage and virtual storage. You can modify the types of storages tried
by giving a type list of storage tags as the first argument.
2019-01-16 22:31:55 -06:00
Robert Maynard
4ec5bae02d Remove VTK-m TestBuild infrastructure
The purpose of the TestBuild infrastructure was to confirm that
VTK-m didn't have any lexical issues when it was a pure header
only project. As we now move to have more compiled components
the need for this form of testing is mitigated. Combined
with the issue of TestBuilds causing MSVC issues, we should
just remove this infrastructure.
2019-01-16 10:04:33 -06:00
Kenneth Moreland
b2e20bf90e Fix issues from removing field type templates
The script fixed up most of the issues. However, there were some
instances that the script was not able to pick up on. There were
also some instances that still needed a means to select types.
2019-01-11 12:23:19 -07:00
Kenneth Moreland
2e426ad547 Run the update-control-signature-tags.sh script 2019-01-11 12:23:10 -07:00
Kenneth Moreland
42f810f70e Remove type lists from ControlSignature arguments for arrays
The typelist arguments for ControlSignature tags are antiquated. Remove
them.
2019-01-11 12:15:16 -07:00
Robert Maynard
628dce822e Merge topic 'require_cmake38'
f1e1a524e Require CMake 3.8 to build VTK-m.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1514
2019-01-09 17:02:52 -05:00
Abhishek Yenpure
afd0409189 Merge topic 'code_sprint_locator_fixes'
9b56d41fe Fixing Rectilinear Grid Cell Locator
10e9d47dc Removing std::out print statement from test
34c7b57d8 Merge branch 'code_sprint_locator_fixes' of gitlab.kitware.com:ayenpure/vtk-m into code_sprint_locator_fixes
62ee1a2c8 Updates to the Cell Locators
7eb0de5b7 Merge branch 'code_sprint_locator_fixes' of gitlab.kitware.com:ayenpure/vtk-m into code_sprint_locator_fixes
866b0798d Resolving type warnings
c062f2e26 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into code_sprint_locator_fixes
797c83891 Adding default constructor and removing wrong comment
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1395
2019-01-09 16:23:17 -05:00
Robert Maynard
f1e1a524e9 Require CMake 3.8 to build VTK-m. 2019-01-09 16:01:22 -05:00
Robert Maynard
9bfe670e1c Merge topic 'correct_more_diy2_warnings'
f4a96cf1f Correct warning in StorageBasic logging when using 32bit ids.
281284298 Merge branch 'upstream-diy' into correct_more_diy2_warnings
3c130d166 diy 2019-01-09 (149953b0)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1513
2019-01-09 14:21:40 -05:00
Robert Maynard
f4a96cf1fb Correct warning in StorageBasic logging when using 32bit ids. 2019-01-09 12:56:34 -05:00
Robert Maynard
d29bdb2e39 VariantArrayHandleContainer casting operations have minimal overhead.
We want to make sure that VariantArrayHandleContainer has as little
overhead when launch worklets as possible. To do so we cache
type information to make deducing the `T` type of ArrayHandles
as fast as possible.
2019-01-09 08:27:14 -05:00
Robert Maynard
831a0bf844 Merge topic 'reduce_array_handle_virtual_binary_size'
a9d092efa Optimize TransferInfo / VirtualObjectTransfer for shared memory systems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1498
2019-01-09 08:25:18 -05:00
Robert Maynard
2e93443b10 All bit shifting in vtkm::cont::Logging happens in unsigned space 2019-01-08 09:49:15 -05:00
Robert Maynard
1ba38c59f7 Merge topic 'move_human_size_to_logging'
543255c37 Move the HumanSize function to Logging.cxx as it is only used by the logger

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1508
2019-01-07 17:42:50 -05:00
Robert Maynard
543255c374 Move the HumanSize function to Logging.cxx as it is only used by the logger 2019-01-07 16:24:49 -05:00
Robert Maynard
ce95b8f788 VTK-m now supports case-insensitive construction of devices from strings.
Previously you had to exactly match the case of a device adapter's name to
construct it, which was a source of lots of problems ( OpenMP versus OPENMP, CUDA or Cuda ).

Now `vtkm::cont::make_DeviceAdapterId` and `vtkm::cont::RuntimeDeviceTracker` support
case-insensitive device construction.
2019-01-07 08:12:25 -05:00
ayenpure
10e9d47dc3 Removing std::out print statement from test 2019-01-06 17:27:51 -08:00
ayenpure
62ee1a2c8a Updates to the Cell Locators
- Adding updates to uniform grid cell locator
  - adding OpenMP test, updating copyrights
- Adding rectilinear grid cell locator
  - adding unit tests for serial, tbb, OpenMP, and cuda
- Updating CMakeLists to honor the alphabetical ordering
2019-01-06 17:18:23 -08:00
Robert Maynard
10895f0ea5 RuntimeDeviceTracker DeepyCopy is better optimized.
The DeepCopy method is used when a ScopedGlobalRuntimeDeviceTracker
is constructed. This in turn causes the rebuilding of the device
names and states which isn't a free operation. Now we copy the already
computed information.

This was noticeable when using ArrayHandleTransform since it uses
ScopedGlobalRuntimeDeviceTracker when construction host side
portals.
2019-01-03 15:03:35 -05:00
Robert Maynard
f955103cad Merge topic 'add_more_types_to_move_constructor_test'
4e9b4c37e Verify more core vtkm types have proper move semantics.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1499
2019-01-02 16:50:31 -05:00
Robert Maynard
4e9b4c37e1 Verify more core vtkm types have proper move semantics. 2019-01-02 12:46:30 -05:00
Robert Maynard
0ee5753724 VTK-m now logs whenever at runtime a device is enabled/disabled.
Previously we only logged when a user requested a device on the
command line, but that doesn't capture when code forces a device
2019-01-02 09:34:50 -05:00
Robert Maynard
a9d092efac Optimize TransferInfo / VirtualObjectTransfer for shared memory systems 2019-01-01 15:58:57 -05:00
Robert Maynard
61b1b51577 Make IsType and Cast not error at compile time when given bad types
Previously these two functions would give compile errors when asked to
compare against an Array with a different value type. This makes it easier
to write generic code that compares virtual handles.
2018-12-31 13:03:42 -05:00
Robert Maynard
718caaaeac CudaAllocator allows managed memory to be explicitly disabled 2018-12-28 11:30:29 -05:00
Robert Maynard
3445047f9e Refactor vtkm::cont::ArrayHandleAny into vtkm::cont::ArrayHandleVirtual
ArrayHandleVirtual can automatically be constructed from any ArrayHandle.
In the cases where the input ArrayHandle doesn't derived from ArrayHandleVirtual,
it will automatically construct StorageAny to hold the array.
2018-12-27 15:42:03 -05:00
Robert Maynard
1f2abbc9c4 vtkm::cont::IsType and vtkm::cont::Cast support VariantArrayHandle 2018-12-27 14:35:56 -05:00
Robert Maynard
acf825b279 Correct IsType and Cast on ArrayHandleVirtual to work on OSX. 2018-12-27 14:35:56 -05:00
Robert Maynard
7b9fa975f2 Rename: IsVirtualType to IsValueType. 2018-12-27 14:35:56 -05:00
Robert Maynard
9c496e5da0 Correct warning found in ArrayHandleVirtualCoordinates with cuda 8.0 2018-12-27 14:35:56 -05:00
Robert Maynard
78e9cf0929 ArrayRangeCompute now supports ArrayHandleVirtual<vec3f> 2018-12-27 14:35:56 -05:00
Robert Maynard
7eb1e31b11 Remove vtkm::cont::DynamicArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
0c72555ee1 Update vtkm/cont/testing to work with ArrayHandleVariant 2018-12-27 14:35:56 -05:00
Robert Maynard
8deb661409 Add serialization support to ArrayHandle Virtual, Any, and Variant. 2018-12-27 14:35:56 -05:00
Robert Maynard
28757bda4b ArrayHandleVirtual supports comparison operators 2018-12-27 14:35:56 -05:00
Robert Maynard
4c23f50227 ArrayHandleVirtual can be used as AtomicArrayInOut tag type 2018-12-27 14:35:56 -05:00
Robert Maynard
b57dc5d289 Update ArrayHandleVirtual to handle PrepareForInPlace. 2018-12-27 14:35:56 -05:00
Robert Maynard
3c6246140d ArrayRangeCompute now states it has uniform point coord optimization 2018-12-27 14:35:56 -05:00
Robert Maynard
ef83adf3bd Field, CoordinateSystem, VirtualCoordinates all use the new virtual code 2018-12-27 14:35:56 -05:00
Robert Maynard
3d67a00822 Add ArrayHandleVariant to vtkm::cont which will replace DynamicArrayhandle 2018-12-27 14:35:56 -05:00
Robert Maynard
90223b390c Add ArrayHandleAny to vtkm::cont 2018-12-27 14:35:56 -05:00
Robert Maynard
6e1cbaa16a Add StorageVirtual and ArrayHandleVirtual to vtkm::cont 2018-12-27 14:35:56 -05:00
Robert Maynard
e31c73ef69 vtkm::cont Locators include all headers they need. 2018-12-27 13:19:40 -05:00
Robert Maynard
181d5f9f30 ArrayHandleZip now gracefully handles writes to implicit handles. 2018-12-27 13:19:40 -05:00
Sujin Philip
7c27bedc08 Enable Separable Compilation for CUDA 2018-12-27 13:19:40 -05:00
Robert Maynard
a507e784fe Merge topic 'fix_logic_error_in_enable_cuda_managed_memory'
90bb23de6 CudaAllocator::Initialize correctly uses managed memory when possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Haocheng LIU <haocheng.liu@kitware.com>
Merge-request: !1486
2018-12-21 13:23:56 -05:00
Robert Maynard
90bb23de6b CudaAllocator::Initialize correctly uses managed memory when possible
Previously the logic would always think managed memory wasn't supported
2018-12-20 17:21:55 -05:00
Robert Maynard
376ef07fa3 Merge topic 'more_storage_basic_logging'
d5dc414e7 StorageBasic allocation logic now reports number of elements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1484
2018-12-20 17:16:04 -05:00
Robert Maynard
d5dc414e74 StorageBasic allocation logic now reports number of elements
When looking at allocations it is useful to have memory size and
the number of elements so you can figure out what type/sizeof(type)
is being allocated
2018-12-20 10:13:54 -05:00
Mark Kim
e7c1151c74 So many warnings. 2018-12-17 17:54:26 -05:00
Mark Kim
d52928c9f2 edited wrong MakeTest. Fixed. 2018-12-17 10:43:07 -05:00
Mark Kim
30be47ee78 Mismatched types from MakeTest. 2018-12-16 23:23:33 -05:00
Mark Kim
08f8bbd7f1 Visual Studio doesn't support this initialization. 2018-12-14 23:03:12 -05:00
Mark Kim
a6bcf8a0ab something's not quite right. 2018-12-13 14:49:38 -05:00
Mark Kim
e033fe8eea fix new 1d data generator. 2018-12-13 14:49:38 -05:00
Mark Kim
8a9bfcba1b zfp 1d worklet. 2018-12-13 14:49:38 -05:00
Mark Kim
95636ff2cd decode/encode 2d. 2018-12-13 14:49:37 -05:00
mclarsen
8cd7c5db32 fixed the gather 2018-12-13 14:49:36 -05:00
mclarsen
ea9bef19da init zfp 2018-12-13 14:49:36 -05:00
Allison Vacanti
f3536e44f8 Merge topic '320-vtkm_init'
cdb1f5680 Add vtkm::cont::Initialize.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Haocheng LIU <haocheng.liu@kitware.com>
Merge-request: !1475
2018-12-13 12:01:57 -05:00
Allison Vacanti
cdb1f5680a Add vtkm::cont::Initialize.
Also
- Renamed vtkm::cont::make_DeviceAdapterIdFromName to just overload
  make_DeviceAdapterId.
- Refactored CMake logic for unit tests
  - Since we're now querying the device tracker for the names, they
    cannot be all caps.
- Updated usages of InitLogging to use Initialize instead.
- Added changelog.
2018-12-13 10:15:44 -05:00
Kenneth Moreland
81a22ff64f Change ConvertNumComponentsToOffsets to use DeviceAdapterId
The vtkm::cont::ConvertNumComponentsToOffsets method was originally
created before vtkm::cont::DeviceAdapterId and the dynamic
vtkm::cont::Algorithm classes were created. Thus, it contained its own
version of TryExecute and did not support the direct selection of a
device at runtime. Change the function to use the new dynamic device
adapter id, which makes this more consistent with the rest of VTK-m and
cleans up the implementation quite a bit.
2018-12-12 08:18:47 -07:00
Robert Maynard
4994190064 UnitTestMoveConstructors will now compile with gcc 4.9 and Intel < 17. 2018-12-11 09:29:08 -05:00
Robert Maynard
0da7830d9a Make sure important vtkm::cont classes have noexcept move ops.
This is important so they can be stored efficiently inside
containers such as std::vector that require strong move guarantees.
2018-12-10 10:33:18 -05:00
Robert Maynard
fee6ef591b Improve serialization performance of ArrayHandle with BasicStorage 2018-12-06 09:21:06 -05:00
Sujin Philip
6d81bc8b06 Implement extents support
Adds a variable `GlobalPointIndexStart` to `CellSetStructured`.
Adding this to the cell-set, instead of the coordinate system, enables this
feature for different types of datasets like uniform grid, rectilinear, etc.,
with this one change.
The extents can be computed using `GlobalPointIndexStart` and `PointDimensions`.
2018-12-03 15:56:45 -05:00
ayenpure
7eb0de5b74 Merge branch 'code_sprint_locator_fixes' of gitlab.kitware.com:ayenpure/vtk-m into code_sprint_locator_fixes 2018-12-03 08:07:07 -08:00
ayenpure
866b0798d4 Resolving type warnings 2018-12-03 08:03:36 -08:00
ayenpure
c062f2e26c Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into code_sprint_locator_fixes 2018-12-03 07:44:31 -08:00
Haocheng LIU
deeb9c4183 Remove a mis-added autossave file 2018-11-30 08:40:10 -05:00
Haocheng LIU
0d39806f4f Rename worklet testing executable
Now it's in accordance with vtkm testing name convension as
UnitTests_vtkm_worklet_testing.
2018-11-29 15:51:41 -05:00
Kenneth Moreland
0725bd4578 Merge topic 'average-by-key-warning'
6ebc3ea76 Fix potential warning in AverageByKey

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1463
2018-11-27 17:53:20 -05:00
Haocheng LIU
9bd30571f5 Fix link errors for vtkm_cont when logging is enabled 2018-11-27 11:37:51 -05:00
Kenneth Moreland
6ebc3ea761 Fix potential warning in AverageByKey
To get the average, we (of course) divide the sum by the amount of
values, which is returned from valuesIn.GetNumberOfComponents(). To do
this, we need to cast the number of components (returned as a
vtkm::IdComponent) to a FieldType. This is a little more complex than it
first seems because FieldType might be a Vec type. If you just try a
static_cast<FieldType>(), it will use the constructor to FieldType which
might be a Vec constructor expecting the type of the component. This in
turn could cause a warning because the vtkm::IdComponent is implicitly
converted to the Vec's component type.

Get around this problem by first casting to the component type of the
field and then constructing a field value from that.
2018-11-27 09:31:23 -07:00
Haocheng LIU
8859636672 Merge worklet testing executables into a device dependent shared library
VTK-m has been updated to replace old per device worklet testing executables with a device
dependent shared library so that it's able to accept a device adapter
at runtime.
Meanwhile, it updates the testing infrastructure APIs. vtkm::cont::testing::Run
function would call ForceDevice when needed and if users need the device
adapter info at runtime, RunOnDevice function would pass the adapter into the functor.

Optional Parser is bumped from 1.3 to 1.7.
2018-11-23 10:13:56 -05:00
Kenneth Moreland
33db6655fc Make the building of static color table presets is thread safe
If multiple threads call a function with a static function
simultaneously for the first time, C++ does not guarantee that the
static member will be constructed correctly. Make sure that it happens
correctly.
2018-11-14 09:19:07 -06:00
Kenneth Moreland
8984e74e8c Hold preset information in simple struct
Creating all the presets as vtkm::cont::ColorTable objects and passing
them back was problematic. It caused state to be shared and caused
issues when deallocating after the device deallocation methods were
finalized. Instead, make a simple struct and build new color tables on
the fly.
2018-11-11 17:30:11 -07:00
Kenneth Moreland
70e10459c7 Update presets for ColorTable
The ParaView project went through a rigourous selection process
for a short list of color tables. Let's replicate that for our
presets.
2018-11-09 09:02:10 -07:00
Robert Maynard
dadfeab00a Simplify vtkm::cont::Field by using delegating constructors. 2018-11-02 14:18:09 -04:00
Haocheng LIU
bb06717803 Make RuntimeDeviceInformation class template independent
By making RuntimeDeviceInformation class template independent, vtkm is
able to detect
device info at runtime with a runtime specified deviceId. In the past
it's impossible
because the CRTP pattern does not allow function overloading(compiler
would complain
that DeviceAdapterRuntimeDetector does not have Exists() function
defined).
2018-11-01 14:55:33 -04:00
Robert Maynard
154b65f47a Install vtkm/cont/ColorTable.hxx so users can use color tables 2018-10-31 17:02:12 -04:00
Robert Maynard
458fc974b5 Merge topic 'rework_colortable_for_separable_compilation'
169ca722b Redesign vtkm::cont::ColorTable to work with separable compilation.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1445
2018-10-31 11:24:43 -04:00
Robert Maynard
169ca722b3 Redesign vtkm::cont::ColorTable to work with separable compilation. 2018-10-31 08:18:08 -04:00
Robert Maynard
c66a6e480d Provided vtkm::cont::Storage with move schematics 2018-10-24 15:45:55 -04:00
Robert Maynard
1f86878f78 Make the ArrayHandle move constructors noexcept.
std::containers only activate fast emplace operations if the
T types move operators are noexcept
2018-10-23 16:21:05 -04:00
Kenneth Moreland
bcbad61002 Fix warnings about uninitalized value
In some functors within Algorithm.h, the functor did not have a
default constructor that initialized its fields. This could in turn
lead to a warning about using it unitialized.
2018-10-16 17:19:49 -06:00
Kenneth Moreland
bddad9b386 Remove TryExecute from filters
Now that the dispatcher does its own TryExecute, filters do not need to
do that. This change requires all worklets called by filters to be able
to execute without knowing the device a priori.
2018-10-16 15:59:53 -06:00
Robert Maynard
45422478cf Refactor VirtualObjectHandle to support new virtual design 2018-10-15 17:38:54 -04:00
Robert Maynard
ab25b4228e Cleanup the documentation in ErrorBadDevice 2018-10-11 08:11:43 -04:00
Allison Vacanti
6fb879ec20 Fix typo in logging docs. 2018-10-10 15:39:13 -04:00
Allison Vacanti
be0db4b021 Add parameter-less InitLogging().
Also document that this function should only be called from a
single thread.
2018-10-10 15:39:03 -04:00
Allison Vacanti
16c4dde2ee Merge topic 'cuda10_warning'
0e105eae6 cudaPointerAttributes::isManaged deprecated in CUDA 10.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1430
2018-10-10 15:05:57 -04:00
Allison Vacanti
0e105eae6d cudaPointerAttributes::isManaged deprecated in CUDA 10.
Update code to support both the old and new way of checking this.
2018-10-10 13:51:56 -04:00
luz.paz
d5beb69ec1 Misc. typos
Found via `codespell`
2018-10-04 10:30:33 -04:00
Robert Maynard
db1b394336 Merge branch '291_logging' into 'master'
Add general logging support

See merge request vtk/vtk-m!1414
2018-10-04 09:36:47 -04:00
Robert Maynard
e8bc2a56ed make_DeviceAdapterId is now inline to remove duplicate symbols. 2018-10-04 08:42:29 -04:00
Robert Maynard
a512cd495e Allow runtime construction of DeviceAdapterId
When need some way to convert user input such as an integer or
string to a device adapter id. This allows for integer to
device adapter id.
2018-10-03 13:43:31 -04:00
ayenpure
797c838917 Adding default constructor and removing wrong comment 2018-10-02 15:33:36 -07:00
ayenpure
f8150016ea Fixing warnings 2018-10-02 13:12:26 -07:00
Allison Vacanti
bd337854ec Initial implementation of general logging.
Addresses #291.
2018-10-02 11:37:55 -04:00
Sujin Philip
ebcd0ade6a Move test_equal_* functions to vtkm::cont::testing
Implement more general versions of `test_equal_ArrayHandles`, `test_equal_CellSets`, `test_equal_Fields`, and `test_equal_DataSets` functions and put them
in vtkm/cont/testing/Testing.hi with the hope that they will be useful for
others also.
2018-09-25 13:58:39 -04:00
Sujin Philip
365d3d3921 Implement DataSet Serialization 2018-09-25 13:58:39 -04:00
Sujin Philip
fd89dfc89b Add ArrayHandle Serialization 2018-09-25 13:58:39 -04:00
Robert Maynard
caa23b5499 Merge topic 'reverse_conn_support_differing_types'
767eb8206 ReverseConnectivityBuilder can handle 32bit and 64bit connectivity

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1409
2018-09-15 11:45:41 -04:00
ayenpure
0fa7335294 Adding fixes from Ken's review 2018-09-14 11:59:37 -06:00
Robert Maynard
2c218dd958 Merge topic 'osx_static_warnings'
c0a5e1624 Fix vtk-m warnings on static osx builds.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1408
2018-09-13 15:46:37 -04:00
Robert Maynard
767eb82063 ReverseConnectivityBuilder can handle 32bit and 64bit connectivity
This allows ReverseConnectivityBuilder to build any connectivity
independent of vtkm::Id being 32 or 64 bit.
2018-09-13 09:33:31 -04:00
Robert Maynard
c0a5e16249 Fix vtk-m warnings on static osx builds. 2018-09-13 09:15:25 -04:00
mclarsen
0e7e51a1ce resolving merge conflict 2018-09-12 18:58:33 -07:00
mclarsen
1c2f78ca92 refactoring ray tracing 2018-09-10 19:25:42 -07:00
Kenneth Moreland
2b05487398 Add ExecutionAndControlObjectBase
This is a subclass of ExecutionObject and a superset of its
functionality. In addition to having a PrepareForExecution method, it
also has a PrepareForControl method that gets an object appropriate for
the control environment. This is helpful for situations where you need
code to work in both environments, such as the functor in an
ArrayHandleTransform.

Also added several runtime checks for execution objects and execution
and cotnrol objects.
2018-09-08 11:54:28 -06:00
Kenneth Moreland
98a0a20feb Allow ArrayHandleTransform to work with ExecObject
This change allows you to set a subclass of
vtkm::cont::ExecutionObjectBase as a functor
used in ArrayHandleTransform. This latter class will then detect that
the functor is an ExecObject and will call PrepareForExecution with the
appropriate device to get the actual Functor object.

This change allows you to use virtual objects and other device dependent
objects as functors for ArrayHandleTransform without knowing a priori
what device the portal will be used on.
2018-09-05 13:11:04 -06:00
Robert Maynard
7e3727fa9c Convert some vtkm/cont classes over to vtkm::worklet::Invoker 2018-09-04 15:01:18 -04:00
ayenpure
22ca8bce15 Fixing unit test 2018-08-30 10:19:00 -07:00
Kenneth Moreland
ddc85d7385 Merge topic 'dispatcher-auto-device-2'
d879188de Make DispatcherBase invoke using a TryExecute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1392
2018-08-30 12:59:22 -04:00
ayenpure
d5b4e8411f Rectifying exception messages 2018-08-30 09:41:50 -07:00
ayenpure
5fea2b3f7f Using Length() on vtkm::Range instead of calculation 2018-08-30 09:25:05 -07:00
ayenpure
08421eb638 Fixes for CellLocatorUniformGrid
- Fixing compiler warnings
- Making code concise
2018-08-30 09:01:04 -07:00
ayenpure
42e2bb7f9a Updating files with copyrights 2018-08-29 19:46:49 -07:00
ayenpure
594d1934d4 Adding CellLocatorUniformGrid
- Adding a cell locator to locate points in a uniform grid
- Adding unit tests for the new cell locator
2018-08-29 19:30:07 -07:00
ayenpure
b56d1789b0 Fixing Point Locator interface.
- Fixing the point locator interface to make it consistent with the CellLocator
  interface
2018-08-29 19:26:37 -07:00
Kenneth Moreland
d879188de0 Make DispatcherBase invoke using a TryExecute
Rather than force all dispatchers to be templated on a device adapter,
instead use a TryExecute internally within the invoke to select a device
adapter.

Because this removes the need to declare a device when invoking a
worklet, this commit also removes the need to declare a device in
several other areas of the code.
2018-08-29 19:18:54 -07:00
Allison Vacanti
65d96ae806 Merge topic 'use_rt_dev_name'
a8fa8d918 Use device id names where possible.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1393
2018-08-29 20:08:32 -04:00
Allison Vacanti
a8fa8d9184 Use device id names where possible. 2018-08-29 14:57:19 -07:00
Kenneth Moreland
9841d0e2c5 Add ArrayHandleView
Adds a fancy array handle that restricts access to an array to some
window of values. It takes a start offset and a size and represents the
values between that start offset and size past that.
2018-08-29 13:54:31 -07:00
Allison Vacanti
0ea133dfad Add missing include for OpenMP RuntimeDetector support. 2018-08-29 09:54:52 -07:00
Allison Vacanti
e5fbd7bb6b Fix some missed IdAny renames. 2018-08-29 09:20:44 -07:00
Allison Vacanti
b124984817 Rename Undefined and Any DeviceAdapterId subclasses for consistency. 2018-08-29 09:05:50 -07:00
Allison Vacanti
a878474a38 Merge topic '256_device_adapter_name'
716f393c3 Add DeviceAdapterId::GetName.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1384
2018-08-29 11:52:23 -04:00
Allison Vacanti
716f393c32 Add DeviceAdapterId::GetName. 2018-08-28 14:14:49 -07:00
Robert Maynard
18fdc009a3 Merge topic 'upgrade_algorithms_to_support_runtime_device'
59c8bd28a vtkm::cont::Algorithm now can be told which device to run on at runtime

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1365
2018-08-28 13:34:55 -04:00
Allison Vacanti
024a75821d Make DeviceAdapterId constructor protected.
This forces users to use a defined tag, since they shouldn't need
to create their own.
2018-08-24 16:38:08 -04:00
Allison Vacanti
7ca3b60fe2 Print bytes size in array handle summaries. 2018-08-23 16:40:25 -04:00
Allison Vacanti
669ccb9130 Refactor CellSetExplicit to store connectivity in a shared_ptr.
This addresses issue #268 by ensuring that the CellToPoint validity
flag survives FunctionInterface's value copies.
2018-08-23 11:13:13 -04:00
Allison Vacanti
2b169eeb3b Use requested device in CellSetExplicit::PrepareForInput.
The BuildConnectivity method was falling back to the global
runtime device tracker instead of using the templated device.
2018-08-22 16:07:48 -04:00
Allison Vacanti
1436c1b6df Merge topic '285_singletype_rconn_opt'
ec4cf2da3 Specialize the CellToPoint computation for CSSingleType.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1371
2018-08-21 13:50:49 -04:00
Allison Vacanti
ec4cf2da3f Specialize the CellToPoint computation for CSSingleType.
It's much cheaper to compute the cell id from a connectivity
index when all cells are the same size.
2018-08-21 12:36:15 -04:00
Haocheng LIU
7d22132253 Merge topic 'allow-disabling/enabling-cuda-managed-memory'
e34301eca Allow disabling/enabling of CUDA managed memory via an env variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1359
2018-08-17 13:14:02 -04:00
Haocheng LIU
e34301eca8 Allow disabling/enabling of CUDA managed memory via an env variable
By setting the environment variable "VTKM_MANAGEDMEMO_DISABLED" to be 1,
users are able to disable CUDA managed memory even though the hardware is
capable of doing so.
2018-08-17 11:10:15 -04:00
Robert Maynard
59c8bd28aa vtkm::cont::Algorithm now can be told which device to run on at runtime 2018-08-16 16:08:34 -04:00