Commit Graph

32 Commits

Author SHA1 Message Date
Allison Vacanti
716f393c32 Add DeviceAdapterId::GetName. 2018-08-28 14:14:49 -07: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
Robert Maynard
554bc3d369 At runtime TryExecute supports a specific deviceId to execute on.
Instead of always using the first enabled device, now TryExecute
can be told which device at runtime to use.
2018-08-07 17:22:18 -04:00
Robert Maynard
f6789d9cfd Remove DeviceAdapterTagCheck with DeviceAdapterTraits
The DeviceAdapterTraits already contains if the device adapter is
valid, and therefore DeviceAdapterTagCheck is redundant.
2018-07-24 08:16:48 -04:00
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -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
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
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
David C. Lonie
cbfe5fddd9 Fix up various issues with ArrayHandles in vtkm_cont. 2017-04-05 15:45:11 -07:00
David C. Lonie
7a41621d82 Move default device selection out of private headers.
This will make the librarification of vtk-m easier as we tread that
path.

Refs #120.
2017-02-16 13:40:35 -05:00
Robert Maynard
0f58d6fc54 Add vtkm/cont/serial directory for the serial backend. 2016-09-28 14:22:53 -04:00
Robert Maynard
c70da5fc23 Extend vtkm::DeviceAdapterTraits to include a unique numeric identifier.
Previously each device adapter only had a unique string name. This was
not the best when it came to developing data structures to track the status
of a given device at runtime.

This adds in a unique numeric identifier to each device adapter. This will
allow classes to easily create bitmasks / lookup tables for the validity of
devices.
2015-12-16 11:18:52 -05:00
Robert Maynard
7d249e8996 Move DeviceAdapterTraits into vtkm::cont as they are user API.
When writing multiple backend code users of vtkm need to use the
DeviceAdapterTraits classes, so therefore we should move them to vtkm::cont
to signify this.
2015-12-11 09:52:18 -05:00
Robert Maynard
52467474aa Merge topic 'DeviceAdapter-preprocessor-logic'
04a48129 Add DeviceAdapter preprocessor logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !168
2015-10-29 16:02:01 -04:00
Kenneth Moreland
fd21a12f4a Merge branch 'xcode-7-warnings' into 'master'
Xcode 7 warnings

The XCode 7 compiler has a new warning for unused typedefs. The Boost code we use has some instances where this warning gets issued. Suppress these warnings.

See merge request !199
2015-09-17 18:12:31 -04:00
Kenneth Moreland
b15940c1e3 Declare new VTKM_STATIC_ASSERT
This is to be used in place of BOOST_STATIC_ASSERT so that we can
control its implementation.

The implementation is designed to fix the issue where the latest XCode
clang compiler gives a warning about a unused typedefs when the boost
static assert is used within a function. (This warning also happens when
using the C++11 static_assert keyword.) You can suppress this warning
with _Pragma commands, but _Pragma commands inside a block is not
supported in GCC. The implementation of VTKM_STATIC_ASSERT handles all
current cases.
2015-09-17 14:40:39 -06:00
Robert Maynard
4d635d642b DeviceAdapter Tags now always exist, and contain if the device is valid.
Previously it was really hard to verify if a device adapter was valid. Since
you would have to check for the existence of the tag. Now the tag always
exists, but instead you query the traits of the DeviceAdapter to see if
it is a valid adapter.

This makes compiling with multiple backends alot easier.
2015-09-17 09:28:21 -04:00
Kenneth Moreland
2ff6576c65 Add third party wrappers around boost macros.
The boost assert macros seem to have an issue where they define an
unused typedef. This is causing the XCode 7 compiler to issue a warning.
Since the offending code is in a macro, the warning is identified with
the VTK-m header even though the code is in boost. To get around this,
wrap all uses of the boost assert that is causing the warning in the
third party pre/post macros to disable the warning.
2015-09-16 23:34:49 -06:00
hschroot
04a4812965 Add DeviceAdapter preprocessor logic 2015-09-02 10:10:07 -07:00
Robert Maynard
ab59e34a2f Rename pragma header guard so it makes sense for tbb and thrust.
Boost is not the only thirdparty that we are supressing warnings for, so
make the name more generic.
2015-08-13 09:04:23 -04:00
Kenneth Moreland
21b3b318ba Always disable conversion warnings when including boost header files
On one of my compile platforms, GCC was giving conversion warnings from
any boost include that was not wrapped in pragmas to disable conversion
warnings. To make things easier and more robust, I created a pair of
macros, VTKM_BOOST_PRE_INCLUDE and VTKM_BOOST_POST_INCLUDE, that should
be wrapped around any #include of a boost header file.
2015-07-30 17:40:40 -06:00
Sujin Philip
08f88b1cb9 Add TBB backend. 2015-06-01 13:57:37 -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
Robert Maynard
d9270e408d Adding a cuda device adapter to vtkm.
Porting the dax device adapter over to vtkm. Unlike the dax version, doesn't
use the thrust::device_vector, but instead uses thrust::system calls so that
we can support multiple thrust based backends.

Also this has Texture Memory support for input array handles. Some more work
will need to be done to ArrayHandle so that everything works when using an
ArrayHandle inplace with texture memory bindings.
2014-12-19 13:47:28 -05:00
Kenneth Moreland
b368830fc0 Add VTKM_IS_LIST_TAG macro
As part of this is a ListTagCheck class that can be used for other
template magic.
2014-10-22 07:24:04 -06:00
Kenneth Moreland
ed9cf46a17 Make sure all header wrapper macros start with vtk_m_ rather than vtkm_
We made this change a while ago to help with completion in IDEs.
(Completion was matching a bunch of wrapper macros that were almost
never used anywhere.) Most of the changes are in comments, but there are
a few bad macro definitions.
2014-06-11 10:43:36 -06:00
Kenneth Moreland
744d97229f Changed undefined macros to something other than zero.
Previously, VTKM_DEVICE_ADAPTER_UNDEFINED and
VTKM_ARRAY_CONTAINER_CONTROL_UNDEFINED were set to 0. The problem is
that if someone set VTKM_DEVICE_ADAPTER or VTKM_ARRAY_CONTAINER_CONTROL
to something invalid, that would test positive when compared to 0. Thus,
you get an error about not defining the default when in fact the problem
is setting an invalid flag.

This change makes the undefined constants -1 so that the comparison will
fail unless the macro is actually properly set.
2014-06-09 16:32:02 -06:00
Robert Maynard
2b7a0e0490 revise the header guard naming convention to not conflict with macro names. 2014-03-07 10:22:36 -05:00
Robert Maynard
c2101b8ffc Add in a serial device adapter and required supporting classes.
We now can verify that the array handle is usable by a device adapter.
2014-02-11 12:34:56 -05:00
Robert Maynard
a94abd7a71 Add in the minimum part of the control env to have a testable array handle. 2014-02-10 15:00:17 -05:00