Ignore:
Timestamp:
Apr 22, 2017, 4:03:25 PM (2 years ago)
Author:
nmedfort
Message:

Removed non-functional CUDA code from icgrep and consolidated grep and multigrep mode into a single function; allowed segment parallel pipeline to utilize process as its initial thread; modified MMapSourceKernel to map and perform mmap directly and advise the OS to drop consumed data streams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.h

    r5415 r5418  
    7575    llvm::Value * CreateOpenCall(llvm::Value * filename, llvm::Value * oflag, llvm::Value * mode);
    7676    //  Create a call to:  ssize_t write(int fildes, const void *buf, size_t nbyte);
    77     llvm::Value * CreateWriteCall(llvm::Value * fildes, llvm::Value * buf, llvm::Value * nbyte);
     77    llvm::Value * CreateWriteCall(llvm::Value * fileDescriptor, llvm::Value * buf, llvm::Value * nbyte);
    7878    //  Create a call to:  ssize_t read(int fildes, void *buf, size_t nbyte);
    79     llvm::Value * CreateReadCall(llvm::Value * fildes, llvm::Value * buf, llvm::Value * nbyte);
     79    llvm::Value * CreateReadCall(llvm::Value * fileDescriptor, llvm::Value * buf, llvm::Value * nbyte);
    8080    //  Create a call to:  int close(int filedes);
    81     llvm::Value * CreateCloseCall(llvm::Value * fildes);
     81    llvm::Value * CreateCloseCall(llvm::Value * fileDescriptor);
    8282    //  Create a call to:  int unlink(const char *path);
    8383    llvm::Value * CreateUnlinkCall(llvm::Value * path);
     84
     85    llvm::Value * CreateFileSize(llvm::Value * fileDescriptor);
    8486
    8587    //  Create calls to stdlib.h functions.
     
    9193    llvm::Value * CreateStrlenCall(llvm::Value * str);
    9294   
    93    
    94    
    9595    llvm::Value * CreateAnonymousMMap(llvm::Value * size);
    9696
    9797    llvm::Value * CreateFileSourceMMap(llvm::Value * fd, llvm::Value * size);
    9898
    99     enum class MADV {
    100         NORMAL
    101         , RANDOM
    102         , SEQUENTIAL
    103         , WILLNEED
    104         , DONTNEED
    105 //        , REMOVE
    106 //        , DONTFORK
    107 //        , DOFORK
    108 //        , HWPOISON
    109 //        , MERGEABLE
    110 //        , UNMERGEABLE
    111 //        , HUGEPAGE
    112 //        , NOHUGEPAGE
    113 //        , DONTDUMP
    114 //        , DODUMP
     99    enum MAdviceFlags {
     100        MMAP_NORMAL
     101        , MMAP_RANDOM
     102        , MMAP_SEQUENTIAL
     103        , MMAP_WILLNEED
     104        , MMAP_DONTNEED
    115105    };
    116106
    117     llvm::Value * CreateMMapAdvise(llvm::Value * addr, llvm::Value * length, MADV advice) {
    118         return CreateMMapAdvise(addr, length, { advice });
     107    llvm::Value * CreateMAdvise(llvm::Value * addr, llvm::Value * length, MAdviceFlags advice) {
     108        return CreateMAdvise(addr, length, { advice });
    119109    }
    120110
    121     llvm::Value * CreateMMapAdvise(llvm::Value * addr, llvm::Value * length, std::initializer_list<MADV> advice);
     111    llvm::Value * CreateMAdvise(llvm::Value * addr, llvm::Value * length, std::initializer_list<MAdviceFlags> advice);
    122112
    123113    llvm::Value * CreateMMap(llvm::Value * const addr, llvm::Value * size, llvm::Value * const prot, llvm::Value * const flags, llvm::Value * const fd, llvm::Value * const offset);
Note: See TracChangeset for help on using the changeset viewer.