|
Boost : |
Subject: Re: [boost] mkl+boost problems
From: Eric Niebler (eric_at_[hidden])
Date: 2010-11-08 17:37:55
On 11/8/2010 5:25 PM, Andrey Asadchev wrote:
> Hello.
>
> mkl (intel blas) has "mkl_cblas.h" file which in turn includes "
> mkl_types.h" file which defines P4 macro variable:
>
> 70 /** CPU codes for int MKL_CPU_DETECT(void) **/
> 71 #ifdef _IPF
> 72 #define ITP 0
> 73 #else
> 74 #ifdef _EM64T
> 75 #define NI 0
> 76 #define CT 1
> 77 #define MNI 2
> 78 #define PNR 3
> 79 #else
> 80 #define DEF 0
> 81 #define PIII 1
> 82 #define P4 2
> 83 #define P4P 3
> 84 #define P4M 4
> 85 #endif
> 86 #endif
This is HORRIBLE.
> This P4 variable creates havoc of MPL templates which have P4 template
> parameters names.
>
> What to do?
File a bug against mkl for subjecting the world to their macro
pollution. And then create a wrapper header for yourself that includes
mkl and then #undef's the macros that are causing you grief.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk