rocPRIM
Classes | Macros | Functions
Utilsmodule_functional

Classes

struct  less< T >
 Returns true if a < b. Otherwise returns false. More...
 
struct  less< void >
 Returns true if a < b. More...
 
struct  less_equal< T >
 Functor that returns true if a <= b. Otherwise returns false. More...
 
struct  less_equal< void >
 Functor that returns true if a <= b. More...
 
struct  greater< T >
 Functor that returns true if a > b. Otherwise returns false. More...
 
struct  greater< void >
 Functor that returns true if a > b. More...
 
struct  greater_equal< T >
 Functor that returns true if a >= b. Otherwise returns false. More...
 
struct  greater_equal< void >
 Functor that returns true if a >= b. More...
 
struct  equal_to< T >
 Functor that returns true if a == b. Otherwise returns false. More...
 
struct  equal_to< void >
 Functor that returns true if a == b. More...
 
struct  not_equal_to< T >
 Functor that returns true if a != b. Otherwise returns false. More...
 
struct  not_equal_to< void >
 Functor that returns true if a != b. More...
 
struct  plus< T >
 Functor that returns a + b. More...
 
struct  plus< void >
 Functor that returns a + b. More...
 
struct  minus< T >
 Functor that returns a - b. More...
 
struct  minus< void >
 Functor that returns a - b. More...
 
struct  multiplies< T >
 Functor that returns a * b. More...
 
struct  multiplies< void >
 Functor that returns a * b. More...
 
struct  maximum< T >
 Functor that returns the maximum of its arguments. More...
 
struct  maximum< void >
 Functor that returns the maximum of its arguments. More...
 
struct  minimum< T >
 Functor that returns the minimum of its arguments. More...
 
struct  minimum< void >
 Functor that returns the minimum of its arguments. More...
 
struct  identity< T >
 Functor that returns its argument. More...
 
struct  identity< void >
 Functor that returns its argument. More...
 
struct  Log2< N, CURRENT_VAL, COUNT >
 Statically determine log2(N), rounded up. More...
 
struct  Log2< N, 0, COUNT >
 
struct  Equals< A, B >
 Type equality test. More...
 
struct  Equals< A, A >
 
struct  Int2Type< A >
 

Macros

#define ROCPRIM_PRINT_ERROR_ONCE(message)
 Prints the supplied error message only once (using only one of the active threads). More...
 

Functions

template<class T >
ROCPRIM_HOST_DEVICE constexpr T max (const T &a, const T &b)
 Returns the maximum of its arguments.
 
template<class T >
ROCPRIM_HOST_DEVICE constexpr T min (const T &a, const T &b)
 Returns the minimum of its arguments.
 
template<class T >
ROCPRIM_HOST_DEVICE void swap (T &a, T &b)
 Swaps two values.
 

Detailed Description

Macro Definition Documentation

◆ ROCPRIM_PRINT_ERROR_ONCE

#define ROCPRIM_PRINT_ERROR_ONCE (   message)
Value:
{ \
unsigned int idx = threadIdx.x + (blockIdx.x * blockDim.x); \
idx += threadIdx.y + (blockIdx.y * blockDim.y); \
idx += threadIdx.z + (blockIdx.z * blockDim.z); \
if(idx == 0) \
printf("%s\n", #message); \
}

Prints the supplied error message only once (using only one of the active threads).

Note
Currently, this is not defined for Navi devices.