• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_JAVA_SRC_MAIN_NATIVE_GRAPH_JNI_H_
17 #define TENSORFLOW_JAVA_SRC_MAIN_NATIVE_GRAPH_JNI_H_
18 
19 #include <jni.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /*
26  * Class:     org_tensorflow_Graph
27  * Method:    allocate
28  * Signature: ()J
29  */
30 JNIEXPORT jlong JNICALL Java_org_tensorflow_Graph_allocate(JNIEnv *, jclass);
31 
32 /*
33  * Class:     org_tensorflow_Graph
34  * Method:    delete
35  * Signature: (J)V
36  */
37 JNIEXPORT void JNICALL Java_org_tensorflow_Graph_delete(JNIEnv *, jclass,
38                                                         jlong);
39 
40 /*
41  * Class:     org_tensorflow_Graph
42  * Method:    operation
43  * Signature: (JLjava/lang/String;)J
44  */
45 JNIEXPORT jlong JNICALL Java_org_tensorflow_Graph_operation(JNIEnv *, jclass,
46                                                             jlong, jstring);
47 
48 /*
49  * Class:     org_tensorflow_Graph
50  * Method:    operations
51  * Signature: (JI)[J
52  */
53 JNIEXPORT jlongArray JNICALL Java_org_tensorflow_Graph_nextOperation(JNIEnv *,
54                                                                      jclass,
55                                                                      jlong,
56                                                                      jint);
57 
58 /*
59  * Class:     org_tensorflow_Graph
60  * Method:    importGraphDef
61  * Signature: (J[BLjava/lang/String;)V
62  */
63 JNIEXPORT void JNICALL Java_org_tensorflow_Graph_importGraphDef(JNIEnv *,
64                                                                 jclass, jlong,
65                                                                 jbyteArray,
66                                                                 jstring);
67 
68 /*
69  * Class:     org_tensorflow_Graph
70  * Method:    toGraphDef
71  * Signature: (J)[B
72  */
73 JNIEXPORT jbyteArray JNICALL Java_org_tensorflow_Graph_toGraphDef(JNIEnv *,
74                                                                   jclass,
75                                                                   jlong);
76 
77 /*
78  * Class:     org_tensorflow_Graph
79  * Method:    name
80  * Signature: (JLjava/lang/String;[J[I[J[I[J[I)[J
81  */
82 JNIEXPORT jlongArray JNICALL Java_org_tensorflow_Graph_addGradients(
83     JNIEnv *, jclass, jlong, jstring, jlongArray, jintArray, jlongArray,
84     jintArray, jlongArray, jintArray);
85 
86 /*
87  * Class:     org_tensorflow_Graph
88  * Method:    whileLoop
89  * Signature:
90  * (J[J[IILjava/lang/String;Lorg/tensorflow/Graph/WhileSubgraphBuilder;Lorg/tensorflow/Graph/WhileSubgraphBuilder;)[J
91  */
92 JNIEXPORT jlongArray JNICALL Java_org_tensorflow_Graph_whileLoop(
93     JNIEnv *, jclass, jlong, jlongArray, jintArray, jstring, jobject, jobject);
94 
95 #ifdef __cplusplus
96 }  // extern "C"
97 #endif  // __cplusplus
98 #endif  // TENSORFLOW_JAVA_SRC_MAIN_NATIVE_GRAPH_JNI_H_
99