Skip to content

Commit e6ac807

Browse files
committedFeb 23, 2017
Move android instructions to seperate file
1 parent caf367f commit e6ac807

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed
 

‎README.android

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Android (outdated instructions)
2+
------------------
3+
4+
Assuming you have a recent Android NDK available, you can use the
5+
toolchain that it provides to build GPU-STREAM. You should first
6+
use the NDK to generate a standalone toolchain:
7+
8+
# Select a directory to install the toolchain to
9+
ANDROID_NATIVE_TOOLCHAIN=/path/to/toolchain
10+
11+
${NDK}/build/tools/make-standalone-toolchain.sh \
12+
--platform=android-14 \
13+
--toolchain=arm-linux-androideabi-4.8 \
14+
--install-dir=${ANDROID_NATIVE_TOOLCHAIN}
15+
16+
Make sure that the OpenCL headers and library (libOpenCL.so) are
17+
available in `${ANDROID_NATIVE_TOOLCHAIN}/sysroot/usr/`.
18+
19+
You should then be able to build GPU-STREAM:
20+
21+
make CXX=${ANDROID_NATIVE_TOOLCHAIN}/bin/arm-linux-androideabi-g++
22+
23+
Copy the executable and OpenCL kernels to the device:
24+
25+
adb push gpu-stream-ocl /data/local/tmp
26+
adb push ocl-stream-kernels.cl /data/local/tmp
27+
28+
Run GPU-STREAM from an adb shell:
29+
30+
adb shell
31+
cd /data/local/tmp
32+
33+
# Use float if device doesn't support double, and reduce array size
34+
./gpu-stream-ocl --float -n 6 -s 10000000
35+
36+

‎README.md

-36
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,6 @@ Drivers, compiler and software applicable to whichever implementation you would
2828

2929
Generate the Makefile with `cmake .`
3030

31-
Android (outdated instructions)
32-
------------------
33-
34-
Assuming you have a recent Android NDK available, you can use the
35-
toolchain that it provides to build GPU-STREAM. You should first
36-
use the NDK to generate a standalone toolchain:
37-
38-
# Select a directory to install the toolchain to
39-
ANDROID_NATIVE_TOOLCHAIN=/path/to/toolchain
40-
41-
${NDK}/build/tools/make-standalone-toolchain.sh \
42-
--platform=android-14 \
43-
--toolchain=arm-linux-androideabi-4.8 \
44-
--install-dir=${ANDROID_NATIVE_TOOLCHAIN}
45-
46-
Make sure that the OpenCL headers and library (libOpenCL.so) are
47-
available in `${ANDROID_NATIVE_TOOLCHAIN}/sysroot/usr/`.
48-
49-
You should then be able to build GPU-STREAM:
50-
51-
make CXX=${ANDROID_NATIVE_TOOLCHAIN}/bin/arm-linux-androideabi-g++
52-
53-
Copy the executable and OpenCL kernels to the device:
54-
55-
adb push gpu-stream-ocl /data/local/tmp
56-
adb push ocl-stream-kernels.cl /data/local/tmp
57-
58-
Run GPU-STREAM from an adb shell:
59-
60-
adb shell
61-
cd /data/local/tmp
62-
63-
# Use float if device doesn't support double, and reduce array size
64-
./gpu-stream-ocl --float -n 6 -s 10000000
65-
66-
6731
Results
6832
-------
6933

0 commit comments

Comments
 (0)
Please sign in to comment.