Exemple #1
0
func releaseMemObject(p C.cl_mem) error {
	if p != nil {
		if err := C.clReleaseMemObject(p); err != C.CL_SUCCESS {
			return Cl_error(err)
		}
	}
	return nil
}
Exemple #2
0
func CLReleaseMemObject(memobj CL_mem) CL_int {
	return CL_int(C.clReleaseMemObject(memobj.cl_mem))
}
Exemple #3
0
// see https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseMemObject.html
func ReleaseMemObject(mem Mem) ErrorCode {
	return ErrorCode(C.clReleaseMemObject(mem))
}
Exemple #4
0
func releaseMemObject(b *MemObject) {
	if b.clMem != nil {
		C.clReleaseMemObject(b.clMem)
		b.clMem = nil
	}
}