BG_Flood  0.8
Documentation (Work-in-progress)
Util_CPU.h File Reference
#include "General.h"
#include "Param.h"
Include dependency graph for Util_CPU.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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)
 
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<class T >
__host__ __device__ 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<class T >
__host__ __device__ T calcres (T dx, int level)
 
template<class T >
__host__ __device__ T minmod2 (T theta, T s0, T s1, T 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<class T >
int ftoi (T value)
 

Function Documentation

◆ BarycentricInterpolation()

template<class T >
__host__ __device__ 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 
)

◆ calcres()

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

◆ ftoi()

template<class T >
int ftoi ( value)

◆ interptime()

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

◆ minmod2()

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

◆ nextPow2()

unsigned int nextPow2 ( unsigned int  x)

◆ OBBdetect()

template<class T >
__host__ __device__ bool 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