<< gpuApplyFunction sciGPGPU gpuDeviceInfo >>

sciGPGPU >> sciGPGPU > gpuBuild

gpuBuild

Compile a file using Cuda or OpenCL language.

Call sequence

bin = gpuBuild(filename);

Parameters

filename

Name of file without extention.

Description

bin = gpuBuild("filename")

gpuBuild(filename) compiles a OpenCL or Cuda file, to be passed to gpuLoadFunction. In the return value, "bin", we find the file name of kernel compiled and if it's Cuda or OpenCL compiled file. The use of Cuda or OpenCL is determinate at the compilation of the toolbox and gpuUseCuda function.

Exemples

gpuInit();
A=rand(16,16);
gA=gpuSetData(A);
bin=gpuBuild("filename");
func=cudaLoadFunction(bin,"functionName");
lst=list(arguments);
gpuApplyFunction(func,lst,blockSize_X,blockSize_Y,gridSize_X,gridSize_Y);
B=gpuGetData(gA);

Voir Aussi

<< gpuApplyFunction sciGPGPU gpuDeviceInfo >>