Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosborn committed Nov 30, 2023
1 parent 13075c7 commit fc3ea42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions include/tunable_block_reduction.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ namespace quda
// we can advance spin/block-color since this is valid
if (param.block.z < vector_length_z && param.block.z < device::max_threads_per_block_dim(2)
&& param.block.x * param.block.y * (param.block.z + step_z) <= device::max_threads_per_block()
&& ((param.block.z + step_z) <= max_block_z)
&& shared_bytes <= this->maxSharedBytesPerBlock()) {
&& ((param.block.z + step_z) <= max_block_z) && shared_bytes <= this->maxSharedBytesPerBlock()) {
param.block.z += step_z;
param.grid.z = (vector_length_z + param.block.z - 1) / param.block.z;
param.shared_bytes = shared_bytes;
Expand Down
3 changes: 1 addition & 2 deletions include/tunable_reduction.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ namespace quda

if (param.block.z < n_batch && param.block.z < device::max_threads_per_block_dim(2)
&& param.block.x * param.block.y * (param.block.z + 1) <= device::max_threads_per_block()
&& param.block.z < n_batch_block_max
&& shared_bytes <= this->maxSharedBytesPerBlock()) {
&& param.block.z < n_batch_block_max && shared_bytes <= this->maxSharedBytesPerBlock()) {
param.block.z++;
param.grid.z = (n_batch + param.block.z - 1) / param.block.z;
param.shared_bytes = shared_bytes;
Expand Down
9 changes: 5 additions & 4 deletions include/tune_quda.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,17 @@ namespace quda {
* @brief self-consistency check that the shared memory is set
* correctly (e.g., check that block size has been correctly
* factored in when set setting shared_bytes)
*/
void checkSharedBytes(const TuneParam &tp) const {
*/
void checkSharedBytes(const TuneParam &tp) const
{
auto tp2 = TuneParam(tp);
auto expected = setSharedBytes(tp2);
if (tp.shared_bytes < expected)
errorQuda("Shared bytes %u insufficient (expected %u)", tp.shared_bytes, expected);

if (sharedBytesPerThread() && sharedBytesPerBlock(tp))
errorQuda("Not supported: non-zero shared bytes per thread (%u) and per block (%u)",
sharedBytesPerThread(), sharedBytesPerBlock(tp));
errorQuda("Not supported: non-zero shared bytes per thread (%u) and per block (%u)", sharedBytesPerThread(),
sharedBytesPerBlock(tp));
}

/**
Expand Down

0 comments on commit fc3ea42

Please sign in to comment.