OpenCL size_t Error

Source: Internet
Author: User

There is a problem with the programming test:

1, increase kernel when the OpenCL compile error, AMD platform Error said that the source kernel cannot generate the corresponding executable program object;

2, but the same set of code on the Intel E3 can operate normally;

Obviously, it is also a implementation-dependent problem;

This problem is in the implementation of size_t, has been experimental validation, here (LINK) has a simple description, the use of their own programming size_t did not comply with Opencl-restriction,

After all, for this platform-related type, coder best to follow the manual requirements ....

Arguments to __kernel functions in a program cannot is declared with the built-in scalar types bool, half, size_t, PTR diff_t, intptr_t, and uintptr_t. The size in bytes of these types except half is implementation-defined and in addition can also is different for the Open CL device and the host processor making it difficult to allocate buffer objects to being passed as arguments to a kernel decl Ared as pointer to these types. Half is isn't supported as half can be used as a storage format only and are not a data type on which floating-point arithmet IC can be performed.

Make a Memory:

Size_t can is a 32-bit or a 64-bit unsigned integer, and the OpenCL compiler does not accept variable types that is Imple Mentation-dependent.

OpenCL size_t Error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.