4.5.15 /routine, /rt, /nrt, (/noroutine)

The /routine qualifier allows you to specify qualifiers that apply only to specific routines within the source file KAP processes. The only qualifiers that /routine can specify are as follows:

The syntax of a KAP command using the /routine qualifier is as follows:

kapc [/<qualifiers>] source_file.c \

Place the /routine qualifier after the name for the C source file. Specify qualifiers that apply to all routines in the source file after kapc . The <routine_ name> argument must be a routine in source_ file.c.

Consider the following command line:

kapc /scalaropt program.c /routine=sub_1 /roundoff /optimize

This command invokes KAP and passes the /scalaropt qualifier to all program units in file program.c including sub_1 . Program unit sub_1 processes with both the /roundoff and /optimize qualifiers.

Using the /routine qualifier implies that directives equivalent to the specified qualifiers are asserted only while processing particular routines. The effect is the same as if the implied directives were inserted at the top of the associated routines.

Using the /routine qualifier makes the resulting kapc command contain two halves. The first half looks like any other kapc command because it contains "kapc ," qualifiers different from /routine , and a source file name. The second half of the command is different because it contains one or more /routine qualifiers, each with associated routines and qualifiers for the routines selected from the preceding bulleted list.

Consider the following command line:

kapc /cachesize=8,0 /syntax=a /freeformat my_program.c - /routine=sub_1,sub_2,sub_3 /roundoff /optimize /routine=sub_4 /unroll

An explanation of the two halves follows:

  1. This command invokes KAP and passes the /cachesize=8,0 , /freeformat , and /syntax=a qualifiers to all program units in file my_program.c. The program units include sub_1, sub_2, sub_3, and sub_4 .

  2. Program units sub_1 , sub_2 , and sub_3 process with both the /roundoff and /optimize qualifiers. Routine /sub_4 processes with the /unroll qualifier.

The usual rules for shortening the names of qualifiers also apply to the /routine qualifier. For example, the following KAP command fragments produce identical results:

/routine=subroutine_a /optimize /unroll

/routine=subroutine_a /opt /unr

Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers

Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.