Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CommentPragmas: '(IWYU pragma:|SPDX-)'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Kept the below 2 to be the same as `IndentWidth` to keep everything uniform
Expand Down Expand Up @@ -159,7 +159,7 @@ SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++17
Standard: c++20
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
Expand Down
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ set_target_properties(
rmm
PROPERTIES BUILD_RPATH "\$ORIGIN"
INSTALL_RPATH "\$ORIGIN"
CXX_STANDARD 17
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
CXX_VISIBILITY_PRESET hidden
POSITION_INDEPENDENT_CODE ON
Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ rapids_cmake_build_type("Release")
# Configure your project here
add_executable(basic_example src/basic.cpp)
target_link_libraries(basic_example PRIVATE rmm::rmm)
target_compile_features(basic_example PRIVATE cxx_std_17)
target_compile_features(basic_example PRIVATE cxx_std_20)

install(TARGETS basic_example DESTINATION bin/examples/librmm)
9 changes: 6 additions & 3 deletions cpp/tests/device_scalar_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,25 @@ struct DeviceScalarTest : public ::testing::Test {
DeviceScalarTest() : value{random_value()} {}

template <typename U = T>
requires std::is_same_v<U, bool> U random_value()
requires std::is_same_v<U, bool>
U random_value()
{
static std::bernoulli_distribution distribution{};
return distribution(generator);
}

template <typename U = T>
requires(std::is_integral_v<U> && not std::is_same_v<U, bool>) U random_value()
requires(std::is_integral_v<U> && not std::is_same_v<U, bool>)
U random_value()
{
static std::uniform_int_distribution<U> distribution{std::numeric_limits<T>::lowest(),
std::numeric_limits<T>::max()};
return distribution(generator);
}

template <typename U = T>
requires std::is_floating_point_v<U> U random_value()
requires std::is_floating_point_v<U>
U random_value()
{
auto const mean{100};
auto const stddev{20};
Expand Down
Loading