// Vdpsp_byte converts a double-precision to single-precision. // Operate on a byte buffer which contains float64 func Vdpsp_byte(input []byte, inputStride int, output []float32, outputStride int) { C.vDSP_vdpsp((*C.double)(unsafe.Pointer(&input[0])), C.vDSP_Stride(inputStride), (*C.float)(&output[0]), C.vDSP_Stride(outputStride), minLen(len(input)/8/inputStride, len(output)/outputStride)) }
// Vdpsp convert a double-precision vector to single-precision. func Vdpsp(input []float64, inputStride int, output []float32, outputStride int) { C.vDSP_vdpsp((*C.double)(&input[0]), C.vDSP_Stride(inputStride), (*C.float)(&output[0]), C.vDSP_Stride(outputStride), minLen(len(input)/inputStride, len(output)/outputStride)) }