Ignore:
Timestamp:
Jun 14, 2018, 10:41:45 AM (13 months ago)
Author:
cameron
Message:

Little-endian/big-endian bit number options, default to little-endian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/s2p_kernel.h

    r6069 r6089  
    11/*
    2  *  Copyright (c) 2016 International Characters.
     2 *  Copyright (c) 2018 International Characters.
    33 *  This software is licensed to the public under the Open Software License 3.0.
    44 */
     
    77
    88#include "kernel.h"  // for KernelBuilder
    9 
     9#include <cc/alphabet.h>
    1010#include <pablo/pablo_kernel.h>
    1111#include <string>
     
    1818class S2PKernel final : public MultiBlockKernel {
    1919public:
    20     S2PKernel(const std::unique_ptr<kernel::KernelBuilder> & b, bool aligned = true, std::string prefix = "");
     20    S2PKernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian, bool aligned = true, std::string prefix = "");
    2121    bool isCachable() const override { return true; }
    2222    bool hasSignature() const override { return false; }
     
    2424    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
    2525private:
     26    cc::BitNumbering mBasisSetNumbering;
    2627    bool mAligned;
    2728};
     
    2930class S2P_21Kernel final : public MultiBlockKernel {
    3031public:
    31     S2P_21Kernel(const std::unique_ptr<kernel::KernelBuilder> & b);
     32    S2P_21Kernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
    3233    bool isCachable() const override { return true; }
    3334    bool hasSignature() const override { return false; }
    3435protected:
    3536    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & kb, llvm::Value * const numOfStrides) override;
     37    cc::BitNumbering mBasisSetNumbering;
    3638};
    3739
    3840class S2P_PabloKernel final : public pablo::PabloKernel {
    3941public:
    40     S2P_PabloKernel(const std::unique_ptr<KernelBuilder> & b, unsigned codeUnitWidth = 8);
     42    S2P_PabloKernel(const std::unique_ptr<KernelBuilder> & b, unsigned codeUnitWidth = 8, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian);
    4143    bool isCachable() const override { return true; }
    4244    bool hasSignature() const override { return false; }
     
    4446    void generatePabloMethod() override;
    4547    unsigned mCodeUnitWidth;
     48    cc::BitNumbering mBasisSetNumbering;
    4649};
    4750
     
    4952class S2PByPextKernel final : public BlockOrientedKernel {
    5053public:
    51     S2PByPextKernel(const std::unique_ptr<kernel::KernelBuilder> & b, std::string prefix = "");
     54    S2PByPextKernel(const std::unique_ptr<kernel::KernelBuilder> & b, cc::BitNumbering basisNumbering = cc::BitNumbering::LittleEndian, std::string prefix = "");
    5255    bool isCachable() const override { return true; }
    5356    bool hasSignature() const override { return false; }
    5457protected:
    5558    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
     59    cc::BitNumbering mBasisSetNumbering;
    5660};
    5761
Note: See TracChangeset for help on using the changeset viewer.