Ignore:
Timestamp:
Apr 18, 2018, 10:02:24 AM (13 months ago)
Author:
cameron
Message:

AVX512 subfeature detection and popcount from Cole with further modification

File:
1 edited

Legend:

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

    r5976 r5977  
    5858    : IDISA_Builder(C, vectorWidth, stride)
    5959    , IDISA_AVX2_Builder(C, vectorWidth, stride) {
     60        getAVX512Features();
    6061    }
    6162
    6263    virtual std::string getBuilderUniqueName() override;
     64    void getAVX512Features();
    6365    llvm::Value * hsimd_packh(unsigned fw, llvm::Value * a, llvm::Value * b) override;
    6466    llvm::Value * hsimd_packl(unsigned fw, llvm::Value * a, llvm::Value * b) override;
    65     llvm::Value * esimd_bitspread(unsigned fw, llvm::Value * bitmask);
     67    llvm::Value * esimd_bitspread(unsigned fw, llvm::Value * bitmask) override;
     68    llvm::Value * simd_popcount(unsigned fw, llvm::Value * a) override;
    6669
    67     ~IDISA_AVX512F_Builder() {}
     70    ~IDISA_AVX512F_Builder() {
     71    }
     72private:
     73    struct Features {
     74        //not an exhaustive list, can be extended if needed
     75        bool hasAVX512CD = false;
     76        bool hasAVX512BW = false;
     77        bool hasAVX512DQ = false;
     78        bool hasAVX512VL = false;
     79        bool hasAVX512VBMI = false;
     80        bool hasAVX512VBMI2 = false;
     81        bool hasAVX512VPOPCNTDQ = false;
     82    };
     83    Features hostCPUFeatures;
    6884};
    6985
Note: See TracChangeset for help on using the changeset viewer.