forked from halide/Halide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHalide.cpp
More file actions
63 lines (54 loc) · 1.36 KB
/
Copy pathHalide.cpp
File metadata and controls
63 lines (54 loc) · 1.36 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <boost/python.hpp>
#include "Argument.h"
#include "BoundaryConditions.h"
#include "Error.h"
#include "Expr.h"
#include "Func.h"
#include "Function.h"
#include "IROperator.h"
#include "Image.h"
#include "InlineReductions.h"
#include "Lambda.h"
#include "Param.h"
#include "RDom.h"
#include "Target.h"
#include "Type.h"
#include "Var.h"
//#include "llvm-3.5/llvm/Support/DynamicLibrary.h"
#include <stdexcept>
#include <vector>
/*
bool load_library_into_llvm(std::string name)
{
return llvm::sys::DynamicLibrary::LoadLibraryPermanently(name.c_str());
}
void defineLlvmHelpers()
{
using namespace boost::python;
def("load_library_into_llvm", load_library_into_llvm,
"This function permanently loads the dynamic library at the given path. "
"It is safe to call this function multiple times for the same library.");
return;
}
*/
BOOST_PYTHON_MODULE(halide) {
using namespace boost::python;
// we include all the pieces and bits from the Halide API
defineArgument();
defineBoundaryConditions();
defineBuffer();
defineError();
defineExpr();
defineExternFuncArgument();
defineFunc();
defineInlineReductions();
defineLambda();
defineOperators();
defineParam();
defineRDom();
defineTarget();
defineType();
defineVar();
// not part of the C++ Halide API
//defineLlvmHelpers();
}