From 4965af4364c6af1ccc9c981542e11d38dac082de Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Wed, 13 Apr 2022 03:09:51 +0300 Subject: [PATCH] nvidia-thrust: explain (host|device)System --- .../libraries/nvidia-thrust/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/nvidia-thrust/default.nix b/pkgs/development/libraries/nvidia-thrust/default.nix index 1c673837c28c..545607ead2d1 100644 --- a/pkgs/development/libraries/nvidia-thrust/default.nix +++ b/pkgs/development/libraries/nvidia-thrust/default.nix @@ -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 +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 +# Always lives on CPU, but execution can be made parallel assert builtins.elem hostSystem [ "CPP" "OMP" "TBB" ]; let