#include <cudpp.h>
#include <limits.h>
#include <float.h>
Classes | |
| struct | typeToVector< T, N > |
| Utility template struct for generating small vector types from scalar types. More... | |
| class | Operator< T, oper > |
| Templatized operator class used by scan and segmented scan. More... | |
Functions | |
| bool | isPowerOfTwo (int n) |
| Determine if n is a power of two. | |
| bool | isMultiple (int n, int f) |
| Determine if an integer n is a multiple of an integer f. | |
| int | ceilPow2 (int n) |
| Compute the smallest power of two larger than n. | |
| int | floorPow2 (int n) |
| Compute the largest power of two smaller than n. | |
| template<class T> | |
| __host__ __device__ T | getMax () |
| Returns the maximum value for type T. | |
| template<class T> | |
| __host__ __device__ T | getMin () |
| Returns the minimum value for type T. | |
| template<class T> | |
| int | max3 (T a, T b, T c) |
| Returns the maximum of three values. | |
| bool isPowerOfTwo | ( | int | n | ) | [inline] |
Determine if n is a power of two.
| n | Value to be checked to see if it is a power of two |
| bool isMultiple | ( | int | n, | |
| int | f | |||
| ) | [inline] |
Determine if an integer n is a multiple of an integer f.
| n | Multiple | |
| f | Factor |
| int ceilPow2 | ( | int | n | ) | [inline] |
Compute the smallest power of two larger than n.
| n | Input value |
| int floorPow2 | ( | int | n | ) | [inline] |
Compute the largest power of two smaller than n.
| n | Input value |
| __host__ __device__ unsigned char getMax | ( | ) | [inline] |
Returns the maximum value for type T.
Implemented using template specialization on T.
| __host__ __device__ unsigned char getMin | ( | ) | [inline] |
Returns the minimum value for type T.
Implemented using template specialization on T.
| int max3 | ( | T | a, | |
| T | b, | |||
| T | c | |||
| ) | [inline] |
Returns the maximum of three values.
| a | First value. | |
| b | Second value. | |
| c | Third value. |
1.5.5