Ignore:
Timestamp:
Feb 25, 2017, 12:50:29 PM (2 years ago)
Author:
nmedfort
Message:

Added enable asserts (-ea) command line flag + restructured BlockOrientedKernels? to allow for inlined code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/p2s_kernel.cpp

    r5330 r5347  
    5353}
    5454
    55 P2SKernel::P2SKernel(IDISA::IDISA_Builder * iBuilder)
    56 : BlockOrientedKernel(iBuilder, "p2s",
    57               {Binding{iBuilder->getStreamSetTy(8, 1), "basisBits"}},
    58               {Binding{iBuilder->getStreamSetTy(1, 8), "byteStream"}},
    59               {}, {}, {}) {
    60 
    61 }
    62 
    63 
    6455void P2SKernelWithCompressedOutput::generateDoBlockMethod() {
    6556    IntegerType * i32 = iBuilder->getInt32Ty();
     
    8980    setProducedItemCount("byteStream", unitsGenerated);
    9081}
    91    
    92 P2SKernelWithCompressedOutput::P2SKernelWithCompressedOutput(IDISA::IDISA_Builder * iBuilder)
    93 : BlockOrientedKernel(iBuilder, "p2s_compress",
    94               {Binding{iBuilder->getStreamSetTy(8, 1), "basisBits"}, Binding{iBuilder->getStreamSetTy(1, 1), "deletionCounts"}},
    95                       {Binding{iBuilder->getStreamSetTy(1, 8), "byteStream", MaxRatio(1)}},
    96               {}, {}, {}) {
    97     setDoBlockUpdatesProducedItemCountsAttribute(true);
    98 }
    99    
    100    
    10182
    10283void P2S16Kernel::generateDoBlockMethod() {
     
    120101    }
    121102}
    122    
    123 
    124 P2S16Kernel::P2S16Kernel(IDISA::IDISA_Builder * iBuilder)
    125 : BlockOrientedKernel(iBuilder, "p2s_16",
    126               {Binding{iBuilder->getStreamSetTy(16, 1), "basisBits"}},
    127               {Binding{iBuilder->getStreamSetTy(1, 16), "i16Stream"}},
    128               {}, {}, {}) {
    129 
    130 }
    131 
    132    
     103       
    133104void P2S16KernelWithCompressedOutput::generateDoBlockMethod() {
    134105    IntegerType * i32Ty = iBuilder->getInt32Ty();
     
    174145    setProducedItemCount("i16Stream", i16UnitsFinal);
    175146}
    176    
     147
     148P2SKernel::P2SKernel(IDISA::IDISA_Builder * iBuilder)
     149: BlockOrientedKernel(iBuilder, "p2s",
     150              {Binding{iBuilder->getStreamSetTy(8, 1), "basisBits"}},
     151              {Binding{iBuilder->getStreamSetTy(1, 8), "byteStream"}},
     152              {}, {}, {}) {
     153}
     154
     155P2SKernelWithCompressedOutput::P2SKernelWithCompressedOutput(IDISA::IDISA_Builder * iBuilder)
     156: BlockOrientedKernel(iBuilder, "p2s_compress",
     157              {Binding{iBuilder->getStreamSetTy(8, 1), "basisBits"}, Binding{iBuilder->getStreamSetTy(1, 1), "deletionCounts"}},
     158                      {Binding{iBuilder->getStreamSetTy(1, 8), "byteStream", MaxRatio(1)}},
     159              {}, {}, {}) {
     160    setDoBlockUpdatesProducedItemCountsAttribute(true);
     161}
     162
     163P2S16Kernel::P2S16Kernel(IDISA::IDISA_Builder * iBuilder)
     164: BlockOrientedKernel(iBuilder, "p2s_16",
     165              {Binding{iBuilder->getStreamSetTy(16, 1), "basisBits"}},
     166              {Binding{iBuilder->getStreamSetTy(1, 16), "i16Stream"}},
     167              {}, {}, {}) {
     168}
     169
     170
    177171P2S16KernelWithCompressedOutput::P2S16KernelWithCompressedOutput(IDISA::IDISA_Builder * b)
    178172: BlockOrientedKernel(b, "p2s_16_compress",
     
    183177              {}) {
    184178    setDoBlockUpdatesProducedItemCountsAttribute(true);
     179
    185180}
    186181   
Note: See TracChangeset for help on using the changeset viewer.