OpenCL:修订间差异

求闻百科,共笔求闻
添加的内容 删除的内容
(机器人:替换来源列表模板参数)
(机器人:清理不当的来源、移除无用的模板参数)
第26行: 第26行:
OpenCL最初由[[苹果公司]]开发,拥有其商标权,并在与[[AMD]],[[IBM]],[[Intel]]和[[NVIDIA]]技术团队的合作之下初步完善。随后,苹果将这一草案提交至[[Khronos Group]]。
OpenCL最初由[[苹果公司]]开发,拥有其商标权,并在与[[AMD]],[[IBM]],[[Intel]]和[[NVIDIA]]技术团队的合作之下初步完善。随后,苹果将这一草案提交至[[Khronos Group]]。


2008年6月16日,Khronos的通用计算工作小组成立<ref>{{cite press release |url=http://www.khronos.org/news/press/releases/khronos_launches_heterogeneous_computing_initiative/ |title=Khronos Launches Heterogeneous Computing Initiative |accessdate=2008-06-18 |publisher=Khronos Group |date=2008-06-16 |deadurl=yes |archiveurl=https://web.archive.org/web/20080620123431/http://www.khronos.org/news/press/releases/khronos_launches_heterogeneous_computing_initiative/ |archivedate=2008-06-20 }}</ref>。5个月后的2008年11月18日,该工作组完成了OpenCL 1.0规范的技术细节<ref name=macWorld>{{cite web | url=http://www.macworld.com/article/136921/2008/11/opencl.html?lsrc=top_2 | title=OpenCL gets touted in Texas | publisher=MacWorld | date=2008-11-20 | accessdate=2009-06-12 | archive-date=2009-02-18 | archive-url=https://web.archive.org/web/20090218165557/http://www.macworld.com/article/136921/2008/11/opencl.html?lsrc=top_2 | dead-url=no }}</ref>。该技术规范在由Khronos成员进行审查之后,于2008年12月8日公开发表<ref name=khronosGroup>{{cite press release | url=http://www.khronos.org/news/press/releases/the_khronos_group_releases_opencl_1.0_specification/ | title=The Khronos Group Releases OpenCL 1.0 Specification | publisher=Khronos Group | date=2008-12-08 | accessdate=2009-06-12 | deadurl=yes | archiveurl=https://web.archive.org/web/20100713014204/http://www.khronos.org/news/press/releases/the_khronos_group_releases_opencl_1.0_specification/ | archivedate=2010-07-13 }}</ref>。2010年6月14日,OpenCL 1.1发布<ref>{{cite press release | url=http://www.khronos.org/news/press/releases/khronos-group-releases-opencl-1-1-parallel-computing-standard/ | title=Khronos Drives Momentum of Parallel Computing Standard with Release of OpenCL 1.1 Specification | publisher=Khronos Group | date=2010-06-14 | accessdate=2010-10-13 | deadurl=yes | archiveurl=https://web.archive.org/web/20100923101844/http://www.khronos.org/news/press/releases/khronos-group-releases-opencl-1-1-parallel-computing-standard | archivedate=2010-09-23 }}</ref>。
2008年6月16日,Khronos的通用计算工作小组成立<ref>{{cite press release |url=http://www.khronos.org/news/press/releases/khronos_launches_heterogeneous_computing_initiative/ |title=Khronos Launches Heterogeneous Computing Initiative |accessdate=2008-06-18 |publisher=Khronos Group |date=2008-06-16 |||}}</ref>。5个月后的2008年11月18日,该工作组完成了OpenCL 1.0规范的技术细节<ref name=macWorld>{{cite web | url=http://www.macworld.com/article/136921/2008/11/opencl.html?lsrc=top_2 | title=OpenCL gets touted in Texas | publisher=MacWorld | date=2008-11-20 | accessdate=2009-06-12 | | | }}</ref>。该技术规范在由Khronos成员进行审查之后,于2008年12月8日公开发表<ref name=khronosGroup>{{cite press release | url=http://www.khronos.org/news/press/releases/the_khronos_group_releases_opencl_1.0_specification/ | title=The Khronos Group Releases OpenCL 1.0 Specification | publisher=Khronos Group | date=2008-12-08 | accessdate=2009-06-12 | | | }}</ref>。2010年6月14日,OpenCL 1.1发布<ref>{{cite press release | url=http://www.khronos.org/news/press/releases/khronos-group-releases-opencl-1-1-parallel-computing-standard/ | title=Khronos Drives Momentum of Parallel Computing Standard with Release of OpenCL 1.1 Specification | publisher=Khronos Group | date=2010-06-14 | accessdate=2010-10-13 | | | }}</ref>。


== 范例 ==
== 范例 ==
=== 快速傅立叶变换 ===
=== 快速傅立叶变换 ===
一个[[快速傅立叶变换]]的式子:
一个[[快速傅立叶变换]]的式子:
<ref name=siggraph>{{cite web | url=http://s08.idav.ucdavis.edu/munshi-opencl.pdf | title=OpenCL | accessdate=2008-08-14 | publisher=SIGGRAPH2008 | date=2008-08-14 | archive-url=https://www.webcitation.org/66GmScoh5?url=http://s08.idav.ucdavis.edu/munshi-opencl.pdf | archive-date=2012-03-19 | dead-url=yes }}</ref>
<ref name=siggraph>{{cite web | url=http://s08.idav.ucdavis.edu/munshi-opencl.pdf | title=OpenCL | accessdate=2008-08-14 | publisher=SIGGRAPH2008 | date=2008-08-14 | | | }}</ref>
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
// create a compute context with GPU device
// create a compute context with GPU device
第64行: 第64行:
</syntaxhighlight>
</syntaxhighlight>


真正的运算:(基于[http://www.cs.berkeley.edu/~kubitron/courses/cs258-S08/projects/reports/project6_report.pdf Fitting FFT onto the G80 Architecture])<ref name=VolkovKazianFFTG80>{{cite web | url=http://www.cs.berkeley.edu/~kubitron/courses/cs258-S08/projects/reports/project6_report.pdf | title=Fitting FFT onto G80 Architecture | accessdate=2008-11-14 | publisher=Vasily Volkov and Brian Kazian, UC Berkeley CS258 project report | format=PDF | date=May 2008 | archive-date=2012-03-19 | archive-url=https://www.webcitation.org/66GmTA1HM?url=http://www.cs.berkeley.edu/~kubitron/courses/cs258-S08/projects/reports/project6_report.pdf | dead-url=no }}</ref>
真正的运算:(基于[http://www.cs.berkeley.edu/~kubitron/courses/cs258-S08/projects/reports/project6_report.pdf Fitting FFT onto the G80 Architecture])<ref name=VolkovKazianFFTG80>{{cite web | url=http://www.cs.berkeley.edu/~kubitron/courses/cs258-S08/projects/reports/project6_report.pdf | title=Fitting FFT onto G80 Architecture | accessdate=2008-11-14 | publisher=Vasily Volkov and Brian Kazian, UC Berkeley CS258 project report | format=PDF | date=May 2008 | | | }}</ref>
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
// This kernel computes FFT of length 1024. The 1024 length FFT is decomposed into
// This kernel computes FFT of length 1024. The 1024 length FFT is decomposed into
第100行: 第100行:
</syntaxhighlight>
</syntaxhighlight>
Apple的网站上可以发现傅立叶变换的例子<ref name=AppleOpenCLFFT>.
Apple的网站上可以发现傅立叶变换的例子<ref name=AppleOpenCLFFT>.
{{cite web | url=https://developer.apple.com/mac/library/samplecode/OpenCL_FFT/index.html | title=OpenCL on FFT | accessdate=2009-12-07 | publisher=Apple | date=16 Nov 2009 | archive-date=2009-11-30 | archive-url=https://web.archive.org/web/20091130085543/http://developer.apple.com/mac/library/samplecode/OpenCL_FFT/index.html | dead-url=no }}</ref>
{{cite web | url=https://developer.apple.com/mac/library/samplecode/OpenCL_FFT/index.html | title=OpenCL on FFT | accessdate=2009-12-07 | publisher=Apple | date=16 Nov 2009 | | | }}</ref>


=== 平行合并排序法 ===
=== 平行合并排序法 ===
第244行: 第244行:
== 外部链接 ==
== 外部链接 ==
* [https://www.khronos.org/conformance/adopters/conformant-products/opencl 支援OpenCL的产品]
* [https://www.khronos.org/conformance/adopters/conformant-products/opencl 支援OpenCL的产品]
* [https://web.archive.org/web/20190122085224/http://www.opengpu.org/ 开源GPU社区]{{zh-cn}}
* [http://www.opengpu.org/ 开源GPU社区]{{zh-cn}}


== 参见 ==
== 参见 ==