當前位置: 首頁>>代碼示例>>Golang>>正文


Golang DSPSplitComplex.imagp方法代碼示例

本文整理匯總了Golang中C.DSPSplitComplex.imagp方法的典型用法代碼示例。如果您正苦於以下問題:Golang DSPSplitComplex.imagp方法的具體用法?Golang DSPSplitComplex.imagp怎麽用?Golang DSPSplitComplex.imagp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在C.DSPSplitComplex的用法示例。


在下文中一共展示了DSPSplitComplex.imagp方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Zrdesamp

// Zrdesamp performs a complex-real downsample with anti-aliasing.
func Zrdesamp(input DSPSplitComplex, decimationFactor int, coefficients []float32, output DSPSplitComplex) {
	var srcC C.DSPSplitComplex
	srcC.realp = (*C.float)(&input.Real[0])
	srcC.imagp = (*C.float)(&input.Imag[0])
	var dstC C.DSPSplitComplex
	dstC.realp = (*C.float)(&output.Real[0])
	dstC.imagp = (*C.float)(&output.Imag[0])
	C.vDSP_zrdesamp(&srcC, C.vDSP_Stride(decimationFactor), (*C.float)(&coefficients[0]), &dstC, C.vDSP_Length(len(output.Real)), C.vDSP_Length(len(coefficients)))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:10,代碼來源:dsp.go

示例2: Zop

// Zop computes an out-of-place single-precision complex discrete Fourier transform of the
// input vector, either from the time domain to the frequency domain (forward) or from the
// frequency domain to the time domain (inverse).
func (fs *FFTSetup) Zop(input DSPSplitComplex, inputStride int, output DSPSplitComplex, outputStride int, log2n int, direction FFTDirection) {
	var inC C.DSPSplitComplex
	inC.realp = (*C.float)(&input.Real[0])
	inC.imagp = (*C.float)(&input.Imag[0])
	var outC C.DSPSplitComplex
	outC.realp = (*C.float)(&output.Real[0])
	outC.imagp = (*C.float)(&output.Imag[0])
	C.vDSP_fft_zop(fs.cFFTSetup, &inC, C.vDSP_Stride(inputStride), &outC, C.vDSP_Stride(outputStride), C.vDSP_Length(log2n), C.FFTDirection(direction))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:12,代碼來源:fft.go

示例3: Zvcmul

// Zvcmul performs a complex vector conjugate and multiply.
func Zvcmul(input1 DSPSplitComplex, stride1 int, input2 DSPSplitComplex, stride2 int, result DSPSplitComplex, resultStride int) {
	var in1 C.DSPSplitComplex
	in1.realp = (*C.float)(&input1.Real[0])
	in1.imagp = (*C.float)(&input1.Imag[0])
	var in2 C.DSPSplitComplex
	in2.realp = (*C.float)(&input2.Real[0])
	in2.imagp = (*C.float)(&input2.Imag[0])
	var res C.DSPSplitComplex
	res.realp = (*C.float)(&result.Real[0])
	res.imagp = (*C.float)(&result.Imag[0])
	C.vDSP_zvcmul(&in1, C.vDSP_Stride(stride1), &in2, C.vDSP_Stride(stride2), &res, C.vDSP_Stride(resultStride), minLen(len(input1.Real)/stride1, len(input2.Real)/stride2, len(result.Real)/resultStride))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:13,代碼來源:dsp.go

示例4: Zidotpr

// Zidotpr calculates the conjugate dot product (or inner dot product) of complex vectors A and B and leave the result in complex vector C; single precision.
func Zidotpr(input1 DSPSplitComplex, stride1 int, input2 DSPSplitComplex, stride2 int, result DSPSplitComplex) {
	var in1 C.DSPSplitComplex
	in1.realp = (*C.float)(&input1.Real[0])
	in1.imagp = (*C.float)(&input1.Imag[0])
	var in2 C.DSPSplitComplex
	in2.realp = (*C.float)(&input2.Real[0])
	in2.imagp = (*C.float)(&input2.Imag[0])
	var res C.DSPSplitComplex
	res.realp = (*C.float)(&result.Real[0])
	res.imagp = (*C.float)(&result.Imag[0])
	C.vDSP_zidotpr(&in1, C.vDSP_Stride(stride1), &in2, C.vDSP_Stride(stride2), &res, C.vDSP_Length(len(result.Real)))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:13,代碼來源:dsp.go

示例5: Ctoz

// Ctoz copies the contents of an interleaved complex vector C to a split complex vector Z; single precision.
func Ctoz(input []complex64, inputStride int, output DSPSplitComplex, outputStride int) {
	var splitComplex C.DSPSplitComplex
	splitComplex.realp = (*C.float)(&output.Real[0])
	splitComplex.imagp = (*C.float)(&output.Imag[0])
	n := 2 * len(output.Real) / outputStride
	if n2 := 2 * len(input) / inputStride; n2 < n {
		n = n2
	}
	C.vDSP_ctoz((*C.DSPComplex)(unsafe.Pointer(&input[0])), C.vDSP_Stride(inputStride), &splitComplex, C.vDSP_Stride(outputStride), C.vDSP_Length(n))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:11,代碼來源:dsp.go

示例6: Zvabs

// Zvabs calculates the absolute values of all values in the complex input.
func Zvabs(input DSPSplitComplex, inputStride int, output []float32, outputStride int) {
	var in C.DSPSplitComplex
	in.realp = (*C.float)(&input.Real[0])
	in.imagp = (*C.float)(&input.Imag[0])
	C.vDSP_zvabs(&in, C.vDSP_Stride(inputStride), (*C.float)(&output[0]), C.vDSP_Stride(outputStride), C.vDSP_Length(len(output)/outputStride))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:7,代碼來源:dsp.go

示例7: Zvphas

// Zvphas calculates the complex vector phase.
func Zvphas(input DSPSplitComplex, inputStride int, output []float32, outputStride int) {
	var srcC C.DSPSplitComplex
	srcC.realp = (*C.float)(&input.Real[0])
	srcC.imagp = (*C.float)(&input.Imag[0])
	C.vDSP_zvphas(&srcC, C.vDSP_Stride(inputStride), (*C.float)(&output[0]), C.vDSP_Stride(outputStride), C.vDSP_Length(len(output)))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:7,代碼來源:dsp.go

示例8: Ztoc_byte

// Ztoc_byte copies the contents of a split complex vector Z to an interleaved complex vector C; single precision. Operate on a byte buffer which contains complex64
func Ztoc_byte(input DSPSplitComplex, inputStride int, output []byte, outputStride int) {
	var splitComplex C.DSPSplitComplex
	splitComplex.realp = (*C.float)(&input.Real[0])
	splitComplex.imagp = (*C.float)(&input.Imag[0])
	C.vDSP_ztoc(&splitComplex, C.vDSP_Stride(inputStride), (*C.DSPComplex)(unsafe.Pointer(&output[0])), C.vDSP_Stride(outputStride), C.vDSP_Length(len(output)/4/outputStride))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:7,代碼來源:dsp.go

示例9: Zip

// Zip computess an in-place single-precision complex discrete Fourier transform of the
// input/output vector signal, either from the time domain to the frequency domain
// (forward) or from the frequency domain to the time domain (inverse).
func (fs *FFTSetup) Zip(ioData DSPSplitComplex, stride, log2n int, direction FFTDirection) {
	var splitComplex C.DSPSplitComplex
	splitComplex.realp = (*C.float)(&ioData.Real[0])
	splitComplex.imagp = (*C.float)(&ioData.Imag[0])
	C.vDSP_fft_zip(fs.cFFTSetup, &splitComplex, C.vDSP_Stride(stride), C.vDSP_Length(log2n), C.FFTDirection(direction))
}
開發者ID:samuel,項目名稱:go-accelerate,代碼行數:9,代碼來源:fft.go


注:本文中的C.DSPSplitComplex.imagp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。