Ignore:
Timestamp:
Apr 25, 2017, 2:33:31 PM (2 years ago)
Author:
nmedfort
Message:

Changes towards separate compilation

File:
1 edited

Legend:

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

    r5423 r5425  
    2020#include <lz4FrameDecoder.h>
    2121#include <cc/cc_compiler.h>
    22 #include <kernels/toolchain.h>
     22#include <toolchain/toolchain.h>
    2323#include <kernels/cc_kernel.h>
    2424#include <kernels/streamset.h>
     
    2929#include <kernels/lz4_index_decoder.h>
    3030#include <kernels/lz4_bytestream_decoder.h>
    31 #include <kernels/pipeline.h>
    3231
    3332#include <string>
     
    4645
    4746typedef void (*MainFunctionType)(char * byte_data, size_t filesize, bool hasBlockChecksum);
    48 
    49 ParabixDriver * pxDriver = nullptr;
    50 
    5147
    5248void generatePipeline(ParabixDriver & pxDriver) {
     
    116112
    117113MainFunctionType codeGen() {
    118     Module * M = new Module("lz4d", getGlobalContext());
    119     IDISA::IDISA_Builder * idb = IDISA::GetIDISA_Builder(M);
    120     pxDriver = new ParabixDriver(idb);
    121 
    122     generatePipeline(*pxDriver);
    123 
    124     delete idb;
    125     return reinterpret_cast<MainFunctionType>(pxDriver->getPointerToMain());
     114    ParabixDriver pxDriver("lz4d");
     115    generatePipeline(pxDriver);
     116    return reinterpret_cast<MainFunctionType>(pxDriver.getPointerToMain());
    126117}
    127118
Note: See TracChangeset for help on using the changeset viewer.