From e6ac8076cf2be6fcf3bd28bce59a48f3d7913096 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Thu, 23 Feb 2017 16:45:55 +0000 Subject: [PATCH] Move android instructions to seperate file --- README.android | 36 ++++++++++++++++++++++++++++++++++++ README.md | 36 ------------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 README.android diff --git a/README.android b/README.android new file mode 100644 index 0000000..edc4a52 --- /dev/null +++ b/README.android @@ -0,0 +1,36 @@ +Android (outdated instructions) +------------------ + +Assuming you have a recent Android NDK available, you can use the +toolchain that it provides to build GPU-STREAM. You should first +use the NDK to generate a standalone toolchain: + + # Select a directory to install the toolchain to + ANDROID_NATIVE_TOOLCHAIN=/path/to/toolchain + + ${NDK}/build/tools/make-standalone-toolchain.sh \ + --platform=android-14 \ + --toolchain=arm-linux-androideabi-4.8 \ + --install-dir=${ANDROID_NATIVE_TOOLCHAIN} + +Make sure that the OpenCL headers and library (libOpenCL.so) are +available in `${ANDROID_NATIVE_TOOLCHAIN}/sysroot/usr/`. + +You should then be able to build GPU-STREAM: + + make CXX=${ANDROID_NATIVE_TOOLCHAIN}/bin/arm-linux-androideabi-g++ + +Copy the executable and OpenCL kernels to the device: + + adb push gpu-stream-ocl /data/local/tmp + adb push ocl-stream-kernels.cl /data/local/tmp + +Run GPU-STREAM from an adb shell: + + adb shell + cd /data/local/tmp + + # Use float if device doesn't support double, and reduce array size + ./gpu-stream-ocl --float -n 6 -s 10000000 + + diff --git a/README.md b/README.md index 0d181d5..df0f23c 100644 --- a/README.md +++ b/README.md @@ -28,42 +28,6 @@ Drivers, compiler and software applicable to whichever implementation you would Generate the Makefile with `cmake .` -Android (outdated instructions) ------------------- - -Assuming you have a recent Android NDK available, you can use the -toolchain that it provides to build GPU-STREAM. You should first -use the NDK to generate a standalone toolchain: - - # Select a directory to install the toolchain to - ANDROID_NATIVE_TOOLCHAIN=/path/to/toolchain - - ${NDK}/build/tools/make-standalone-toolchain.sh \ - --platform=android-14 \ - --toolchain=arm-linux-androideabi-4.8 \ - --install-dir=${ANDROID_NATIVE_TOOLCHAIN} - -Make sure that the OpenCL headers and library (libOpenCL.so) are -available in `${ANDROID_NATIVE_TOOLCHAIN}/sysroot/usr/`. - -You should then be able to build GPU-STREAM: - - make CXX=${ANDROID_NATIVE_TOOLCHAIN}/bin/arm-linux-androideabi-g++ - -Copy the executable and OpenCL kernels to the device: - - adb push gpu-stream-ocl /data/local/tmp - adb push ocl-stream-kernels.cl /data/local/tmp - -Run GPU-STREAM from an adb shell: - - adb shell - cd /data/local/tmp - - # Use float if device doesn't support double, and reduce array size - ./gpu-stream-ocl --float -n 6 -s 10000000 - - Results -------