Caffe2 - C++ API
A deep learning, cross platform ML framework
snpe_ffi.h
1 
17 #ifndef CAFFE2_SNPE_FFI_H_
18 #define CAFFE2_SNPE_FFI_H_
19 
20 #include <stdint.h>
21 #include <string>
22 
23 namespace caffe2 {
24 
25 std::string& gSNPELocation();
26 
27 const char* const snpe_ffi_so = "libsnpe_ffi.so";
28 
29 }
30 
31 extern "C" {
32 
33 bool snpe_has_gpu();
34 
35 void* snpe_create(const uint8_t* container, size_t size, const char* input_name);
36 
37 void snpe_destroy(void* ctx);
38 
39 void snpe_get_input_dims(void* ctx, size_t const** dims, size_t* size);
40 
41 void snpe_run(void* ctx,
42  const float* inputData,
43  size_t inputSize,
44  size_t const** outputDims,
45  size_t* outputSize);
46 
47 void snpe_copy_output_to(void* ctx, float* outputData);
48 
49 }
50 
51 #endif // CAFFE2_SNPE_FFI_H_
Copyright (c) 2016-present, Facebook, Inc.