Open Qmin  0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
Macros | Functions
std_include.h File Reference
#include <cmath>
#include <algorithm>
#include <memory>
#include <ctype.h>
#include <random>
#include <stdio.h>
#include <cstdlib>
#include <unistd.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <vector>
#include <sys/time.h>
#include <string.h>
#include <stdexcept>
#include <cassert>
#include <cuda_runtime.h>
#include "vector_types.h"
#include "vector_functions.h"
#include "nvToolsExt.h"
#include "dDimensionalVectorTypes.h"
#include "matrix.h"
#include "structures.h"
Include dependency graph for std_include.h:
This graph shows which files directly or indirectly include this file:

Macros

#define THRESHOLD   1e-18
 
#define EPSILON   1e-18
 
#define PI   3.14159265358979323846
 
#define scalar   double
 
#define scalar2   double2
 
#define scalar3   double3
 
#define scalar4   double4
 
#define ncscalar   ncDouble
 
#define cur_norm   curand_normal_double
 
#define Cos   cos
 
#define Sin   sin
 
#define Floor   floor
 
#define Ceil   ceil
 
#define MPI_SCALAR   MPI_DOUBLE
 
#define HOSTDEVICE   inline __attribute__((always_inline))
 
#define NVTXPUSH(message)   (nvtxProfPush(message))
 
#define NVTXPOP(message)   (nvtxProfPop())
 
#define HANDLE_ERROR(err)   (HandleError( err, __FILE__,__LINE__ ))
 
#define UNWRITTENCODE(message)   (unwrittenCode(message,__FILE__,__LINE__))
 
#define DEBUGCODEHELPER   printf("\nReached: file %s at line %d\n",__FILE__,__LINE__);
 

Functions

HOSTDEVICE scalar2 make_scalar2 (scalar x, scalar y)
 return a scalar2 from two scalars More...
 
HOSTDEVICE scalar3 make_scalar3 (scalar x, scalar y, scalar z)
 return a scalar3 from three scalars More...
 
HOSTDEVICE scalar3 operator * (const scalar3 &a, const scalar &b)
 scalar multiplication of scalar3 More...
 
HOSTDEVICE scalar3 operator * (const scalar b, const scalar3 &a)
 scalar multiplication of scalar3 More...
 
HOSTDEVICE scalar3 operator+ (const scalar3 &a, const scalar3 &b)
 component-wise addition of two scalar3s More...
 
HOSTDEVICE int3 operator- (const int3 &a, const int3 &b)
 component-wise subtraction of two int3s More...
 
HOSTDEVICE int3 operator+ (const int3 &a, const int3 &b)
 component-wise addition of two int3s More...
 
HOSTDEVICE bool operator< (const int3 &a, const int3 &b)
 strict comparison of int3s More...
 
HOSTDEVICE bool operator> (const int3 &a, const int3 &b)
 
HOSTDEVICE bool operator<= (const int3 &a, const int3 &b)
 comparison of int3s More...
 
HOSTDEVICE bool operator>= (const int3 &a, const int3 &b)
 
bool fileExists (const std::string &name)
 A utility function for checking if a file exists. More...
 

Detailed Description

a file to be included all the time... carries with it things DMS often uses. It includes some handy debugging / testing functions, and includes too many standard library headers It also defines scalars as either floats or doubles, depending on how the program is compiled

Macro Definition Documentation

◆ THRESHOLD

#define THRESHOLD   1e-18

◆ EPSILON

#define EPSILON   1e-18

◆ PI

#define PI   3.14159265358979323846

◆ scalar

#define scalar   double

◆ scalar2

#define scalar2   double2

◆ scalar3

#define scalar3   double3

◆ scalar4

#define scalar4   double4

◆ ncscalar

#define ncscalar   ncDouble

◆ cur_norm

#define cur_norm   curand_normal_double

◆ Cos

#define Cos   cos

◆ Sin

#define Sin   sin

◆ Floor

#define Floor   floor

◆ Ceil

#define Ceil   ceil

◆ MPI_SCALAR

#define MPI_SCALAR   MPI_DOUBLE

◆ HOSTDEVICE

#define HOSTDEVICE   inline __attribute__((always_inline))

◆ NVTXPUSH

#define NVTXPUSH (   message)    (nvtxProfPush(message))

◆ NVTXPOP

#define NVTXPOP (   message)    (nvtxProfPop())

◆ HANDLE_ERROR

#define HANDLE_ERROR (   err)    (HandleError( err, __FILE__,__LINE__ ))

◆ UNWRITTENCODE

#define UNWRITTENCODE (   message)    (unwrittenCode(message,__FILE__,__LINE__))

◆ DEBUGCODEHELPER

#define DEBUGCODEHELPER   printf("\nReached: file %s at line %d\n",__FILE__,__LINE__);

Function Documentation

◆ make_scalar2()

HOSTDEVICE scalar2 make_scalar2 ( scalar  x,
scalar  y 
)

return a scalar2 from two scalars

References scalar2.

◆ make_scalar3()

HOSTDEVICE scalar3 make_scalar3 ( scalar  x,
scalar  y,
scalar  z 
)

◆ operator *() [1/2]

HOSTDEVICE scalar3 operator * ( const scalar3 a,
const scalar b 
)

scalar multiplication of scalar3

References make_scalar3().

◆ operator *() [2/2]

HOSTDEVICE scalar3 operator * ( const scalar  b,
const scalar3 a 
)

scalar multiplication of scalar3

References make_scalar3().

◆ operator+() [1/2]

HOSTDEVICE scalar3 operator+ ( const scalar3 a,
const scalar3 b 
)

component-wise addition of two scalar3s

References make_scalar3().

◆ operator-()

HOSTDEVICE int3 operator- ( const int3 &  a,
const int3 &  b 
)

component-wise subtraction of two int3s

◆ operator+() [2/2]

HOSTDEVICE int3 operator+ ( const int3 &  a,
const int3 &  b 
)

component-wise addition of two int3s

◆ operator<()

HOSTDEVICE bool operator< ( const int3 &  a,
const int3 &  b 
)

strict comparison of int3s

◆ operator>()

HOSTDEVICE bool operator> ( const int3 &  a,
const int3 &  b 
)

◆ operator<=()

HOSTDEVICE bool operator<= ( const int3 &  a,
const int3 &  b 
)

comparison of int3s

◆ operator>=()

HOSTDEVICE bool operator>= ( const int3 &  a,
const int3 &  b 
)

◆ fileExists()

bool fileExists ( const std::string &  name)
inline

A utility function for checking if a file exists.