#pragma once #ifndef ${pyName}_H \#define ${pyName}_H #endif //PCH_H #ifdef _EXPORTING \#define API_DECLSPEC extern "C" __declspec(dllexport) \#else \#define API_DECLSPEC extern "C" __declspec(dllimport) #endif // 输入参数 \#include //\#include "PyGILThreadLock.h" \#include \#include "Python.h" \#include "jni.h" using namespace std; jobject ${pyName}_train(JNIEnv* env, jobjectArray data_train, jobject settings); jobject ${pyName}_predict(JNIEnv* env, #{foreach} ($column in [1..$dataLength])jobjectArray data${column}, #{end}jobject model_path, jobject settings);