devices

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: 2 Imported by: 1

Documentation

Overview

Package devices is kind of a pipe dream. Where I and others can can add different libraries to the go platform. I will probably make this its own package one day.

Index

Constants

View Source
const (
	Uint8 = Type(iota)
	Int8
	Uint16
	Int16
	Uint32
	Int32
	Uint
	Int
	Uint64
	Int64
	Float16H
	Float32
	Float64
	UNKNOWN
)

These are flags to determine data type for device slices

Variables

This section is empty.

Functions

func Len

func Len(slice interface{}) uint

Len returns the length of the slice passed

func MakeFloat16Slice

func MakeFloat16Slice(vals []float32) []half.Float16

MakeFloat16Slice makes slice of float16 from a slice of float32

Types

type Slice

type Slice interface {
	Set(value interface{}, offset uint)
	Get(value interface{}, offset uint)
	Length() uint
	Type() Type
}

Slice interfaces with device memory similarly to go slices

type Type

type Type uint

Type are used to determine allocation size and offset array stuff so it is easier to handle memory copying Between devices

func (Type) SizeOf

func (t Type) SizeOf() uint

SizeOf returns the SizeT which is the size in bytes of the type

type Typer

type Typer interface {
	Type() Type
}

Typer returns a Type equivilent to its own type

Directories

Path Synopsis
gpu
nvidia/cudnn
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.
nvidia/cudnn/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.
nvidia/cudnn/tensor
Package tensor is used to make tensors by using gocudnn.
Package tensor is used to make tensors by using gocudnn.
nvidia/nvutil
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