From d2d98cbd8c8b674894d3cc344a97ee4620dea0b9 Mon Sep 17 00:00:00 2001 From: "Peter B. Robinson" Date: Tue, 6 Jan 2026 11:53:37 -0800 Subject: [PATCH 1/2] add globalID ArraySum methods to care --- src/care/care_inst.h | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/src/care/care_inst.h b/src/care/care_inst.h index b1356ce4..1b63aabd 100644 --- a/src/care/care_inst.h +++ b/src/care/care_inst.h @@ -882,7 +882,12 @@ CARE_EXTERN template CARE_DLL_API float ArraySum(care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArraySum(care::host_device_ptr, int, double) ; -// TODO GID not implemented +CARE_EXTERN template CARE_DLL_API +double ArraySum(care::host_device_ptr, int, double) ; +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArraySum(care::host_device_ptr, int, globalID) ; +#endif #endif // defined(CARE_PARALLEL_DEVICE) @@ -894,6 +899,10 @@ CARE_EXTERN template CARE_DLL_API float ArraySum(care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArraySum(care::host_device_ptr, int, double) ; +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArraySum(care::host_device_ptr, int, globalID) ; +#endif // TODO GID not implemented /////////////////////////////////////////////////////////////////////////////// @@ -908,7 +917,10 @@ CARE_EXTERN template CARE_DLL_API float ArraySumSubset(care::host_device_ptr, care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArraySumSubset(care::host_device_ptr, care::host_device_ptr, int, double) ; -// TODO GID not implemented +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArraySumSubset(care::host_device_ptr, care::host_device_ptr, int, globalID) ; +#endif #endif // defined(CARE_PARALLEL_DEVICE) @@ -920,7 +932,10 @@ CARE_EXTERN template CARE_DLL_API float ArraySumSubset(care::host_device_ptr, care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArraySumSubset(care::host_device_ptr, care::host_device_ptr, int, double) ; -// TODO GID not implemented +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArraySumSubset(care::host_device_ptr, care::host_device_ptr, int, globalID) ; +#endif /////////////////////////////////////////////////////////////////////////////// @@ -934,7 +949,10 @@ CARE_EXTERN template CARE_DLL_API float ArrayMaskedSumSubset(care::host_device_ptr, care::host_device_ptr, care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArrayMaskedSumSubset(care::host_device_ptr, care::host_device_ptr, care::host_device_ptr, int, double) ; -// TODO GID not implemented +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArrayMaskedSumSubset(care::host_device_ptr, care::host_device_ptr, care::host_device_ptr, int, globalID) ; +#endif #endif // defined(CARE_PARALLEL_DEVICE) @@ -946,7 +964,10 @@ CARE_EXTERN template CARE_DLL_API float ArrayMaskedSumSubset(care::host_device_ptr, care::host_device_ptr, care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArrayMaskedSumSubset(care::host_device_ptr, care::host_device_ptr, care::host_device_ptr, int, double) ; -// TODO GID not implemented +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArrayMaskedSumSubset(care::host_device_ptr, care::host_device_ptr, care::host_device_ptr, int, globalID) ; +#endif /////////////////////////////////////////////////////////////////////////////// @@ -960,7 +981,10 @@ CARE_EXTERN template CARE_DLL_API float ArrayMaskedSum(care::host_device_ptr, care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArrayMaskedSum(care::host_device_ptr, care::host_device_ptr, int, double) ; -// TODO GID not implemented +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArrayMaskedSum(care::host_device_ptr, care::host_device_ptr, int, globalID) ; +#endif #endif // defined(CARE_PARALLEL_DEVICE) @@ -972,7 +996,10 @@ CARE_EXTERN template CARE_DLL_API float ArrayMaskedSum(care::host_device_ptr, care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArrayMaskedSum(care::host_device_ptr, care::host_device_ptr, int, double) ; -// TODO GID not implemented +#if CARE_HAVE_LLNL_GLOBALID +CARE_EXTERN template CARE_DLL_API +globalID ArrayMaskedSum(care::host_device_ptr, care::host_device_ptr, int, globalID) ; +#endif /////////////////////////////////////////////////////////////////////////////// From 71bb93754604511bb7f25ab1fa69c23b9bbc3dc0 Mon Sep 17 00:00:00 2001 From: "Peter B. Robinson" Date: Tue, 6 Jan 2026 11:58:21 -0800 Subject: [PATCH 2/2] remove duplicate line in care_inst.h --- src/care/care_inst.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/care/care_inst.h b/src/care/care_inst.h index 1b63aabd..2d8ad534 100644 --- a/src/care/care_inst.h +++ b/src/care/care_inst.h @@ -882,8 +882,6 @@ CARE_EXTERN template CARE_DLL_API float ArraySum(care::host_device_ptr, int, float) ; CARE_EXTERN template CARE_DLL_API double ArraySum(care::host_device_ptr, int, double) ; -CARE_EXTERN template CARE_DLL_API -double ArraySum(care::host_device_ptr, int, double) ; #if CARE_HAVE_LLNL_GLOBALID CARE_EXTERN template CARE_DLL_API globalID ArraySum(care::host_device_ptr, int, globalID) ;