国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

DifferencesfromOpenCL1.1to1.2

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 07:52:35
文檔

DifferencesfromOpenCL1.1to1.2

DifferencesfromOpenCL1.1to1.2:This article will be of interest if you dont want to read the whole newspecifications[PDF] for OpenCL1.2. As always, feedback will be much appreciated. After many meetings with t
推薦度:
導(dǎo)讀DifferencesfromOpenCL1.1to1.2:This article will be of interest if you dont want to read the whole newspecifications[PDF] for OpenCL1.2. As always, feedback will be much appreciated. After many meetings with t

This article will be of interest if you don’t want to read the whole newspecifications[PDF] for OpenCL1.2. As always, feedback will be much appreciated. After many meetings with the many members of the OpenCL task force, a lot of ideas sp

This article will be of interest if you don’t want to read the whole new specifications [PDF] for OpenCL 1.2.

As always, feedback will be much appreciated.

After many meetings with the many members of the OpenCL task force, a lot of ideas sprouted. And every 17 or 18 months a new version comes out of OpenCL to give form to all these ideas. You can see totally new ideas coming up and already brought outside in another product by a member. You can also see ideas not appearing at all as other members voted against them. The last category is very interesting and hopefully we’ll see a lot of forum-discussion soon what should be in the next version, as it is missing now.

With the release of 1.2 there was also announced that (at least) two task forces will be erected. One of them will target integration in high-level programming languages, which tells me that phase 1 of creating the standard is complete and we can expect to go for OpenCL 2.0. I will discuss these phases in a follow-up and what you as a user, programmer or customer, can expect… and how you can act on it.

Another big announcement was that Altera is starting to support OpenCL for a FPGA-product. In another article I will let you know everything there is to know. For now, let’s concentrate on the actual differences in this version software-wise, and what you can do with it. I have added links to the 1.1 and 1.2 man-pages, so you can look it up.

New Kernel-functions

The most rudiment debug-tool, printf, first needed to have a vendor-specific extension enabled, but now you can flood the standard output without it. For those who have not tried printf yet, have a global size of 1000, let the CPU print “pingn” and the kernels “pongn”. Then you’ll know exactly why you need to be careful with this function.

The function popcount returns the number of ones in a variable. So if x is 5 (binary 101), then popcount(x) is 2. A nice explanation of fast popcount on SSE is here. It counts bits regardless of what it represents, so it also counts the sign-bit.

Replaced functions

The OpenCL group prefers to change the name of functions when the parameter-list changes. Below you’ll find the “new” functions I encountered.

clEnqueueMarker, clEnqueueBarrier and clEnqueueWaitForEvents have been merged into clEnqueueMarkerWithWaitList and clEnqueueBarrierWithWaitList. The barrier and marker functionality are still the same, but if a non-NULL waiting-list is given it will also continue if all the events have occurred. This was tricky to program before. A new option is that you can fire an event when all previous events have occurred.

clCreateImage2D and clCreateImage3D have been merged into clCreateImage. clCreateFromGLTexture2Dand clCreateFromGLTexture3D have been merged into clCreateFromGLTexture. As the functions were comparable and the parameter texture_target handles the differences, not much has changed. What is new (and a mayor reason for merging these functions) is the adding of 1D images, and support for image-arrays (see below for explanation how they work). 1D images were introduced to be compliant with OpenGL 1D images.

Mem-flags CL_MEM_COPY_HOST_WRITE_ONLY, CL_MEM_COPY_HOST_READ_ONLY and CL_MEM_COPY_HOST_NO_ACCESS have been added to describe how the host can connect to the object at the device, where 1.1 only described how the device could access the object and if the memory was allocated at the device or the host.

clUnloadCompiler got renamed to clUnloadPlatformCompiler, and clGetExtensionFunctionAddress toclGetExtensionFunctionAddressForPlatform – both must now specify a valid platform-reference. This seems to be logical, as clUnloadCompiler probably removed compilers of all platforms, and the function-address seems to be unspecified when more platforms were loaded.

DirectX

Besides the fancy 1D images, support for DirectX 9 and 11 textures also have been added. DX9 is an interesting choice, but this way such software can be given a longer life by adding OpenCL to speed it up. I still disagree with the idea that it has official KHR-support, as it only works under Microsoft code. Under Linux (and all its derivatives like Android) and OSX it is not supported.

The new functions clCreateFromDX9MediaSurfaceKHR, clEnqueueAcquireDX9MediaSurfacesKHR andclEnqueueReleaseDX9MediaSurfacesKHR are comparable to clCreateFromD3D10Texture2DKHR, clEnqueueAcquireD3D10ObjectsKHR and clEnqueueReleaseD3D10ObjectsKHR. clCreateFromD3D11BufferKHR,clCreateFromD3D11Texture2DKHR, clCreateFromD3D11Texture3DKHR,clEnqueueAcquireD3D11ObjectsKHR and clEnqueueReleaseD3D11ObjectsKHR are like their D3D10-counterparts.

Sharing like cl_khr_d3d10_sharing for DX9 and 11 is enabled withcl_khr_dx9_media_sharing and cl_khr_d3d11_sharing. The counterparts ofclGetDeviceIDsFromD3D10KHR are clGetDeviceIDsFromD3D11KHR and clGetDeviceIDsFromDX9MediaAdapterKHR.

Multi-user and Multi-device

As OpenCL-devices get more powerful, it is very probable that the device can be shared better. Also, it gets more common to have multiple GPUs in a system, and/or have various capable devices now CPUs get better support.

clEnqueueMigrateMemObjects helps with multiple devices to copy memory objects from one device to another; first this had to be done by copying via the host.

clCreateSubDevices partitions a device in sub-devices. It can be partitioned in equal parts, specified sizes, or depending on specific hardware. The last option can split the devices based on i.e. cache-hierarchy, so that the different subdevices have shared cache at the given level. The functions clRetainDevice and clReleaseDevice have been altered to handle sub-devices. First this was under the extension device_fission.

Intitalisation of data

clEnqueueFillBuffer and clEnqueueFillImage help with initialising data by filling it with a pattern or a colour. This was first best done at the host, or with a kernel specially written for it, or just ignored. Our lives have improved.

Building

It seems that more effort is put in making sure the kernels are better protected. The function clBuildProgram can be split up between clCompileProgram and clLinkProgram. If I understand correctly, it is comparable to how clCreateProgramWithBinary works, as this takes compiled binaries.

clGetProgramInfo en clGetProgramBuildInfo have been extended to get information on how the program has been built. The new function clGetKernelArgInfo returns specified information on the arguments used for building the kernel. This is useful when the building of the software is separated from the program. Such is the case when binaries are used.

Image arrays

An array of 1D or 2D images can be written by write_image{f|i|ui|h}. The image ID is given by the y (1D) or z (2D) value. With read_image{f|i|ui|h} you need to specify the coordinates plus the image-number, int2 for 1D and int3 for 2D images.

The kernel-function get_image_array_size returns the number of images in an array. It is the responsibility of the software to keep things in order, as it does not give an array of image-numbers.

Other

Macros CL_VERSION_1_2 and __OPENCL_C_VERSION__ have been added. The first gives a 1 when supported, or 0 when not. The latter gives 120 for version 1.2.

Double-precision is now an optional core feature instead of an extension. Meaning, you just need to check if the device supports it, but you don’t need to pragma it in.

CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE has been deprecated. It gives the smallest alignment in bytes which can be used for any data type. It is quite comparable to CL_DEVICE_MEM_BASE_ADDR_ALIGN. This could help select the best device for an alignment-optimised kernel, but is rarely used.

A new flag CL_MAP_WRITE_INVALIDATE_REGION has been added to cl_map_flags. This is comparable to CL_MAP_WRITE, but without guarantees memory is not being overwritten.

Storage class specifiers extern and static are now supported. A storage class settles the scope of the variable (c definition here).

Video

Tim Mattson of Intel explains some of the highlights of OpenCL 1.2 in this 12 minute video

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

DifferencesfromOpenCL1.1to1.2

DifferencesfromOpenCL1.1to1.2:This article will be of interest if you dont want to read the whole newspecifications[PDF] for OpenCL1.2. As always, feedback will be much appreciated. After many meetings with t
推薦度:
標(biāo)簽: 1.2 1. to
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 欧美色欧美亚洲另类 | 国产成人精品一区二区三区… | 免费一级a毛片在线播放直播 | 成人区精品一区二区不卡亚洲 | 成人免费久久精品国产片久久影院 | 国产一精品一aⅴ一免费 | 亚洲欧美日韩国产色另类 | 在线日韩理论午夜中文电影 | 国内精品久久久久久久aa护士 | 亚洲精品乱码久久久久久 | 成人在线一区二区 | 亚洲欧美另类自拍第一页 | 国产亚洲婷婷香蕉久久精品 | 欧美videos极品另类 | 亚洲一区二区久久 | 免费一区二区三区免费视频 | 九九久久香港经典三级精品 | 久久久久久久国产精品毛片 | 欧美一区二区三区在线 | 欧美aa在线观看 | 成人国产精品久久久免费 | 国产精品大全国产精品 | 亚洲欧洲日韩国产 | 羞羞色院91精品网站 | 国产一区二区精品久久 | 久久成人a毛片免费观看网站 | 97精品国产91久久久久久久 | 国内精品久久久久影院不卡 | 国产精品综合一区二区 | 欧美精品第二页 | 香蕉视频日本 | 日韩毛片在线影视 | 欧美日韩啪啪 | 日韩电影一区二区 | 日韩成人在线视频 | 欧美2区| 成人区精品一区二区毛片不卡 | 成人国产激情福利久久精品 | 欧美成人精品高清在线播放 | 精品国产一区二区三区2021 | 国产精品久久久久久久久久久不卡 |