Python wrapper for OpenCL enabling GPU and parallel computing with comprehensive array operations and mathematical functions
86
A Python utility that processes images using GPU acceleration for format conversion and basic manipulation operations.
@generates
def create_image_from_array(context, queue, array):
"""
Create an OpenCL image from a numpy array.
Args:
context: OpenCL context
queue: OpenCL command queue
array: numpy array with shape (height, width, channels) where channels is 3 or 4
Returns:
OpenCL image object
"""
pass
def read_image_to_array(queue, image, shape):
"""
Read an OpenCL image back to a numpy array.
Args:
queue: OpenCL command queue
image: OpenCL image object
shape: tuple of (height, width, channels)
Returns:
numpy array with the image data
"""
pass
def get_supported_image_formats(context):
"""
Get all supported image formats for the context.
Args:
context: OpenCL context
Returns:
list of supported ImageFormat objects
"""
passProvides GPU image creation and manipulation capabilities.
Install with Tessl CLI
npx tessl i tessl/pypi-pyopencldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10