-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathjni_helper.h
More file actions
34 lines (26 loc) · 783 Bytes
/
Copy pathjni_helper.h
File metadata and controls
34 lines (26 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include <assert.h>
#include "java/java.h"
#ifdef ANDROID
#include <android/log.h>
#define LOG(...) \
__android_log_print(ANDROID_LOG_INFO, "ArrayFireJNI", __VA_ARGS__)
#define AF_INFO()
#else
#define LOG(msg, ...) \
do { \
printf(__FILE__ ":%d: " msg "\n", __LINE__, ##__VA_ARGS__); \
} while (0)
#define AF_INFO() af::info()
#endif
#ifdef __cplusplus
using af::af_cdouble;
using af::af_cfloat;
#define BEGIN_EXTERN_C extern "C" {
#define END_EXTERN_C }
#endif
#define AF_MANGLE(CLASS, FUNC) Java_com_arrayfire_##CLASS##_##FUNC
const int MaxDimSupported = 4;
#define AF_TO_JAVA(fn) fn
#define ARRAY(REF) (af_array)(REF)
#define JLONG(ARR) (jlong)(ARR)