gpufilter
GPU-Efficient Recursive Filtering and Summed-Area Tables
|
#include <util.h>
Public Member Functions | |
std::vector< T > | to_vector () const |
Convert a vector of this class to an stl vector. | |
__host__ __device__ const T & | operator[] (int i) const |
Access (constant) operator. | |
__host__ __device__ T & | operator[] (int i) |
Access operator. | |
__host__ __device__ int | size () const |
Get size (number of elements) of this vector. | |
__host__ __device__ Vector & | operator+= (const Vector &v) |
Add-then-assign operator. | |
__host__ __device__ Vector | operator+ (const Vector &v) const |
Add operator. | |
__host__ __device__ Vector & | operator*= (const T &v) |
Multiply-then-assign operator. | |
__host__ __device__ Vector | operator* (const T &v) const |
Multiply operator. | |
__host__ __device__ Vector & | operator/= (const T &v) |
Divide-then-assign operator. | |
__host__ __device__ Vector | operator/ (const T &v) const |
Divide operator. | |
__host__ __device__ | operator const T * () const |
Pointer-access operator (constant) | |
__host__ __device__ | operator T * () |
Pointer-access operator. | |
Private Attributes | |
T | m_data [N] |
Vector values. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Vector &v) |
Output stream operator. | |
Related Functions | |
(Note that these are not member functions.) | |
template<class T , int N> | |
__host__ __device__ Vector< T, N > | zeros () |
Instantiate a vector with zeros. | |
template<class T , int N, int R> | |
void | fwd_inplace (const Vector< T, R > &p, Vector< T, N > &b, const Vector< T, R+1 > &w) |
Computes the forward operator on vectors (in-place) | |
template<class T , int N, int R> | |
void | rev_inplace (Vector< T, N > &b, const Vector< T, R > &e, const Vector< T, R+1 > &w) |
Computes the reverse operator on vectors (in-place) |
Vector class.
Vector class to represent special small vectors, such as the vector of filter weights used in forward and reverse filter computation (see equations 1 and 3 in [Nehab:2011] cited in alg5()).
T | Vector value type |
N | Number of elements |
__host__ __device__ gpufilter::Vector< T, N >::operator const T * | ( | ) | const [inline] |
Pointer-access operator (constant)
__host__ __device__ gpufilter::Vector< T, N >::operator T * | ( | ) | [inline] |
Pointer-access operator.
__host__ __device__ Vector gpufilter::Vector< T, N >::operator* | ( | const T & | v | ) | const [inline] |
__host__ __device__ Vector& gpufilter::Vector< T, N >::operator*= | ( | const T & | v | ) | [inline] |
Multiply-then-assign operator.
[in] | v | Vector to multiply values from |
__host__ __device__ Vector gpufilter::Vector< T, N >::operator+ | ( | const Vector< T, N > & | v | ) | const [inline] |
__host__ __device__ Vector& gpufilter::Vector< T, N >::operator+= | ( | const Vector< T, N > & | v | ) | [inline] |
Add-then-assign operator.
[in] | v | Vector to add values from |
__host__ __device__ Vector gpufilter::Vector< T, N >::operator/ | ( | const T & | v | ) | const [inline] |
__host__ __device__ Vector& gpufilter::Vector< T, N >::operator/= | ( | const T & | v | ) | [inline] |
Divide-then-assign operator.
[in] | v | Vector to divide values from |
__host__ __device__ const T& gpufilter::Vector< T, N >::operator[] | ( | int | i | ) | const [inline] |
Access (constant) operator.
[in] | i | Position to access |
__host__ __device__ T& gpufilter::Vector< T, N >::operator[] | ( | int | i | ) | [inline] |
Access operator.
[in] | i | Position to access |
__host__ __device__ int gpufilter::Vector< T, N >::size | ( | ) | const [inline] |
Get size (number of elements) of this vector.
std::vector<T> gpufilter::Vector< T, N >::to_vector | ( | ) | const [inline] |
Convert a vector of this class to an stl vector.
void fwd_inplace | ( | const Vector< T, R > & | p, |
Vector< T, N > & | b, | ||
const Vector< T, R+1 > & | w | ||
) | [related] |
Computes the forward operator on vectors (in-place)
For more information see fwd().
[in] | p | Prologue vector ( is the filter order) |
[in,out] | b | In(out)put vector |
[in] | w | Filter weights with size ( feedback coefficients) |
N | Number of elements |
R | Number of feedback coefficients |
T | Matrix value type |
std::ostream& operator<< | ( | std::ostream & | out, |
const Vector< T, N > & | v | ||
) | [friend] |
Output stream operator.
[in,out] | out | Output stream |
[in] | v | Vector to output values from |
void rev_inplace | ( | Vector< T, N > & | b, |
const Vector< T, R > & | e, | ||
const Vector< T, R+1 > & | w | ||
) | [related] |
Computes the reverse operator on vectors (in-place)
For more information see rev().
[in,out] | b | In(out)put vector |
[in] | e | Epilogue vector ( is the filter order) |
[in] | w | Filter weights with size ( feedback coefficients) |
N | Number of elements |
R | Number of feedback coefficients |
T | Matrix value type |
__host__ __device__ Vector< T, N > zeros | ( | ) | [related] |
Instantiate a vector with zeros.
T | Vector value type |
N | Number of elements |