Trouble using double complex

20 views
Skip to first unread message

Derek Olson

unread,
Sep 11, 2018, 7:23:16 PM9/11/18
to libflame-discuss
I'm working on converting my existing code that uses the double complex LAPACK routines to use libFLAME instead.

After adding

#include "FLAME.h"

to the beginning of my file, I get the following compiler error whenever I declare a double complex or double complex*

error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
double complex * CA;

Does libFlame redefine double complex somewhere? I using gcc 7.2.0 and also include the complex.h header.

Thanks,
Derek

Field G. Van Zee

unread,
Sep 11, 2018, 7:32:10 PM9/11/18
to libflame...@googlegroups.com
Hi Derek,

Thanks for your interest in libflame.

libflame does not (to my knowledge) redefine double complex or complex.
libflame uses its own scomplex and dcomplex types, and defines all of
its own complex arithmetic on those custom struct typedefs. However,
libflame was never tested with C99's <complex.h> header, so there could
be some incompatibility.

Unfortunately, I don't have the time to look into this more closely
right now because we are preparing for our annual BLIS workshop. If you
can wait a couple weeks, I can look into this down the road. Also, a
verbatim sample of your error message could be helpful. (It wasn't clear
to me based on your quoted error if it was verbatim. So perhaps you
could include the full error?)

Thanks,
Field

Derek Olson

unread,
Sep 12, 2018, 12:59:48 PM9/12/18
to libflame-discuss
Hi Field,

Thanks for the reply.

I was able to resolve the issue by replacing every instance of "double complex" with "double _Complex", and by using "_ComplexI" instead of "I".

Have fun with the workshop.

Derek
Reply all
Reply to author
Forward
0 new messages