As of revision 9, the Android NDK comes with support for OpenMP.

It's easy enough to setup. First, add the required OpenMP flags to your file:

LOCAL_CFLAGS += -fopenmp
LOCAL_LDFLAGS += -fopenmp

Then, use OpenMP directives to parallelize your code:

#include <omp.h>

#pragma omp parallel for
for(int i = 0;i < length;i++) {
	/* Do work... */

The implementation will automatically set the number of threads to the number of cores available, so it's not necessary to do it manually.

Be aware that there's currently a bug in the way GOMP (GCC's implementation of the OpenMP specification) handles data when thread-local storage isn't available (and it isn't on Android), which means that you'll see a crash if you try to run OpenMP code on a non-main thread. See this post for a workaround.