xpu
device.h File Reference

Device-side API. More...

Go to the source code of this file.

Classes

struct  xpu::device_image
 
struct  xpu::block_size< X, Y, Z >
 
struct  xpu::no_smem
 
struct  xpu::openmp_settings< Schedule, ChunkSize >
 OpenMP settings for kernels. More...
 
class  xpu::tpos
 
class  xpu::cmem< Constants >
 
struct  xpu::kernel< Image >
 
struct  xpu::function< Image >
 
struct  xpu::constant< Image, Data >
 
class  xpu::kernel_context< SharedMemory, Constants >
 
class  xpu::view< T >
 
class  xpu::block_scan< T, BlockSize, Impl >
 Parallel scan inside a block. More...
 
struct  xpu::block_scan< T, BlockSize, Impl >::storage_t
 Temporary storage for the block scan. Should be allocated in shared memory. More...
 
class  xpu::block_reduce< T, BlockSize, Impl >
 
struct  xpu::block_reduce< T, BlockSize, Impl >::storage_t
 
class  xpu::block_sort< Key, KeyValueType, BlockSize, ItemsPerThread, Impl >
 
struct  xpu::block_sort< Key, KeyValueType, BlockSize, ItemsPerThread, Impl >::storage_t
 
class  xpu::block_merge< Key, BlockSize, ItemsPerThread, Impl >
 
struct  xpu::block_merge< Key, BlockSize, ItemsPerThread, Impl >::storage_t
 

Namespaces

 xpu
 xpu default namespace.
 

Macros

#define XPU_IMAGE(image)   XPU_DETAIL_IMAGE(image)
 
#define XPU_EXPORT(obj)   XPU_DETAIL_EXPORT(obj)
 
#define XPU_ASSERT(x)   XPU_DETAIL_ASSERT(x)
 

Enumerations

enum  xpu::schedule_t { xpu::schedule_static , xpu::schedule_dynamic }
 OpenMP schedule types. Used for specifying the schedule type for kernels. More...
 

Functions

constexpr XPU_D float xpu::pi ()
 
constexpr XPU_D float xpu::pi_2 ()
 
constexpr XPU_D float xpu::pi_4 ()
 
constexpr XPU_D float xpu::deg_to_rad ()
 
constexpr XPU_D float xpu::sqrt2 ()
 
XPU_D int xpu::abs (int x)
 
XPU_D float xpu::abs (float x)
 
XPU_D float xpu::acos (float x)
 
XPU_D float xpu::acosh (float x)
 
XPU_D float xpu::acospi (float x)
 
XPU_D float xpu::asin (float x)
 
XPU_D float xpu::asinh (float x)
 
XPU_D float xpu::asinpi (float x)
 
XPU_D float xpu::atan (float x)
 
XPU_D float xpu::atan2 (float y, float x)
 
XPU_D float xpu::atanh (float x)
 
XPU_D float xpu::atanpi (float x)
 
XPU_D float xpu::atan2pi (float y, float x)
 
XPU_D float xpu::cbrt (float x)
 
XPU_D float xpu::ceil (float x)
 
XPU_D float xpu::copysign (float x, float y)
 
XPU_D float xpu::cos (float x)
 
XPU_D float xpu::cosh (float x)
 
XPU_D float xpu::cospi (float x)
 
XPU_D float xpu::erf (float x)
 
XPU_D float xpu::erfc (float x)
 
XPU_D float xpu::exp (float x)
 
XPU_D float xpu::exp2 (float x)
 
XPU_D float xpu::exp10 (float x)
 
XPU_D float xpu::expm1 (float x)
 
XPU_D float xpu::fdim (float x, float y)
 
XPU_D float xpu::floor (float x)
 
XPU_D float xpu::fma (float x, float y, float z)
 
XPU_D float xpu::fmod (float x, float y)
 
XPU_D float xpu::hypot (float x, float y)
 
XPU_D int xpu::ilogb (float x)
 
XPU_D bool xpu::isfinite (float a)
 
XPU_D bool xpu::isinf (float a)
 
XPU_D bool xpu::isnan (float a)
 
XPU_D float xpu::ldexp (float x, int exp)
 
XPU_D long long int xpu::llrint (float x)
 
XPU_D long long int xpu::llround (float x)
 
XPU_D float xpu::log (float x)
 
XPU_D float xpu::log10 (float x)
 
XPU_D float xpu::log1p (float x)
 
XPU_D float xpu::log2 (float x)
 
XPU_D float xpu::logb (float x)
 
XPU_D long int xpu::lrint (float x)
 
XPU_D long int xpu::lround (float x)
 
XPU_D int xpu::max (int a, int b)
 
XPU_D unsigned int xpu::max (unsigned int a, unsigned int b)
 
XPU_D long long int xpu::max (long long int a, long long int b)
 
XPU_D unsigned long long int xpu::max (unsigned long long int a, unsigned long long int b)
 
XPU_D float xpu::max (float a, float b)
 
XPU_D int xpu::min (int a, int b)
 
XPU_D unsigned int xpu::min (unsigned int a, unsigned int b)
 
XPU_D long long int xpu::min (long long int a, long long int b)
 
XPU_D unsigned long long int xpu::min (unsigned long long int a, unsigned long long int b)
 
XPU_D float xpu::min (float a, float b)
 
XPU_D float xpu::nan (const char *tagp)
 
XPU_D float xpu::norm3d (float a, float b, float c)
 
XPU_D float xpu::norm4d (float a, float b, float c, float d)
 
XPU_D float xpu::pow (float x, float y)
 
XPU_D float xpu::rcbrt (float x)
 
XPU_D float xpu::remainder (float x, float y)
 
XPU_D float xpu::remquo (float x, float y, int *quo)
 
XPU_D float xpu::rint (float x)
 
XPU_D float xpu::rhypot (float x, float y)
 
XPU_D float xpu::rnorm3d (float a, float b, float c)
 
XPU_D float xpu::rnorm4d (float a, float b, float c, float d)
 
XPU_D float xpu::round (float x)
 
XPU_D float xpu::rsqrt (float x)
 
XPU_D bool xpu::signbit (float a)
 
XPU_D void xpu::sincos (float x, float *sptr, float *cptr)
 
XPU_D void xpu::sincospi (float x, float *sptr, float *cptr)
 
XPU_D float xpu::sin (float x)
 
XPU_D float xpu::sinh (float x)
 
XPU_D float xpu::sinpi (float x)
 
XPU_D float xpu::sqrt (float x)
 
XPU_D float xpu::tan (float x)
 
XPU_D float xpu::tanh (float x)
 
XPU_D float xpu::tanpi (float x)
 
XPU_D float xpu::tgamma (float x)
 
XPU_D float xpu::trunc (float x)
 
XPU_D int xpu::atomic_cas (int *addr, int compare, int val)
 
XPU_D unsigned int xpu::atomic_cas (unsigned int *addr, unsigned int compare, unsigned int val)
 
XPU_D float xpu::atomic_cas (float *addr, float compare, float val)
 
XPU_D int xpu::atomic_cas_block (int *addr, int compare, int val)
 
XPU_D unsigned int xpu::atomic_cas_block (unsigned int *addr, unsigned int compare, unsigned int val)
 
XPU_D float xpu::atomic_cas_block (float *addr, float compare, float val)
 
XPU_D int xpu::atomic_add (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_add (unsigned int *addr, unsigned int val)
 
XPU_D float xpu::atomic_add (float *addr, float val)
 
XPU_D int xpu::atomic_add_block (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_add_block (unsigned int *addr, unsigned int val)
 
XPU_D float xpu::atomic_add_block (float *addr, float val)
 
XPU_D int xpu::atomic_sub (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_sub (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_sub_block (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_sub_block (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_and (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_and (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_and_block (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_and_block (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_or (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_or (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_or_block (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_or_block (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_xor (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_xor (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::atomic_xor_block (int *addr, int val)
 
XPU_D unsigned int xpu::atomic_xor_block (unsigned int *addr, unsigned int val)
 
XPU_D int xpu::float_as_int (float val)
 
XPU_D float xpu::int_as_float (int val)
 
XPU_D void xpu::barrier (tpos &)
 Sync all threads in a block. More...
 
template<typename ContextT >
XPU_D void xpu::barrier (ContextT &ctx)
 Sync all threads in a block. More...
 

Variables

constexpr driver_t xpu::compilation_target = XPU_DETAIL_COMPILATION_TARGET
 

Detailed Description

Device-side API.

This file contains the device-side API of xpu.

Include as #include <xpu/device.h>.

Note
This file is safe to include from both host and device code.

Macro Definition Documentation

◆ XPU_ASSERT

#define XPU_ASSERT (   x)    XPU_DETAIL_ASSERT(x)

◆ XPU_EXPORT

#define XPU_EXPORT (   obj)    XPU_DETAIL_EXPORT(obj)

◆ XPU_IMAGE

#define XPU_IMAGE (   image)    XPU_DETAIL_IMAGE(image)