日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

详细程序注解学OpenCL一 环境配置和入门程序

發布時間:2025/7/25 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 详细程序注解学OpenCL一 环境配置和入门程序 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本專欄是通過注解程序的方法學習OpenCL,我覺得一個一個地去摳原理也不是辦法,干脆直接學習程序,然后把相關原理都直接注解到程序語句當中。

原創地址:http://blog.csdn.net/kenden23/article/details/14101657

一開始要配置好環境,我的是nvidia,所以就按照我的電腦舉例,AMD應該也差不多。

1. 首先要到nvidia網站下載適合你顯卡的最新驅動,安裝好

2. 還是在nvidia網站下載好CUDA開發包,安裝好

3. 如果默認安裝路徑的話,路徑應該是在:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0

4. 打開這個目錄會發現里面有include和lib文件夾,這就是我們需要配置在visual studio中的文件

5. 打開visual studio(版本基本都無關系,我用的是vs2012),新建一個win32空項目。按下alt+F7打開項目屬性,也可以點擊項目文件右鍵,選擇屬性。

6. 在屬性頁里面找到“C/C++”的“常規”項,點擊,右邊有“附加包含目錄”,然后編輯,添加目錄:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include

7.在屬性頁里面找到“連接器”,點擊其“常規”項,右邊有“附加庫目錄”,然后也是編輯,添加目錄:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\lib\Win32,如果是64位系統可以是:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\lib\x64。

8. 在屬性頁里找到“常規”項, 右邊“附加依賴項”,編輯,添加lib文件:OpenCL.lib

9. 然后就可以新建源文件,在源文件里面添加相關的OpenCl程序,就可以調試OpenCL程序了。

下面就可以開始學習程序了。

下面是個入門程序,已經注釋好了,注釋包括了基本原理的解析,可以通過直接閱讀和調試程序學習OpenCL了。

本程序是讀取電腦中的支持OpenCL的硬件nvidia和intel和AMD等信息,然后顯示在屏幕上。

[cpp] view plaincopyprint?
  • #include?<stdio.h>??
  • #include?<stdlib.h>??
  • #include?<string.h>??
  • #include?<iostream>??
  • ??
  • #ifdef?MAC??
  • #include?<OpenCL/cl.h>??
  • #else??
  • #include?<CL/cl.h>??
  • #endif??
  • ??
  • int?main()?{??
  • ??
  • ????/*?Host?data?structures?*/??
  • ????cl_platform_id?*platforms;??
  • ????//每一個cl_platform_id?結構表示一個在主機上的OpenCL執行平臺,就是指電腦中支持OpenCL的硬件,如nvidia顯卡,intel?CPU和顯卡,AMD顯卡和CPU等??
  • ????cl_uint?num_platforms;??
  • ????cl_int?i,?err,?platform_index?=?-1;??
  • ??
  • ????/*?Extension?data?*/??
  • ????char*?ext_data;???????????????????????????
  • ????size_t?ext_size;?????
  • ????const?char?icd_ext[]?=?"cl_khr_icd";??
  • ??
  • ????//要使platform工作,需要兩個步驟。1?需要為cl_platform_id結構分配內存空間。2?需要調用clGetPlatformIDs初始化這些數據結構。一般還需要步驟0:詢問主機上有多少platforms??
  • ??
  • ????/*?Find?number?of?platforms?*/??
  • ????//返回值如果為-1就說明調用函數失敗,如果為0標明成功??
  • ????//第二個參數為NULL代表要咨詢主機上有多少個platform,并使用num_platforms取得實際flatform數量。??
  • ????//第一個參數為1,代表我們需要取最多1個platform。可以改為任意大如:INT_MAX整數最大值。但是據說0,否則會報錯,實際測試好像不會報錯。下面是步驟0:詢問主機有多少platforms??
  • ????err?=?clGetPlatformIDs(5,?NULL,?&num_platforms);??????????
  • ????if(err?<?0)?{??????????
  • ????????perror("Couldn't?find?any?platforms.");???????????
  • ????????exit(1);??????????????????????????????
  • ????}?????????????????????????????????????
  • ??
  • ????printf("I?have?platforms:?%d\n",?num_platforms);?//本人計算機上顯示為2,有intel和nvidia兩個平臺??
  • ??
  • ????/*?Access?all?installed?platforms?*/??
  • ????//步驟1?創建cl_platform_id,并分配空間??
  • ????platforms?=?(cl_platform_id*)?????????????????????
  • ????????malloc(sizeof(cl_platform_id)?*?num_platforms);???
  • ????//步驟2?第二個參數用指針platforms存儲platform??
  • ????clGetPlatformIDs(num_platforms,?platforms,?NULL);?????????
  • ??
  • ????/*?Find?extensions?of?all?platforms?*/??
  • ????//獲取額外的平臺信息。上面已經取得了平臺id了,那么就可以進一步獲取更加詳細的信息了。??
  • ????//一個for循環獲取所有的主機上的platforms信息??
  • ????for(i=0;?i<num_platforms;?i++)???
  • ????{??
  • ????????/*?Find?size?of?extension?data?*/??
  • ????????//也是和前面一樣,先設置第三和第四個參數為0和NULL,然后就可以用第五個參數ext_size獲取額外信息的長度了。??
  • ????????err?=?clGetPlatformInfo(platforms[i],?????????????
  • ????????????CL_PLATFORM_EXTENSIONS,?0,?NULL,?&ext_size);??????
  • ????????if(err?<?0)???
  • ????????{??
  • ????????????perror("Couldn't?read?extension?data.");??????????????
  • ????????????exit(1);??
  • ????????}?????
  • ??
  • ????????printf("The?size?of?extension?data?is:?%d\n",?ext_size);//我的計算機顯示224.??
  • ??
  • ????????/*?Access?extension?data?*/????
  • ????????//這里的ext_data相當于一個緩存,存儲相關信息。??
  • ????????ext_data?=?(char*)malloc(ext_size);???
  • ????????//這個函數就是獲取相關信息的函數,第二個參數指明了需要什么樣的信息,如這里的CL_PLATFORM_EXTENSIONS表示是opencl支持的擴展功能信息。我計算機輸出一大串,機器比較新(專門為了學圖形學而購置的電腦),支持的東西比較多。??
  • ????????clGetPlatformInfo(platforms[i],?CL_PLATFORM_EXTENSIONS,???????
  • ????????????ext_size,?ext_data,?NULL);????????????????
  • ????????printf("Platform?%d?supports?extensions:?%s\n",?i,?ext_data);??
  • ??
  • ????????//這里是輸出生產商的名字,比如我顯卡信息是:NVIDIA?CUDA??
  • ????????char?*name?=?(char*)malloc(ext_size);??
  • ????????clGetPlatformInfo(platforms[i],?CL_PLATFORM_NAME,?????
  • ????????????ext_size,?name,?NULL);????????????????
  • ????????printf("Platform?%d?name:?%s\n",?i,?name);??
  • ??
  • ????????//這里是供應商信息,我顯卡信息:NVIDIA?Corporation??
  • ????????char?*vendor?=?(char*)malloc(ext_size);??
  • ????????clGetPlatformInfo(platforms[i],?CL_PLATFORM_VENDOR,???????
  • ????????????ext_size,?vendor,?NULL);??????????????????
  • ????????printf("Platform?%d?vendor:?%s\n",?i,?vendor);??
  • ??
  • ????????//最高支持的OpenCL版本,本機顯示:OpenCL1.1?CUDA?4.2.1??
  • ????????char?*version?=?(char*)malloc(ext_size);??
  • ????????clGetPlatformInfo(platforms[i],?CL_PLATFORM_VERSION,??????
  • ????????????ext_size,?version,?NULL);?????????????????
  • ????????printf("Platform?%d?version:?%s\n",?i,?version);??
  • ??
  • ????????//這個只有兩個值:full?profile?和?embeded?profile??
  • ????????char?*profile?=?(char*)malloc(ext_size);??
  • ????????clGetPlatformInfo(platforms[i],?CL_PLATFORM_PROFILE,??????
  • ????????????ext_size,?profile,?NULL);?????????????????
  • ????????printf("Platform?%d?full?profile?or?embeded?profile?:?%s\n",?i,?profile);??
  • ??
  • ????????/*?Look?for?ICD?extension?*/?????
  • ????????//如果支持ICD這一擴展功能的platform,輸出顯示,本機的Intel和Nvidia都支持這一擴展功能??
  • ????????if(strstr(ext_data,?icd_ext)?!=?NULL)???
  • ????????????platform_index?=?i;??
  • ????????std::cout<<"Platform_index?=?"<<platform_index<<std::endl;??
  • ????????/*?Display?whether?ICD?extension?is?supported?*/??
  • ????????if(platform_index?>?-1)??
  • ????????????printf("Platform?%d?supports?the?%s?extension.\n",???
  • ????????????platform_index,?icd_ext);??
  • ??
  • ????????std::cout<<std::endl;??
  • ??
  • ????????//釋放空間??
  • ????????free(ext_data);??
  • ????????free(name);??
  • ????????free(vendor);??
  • ????????free(version);??
  • ????????free(profile);??
  • ????}??
  • ??????????
  • ????if(platform_index?<=?-1)??
  • ????????printf("No?platforms?support?the?%s?extension.\n",?icd_ext);??
  • ??
  • ????/*?Deallocate?resources?*/??
  • ????free(platforms);??
  • ????return?0;??
  • }???

  • 每個電腦的輸出結果不一樣的,我電腦的輸出結果是:


    OpenCL 查看設備信息

    下面是注釋程序,目的就是查看自己計算機上所有支持OpenCL的設備,并打印信息。

    主函數調用run()就可以運行了。要設置請看我另一篇OpenCl設置文章。

    [cpp] view plaincopyprint?
  • #include?<stdio.h>??
  • #include?<stdlib.h>??
  • #include?<string.h>??
  • ??
  • #ifdef?MAC??
  • #include?<OpenCL/cl.h>??
  • #else??
  • #include?<CL/cl.h>??
  • #endif??
  • ??
  • namespace?device_ext_test??
  • {??
  • ??
  • int?run()?{??
  • ????/*?Host/device?data?structures?*/??
  • ????cl_platform_id?*platforms;??
  • ????cl_device_id?*devices;??
  • ????cl_uint?num_platforms;??
  • ????cl_uint?num_devices,?addr_data;??
  • ????cl_int?i,?err;??
  • ??
  • ????/*?Extension?data?*/??
  • ????char?name_data[48],?ext_data[4096];??
  • ??
  • ????err?=?clGetPlatformIDs(5,?NULL,?&num_platforms);??????????
  • ????if(err?<?0)?{??????????
  • ????????perror("Couldn't?find?any?platforms.");???????????
  • ????????exit(1);??????????????????????????????
  • ????}??
  • ??
  • ????/*?選取所有的platforms*/??
  • ????platforms?=?(cl_platform_id*)?????????????????????
  • ????????malloc(sizeof(cl_platform_id)?*?num_platforms);??
  • ????err?=?clGetPlatformIDs(num_platforms,?platforms,?NULL);???????????
  • ????if(err?<?0)?{??????????????
  • ????????perror("Couldn't?find?any?platforms");??
  • ????????exit(1);??
  • ????}??
  • ??????
  • ????//循環查看所有platforms的devices信息,一般intel和AMD的都可以有兩個devices:CPU和顯卡??
  • ????//如果是nvidia的就一般只有一個顯卡device了。??
  • ????for?(int?j?=?0;?j?<?(int)num_platforms;?j++)??
  • ????{??
  • ????????printf("\nplatform?%d\n",?j+1);??
  • ????????/*?步驟和platforms的一樣?*/??
  • ????????err?=?clGetDeviceIDs(platforms[j],?CL_DEVICE_TYPE_ALL,?1,?NULL,?&num_devices);??
  • ????????if(err?<?0)?{??????????????????
  • ????????????perror("Couldn't?find?any?devices");??
  • ????????????exit(1);??
  • ????????}??
  • ??
  • ????????/*?Access?connected?devices?*/??
  • ????????devices?=?(cl_device_id*)?????????????????????
  • ????????????malloc(sizeof(cl_device_id)?*?num_devices);???????
  • ????????clGetDeviceIDs(platforms[j],?CL_DEVICE_TYPE_ALL,??????????????
  • ????????????num_devices,?devices,?NULL);??????????????????
  • ??
  • ????????/*循環顯示platform的所有device(CPU和顯卡)信息。*/??
  • ????????for(i=0;?i<(int)num_devices;?i++)?{??
  • ??
  • ????????????err?=?clGetDeviceInfo(devices[i],?CL_DEVICE_NAME,?????????
  • ????????????????sizeof(name_data),?name_data,?NULL);??????????????
  • ????????????if(err?<?0)?{??????????
  • ????????????????perror("Couldn't?read?extension?data");??
  • ????????????????exit(1);??
  • ????????????}??
  • ????????????clGetDeviceInfo(devices[i],?CL_DEVICE_ADDRESS_BITS,???????
  • ????????????????sizeof(ext_data),?&addr_data,?NULL);??????????????
  • ??
  • ????????????clGetDeviceInfo(devices[i],?CL_DEVICE_EXTENSIONS,?????????
  • ????????????????sizeof(ext_data),?ext_data,?NULL);????????????
  • ??
  • ????????????printf("NAME:?%s\nADDRESS_WIDTH:?%u\nEXTENSIONS:?%s\n\n",???
  • ????????????????name_data,?addr_data,?ext_data);??
  • ????????}??
  • ????}??
  • ??
  • ????free(platforms);??
  • ????free(devices);??
  • ????printf("\n");??
  • ????system("pause");??
  • ????return?0;??
  • }??
  • ??
  • ??
  • }??



  • OpenCL 操作context

    本程序主要測試:

    context = clCreateContext(NULL, 1, &device, NULL, NULL, &err);

    創建一個context

    clRetainContext(context);//Context的reference +1

    clReleaseContext(context);//Context的reference -1


    [cpp] view plaincopyprint?
  • #include?<stdio.h>??
  • #include?<stdlib.h>??
  • #include?<string.h>??
  • ??
  • #ifdef?MAC??
  • #include?<OpenCL/cl.h>??
  • #else??
  • #include?<CL/cl.h>??
  • #endif??
  • ??
  • namespace?context_count??
  • {??
  • ??
  • int?run()???
  • {??
  • ????cl_platform_id?platform;??
  • ????cl_device_id?device;??
  • ????cl_context?context;??
  • ????cl_int?err;??
  • ????cl_uint?ref_count;??
  • ??
  • ????err?=?clGetPlatformIDs(1,?&platform,?NULL);??
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?find?any?platforms");??
  • ????????exit(1);??
  • ????}??
  • ??
  • ????err?=?clGetDeviceIDs(platform,?CL_DEVICE_TYPE_GPU,?1,?&device,?NULL);??
  • ????if(err?==?CL_DEVICE_NOT_FOUND)?{??
  • ????????err?=?clGetDeviceIDs(platform,?CL_DEVICE_TYPE_CPU,?1,?&device,?NULL);??
  • ????}??
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?find?any?devices");??
  • ????????exit(1);??
  • ????}??
  • ??
  • ????/*?創建?context?*/??
  • ????context?=?clCreateContext(NULL,?1,?&device,?NULL,?NULL,?&err);??
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?create?a?context");??
  • ????????exit(1);?????
  • ????}??
  • ??
  • ????/*?獲取reference?count的數量,使用ref_count返回值*/??
  • ????err?=?clGetContextInfo(context,?CL_CONTEXT_REFERENCE_COUNT,???????
  • ????????sizeof(ref_count),?&ref_count,?NULL);?????????????
  • ????if(err?<?0)?{??????????
  • ????????perror("Couldn't?read?the?reference?count.");??
  • ????????exit(1);??
  • ????}??
  • ????printf("Initial?reference?count:?%u\n",?ref_count);??
  • ??
  • ????/*?每次函數訪問context的時候,調用clRetainContext,就是把context?reference?+?1,因為context并不是像platform和device那樣delete的,而是clRetainContext的時候+1,當調用clReleaseContext的時候-1,當為零的時候,系統自動刪除context。這就可以方便cl_context數據存活超過創建它的函數,可以讓第三方庫什么的繼續訪問context?*/??
  • ????clRetainContext(context);clRetainContext(context);????????????????????????
  • ????clGetContextInfo(context,?CL_CONTEXT_REFERENCE_COUNT,?????????
  • ????????sizeof(ref_count),?&ref_count,?NULL);?????????????
  • ????printf("Reference?count:?%u\n",?ref_count);???????????
  • ??
  • ????clReleaseContext(context);????????????????????????
  • ????clGetContextInfo(context,?CL_CONTEXT_REFERENCE_COUNT,?????????
  • ????????sizeof(ref_count),?&ref_count,?NULL);?????????????
  • ????printf("Reference?count:?%u\n",?ref_count);???????????
  • ??
  • ????clReleaseContext(context);clReleaseContext(context);??????
  • ????system("pause");??
  • ????return?0;??
  • }??
  • ??
  • }??



  • OpenCL 獲取Program信息

    本程序生成一個OpenCL Program,然后獲取Program的source,其實它的source就是一個char[],可以打印出來。

    然后我們把這些內容和原來文本的內容對比,看看是否是我們想要讀入的內容。

    還可以測試是否編譯正確,如果不正確會有輸出提示的。


    下面程序運行如下:



    前面都是讀入的函數代碼。然后后面檢查這些函數是否正確,可以看到第二個函數不正確,因為*r沒有定義。


    下面是完整代碼:

    [cpp] view plaincopyprint?
  • #define?_CRT_SECURE_NO_WARNINGS??
  • ??
  • #include?<stdio.h>??
  • #include?<stdlib.h>??
  • #include?<sys/types.h>??
  • ??
  • #ifdef?MAC??
  • #include?<OpenCL/cl.h>??
  • #else??
  • #include?<CL/cl.h>??
  • #endif??
  • ??
  • namespace?program_build??
  • {??
  • ??
  • const?static?int?NUM_FILES?=?2;??
  • const?char?PROGRAM_FILE_1[]?=?"good.cl";??
  • const?char?*PROGRAM_FILE_2?=?"bad.cl";??
  • ??
  • int?run()??
  • {??
  • ????/*program可以包括多個kernel,一個kernel相當于一個功能函數,由program包含在內存中,然后就可以使用kernel的功能了。?
  • ????1?需要使用kernel,創建program,把kernel讀入內存?
  • ????2?需要把program和device連接起來?
  • ?????Host/device?data?structures?*/??
  • ????cl_platform_id?platform;??
  • ????cl_device_id?device;??
  • ????cl_context?context;??
  • ????cl_int?i,?err;??
  • ??
  • ????/*?Program?data?structures?*/??
  • ????cl_program?program;??
  • ????FILE?*program_handle;??
  • ????char?*program_buffer[NUM_FILES];??
  • ????char?*program_log;??
  • ????const?char?*file_name[]?=?{PROGRAM_FILE_1,?PROGRAM_FILE_2};??
  • ????const?char?options[]?=?"-cl-finite-math-only?-cl-no-signed-zeros";????
  • ????size_t?program_size[NUM_FILES];??
  • ????size_t?log_size;??
  • ??
  • ????/*?Access?the?first?installed?platform?*/??
  • ????err?=?clGetPlatformIDs(1,?&platform,?NULL);??
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?find?any?platforms");??
  • ????????exit(1);??
  • ????}??
  • ??
  • ????/*?Access?the?first?GPU/CPU?*/??
  • ????err?=?clGetDeviceIDs(platform,?CL_DEVICE_TYPE_GPU,?1,?&device,?NULL);??
  • ????if(err?==?CL_DEVICE_NOT_FOUND)?{??
  • ????????err?=?clGetDeviceIDs(platform,?CL_DEVICE_TYPE_CPU,?1,?&device,?NULL);??
  • ????}??
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?find?any?devices");??
  • ????????exit(1);??
  • ????}??
  • ??
  • ????/*?Create?a?context?*/??
  • ????context?=?clCreateContext(NULL,?1,?&device,?NULL,?NULL,?&err);??
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?create?a?context");??
  • ????????exit(1);?????
  • ????}??
  • ??
  • ????/*?Read?each?program?file?and?place?content?into?buffer?array?*/??
  • ????for(i=0;?i<NUM_FILES;?i++)?{??
  • ??
  • ????????program_handle?=?fopen(file_name[i],?"r");??
  • ????????if(program_handle?==?NULL)?{??
  • ????????????perror("Couldn't?find?the?program?file");??
  • ????????????exit(1);?????
  • ????????}??
  • ????????fseek(program_handle,?0,?SEEK_END);??
  • ????????program_size[i]?=?ftell(program_handle);??
  • ????????rewind(program_handle);??
  • ????????program_buffer[i]?=?(char*)malloc(program_size[i]+1);??
  • ????????program_buffer[i][program_size[i]]?=?'\0';??
  • ????????fread(program_buffer[i],?sizeof(char),?program_size[i],???
  • ????????????program_handle);??
  • ????????fclose(program_handle);??
  • ????}??
  • ??
  • ????/*?Create?a?program?containing?all?program?content?*/??
  • ????program?=?clCreateProgramWithSource(context,?NUM_FILES,???????????????
  • ????????(const?char**)program_buffer,?program_size,?&err);????????????????
  • ????if(err?<?0)?{??
  • ????????perror("Couldn't?create?the?program");??
  • ????????exit(1);?????
  • ????}??
  • ??
  • ????/*?Build?program?
  • ????but?one?provision?is?crucial:?every?compiler?must?be?accessible?through?clBuild-Program.?This?function?compiles?and?links?a?cl_program?for?devices?associated?with?the?platform.?It?doesn’t?return?a?new?cl_program,?but?instead?modifies?the?input?data?structure.?
  • ????*/??
  • ??
  • ????err?=?clBuildProgram(program,?1,?&device,?options,?NULL,?NULL);???
  • ??
  • ????int?bufSize?=?program_size[0]?+?program_size[1]?+?1;??
  • ????char?*programBuffer?=?(char?*)?malloc(bufSize);??
  • ????clGetProgramInfo(program,?CL_PROGRAM_SOURCE,?bufSize,?programBuffer,?NULL);??
  • ????printf("Print?Program?Source:\n");??
  • ????printf("\n?%s?\n",?programBuffer);???
  • ??
  • ????printf("Check?if?it?is?correct:\n");??
  • ????for?(int?i?=?0;?i?<?NUM_FILES;?i++)??
  • ????{??
  • ????????printf("\n?%s?\n",?program_buffer[i]);??
  • ????}??
  • ??
  • ????if(err?<?0)???
  • ????{??
  • ????????clGetProgramBuildInfo(program,?device,?CL_PROGRAM_BUILD_LOG,???
  • ????????????0,?NULL,?&log_size);??
  • ????????program_log?=?(char*)?malloc(log_size+1);??
  • ????????program_log[log_size]?=?'\0';??
  • ????????clGetProgramBuildInfo(program,?device,?CL_PROGRAM_BUILD_LOG,???
  • ????????????log_size+1,?program_log,?NULL);??
  • ????????printf("%s\n",?program_log);??
  • ????????free(program_log);??
  • ????????system("pause");??
  • ????????exit(1);??
  • ????}??
  • ??
  • ????/*?Deallocate?resources?*/??
  • ????for(i=0;?i<NUM_FILES;?i++)?{??
  • ????????free(program_buffer[i]);??
  • ????}??
  • ????clReleaseProgram(program);??
  • ????clReleaseContext(context);??
  • ????system("pause");??
  • ??
  • ????return?0;??
  • }??
  • ??
  • }?



  • 總結

    以上是生活随笔為你收集整理的详细程序注解学OpenCL一 环境配置和入门程序的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。