tessl install tessl/pypi-pyopencl@2025.2.0Python wrapper for OpenCL enabling GPU and parallel computing with comprehensive array operations and mathematical functions
Agent Success
Agent success rate when using this tile
86%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.28x
Baseline
Agent success rate without this tile
67%
A GPU-accelerated utility for copying rectangular regions between 2D images efficiently.
Implement a function that copies a rectangular region from a source image to a destination image at a specified target position.
Implement a function that extracts a rectangular sub-region from an image and stores it in a buffer as a packed array.
Implement a function that uploads a rectangular region from a buffer to a specific position in an image.
@generates
def copy_image_region(queue, src_image, dst_image, src_origin, dst_origin, region):
"""
Copy a rectangular region from source image to destination image.
Args:
queue: OpenCL command queue
src_image: Source OpenCL image
dst_image: Destination OpenCL image
src_origin: Tuple (x, y) specifying the source origin
dst_origin: Tuple (x, y) specifying the destination origin
region: Tuple (width, height) specifying the region size
Returns:
Event object for the copy operation
"""
pass
def extract_image_region_to_buffer(queue, src_image, buffer, origin, region):
"""
Extract a rectangular region from an image to a buffer.
Args:
queue: OpenCL command queue
src_image: Source OpenCL image
buffer: Destination OpenCL buffer
origin: Tuple (x, y) specifying the region origin
region: Tuple (width, height) specifying the region size
Returns:
Event object for the copy operation
"""
pass
def upload_buffer_to_image_region(queue, buffer, dst_image, origin, region):
"""
Upload a buffer to a rectangular region in an image.
Args:
queue: OpenCL command queue
buffer: Source OpenCL buffer containing packed pixel data
dst_image: Destination OpenCL image
origin: Tuple (x, y) specifying the destination origin
region: Tuple (width, height) specifying the region size
Returns:
Event object for the copy operation
"""
passProvides GPU computing and OpenCL support for rectangular image and buffer transfers.
@satisfied-by