Skip to content

Commit a35207d

Browse files
Merge pull request #285 from chillenzer/update-pre-commit
Update pre commit
2 parents 47f00cb + 32284d8 commit a35207d

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ minimum_pre_commit_version: 3.2.0 # necessitated by Lucas-C's hooks
22
default_install_hook_types: [pre-commit, pre-push]
33
repos:
44
- repo: https://github.com/pre-commit/mirrors-clang-format
5-
rev: v18.1.8
5+
rev: v19.1.7
66
hooks:
77
- id: clang-format
88
files: \.(cpp|hpp)
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v4.5.0
10+
rev: v5.0.0
1111
hooks:
1212
- id: no-commit-to-branch
1313
args: [-b, dev]
@@ -21,7 +21,7 @@ repos:
2121
- id: check-executables-have-shebangs
2222
- id: check-shebang-scripts-are-executable
2323
- repo: https://github.com/Lucas-C/pre-commit-hooks
24-
rev: v1.5.4
24+
rev: v1.5.5
2525
hooks:
2626
- id: forbid-tabs
2727
- id: remove-tabs
@@ -31,7 +31,7 @@ repos:
3131
hooks:
3232
- id: check-useless-excludes
3333
- repo: https://github.com/google/yamlfmt
34-
rev: v0.13.0
34+
rev: v0.15.0
3535
hooks:
3636
- id: yamlfmt
3737
- repo: https://github.com/adrienverge/yamllint

include/mallocMC/creationPolicies/FlatterScatter/AccessBlock.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ namespace mallocMC::CreationPolicies::FlatterScatterAlloc
254254
auto const index = pageIndex(pointer);
255255
if(index >= static_cast<int32_t>(numPages()) || index < 0)
256256
{
257-
#if(!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
257+
#if (!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
258258
throw std::runtime_error{
259259
"Attempted to destroy an invalid pointer! Pointer does not point to any page."};
260260
#endif // NDEBUG
@@ -597,7 +597,8 @@ namespace mallocMC::CreationPolicies::FlatterScatterAlloc
597597
startIndex,
598598
numPages(),
599599
noFreePageFound(),
600-
[this, numBytes, &chunkSizeCache](auto const& localAcc, auto const index) {
600+
[this, numBytes, &chunkSizeCache](auto const& localAcc, auto const index)
601+
{
601602
return this->thisPageIsSuitable(localAcc, index, numBytes, chunkSizeCache) ? index
602603
: noFreePageFound();
603604
});

include/mallocMC/creationPolicies/FlatterScatter/PageInterpretation.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ namespace mallocMC::CreationPolicies::FlatterScatterAlloc
151151
{
152152
if(chunkSize == 0)
153153
{
154-
#if(!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
154+
#if (!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
155155
throw std::runtime_error{
156156
"Attempted to destroy a pointer with chunkSize==0. Likely this page was recently "
157157
"(and potentially pre-maturely) freed."};
158158
#endif // NDEBUG
159159
return;
160160
}
161161
auto chunkIndex = chunkNumberOf(pointer);
162-
#if(!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
162+
#if (!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
163163
if(not isValid(acc, chunkIndex))
164164
{
165165
throw std::runtime_error{"Attempted to destroy an invalid pointer! Either the pointer does not point "

include/mallocMC/distributionPolicies/XMallocSIMD.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace mallocMC
135135
// within one page necessary for offset calculation
136136
bool const coalescible = bytes > 0 && bytes < (pagesize / 32);
137137

138-
#if(MALLOCMC_DEVICE_COMPILE)
138+
#if (MALLOCMC_DEVICE_COMPILE)
139139
threadcount = alpaka::popcount(alpaka::warp::ballot(acc, coalescible));
140140
#else
141141
threadcount = 1; // TODO

include/mallocMC/mallocMC_utils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* only is used to detect the device compile path.
5151
* Since we require devices with support for ballot we can high-jack __HIP_ARCH_HAS_WARP_BALLOT__.
5252
*/
53-
#if(defined(__HIP_ARCH_HAS_WARP_BALLOT__) || defined(__CUDA_ARCH__) || __HIP_DEVICE_COMPILE__ == 1)
53+
#if (defined(__HIP_ARCH_HAS_WARP_BALLOT__) || defined(__CUDA_ARCH__) || __HIP_DEVICE_COMPILE__ == 1)
5454
# define MALLOCMC_DEVICE_COMPILE 1
5555
#endif
5656

@@ -66,7 +66,7 @@ namespace mallocMC
6666
#endif
6767

6868
#ifdef ALPAKA_ACC_GPU_HIP_ENABLED
69-
# if(HIP_VERSION_MAJOR >= 4)
69+
# if (HIP_VERSION_MAJOR >= 4)
7070
template<typename TDim, typename TIdx>
7171
constexpr uint32_t warpSize<alpaka::AccGpuHipRt<TDim, TIdx>> = __AMDGCN_WAVEFRONT_SIZE;
7272
# else

test/unit/source/AccessBlock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ TEMPLATE_LIST_TEST_CASE("AccessBlock", "", AccessBlocks)
295295
// the bit mask. Thus, the following test would corrupt the bit mask, if we were to allocate this in
296296
// chunked mode.
297297

298-
#if(!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
298+
#if (!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
299299
REQUIRE(sizeof(BitMaskStorageType<>) > 1U);
300300
auto localChunkSize = pageSize - 1U;
301301
auto slots = accessBlock.getAvailableSlots(accSerial, localChunkSize);
@@ -469,7 +469,7 @@ TEMPLATE_LIST_TEST_CASE("AccessBlock", "", AccessBlocks)
469469

470470
SECTION("no invalid pointer but throws instead.")
471471
{
472-
#if(!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
472+
#if (!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
473473
pointer = nullptr;
474474
CHECK_THROWS(
475475
accessBlock.destroy(accSerial, pointer),

test/unit/source/PageInterpretation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ TEST_CASE("PageInterpretation.destroy")
227227
PageInterpretation<pageSize> page{data, chunkSize};
228228
auto* pointer = page.create(accSerial);
229229

230-
#if(!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
230+
#if (!defined(NDEBUG) && !BOOST_LANG_CUDA && !BOOST_LANG_HIP)
231231
SECTION("throws if given an invalid pointer.")
232232
{
233233
pointer = nullptr;

0 commit comments

Comments
 (0)