ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/OpenCL.pm
(Generate patch)

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.59 by root, Wed Apr 25 20:49:13 2012 UTC vs.
Revision 1.60 by root, Wed Apr 25 21:48:44 2012 UTC

1686 1686
1687Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. 1687Calls 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
1693Sets the arguments of a kernel. Since OpenCL 1.1 doesn't have a generic
1694way to set arguments (and with OpenCL 1.2 it might be rather slow), you
1695need to specify a format argument, much as with C<printf>, to tell OpenCL
1696what type of argument it is.
1697
1698The 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
1719Space characters in the format string are ignored.
1720
1721Example: 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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines