GooFit  v2.1.3
Namespaces | Macros | Typedefs | Functions | Variables
GlobalCudaDefines.h File Reference
#include <thrust/detail/config.h>
#include <thrust/system_error.h>
#include <cmath>
#include <string>
#include <driver_types.h>

Go to the source code of this file.

Namespaces

 GooFit
 

Macros

#define _USE_MATH_DEFINES
 
#define MEMCPY(target, source, count, direction)   memcpy((char *)target, source, count)
 
#define MEMCPY_TO_SYMBOL(target, source, count, offset, direction)   memcpy(((char *)target) + offset, source, count)
 
#define MEMCPY_FROM_SYMBOL(target, source, count, offset, direction)   memcpy((char *)target, ((char *)source) + offset, count)
 
#define GET_FUNCTION_ADDR(fname)
 
#define RO_CACHE(x)   x
 
#define THREADIDX   (omp_get_thread_num())
 
#define BLOCKDIM   (omp_get_num_threads())
 
#define BLOCKIDX   (0)
 
#define THREAD_SYNCH   _Pragma("omp barrier")
 
#define root2   1.4142135623730951
 
#define invRootPi   0.5641895835477563
 
#define POW2(x)   ((x) * (x))
 
#define POW3(x)   ((x) * (x) * (x))
 

Typedefs

using GooFit::fptype = double
 

Functions

cudaError_t GooFit::gooMalloc (void **target, size_t bytes)
 
cudaError_t GooFit::gooFree (void *ptr)
 
template<typename T >
__host__ __device__ T rsqrt (T val)
 

Variables

int GooFit::host_callnumber = 0
 

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 6 of file GlobalCudaDefines.h.

◆ BLOCKDIM

#define BLOCKDIM   (omp_get_num_threads())

Definition at line 64 of file GlobalCudaDefines.h.

◆ BLOCKIDX

#define BLOCKIDX   (0)

Definition at line 65 of file GlobalCudaDefines.h.

◆ GET_FUNCTION_ADDR

#define GET_FUNCTION_ADDR (   fname)
Value:
{ \
host_fcn_ptr = (void *)fname; \
GOOFIT_DEBUG("Using function {} in {}, {}:{}", #fname, __func__, __FILE__, __LINE__); \
}

Definition at line 50 of file GlobalCudaDefines.h.

◆ invRootPi

#define invRootPi   0.5641895835477563

Definition at line 98 of file GlobalCudaDefines.h.

◆ MEMCPY

#define MEMCPY (   target,
  source,
  count,
  direction 
)    memcpy((char *)target, source, count)

Definition at line 46 of file GlobalCudaDefines.h.

◆ MEMCPY_FROM_SYMBOL

#define MEMCPY_FROM_SYMBOL (   target,
  source,
  count,
  offset,
  direction 
)    memcpy((char *)target, ((char *)source) + offset, count)

Definition at line 48 of file GlobalCudaDefines.h.

◆ MEMCPY_TO_SYMBOL

#define MEMCPY_TO_SYMBOL (   target,
  source,
  count,
  offset,
  direction 
)    memcpy(((char *)target) + offset, source, count)

Definition at line 47 of file GlobalCudaDefines.h.

◆ POW2

#define POW2 (   x)    ((x) * (x))

Definition at line 110 of file GlobalCudaDefines.h.

Referenced by GooFit::DalitzPlotter::getZval().

◆ POW3

#define POW3 (   x)    ((x) * (x) * (x))

Definition at line 111 of file GlobalCudaDefines.h.

◆ RO_CACHE

#define RO_CACHE (   x)    x

Definition at line 55 of file GlobalCudaDefines.h.

◆ root2

#define root2   1.4142135623730951

Definition at line 97 of file GlobalCudaDefines.h.

◆ THREAD_SYNCH

#define THREAD_SYNCH   _Pragma("omp barrier")

Definition at line 66 of file GlobalCudaDefines.h.

◆ THREADIDX

#define THREADIDX   (omp_get_thread_num())

Definition at line 63 of file GlobalCudaDefines.h.

Function Documentation

◆ rsqrt()

template<typename T >
__host__ __device__ T rsqrt ( val)

Definition at line 116 of file GlobalCudaDefines.h.

116  {
117  return 1.0 / sqrt(val);
118 }