Commit Graph

25 Commits

Author SHA1 Message Date
Kenneth Moreland
3e69630925 Add guide chapter on fancy array handles 2024-06-05 17:51:14 -04:00
Ben Boeckel
219f44c250 clang-tidy: fix readability-const-return-type lints 2023-12-01 07:01:11 -05:00
Sujin Philip
01bacbcde0 Advanced Compute Range
Add support for masks, vector magnitude range (L2 norm), and finite values only
range computations.
2023-07-04 11:54:56 -04:00
Kenneth Moreland
58fc99c2f8 Fix fast paths for ArrayRangeCompute
The precompiled `ArrayRangeCompute` function was not following proper fast
paths for special arrays. For example, when computing the range of an
`ArrayHandleUniformPointCoordinates`, the ranges should be taken from the
origin and spacing of the special array. However, the precompiled version
was calling the generic range computation, which was doing an unnecessary
reduction over the entire array. These fast paths have been fixed.

These mistakes in the code were caused by quirks in how templated method
overloading works. To prevent this mistake from happening again in the
precompiled `ArrayRangeCompute` function and elsewhere, all templated forms
of `ArrayRangeCompute` have been deprecated. Most will call
`ArrayRangeCompute` with no issues. For those that need the templated
version, `ArrayRangeComputeTemplate` replaces the old templated
`ArrayRangeCompute`. There is exactly one templated declaration of
`ArrayRangeComputeTemplate` that uses a class, `ArrayRangeComputeImpl`,
with partial specialization to ensure the correct form is used.
2023-03-08 12:36:53 -07:00
Kenneth Moreland
5ef4e7eeee Make new style of ArrayHandle the expected style
What was previously declared as `ArrayHandleNewStyle` is now just the
implementation of `ArrayHandle`. The old implementation of `ArrayHandle`
has been moved to `ArrayHandleDeprecated`, and `ArrayHandle`s still
using this implementation must declare `VTKM_ARRAY_HANDLE_DEPRECATED` to
use it.
2021-01-12 07:17:53 -07:00
Kenneth Moreland
f66dc780c5 Update ArrayHandleImplicit to new array style with Buffer
Also updated the dependent `ArrayHandle`s that use
`ArrayHandleImplicit`'s storage.
2020-10-21 08:36:29 -06:00
Kenneth Moreland
ec34cb56c4 Use new ways to get array portal in control environment
Also fix deadlocks that occur when portals are not destroyed
in time.
2020-02-26 13:10:46 -07:00
Allison Vacanti
539f6e5ad7 Port benchmarking framework to Google Benchmark. 2020-01-08 10:58:51 -05:00
Kenneth Moreland
4a52a3f7a9 Shorter StorageTag for ArrayHandleZip 2020-01-07 07:01:34 -07:00
Kenneth Moreland
bfd21dfae2 Declare StorageTags with VTKM_ALWAYS_EXPORT
This modifier is required on OSX for dynamic_cast to work properly
across libraries.
2020-01-07 07:01:11 -07:00
Kenneth Moreland
ca0ad1dc22 Shorten storage tag for ArrayHandleIndex 2020-01-07 07:01:10 -07:00
Robert Maynard
f2a3ecd014 Don't generate doxygen for serialization helpers 2019-09-12 17:29:05 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Allison Vacanti
d1db4ef8b3 Clarify intent of TypeString and TypeName functions.
TypeName is used for logging, and is now TypeToString.

TypeString is used for serialization, and is now SerializableTypeString.
2019-03-01 11:47:53 -05:00
Robert Maynard
ad98d818ce VTK-m now doesn't clobber external DIY installations
Fixes #334
2019-02-05 13:05:14 -05:00
Sujin Philip
fd89dfc89b Add ArrayHandle Serialization 2018-09-25 13:58:39 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Sujin Philip
c4e3102084 Simplify ArrayHandleImplicit template 2017-06-08 16:46:45 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Robert Maynard
a6bd3a22e0 Make sure all custom storage containers are exported. 2017-01-16 09:17:38 -05:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07: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
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
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
891182ee19 Add ArrayHandleIndex class.
This is the most common use case for ArrayHandleCounting, and this class
is a bit easier to use and a bit faster.
2015-09-14 22:11:09 -06:00