引用 AES Decryption: Optimized implementation of an AES-128 ECB Encrypt in Software, followed by OpenCL Decryption. Bitcoin Miner: This is a patch and build infrastructure for building the bfgminer application. Edge Detection: Implementation of a Sobel Edge Detector. Hello: Hello application demonstrating the use of printf in a kernel. Histogram Equalizer: Optimized implementation of a 12-bit histogram equalizer. Huffman Codec: Optimized implementation of Huffman encoding/decoding algorithm. Median Filter: Optimized implementation of a median filter for image noise reduction. Nearest Neighbor: Optimized implementation of nearest neighbor linear search algorithm. RSA: Optimized implementation of the RSA decryption algorithm. SHA-1: Optimized implementation of SHA1 secure hashing algorithm. Tiny Encryption: Optimized implementation of the tiny encryption algorithm. Vector Add: Example of vector addition in OpenCL. Vector Dot Product: Example of vector dotproduct operation. Vector Mult/Add: Reuse of data stored in the DDR across kernels in different binary containers. Watermarking: Example of image watermarking.
この中で、Nearest Neighbor Linear Search Exampleのカーネルコードは、OpenCLではなく、C++のコードですね。
C++のコードをOpenCLから呼び出せるようにしているようですね。
C++のコードをOpenCLから呼び出せるようにしているようですね。
linear_search_sv.tclに、
# Kernel Definition create_kernel krnl_linear_search -type c add_files -kernel [get_kernels krnl_linear_search] "krnl_linear_search.cpp"にあり、カーネルのタイプにCと指定することで、C++/CのコードでもOpenCLのカーネルにできるようです。