公共类型 | 公共成员函数 | 所有成员列表
cudf::timestamp_scalar< T > 类模板参考

一个表示设备内存中时间戳值的拥有类。 更多...

#include <scalar.hpp>

cudf::timestamp_scalar< T > 的继承图
cudf::chrono_scalar< T > cudf::detail::fixed_width_scalar< T > cudf::scalar

公共类型

using rep_type = typename T::rep
 时间戳的底层表示类型。
 
- 继承自 cudf::detail::fixed_width_scalar< T > 的公共类型
using value_type = T
 scalar 持有的值的类型。
 

公共成员函数

 timestamp_scalar (timestamp_scalar &&other)=default
 timestamp_scalar 的移动构造函数。 更多...
 
 timestamp_scalar (timestamp_scalar const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 通过深度复制另一个对象构造新的 timestamp scalar 对象。
 
template<typename Duration2 >
 timestamp_scalar (Duration2 const &value, bool is_valid, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 从可转换为 T::duration 的 duration 构造新的 timestamp scalar 对象。 更多...
 
rep_type ticks_since_epoch (rmm::cuda_stream_view stream)
 返回自 UNIX 纪元以来的 duration(以 tick 数表示)。 更多...
 
- 继承自 cudf::chrono_scalar< T > 的公共成员函数
 chrono_scalar (chrono_scalar &&other)=default
 chrono_scalar 的移动构造函数。 更多...
 
chrono_scalaroperator= (chrono_scalar const &other)=delete
 
chrono_scalaroperator= (chrono_scalar &&other)=delete
 
 chrono_scalar (chrono_scalar const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 通过深度复制另一个对象构造新的 chrono scalar 对象。 更多...
 
 chrono_scalar (T value, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 构造新的 chrono scalar 对象。 更多...
 
 chrono_scalar (rmm::device_scalar< T > &&data, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 从现有设备内存构造新的 chrono scalar 对象。 更多...
 
- 继承自 cudf::detail::fixed_width_scalar< T > 的公共成员函数
 fixed_width_scalar (fixed_width_scalar &&other)=default
 fixed_width_scalar 的移动构造函数。 更多...
 
fixed_width_scalaroperator= (fixed_width_scalar const &other)=delete
 
fixed_width_scalaroperator= (fixed_width_scalar &&other)=delete
 
 fixed_width_scalar (fixed_width_scalar const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 通过深度复制另一个对象构造新的固定宽度 scalar 对象。 更多...
 
void set_value (T value, rmm::cuda_stream_view stream=cudf::get_default_stream())
 设置 scalar 的值。 更多...
 
value (rmm::cuda_stream_view stream=cudf::get_default_stream()) const
 获取 scalar 的值。 更多...
 
T * data ()
 返回设备内存中值的原始指针。 更多...
 
T const * data () const
 返回设备内存中值的 const 原始指针。 更多...
 
- 继承自 cudf::scalar 的公共成员函数
scalaroperator= (scalar const &other)=delete
 
scalaroperator= (scalar &&other)=delete
 
data_type type () const noexcept
 返回 scalar 的逻辑值类型。 更多...
 
void set_valid_async (bool is_valid, rmm::cuda_stream_view stream=cudf::get_default_stream())
 更新值的有效性。 更多...
 
bool is_valid (rmm::cuda_stream_view stream=cudf::get_default_stream()) const
 指示 scalar 是否包含有效值。 更多...
 
bool * validity_data ()
 返回设备内存中 validity bool 的原始指针。 更多...
 
bool const * validity_data () const
 返回设备内存中 validity bool 的 const 原始指针。 更多...
 

附加继承成员

- 继承自 cudf::detail::fixed_width_scalar< T > 的保护成员函数
 fixed_width_scalar (T value, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 构造新的固定宽度 scalar 对象。 更多...
 
 fixed_width_scalar (rmm::device_scalar< T > &&data, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 从现有设备内存构造新的固定宽度 scalar 对象。 更多...
 
- 继承自 cudf::scalar 的保护成员函数
 scalar (scalar &&other)=default
 scalar 的移动构造函数。 更多...
 
 scalar (scalar const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 通过深度复制另一个对象构造新的 scalar 对象。 更多...
 
 scalar (data_type type, bool is_valid=false, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 构造新的 scalar 对象。 更多...
 
- 继承自 cudf::detail::fixed_width_scalar< T > 的保护属性
rmm::device_scalar< T > _data
 包含值的设备内存
 
- 继承自 cudf::scalar 的保护属性
data_type _type {type_id::EMPTY}
 scalar 中值的逻辑类型。
 
cudf::detail::device_scalar< bool > _is_valid
 表示有效性的设备 bool 值。
 

详细描述

template<typename T>
class cudf::timestamp_scalar< T >

一个表示设备内存中时间戳值的拥有类。

模板参数
T时间戳值的数据类型。
另请参阅
cudf/wrappers/timestamps.hpp,其中列出了允许的类型。

定义于文件 scalar.hpp 的第 611 行。

构造函数和析构函数文档

◆ timestamp_scalar() [1/3]

template<typename T >
cudf::timestamp_scalar< T >::timestamp_scalar ( timestamp_scalar< T > &&  other)
default

timestamp_scalar 的移动构造函数。

参数
other要从中移动的另一个 timestamp_scalar

◆ timestamp_scalar() [2/3]

通过深度复制另一个对象构造新的 timestamp scalar 对象。

参数
other要复制的 scalar。
stream用于设备内存操作的 CUDA 流。
mr用于设备内存分配的设备内存资源。

◆ timestamp_scalar() [3/3]

template<typename T >
template<typename Duration2 >
cudf::timestamp_scalar< T >::timestamp_scalar ( Duration2 const &  value,
bool  is_valid,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

从可转换为 T::duration 的 duration 构造新的 timestamp scalar 对象。

参数
value表示自 UNIX 纪元以来 tick 数的 duration,或另一个可转换为时间戳 duration 的 duration。
is_validscalar 持有的值是否有效。
stream用于设备内存操作的 CUDA 流。
mr用于设备内存分配的设备内存资源。

成员函数文档

◆ ticks_since_epoch()

template<typename T >
rep_type cudf::timestamp_scalar< T >::ticks_since_epoch ( rmm::cuda_stream_view  stream)

返回自 UNIX 纪元以来的 duration(以 tick 数表示)。

参数
stream用于设备内存操作的 CUDA 流。
返回值
自 UNIX 纪元以来的 duration(以 tick 数表示)

本类的文档生成自以下文件