GPGPU labor VIII. OpenCL bevezetés. Kezdeti teendők Tantárgy honlapja, OpenCL bevezetés II. A labor kiindulási alapjának letöltése (lab8_base.zip), kitömörítés

  • Published on
    01-Apr-2015

  • View
    218

  • Download
    4

Embed Size (px)

Transcript

  • Slide 1

GPGPU labor VIII. OpenCL bevezets Slide 2 Kezdeti teendk Tantrgy honlapja, OpenCL bevezets II. A labor kiindulsi alapjnak letltse (lab8_base.zip), kitmrts a D:\GPGPU\ knyvtrba D:\GPGPU\labs\lab8\lab8_opencl\lab8_opencl.sln indtsa Project tulajdonsgai Configuration Properties Debugging Working Directory = $(ProjectDir)\..\..\bin Slide 3 Platform // OpenCL platform cl_platform_id platform; char* getPlatformInfo(cl_platform_id platform, cl_platform_info paramName){ size_t infoSize = 0; CL_SAFE_CALL( clGetPlatformInfo(platform, paramName, 0, NULL, &infoSize) ); char* info = (char*)malloc(infoSize); CL_SAFE_CALL( clGetPlatformInfo(platform, paramName, infoSize, info, NULL) ); return info; } cl_platform_id createPlatform(){ cl_platform_id platform; CL_SAFE_CALL( clGetPlatformIDs(1, &platform, NULL)); std::cout