Ignore:
Timestamp:
May 6, 2017, 4:05:05 PM (2 years ago)
Author:
nmedfort
Message:

Continued refactoring work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_target.cpp

    r5425 r5435  
    1313#include <llvm/ADT/Triple.h>
    1414
     15#include <kernels/kernel_builder.h>
     16
     17using namespace kernel;
     18
    1519namespace IDISA {
    1620   
    17 IDISA_Builder * GetIDISA_Builder(llvm::Module * const module) {
     21KernelBuilder * GetIDISA_Builder(llvm::Module * const module) {
    1822    unsigned registerWidth = 0;
    1923    Triple T(module->getTargetTriple());
     
    3135    if (codegen::BlockSize >= 256) {
    3236        if (hasAVX2) {
    33             return new IDISA_AVX2_Builder(module, registerWidth, codegen::BlockSize);
     37            return new KernelBuilderImpl<IDISA_AVX2_Builder>(module, registerWidth, codegen::BlockSize, codegen::BlockSize);
    3438        }
    3539    } else if (codegen::BlockSize == 64) {
    36         return new IDISA_I64_Builder(module, registerWidth);
     40        return new KernelBuilderImpl<IDISA_I64_Builder>(module, registerWidth, codegen::BlockSize, codegen::BlockSize);
    3741    }
    38     return new IDISA_SSE2_Builder(module, registerWidth, codegen::BlockSize);
     42    return new KernelBuilderImpl<IDISA_SSE2_Builder>(module, registerWidth, codegen::BlockSize, codegen::BlockSize);
    3943}
    4044
    41 IDISA_Builder * GetIDISA_GPU_Builder(llvm::Module * const module) {
    42     return new IDISA_NVPTX20_Builder(module, 64);
     45KernelBuilder * GetIDISA_GPU_Builder(llvm::Module * const module) {
     46    return new KernelBuilderImpl<IDISA_NVPTX20_Builder>(module, 64, 64, 64);
    4347}
    4448
Note: See TracChangeset for help on using the changeset viewer.