… | |
… | |
1685 | |
1685 | |
1686 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. |
1686 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. |
1687 | |
1687 | |
1688 | =for gengetinfo end kernel_work_group |
1688 | =for gengetinfo end kernel_work_group |
1689 | |
1689 | |
1690 | =item $kernel->set_TYPE ($index, $value) |
1690 | =item $kernel->set_TYPE ($index, $value) |
1691 | |
1691 | |
|
|
1692 | =item $kernel->set_char ($index, $value) |
|
|
1693 | |
|
|
1694 | =item $kernel->set_uchar ($index, $value) |
|
|
1695 | |
|
|
1696 | =item $kernel->set_short ($index, $value) |
|
|
1697 | |
|
|
1698 | =item $kernel->set_ushort ($index, $value) |
|
|
1699 | |
|
|
1700 | =item $kernel->set_int ($index, $value) |
|
|
1701 | |
|
|
1702 | =item $kernel->set_uint ($index, $value) |
|
|
1703 | |
|
|
1704 | =item $kernel->set_long ($index, $value) |
|
|
1705 | |
|
|
1706 | =item $kernel->set_ulong ($index, $value) |
|
|
1707 | |
|
|
1708 | =item $kernel->set_half ($index, $value) |
|
|
1709 | |
|
|
1710 | =item $kernel->set_float ($index, $value) |
|
|
1711 | |
|
|
1712 | =item $kernel->set_double ($index, $value) |
|
|
1713 | |
|
|
1714 | =item $kernel->set_memory ($index, $value) |
|
|
1715 | |
|
|
1716 | =item $kernel->set_buffer ($index, $value) |
|
|
1717 | |
|
|
1718 | =item $kernel->set_image ($index, $value) |
|
|
1719 | |
|
|
1720 | =item $kernel->set_sampler ($index, $value) |
|
|
1721 | |
|
|
1722 | =item $kernel->set_local ($index, $value) |
|
|
1723 | |
|
|
1724 | =item $kernel->set_event ($index, $value) |
|
|
1725 | |
1692 | This is a family of methods to set the kernel argument with the number C<$index> to the give C<$value>. |
1726 | This is a family of methods to set the kernel argument with the number |
1693 | |
1727 | C<$index> to the give C<$value>. |
1694 | TYPE is one of C<char>, C<uchar>, C<short>, C<ushort>, C<int>, C<uint>, |
|
|
1695 | C<long>, C<ulong>, C<half>, C<float>, C<double>, C<memory>, C<buffer>, |
|
|
1696 | C<image2d>, C<image3d>, C<sampler>, C<local> or C<event>. |
|
|
1697 | |
1728 | |
1698 | Chars and integers (including the half type) are specified as integers, |
1729 | Chars and integers (including the half type) are specified as integers, |
1699 | float and double as floating point values, memory/buffer/image2d/image3d |
1730 | float and double as floating point values, memory/buffer/image must be |
1700 | must be an object of that type or C<undef>, local-memory arguments are |
1731 | an object of that type or C<undef>, local-memory arguments are set by |
1701 | set by specifying the size, and sampler and event must be objects of that |
1732 | specifying the size, and sampler and event must be objects of that type. |
1702 | type. |
1733 | |
|
|
1734 | Note that C<set_memory> works for all memory objects (all types of buffers |
|
|
1735 | and images) - the main purpose of the more specific C<set_TYPE> functions |
|
|
1736 | is type checking. |
1703 | |
1737 | |
1704 | Setting an argument for a kernel does NOT keep a reference to the object - |
1738 | Setting an argument for a kernel does NOT keep a reference to the object - |
1705 | for example, if you set an argument to some image object, free the image, |
1739 | for example, if you set an argument to some image object, free the image, |
1706 | and call the kernel, you will run into undefined behaviour. |
1740 | and call the kernel, you will run into undefined behaviour. |
1707 | |
1741 | |