Home
libcudf
cucim
cudf-java
cudf
cugraph
cuml
cuproj
cusignal
cuspatial
cuxfilter
dask-cuda
dask-cudf
kvikio
libcudf
libcuml
libcuproj
libcuspatial
libkvikio
librmm
raft
rapids-cmake
rmm
legacy (23.08)
nightly (23.12)
stable (23.10)
legacy (23.08)
include
cudf
utilities
traits.cuh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021, NVIDIA CORPORATION.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#pragma once
18
19
#include <
cudf/types.hpp
>
20
#include <
cudf/utilities/type_dispatcher.hpp
>
21
22
#include <cuda/std/atomic>
23
24
namespace
cudf
{
25
39
template
<
typename
T>
40
constexpr
inline
bool
has_atomic_support
()
41
{
42
return
cuda::std::atomic<T>::is_always_lock_free;
43
}
44
45
struct
has_atomic_support_impl {
46
template
<
typename
T>
47
constexpr
bool
operator()()
48
{
49
return
has_atomic_support<T>();
50
}
51
};
52
60
constexpr
inline
bool
has_atomic_support
(
data_type
type)
61
{
62
return
cudf::type_dispatcher
(type, has_atomic_support_impl{});
63
}
64
67
}
// namespace cudf
types.hpp
Type declarations for libcudf.
cudf::type_dispatcher
CUDF_HOST_DEVICE constexpr decltype(auto) __forceinline__ type_dispatcher(cudf::data_type dtype, Functor f, Ts &&... args)
Invokes an operator() template with the type instantiation based on the specified cudf::data_type's i...
Definition:
type_dispatcher.hpp:442
cudf::data_type
Indicator for the logical data type of an element in a column.
Definition:
types.hpp:228
cudf
cuDF interfaces
Definition:
aggregation.hpp:34
type_dispatcher.hpp
Defines the mapping between cudf::type_id runtime type information and concrete C++ types.
cudf::has_atomic_support
constexpr bool has_atomic_support()
Indicates whether the type T has support for atomics.
Definition:
traits.cuh:40
Generated by
1.8.20