To execute KAP as a standalone preprocessor, use the following commands as follows:
cc /define=(__KAP,__ALPHA,__DECC,_FASTMATH,_INLINE_INTRINSICS,_INTRINSICS) -
/NOLINE_DIRECTIVES/PREPROCESS_ONLY=ktmpa416.c myprog.c
kapc /cmp=myprog_cmp.c ktmpa416.c /conc
cc/optimize=(tune=host,level=4)/ANSI_ALIAS myprog_cmp.c
link /threads_enable/EXECUTABLE=myprog.exe myprog_cmp.obj,SYS$COMMON:[SYSLIB]kio/lib,
SYS$COMMON:[SYSLIB]kmp/lib
/ANSI_ALIAS -Directs the compiler to assume
the ANSI C aliasing rules, thereby giving it the freedom to
generate better optimized code.
/conc - tells KAP to restructure source code
for parallel processing.
/cmp - causes KAP to save the optimized
source program under the file name of your choice. The
kapc default is to name the optimized source
file_name_cmp .
/threads_enable -allows a multithreaded
application to have a thread executing on every CPU in a
multiprocessor system.
/optimize=(tune=host,level=4) - tells
the compiler to optimize for the architecture of the host
processor and to set the compiler optimization level 4 for full
optimization.)
sys$common:[syslib]kmp/lib - causes the
linker to link to the KAP parallel processing library
/sys$common:[syslib]kmp.olb .
sys$common:[syslib]kio/lib -
causes the linker to link to the KAP I/O library
/sys$common:[syslib]kio.olb .
kapc
to preprocess a file, you must set the DEC C compiler and linker
qualifiers appropriately. For this reason, Digital recommends that
you use kcc whenever possible, as kcc
automatically sets the compiler and linker qualifiers correctly.