Description
$ cat regression.c
#if defined(PETSC_HAVE_CUDA) || defined(PETSC_HAVE_KOKKOS) || defined(PETSC_HAVE_HIP)
/* Free memory and set ptr to NULL when succeeded */
#define PetscSFFree(sf, mtype, ptr) ((PetscErrorCode)((ptr) && ((*(sf)->ops->Free)(mtype, ptr) || ((ptr) = NULL, PETSC_SUCCESS))))
#else
/* If pure host code, do with less indirection */
#define PetscSFMalloc(sf, mtype, sz, ptr) PetscMalloc(sz, ptr)
#endif
$ clang-format --style=file:clang-format.txt regression.c
#if defined(PETSC_HAVE_CUDA) || defined(PETSC_HAVE_KOKKOS) || defined(PETSC_HAVE_HIP)
/* Free memory and set ptr to NULL when succeeded */
#define PetscSFFree(sf, mtype, ptr) ((PetscErrorCode)((ptr) && ((*(sf)->ops->Free)(mtype, ptr) || ((ptr) = NULL, PETSC_SUCCESS))))
#else
/* If pure host code, do with less indirection */
#define PetscSFMalloc(sf, mtype, sz, ptr) PetscMalloc(sz, ptr)
#endif
$ clang-format --version
clang-format version 17.0.5
Metadata
Metadata
Assignees
Type
Projects
Status
Done