Vengineerの妄想(準備期間)

人生は短いけど、長いです。人生を楽しみましょう!

AndroidでOpenCL


OpenCL for Android Massesによると、
Android(ARMv7)のCPUでOpenCLが動くようになったようです。

PoclをAndroidに移植したようです。Google Playからダウンロードできます。

引用

Features:
    1. OpenCL 1.2 spec implementation
    2. Provides a cpu device which uses pthread to utilise multi-core cpu
    3. Zero-copy buffers when allocated with CL_MEM_USE_HOST_PTR flag
    4. Programs & kernels are cached in application’s cache directory at first run. 
        Although initial launch will be slow, subsequent launches will be much much faster
    5. Basic support for spir. Pocl now load
        s SPIR binaries 
        via the clCreateProgramWithBinary. Even final binaries of spir will be cached at first run
    6. Horizontal auto-vectorization of work-groups (experimental)

This is in beta stage and only android 4.2 and above is supported for now

OpenCL 1.2対応。
・マルチコアは、pthreadにて対応。
・SPIR 1.2対応

これについては、Poclにて対応。

Android 4.2以上で動くようです。

libopencl-stubを使えば、アプリケーションを作れるようです。