Examples programs c1.c, c2.c, and c3.c

In the examples program c1.c, c2.c and c3.c which are included as example programs in the 32 -bit c/c+= workstation 11.7, why do you have the following header files in the source:

accel.h
accelmath.h

They contribute nothing. I commented those two header files out and the programs compiled with no problem and their output after running was the same as if the files had these header files included.

Why are they in?

THX 1138

Hi THX 1138,

The accel.h header file contains the prototypes for the PGI Accelerator C runtime functions which the accelmath.h include the accelerator math routines.

Why are they in?

Most likely because the author thought he might need to use one of the runtime routines such as acc_init.

  • Mat

Let me rephrase the question. When does one add the include files accel.h and accelmath.h?

It seems they were not needed in the c1.c,c2.c and c3.c examples.

THX 1138

When does one add the include files accel.h and accelmath.h?

When you need the prototypes for the PGI Accelerator runtime functions.

  • Mat