(width, height)
Use PyCuda
Use PyCuda
Use PyCuda
def process(width, height):
    """ Use PyCuda """
    grid_dimensions   = (width//16,height//16)

    source_mapping = pycuda_source_pbo.map()
    dest_mapping   = pycuda_dest_pbo.map()

    invert.prepared_call(grid_dimensions, (16, 16, 1),
            source_mapping.device_ptr(),
            dest_mapping.device_ptr())

    cuda_driver.Context.synchronize()

    source_mapping.unmap()
    dest_mapping.unmap()
def process ( width , height ) : grid_dimensions = ( width // 16 , height // 16 ) source_mapping = pycuda_source_pbo . map ( ) dest_mapping = pycuda_dest_pbo . map ( ) invert . prepared_call ( grid_dimensions , ( 16 , 16 , 1 ) , source_mapping . device_ptr ( ) , dest_mapping . device_ptr ( ) ) cuda_driver . Context . synchronize ( ) source_mapping . unmap ( ) dest_mapping . unmap ( )