Ignore:
Timestamp:
Mar 16, 2017, 4:57:11 PM (2 years ago)
Author:
nmedfort
Message:

Continued work on non-carry-collapsing mode support.

File:
1 edited

Legend:

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

    r5364 r5366  
    241241    AllocaInst * const pthreads = iBuilder->CreateAlloca(pthreadsTy);
    242242    std::vector<Value *> pthreadsPtrs;
    243     for (unsigned i = 0; i < codegen::ThreadNum; i++) {
     243    for (int i = 0; i < codegen::ThreadNum; i++) {
    244244        pthreadsPtrs.push_back(iBuilder->CreateGEP(pthreads, {iBuilder->getInt32(0), iBuilder->getInt32(i)}));
    245245    }
     
    264264    std::vector<Function *> thread_functions;
    265265    const auto ip = iBuilder->saveIP();
    266     for (unsigned i = 0; i < codegen::ThreadNum; i++) {
     266    for (int i = 0; i < codegen::ThreadNum; i++) {
    267267        thread_functions.push_back(generateSegmentParallelPipelineThreadFunction("thread"+std::to_string(i), iBuilder, kernels, sharedStructType, producerTable, i));
    268268    }
    269269    iBuilder->restoreIP(ip);
    270270   
    271     for (unsigned i = 0; i < codegen::ThreadNum; i++) {
     271    for (int i = 0; i < codegen::ThreadNum; i++) {
    272272        iBuilder->CreatePThreadCreateCall(pthreadsPtrs[i], nullVal, thread_functions[i], iBuilder->CreateBitCast(sharedStruct, int8PtrTy));
    273273    }
    274274   
    275275    std::vector<Value *> threadIDs;
    276     for (unsigned i = 0; i < codegen::ThreadNum; i++) {
     276    for (int i = 0; i < codegen::ThreadNum; i++) {
    277277        threadIDs.push_back(iBuilder->CreateLoad(pthreadsPtrs[i]));
    278278    }
    279279   
    280     for (unsigned i = 0; i < codegen::ThreadNum; i++) {
     280    for (int i = 0; i < codegen::ThreadNum; i++) {
    281281        iBuilder->CreatePThreadJoinCall(threadIDs[i], status);
    282282    }
Note: See TracChangeset for help on using the changeset viewer.