Added function to get timings for layers

This commit is contained in:
Aleksandr Rybnikov
2017-08-02 17:27:58 +03:00
parent da0a36c323
commit 8b1146deb2
5 changed files with 98 additions and 52 deletions
@@ -56,4 +56,21 @@ void Copy_vector_String_to_List(JNIEnv* env, std::vector<cv::String>& vs, jobjec
env->CallBooleanMethod(list, m_add, element);
env->DeleteLocalRef(element);
}
}
}
#if defined(HAVE_OPENCV_DNN)
void Copy_vector_MatShape_to_List(JNIEnv* env, std::vector<cv::dnn::MatShape>& vs, jobject list)
{
static jclass juArrayList = ARRAYLIST(env);
jmethodID m_clear = LIST_CLEAR(env, juArrayList);
jmethodID m_add = LIST_ADD(env, juArrayList);
env->CallVoidMethod(list, m_clear);
for (std::vector<cv::dnn::MatShape>::iterator it = vs.begin(); it != vs.end(); ++it)
{
jstring element = env->NewStringUTF("");
env->CallBooleanMethod(list, m_add, element);
env->DeleteLocalRef(element);
}
}
#endif
@@ -16,4 +16,9 @@ std::vector<cv::String> List_to_vector_String(JNIEnv* env, jobject list);
void Copy_vector_String_to_List(JNIEnv* env, std::vector<cv::String>& vs, jobject list);
#endif /* LISTCONVERTERS_HPP */
#if defined(HAVE_OPENCV_DNN)
#include "opencv2/dnn.hpp"
void Copy_vector_MatShape_to_List(JNIEnv* env, std::vector<cv::dnn::MatShape>& vs, jobject list);
#endif
#endif /* LISTCONVERTERS_HPP */