Commit Graph

1366 Commits

Author SHA1 Message Date
Kenneth Moreland
117ce0be92 Add const correctness to MultiBlock method arguments
Several MultiBlock methods take references as arguments. Generally that
is good as some of the arguments take larger data structures like
DataSet and std::vector that can be passed much faster as a reference.
However, the references were not declared const, which means that you
could not use rvalues. This is now fixed.
2018-03-20 16:33:40 -06:00
Robert Maynard
e35eec4a92 Merge topic 'virtual_coordinate_system_workarounds'
cbadd3e6 Make CoordinateSystem not fail on CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1108
2018-03-13 08:31:53 -04:00
Robert Maynard
cbadd3e67e Make CoordinateSystem not fail on CUDA 2018-03-10 16:38:41 -05:00
Robert Maynard
9eca9be724 Merge topic 'prefer_constexpr_over_const'
7c54125b Switch over from static const to static constexpr where possible.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1097
2018-03-10 16:14:50 -05:00
Robert Maynard
1bd7441384 Merge topic 'more_efficient_dynamicarrayhandle_cast_call'
c026d14b DynamicArrayHandle prunes invalid Value/Storage set before cast and call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1109
2018-03-10 13:54:33 -05:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
Robert Maynard
c026d14b97 DynamicArrayHandle prunes invalid Value/Storage set before cast and call
By pruning the invalid combinations first we reduce the amount of work
the compiler has to do. Additionally it makes for smaller callstacks when
the compiler errors out during a CastAndCall.
2018-03-09 16:14:27 -05:00
Utkarsh Ayachit
c255c0ebe7 add vtkm::cont::ConditionalCastAndCall
Adding a function to conditionally do CastAndCall.
2018-03-06 15:54:46 -05:00
Utkarsh Ayachit
54c2d2345e Make it easier to iterator over blocks.
Now `for (block : multiblock)` is supported.
2018-03-06 15:54:46 -05:00
Utkarsh Ayachit
52b78a903a Merge topic 'make-diy-non-optional'
756c7e1d selectively disable C4275.
7f52fcd1 Merge branch 'upstream-diy' into make-diy-non-optional
b8ae3236 diy 2018-02-27 (e140ad94)
4ade3984 warnings: int/size_t conversion warnings.
18fec921 don't exclude DIY warnings.
4813d7cb disable non-fixable MSVC warnings.
61e57d4e fix shadowed variable warnings.
7002c71e add warning guards around diy includes.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1091
2018-02-27 15:50:41 -05:00
Utkarsh Ayachit
756c7e1d11 selectively disable C4275. 2018-02-27 13:42:52 -05:00
Robert Maynard
6202d8d22d CudaAllocator guards all CUDA 8.0+ calls behind ifdef's. 2018-02-26 16:37:57 -05:00
Robert Maynard
ff9dcc4750 Consistently mark variables as static const across all of vtk-m 2018-02-26 16:37:57 -05:00
Utkarsh Ayachit
4ade3984ac warnings: int/size_t conversion warnings. 2018-02-26 15:33:56 -05:00
Utkarsh Ayachit
61e57d4e73 fix shadowed variable warnings. 2018-02-26 15:33:56 -05:00
Utkarsh Ayachit
7002c71e95 add warning guards around diy includes.
Adding `VTKM_THIRDPARTY_PRE_INCLUDE` and `VTKM_THIRDPARTY_POST_INCLUDE`
guards around diy includes.
2018-02-26 15:33:56 -05:00
Utkarsh Ayachit
70b647071c Make DIY a required dependency.
DIY now depends on MPI optionally. Hence we no longer need to depend on
DIY optionally based on whether MPI was enabled. Update cmake and c++
code to always use DIY-based components.

DIY is built with MPI support if VTKm_ENABLE_MPI is ON.
2018-02-26 11:25:56 -05:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Robert Maynard
01c9d6e2a6 Merge topic 'vtkm_prefers_using_over_typedef'
182f4707 vtkm prefers 'using' over typedef.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1092
2018-02-23 13:15:02 -05:00
Robert Maynard
182f4707e7 vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
Robert Maynard
c47ccee11e Merge topic 'reduce_arrayrange_library_size'
ae23f180 Refactor ArrayRange to do as little as possible inside TryExecute
12b5aac0 Leverage try_executes perfect forwarding in ArrayRange

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1085
2018-02-23 08:11:48 -05:00
Robert Maynard
043afd326a Merge topic 'refactor_arrayhandle_to_reduce_lib_size'
9bf14b78 Correct warnings inside worklet::Clip when making array handles
1b6d67e0 Always defer to the serial allocator when allocating basic storage
bf2b4169 Refactor vtk-m ArrayHandle to use mutable over const_cast
705528bf vtk-m ArrayHandle + basic storage has an optimized PrepareForDevice method
22f9ae3d vtk-m ArrayHandle + basic holds control data by StorageBasicBase
b1d0060d Make Storage and ArrayHandle export for the same value types.
d0a68d32 Refactor vtk-m storage basic to generate less code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1084
2018-02-21 16:56:53 -05:00
Thomas Otahal
1dabda4216 Bug fix for max threads in radix sort
Use PlainType to get max threads instead of
ValueType for key-value radix sorts.
2018-02-20 08:28:29 -07:00
Robert Maynard
1b6d67e022 Always defer to the serial allocator when allocating basic storage 2018-02-16 10:00:28 -05:00
Robert Maynard
bf2b41699a Refactor vtk-m ArrayHandle to use mutable over const_cast 2018-02-16 10:00:28 -05:00
Robert Maynard
705528bf17 vtk-m ArrayHandle + basic storage has an optimized PrepareForDevice method
By hard coding the PrepareForDevice to know about all the different VTK-m
devices, we can have a single base class do the execution allocation, and not
have that logic repeated in each child class.
2018-02-16 10:00:28 -05:00
Robert Maynard
22f9ae3d24 vtk-m ArrayHandle + basic holds control data by StorageBasicBase
By making the array handle hold the control side data by the parent storage
class we remove significant code generation.
2018-02-16 09:59:20 -05:00
Robert Maynard
b1d0060dff Make Storage and ArrayHandle export for the same value types.
Previously Storage would not export for all the same types as Array Handle.
2018-02-16 09:59:20 -05:00
Robert Maynard
d0a68d3266 Refactor vtk-m storage basic to generate less code
By moving all common operations to a parent class we can
significantly reduce the vtk-m library size.
2018-02-16 09:59:19 -05:00
Robert Maynard
ae23f18059 Refactor ArrayRange to do as little as possible inside TryExecute 2018-02-15 11:42:48 -05:00
Thomas Otahal
30f6e53c27 Fixed compiler warning for char type with kxsort
Added check for long double arrays, use TBB parallel_sort

Added radix sort instantiations for char16_t, char32_t, and
wchar_t. std::is_arithmetic<T> will evaluate to true for these
types.

Removed VTKM_CONT_EXPORT in DeviceAdapterAlgorithmTBB.h to try
and fix dll related error on Windows.
2018-02-14 09:44:11 -07:00
Thomas Otahal
8f75df65c5 Fix Visual Studio compiler warnings. 2018-02-14 07:44:37 -07:00
Robert Maynard
12b5aac015 Leverage try_executes perfect forwarding in ArrayRange 2018-02-14 09:25:02 -05:00
Thomas Otahal
d7a98057b1 Move kxsort.h inside VTKM_THIRDPARTY_PRE_INCLUDE 2018-02-13 15:27:59 -07:00
Thomas Otahal
f53d0789b0 Removed debug output statements. 2018-02-13 12:32:53 -07:00
Thomas Otahal
7c0b09deb4 Removed Gnu specific __attribute__ macro for unused variables
Replaced with (void)parameter
2018-02-13 11:36:47 -07:00
Thomas Otahal
773897655c Added missing files from Rob's patch. 2018-02-13 09:23:10 -07:00
Thomas Otahal
84de519250 Applied patch from Rob Maynard
This makes finding the implementation and explicit instantiations easier.
It also removes most macro usage from RadixSort.
2018-02-13 09:16:45 -07:00
Thomas Otahal
9cf12c48ce Merge branch 'master' into cpu_parallel_radix_sort 2018-02-07 10:23:54 -07:00
Mark Kim
af7a4a7805 Stop GetStorage copy. 2018-02-06 16:13:41 -05:00
Robert Maynard
22ea58335a iVTK-m CUDA backend doesn't use thrust::cuda::pointer any more.
This was removed as CUDA 9.0 on MSVC has issues where CUB/Thrust
would fail to compile when given these types.
2018-02-02 08:33:17 -05:00
Thomas Otahal
5e72f96b99 CPU parallel radix sorting
Created split implementation. Parallel radix
sort calls moved to vtkm_cont library.

Added key value radix sorts. SortByKey will invoke
radix sort when the key is a fundamental C++ numeric
or character type.

Added fast path for vtkm::SortLess and vtkm::SortGreater
calls to Sort and SortByKey.
2018-01-31 14:08:14 -07:00
Sujin Philip
9e466f8cd2 Merge topic 'add-probe'
34bae569 Add Probe worklet and filter
4cd306ea Fix a bug in CellLocator
cf1957ca Add make_VecFromPortalPermute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1064
2018-01-30 15:08:49 -05:00
Robert Maynard
d70c31d449 Serial ScanInclusive now makes sure to always use WrappedBinaryOperator.
By using WrappedBinaryOperator we will not get warnings on vs2017 when
scanning <32bit arrays, and at the same time also properly support
fancy arrays.
2018-01-30 11:57:13 -05:00
Robert Maynard
0c5a087e41 Merge topic 'dont_allow_rvalue_tasks'
ef611239 Don't allow DeviceTaskTypes to construct tasks from rvalues.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1062
2018-01-30 08:37:29 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Sujin Philip
b5f71644fe Add IsType to ArrayHandleVirtualCoordinates
Makes the interface compatible with DynamicArrayHandle.
2018-01-25 11:02:52 -05:00
Thomas Otahal
de687b619e Merge branch 'master' into cpu_parallel_radix_sort 2018-01-22 10:03:30 -07:00
Sujin Philip
4cd306ea2c Fix a bug in CellLocator
Cell dimension for structured data is computed by subtracting Point dimensions
by vtkm::Id3(1). This fix prevents a dimension component from being less than
1 for 2D and 1D cases.
2018-01-19 10:48:39 -05:00
Robert Maynard
ef611239f6 Don't allow DeviceTaskTypes to construct tasks from rvalues. 2018-01-18 13:55:37 -05:00