提供用于 Google Test 类型参数化测试的集中式类型列表。更多...
#include <cudf_test/type_list_utilities.hpp>
#include <cudf/fixed_point/fixed_point.hpp>
#include <cudf/strings/string_view.hpp>
#include <cudf/types.hpp>
#include <cudf/utilities/export.hpp>
#include <cudf/utilities/traits.hpp>
#include <cudf/utilities/type_dispatcher.hpp>
#include <cudf/wrappers/durations.hpp>
#include <cudf/wrappers/timestamps.hpp>
#include <thrust/host_vector.h>
#include <array>
#include <tuple>
#include <type_traits>
命名空间 | |
cudf | |
cuDF 接口 | |
类型别名 | |
using | cudf::test::IntegralTypesNotBool = cudf::test::Types< int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t > |
所有非 bool 整型类型的类型列表。 | |
using | cudf::test::IntegralTypes = Concat< IntegralTypesNotBool, cudf::test::Types< bool > > |
所有整型类型的类型列表。 | |
using | cudf::test::FloatingPointTypes = cudf::test::Types< float, double > |
提供 libcudf 中支持的所有浮点类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::NumericTypes = Concat< IntegralTypes, FloatingPointTypes > |
提供 libcudf 中支持的所有数值类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::TimestampTypes = cudf::test::Types< timestamp_D, timestamp_s, timestamp_ms, timestamp_us, timestamp_ns > |
提供 libcudf 中支持的所有时间戳类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::DurationTypes = cudf::test::Types< duration_D, duration_s, duration_ms, duration_us, duration_ns > |
提供 libcudf 中支持的所有持续时间类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::ChronoTypes = Concat< TimestampTypes, DurationTypes > |
提供 libcudf 中支持的所有 chrono 类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::StringTypes = cudf::test::Types< string_view > |
提供 libcudf 中支持的所有字符串类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::ListTypes = cudf::test::Types< list_view > |
提供 libcudf 中支持的所有列表类型列表,用于 GTest 类型化测试。更多... | |
using | cudf::test::FixedPointTypes = cudf::test::Types< numeric::decimal32, numeric::decimal64, numeric::decimal128 > |
提供用于 GTest 类型化测试的所有定点元素类型列表。更多... | |
using | cudf::test::FixedWidthTypes = Concat< NumericTypes, ChronoTypes, FixedPointTypes > |
提供用于 GTest 类型化测试的所有固定宽度元素类型列表。更多... | |
using | cudf::test::FixedWidthTypesWithoutFixedPoint = Concat< NumericTypes, ChronoTypes > |
提供用于 GTest 类型化测试的所有固定宽度元素类型列表(定点类型除外)。更多... | |
using | cudf::test::FixedWidthTypesWithoutChrono = Concat< NumericTypes, FixedPointTypes > |
提供用于 GTest 类型化测试的所有固定宽度元素类型列表(chrono 类型除外)。更多... | |
using | cudf::test::ComparableTypes = Concat< NumericTypes, ChronoTypes, StringTypes > |
提供用于 GTest 类型化测试的所有可排序类型列表。更多... | |
using | cudf::test::CompoundTypes = cudf::test::Types< cudf::string_view, cudf::dictionary32, cudf::list_view, cudf::struct_view > |
提供用于 GTest 类型化测试的所有复合类型列表。更多... | |
using | cudf::test::AllTypes = Concat< NumericTypes, ChronoTypes, FixedPointTypes > |
提供 libcudf 中支持的所有类型列表,用于 GTest 类型化测试。更多... | |
函数 | |
template<typename TYPES > | |
constexpr auto | cudf::test::detail::types_to_ids () |
将 Types 类型列表转换为对应的每种类型的 cudf::type_id 的 std::array 。更多... | |
template<typename TypeParam , typename T > | |
std::enable_if_t< cudf::is_fixed_width< TypeParam >) &&!cudf::is_timestamp_t< TypeParam >::value, thrust::host_vector< TypeParam > > | cudf::test::make_type_param_vector (std::initializer_list< T > const &init_list) |
将类型 T 的数值转换为 TypeParam 类型的数值向量。更多... | |
template<typename TypeParam , typename T > | |
std::enable_if_t< cudf::is_timestamp_t< TypeParam >::value, thrust::host_vector< TypeParam > > | cudf::test::make_type_param_vector (std::initializer_list< T > const &init_list) |
将类型 T 的数值转换为时间戳向量。更多... | |
template<typename TypeParam , typename T > | |
std::enable_if_t< std::is_same_v< TypeParam, std::string >, thrust::host_vector< std::string > > | cudf::test::make_type_param_vector (std::initializer_list< T > const &init_list) |
将类型 T 的数值转换为 std::string 向量。更多... | |
template<typename TypeParam , typename T > | |
std::enable_if_t< cudf::is_fixed_width< TypeParam >) &&!cudf::is_timestamp_t< TypeParam >::value, TypeParam > | cudf::test::make_type_param_scalar (T const init_value) |
将类型 T 的数值转换为 TypeParam 类型的固定宽度类型。更多... | |
template<typename TypeParam , typename T > | |
std::enable_if_t< cudf::is_timestamp_t< TypeParam >::value, TypeParam > | cudf::test::make_type_param_scalar (T const init_value) |
将类型 T 的时间戳值转换为 TypeParam 类型的固定宽度类型。更多... | |
template<typename TypeParam , typename T > | |
std::enable_if_t< std::is_same_v< TypeParam, std::string >, TypeParam > | cudf::test::make_type_param_scalar (T const init_value) |
将类型 T 的数值转换为字符串类型。更多... | |
using cudf::test::AllTypes = typedef Concat<NumericTypes, ChronoTypes, FixedPointTypes> |
提供 libcudf 中支持的所有类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 371 行。
using cudf::test::ChronoTypes = typedef Concat<TimestampTypes, DurationTypes> |
提供 libcudf 中支持的所有 chrono 类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 256 行。
using cudf::test::ComparableTypes = typedef Concat<NumericTypes, ChronoTypes, StringTypes> |
提供用于 GTest 类型化测试的所有可排序类型列表。
示例
定义于文件 type_lists.hpp 的 344 行。
using cudf::test::CompoundTypes = typedef cudf::test::Types<cudf::string_view, cudf::dictionary32, cudf::list_view, cudf::struct_view> |
提供用于 GTest 类型化测试的所有复合类型列表。
示例
定义于文件 type_lists.hpp 的 355 行。
using cudf::test::DurationTypes = typedef cudf::test::Types<duration_D, duration_s, duration_ms, duration_us, duration_ns> |
提供 libcudf 中支持的所有持续时间类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 244 行。
using cudf::test::FixedPointTypes = typedef cudf::test::Types<numeric::decimal32, numeric::decimal64, numeric::decimal128> |
提供用于 GTest 类型化测试的所有定点元素类型列表。
示例
定义于文件 type_lists.hpp 的 292 行。
using cudf::test::FixedWidthTypes = typedef Concat<NumericTypes, ChronoTypes, FixedPointTypes> |
提供用于 GTest 类型化测试的所有固定宽度元素类型列表。
示例
定义于文件 type_lists.hpp 的 305 行。
using cudf::test::FixedWidthTypesWithoutChrono = typedef Concat<NumericTypes, FixedPointTypes> |
提供用于 GTest 类型化测试的所有固定宽度元素类型列表(chrono 类型除外)。
示例
定义于文件 type_lists.hpp 的 333 行。
using cudf::test::FixedWidthTypesWithoutFixedPoint = typedef Concat<NumericTypes, ChronoTypes> |
提供用于 GTest 类型化测试的所有固定宽度元素类型列表(定点类型除外)。
为固定宽度类型编写的某些测试不适用于定点类型,因为定点类型无法直接由其他固定宽度类型构造,需要指定刻度。
示例
定义于文件 type_lists.hpp 的 321 行。
using cudf::test::FloatingPointTypes = typedef cudf::test::Types<float, double> |
提供 libcudf 中支持的所有浮点类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 207 行。
using cudf::test::ListTypes = typedef cudf::test::Types<list_view> |
提供 libcudf 中支持的所有列表类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 280 行。
using cudf::test::NumericTypes = typedef Concat<IntegralTypes, FloatingPointTypes> |
提供 libcudf 中支持的所有数值类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 219 行。
using cudf::test::StringTypes = typedef cudf::test::Types<string_view> |
提供 libcudf 中支持的所有字符串类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 268 行。
using cudf::test::TimestampTypes = typedef cudf::test::Types<timestamp_D, timestamp_s, timestamp_ms, timestamp_us, timestamp_ns> |
提供 libcudf 中支持的所有时间戳类型列表,用于 GTest 类型化测试。
示例
定义于文件 type_lists.hpp 的 231 行。
std::enable_if_t<cudf::is_fixed_width<TypeParam>) && !cudf::is_timestamp_t<TypeParam>::value, TypeParam> cudf::test::make_type_param_scalar | ( | T const | init_value | ) |
将类型 T 的数值转换为 TypeParam 类型的固定宽度类型。
此函数是必需的,因为某些类型(例如时间戳类型)无法直接由数值类型构造。此函数作为一种便捷方式,允许从数值隐式构造此类对象。
init_value | 用于初始化固定宽度类型的值 |
定义于文件 type_lists.hpp 的 148 行。
std::enable_if_t<cudf::is_timestamp_t<TypeParam>::value, TypeParam> cudf::test::make_type_param_scalar | ( | T const | init_value | ) |
将类型 T 的时间戳值转换为 TypeParam 类型的固定宽度类型。
此函数是必需的,因为某些类型(例如时间戳类型)无法直接由时间戳类型构造。此函数作为一种便捷方式,允许从时间戳值隐式构造此类对象。
init_value | 用于初始化固定宽度类型的值 |
定义于文件 type_lists.hpp 的 165 行。
std::enable_if_t<std::is_same_v<TypeParam, std::string>, TypeParam> cudf::test::make_type_param_scalar | ( | T const | init_value | ) |
将类型 T 的数值转换为字符串类型。
此函数将类型 T 的数值转换为其字符串表示形式。
init_value | 要转换为字符串的值 |
定义于文件 type_lists.hpp 的 180 行。
std::enable_if_t<cudf::is_fixed_width<TypeParam>) && !cudf::is_timestamp_t<TypeParam>::value, thrust::host_vector<TypeParam> > cudf::test::make_type_param_vector | ( | std::initializer_list< T > const & | init_list | ) |
将类型 T 的数值转换为 TypeParam 类型的数值向量。
如果输出类型为无符号类型,这也将负值转换为正值。
init_list | 用于创建输出向量的值 |
定义于文件 type_lists.hpp 的 87 行。
std::enable_if_t<cudf::is_timestamp_t<TypeParam>::value, thrust::host_vector<TypeParam> > cudf::test::make_type_param_vector | ( | std::initializer_list< T > const & | init_list | ) |
std::enable_if_t<std::is_same_v<TypeParam, std::string>, thrust::host_vector<std::string> > cudf::test::make_type_param_vector | ( | std::initializer_list< T > const & | init_list | ) |
将类型 T 的数值转换为 std::string 向量。
init_list | 用于创建输出向量的值 |
定义于文件 type_lists.hpp 的 125 行。
|
constexpr |
将 Types
类型列表转换为对应的每种类型的 cudf::type_id
的 std::array
。
示例
TYPES | 要转换为 type_id 的类型列表 |
TYPES
中每种类型的 type_id
的 std::array
定义于文件 type_lists.hpp 的 68 行。