0

Is there a problem using MKL with user (non 64 bit aligned) allocated data ?

I'm trying to use MKL function

vcMulByConj(...)

with continues memory allocated using OpenCV mat object. (with I believe it's implemented using "new" c++ operation)

I frequently receive an access violation exception.

I'm aware that MKL would work with 64 bit aligned allocation

void* datta = MKL_malloc(n*n*sizeof(double),64);

I'm aware of the performance vulnerability, albeit, can I use my own unaligned memory to use MKL functions?

Is there any problem with my memory model ?

I would ask the same question for IPP functions


Update:

Both MKL and IPP are aligned to 64 bit, Can I use the same memory allocation mechanize for both MKL and IPP library calls ?

(Lets say using ippiMalloc() for both libraries)

Best

TripleS
  • 1,216
  • 1
  • 23
  • 39

1 Answers1

1

Yes, you can.

Using aligned memory is a recommendation which may improve the performance, but it is not a requirement. MKL functions generally work correctly on both aligned and unaligned data.

https://software.intel.com/en-us/node/528558

For IPP, this is also true. See the last Q&A in the following link.

https://software.intel.com/en-us/articles/performance-tools-for-software-developers-memory-function-faq

kangshiyin
  • 9,681
  • 1
  • 17
  • 29
  • Thank you, both MKL and IPP are aligned to 64 bit, Can I use the same memory allocation mechanize for both MKL and IPP (using ippiMalloc() for both libraries )? I updated my question – TripleS Aug 01 '16 at 12:46