Changeset 2806


Ignore:
Timestamp:
Jan 10, 2013, 8:29:25 PM (6 years ago)
Author:
ksherdy
Message:

Re-oranganized headers to provide a clear separation between application specific and stream struct / function headers.

Location:
proto/parabix2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/pablo_template.cpp

    r2805 r2806  
     1// Stream struct and function headers and definitions
     2
     3#include "../lib/simd-lib/bitblock.hpp"
     4#include "../lib/simd-lib/carryQ.hpp"
     5#include "../lib/simd-lib/pabloSupport.hpp"
     6
     7#define LocalCarryDeclare(name, count)\
     8CarryArray<count, 0> name;\
     9
     10#define assert_0_error(errkind, errstrm)
     11
     12BitBlock EOF_mask = simd<1>::constant<1>();
     13
     14// XMLWF application headers and definitions
    115#include <stdio.h>
    216#include <stdlib.h>
     
    519#include <sys/stat.h>
    620
    7 //#define STL_ALIGNED_VECTOR
     21#include "../lib/simd-lib/s2p.hpp"
     22#include "../lib/simd-lib/buffer.hpp"
     23#include "../lib/simd-lib/bitblock_iterator.hpp"
     24#include "../lib/simd-lib/perflib/perfsec.h"
     25
     26#include <xmldecl.h>
     27#include <namechars.h>
     28#include <LineColTracker.hpp>
     29#include <XMLTestSuiteError.h>
     30
     31// Define the mappings for pablo.assert_0(strm, errkind) statements which
     32// compile to the the form assert_0_error(errkind, strm)
     33#include <ErrorTracker.h>
     34
     35ErrorTracker error_tracker;
     36#define assert_0_error(errkind, errstrm) error_tracker.NoteError(errkind, errstrm);
     37
     38//#define STL_ALIGNED_VECTOR // experimental STL Aligned Vector
     39#ifndef STL_ALIGNED_VECTOR
     40#include <TagMatcher.hpp>
     41#endif
     42
    843#ifdef STL_ALIGNED_VECTOR // experimental, comment out TagMatcher code to use STL aligned memory vector
    9 #warning "Compiling experimental STL_ALIGNED_VECTOR."
     44#warning "Compiling with experimental STL_ALIGNED_VECTOR."
    1045#include <vector>
    1146#include "../lib/simd-lib/stl_aligned_allocator.hpp"
    1247#endif
    13 
    14 #define LocalCarryDeclare(name, count)\
    15 CarryArray<count, 0> name;\
    16 
    17 #include "../lib/simd-lib/bitblock.hpp"
    18 #include "../lib/simd-lib/carryQ.hpp"
    19 #include "../lib/simd-lib/pabloSupport.hpp"
    20 #include "../lib/simd-lib/bitblock_iterator.hpp"
    21 #include "../lib/simd-lib/s2p.hpp"
    22 #include "../lib/simd-lib/perflib/perfsec.h"
    23 #include "../lib/simd-lib/buffer.hpp"
    24 
    25 #include <xmldecl.h>
    26 #include <namechars.h>
    27 #ifndef STL_ALIGNED_VECTOR
    28 #include <TagMatcher.hpp>
    29 #endif
    30 #include <LineColTracker.hpp>
    31 #include <ErrorTracker.h>
    32 #include <XMLTestSuiteError.h>
    33 
    34 // Define the mappings for pablo.assert_0(strm, errkind) statements which
    35 // compile to the the form assert_0_error(errkind, strm)
    36 #define assert_0_error(errkind, errstrm) error_tracker.NoteError(errkind, errstrm);
    3748
    3849#ifdef BUFFER_PROFILING
     
    4556    void * parser_timer;
    4657#endif
    47 
    48 ErrorTracker error_tracker;
    49 BitBlock EOF_mask = simd<1>::constant<1>();
    5058
    5159//////////////////////////////////////////////////////////////////////////////////////////
  • proto/parabix2/pablo_template_lsst.cpp

    r2805 r2806  
     1// Stream struct and function headers and definitions
     2
     3#include "../lib/simd-lib/bitblock.hpp"
     4#include "../lib/simd-lib/carryQ.hpp"
     5#include "../lib/simd-lib/pabloSupport.hpp"
     6
     7#define LocalCarryDeclare(name, count)\
     8CarryArray<count, 0> name;\
     9
     10#define assert_0_error(errkind, errstrm)
     11
     12BitBlock EOF_mask = simd<1>::constant<1>();
     13
     14// XMLWF application headers and definitions
    115#include <stdio.h>
    216#include <stdlib.h>
     
    519#include <sys/stat.h>
    620
    7 #define LocalCarryDeclare(name, count)\
    8 CarryArray<count, 0> name;\
    9 
    10 #include <simd-lib/bitblock.hpp>
    11 #include <simd-lib/carryQ.hpp>
    12 #include <simd-lib/pabloSupport.hpp>
    13 #include <simd-lib/bitblock_iterator.hpp>
    14 #include <simd-lib/s2p.hpp>
     21#include "../lib/simd-lib/s2p.hpp"
     22#include "../lib/simd-lib/buffer.hpp"
     23#include "../lib/simd-lib/bitblock_iterator.hpp"
    1524#include "../lib/simd-lib/perflib/perfsec.h"
    1625
    1726#include <xmldecl.h>
    1827#include <namechars.h>
    19 #include <TagMatcher.hpp>
    2028#include <LineColTracker.hpp>
    21 #include <ErrorTracker.h>
    2229#include <XMLTestSuiteError.h>
    2330
    2431// Define the mappings for pablo.assert_0(strm, errkind) statements which
    2532// compile to the the form assert_0_error(errkind, strm)
     33#include <ErrorTracker.h>
     34
     35ErrorTracker error_tracker;
    2636#define assert_0_error(errkind, errstrm) error_tracker.NoteError(errkind, errstrm);
     37
     38//#define STL_ALIGNED_VECTOR // experimental STL Aligned Vector
     39#ifndef STL_ALIGNED_VECTOR
     40#include <TagMatcher.hpp>
     41#endif
     42
     43#ifdef STL_ALIGNED_VECTOR // experimental, comment out TagMatcher code to use STL aligned memory vector
     44#warning "Compiling with experimental STL_ALIGNED_VECTOR."
     45#include <vector>
     46#include "../lib/simd-lib/stl_aligned_allocator.hpp"
     47#endif
    2748
    2849#define LSST
Note: See TracChangeset for help on using the changeset viewer.