Map definitions are retrieved and their expressions compiled. Mapping expressions are processed in output field offset order. Expressions that are effectively "byte copy" are identified. Linear sequences of byte copies are merged into one expression. Merged "byte copy" is significantly faster, when mapping a list of scalar members in a struct (trace header fields). Similar optimization is applied to assignment sequences that convert between the same pair of types (int to float, etc.) Expressions in the output symbol table are evaluated when the cdds_map function is called (perhaps via cdds_readm or writem).
OVERVIEW: FUNCTIONS: calling hierarchy of map specific processing. cdds_openm ddsMapCompile process output in offset order ddsMapStruct iff output ptype is DDS_STYPE_STRUCT ddsMapAssign synthesize assignment ddsMapOptimize optimize assignment ddsMapUnion iff output ptype is DDS_STYPE_UNION ddsMapVect iff output ptype is "vector" Structures: DDS_MAP - Mapping Structure defined in dds_binary.h Globals: DDS_MAP **dds_map; /* map descriptors from one binary to another */ Files: f_xxx.c - Fortran API Routines f_map.c f_openm.c c_xxx.c - "C" API Routines c_map.c c_openm. openmap.c - Open mapping from input to output binary mapcompile.c - Open map processing phase 1 (compilation) (called only by ddsOpenMap) mapcompilesu.c - Open map processing of structures & unions (compilation) (called only by ddsMapCompile) mapcompilesu2.c - Compile map for struct members (called only by ddsMapCompileSU) mapassign.c - Open map assignments (called only by ddsMapCompileSU2 and ddsLinkObjectSU2) evaluate.c - Evaluate DDS_EXPR expression sequence. All numerical expressions are handled by this routine. dateconv.c - Conversion between segy Date structure & usp SGRDat