60 #define FW_INLINE_CUDA(X) FW::formatInlineCuda(__FILE__, __LINE__, #X)
61 #define FW_COMPILE_INLINE_CUDA(X) FW::compileInlineCuda(__FILE__, __LINE__, #X)
76 void setInlineSource (
const String& source,
const String& origin =
"") { m_inlineSource = source; m_inlineOrigin = origin; m_sourceFile =
""; m_sourceHashValid =
false; m_memHashValid =
false; }
79 void clearOptions (
void) { m_options =
""; m_optionHashValid =
false; m_memHashValid =
false; }
80 void addOptions (
const String& options) { m_options += options +
" "; m_optionHashValid =
false; m_memHashValid =
false; }
83 void clearDefines (
void) { m_defines.clear(); m_defineHashValid =
false; m_memHashValid =
false; }
84 void undef (
const String& key) {
if (m_defines.contains(key)) { m_defines.remove(key); m_defineHashValid =
false; m_memHashValid =
false; } }
88 void clearPreamble (
void) { m_preamble =
""; m_preambleHashValid =
false; m_memHashValid =
false; }
89 void addPreamble (
const String& preamble) { m_preamble += preamble +
"\n"; m_preambleHashValid =
false; m_memHashValid =
false; }
119 U64 getMemHash (
void);
120 void createCacheDir (
void);
121 void writeDefineFile (
void);
124 void runPreprocessor (
String& cubinFile,
String& finalOpts);
125 void runCompiler (
const String& cubinFile,
const String& finalOpts);
129 void setLoggedError (
const String& description,
const String& logFile);
132 static String s_frameworkPath;
133 static String s_staticCudaBinPath;
134 static String s_staticOptions;
135 static String s_staticPreamble;
136 static String s_staticBinaryFormat;
138 static bool s_inited;
141 static U32 s_nvccVersionHash;
142 static String s_nvccCommand;
148 S32 m_overriddenSMArch;
159 bool m_sourceHashValid;
160 bool m_optionHashValid;
161 bool m_defineHashValid;
162 bool m_preambleHashValid;
const Array< U8 > * compileCubin(bool enablePrints=true, bool autoFail=true)
const char * getPtr(void) const
static const String & getFrameworkPath(void)
void include(const String &path)
void define(const String &key, int value)
CudaModule * compile(bool enablePrints=true, bool autoFail=true)
void setMessageWindow(Window *window)
CudaModule * loadDbgCubin(bool enablePrints=true)
String formatInlineCuda(const char *file, int line, const char *code)
static void setStaticOptions(const String &options)
void overrideSMArch(int arch)
static void staticDeinit(void)
String compileCubinFile(bool enablePrints=true, bool autoFail=true)
void define(const String &key, const String &value="")
static void setFrameworkPath(const String &path)
static void setStaticCudaBinPath(const String &path)
void addPreamble(const String &preamble)
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 GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint GLfloat GLfloat GLfloat z GLuint GLint GLenum GLboolean GLsizei const GLvoid pointer GLuint GLuint const GLchar name GLenum GLsizei GLenum GLsizei GLsizei height GLenum GLuint renderbuffer GLenum GLenum GLint params GLuint path
static void flushMemCache(void)
static void staticInit(void)
String sprintf(const char *fmt,...)
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
static void setStaticPreamble(const String &preamble)
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 GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
CudaModule * compileInlineCuda(const char *file, int line, const char *code)
void setInlineSource(const String &source, const String &origin="")
void addOptions(const String &options)
static void setStaticBinaryFormat(const String &format)
void setSourceFile(const String &path)
void setCachePath(const String &path)
void undef(const String &key)