Platforms to show: All Mac Windows Linux Cross-Platform

Back to CLMemMBS class.

CLMemMBS.Constructor(Context as CLContextMBS, Flags as UInt64, ImageFormat as CLImageFormatMBS, Width as Integer, Height as Integer, Depth as Integer, RowPitch as Integer, SlicePitch as Integer, HostPtr as Memoryblock = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a 3D image object.

context: A valid OpenCL context on which the image object is to be created.
flags: A bit-field that is used to specify allocation and usage information about the image memory object being created. See kMemory* constants.
ImageFormat: the image format properties of the image to be allocated.
Width, Height: The width and height of the image in pixels. These must be values greater than or equal to 1.
Depth: The depth of the image in pixels. This must be a value greater than 1.
RowPitch: The scan-line pitch in bytes. This must be 0 if HostPtr is nil and can be either 0 or greater than or equal to Width * size of element in bytes if HostPtr is not nil. If HostPtr is not nil and RowPitch is equal to 0, RowPitch is calculated as Width * size of element in bytes. If RowPitch is not 0, it must be a multiple of the image element size in bytes.
SlicePitch: The size in bytes of each 2D slice in the 3D image. This must be 0 if HostPtr is nil and can be either 0 or greater than or equal to RowPitch * Height if HostPtr is not nil. If HostPtr is not nil and SlicePitch equal to 0, SlicePitch is calculated as RowPitch * Height. If SlicePitch is not 0, it must be a multiple of the RowPitch.
HostPtr: A pointer to the image data that may already be allocated by the application. The size of the buffer that HostPtr points to must be greater than or equal to SlicePitch * image_depth. The size of each element in bytes must be a power of 2. The image data specified by HostPtr is stored as a linear sequence of adjacent 2D slices. Each 2D slice is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of image elements.

Lasterror is set.

See also:

CLMemMBS.Constructor(Context as CLContextMBS, Flags as UInt64, ImageFormat as CLImageFormatMBS, Width as Integer, Height as Integer, RowPitch as Integer, HostPtr as Memoryblock = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a 2D image object.

context: A valid OpenCL context on which the image object is to be created.
flags: A bit-field that is used to specify allocation and usage information about the image memory object being created. See kMemory* constants.
ImageFormat: The format properties of the image to be allocated.
Width and Height: The width and height of the image in pixels. These must be values greater than or equal to 1.
RowPitch: The scan-line pitch in bytes. This must be 0 if HostPtr is nil and can be either 0 or greater than or equal to Width * size of element in bytes if HostPtr is not nil. If HostPtr is not nil and RowPitch is equal to 0, RowPitch is calculated as Width * size of element in bytes. If RowPitch is not 0, it must be a multiple of the image element size in bytes.
HostPtr: A pointer to the image data that may already be allocated by the application. The size of the buffer that HostPtr points to must be greater than or equal to RowPitch * Height. The size of each element in bytes must be a power of 2. The image data specified by HostPtr is stored as a linear sequence of adjacent scanlines. Each scanline is stored as a linear sequence of image elements.

Lasterror is set.

See also:

CLMemMBS.Constructor(Context as CLContextMBS, Flags as UInt64, Size as Integer, HostPtr as Memoryblock = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a new buffer object.

context: A valid OpenCL context used to create the buffer object.
flags: A bit-field that is used to specify allocation and usage information such as the memory arena that should be used to allocate the buffer object and how it will be used. The following table describes the possible values for flags:
size: The size in bytes of the buffer memory object to be allocated.
HostPtr: A memoryblock that may already be allocated by the application. The size of the buffer that HostPtr points to must be greater than or equal to the size bytes.

FlagsDescription
kMemoryReadWriteThis flag specifies that the memory object will be read and written by a kernel. This is the default.
kMemoryWriteOnlyThis flags specifies that the memory object will be written but not read by a kernel. Reading from a buffer or image object created with kMemoryWriteOnly inside a kernel is undefined.
kMemoryReadOnlyThis flag specifies that the memory object is a read-only memory object when used inside a kernel. Writing to a buffer or image object created with kMemoryReadOnly inside a kernel is undefined.
kMemoryUseHostPtrThis flag is valid only if HostPtr is not nil. If specified, it indicates that the application wants the OpenCL implementation to use memory referenced by HostPtr as the storage bits for the memory object. OpenCL implementations are allowed to cache the buffer contents pointed to by HostPtr in device memory. This cached copy can be used when kernels are executed on a device. The result of OpenCL commands that operate on multiple buffer objects created with the same HostPtr or overlapping host regions is considered to be undefined.
kMemoryAllocHostPtrThis flag specifies that the application wants the OpenCL implementation to allocate memory from host accessible memory. kMemoryAllocHostPtr and kMemoryUseHostPtr are mutually exclusive.
kMemoryCopyHostPtrThis flag is valid only if HostPtr is not nil. If specified, it indicates that the application wants the OpenCL implementation to allocate memory for the memory object and copy the data from memory referenced by HostPtr. kMemoryCopyHostPtr and kMemoryUseHostPtr are mutually exclusive. kMemoryCopyHostPtr can be used with kMemoryAllocHostPtr to initialize the contents of the cl_mem object allocated using host-accessible (e.g. PCIe) memory.

Lasterror is set.

See also:

CLMemMBS.Context as CLContextMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return context specified when memory object is created.

Lasterror is set.

CLMemMBS.Flags as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return the flags argument value specified with Constructor.

Lasterror is set.

CLMemMBS.ImageDepth as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return depth of the image in pixels.

For a 2D image, depth equals 0.
Lasterror is set.

CLMemMBS.ImageElementSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return size of each element of the image memory object given by image.

An element is made up of n channels. The value of n is given with image format descriptor.
Lasterror is set.

CLMemMBS.ImageFormat as CLImageFormatMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return image format descriptor.

Lasterror is set.

CLMemMBS.ImageHeight as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return height of image in pixels.

Lasterror is set.

CLMemMBS.ImageRowPitch as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return size in bytes of a row of elements of the image object given by image.

Lasterror is set.

CLMemMBS.ImageSlicePitch as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return size in bytes of a 2D slice for the 3D image object given by image.

For a 2D image object this value will be 0.
Lasterror is set.

CLMemMBS.ImageWidth as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return width of image in pixels.

Lasterror is set.

CLMemMBS.ReferenceCount as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return memory object reference count.

The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.
Lasterror is set.

CLMemMBS.Size as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return actual size of memory object in bytes.

Lasterror is set.

CLMemMBS.Type as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the memory type.

Either normal buffer, image 2D or image 3D.
Lasterror is set.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...