Commit Graph

17 Commits

Author SHA1 Message Date
Ben Boeckel
5aad5ca37e clang-tidy: fix modernize-redundant-void-arg lints 2023-12-01 07:01:11 -05:00
Kenneth Moreland
ac889b5004 Implement VecTraits class for all types
The `VecTraits` class allows templated functions, methods, and classes to
treat type arguments uniformly as `Vec` types or to otherwise differentiate
between scalar and vector types. This only works for types that `VecTraits`
is defined for.

The `VecTraits` templated class now has a default implementation that will
be used for any type that does not have a `VecTraits` specialization. This
removes many surprise compiler errors when using a template that, unknown
to you, has `VecTraits` in its implementation.

One potential issue is that if `VecTraits` gets defined for a new type, the
behavior of `VecTraits` could change for that type in backward-incompatible
ways. If `VecTraits` is used in a purely generic way, this should not be an
issue. However, if assumptions were made about the components and length,
this could cause problems.

Fixes #589
2023-03-16 12:59:38 -06:00
Kenneth Moreland
74536d4ca1 Support Vec operators on ArrayPortalValueReference 2021-01-13 09:19:33 -07:00
Robert Maynard
54118dfca0 Use noexcept instead of throw() as it was deprecated in c++11 2020-01-13 10:05:35 -05:00
Robert Maynard
65347bf948 Correct warnings found by GCC 9.2 2019-12-02 09:33:35 -05:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Kenneth Moreland
5688375c99 Add point merge capabilities to CleanGrid filter 2019-02-26 12:44:33 -07:00
Kenneth Moreland
af4aef9913 Add missing %= operator to ArrayPortalValueReference 2019-02-22 17:11:11 -07:00
Kenneth Moreland
9e02cd33af Declare ArrayPortalValueReference::operator= as const
Declaring operator= as const seems a little weird because we are
changing the value. But remember that ArrayPortalReference is only a
reference class. The reference itself does not change, just the thing
that it is referencing. So declaring as const is correct and necessary
so that you can set the value of a reference returned from a function
(which is a right hand side value).
2019-02-21 08:39:21 -07:00
Kenneth Moreland
b141f75150 Add more operator= to ArrayPortalValueReference
Forward arguments to assignment operator in ArrayPoetalValueReference
better.
2019-02-20 13:33:55 -07:00
Kenneth Moreland
1ca55ac319 Add specialized operators for ArrayPortalValueReference
The ArrayPortalValueReference is supposed to behave just like the value
it encapsulates and does so by automatically converting to the base type
when necessary. However, when it is possible to convert that to
something else, it is possible to get errors about ambiguous overloads.
To avoid these, add specialized versions of the operators to specify
which ones should be used.

Also consolidated the CUDA version of an ArrayPortalValueReference to the
standard one. The two implementations were equivalent and we would like
changes to apply to both.
2019-02-20 13:33:55 -07:00
Allison Vacanti
d602784348 Specialize swap for ArrayPortalValueReference types. 2018-05-29 14:46:46 -04:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05: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
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Kenneth Moreland
63c748f049 Implement ArrayHandleGroupVecVariable
This is a fancy array handle that can group entries in another array by
arbitrary amounts. This allows us to implement input and output arrays
with a different sized Vec for each instance. This is necessary for
generating new topologies with cells of different types.
2016-11-22 17:10:09 -07:00