FlexBox - A Flexible Primal-Dual ToolBox
Classes | Enumerations | Functions
tools.h File Reference

Go to the source code of this file.

Classes

class  Timer
 class for timing execution times More...
 
struct  myAbsGPU< T >
 thrust functor for calculating the absolute value of vector More...
 
struct  vectorAddVectorTimesVectorGPU
 thrust functor for elemntwise multiplication of two vectors following a summation of the result on a third vector More...
 

Enumerations

enum  mySign { PLUS, MINUS, EQUALS, COMPOSE }
 enum representing the type of concatenation
 
enum  prox {
  primalEmptyProx, dualL1AnisoProx, dualL1IsoProx, dualL2Prox,
  dualLInfProx, dualFrobeniusProx, dualHuberProx, dualL2DataProx,
  dualL1DataProx, dualLInfDataProx, dualKLDataProx, dualBoxConstraintProx,
  dualInnerProductProx
}
 enum representing the type of prox
 
enum  linOp {
  linearOp, diagonalOp, gradientOp, identityOp,
  matrixOp, matrixGPUOp, zeroOp, superpixelOp,
  concatOp
}
 enum representing the type of a linear operator
 
enum  gradientType { forward, backward, central }
 enum representing the type of gradient
 

Functions

template<typename T >
myAbs (T x)
 
template<typename T >
myMin (T a, T b)
 
template<typename T >
myMax (T a, T b)
 
double pow2 (double x)
 
float pow2 (float x)
 
template<typename T >
vectorProduct (const std::vector< T > &v)
 
template<typename T >
vectorSum (const std::vector< T > &v)
 
template<typename T >
float vectorMax (std::vector< T > &v)
 
template<typename T >
void vectorScalarProduct (std::vector< T > &v, T scalarValue)
 
template<typename T >
void vectorScalarSet (std::vector< T > &v, const T scalarValue)
 
template<typename T >
void vectorPlus (std::vector< T > &v1, std::vector< T > &v2)
 
template<typename T >
void vectorMinus (std::vector< T > &v1, std::vector< T > &v2)
 
template<typename T >
void vectorAbs (std::vector< T > &v)
 
template<typename T >
void doOverrelaxation (std::vector< T > &x, std::vector< T > &xOld, std::vector< T > &xBar)
 
template<typename T >
void vectorPow2 (std::vector< T > &v)
 
template<typename T >
void vectorAddVectorTimesVector (std::vector< T > &result, const std::vector< T > &v1, const std::vector< T > &v2, const int signRule)
 
template<typename T >
void calculateXYError (thrust::device_vector< T > &x, thrust::device_vector< T > &xOld, thrust::device_vector< T > &xError, T tau)
 
template<typename T >
__host__ __device__ T myPow2GPU (T x)
 
template<typename T >
void vectorAbs (thrust::device_vector< T > &v)
 
template<typename T >
__host__ __device__ T myMinGPU (T a, T b)
 
__device__ float myMinGPUf (float a, float b)
 
__device__ float myMaxGPUf (float a, float b)
 
template<typename T >
__host__ __device__ T myMaxGPU (T a, T b)
 
template<typename T >
vectorSum (thrust::device_vector< T > &v)
 
template<typename T >
void vectorScalarSet (thrust::device_vector< T > &v, T scalarValue)
 
template<typename T >
void vectorScalarProduct (thrust::device_vector< T > &v, const T scalarValue)
 
template<typename T >
void vectorMinus (thrust::device_vector< T > &v1, thrust::device_vector< T > &v2)
 
template<typename T >
void vectorAddSquared (thrust::device_vector< T > &v1, thrust::device_vector< T > &v2)
 
template<typename T >
void vectorAddVectorTimesVector (thrust::device_vector< T > &result, const thrust::device_vector< T > &v1, const thrust::device_vector< T > &v2, const int signRule)
 
template<typename T >
__host__ __device__ T sqrtGPU (T x)
 
template<typename T >
void vectorSqrt (thrust::device_vector< T > &v1)
 
template<typename T >
float vectorMax (thrust::device_vector< T > &v)
 

Detailed Description

file containing global definitions and functions