nvidia

package
v0.0.0-...-98db5b7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: CC-BY-4.0 Imports: 8 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Memcpy

func Memcpy(dest, src cutil.Pointer, sizeinbytes uint) error

Memcpy is like cudart.Memcpy but it is using the cudart.Memcpykind{}.Default() flag

Types

type Malloced

type Malloced struct {
	// contains filtered or unexported fields
}

Malloced is a pointer to some nvidia memory

func MallocGlobal

func MallocGlobal(w Worker, sizebytes uint) (x *Malloced, err error)

MallocGlobal allocates memory to the nvidia gpu Handler will set the device it is allocating to. Besure to set back if wanting to use another device

func MallocHost

func MallocHost(w Worker, sizebytes uint) (x *Malloced, err error)

MallocHost allocates memory onto the host used by nvidia devices. Handler will set the device it is allocating to. Besure to set back if wanting to use another device

func (*Malloced) DPtr

func (m *Malloced) DPtr() *unsafe.Pointer

DPtr is a double pointer to nvidia device memory

func (*Malloced) FillSlice

func (m *Malloced) FillSlice(handle *cudnn.Handler, input interface{}) error

FillSlice will fill a slice that was passed in the input

func (*Malloced) NewReadWriter

func (m *Malloced) NewReadWriter(s gocu.Streamer) *crtutil.ReadWriter

NewReadWriter creates a devio.Buffer for the malloced memory. If s is nil then copies will be synced if not then copies will be async

func (*Malloced) OffSet

func (m *Malloced) OffSet(bybytes uint) *Malloced

OffSet returns the offset of the nvidia memory

func (*Malloced) Ptr

func (m *Malloced) Ptr() unsafe.Pointer

Ptr is an unsafe pointer to nvidia memory

func (*Malloced) SIB

func (m *Malloced) SIB() uint

SIB returns the size in bytes

func (*Malloced) SetAll

func (m *Malloced) SetAll(val int32) error

SetAll sets the memory to whatever integer value passed

type Worker

type Worker interface {
	Work(func() error) error
}

Directories

Path Synopsis
cuda
Package cudnn takes the descriptors from gocudnn which is from cudnn and seperates them into seperate packages.
Package cudnn takes the descriptors from gocudnn which is from cudnn and seperates them into seperate packages.
softmax
Package softmax uses the softmax functions from gocudnn which is from cudnn.
Package softmax uses the softmax functions from gocudnn which is from cudnn.
tensor
Package tensor is used to make tensors by using gocudnn.
Package tensor is used to make tensors by using gocudnn.
custom
Package nvutil are functions that use the other nvidia packages and allows them to be used with each other
Package nvutil are functions that use the other nvidia packages and allows them to be used with each other

Jump to

Keyboard shortcuts

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