How to configure OpenCL environment for android platform either in windows or linux using any IDE? I want to make use of GPU using OpenCL for smartphone.
Configuring OpenCl over Android Platform
1.1k views Asked by Harsh Yadav At
2
There are 2 answers
0
Robert Wang
On
Basically, to develop OpenCL program/applications for Android, the followings are what you need:
- Android SDK, Android NDK
- Cygwin (if under windows)
- OpenCL header file (could be downloaded from Khronos website)
OpenCL lib file. For different chip vendor, this library is located under different path. See here for details.
Develop OpenCL program in C/C++. compile with ndk-build to a shared library.
- Develop your application using Android Studio. Use JNI to call your OpenCL-related functions from the native shared library.
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in CONFIGURATION
- Ubuntu wsl2 in windows, my /etc/fonts/fonts.conf keeps reloading
- I am trying to run java application in Eclipse, When I try to do Run > Run as > Java Application it starts to show little processing but nothing happe
- CISCO refuses to turn off spanning tree for specific vlans
- Resolve paths dynamically based on directory where test (or tested files) is located in Jest
- `android` Does Not Exist in `~/Android/Sdk/platform-tools`
- jboss configuration via ipv6 version jboss-eap-7.4
- I can't find a conenction diagarm for the OV7670 camera to the ESP8266
- Locally testing OS environmental variables in Ballerina
- Why is the build configuration always choosing production?
- App Configuration affecting VS Web Server Hosting
- IServiceCollectionConfigurator' does not contain a definition for 'UsingRabbitMq'
- Localhost Not Working After Creating Virtual Host in XAMPP
- Why am i unable to download MySql?
- Azure App Configuration - Replica for 429 HTTP responses
- TYPO3: tx-form custom fluid templates and class for submit button
Related Questions in OPENCL
- What is the parameter for CLI YOLOv8 predict to use Intel GPU?
- How to exploit Unified Memory in OpenCL with CL_MEM_ALLOC_HOST_PTR flag?
- PyOpenCl code hanging on a simple get() - how can I troubleshoot?
- OpenCL dynamic parallelism enqueue_kernel() functionality
- Do all OpenCL drivers come with the IntelOneAPI compiler
- How to move an array of structures to the GPU?
- Passing arguments to OpenCL kernel, before execution finished
- OpenCV acceleration (OpenCL) of gaussian blur
- CL_DEVICE_NOT_AVAILABLE using Intel(R)Xeon(R)Gold 6240 CPU
- Launch Single Kernel on problem space vs Launch same kernel, multiple times on smaller problem spaces
- Running OpenCL programs on baremetal RISC-V core
- Why did an OpenCL rendering optimization make my code slower?
- OpenCL Kernel hangs at clEnqueueReadBuffer on AMD rocm
- Is it possible to assign works to each GPU thread instead of a work to group of GPU threads?
- Fast way to rearrange bit into new byte
Related Questions in GPGPU
- OpenCL dynamic parallelism enqueue_kernel() functionality
- Sign a PGP public key using a private key and password, then save the signed key to a file
- Passing arguments to OpenCL kernel, before execution finished
- CUDA kernel for finding the min and max index of values in a 1D array greater than particular threshold
- Cuda __device__ member function with explicit template declaration
- AMD GPU Compute with c++
- Why is webgpu on mac "max binding size" much smaller than reported "max buffer size"?
- Running multiple times a python script from different threads using different gpus
- GPGPU with Radeon Pro VII in Windows
- Pytorch Memory Management Issue
- Perform vector calculation on GPU in C++, regardless of brand
- Reinterpret cast on *shared memory*
- Can I really launch a library kernel (CUkernel) rather than an in-context kernel (CUfunction)?
- How to use shared memory in PyCuda, LogicError: cuModuleLoadDataEx failed: an illegal memory access was encountered
- What (if anything) is this GPU compute or shader pattern called?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Android does not have official support for OpenCL and Google is openly hostile towards it, going to far as to remove unofficial drivers http://www.anandtech.com/show/7191/android-43-update-for-nexus-10-and-4-removes-unofficial-opencl-drivers . Even if your hardware still has OpenCL drivers you cannot distribute the app in Google Play, so it's practically useless.
For Android you are better off using Google's Renderscript (the reason why they hate OpenCL, they want their solution to be used) http://developer.android.com/guide/topics/renderscript/compute.html
You can write certain algorithms easily using Renderscript. It's basically like OpenCL but it has no concept of local memory and accessing thread id is not supported. But for things like simple image processing or particle simulation it's perfect.
If you must use OpenCL for some reason and your target hardware supports it just use adb pull to get the libOpenCL.so out of the phone, copy it to the ndk lib directory, and also place OpenCL include headers to the include path and you're good to go.