Save Z4C CUDA optimization progress

This commit is contained in:
2026-05-02 00:49:02 +08:00
parent 531b31e8db
commit 383e936e88
6 changed files with 343 additions and 66 deletions

View File

@@ -335,7 +335,7 @@ bool cuda_can_direct_pack(const Parallel::gridseg *src, const Parallel::gridseg
if (z4c_amr_device < 0)
{
const char *env = getenv("AMSS_CUDA_Z4C_AMR_DEVICE");
z4c_amr_device = (env && atoi(env) != 0) ? 1 : 0;
z4c_amr_device = (!env || atoi(env) != 0) ? 1 : 0;
}
if (!z4c_amr_device)
return false;