I am attempting to write a short application that uses OpenCL 1.2 (not for distribution, so universal access is not an issue) to do a computation. However, OpenCL is giving me a bit of trouble on Android. I have, on my computer, the libopencl.so file and the 1.2 headers from the AMD SDK. The question is: how do I properly use them?
Where in the gradle (newest version) build file do I specify this, or can someone recommend a good place for me to turn to to read up on this? Or, what do I need to understand theoretically for me to figure out on my own - what is required to properly link to the OpenCL libraries?
I've already tried the answer mentioned here: Android Studio fatal error: CL/cl.h No such file or directory
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 21
buildToolsVersion ="22.0.1"
defaultConfig.with {
applicationId = "com.example.thing"
minSdkVersion.apiLevel = 14
targetSdkVersion.apiLevel = 14
}
}
/*
* native build settings
*/
android.ndk {
moduleName = "otherThing"
ldLibs += "log"
ldLibs += "android"
//cFlags "~/OpenCL1-2HeaderFiles"
}
android.buildTypes {
release {
isMinifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.productFlavors {
create("arm") {
ndk.abiFilters += "armeabi"
}
create("arm7") {
ndk.abiFilters += "armeabi-v7a"
}
create("arm8") {
ndk.abiFilters += "arm64-v8a"
}
create("x86") {
ndk.abiFilters += "x86"
}
create("x86-64") {
ndk.abiFilters += "x86_64"
}
create("mips") {
ndk.abiFilters += "mips"
}
create("mips-64") {
ndk.abiFilters += "mips64"
}
create("all")
}
}
Thanks