예제 #1
0
void CudaModule::setSurfRef(const std::string& name, CUarray cudaArray)
{
#if (CUDA_VERSION >= 3010)
  checkError("cuSurfRefSetArray", cuSurfRefSetArray(getSurfRef(name), cudaArray, 0));
#else
  FW_UNREF(name);
  FW_UNREF(cudaArray);
  fail("CudaModule: setSurfRef() requires CUDA 3.1 or later!");
#endif
}
예제 #2
0
CUsurfref CudaModule::getSurfRef(const std::string& name)
{
  
#if (CUDA_VERSION >= 3010)
  CUsurfref surfRef;
  checkError( "cuModuleGetSurfRef", 
              cuModuleGetSurfRef(&surfRef, m_module, name.c_str()) );  
  return surfRef;
#else
  FW_UNREF(name);
  fail("CudaModule: getSurfRef() requires CUDA 3.1 or later!");
  return NULL;
#endif
}
예제 #3
0
 int                 vboAttribStride     (int attrib)                    { getVBO(); FW_ASSERT(attrib >= 0 && attrib < m_attribs.getSize()); FW_UNREF(attrib); return vertexStride(); }