setImageblockWidth(_:height:)
Sets the size, in pixels, of imageblock data in tile memory.
Declaration
func setImageblockWidth(_ width: Int, height: Int)Parameters
- width:
The width of the imageblock, in pixels.
- height:
The height of the imageblock, in pixels.
Discussion
Both imageblocks and threadgroup memory share the available space you can reserve in tile memory, so the sum of these allocations can’t exceed the maximum total tile memory limit. To find the amount of memory used by an imageblock, call imageblockMemoryLength(forDimensions:). Kernels accessing an imageblock argument from threadgroup memory have the [[threadgroup_imageblock]] attribute.
To learn more about using imageblocks, see the following sections in the Metal Shading Language Specification:
For information on the
threadgroup_imageblockaddress space, see Section 4.5.For information on the
imageblocktype, see Section 2.11.