mirror of
https://github.com/hybridgroup/gocv
synced 2025-08-25 08:41:04 +08:00
16 lines
253 B
Go
16 lines
253 B
Go
package cuda
|
|
|
|
/*
|
|
#include "../core.h"
|
|
*/
|
|
import "C"
|
|
import "errors"
|
|
|
|
// Converts a OpenCVResult struct to an error.
|
|
func OpenCVResult(result C.OpenCVResult) error {
|
|
if result.Code == 0 {
|
|
return nil
|
|
}
|
|
return errors.New(C.GoString(result.Message))
|
|
}
|