… | |
… | |
1686 | |
1686 | |
1687 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. |
1687 | Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. |
1688 | |
1688 | |
1689 | =for gengetinfo end kernel_work_group |
1689 | =for gengetinfo end kernel_work_group |
1690 | |
1690 | |
|
|
1691 | =item $kernel->setf ($format, ...) |
|
|
1692 | |
|
|
1693 | Sets the arguments of a kernel. Since OpenCL 1.1 doesn't have a generic |
|
|
1694 | way to set arguments (and with OpenCL 1.2 it might be rather slow), you |
|
|
1695 | need to specify a format argument, much as with C<printf>, to tell OpenCL |
|
|
1696 | what type of argument it is. |
|
|
1697 | |
|
|
1698 | The format arguments are single letters: |
|
|
1699 | |
|
|
1700 | c char |
|
|
1701 | C unsigned char |
|
|
1702 | s short |
|
|
1703 | S unsigned short |
|
|
1704 | i int |
|
|
1705 | I unsigned int |
|
|
1706 | l long |
|
|
1707 | L unsigned long |
|
|
1708 | |
|
|
1709 | h half float (0..65535) |
|
|
1710 | f float |
|
|
1711 | d double |
|
|
1712 | |
|
|
1713 | z local (octet size) |
|
|
1714 | |
|
|
1715 | m memory object (buffer or image) |
|
|
1716 | a sampler |
|
|
1717 | e event |
|
|
1718 | |
|
|
1719 | Space characters in the format string are ignored. |
|
|
1720 | |
|
|
1721 | Example: set the arguments for a kernel that expects an int, two floats, a buffer and an image. |
|
|
1722 | |
|
|
1723 | $kernel->setf ("i ff mm", 5, 0.5, 3, $buffer, $image); |
|
|
1724 | |
1691 | =item $kernel->set_TYPE ($index, $value) |
1725 | =item $kernel->set_TYPE ($index, $value) |
1692 | |
1726 | |
1693 | =item $kernel->set_char ($index, $value) |
1727 | =item $kernel->set_char ($index, $value) |
1694 | |
1728 | |
1695 | =item $kernel->set_uchar ($index, $value) |
1729 | =item $kernel->set_uchar ($index, $value) |