سؤال

I'm an amateur developer and I'm creating an Android app that will perform long mathematical calculation (involving multiple for-loops for example). I've read on the Android Developer website that Renderscript is a possible way of reducing computational time and memory. However, I have no readability (or writability for that matter) in C, so I was wondering if there's any more effective (time/memory) ways of carrying out the computations.

Otherwise, if there's really no other ways, are there helpful resources for me to look besides the Renderscript section on the Android website?

هل كانت مفيدة؟

المحلول

You have two choices to compute directly on device:

Renderscript:

  • (+) Supports different types of current and future architectures.
  • (+) It will enable computations on GPU in future.
  • (+) It is easily scalable to run on multiple cores.
  • (-) Minimal API level 11.

Android NDK:

  • (+) cross-platform code
  • (-) Application have to be compiled for each available architecture by developer.
  • (-) If new architecture emerge then new build is needed.

نصائح أخرى

What about doing the computations on a server and sending back the results to the Android device?

You can implement a RESTful service server side and call it via http from Android.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top