Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
selrealkind.c File Reference
#include <fortran.h>
#include <stddef.h>
#include <fmath.h>
Include dependency graph for selrealkind.c:

Go to the source code of this file.

Defines

#define NUMKINDS   (signed)(sizeof(values)/sizeof(values[0]))
#define _CODE_SEL()
#define _CODE_SEL_MIPS()

Functions

_f_int _SELECTED_REAL_KIND_ (_f_int *prec, _f_int *range)
_f_int _SELECTED_REAL_KIND (_f_int *prec, _f_int *range)

Variables

struct {
   int   kind
   int   maxprecision
   int   maxexprange
values []

Define Documentation

#define _CODE_SEL ( )
Value:
if (prec != NULL)                                               \
           precval      = *prec;                                        \
        if (range != NULL)                                              \
           exprangval   = *range;                                       \
        for (i=0; i<NUMKINDS; i++) {                                    \
           if (exp_match == 0 && exprangval <= values[i].maxexprange) { \
                exp_match = values[i].kind;                             \
           }                                                            \
           if (prec_match == 0 && precval <= values[i].maxprecision) {  \
                prec_match = values[i].kind;                            \
           }                                                            \
           if (exp_match && prec_match)                                 \
                break;                                                  \
        }                                                               \
        if (exp_match == 0 && prec_match == 0)                          \
           return(-3);                                                  \
        else if (prec_match == 0)                                       \
           return(-1);                                                  \
        else if (exp_match == 0)                                        \
           return(-2);                                                  \
        return ( (exp_match > prec_match) ? exp_match : prec_match);

Definition at line 57 of file selrealkind.c.

#define _CODE_SEL_MIPS ( )

Definition at line 80 of file selrealkind.c.

Referenced by _SELECTED_REAL_KIND_().

#define NUMKINDS   (signed)(sizeof(values)/sizeof(values[0]))

Definition at line 55 of file selrealkind.c.


Function Documentation

_f_int _SELECTED_REAL_KIND ( _f_int *  prec,
_f_int *  range 
)

Definition at line 157 of file selrealkind.c.

_f_int _SELECTED_REAL_KIND_ ( _f_int *  prec,
_f_int *  range 
)

Definition at line 135 of file selrealkind.c.

References _CODE_SEL_MIPS, and result.


Variable Documentation

int kind

Definition at line 43 of file selrealkind.c.

Definition at line 45 of file selrealkind.c.

Definition at line 44 of file selrealkind.c.

struct { ... } values[] [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines