BG_Flood  0.8
Documentation (Work-in-progress)
Util_CPU.cu File Reference
#include "Util_CPU.h"
Include dependency graph for Util_CPU.cu:

Namespaces

 utils
 

Functions

template<class T >
__host__ __device__ T utils::sq (T a)
 
template<class T >
__host__ __device__ const T & utils::max (const T &a, const T &b)
 
template<class T >
__host__ __device__ const T & utils::min (const T &a, const T &b)
 
template<class T >
__host__ __device__ const T & utils::nearest (const T &a, const T &b, const T &c)
 
template<class T >
__host__ __device__ const T & utils::nearest (const T &a, const T &b)
 
template __host__ __device__ const int & utils::min< int > (const int &a, const int &b)
 
template __host__ __device__ const float & utils::min< float > (const float &a, const float &b)
 
template __host__ __device__ const double & utils::min< double > (const double &a, const double &b)
 
template __host__ __device__ const int & utils::max< int > (const int &a, const int &b)
 
template __host__ __device__ const float & utils::max< float > (const float &a, const float &b)
 
template __host__ __device__ const double & utils::max< double > (const double &a, const double &b)
 
template int __host__ __device__ utils::sq< int > (int a)
 
template float __host__ __device__ utils::sq< float > (float a)
 
template double __host__ __device__ utils::sq< double > (double a)
 
template __host__ __device__ const int & utils::nearest< int > (const int &a, const int &b, const int &c)
 
template __host__ __device__ const float & utils::nearest< float > (const float &a, const float &b, const float &c)
 
template __host__ __device__ const double & utils::nearest< double > (const double &a, const double &b, const double &c)
 
template __host__ __device__ const int & utils::nearest< int > (const int &a, const int &b)
 
template __host__ __device__ const float & utils::nearest< float > (const float &a, const float &b)
 
template __host__ __device__ const double & utils::nearest< double > (const double &a, const double &b)
 
unsigned int nextPow2 (unsigned int x)
 
double interptime (double next, double prev, double timenext, double time)
 
template<class T >
__host__ __device__ T BilinearInterpolation (T q11, T q12, T q21, T q22, T x1, T x2, T y1, T y2, T x, T y)
 
template __host__ __device__ float BilinearInterpolation< float > (float q11, float q12, float q21, float q22, float x1, float x2, float y1, float y2, float x, float y)
 
template __host__ __device__ double BilinearInterpolation< double > (double q11, double q12, double q21, double q22, double x1, double x2, double y1, double y2, double x, double y)
 
template<class T >
BarycentricInterpolation (T q1, T x1, T y1, T q2, T x2, T y2, T q3, T x3, T y3, T x, T y)
 
template float BarycentricInterpolation (float q1, float x1, float y1, float q2, float x2, float y2, float q3, float x3, float y3, float x, float y)
 
template double BarycentricInterpolation (double q1, double x1, double y1, double q2, double x2, double y2, double q3, double x3, double y3, double x, double y)
 
template<class T >
__host__ __device__ T calcres (T dx, int level)
 
template __host__ __device__ double calcres< double > (double dx, int level)
 
template __host__ __device__ float calcres< float > (float dx, int level)
 
template<class T >
__host__ __device__ T minmod2 (T theta, T s0, T s1, T s2)
 
template __host__ __device__ float minmod2 (float theta, float s0, float s1, float s2)
 
template __host__ __device__ double minmod2 (double theta, double s0, double s1, double s2)
 
template<class T >
__host__ __device__ bool OBBdetect (T Axmin, T Axmax, T Aymin, T Aymax, T Bxmin, T Bxmax, T Bymin, T Bymax)
 
template __host__ __device__ bool OBBdetect (float Axmin, float Axmax, float Aymin, float Aymax, float Bxmin, float Bxmax, float Bymin, float Bymax)
 
template __host__ __device__ bool OBBdetect (double Axmin, double Axmax, double Aymin, double Aymax, double Bxmin, double Bxmax, double Bymin, double Bymax)
 
template<class T >
int ftoi (T value)
 
template int ftoi< float > (float value)
 
template int ftoi< double > (double value)
 

Function Documentation

◆ BarycentricInterpolation() [1/3]

template double BarycentricInterpolation ( double  q1,
double  x1,
double  y1,
double  q2,
double  x2,
double  y2,
double  q3,
double  x3,
double  y3,
double  x,
double  y 
)

◆ BarycentricInterpolation() [2/3]

template float BarycentricInterpolation ( float  q1,
float  x1,
float  y1,
float  q2,
float  x2,
float  y2,
float  q3,
float  x3,
float  y3,
float  x,
float  y 
)

◆ BarycentricInterpolation() [3/3]

template<class T >
T BarycentricInterpolation ( q1,
x1,
y1,
q2,
x2,
y2,
q3,
x3,
y3,
x,
y 
)

◆ BilinearInterpolation()

template<class T >
__host__ __device__ T BilinearInterpolation ( q11,
q12,
q21,
q22,
x1,
x2,
y1,
y2,
x,
y 
)

◆ BilinearInterpolation< double >()

template __host__ __device__ double BilinearInterpolation< double > ( double  q11,
double  q12,
double  q21,
double  q22,
double  x1,
double  x2,
double  y1,
double  y2,
double  x,
double  y 
)

◆ BilinearInterpolation< float >()

template __host__ __device__ float BilinearInterpolation< float > ( float  q11,
float  q12,
float  q21,
float  q22,
float  x1,
float  x2,
float  y1,
float  y2,
float  x,
float  y 
)

◆ calcres()

template<class T >
__host__ __device__ T calcres ( dx,
int  level 
)

◆ calcres< double >()

template __host__ __device__ double calcres< double > ( double  dx,
int  level 
)

◆ calcres< float >()

template __host__ __device__ float calcres< float > ( float  dx,
int  level 
)

◆ ftoi()

template<class T >
int ftoi ( value)

◆ ftoi< double >()

template int ftoi< double > ( double  value)

◆ ftoi< float >()

template int ftoi< float > ( float  value)

◆ interptime()

double interptime ( double  next,
double  prev,
double  timenext,
double  time 
)

◆ minmod2() [1/3]

template __host__ __device__ double minmod2 ( double  theta,
double  s0,
double  s1,
double  s2 
)

◆ minmod2() [2/3]

template __host__ __device__ float minmod2 ( float  theta,
float  s0,
float  s1,
float  s2 
)

◆ minmod2() [3/3]

template<class T >
__host__ __device__ T minmod2 ( theta,
s0,
s1,
s2 
)

◆ nextPow2()

unsigned int nextPow2 ( unsigned int  x)

◆ OBBdetect() [1/3]

template __host__ __device__ bool OBBdetect ( double  Axmin,
double  Axmax,
double  Aymin,
double  Aymax,
double  Bxmin,
double  Bxmax,
double  Bymin,
double  Bymax 
)

◆ OBBdetect() [2/3]

template __host__ __device__ bool OBBdetect ( float  Axmin,
float  Axmax,
float  Aymin,
float  Aymax,
float  Bxmin,
float  Bxmax,
float  Bymin,
float  Bymax 
)

◆ OBBdetect() [3/3]

template<class T >
OBBdetect ( Axmin,
Axmax,
Aymin,
Aymax,
Bxmin,
Bxmax,
Bymin,
Bymax 
)

Overlaping Bounding Box to detect which cell river falls into. It is the simplest version of the algorythm where the bounding box are paralle;l to the axis