Re: [AMBER-Developers] Anyone use restricted pointers in C?

From: Justin MacCallum <justin.maccallum.me.com>
Date: Mon, 29 Aug 2011 11:48:21 -0400

Hi Dave,

I think you need to specify --std=C99 with gcc, as restricted pointers are a C99 feature. This won't let you support C++ though. GCC also offers the non-portable __restrict__. Not sure about icc.

Cheers,
 -- Justin


On Aug 29, 2011, at 11:42 AM, dcerutti.rci.rutgers.edu wrote:

> Hello,
>
> I was poking around this morning trying to make some of the mdgx routines
> go faster, but my compilers are complaining if I use something like
>
> int IsCentralAtom(double *restrict corig, double *restrict ccen,
> double *restrict atmloc, dmat U, int *restrict ng)
> {
> <function statements>
> }
>
> The emacs editor recognizes restrict as a reserved keyword in C, but both
> gcc and icc compilers tell me that they expect a ")" after "restrict" and
> treat it like the name of an argument. Any help appreciated!
>
> Dave


-- 
Justin MacCallum - Laufer Junior Fellow
Laufer Center for Physical and Quantitative Biology
Stony Brook University
justin.maccallum.me.com
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Mon Aug 29 2011 - 09:00:04 PDT
Custom Search