diff options
author | Someone Serge <sergei.kozlukov@aalto.fi> | 2022-04-13 03:09:51 +0300 |
---|---|---|
committer | Someone Serge <sergei.kozlukov@aalto.fi> | 2023-04-01 05:48:32 +0300 |
commit | 4965af4364c6af1ccc9c981542e11d38dac082de (patch) | |
tree | eee6ad36dd1ed5d9faf2311ebf7607b6ed662277 | |
parent | 22eaf090a17873ad103fd585ed10c4a0ce2acdd9 (diff) | |
download | nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.tar nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.tar.gz nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.tar.bz2 nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.tar.lz nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.tar.xz nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.tar.zst nixpkgs-4965af4364c6af1ccc9c981542e11d38dac082de.zip |
nvidia-thrust: explain (host|device)System
-rw-r--r-- | pkgs/development/libraries/nvidia-thrust/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/libraries/nvidia-thrust/default.nix b/pkgs/development/libraries/nvidia-thrust/default.nix index 1c673837c28..545607ead2d 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<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 |