-
Notifications
You must be signed in to change notification settings - Fork 1
/
lib.go
17 lines (16 loc) · 922 Bytes
/
lib.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package caffe
// #cgo LDFLAGS: -lstdc++ -lglog -lboost_system
// #cgo CXXFLAGS: -std=c++11 -I${SRCDIR}/cbits -O3 -Wall -g
// #cgo CXXFLAGS: -Wno-sign-compare -Wno-unused-function -DBLAS=open -Wno-unused-local-typedef
// #cgo darwin CXXFLAGS: -I/opt/caffe/include -I/usr/local/opt/openblas/include -DCPU_ONLY=1
// #cgo darwin LDFLAGS: -lcaffe -L/opt/caffe/lib/
// #cgo !darwin,nogpu CXXFLAGS: -DCPU_ONLY=1
// #cgo !darwin,!nogpu CXXFLAGS: -I/usr/local/cuda/include
// #cgo !darwin,!nogpu LDFLAGS: -lcublas -lcudnn -L/usr/local/cuda/lib64 -L/usr/local/cuda
// #cgo linux,amd64 CXXFLAGS: -I/opt/caffe/include
// #cgo linux,amd64 LDFLAGS: -lcaffe -L/opt/caffe/lib
// #cgo linux,ppc64le,powerai CXXFLAGS: -I/opt/DL/caffe/include
// #cgo linux,ppc64le,powerai LDFLAGS: -L/opt/DL/caffe/lib
// #cgo linux,ppc64le,!powerai CXXFLAGS: -I/opt/caffe/include
// #cgo linux,ppc64le,!powerai LDFLAGS: -lcaffe -L/opt/caffe/lib
import "C"