// GetMethod returns a method from a JITModule
GetMethod returns a method from a JITModule
// GetMethod returns a method from a JITModule
func (m *JITModule) GetMethod(method string) (*JITModuleMethod, error) {
	cstr := C.CString(method)
	defer C.free(unsafe.Pointer(cstr))
	var cErr C.Torch_Error
	context := C.Torch_JITModuleGetMethod(m.context, cstr, &cErr)
	if err := checkError(cErr); err != nil {
		return nil, err
	}
	met := &JITModuleMethod{context: context, Module: m, Name: method}
	runtime.SetFinalizer(met, (*JITModuleMethod).finalize)
	return met, nil
}
func ( m * JITModule ) GetMethod ( method string ) ( * JITModuleMethod , error ) { cstr := C . CString ( method ) defer C . free ( unsafe . Pointer ( cstr ) ) var cErr C . Torch_Error context := C . Torch_JITModuleGetMethod ( m . context , cstr , & cErr ) if err := checkError ( cErr ) ; err != nil { return nil , err } met := & JITModuleMethod { context : context , Module : m , Name : method } runtime . SetFinalizer ( met , ( * JITModuleMethod ) . finalize ) return met , nil }
GetMethod returns a method from a JITModule
GetMethod returns a method from a JITModule