Documentation
¶
Index ¶
- func AsyncCopyDeviceToDevice(dst, src unsafe.Pointer, bytes int, stream unsafe.Pointer, device int)
- func AsyncCopyDeviceToHost(dst, src unsafe.Pointer, bytes int, stream unsafe.Pointer, device int)
- func AsyncCopyHostToDevice(dst, src unsafe.Pointer, bytes int, stream unsafe.Pointer, device int)
- func CreateCudaStream(device int) unsafe.Pointer
- func CudaProfilerStart()
- func CudaProfilerStop()
- func DestroyCudaStream(stream unsafe.Pointer, device int)
- func DeviceAllocate(bytes, device int) unsafe.Pointer
- func DeviceFree(ptr unsafe.Pointer, device int)
- func GetDeviceCount() int
- func GetDeviceGlobalMemoryInMB(device int) int
- func HostAlloc(bytes int) unsafe.Pointer
- func HostFree(p unsafe.Pointer)
- func MakeSliceFromCPtr(cptr uintptr, length int) []byte
- func MemAccess(p unsafe.Pointer, offset int) unsafe.Pointer
- func MemCopy(dst unsafe.Pointer, src unsafe.Pointer, bytes int)
- func MemDist(p1 unsafe.Pointer, p2 unsafe.Pointer) int64
- func MemEqual(a unsafe.Pointer, b unsafe.Pointer, bytes int) bool
- func MemSwap(dst unsafe.Pointer, src unsafe.Pointer, bytes int)
- func WaitForCudaStream(stream unsafe.Pointer, device int)
- type AsyncMemCopyFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncCopyDeviceToDevice ¶
func AsyncCopyDeviceToDevice( dst, src unsafe.Pointer, bytes int, stream unsafe.Pointer, device int)
AsyncCopyDeviceToDevice asynchronously copies the src device buffer to the dst device buffer buffer on the specified stream.
func AsyncCopyDeviceToHost ¶
AsyncCopyDeviceToHost asynchronously copies the device buffer to the host buffer on the specified stream.
func AsyncCopyHostToDevice ¶
AsyncCopyHostToDevice asynchronously copies the host buffer to the device buffer on the specified stream.
func CreateCudaStream ¶
CreateCudaStream creates a Cuda stream.
func DestroyCudaStream ¶
DestroyCudaStream destroys the specified Cuda stream.
func DeviceAllocate ¶
DeviceAllocate allocates the specified amount of memory on the device.
func DeviceFree ¶
DeviceFree frees the specified memory from the device.
func GetDeviceGlobalMemoryInMB ¶
GetDeviceGlobalMemoryInMB returns the total global memory(MB) for a given device
func MakeSliceFromCPtr ¶
MakeSliceFromCPtr make a slice that points to data that cptr points to. cptr must be a c-allocated pointer as the garbage collector will not update that uintptr's value if the golang object movee.
func WaitForCudaStream ¶
WaitForCudaStream block waits until all pending operations are finished on the specified Cuda stream.