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

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.57 by root, Tue Apr 24 23:58:34 2012 UTC vs.
Revision 1.58 by root, Wed Apr 25 20:29:03 2012 UTC

1685 1685
1686Calls C<clGetKernelWorkGroupInfo> with C<CL_KERNEL_PRIVATE_MEM_SIZE> and returns the result. 1686Calls 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
1692This is a family of methods to set the kernel argument with the number C<$index> to the give C<$value>. 1726This is a family of methods to set the kernel argument with the number
1693 1727C<$index> to the give C<$value>.
1694TYPE is one of C<char>, C<uchar>, C<short>, C<ushort>, C<int>, C<uint>,
1695C<long>, C<ulong>, C<half>, C<float>, C<double>, C<memory>, C<buffer>,
1696C<image2d>, C<image3d>, C<sampler>, C<local> or C<event>.
1697 1728
1698Chars and integers (including the half type) are specified as integers, 1729Chars and integers (including the half type) are specified as integers,
1699float and double as floating point values, memory/buffer/image2d/image3d 1730float and double as floating point values, memory/buffer/image must be
1700must be an object of that type or C<undef>, local-memory arguments are 1731an object of that type or C<undef>, local-memory arguments are set by
1701set by specifying the size, and sampler and event must be objects of that 1732specifying the size, and sampler and event must be objects of that type.
1702type. 1733
1734Note that C<set_memory> works for all memory objects (all types of buffers
1735and images) - the main purpose of the more specific C<set_TYPE> functions
1736is type checking.
1703 1737
1704Setting an argument for a kernel does NOT keep a reference to the object - 1738Setting an argument for a kernel does NOT keep a reference to the object -
1705for example, if you set an argument to some image object, free the image, 1739for example, if you set an argument to some image object, free the image,
1706and call the kernel, you will run into undefined behaviour. 1740and call the kernel, you will run into undefined behaviour.
1707 1741

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines