Visible to Intel only — GUID: ewa1452618273400
Ixiasoft
Visible to Intel only — GUID: ewa1452618273400
Ixiasoft
11.1.8. Using an OpenCL Library that Works with Simple Functions (Example 1)
The library_example1 includes a library, a kernel, and a host system. The example1.cl kernel source file includes two kernels. The kernel test_lib uses library functions; the kernel test_builtin uses built-in functions. The host runs both kernels and then compares their outputs and runtimes. Intel® recommends that you use the same strategy to verify your own library functions.
To compile this design example, perform the following tasks:
- Obtain the library_example1 from the OpenCL design examples in the $INTELFPGAOCLSDKROOT/examples_aoc directory.
- Copy it to a local directory.
- Follow the instructions in the README.html file, which is located in the top-level of the example directory.
When you run the compiled host program, it should produce the following output:
Loading example1.aocx ... Create buffers Generate random data for conversion... Enqueuing both library and builtin in kernels 4 times with global size 65536 Kernel computation using library function took 5.35333 seconds Kernel computation using built-in function took 5.39949 seconds Reading results to buffers... Checking results... Library function throughput is within 5% of builtin throughput. PASSED
Did you find the information on this page useful?
Feedback Message
Characters remaining: