nvidia-thrust: explain (host|device)System

This commit is contained in:
Someone Serge 2022-04-13 03:09:51 +03:00
parent 22eaf090a1
commit 4965af4364
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4

View file

@ -7,12 +7,20 @@
, cudaPackages
, symlinkJoin
, tbb
# Upstream defaults:
, hostSystem ? "CPP"
, deviceSystem ? if config.cudaSupport or false then "CUDA" else "CPP"
, deviceSystem ? if config.cudaSupport or false then "CUDA" else "OMP"
}:
assert builtins.elem deviceSystem [ "CPP" "OMP" "TBB" "CUDA" ];
# Policy for device_vector<T>
assert builtins.elem deviceSystem [
"CPP" # Serial on CPU
"OMP" # Parallel with OpenMP
"TBB" # Parallel with Intel TBB
"CUDA" # Parallel on GPU
];
# Policy for host_vector<T>
# Always lives on CPU, but execution can be made parallel
assert builtins.elem hostSystem [ "CPP" "OMP" "TBB" ];
let