Polaris: IntrinsicTable Class Reference

IntrinsicTable Class Reference

A static class for the intrinsic table. More...

#include <IntrinsicTable.h>

List of all members.

Public Member Functions

 IntrinsicTable ()
 ~IntrinsicTable ()
INTRIN_F_ID return_intrin_ID (const String &intrin) const
 Get ID of the intrinsic.
int lookup_intrinsic (const String &intrin) const
 Get the index of the intrinsic.
int size () const
 Number of entries in Intrinsic table.
Boolean axed (const String &intrin) const
Boolean axed (int index) const
 Is intrin axed?
void axe (const String &intrin)
void axe (int index)
 Axe intrin.
EXPR_TYPE return_type (const String &intrin) const
EXPR_TYPE return_type (int index) const
 Get the return type.
int return_length (const String &intrin) const
int return_length (int index) const
 Get the length of the return type.
Boolean return_special (const String &intrin) const
Boolean return_special (int index) const
 Does the return type require special handling?
int return_shape (const String &intrin) const
int return_shape (int index) const
 Is the result type scalar (0), array (1), either (2) or special (3).
int num_params (const String &intrin) const
int num_params (int index) const
 Max number of parameters in the intrinsic.
int num_req_params (const String &intrin) const
int num_req_params (int index) const
 Get the number of required parameters for the intrinsic.
EXPR_TYPE param_type (const String &intrin, int n) const
EXPR_TYPE param_type (int index, int n) const
 Get the type of the nth parameter of the intrinsic (where n >= 0).
int param_length (const String &intrin, int n) const
int param_length (int index, int n) const
 Get the length of the nth parameter of the intrinsic (where n >= 0).
String param_key (const String &intrin, int n) const
String param_key (int index, int n) const
 Get the key of the nth parameter of the intrinsic (where n >= 0).
int param_req_rank (const String &intrin, int n) const
int param_req_rank (int index, int n) const
 Must the parameter be scalar(0), array(1) or either(2)? (where n >= 0).
int param_num (const String &intrin, const String &key) const
int param_num (int index, const String &key) const
 Return the number of the parameter with the indicated key.
Boolean special (const String &intrin) const
Boolean special (int index) const
 Is special handling required in any way?


Detailed Description

A static class for the intrinsic table.

Polaris Expression

See also:
Expression/Intrinsic.h

Expression/Intrinsic.h

Description

This class simply provides a set of functions to look up information in a static table of intrinsic funcitons. Each function comes in two varieties: (1) looks up the intrinsic looks up the function based on its name (string) while the other (2) looks up based on the index.

Definition at line 261 of file IntrinsicTable.h.


Constructor & Destructor Documentation

IntrinsicTable::IntrinsicTable  )  [inline]
 

Definition at line 266 of file IntrinsicTable.h.

IntrinsicTable::~IntrinsicTable  )  [inline]
 

Definition at line 269 of file IntrinsicTable.h.


Member Function Documentation

INTRIN_F_ID IntrinsicTable::return_intrin_ID const String intrin  )  const
 

Get ID of the intrinsic.

Definition at line 426 of file IntrinsicTable.cc.

References lookup_intrinsic().

int IntrinsicTable::lookup_intrinsic const String intrin  )  const
 

Get the index of the intrinsic.

Definition at line 13 of file IntrinsicTable.cc.

References size().

Referenced by axe(), axed(), compute_intrinsic_type(), Symtab::ins_intrinsic(), lookup_intrinsic(), num_params(), num_req_params(), param_key(), param_length(), param_num(), param_req_rank(), param_type(), return_intrin_ID(), return_length(), return_shape(), return_special(), return_type(), and special().

int IntrinsicTable::size  )  const
 

Number of entries in Intrinsic table.

Definition at line 420 of file IntrinsicTable.cc.

Referenced by lookup_intrinsic().

Boolean IntrinsicTable::axed const String intrin  )  const
 

Definition at line 259 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

Boolean IntrinsicTable::axed int  index  )  const
 

Is intrin axed?

Definition at line 269 of file IntrinsicTable.cc.

void IntrinsicTable::axe const String intrin  ) 
 

Definition at line 277 of file IntrinsicTable.cc.

References lookup_intrinsic().

void IntrinsicTable::axe int  index  ) 
 

Axe intrin.

Definition at line 287 of file IntrinsicTable.cc.

EXPR_TYPE IntrinsicTable::return_type const String intrin  )  const
 

Definition at line 295 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type(), and Symtab::ins_intrinsic().

EXPR_TYPE IntrinsicTable::return_type int  index  )  const
 

Get the return type.

Definition at line 305 of file IntrinsicTable.cc.

int IntrinsicTable::return_length const String intrin  )  const
 

Definition at line 313 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

int IntrinsicTable::return_length int  index  )  const
 

Get the length of the return type.

Definition at line 323 of file IntrinsicTable.cc.

Boolean IntrinsicTable::return_special const String intrin  )  const
 

Definition at line 331 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

Boolean IntrinsicTable::return_special int  index  )  const
 

Does the return type require special handling?

Definition at line 341 of file IntrinsicTable.cc.

int IntrinsicTable::return_shape const String intrin  )  const
 

Definition at line 349 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

int IntrinsicTable::return_shape int  index  )  const
 

Is the result type scalar (0), array (1), either (2) or special (3).

Definition at line 359 of file IntrinsicTable.cc.

int IntrinsicTable::num_params const String intrin  )  const
 

Definition at line 367 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

int IntrinsicTable::num_params int  index  )  const
 

Max number of parameters in the intrinsic.

Definition at line 377 of file IntrinsicTable.cc.

int IntrinsicTable::num_req_params const String intrin  )  const
 

Definition at line 385 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

int IntrinsicTable::num_req_params int  index  )  const
 

Get the number of required parameters for the intrinsic.

Definition at line 395 of file IntrinsicTable.cc.

EXPR_TYPE IntrinsicTable::param_type const String intrin,
int  n
const
 

... 0 params means variable number

Definition at line 52 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

EXPR_TYPE IntrinsicTable::param_type int  index,
int  n
const
 

Get the type of the nth parameter of the intrinsic (where n >= 0).

... 0 params means variable number

Definition at line 70 of file IntrinsicTable.cc.

int IntrinsicTable::param_length const String intrin,
int  n
const
 

... 0 params means variable number

Definition at line 87 of file IntrinsicTable.cc.

References lookup_intrinsic().

int IntrinsicTable::param_length int  index,
int  n
const
 

Get the length of the nth parameter of the intrinsic (where n >= 0).

... 0 params means variable number

Definition at line 104 of file IntrinsicTable.cc.

String IntrinsicTable::param_key const String intrin,
int  n
const
 

... 0 params means variable number

Definition at line 121 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

String IntrinsicTable::param_key int  index,
int  n
const
 

Get the key of the nth parameter of the intrinsic (where n >= 0).

... 0 params means variable number

Definition at line 145 of file IntrinsicTable.cc.

int IntrinsicTable::param_req_rank const String intrin,
int  n
const
 

... 0 params means variable number

Definition at line 169 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

int IntrinsicTable::param_req_rank int  index,
int  n
const
 

Must the parameter be scalar(0), array(1) or either(2)? (where n >= 0).

... 0 params means variable number

Definition at line 188 of file IntrinsicTable.cc.

int IntrinsicTable::param_num const String intrin,
const String key
const
 

... 0 params means variable number

Definition at line 205 of file IntrinsicTable.cc.

References lookup_intrinsic().

int IntrinsicTable::param_num int  index,
const String key
const
 

Return the number of the parameter with the indicated key.

Return -1 if parameter not found.

Definition at line 228 of file IntrinsicTable.cc.

Boolean IntrinsicTable::special const String intrin  )  const
 

Definition at line 403 of file IntrinsicTable.cc.

References lookup_intrinsic().

Referenced by compute_intrinsic_type().

Boolean IntrinsicTable::special int  index  )  const
 

Is special handling required in any way?

Definition at line 413 of file IntrinsicTable.cc.


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:07:35 2005