Example #1
0
func (dst *slice) copyHtoD(src unsafe.Pointer, srclen int, elemsize int) {
	if srclen != dst.Len() {
		panic(fmt.Errorf("cuda4/safe: len mismatch: len(src)=%v (host), dst.Len()=%v (device)", srclen, dst.Len()))
	}
	cu.MemcpyHtoD(dst.Pointer(), src, int64(elemsize)*int64(srclen))
}
Example #2
0
func memCpyHtoD(dst, src unsafe.Pointer, bytes int64) { cu.MemcpyHtoD(cu.DevicePtr(dst), src, bytes) }