Platforms to show: All Mac Windows Linux Cross-Platform

Back to CLKernelMBS class.

CLKernelMBS.Constructor(Program as CLProgramMBS, KernelName as string)

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

Program: A program object with a successfully built executable.
KernelName: A function name in the program declared with the __kernel qualifier

A kernel is a function declared in a program. A kernel is identified by the __kernel qualifier applied to any function in a program. A kernel object encapsulates the specific __kernel function declared in a program and the argument values to be used when executing this __kernel function.
Lasterror is set.

CLKernelMBS.FunctionName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return the kernel function name.

Lasterror is set.

CLKernelMBS.GetKernelCompileWorkGroupSize(device as CLDeviceMBS, byref X as Int64, byref Y as Int64, byref Z as Int64)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the work-group size specified by the __attribute__((reqd_work_gr oup_size(X, Y, Z))) qualifier.

device: Identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a nil value.

If the work-group size is not specified using the above attribute qualifier (0, 0, 0) is returned.
Lasterror is set.

CLKernelMBS.GetKernelLocalMemorySize(device as CLDeviceMBS = nil) as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the amount of local memory in bytes being used by a kernel.

device: Identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a nil value.

This includes local memory that may be needed by an implementation to execute the kernel, variables declared inside the kernel with the __local address qualifier and local memory to be allocated for arguments to the kernel declared as pointers with the __local address qualifier and whose size is specified with clSetKernelArg.

If the local memory size, for any pointer argument to the kernel declared with the __local address qualifier, is not specified, its size is assumed to be 0.
Lasterror is set.

CLKernelMBS.GetKernelWorkGroupSize(device as CLDeviceMBS = nil) as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
This provides a mechanism for the application to query the work-group size that can be used to execute a kernel on a specific device given by device.

device: Identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a nil value.

The OpenCL implementation uses the resource requirements of the kernel (register usage etc.) to determine what this work-group size should be.
Lasterror is set.

Some examples using this method:

CLKernelMBS.NumberOfArguments as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Return the number of arguments to kernel.

Lasterror is set.

CLKernelMBS.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 the kernel 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.

CLKernelMBS.SetKernelArgDouble(index as Integer, value as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the kernel argument with the given index.

index: The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
value: the value.

We have currently setters for Int32, Int64, Float, Double and CLMemMBS. Please email for additional types.
Lasterror is set.

CLKernelMBS.SetKernelArgFloat(index as Integer, value as Single)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the kernel argument with the given index.

index: The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
value: the value.

We have currently setters for Int32, Int64, Float, Double and CLMemMBS. Please email for additional types.
Lasterror is set.

CLKernelMBS.SetKernelArgInt32(index as Integer, value as Int32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the kernel argument with the given index.

index: The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
value: the value.

We have currently setters for Int32, Int64, Float, Double and CLMemMBS. Please email for additional types.
Lasterror is set.

Some examples using this method:

CLKernelMBS.SetKernelArgInt64(index as Integer, value as Int64)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the kernel argument with the given index.

index: The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
value: the value.

We have currently setters for Int32, Int64, Float, Double and CLMemMBS. Please email for additional types.
Lasterror is set.

CLKernelMBS.SetKernelArgMem(index as Integer, mem as CLMemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the kernel argument with the given index.

index: The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
value: the memory object to set for argument.

We have currently setters for Int32, Int64, Float, Double and CLMemMBS. Please email for additional types.
Lasterror is set.

Some examples using this method:

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


The biggest plugin in space...