You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The backend system is currently restricted to build and install the library only for a single backend.
Current behavior:
Set STDGPU_BACKEND to either STDGPU_BACKEND_CUDA (default) or STDGPU_BACKEND_OPENMP to control which backend will be used.
Build target stdgpu::stdgpu for the particular choice of STDGPU_BACKEND. Other backends will not be considered at all.
Proposed behavior:
Set STDGPU_ENABLE_<BACKEND> where <BACKEND> is one of CUDA, OPENMP.
Build backend targets stdgpu::<BACKEND> for each enabled backend using the backend-specific settings and dependency checks.
Define stdgpu::stdgpu as an alias target to stdgpu::<BACKEND> serving as a default which can be controlled via STDGPU_BACKEND to match current behavior.
This will make the system more flexible and allow users to choose freely between all enabled backends in their projects rather than being globally restricted to a single choice. Note that linking to more than one backend at the same time will be considered undefined behavior/ODR violation.
Furthermore, if only a single backend should be used at all times, this intend can also be expressed more clearly by linking to stdgpu::<BACKEND> rather than the configuration-dependent stdgpu::stdgpu target.
The text was updated successfully, but these errors were encountered:
The backend system is currently restricted to build and install the library only for a single backend.
Current behavior:
STDGPU_BACKEND
to eitherSTDGPU_BACKEND_CUDA
(default) orSTDGPU_BACKEND_OPENMP
to control which backend will be used.stdgpu::stdgpu
for the particular choice ofSTDGPU_BACKEND
. Other backends will not be considered at all.Proposed behavior:
STDGPU_ENABLE_<BACKEND>
where<BACKEND>
is one ofCUDA
,OPENMP
.stdgpu::<BACKEND>
for each enabled backend using the backend-specific settings and dependency checks.stdgpu::stdgpu
as an alias target tostdgpu::<BACKEND>
serving as a default which can be controlled viaSTDGPU_BACKEND
to match current behavior.This will make the system more flexible and allow users to choose freely between all enabled backends in their projects rather than being globally restricted to a single choice. Note that linking to more than one backend at the same time will be considered undefined behavior/ODR violation.
Furthermore, if only a single backend should be used at all times, this intend can also be expressed more clearly by linking to
stdgpu::<BACKEND>
rather than the configuration-dependentstdgpu::stdgpu
target.The text was updated successfully, but these errors were encountered: