source: icGREP/icgrep-devel/icgrep/kernels/deletion.h @ 5267

Last change on this file since 5267 was 5267, checked in by nmedfort, 3 years ago

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File size: 1.0 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef DELETION_H
6#define DELETION_H
7
8#include "kernel.h"
9namespace IDISA { class IDISA_Builder; }
10
11//
12// Parallel Prefix Deletion
13// see Parallel Prefix Compress in Henry S. Warren, Hacker's Delight, Chapter 7
14//
15// Given that we want to delete bits within fields of width fw, moving
16// nondeleted bits to the right, the parallel prefix compress method can
17// be applied.   This requires a preprocessing step to compute log2(fw)
18// masks that can be used to select bits to be moved in each step of the
19// algorithm.
20//
21
22namespace kernel {
23
24class DeletionKernel : public kernel::KernelBuilder {
25public:
26
27    DeletionKernel(IDISA::IDISA_Builder * iBuilder, unsigned fw, unsigned streamCount);
28   
29protected:
30
31    void generateDoBlockMethod() const override;
32
33    void generateFinalBlockMethod() const override;
34
35private:
36    const unsigned mDeletionFieldWidth;
37    const unsigned mStreamCount;
38};
39
40}
41   
42#endif
43
Note: See TracBrowser for help on using the repository browser.