Ignore:
Timestamp:
Apr 30, 2018, 7:47:31 AM (18 months ago)
Author:
cameron
Message:

Restructuring step for DeletionKernel?: move partial sum popcount in p2sWithCompress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/deletion.h

    r5985 r6004  
    1010namespace IDISA { class IDISA_Builder; }
    1111
     12namespace kernel {
     13
    1214//
    13 // Parallel Prefix Deletion
     15// Parallel Prefix Deletion Kernel
    1416// see Parallel Prefix Compress in Henry S. Warren, Hacker's Delight, Chapter 7
    15 // 
     17//
    1618// Given that we want to delete bits within fields of width fw, moving
    1719// nondeleted bits to the right, the parallel prefix compress method can
    18 // be applied.   This requires a preprocessing step to compute log2(fw) 
     20// be applied.   This requires a preprocessing step to compute log2(fw)
    1921// masks that can be used to select bits to be moved in each step of the
    2022// algorithm.
    2123//
    22 
    23 namespace kernel {
     24class DeletionKernel final : public BlockOrientedKernel {
     25public:
     26    DeletionKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount);
     27    bool isCachable() const override { return true; }
     28    bool hasSignature() const override { return false; }
     29protected:
     30    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
     31    void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * remainingBytes) override;
     32private:
     33    const unsigned mDeletionFieldWidth;
     34    const unsigned mStreamCount;
     35};
    2436
    2537/*
     
    4355    const unsigned mSwizzleSetCount;
    4456    const unsigned mPEXTWidth;
    45 };
    46 
    47 class DeletionKernel final : public BlockOrientedKernel {
    48 public:
    49     DeletionKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount);
    50     bool isCachable() const override { return true; }
    51     bool hasSignature() const override { return false; }
    52 protected:
    53     void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
    54     void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * remainingBytes) override;
    55 private:
    56     const unsigned mDeletionFieldWidth;
    57     const unsigned mStreamCount;
    5857};
    5958
Note: See TracChangeset for help on using the changeset viewer.