当前位置: 首页>>代码示例>>Golang>>正文


Golang C.cufftHandle函数代码示例

本文整理汇总了Golang中C.cufftHandle函数的典型用法代码示例。如果您正苦于以下问题:Golang cufftHandle函数的具体用法?Golang cufftHandle怎么用?Golang cufftHandle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cufftHandle函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Destroy

// Destroys the plan.
func (plan *Handle) Destroy() {
	err := Result(C.cufftDestroy(C.cufftHandle(*plan)))
	*plan = 0 // make sure plan is not used anymore
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:jamesbjackson,项目名称:cuda4,代码行数:8,代码来源:plan.go

示例2: SetCompatibilityMode

// Sets the FFTW compatibility mode
func (plan Handle) SetCompatibilityMode(mode CompatibilityMode) {
	err := Result(C.cufftSetCompatibilityMode(
		C.cufftHandle(plan),
		C.cufftCompatibility(mode)))
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:jamesbjackson,项目名称:cuda4,代码行数:9,代码来源:plan.go

示例3: SetStream

// Sets the cuda stream for this plan
func (plan Handle) SetStream(stream cu.Stream) {
	err := Result(C.cufftSetStream(
		C.cufftHandle(plan),
		C.cudaStream_t(unsafe.Pointer(uintptr(stream)))))
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:jamesbjackson,项目名称:cuda4,代码行数:9,代码来源:plan.go

示例4: ExecZ2D

// Execute Double Complex-to-Real plan
func (plan Handle) ExecZ2D(idata, odata cu.DevicePtr) {
	err := Result(C.cufftExecZ2D(
		C.cufftHandle(plan),
		(*C.cufftDoubleComplex)(unsafe.Pointer(uintptr(idata))),
		(*C.cufftDoubleReal)(unsafe.Pointer(uintptr(odata)))))
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:jamesbjackson,项目名称:cuda4,代码行数:10,代码来源:plan.go

示例5: ExecC2R

// Execute Complex-to-Real plan
func (plan Handle) ExecC2R(idata, odata uintptr) {
	err := Result(C.cufftExecC2R(
		C.cufftHandle(plan),
		(*C.cufftComplex)(unsafe.Pointer(idata)),
		(*C.cufftReal)(unsafe.Pointer(odata))))
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:LStoleriu,项目名称:hotspin,代码行数:10,代码来源:plan.go

示例6: ExecZ2Z

// Execute Double Complex-to-Complex plan
func (plan Handle) ExecZ2Z(idata, odata cu.DevicePtr, direction int) {
	err := Result(C.cufftExecZ2Z(
		C.cufftHandle(plan),
		(*C.cufftDoubleComplex)(unsafe.Pointer(uintptr(idata))),
		(*C.cufftDoubleComplex)(unsafe.Pointer(uintptr(odata))),
		C.int(direction)))
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:jamesbjackson,项目名称:cuda4,代码行数:11,代码来源:plan.go

示例7: ExecC2C

// Execute Complex-to-Complex plan
func (plan Handle) ExecC2C(idata, odata uintptr, direction int) {
	err := Result(C.cufftExecC2C(
		C.cufftHandle(plan),
		(*C.cufftComplex)(unsafe.Pointer(idata)),
		(*C.cufftComplex)(unsafe.Pointer(odata)),
		C.int(direction)))
	if err != SUCCESS {
		panic(err)
	}
}
开发者ID:LStoleriu,项目名称:hotspin,代码行数:11,代码来源:plan.go


注:本文中的C.cufftHandle函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。