Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Unable to run a mkl_malloc function from a package in Go

$
0
0

Hi, I am trying to use mkl_malloc() in Golang.

I have created a package which wraps mkl_malloc(). I called the wrapper from other Go file.

The problem comes when I am calling the wrapper. The package is build fine.

This is the error when I use the wrapper:

/tmp/go-build655247984/blasl1.a(blasl1.cgo2.o)(.text): MKL_malloc: not defined
MKL_malloc(0): not defined

The wrapper:

func Mal(x int,y int)unsafe.Pointer{
    return unsafe.Pointer(C.mkl_malloc(C.size_t(x),C.int(y)))
}

Using the wrapper:

x := blasl1.MKLMal(1024,64)

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>