2013년 6월 9일 일요일

opencl test under LG optimus G

I run clinfo application under LG Optimus G


setup opencl develop enviroment on Android


I used sample source code of aopencl clinfo sample under ubutu 10.04 LTS

Download aopencl

hg clone http://code.google.com/p/aopencl


before download source code of aopencl , install mercurial

JDK download and install

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Download android sdk

http://developer.android.com/sdk/index.html

download ADT bundle, it includes the essential Android SDK components

NDK download

http://developer.android.com/tools/sdk/ndk/index.html

Install adn 1.8 in your PC

$ sudo apt-get install ant1.8

Setup build path

- add platform tools and sdk tools to PATH
$ export PATH=/opt/adt/adt-bundle-linux-x86_64-20130522/sdk/platform-tools/:/opt/adt/adt-bundle-linux-x86_64-20130522/sdk/tools/:/opt/ndk/android-ndk-r8e:$PATH

- export ndk path
$ export NDK=/opt/ndk/android-ndk-r8e

- build ndk lib
move to clinfo directory then ndk-build






- update project as you want for example
$ android update project -p . -n clinfo -t 2












- make package
$ ant debug












then you can find clinfo-debug.apk in clino/bin

- download your android phone then install and run
it can works on nexus 4 or over



-