compute

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compute

type Compute interface {
	Run(x chan int)
	Commit()
	Pre()
	Post()
	Set(Descriptor)
	Get() Descriptor
}

Simplistic Compute Interface when looking for run simple commands with Go Routines

type Descriptor

type Descriptor struct {
	Work  []int
	Local []int
	Size  int
}

Kernel Descriptor

type GPUCompute

type GPUCompute interface {

	//Setup
	Setup(bool) bool

	//Storage Access
	Queue(string)
	Run(x chan int)
	Set(Descriptor)
	Get() Descriptor
	//Buffer Routines first argument is the GPU Mapped Buffer ID which also maps to a Buffer Address
	//Copy Functions copy from GPU memory to CPU Memory. Pass copies from CPU -> GPU
	RegisterBuffer(int, int, string)
	ReadFloatBuffer([]float32, string)
	PassFloatBuffer([]float32, string)
	PassIntBuffer([]int, string)
	ReadIntBuffer([]int, string)

	//Registers a Kernel and adds the filename as a listing identifier
	RegisterKernel(string) bool
	AddSourceFile(string) bool
	AddSourceString(string) bool

	//State Booleans
	HasDeviceContext() bool
	ValidState() bool
	Log() string
}

GPU Computing Interface - Exposes a general purpose API for linearity between platforms

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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