diff --git a/.clang-tidy b/.clang-tidy index 4857520..7d1b112 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -19,7 +19,6 @@ Checks: > clang-diagnostics-*, concurrency-*, - -concurrency-mt-unsafe, cppcoreguidelines-*, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, @@ -41,12 +40,10 @@ Checks: > readability-*, readability-identifier-naming, - -readability-function-cognitive-complexity, -readability-identifier-length, -*-avoid-c-arrays, -*-magic-numbers, - -*-no-malloc, -*-vararg, WarningsAsErrors: "*" @@ -56,6 +53,10 @@ CheckOptions: value: 4 - key: cppcoreguidelines-avoid-do-while.IgnoreMacros value: true + - key: readability-function-cognitive-complexity.DescribeBasicIncrements + value: false + - key: readability-function-cognitive-complexity.Threshold + value: 132 - key: readability-identifier-naming.ClassCase value: CamelCase - key: readability-identifier-naming.PrivateMemberPrefix diff --git a/src/cpp/pffdtd/engine_sycl_3d.cpp b/src/cpp/pffdtd/engine_sycl_3d.cpp index 48a489b..292d5ba 100644 --- a/src/cpp/pffdtd/engine_sycl_3d.cpp +++ b/src/cpp/pffdtd/engine_sycl_3d.cpp @@ -148,7 +148,7 @@ auto run(Simulation3D const& sim) -> void { auto gh1 = sycl::accessor{gh1_buf, cgh, sycl::read_write}; auto vh1 = sycl::accessor{vh1_buf, cgh, sycl::read_write}; cgh.parallel_for>(Nbl, [=](sycl::id<1> id) { - auto nb = id[0]; + auto nb = static_cast(id[0]); Real _1 = 1.0; Real _2 = 2.0; int32_t const k = mat_bnl[nb]; diff --git a/src/cpp/pffdtd/utility.hpp b/src/cpp/pffdtd/utility.hpp index b30e625..525b79e 100644 --- a/src/cpp/pffdtd/utility.hpp +++ b/src/cpp/pffdtd/utility.hpp @@ -23,7 +23,7 @@ template auto* const ptr = new T[count]; auto const bytes = static_cast(count) * sizeof(T); std::memset(static_cast(ptr), 0, bytes); - return reinterpret_cast(ptr); + return ptr; } template