Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

MKL_Complex16 not bitwise copyable

$
0
0

Hello,

I need to offload a ZGEMM call to the xeon phi. Unfortunately, the compiler is complaining that "variable 'A' used in this offload region is not bitwise copyable". However, A is just a MKL_Complex16 pointer. So far the MKL_Complex16 type never gave me any problems.

Since MKL_Complex16 is just a plain struct with two doubles, the following explanation does not really apply:  https://software.intel.com/en-us/articles/effective-use-of-the-intel-com...

void foo(MKL_Complex16 *A, MKL_Complex16 *B, MKL_Complex16 *C, ... some more arguments...)
{
  //... some initialization ...

  alpha = MKL_Complex16 (sigma_1 / e, 0.0);
  beta = MKL_Complex16 (0.0, 0.0);

  const int matrix_elements = n*n;

   #pragma offload target(mic:0) \
	in(A: length(matrix_elements) free_if(1)) \
	in(B: length(matrix_elements) free_if(1)) \
	in(C:length(matrix_elements)) \
	out(C:length(matrix_elements) free_if(1))
  zgemm("N", "N", &n, &n, &n, &alpha, (const MKL_Complex16*)(A), &n,
        (const MKL_Complex16*)B, &n, &beta, C, &n);

  //... something else ...
}

What could be the problem here?

Thanks,

Paul


Viewing all articles
Browse latest Browse all 1347

Latest Images

Trending Articles



Latest Images