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 DoCGoCall(f func() (uintptr, unsafe.Pointer)) uintptr
- func GetDeviceCount() int
- func GetDeviceGlobalMemoryInMB(device int) int
- func GetDeviceMemoryInfo(device int) (int, int)
- func GetFlags() C.DeviceMemoryFlags
- func HostAlloc(bytes int) unsafe.Pointer
- func HostFree(p unsafe.Pointer)
- func HostMemCpy(dst unsafe.Pointer, src unsafe.Pointer, bytes int)
- func IsDeviceMemoryImplementation() bool
- func IsPooledMemory() bool
- func MakeSliceFromCPtr(cptr uintptr, length int) []byte
- func SupportHashReduction() bool
- func WaitForCudaStream(stream unsafe.Pointer, device int)
- type AsyncMemCopyFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncCopyDeviceToDevice ¶ added in v0.0.2
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 ¶ added in v0.0.2
AsyncCopyDeviceToHost asynchronously copies the device buffer to the host buffer on the specified stream.
func AsyncCopyHostToDevice ¶ added in v0.0.2
AsyncCopyHostToDevice asynchronously copies the host buffer to the device buffer on the specified stream.
func CreateCudaStream ¶ added in v0.0.2
CreateCudaStream creates a Cuda stream.
func CudaProfilerStart ¶ added in v0.0.2
func CudaProfilerStart()
CudaProfilerStart starts/resumes the profiler.
func CudaProfilerStop ¶ added in v0.0.2
func CudaProfilerStop()
CudaProfilerStop stops/pauses the profiler.
func DestroyCudaStream ¶ added in v0.0.2
DestroyCudaStream destroys the specified Cuda stream.
func DeviceAllocate ¶ added in v0.0.2
DeviceAllocate allocates the specified amount of memory on the device.
func DeviceFree ¶ added in v0.0.2
DeviceFree frees the specified memory from the device.
func DoCGoCall ¶
DoCGoCall is the function wrapper to call a cgo function, check whether there is any exception thrown by the function and converted it to a golang error if any.
func GetDeviceCount ¶ added in v0.0.2
func GetDeviceCount() int
GetDeviceCount returns the number of GPU devices
func GetDeviceGlobalMemoryInMB ¶ added in v0.0.2
GetDeviceGlobalMemoryInMB returns the total global memory(MB) for a given device
func GetDeviceMemoryInfo ¶ added in v0.0.2
GetDeviceMemoryInfo returns information about total size and free size of device memory in bytes for a specfic device.
func GetFlags ¶ added in v0.0.2
func GetFlags() C.DeviceMemoryFlags
GetFlags return flags about the memory management.
func HostMemCpy ¶ added in v0.0.2
HostMemCpy copies memory between two host addresses
func IsDeviceMemoryImplementation ¶ added in v0.0.2
func IsDeviceMemoryImplementation() bool
func IsPooledMemory ¶ added in v0.0.2
func IsPooledMemory() bool
func MakeSliceFromCPtr ¶ added in v0.0.2
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 SupportHashReduction ¶ added in v0.0.2
func SupportHashReduction() bool
func WaitForCudaStream ¶ added in v0.0.2
WaitForCudaStream block waits until all pending operations are finished on the specified Cuda stream.