1 /*******************************************************************************
3 Associated Filename: kernel.cl
4 Purpose: OpenCL C example checking kernel to glboal memory bandwidth
5 Revision History: Feb 24, 2016
7 *******************************************************************************
8 Copyright (C) 2016 XILINX, Inc.
10 This file contains confidential and proprietary information of Xilinx, Inc. and
11 is protected under U.S. and international copyright and other intellectual
15 This disclaimer is not a license and does not grant any rights to the materials
16 distributed herewith. Except as otherwise provided in a valid license issued to
17 you by Xilinx, and to the maximum extent permitted by applicable law:
18 (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL FAULTS, AND XILINX
19 HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY,
20 INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR
21 FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether
22 in contract or tort, including negligence, or under any other theory of
23 liability) for any loss or damage of any kind or nature related to, arising under
24 or in connection with these materials, including for any direct, or any indirect,
25 special, incidental, or consequential loss or damage (including loss of data,
26 profits, goodwill, or any type of loss or damage suffered as a result of any
27 action brought by a third party) even if such damage or loss was reasonably
28 foreseeable or Xilinx had been advised of the possibility of the same.
31 Xilinx products are not designed or intended to be fail-safe, or for use in any
32 application requiring fail-safe performance, such as life-support or safety
33 devices or systems, Class III medical devices, nuclear facilities, applications
34 related to the deployment of airbags, or any other applications that could lead
35 to death, personal injury, or severe property or environmental damage
36 (individually and collectively, "Critical Applications"). Customer assumes the
37 sole risk and liability of any use of Xilinx products in Critical Applications,
38 subject only to applicable laws and regulations governing limitations on product
41 THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE AT
44 *******************************************************************************/
46 __attribute__ ((reqd_work_group_size(1,1,1)))
47 void bandwidth(__global uint16 * __restrict input0,
48 __global uint16 * __restrict output0,
50 __global uint16 * __restrict input1,
51 __global uint16 * __restrict output1,
60 __attribute__((xcl_pipeline_loop))
61 for (blockindex=0; blockindex<num_blocks; blockindex++) {
62 temp0 = input0[blockindex];
63 output0[blockindex] = temp0;
65 temp1 = input1[blockindex];
66 output1[blockindex] = temp1;