source: icGREP/icgrep-devel/icgrep/pablo/ps_while.cpp @ 4811

Last change on this file since 4811 was 4751, checked in by nmedfort, 4 years ago

Temporary check in

File size: 742 bytes
Line 
1#include <pablo/ps_while.h>
2#include <pablo/codegenstate.h>
3
4namespace pablo {
5
6While::While(PabloAST * expr, const std::initializer_list<Next *> nextVars, PabloBlock & body)
7: Statement(ClassTypeId::While, {expr}, nullptr)
8, mBody(body)
9, mNext(nextVars.begin(), nextVars.end(), reinterpret_cast<NextAllocator &>(mVectorAllocator)) {
10    for (Next * variant : nextVars) {
11        variant->addUser(this);
12    }
13}
14
15While::While(PabloAST * expr, const std::vector<Next *> & nextVars, PabloBlock & body)
16: Statement(ClassTypeId::While, {expr}, nullptr)
17, mBody(body)
18, mNext(nextVars.begin(), nextVars.end(), reinterpret_cast<NextAllocator &>(mVectorAllocator)) {
19    for (Next * variant : nextVars) {
20        variant->addUser(this);
21    }
22}
23
24}
Note: See TracBrowser for help on using the repository browser.