31class LoopStartOperationNode :
public OperationNode<Base> {
35 inline OperationNode<Base>& getIndex()
const {
36 const std::vector<Argument<Base> >& args = this->
getArguments();
37 CPPADCG_ASSERT_KNOWN(!args.empty(),
"Invalid number of arguments")
39 OperationNode<Base>* aNode = args[0].getOperation();
40 CPPADCG_ASSERT_KNOWN(aNode !=
nullptr && aNode->
getOperationType() == CGOpCode::IndexDeclaration,
"Invalid argument operation type")
42 return static_cast<OperationNode<Base>&
> (*aNode);
47 CPPADCG_ASSERT_KNOWN(this->
getArguments().size() > 1,
"Invalid number of arguments.")
49 OperationNode<Base>* aNode = this->
getArguments()[1].getOperation();
50 CPPADCG_ASSERT_KNOWN(aNode !=
nullptr && aNode->
getOperationType() == CGOpCode::Index,
"Invalid argument node type")
58 inline const size_t getIterationCount()
const {
65 inline virtual ~LoopStartOperationNode() =
default;
70 OperationNode<Base>& indexDcl,
71 size_t iterationCount) :
72 OperationNode<Base>(handler, CGOpCode::LoopStart, indexDcl) {
73 this->
getInfo().push_back(iterationCount);
77 OperationNode<Base>& indexDcl,
79 OperationNode<Base>(handler, CGOpCode::LoopStart,{indexDcl, iterCount}) {