Skip to content

Commit cabe229

Browse files
authored
fix formatting and replace C-style comment with [[maybe_unused]]
1 parent 3e8dcfc commit cabe229

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/nvexec/maxwell/common.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class result_dumper_t {
366366
, accessor_(accessor) {
367367
}
368368

369-
void operator()(bool /* update_time */ = true) const {
369+
void operator()([[maybe_unused]] bool update_time = true) const {
370370
int rank_ = 0;
371371
const std::string filename = std::string("output_") + std::to_string(rank_) + "_"
372372
+ std::to_string(0) + ".vtk";

examples/nvexec/maxwell/stdpar.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <thrust/iterator/counting_iterator.h>
3333

3434
template <class Policy>
35-
auto is_gpu_policy([[maybe_unused]]Policy&& policy) -> bool {
35+
auto is_gpu_policy([[maybe_unused]] Policy&& policy) -> bool {
3636
#if defined(_NVHPC_CUDA) || defined(__CUDACC__)
3737
bool* flag{};
3838
STDEXEC_TRY_CUDA_API(cudaMallocHost(&flag, sizeof(bool)));

include/nvexec/detail/throw_on_cuda_error.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace nvexec::detail {
6565
}
6666

6767
[[nodiscard]]
68-
inline auto log_on_cuda_error(cudaError_t status, [[maybe_unused]]char const * const file_name, [[maybe_unused]]const int line) noexcept
68+
inline auto log_on_cuda_error(cudaError_t status, [[maybe_unused]] char const *const file_name, [[maybe_unused]] const int line) noexcept
6969
-> ::cudaError_t {
7070
// Clear the global CUDA error state which may have been set by the last
7171
// call. Otherwise, errors may "leak" to unrelated calls.

0 commit comments

Comments
 (0)