From 4009b43806862a0765f982f4fb830a3cf460ae1f Mon Sep 17 00:00:00 2001 From: Piyush Sao Date: Fri, 15 Dec 2023 10:13:55 -0500 Subject: [PATCH] File: SRC/TRF3dV100/schurCompUpdate_impl.cuh Refactor schurCompUpdate_impl.cuh Files Changed: - schurCompUpdate_impl.cuh Detailed Changes: - Added declaration for `found` variable in `xlpanelGPU_t` and `xupanelGPU_t` functions. File: SRC/include/superlu_defs.h Refactor superlu_defs.h for improved code quality and performance Files Changed: - SRC/include/superlu_defs.h Detailed Changes: - Modified the function signatures of `smach_dist` and `dmach_dist` in `superlu_defs.h` to accept a constant character pointer for improved safety and performance. File: SRC/prec-independent/dmach_dist.c Refactor dmach_dist function in dmach_dist.c Files Changed: - SRC/prec-independent/dmach_dist.c Detailed Changes: - Changed the parameter `cmach` in the `dmach_dist` function to be a constant string (`const char *cmach`) for improved safety and adherence to C99 standards. File: SRC/prec-independent/smach_dist.c Fix function signature in smach_dist.c Files Changed: - SRC/prec-independent/smach_dist.c Detailed Changes: - Updated the function signature in smach_dist.c from `float smach_dist(char *cmach)` to `float smach_dist(const char *cmach)`. --- SRC/TRF3dV100/schurCompUpdate_impl.cuh | 4 ++-- SRC/include/superlu_defs.h | 4 ++-- SRC/prec-independent/dmach_dist.c | 2 +- SRC/prec-independent/smach_dist.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SRC/TRF3dV100/schurCompUpdate_impl.cuh b/SRC/TRF3dV100/schurCompUpdate_impl.cuh index 3107e181..dea74d7d 100644 --- a/SRC/TRF3dV100/schurCompUpdate_impl.cuh +++ b/SRC/TRF3dV100/schurCompUpdate_impl.cuh @@ -85,7 +85,7 @@ __device__ int_t xlpanelGPU_t::find(int_t k) { int threadId = threadIdx.x; __shared__ int idx; - // __shared__ int found; + __shared__ int found; if (!threadId) { idx = -1; @@ -119,7 +119,7 @@ __device__ int_t xupanelGPU_t::find(int_t k) { int threadId = threadIdx.x; __shared__ int idx; - // __shared__ int found; + __shared__ int found; if (!threadId) { idx = -1; diff --git a/SRC/include/superlu_defs.h b/SRC/include/superlu_defs.h index 6f9998ef..79ec3e0d 100755 --- a/SRC/include/superlu_defs.h +++ b/SRC/include/superlu_defs.h @@ -1115,8 +1115,8 @@ extern void countnz_dist (const int_t, int_t *, int_t *, int_t *, extern int64_t fixupL_dist (const int_t, const int_t *, Glu_persist_t *, Glu_freeable_t *); extern int_t *TreePostorder_dist (int_t, int_t *); -extern float smach_dist(char *); -extern double dmach_dist(char *); +extern float smach_dist(const char *); +extern double dmach_dist(const char *); extern void *superlu_malloc_dist (size_t); extern void superlu_free_dist (void*); extern int *int32Malloc_dist (int); diff --git a/SRC/prec-independent/dmach_dist.c b/SRC/prec-independent/dmach_dist.c index a4814855..332fee47 100755 --- a/SRC/prec-independent/dmach_dist.c +++ b/SRC/prec-independent/dmach_dist.c @@ -13,7 +13,7 @@ at the top-level directory. #include #include -double dmach_dist(char *cmach) +double dmach_dist(const char *cmach) { /* -- SuperLU auxiliary routine (version 5.0) -- This uses C99 standard constants, and is thread safe. diff --git a/SRC/prec-independent/smach_dist.c b/SRC/prec-independent/smach_dist.c index 394347e0..e480af4e 100755 --- a/SRC/prec-independent/smach_dist.c +++ b/SRC/prec-independent/smach_dist.c @@ -13,7 +13,7 @@ at the top-level directory. #include #include -float smach_dist(char *cmach) +float smach_dist(const char *cmach) { /* -- SuperLU auxiliary routine (version 5.0) -- This uses C99 standard constants, and is thread safe.