Changeset 6095


Ignore:
Timestamp:
Jun 15, 2018, 10:47:38 AM (3 months ago)
Author:
cameron
Message:

u32u8 for 32-bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/u32u8.cpp

    r6085 r6095  
    272272    auto & idb = pxDriver.getBuilder();
    273273    Module * mod = idb->getModule();
     274   
     275    unsigned const FieldWidth = sizeof(size_t) * 8;
    274276
    275277    const unsigned u32buffersize = codegen::SegmentSize * codegen::ThreadNum;
     
    323325#ifdef STREAM_COMPRESS_USING_EXTRACTION_MASK
    324326    StreamSetBuffer * extractionMask = pxDriver.addBuffer<StaticBuffer>(idb, idb->getStreamSetTy(1), u8buffersize);
    325     kernel::Kernel * fieldDepositMaskK = pxDriver.addKernelInstance<UTF8fieldDepositMask>(idb);
     327    kernel::Kernel * fieldDepositMaskK = pxDriver.addKernelInstance<UTF8fieldDepositMask>(idb, FieldWidth);
    326328    pxDriver.makeKernelCall(fieldDepositMaskK, {u32basis}, {u8fieldMask, extractionMask});
    327     kernel::Kernel * streamK = pxDriver.addKernelInstance<StreamCompressKernel>(idb, 64, 1);
     329    kernel::Kernel * streamK = pxDriver.addKernelInstance<StreamCompressKernel>(idb, FieldWidth, 1);
    328330    pxDriver.makeKernelCall(streamK, {u8fieldMask, extractionMask}, {u8final});
    329331#else
    330332    StreamSetBuffer * u8unitCounts = pxDriver.addBuffer<StaticBuffer>(idb, idb->getStreamSetTy(1), u8buffersize);
    331     kernel::Kernel * fieldDepositMaskK = pxDriver.addKernelInstance<UTF8fieldDepositMask>(idb);
     333    kernel::Kernel * fieldDepositMaskK = pxDriver.addKernelInstance<UTF8fieldDepositMask>(idb, FieldWidth);
    332334    pxDriver.makeKernelCall(fieldDepositMaskK, {u32basis}, {u8fieldMask, u8unitCounts});
    333     kernel::Kernel * streamK = pxDriver.addKernelInstance<StreamCompressKernel>(idb, 64, 1);
     335    kernel::Kernel * streamK = pxDriver.addKernelInstance<StreamCompressKernel>(idb, FieldWidth, 1);
    334336    pxDriver.makeKernelCall(streamK, {u8fieldMask, u8unitCounts}, {u8final});
    335337#endif
    336 /*    kernel::Kernel * hexConvert =  pxDriver.addKernelInstance<BinaryToHex>(idb);
    337     pxDriver.makeKernelCall(hexConvert, {u8final}, {u8bytes});
    338 */
     338//    kernel::Kernel * hexConvert =  pxDriver.addKernelInstance<BinaryToHex>(idb);
     339   
    339340    kernel::Kernel * maskK = pxDriver.addKernelInstance<UTF8_DepositMasks>(idb);
    340341    pxDriver.makeKernelCall(maskK, {u8final}, {u8initial, u8mask12_17, u8mask6_11});
    341    
     342
     343//    pxDriver.makeKernelCall(hexConvert, {u8mask6_11}, {u8bytes});
     344
     345
    342346    StreamDepositCompiler deposit18_20compiler(pxDriver, 21, 18, 3, u32buffersize);
    343347    deposit18_20compiler.makeCall(u8initial, u32basis, deposit18_20);
Note: See TracChangeset for help on using the changeset viewer.