cuda

package
v0.0.0-...-2b09442 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceSynchronize

func DeviceSynchronize() error

func Free

func Free(p unsafe.Pointer) error

func FreeHost

func FreeHost(p unsafe.Pointer) error

func HostAlloc

func HostAlloc(p *unsafe.Pointer, size int, flags HostAllocFlag) error

func HostGetDevicePointer

func HostGetDevicePointer(d *unsafe.Pointer, p unsafe.Pointer, typ uint) error

func LaunchHostFunc

func LaunchHostFunc(stream Stream, cb HostFn, userData unsafe.Pointer) error

func Malloc

func Malloc(p *unsafe.Pointer, size int) error

Malloc wraps cudaMalloc

func Memcpy

func Memcpy(dst unsafe.Pointer, src unsafe.Pointer, size int, typ MemcpyKind) error

func MemcpyAsync

func MemcpyAsync(dst unsafe.Pointer, src unsafe.Pointer, size int, typ MemcpyKind, stream Stream) error

func ProfilerStart

func ProfilerStart() error

func ProfilerStop

func ProfilerStop() error

func SetDevice

func SetDevice(device int) error

func StreamCreate

func StreamCreate(s *Stream) error

func StreamDestroy

func StreamDestroy(stream Stream) error

func StreamSynchronize

func StreamSynchronize(stream Stream) error

Types

type Error

type Error C.cudaError_t

Error wraps cudaError_t and implements error interface

func (Error) Error

func (e Error) Error() string

type Event

type Event C.cudaEvent_t

type HostAllocFlag

type HostAllocFlag C.uint
var HostAllocDefault HostAllocFlag = C.cudaHostAllocDefault
var HostAllocMapped HostAllocFlag = C.cudaHostAllocMapped
var HostAllocPortable HostAllocFlag = C.cudaHostAllocPortable
var HostAllocWriteCombined HostAllocFlag = C.cudaHostAllocWriteCombined

type HostFn

type HostFn func(userData unsafe.Pointer)

type MemcpyKind

type MemcpyKind C.enum_cudaMemcpyKind

MemcpyKind wraps enum_cudaMemcpyKind

var MemcpyDeviceToHost MemcpyKind = C.cudaMemcpyDeviceToHost
var MemcpyHostToDevice MemcpyKind = C.cudaMemcpyHostToDevice
var MemcpyHostToHost MemcpyKind = C.cudaMemcpyHostToHost

type Stream

type Stream C.cudaStream_t

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL