-
Notifications
You must be signed in to change notification settings - Fork 2
/
madoka.i
34 lines (30 loc) · 1.06 KB
/
madoka.i
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
%module madoka
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
%typemap(in) void * = char*;
%typemap(in) const void * = char*;
%apply (char *STRING) { (const void *)}
%apply double *OUTPUT { double *lhs_square_length, double *rhs_square_length };
extern double madoka::Sketch::inner_product(const Sketch &rhs, double *lhs_square_length,
double *rhs_square_length);
%{
#include "src/util.h"
#include "src/exception.h"
#include "src/sketch.h"
#include "src/file.h"
#include "src/header.h"
#include "src/approx.h"
#include "src/random.h"
#include "src/croquis.h"
#include "src/hash.h"
%}
%include "src/util.h"
%include "src/exception.h"
%include "src/sketch.h"
%include "src/croquis.h"
%template(CroquisUint8) madoka::Croquis<unsigned char>;
%template(CroquisUint16) madoka::Croquis<unsigned short>;
%template(CroquisUint32) madoka::Croquis<unsigned int>;
%template(CroquisUint64) madoka::Croquis<unsigned long long>;
%template(CroquisFloat) madoka::Croquis<float>;
%template(CroquisDouble) madoka::Croquis<double>;