Documentation ¶
Index ¶
- func CudaErrorString(res C.CUresult) string
- func GetDevicesCount() int
- func GetNVRTCVersion() (major, minor int)
- func GetVersion() int
- func Init()
- func NvrtcErrorString(res C.nvrtcResult) string
- func StartProfiler()
- func StopProfiler()
- type Buffer
- func (buf *Buffer) FromDevice(dest unsafe.Pointer)
- func (buf *Buffer) FromDeviceN(dest unsafe.Pointer, size int)
- func (buf *Buffer) FromDoubleC(v C.double)
- func (buf *Buffer) FromFloat32(v float32)
- func (buf *Buffer) FromFloat64(v float64)
- func (buf *Buffer) FromFloatC(v C.float)
- func (buf *Buffer) FromHost(source unsafe.Pointer)
- func (buf *Buffer) FromHostN(source unsafe.Pointer, size int)
- func (buf *Buffer) FromInt32(v int32)
- func (buf *Buffer) FromInt64(v int64)
- func (buf *Buffer) FromIntC(v C.int)
- func (buf *Buffer) MemSet16(v uint16, num int)
- func (buf *Buffer) MemSet32(v uint32, num int)
- func (buf *Buffer) MemSet8(v uint8, num int)
- func (buf *Buffer) ToFloat32() float32
- func (buf *Buffer) ToFloat64() float64
- func (buf *Buffer) ToInt32() int32
- func (buf *Buffer) ToInt64() int64
- type Context
- type Device
- type Function
- type Module
- type Program
- type Source
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CudaErrorString ¶
func GetDevicesCount ¶
func GetDevicesCount() int
func GetNVRTCVersion ¶
func GetNVRTCVersion() (major, minor int)
func GetVersion ¶
func GetVersion() int
func NvrtcErrorString ¶
func NvrtcErrorString(res C.nvrtcResult) string
func StartProfiler ¶
func StartProfiler()
func StopProfiler ¶
func StopProfiler()
Types ¶
type Buffer ¶
type Buffer struct { Id C.CUdeviceptr // contains filtered or unexported fields }
func AllocManagedFloat32 ¶
Allocates an array of float32 using unified memory
func AllocManagedFloat64 ¶
func AllocManagedInt32 ¶
func (*Buffer) FromDevice ¶
func (*Buffer) FromDoubleC ¶
func (*Buffer) FromFloat32 ¶
func (*Buffer) FromFloat64 ¶
func (*Buffer) FromFloatC ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func Create ¶
WARNING: The created context is bound to a CPU thread, therefore use runtime.LockOSThread()
func PopCurrent ¶
func PopCurrent() *Context
func (*Context) GetApiVersion ¶
func (*Context) PushCurrent ¶
func (ctx *Context) PushCurrent()
func (*Context) Synchronize ¶
func (ctx *Context) Synchronize()
type Device ¶
func GetDevices ¶
func GetDevices() []*Device
func (*Device) GetAttribute ¶
func (dev *Device) GetAttribute(attrib C.CUdevice_attribute) int
func (*Device) GetMaxBlockDim ¶
func (*Device) GetMaxGridDim ¶
type Function ¶
type Function struct {
Id C.CUfunction
}
type Program ¶
type Program struct { //Source Source //Headers []Source PTX []byte // contains filtered or unexported fields }
func CreateProgram ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.