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

Last change on this file since 4981 was 4981, checked in by cameron, 3 years ago

Initial check-in for parallel prefix deletion

File size: 940 bytes
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//
9// Parallel Prefix Deletion
10// see Parallel Prefix Compress in Henry S. Warren, Hacker's Delight, Chapter 7
11//
12// Given that we want to delete bits within fields of width fw, moving
13// nondeleted bits to the right, the parallel prefix compress method can
14// be applied.   This requires a preprocessing step to compute log2(fw)
15// masks that can be used to select bits to be moved in each step of the
16// algorithm.
17//
18// Deletion Mask Calculation
19
20std::vector<Value *> parallel_prefix_deletion_masks(IDISA::IDISA_Builder * iBuilder, unsigned fw, Value * del_mask);
21
22// Applying Deletion Masks to a Stream
23
24Value * apply_parallel_prefix_deletion(IDISA::IDISA_Builder * iBuilder, unsigned fw, Value * del_mask, std::vector<Value *> mv, Value * strm);
25
26
27#endif
28
Note: See TracBrowser for help on using the repository browser.