Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
raft_proto Namespace Reference

Namespaces

 detail
 

Classes

struct  buffer
 A container which may or may not own its own data on host or device. More...
 
struct  bad_cuda_call
 
struct  out_of_bounds
 
struct  wrong_device_type
 
struct  mem_type_mismatch
 
struct  wrong_device
 
struct  gpu_unsupported
 
struct  handle_t
 

Typedefs

using cuda_stream = int
 
template<typename T , typename U , typename V = void>
using const_agnostic_same_t = std::enable_if_t< std::is_same_v< std::remove_const_t< T >, std::remove_const_t< U > >, V >
 
template<typename T , bool host = !GPU_COMPILATION>
using host_only_throw = detail::host_only_throw< T, host >
 
template<device_type D, typename T >
using non_owning_buffer = detail::non_owning_buffer< D, T >
 
template<device_type D, typename T >
using owning_buffer = detail::owning_buffer< D, T >
 
template<device_type D>
using device_id = detail::device_id< D >
 
using device_id_variant = std::variant< device_id< device_type::cpu >, device_id< device_type::gpu > >
 
using device_setter = detail::device_setter< device_type::gpu >
 

Enumerations

enum class  device_type { cpu , gpu }
 

Functions

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &dst, buffer< U > const &src, typename buffer< T >::index_type dst_offset, typename buffer< U >::index_type src_offset, typename buffer< T >::index_type size, cuda_stream stream)
 
template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &dst, buffer< U > const &src, cuda_stream stream)
 
template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &dst, buffer< U > const &src)
 
template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &&dst, buffer< U > &&src, typename buffer< T >::index_type dst_offset, typename buffer< U >::index_type src_offset, typename buffer< T >::index_type size, cuda_stream stream)
 
template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &&dst, buffer< U > &&src, typename buffer< T >::index_type dst_offset, cuda_stream stream)
 
template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &&dst, buffer< U > &&src, cuda_stream stream)
 
template<bool bounds_check, typename T , typename U >
const_agnostic_same_t< T, U > copy (buffer< T > &&dst, buffer< U > &&src)
 
template<typename T , typename U >
HOST DEVICE constexpr auto ceildiv (T dividend, U divisor)
 
template<typename error_t >
void cuda_check (error_t const &err) noexcept(!GPU_ENABLED)
 
void synchronize (cuda_stream stream)
 
template<device_type dst_type, device_type src_type, typename T >
void copy (T *dst, T const *src, uint32_t size, uint32_t dst_offset, uint32_t src_offset)
 
template<device_type dst_type, device_type src_type, typename T >
void copy (T *dst, T const *src, uint32_t size, uint32_t dst_offset, uint32_t src_offset, cuda_stream stream)
 
template<device_type dst_type, device_type src_type, typename T >
void copy (T *dst, T const *src, uint32_t size)
 
template<device_type dst_type, device_type src_type, typename T >
void copy (T *dst, T const *src, uint32_t size, cuda_stream stream)
 
template<typename T >
void copy (T *dst, T const *src, uint32_t size, device_type dst_type, device_type src_type, uint32_t dst_offset, uint32_t src_offset, cuda_stream stream)
 
template<typename T >
void copy (T *dst, T const *src, uint32_t size, device_type dst_type, device_type src_type)
 
template<typename T >
void copy (T *dst, T const *src, uint32_t size, device_type dst_type, device_type src_type, cuda_stream stream)
 
template<typename T , typename U >
HOST DEVICE auto padding_size (T val, U alignment)
 
template<typename T , typename U >
HOST DEVICE auto padded_size (T val, U alignment)
 
template<typename T , typename U >
HOST DEVICE auto downpadding_size (T val, U alignment)
 
template<typename T , typename U >
HOST DEVICE auto downpadded_size (T val, U alignment)
 

Variables

template<typename T , typename U >
constexpr auto const_agnostic_same_v
 

Typedef Documentation

◆ const_agnostic_same_t

template<typename T , typename U , typename V = void>
using raft_proto::const_agnostic_same_t = typedef std::enable_if_t<std::is_same_v<std::remove_const_t<T>, std::remove_const_t<U> >, V>

◆ cuda_stream

using raft_proto::cuda_stream = typedef int

◆ device_id

template<device_type D>
using raft_proto::device_id = typedef detail::device_id<D>

◆ device_id_variant

◆ device_setter

◆ host_only_throw

template<typename T , bool host = !GPU_COMPILATION>
using raft_proto::host_only_throw = typedef detail::host_only_throw<T, host>

◆ non_owning_buffer

template<device_type D, typename T >
using raft_proto::non_owning_buffer = typedef detail::non_owning_buffer<D, T>

◆ owning_buffer

template<device_type D, typename T >
using raft_proto::owning_buffer = typedef detail::owning_buffer<D, T>

Enumeration Type Documentation

◆ device_type

Enumerator
cpu 
gpu 

Function Documentation

◆ ceildiv()

template<typename T , typename U >
HOST DEVICE constexpr auto raft_proto::ceildiv ( dividend,
divisor 
)
constexpr

◆ copy() [1/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &&  dst,
buffer< U > &&  src 
)

◆ copy() [2/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &&  dst,
buffer< U > &&  src,
cuda_stream  stream 
)

◆ copy() [3/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &&  dst,
buffer< U > &&  src,
typename buffer< T >::index_type  dst_offset,
cuda_stream  stream 
)

◆ copy() [4/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &&  dst,
buffer< U > &&  src,
typename buffer< T >::index_type  dst_offset,
typename buffer< U >::index_type  src_offset,
typename buffer< T >::index_type  size,
cuda_stream  stream 
)

◆ copy() [5/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &  dst,
buffer< U > const &  src 
)

◆ copy() [6/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &  dst,
buffer< U > const &  src,
cuda_stream  stream 
)

◆ copy() [7/14]

template<bool bounds_check, typename T , typename U >
const_agnostic_same_t<T, U> raft_proto::copy ( buffer< T > &  dst,
buffer< U > const &  src,
typename buffer< T >::index_type  dst_offset,
typename buffer< U >::index_type  src_offset,
typename buffer< T >::index_type  size,
cuda_stream  stream 
)

◆ copy() [8/14]

template<device_type dst_type, device_type src_type, typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size 
)

◆ copy() [9/14]

template<device_type dst_type, device_type src_type, typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size,
cuda_stream  stream 
)

◆ copy() [10/14]

template<typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size,
device_type  dst_type,
device_type  src_type 
)

◆ copy() [11/14]

template<typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size,
device_type  dst_type,
device_type  src_type,
cuda_stream  stream 
)

◆ copy() [12/14]

template<typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size,
device_type  dst_type,
device_type  src_type,
uint32_t  dst_offset,
uint32_t  src_offset,
cuda_stream  stream 
)

◆ copy() [13/14]

template<device_type dst_type, device_type src_type, typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size,
uint32_t  dst_offset,
uint32_t  src_offset 
)

◆ copy() [14/14]

template<device_type dst_type, device_type src_type, typename T >
void raft_proto::copy ( T *  dst,
T const *  src,
uint32_t  size,
uint32_t  dst_offset,
uint32_t  src_offset,
cuda_stream  stream 
)

◆ cuda_check()

template<typename error_t >
void raft_proto::cuda_check ( error_t const &  err)
noexcept

◆ downpadded_size()

template<typename T , typename U >
HOST DEVICE auto raft_proto::downpadded_size ( val,
alignment 
)

◆ downpadding_size()

template<typename T , typename U >
HOST DEVICE auto raft_proto::downpadding_size ( val,
alignment 
)

◆ padded_size()

template<typename T , typename U >
HOST DEVICE auto raft_proto::padded_size ( val,
alignment 
)

◆ padding_size()

template<typename T , typename U >
HOST DEVICE auto raft_proto::padding_size ( val,
alignment 
)

◆ synchronize()

void raft_proto::synchronize ( cuda_stream  stream)
inline

Variable Documentation

◆ const_agnostic_same_v

template<typename T , typename U >
constexpr auto raft_proto::const_agnostic_same_v
inlineconstexpr
Initial value:
=
std::is_same_v<std::remove_const_t<T>, std::remove_const_t<U>>