Skip to content

techxzen/opencl-vulkan-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencl-vulkan-snippet

A code example for OpenCL/Vulkan programming.

1. OpenCL example

a. build

build for x86 (need libOpenCL.so)

mkdir build
cd build
cmake ..
make

build for Android (need Android NDK, armv8 libOpenCL.so)

mkdir build-android
cd build-android
cmake -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_C_FLAGS=-march=armv8.4a+dotprod ..
make

b. run

A simple code in kernel/kernel.cl (multiply each element in one array with 2).

./main ../kernel/kernel.cl

About

A code example for OpenCL/Vulkan programming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published