Changeset 4072


Ignore:
Timestamp:
Aug 21, 2014, 5:05:38 PM (4 years ago)
Author:
ksherdy
Message:

Minor updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/s2k/trunk/framework/input/test/s2k/proto/grep/grep_flow.s2k

    r4065 r4072  
    8484
    8585/*
    86 Runtime.h
    87 
    88   // Associates a C array with an \s2k{} stream variable.
    89   bind<char>(buffer, stream<8> s, int size);
     86filter Read() {
     87  io.bind<8>(input.data, buffer, s2k.SEGMENT_SIZE);
     88  io.bind<1>(output.starts, starts, s2k.SEGMENT_SIZE);
     89  io.bind<1>(output.ends, ends, s2k.SEGMENT_SIZE);
     90  io.bind<1>(output.markers, markers, s2k.SEGMENT_SIZE);
    9091 
    91   // Reads a C array into an \s2k{} variable.
    92   read<>(s);
    93  
    94   // Writes an \s2k{} variable to a C array.
    95   write<>(s);
    96 
    97 };
    98 
     92  io.read<8>(input.data);
     93}
    9994*/
    100 
    101 filter Source() {
    102 
    103 }
    10495
    10596filter ClassifyBytes(in: struct Basis_bits basis_bits, out: struct Lex lex) {
     
    158149  output.line_ends = flow.ScanTo(output.line_starts, (output.lines & all_line_ends));
    159150}
    160 filter Read(out: struct Output output) {
    161   //io.bind<char>(buffer, s76543210, 1024);
    162   //io.bind<BitBlock>(starts, output.starts, 1024/BITBLOCK_SIZE);
    163   //io.bind<BitBlock>(ends, output.ends, 1024/BITBLOCK_SIZE);
    164   //io.bind<BitBlock>(markers, output.markers, 1024/BITBLOCK_SIZE);
    165151
    166   //io.read_buffer<char>(s76543210);
     152/*
     153filter Write(out: struct Output output) {
     154  io.write<1>(output.line_starts);
     155  io.write<1>(output.line_ends);
     156  io.write<1>(output.match_follows);
    167157}
     158*/
    168159
    169 // post-processing
    170 filter Write(out: struct Output output) {
    171   //io.write<BitBlock>(output.line_starts);
    172   //io.write<BitBlock>(output.line_ends);
    173   //io.write<BitBlock>(output.match_follows);
    174 }
    175 
    176 graph pipeline() { /* generates struct pipeline { void open(){} void process(){} void close(){} }; */
     160graph pipeline() {
    177161
    178162    // char * byte_data;
     
    181165    struct Output output;
    182166   
    183 //  filter Read read; /* Begins with a filter that contains bind calls, io.read<>. */
     167//  filter Read read;
    184168    filter Transpose transpose;
    185169    filter ClassifyBytes classifyBytes;
    186170    filter Match match;
    187171    filter MatchLines matchLines;
    188 //  filter Write write; /* Ends with a filter that contains write calls, io.write<>. */
     172//  filter Write write;
    189173
    190174    // read();
Note: See TracChangeset for help on using the changeset viewer.