From 89073765cf72f1aad5e95dd574ed65f48ef02063 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 8 Nov 2022 08:31:13 -0500 Subject: [PATCH] Correct style issues found by CI --- src/common/cuda_pinned_allocator.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/common/cuda_pinned_allocator.h b/src/common/cuda_pinned_allocator.h index dd34e8929937..d31a8267ffdc 100644 --- a/src/common/cuda_pinned_allocator.h +++ b/src/common/cuda_pinned_allocator.h @@ -66,8 +66,7 @@ class pinned_allocator { XGBOOST_DEVICE inline pointer address(reference r) { return &r; } XGBOOST_DEVICE inline const_pointer address(const_reference r) { return &r; } - inline pointer allocate(size_type cnt, const_pointer = 0) - { + inline pointer allocate(size_type cnt, const_pointer = 0) { if (cnt > this->max_size()) { throw std::bad_alloc(); } // end if pointer result(0); @@ -81,11 +80,10 @@ class pinned_allocator { XGBOOST_DEVICE inline bool operator==(pinned_allocator const& x) const { return true; } - XGBOOST_DEVICE inline bool operator!=(pinned_allocator const& x) const - { + XGBOOST_DEVICE inline bool operator!=(pinned_allocator const& x) const { return !operator==(x); } }; -} -} -} +} // namespace cuda +} // namespace common +} // namespace xgboost