Closed chewxy closed 6 years ago
The C declaration is CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut);
CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut);
This requires the creation of new types, as prototyped below:
type Link uintptr
cuda.h
type JITOption int
const
type JITInputType byte
The APIs that need to be ported:
cuLinkCreate
func NewLink() (Link, error)
cuLinkComplete
func (Link) Complete() (fatBin unsafe.Pointer, size int64, err error)
cuLinkAddFile
func (Link) AddFile(...) error
cuLinkAddData
func (Link) AddData(...) error
Fixed
The C declaration is
CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut);
This requires the creation of new types, as prototyped below:
type Link uintptr
(note that uintptr is just a placeholder. It's only good to use if the underlying type is a pointer, refer tocuda.h
)type JITOption int
(withconst
)type JITInputType byte
(withconst
)The APIs that need to be ported:
cuLinkCreate
->func NewLink() (Link, error)
cuLinkComplete
->func (Link) Complete() (fatBin unsafe.Pointer, size int64, err error)
cuLinkAddFile
->func (Link) AddFile(...) error
cuLinkAddData
->func (Link) AddData(...) error