This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// allocate 81 char string in C memory | |
parsed := C.CString(strings.Repeat("0", 81)) | |
defer C.free(unsafe.Pointer(parsed)) // free it when we're done here | |
// allocate byte array for our image data in C memory | |
p := C.CBytes(data) | |
defer C.free(unsafe.Pointer(p)) // free it when we're done | |
// float32 is standardized type compatible with C | |
gridCoords := []float32{-1, -1, -1, -1, -1, -1, -1, -1} |