#ifndef LCF_FILTER_H_
#define LCF_FILTER_H_
#include "tensorOperate.h"

class FilterLayer : public TensorOperate
{
    public:
        FilterLayer();
        FilterLayer(int ifType, int iID, int iMaxSeqNum, DevicesBatchDisptach *iDevicesBatchDisptach);
        virtual ~FilterLayer();
        void SetLayerConfig(int ifType, int iID, int iMaxSeqNum, DevicesBatchDisptach *iDevicesBatchDisptach);
        void ComputeAndCreateOutYInDTensorInfo();
        void CreateParaAndInstance();
        void CompuateOutY(int devID, int seqNum);
        void CompuateOutD(int devID, int seqNum);
        void ComputerYMemRealease(int devID);
        void ComputerDMemRealease(int devID);
        void SetFilterMat(int devID, int seqNum, float *mat);

    private:
        int IfSetFilterMat(int devID, int seqNum);
        void ResetFilterFlag(int devID, int seqNum);
        MemoryHandle *GetFilterMatHandle(int devID, int seqNum);
        void SetChildLayerMomeryPointInitStatus();
        TensorData *mFilterMatHandle;
        int *mSetFlag;
        int mCHW, mHW;
};

#endif
