| | |
| | | package goreid |
| | | package main |
| | | |
| | | /* |
| | | #cgo CFLAGS: -I${SRCDIR}/sdk/include -I${SRCDIR}/opencv-4.0.1/include/opencv4 -I${SRCDIR}/sdk/include/torch/csrc/api/include -I${SRCDIR}/csrc -w -g |
| | | #cgo CXXFLAGS: -I${SRCDIR}/sdk/include -I${SRCDIR}/opencv-4.0.1/include/opencv4 -I${SRCDIR}/sdk/include/torch/csrc/api/include -I${SRCDIR}/csrc -w -g -std=c++11 |
| | | #cgo CFLAGS: -I${SRCDIR}/sdk/include -I${SRCDIR}/thirdparty/include/opencv4 -I${SRCDIR}/sdk/include/torch/csrc/api/include -I${SRCDIR}/csrc -w -g |
| | | #cgo CXXFLAGS: -I${SRCDIR}/sdk/include -I${SRCDIR}/thirdparty/include/opencv4 -I${SRCDIR}/sdk/include/torch/csrc/api/include -I${SRCDIR}/csrc -w -g -std=c++11 |
| | | #cgo LDFLAGS: -Wl,-rpath,${SRCDIR}/sdk/lib |
| | | #cgo LDFLAGS: -L${SRCDIR}/sdk/lib -ltorch -lc10 -lc10_cuda -lcudart -lgomp -lnvToolsExt |
| | | #cgo LDFLAGS: -L${SRCDIR}/opencv-4.0.1/lib -lopencv_core -lopencv_imgproc |
| | | #cgo LDFLAGS: -L${SRCDIR}/thirdparty/lib -lopencv_core -lopencv_imgproc |
| | | #cgo LDFLAGS: -ldl -lpthread |
| | | |
| | | #include <stdlib.h> |
| | |
| | | } |
| | | |
| | | // NewReID new reid |
| | | func NewReID(gpu int, module string) *ReID { |
| | | func NewSDK(gpu int, module string) *ReID { |
| | | cmodule := C.CString(module) |
| | | defer C.free(unsafe.Pointer(cmodule)) |
| | | h := C.create_reid(C.int(gpu), cmodule) |