Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
exclude: ^source/3rdparty
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.7
rev: v0.6.8
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -52,10 +52,10 @@ repos:
- id: blacken-docs
# C++
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v19.1.0
hooks:
- id: clang-format
exclude: ^source/3rdparty|source/lib/src/gpu/cudart/.+\.inc
exclude: ^(source/3rdparty|source/lib/src/gpu/cudart/.+\.inc|.+\.ipynb$)
# markdown, yaml, CSS, javascript
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
Expand Down Expand Up @@ -146,7 +146,7 @@ repos:
exclude: .pre-commit-config.yaml|source/lmp
# customized pylint rules
- repo: https://github.com/pylint-dev/pylint/
rev: v3.3.0
rev: v3.3.1
hooks:
- id: pylint
entry: env PYTHONPATH=source/checker pylint
Expand Down
12 changes: 8 additions & 4 deletions source/lib/include/gpu_cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#define gpuMemset cudaMemset

#define GPU_MAX_NBOR_SIZE 4096
#define DPErrcheck(res) \
{ DPAssert((res), __FILE__, __LINE__); }
#define DPErrcheck(res) \
{ \
DPAssert((res), __FILE__, __LINE__); \
}
inline void DPAssert(cudaError_t code,
const char *file,
int line,
Expand Down Expand Up @@ -54,8 +56,10 @@ inline void DPAssert(cudaError_t code,
}
}

#define nborErrcheck(res) \
{ nborAssert((res), __FILE__, __LINE__); }
#define nborErrcheck(res) \
{ \
nborAssert((res), __FILE__, __LINE__); \
}
inline void nborAssert(cudaError_t code,
const char *file,
int line,
Expand Down
12 changes: 8 additions & 4 deletions source/lib/include/gpu_rocm.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#define gpuMemcpyDeviceToDevice hipMemcpyDeviceToDevice
#define gpuMemset hipMemset

#define DPErrcheck(res) \
{ DPAssert((res), __FILE__, __LINE__); }
#define DPErrcheck(res) \
{ \
DPAssert((res), __FILE__, __LINE__); \
}
inline void DPAssert(hipError_t code,
const char *file,
int line,
Expand All @@ -39,8 +41,10 @@ inline void DPAssert(hipError_t code,
}
}

#define nborErrcheck(res) \
{ nborAssert((res), __FILE__, __LINE__); }
#define nborErrcheck(res) \
{ \
nborAssert((res), __FILE__, __LINE__); \
}
inline void nborAssert(hipError_t code,
const char *file,
int line,
Expand Down