On May 13, 2011, at 3:58 AM, Jed Brown wrote: > On Fri, May 13, 2011 at 04:43, Barry Smith <bsmith at mcs.anl.gov> wrote: > On occasion the same options in petscconf.h don't work for both C and C++ > compilers, for example for __intel_fast_memcpy(). > > This is just insane, but I thought the compiler automatically expanded normal > memcpy to __intel_fast_memcpy. I just checked and my Intel C and C++ > compilers (versions 10 and 11) do this automatically at -O2 and above. Should > PETSc ever be calling it directly?
I have removed the use of the __intel_fast functions from the PETSc source. Would have saved us tons of pain with that damn problem if I listened to you years ago. > > Should we instead generate three files one for each language? > > If it's really necessary, why not put both in the same header guarded by > #ifdef __cplusplus ? Why? Since we have complete control of the process why put in ugly #ifdef logic? Just put the information into different files. Use of CPP is an admission that you haven't found a better way to do it :-) Barry
