/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ R"===( ////////////////////////////////////////////////////////////////////////////// __kernel void CopyBufferRectBytes2d( __global const char* src, __global char* dst, uint4 SrcOrigin, uint4 DstOrigin, uint2 SrcPitch, uint2 DstPitch ) { int x = get_global_id(0); int y = get_global_id(1); uint LSrcOffset = x + SrcOrigin.x + ( ( y + SrcOrigin.y ) * SrcPitch.x ); uint LDstOffset = x + DstOrigin.x + ( ( y + DstOrigin.y ) * DstPitch.x ); *( dst + LDstOffset ) = *( src + LSrcOffset ); } ////////////////////////////////////////////////////////////////////////////// __kernel void CopyBufferRectBytes3d( __global const char* src, __global char* dst, uint4 SrcOrigin, uint4 DstOrigin, uint2 SrcPitch, uint2 DstPitch ) { int x = get_global_id(0); int y = get_global_id(1); int z = get_global_id(2); uint LSrcOffset = x + SrcOrigin.x + ( ( y + SrcOrigin.y ) * SrcPitch.x ) + ( ( z + SrcOrigin.z ) * SrcPitch.y ); uint LDstOffset = x + DstOrigin.x + ( ( y + DstOrigin.y ) * DstPitch.x ) + ( ( z + DstOrigin.z ) * DstPitch.y ); *( dst + LDstOffset ) = *( src + LSrcOffset ); } )==="