Ignore:
Timestamp:
Oct 8, 2016, 7:33:08 PM (3 years ago)
Author:
cameron
Message:

Linear buffers; stdout_kernel; cache-aligned alloca, restructured u8u16, clean-ups

File:
1 edited

Legend:

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

    r5176 r5185  
    4848static cl::list<std::string> inputFiles(cl::Positional, cl::desc("<input file ...>"), cl::OneOrMore, cl::cat(u8u16Options));
    4949
    50 static cl::opt<bool> pipelineParallel("enable-pipeline-parallel", cl::desc("Enable multithreading with pipeline parallelism."), cl::cat(u8u16Options));
     50static cl::opt<bool> segmentPipelineParallel("enable-segment-pipeline-parallel", cl::desc("Enable multithreading with segment pipeline parallelism."), cl::cat(u8u16Options));
    5151
    5252//
     
    242242   
    243243    //SingleBlockBuffer DeletionCounts(iBuilder, StreamSetType(1, i1));
    244     CircularBuffer DeletionCounts(iBuilder, StreamSetType(1, i1), segmentSize * bufferSegments);
    245    
    246     CircularBuffer U16out(iBuilder, StreamSetType(1, i16), u16OutputBlocks);
     244    CircularBuffer DeletionCounts(iBuilder, StreamSetType(1, i1), segmentSize * bufferSegments );
     245   
     246    LinearBuffer U16out(iBuilder, StreamSetType(1, i16), segmentSize * bufferSegments + 2);
    247247
    248248    s2pKernel  s2pk(iBuilder);
     
    258258    p2s_16Kernel_withCompressedOutput p2sk(iBuilder);
    259259    p2sk.generateKernel({&U16Bits, &DeletionCounts}, {&U16out});
     260   
     261    stdOutKernel stdoutK(iBuilder, 16);
     262    stdoutK.generateKernel({&U16out}, {});
     263
    260264   
    261265    Type * const size_ty = iBuilder->getSizeTy();
     
    290294    Value * delInstance = delK.createInstance({});
    291295    Value * p2sInstance = p2sk.createInstance({});
     296    Value * stdoutInstance = stdoutK.createInstance({});
    292297   
    293298    Type * pthreadTy = size_ty;
     
    313318    pthreadExitFunc->setCallingConv(llvm::CallingConv::C);
    314319
    315     if (pipelineParallel){
    316         generatePipelineParallel(iBuilder, {&s2pk, &u8u16k, &delK, &p2sk}, {s2pInstance, u8u16Instance, delInstance, p2sInstance});
     320    if (segmentPipelineParallel){
     321        generateSegmentParallelPipeline(iBuilder, {&s2pk, &u8u16k, &delK, &p2sk, &stdoutK}, {s2pInstance, u8u16Instance, delInstance, p2sInstance, stdoutInstance}, fileSize);
    317322    }
    318323    else{
    319         generatePipelineLoop(iBuilder, {&s2pk, &u8u16k, &delK, &p2sk}, {s2pInstance, u8u16Instance, delInstance, p2sInstance}, fileSize);
     324        generatePipelineLoop(iBuilder, {&s2pk, &u8u16k, &delK, &p2sk, &stdoutK}, {s2pInstance, u8u16Instance, delInstance, p2sInstance, stdoutInstance}, fileSize);
    320325    }
    321326
Note: See TracChangeset for help on using the changeset viewer.