source: icGREP/icgrep-devel/icgrep/toolchain/grep_pipeline.h @ 5769

Last change on this file since 5769 was 5706, checked in by nmedfort, 20 months ago

First stage of MultiBlockKernel? and pipeline restructuring

File size: 864 bytes
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6#ifndef GREP_PIPELINE_H
7#define GREP_PIPELINE_H
8
9#include <stdlib.h>
10#include <stdint.h>
11
12namespace re { class RE; }
13
14namespace grep {
15   
16class MatchAccumulator {
17public:
18    MatchAccumulator() {}
19    virtual void accumulate_match(const size_t lineNum, char * line_start, char * line_end) = 0;
20    virtual void finalize_match(char * buffer_end) {}  // default: no op
21};
22
23void accumulate_match_wrapper(intptr_t accum_addr, const size_t lineNum, char * line_start, char * line_end);
24
25void finalize_match_wrapper(intptr_t accum_addr, char * buffer_end);
26   
27void grepBuffer(re::RE * pattern, const char * buffer, size_t bufferLength, MatchAccumulator * accum);
28
29}
30
31#endif
Note: See TracBrowser for help on using the repository browser.