NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Defs.hpp File Reference
#include <new>
#include <string.h>

Go to the source code of this file.

Namespaces

 FW
 Scene class declarations.
 

Macros

#define NULL   0
 
#define FW_DEBUG   0
 
#define FW_64   0
 
#define FW_CUDA   0
 
#define FW_ASSERT(X)   ((void)0)
 
#define FW_CUDA_FUNC   inline
 
#define FW_CUDA_CONST   static const
 
#define FW_UNREF(X)   ((void)(X))
 
#define FW_ARRAY_SIZE(X)   ((int)(sizeof(X) / sizeof((X)[0])))
 
#define FW_U32_MAX   (0xFFFFFFFFu)
 
#define FW_S32_MIN   (~0x7FFFFFFF)
 
#define FW_S32_MAX   (0x7FFFFFFF)
 
#define FW_U64_MAX   ((U64)(S64)-1)
 
#define FW_S64_MIN   ((S64)-1 << 63)
 
#define FW_S64_MAX   (~((S64)-1 << 63))
 
#define FW_F32_MIN   (1.175494351e-38f)
 
#define FW_F32_MAX   (3.402823466e+38f)
 
#define FW_F64_MIN   (2.2250738585072014e-308)
 
#define FW_F64_MAX   (1.7976931348623158e+308)
 
#define FW_PI   (3.14159265358979323846f)
 
#define FW_INV_PI   (0.31830988618379067154f)
 
#define FW_INV_2PI   (0.15915494309189533577f)
 
#define FW_SPECIALIZE_MINMAX(TEMPLATE, T, MIN, MAX)
 

Typedefs

typedef unsigned char FW::U8
 
typedef unsigned short FW::U16
 
typedef unsigned int FW::U32
 
typedef signed char FW::S8
 
typedef signed short FW::S16
 
typedef signed int FW::S32
 
typedef float FW::F32
 
typedef double FW::F64
 
typedef void(* FW::FuncPtr )(void)
 
typedef unsigned __int64 FW::U64
 
typedef signed __int64 FW::S64
 
typedef __w64 S32 FW::SPTR
 
typedef __w64 U32 FW::UPTR
 

Functions

voidFW::malloc (size_t size)
 
void FW::free (void *ptr)
 
voidFW::realloc (void *ptr, size_t size)
 
void FW::printf (const char *fmt,...)
 
String FW::sprintf (const char *fmt,...)
 
void FW::setError (const char *fmt,...)
 
String FW::clearError (void)
 
bool FW::restoreError (const String &old)
 
bool FW::hasError (void)
 
const StringFW::getError (void)
 
void FW::fail (const char *fmt,...)
 
void FW::failWin32Error (const char *funcName)
 
void FW::failIfError (void)
 
int FW::incNestingLevel (int delta)
 
bool FW::setDiscardEvents (bool discard)
 
bool FW::getDiscardEvents (void)
 
void FW::pushLogFile (const String &name, bool append=true)
 
void FW::popLogFile (void)
 
bool FW::hasLogFile (void)
 
size_t FW::getMemoryUsed (void)
 
void FW::pushMemOwner (const char *id)
 
void FW::popMemOwner (void)
 
void FW::printMemStats (void)
 
void FW::profileStart (void)
 
void FW::profilePush (const char *id)
 
void FW::profilePop (void)
 
void FW::profileEnd (bool printResults=true)
 
template<class T >
FW_CUDA_FUNC void FW::swap (T &a, T &b)
 
 FW::FW_SPECIALIZE_MINMAX (template< class T >, T &,(a< b)?a:b,(a > b)?a:b) FW_SPECIALIZE_MINMAX(template< class T >
 
voidoperator new (size_t size)
 
voidoperator new[] (size_t size)
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 

Macro Definition Documentation

#define FW_64   0

Definition at line 51 of file Defs.hpp.

#define FW_ARRAY_SIZE (   X)    ((int)(sizeof(X) / sizeof((X)[0])))

Definition at line 79 of file Defs.hpp.

#define FW_ASSERT (   X)    ((void)0)

Definition at line 67 of file Defs.hpp.

#define FW_CUDA   0

Definition at line 57 of file Defs.hpp.

#define FW_CUDA_CONST   static const

Definition at line 75 of file Defs.hpp.

#define FW_CUDA_FUNC   inline

Definition at line 74 of file Defs.hpp.

#define FW_DEBUG   0

Definition at line 45 of file Defs.hpp.

#define FW_F32_MAX   (3.402823466e+38f)

Definition at line 118 of file Defs.hpp.

#define FW_F32_MIN   (1.175494351e-38f)

Definition at line 117 of file Defs.hpp.

#define FW_F64_MAX   (1.7976931348623158e+308)

Definition at line 120 of file Defs.hpp.

#define FW_F64_MIN   (2.2250738585072014e-308)

Definition at line 119 of file Defs.hpp.

#define FW_INV_2PI   (0.15915494309189533577f)

Definition at line 123 of file Defs.hpp.

#define FW_INV_PI   (0.31830988618379067154f)

Definition at line 122 of file Defs.hpp.

#define FW_PI   (3.14159265358979323846f)

Definition at line 121 of file Defs.hpp.

#define FW_S32_MAX   (0x7FFFFFFF)

Definition at line 113 of file Defs.hpp.

#define FW_S32_MIN   (~0x7FFFFFFF)

Definition at line 112 of file Defs.hpp.

#define FW_S64_MAX   (~((S64)-1 << 63))

Definition at line 116 of file Defs.hpp.

#define FW_S64_MIN   ((S64)-1 << 63)

Definition at line 115 of file Defs.hpp.

#define FW_SPECIALIZE_MINMAX (   TEMPLATE,
  T,
  MIN,
  MAX 
)
Value:
TEMPLATE FW_CUDA_FUNC T min(T a, T b) { return MIN; } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b) { return MAX; } \
TEMPLATE FW_CUDA_FUNC T min(T a, T b, T c) { return min(min(a, b), c); } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b, T c) { return max(max(a, b), c); } \
TEMPLATE FW_CUDA_FUNC T min(T a, T b, T c, T d) { return min(min(min(a, b), c), d); } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b, T c, T d) { return max(max(max(a, b), c), d); } \
TEMPLATE FW_CUDA_FUNC T min(T a, T b, T c, T d, T e) { return min(min(min(min(a, b), c), d), e); } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b, T c, T d, T e) { return max(max(max(max(a, b), c), d), e); } \
TEMPLATE FW_CUDA_FUNC T min(T a, T b, T c, T d, T e, T f) { return min(min(min(min(min(a, b), c), d), e), f); } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b, T c, T d, T e, T f) { return max(max(max(max(max(a, b), c), d), e), f); } \
TEMPLATE FW_CUDA_FUNC T min(T a, T b, T c, T d, T e, T f, T g) { return min(min(min(min(min(min(a, b), c), d), e), f), g); } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b, T c, T d, T e, T f, T g) { return max(max(max(max(max(max(a, b), c), d), e), f), g); } \
TEMPLATE FW_CUDA_FUNC T min(T a, T b, T c, T d, T e, T f, T g, T h) { return min(min(min(min(min(min(min(a, b), c), d), e), f), g), h); } \
TEMPLATE FW_CUDA_FUNC T max(T a, T b, T c, T d, T e, T f, T g, T h) { return max(max(max(max(max(max(max(a, b), c), d), e), f), g), h); } \
TEMPLATE FW_CUDA_FUNC T clamp(T v, T lo, T hi) { return min(max(v, lo), hi); }
#define FW_CUDA_FUNC
Definition: Defs.hpp:74
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v
Definition: DLLImports.inl:329
FW_CUDA_FUNC T min(const VectorBase< T, L, S > &v)
Definition: Math.hpp:461
FW_CUDA_FUNC T max(const VectorBase< T, L, S > &v)
Definition: Math.hpp:462
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction f
Definition: DLLImports.inl:88

Definition at line 185 of file Defs.hpp.

#define FW_U32_MAX   (0xFFFFFFFFu)

Definition at line 111 of file Defs.hpp.

#define FW_U64_MAX   ((U64)(S64)-1)

Definition at line 114 of file Defs.hpp.

#define FW_UNREF (   X)    ((void)(X))

Definition at line 78 of file Defs.hpp.

#define NULL   0

Definition at line 39 of file Defs.hpp.

Function Documentation

void operator delete ( void ptr)
inline

Definition at line 230 of file Defs.hpp.

void operator delete[] ( void ptr)
inline

Definition at line 231 of file Defs.hpp.

void* operator new ( size_t  size)
inline

Definition at line 228 of file Defs.hpp.

void* operator new[] ( size_t  size)
inline

Definition at line 229 of file Defs.hpp.