Skip to content

Commit

Permalink
File: SRC/TRF3dV100/schurCompUpdate_impl.cuh
Browse files Browse the repository at this point in the history
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)`.
  • Loading branch information
piyush314 committed Dec 15, 2023
1 parent 5bcbce9 commit 4009b43
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions SRC/TRF3dV100/schurCompUpdate_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ __device__ int_t xlpanelGPU_t<Ftype>::find(int_t k)
{
int threadId = threadIdx.x;
__shared__ int idx;
// __shared__ int found;
__shared__ int found;
if (!threadId)
{
idx = -1;
Expand Down Expand Up @@ -119,7 +119,7 @@ __device__ int_t xupanelGPU_t<Ftype>::find(int_t k)
{
int threadId = threadIdx.x;
__shared__ int idx;
// __shared__ int found;
__shared__ int found;
if (!threadId)
{
idx = -1;
Expand Down
4 changes: 2 additions & 2 deletions SRC/include/superlu_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion SRC/prec-independent/dmach_dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ at the top-level directory.
#include <stdio.h>
#include <string.h>

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.
Expand Down
2 changes: 1 addition & 1 deletion SRC/prec-independent/smach_dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ at the top-level directory.
#include <stdio.h>
#include <string.h>

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.
Expand Down

0 comments on commit 4009b43

Please sign in to comment.