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

class TensorToLayer : public TensorOperate
{
    public:
        TensorToLayer();
        TensorToLayer(int ifType, int iID, int iMaxSeqNum, DevicesBatchDisptach *iDevicesBatchDisptach);
        virtual ~TensorToLayer();
        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 UpdateTensorData(int devID, int seqNum, MemoryHandle *pMemoryHandle);
        void SetTensorInfo(int iDims, int *iDimSize);
        MemoryHandle *GetOutDParaMemPoint(int devID, int seqNum);
        MemoryHandle *GetOutYParaMemPoint(int devID, int seqNum);
        void ClearOutDParaMemForce(int devID);
        void ClearOutYParaMemForce(int devID);
        
    private:
        void SetChildLayerMomeryPointInitStatus();
};

#endif
