-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark some constexpr functions as CUDF_HOST_DEVICE that are needed in …
…device code.
- Loading branch information
Showing
32 changed files
with
308 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Copyright 2019 BlazingDB, Inc. | ||
* Copyright 2019 Eyal Rozenberg <[email protected]> | ||
* Copyright (c) 2020-2023, NVIDIA CORPORATION. | ||
* Copyright (c) 2020-2024, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -86,7 +86,7 @@ constexpr S round_down_safe(S number_to_round, S modulus) noexcept | |
* `modulus` is positive and does not check for overflow. | ||
*/ | ||
template <typename S> | ||
constexpr S round_up_unsafe(S number_to_round, S modulus) noexcept | ||
CUDF_HOST_DEVICE constexpr S round_up_unsafe(S number_to_round, S modulus) noexcept | ||
{ | ||
auto remainder = number_to_round % modulus; | ||
if (remainder == 0) { return number_to_round; } | ||
|
@@ -183,7 +183,7 @@ constexpr bool is_a_power_of_two(I val) noexcept | |
* @return Absolute value if value type is signed. | ||
*/ | ||
template <typename T> | ||
constexpr auto absolute_value(T value) -> T | ||
CUDF_HOST_DEVICE constexpr auto absolute_value(T value) -> T | ||
{ | ||
if constexpr (cuda::std::is_signed<T>()) return numeric::detail::abs(value); | ||
return value; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.