hiprtc

package module
v0.0.0-...-c0e8421 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: MIT Imports: 3 Imported by: 0

README

hiprtc

Go bindings for hiprtc.h requires AMD's rocm , and hip. Will only work on AMD gpus

One day I will make an example, and write comments.

Must install rocm first. Follow link below.

https://rocm.github.io/install.html

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Program

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

func CreateProgram

func CreateProgram(srcstring, filename string, headers, includes []string) (p *Program, err error)

CreateProgram srcstring is the contents of the string srcstring:=`extern "C" __global__ void add(float *A, float *B, float *C,int n){

  int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i < n) {
       C[tid] = A[i] + B[i];
    }
	}`

	Then you can make a filename := "adder.cpp"

func (*Program) AddNameExpression

func (p *Program) AddNameExpression(nameExpression string) error

func (*Program) Compile

func (p *Program) Compile(options []string) error

func (*Program) GetCode

func (p *Program) GetCode() (code string, err error)

func (*Program) GetLog

func (p *Program) GetLog() (log string, err error)

func (*Program) GetLoweredName

func (p *Program) GetLoweredName(nameExpression string) (string, error)

Jump to

Keyboard shortcuts

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