Commit 8ea7fbc3 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Add clarification for DEVICE_SOURCES

The `vtkm_add_target_information` CMake function has a `DEVICE_SOURCES`
option that allows you to list which sources need to be compiled with a
device compiler. Added some hints to the documentation about which
source code needs to be listed in `DEVICE_SOURCES`.
parent 8e6a8d8c
Pipeline #251034 running with stage
......@@ -312,7 +312,15 @@ endfunction()
#
# DEVICE_SOURCES: The collection of source files that are used by `target(s)` that
# need to be marked as going to a special compiler for certain device adapters
# such as CUDA.
# such as CUDA. A source file generally needs to be in DEVICE_SOURCES if (and
# usually only if) it includes vtkm/cont/DeviceAdapterAlgorithm.h (either directly
# or indirectly). The most common code to include DeviceAdapterAlgorithm.h are
# those that use vtkm::cont::Algorithm or those that define worklets. Templated
# code that does computation often links to device adapter algorithms. Some
# device adapters that require a special compiler for device code will check in
# their headers that a device compiler is being used when it is needed. Such
# errors can be corrected by adding the source code to `DEVICE_SOURCES` (or
# removing the dependence on device algorithm when possible).
#
# EXTENDS_VTKM: Some programming models have restrictions on how types can be used,
# passed across library boundaries, and derived from.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment