2019-12-29 17:39:08 +00:00
|
|
|
package gocv
|
|
|
|
|
|
|
|
func (c NetBackendType) String() string {
|
|
|
|
switch c {
|
|
|
|
case NetBackendDefault:
|
|
|
|
return ""
|
|
|
|
case NetBackendHalide:
|
|
|
|
return "halide"
|
|
|
|
case NetBackendOpenVINO:
|
|
|
|
return "openvino"
|
|
|
|
case NetBackendOpenCV:
|
|
|
|
return "opencv"
|
|
|
|
case NetBackendVKCOM:
|
|
|
|
return "vulkan"
|
2021-09-02 10:03:56 +00:00
|
|
|
case NetBackendCUDA:
|
|
|
|
return "cuda"
|
2019-12-29 17:39:08 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c NetTargetType) String() string {
|
|
|
|
switch c {
|
|
|
|
case NetTargetCPU:
|
|
|
|
return "cpu"
|
|
|
|
case NetTargetFP32:
|
|
|
|
return "fp32"
|
|
|
|
case NetTargetFP16:
|
|
|
|
return "fp16"
|
|
|
|
case NetTargetVPU:
|
|
|
|
return "vpu"
|
|
|
|
case NetTargetVulkan:
|
|
|
|
return "vulkan"
|
|
|
|
case NetTargetFPGA:
|
|
|
|
return "fpga"
|
2021-09-02 10:03:56 +00:00
|
|
|
case NetTargetCUDA:
|
|
|
|
return "cuda"
|
|
|
|
case NetTargetCUDAFP16:
|
|
|
|
return "cudafp16"
|
2019-12-29 17:39:08 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|