Ejemplo n.º 1
0
GMAC_API void APICALL __cudaRegisterTexture(void **fatCubinHandle, const struct textureReference *hostVar,
		const void ** /*deviceAddress*/, const char *deviceName, int /*dim*/, int /*norm*/, int /*ext*/)
{
    TRACE(GLOBAL, "CUDA Texture");
	ModuleDescriptor *mod = (ModuleDescriptor *)fatCubinHandle;
	ASSERTION(mod != NULL);
	enterGmac();
    TextureDescriptor t = __impl::cuda::hpe::TextureDescriptor(deviceName, hostVar);
	mod->add(t);
	exitGmac();
}
Ejemplo n.º 2
0
GMAC_API void APICALL __cudaRegisterVar(void **fatCubinHandle, char *hostVar,
		char * deviceAddress, const char *deviceName, int /*ext*/, int /*size*/,
		int constant, int /*global*/)
{
    TRACE(GLOBAL, "CUDA Variable %s: %p", deviceName, deviceAddress);
	ModuleDescriptor *mod = (ModuleDescriptor *)fatCubinHandle;
	ASSERTION(mod != NULL);
	enterGmac();
    VariableDescriptor v = __impl::cuda::hpe::VariableDescriptor(deviceName, hostVar, bool(constant != 0));
    mod->add(v);
	exitGmac();
}
Ejemplo n.º 3
0
GMAC_API void APICALL __cudaRegisterFunction(
		void **fatCubinHandle, const char *hostFun, char * /*devFun*/,
		const char *devName, int /*threadLimit*/, uint3 * /*tid*/, uint3 * /*bid*/,
		dim3 * /*bDim*/, dim3 * /*gDim*/)
{
    TRACE(GLOBAL, "CUDA Function");
	ModuleDescriptor *mod = (ModuleDescriptor *)fatCubinHandle;
	ASSERTION(mod != NULL);
	enterGmac();
    KernelDescriptor k = __impl::core::hpe::KernelDescriptor(devName, (gmac_kernel_id_t) hostFun);
    mod->add(k);
	exitGmac();
}