Commit Graph

20 Commits

Author SHA1 Message Date
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06: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
fda9113779 vtkm::filter now run each test with an explicit device adapter set
This allows the filters to be tested with each device
2019-01-01 14:13:08 -05:00
Allison Vacanti
1e6c30b7af Make pair construction rvalue-friendly. 2018-07-02 14:48:06 -04:00
Robert Maynard
f7c46eccbb Correct more host/device warnings found with new cmake code. 2018-01-08 14:00:58 -05:00
Robert Maynard
687071f9b0 Remove unneeded host/device markups on default constructors 2018-01-08 14:00:58 -05:00
Allison Vacanti
4cd791932b Ensure that Pair and Vec are trivial classes.
For std::copy to optimize a copy to memcpy, the valuetype must be both
trivially constructable and trivially copyable.

The new copy benchmarks highlighted an issue that std::copy'ing pairs
and vecs were not optimized to memcpy. For a 256 MiB buffer on my
laptop w/ GCC, the serial copy speeds were:

UInt8:                 10.10 GiB/s
Vec<UInt8, 2>           3.12 GiB/s
Pair<UInt32, Float32>   6.92 GiB/s

After this patch, the optimization occurs and a bitwise copy occurs:

UInt8:                 10.12 GiB/s
Vec<UInt8, 2>           9.66 GiB/s
Pair<UInt32, Float32>   9.88 GiB/s

Check were also added to the Vec and Pair unit tests to ensure that
this classes continue to be trivial.

The ArrayHandleSwizzle test was refactored a bit to eliminate a new
'possibly uninitialized memory' warning introduced with the default
Vec ctors.
2017-10-18 14:58:35 -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
Robert Maynard
b85cdd9080 Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-07 14:05:43 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04: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
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
Kenneth Moreland
9cd8cb22eb Make PrintSummary actually work for Field and CoordinateSystem.
The PrintSummary for CoordinateSystem went in an infinite loop. It was
supposed to call PrintSummary of its superclass (Field), but instead it
called itself.

The PrintSummary for Field only worked for fields of type vtkm::Float32.
To make it work for all array types, I added a PrintSummary method to
DynamicArrayHandle, and Field calls that without trying to cast to a
static type.
2015-08-27 10:20:30 -06:00
Kenneth Moreland
d0508264fa Fix typo TypeTraitsUnkownTag -> TypeTraitsUnknownTag
There was a simple typo in the tag. Since the tag is basically a
placeholder for an invalid value, the typo was missed.
2015-07-07 10:23:10 -06:00
Robert Maynard
eb7e388adc Properly initialize vtkm::Pair, and remove the TypeTrait for it.
vtkm::Pair can hold vtkm::Vec so we need to call the proper constructor
for vtkm::Vec.

Now that vtkm::TypeTraits don't error out on unknown types, we don't need
the weird specialization for vtkm::Pair.
2015-06-16 13:06:08 -04:00
Robert Maynard
a76a97c606 Add a plus operator to vtkm::Pair. 2015-06-12 10:08:10 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Kenneth Moreland
30893f0b0d Add utility include to Pair.h
Pair.h references std::Pair, which is defined in the utility header.
Thus, that should really be included.
2014-10-23 16:34:52 -06:00
Kenneth Moreland
b78688f4f4 Add ability to zip function interface objects.
The zip capability allows you to parameter-wise combine two
FunctionInterface objects. The result is another FunctionInterface with
each parameter a Pair containing the respective values of the two
inputs.

Being able to zip allows you to do transforms and invokes on data that
is divided among multiple function interface objects.
2014-10-16 16:31:55 -06:00