c++ - How to run OpenMP in Android Studio using NDK Jni ? -


i using android studio 1.4.1 ndk 12.0.0.
i want use openmp in jni code.

my android.mk

local_path := $(call my-dir) include $(clear_vars)  local_src_files := main.cpp   local_cflags += -fopenmp local_ldflags += -fopenmp  local_ldlibs += -llog local_module := openmptest   include $(build_shared_library) 

my application.mk

app_abi := armeabi x86 armeabi-v7a mips  app_stl := gnustl_static app_cppflags := -frtti -fexceptions  android_ndk := c:/users/welcome/appdata/local/android/sdk/ndk-bundle local_c_includes += ${android_ndk}/sources/cxx-stl/gnu-libstdc++/4.9/include  ndk_toolchain_version := 4.9  app_platform := android-17 

main.cpp

jniexport void jnicalljava_com_advenio_pulkit_openmptest_mainactivity_runopenmpcheck     (jnienv * env, jobject jobj) {  #pragma omp parallel  (int = 0; < 100; i++) {  char a[50]; sprintf(a,"%d",i); __android_log_write(android_log_debug, "log_tag", a);  } 

it not running loop in parallel. has used openmp android studio using ndk , jni. tia


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -