3#if _MSC_VER >= 1900 && defined(_M_X64)
5#include "ComputationalGraph.h"
12 class FL_EXPORT CComputationalGraphWhere :
public CComputationalGraph<T>
15 CComputationalGraphWhere();
18 CComputationalGraphWhere(
const CComputationalGraphWhere<T>& cg);
21 CComputationalGraphWhere(
const CComputationalBase<T>& cbOperand1,
const CComputationalBase<T>& cbOperand2,
const CComputationalBase<T>& cbOperand3);
22 CComputationalGraphWhere(
const CComputationalBase<T>& cbOperand1,
const CTensor<T>& tsrOperand2,
const CTensor<T>& tsrOperand3);
23 CComputationalGraphWhere(
const CTensor<T>& tsrOperand1,
const CComputationalBase<T>& cbOperand2,
const CComputationalBase<T>& cbOperand3);
24 CComputationalGraphWhere(
const CTensor<T>& tsrOperand1,
const CTensor<T>& tsrOperand2,
const CTensor<T>& tsrOperand3);
25 virtual ~CComputationalGraphWhere();
27 virtual CTensor<T>& Forward()
override;
28 virtual CTensor<T>* Backward()
override;
29 virtual CComputationalBase<T>* Clone()
const override;
30 virtual const CResult PrintNodeParamInfo()
const override;
32 virtual const CResult GetBinaryData(Base::CFLData& fldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
33 virtual const CResult GetBinaryData(Base::CFLData* pFldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
35 virtual const CResult SetBinaryData(
const Base::CFLData& fldBinary, int64_t* pI64Offset =
nullptr)
override;
36 virtual const CResult SetBinaryData(
const Base::CFLData* pFldBinary, int64_t* pI64Offset =
nullptr)
override;
38 virtual const std::vector<int64_t>& GetEstimatedShape(
bool bRecursive =
true)
const override;
40 virtual int64_t GetRequiredTemporaryMemory(
bool bTraining =
false,
bool bRecursively =
true, int64_t i64BatchSize = 1, int64_t i64MemoryIndex = 0)
const override;
43 DeclareGetClassType();
44 SupportToDuplicateObjectWithoutCreateNewObject(CComputationalGraphWhere, *
this);
49 DeclareGetSignletonObject(CComputationalGraphWhere);
52 #define CCGFWhere(...) (*(new CComputationalGraphWhere<float>(__VA_ARGS__)))
53 #define CCGDWhere(...) (*(new CComputationalGraphWhere<double>(__VA_ARGS__)))
55 #define CCGTWhere(T, ...) (*(new CComputationalGraphWhere<T>(__VA_ARGS__)))