示例#1
0
SRDAGGraph* result_Test0_2(PiSDFGraph* pisdf, Stack* stack){
	SRDAGGraph* srdag = CREATE(stack, SRDAGGraph)(stack);

	PiSDFGraph* topPisdf = pisdf->getBody(0)->getSubGraph();
	SRDAGVertex* vxC = srdag->addVertex(topPisdf->getConfig(0));
	SRDAGVertex* vxA = srdag->addVertex(topPisdf->getBody(0));
	SRDAGVertex* vxB = srdag->addVertex(topPisdf->getBody(1));
	SRDAGVertex* vxCheck = srdag->addVertex(topPisdf->getBody(2));

	vxB->addInParam(0, 2);
	vxCheck->addInParam(0, 2);

	srdag->addEdge(
			vxA, 0,
			vxB, 0,
			2);
	srdag->addEdge(
			vxB, 0,
			vxCheck, 0,
			2);

	return srdag;
}
示例#2
0
SRDAGGraph* result_Test0_1(PiSDFGraph* pisdf, Stack* stack){
	SRDAGGraph* srdag = CREATE(stack, SRDAGGraph)(stack);

	PiSDFGraph* topPisdf = pisdf->getBody(0)->getSubGraph();
	SRDAGVertex* vxC = srdag->addVertex(topPisdf->getConfig(0));
	SRDAGVertex* vxA = srdag->addVertex(topPisdf->getBody(0));
	SRDAGVertex* vxB0 = srdag->addVertex(topPisdf->getBody(1));
	SRDAGVertex* vxB1 = srdag->addVertex(topPisdf->getBody(1));
	SRDAGVertex* vxCheck = srdag->addVertex(topPisdf->getBody(2));
	SRDAGVertex* vxF = srdag->addFork(2);
	SRDAGVertex* vxJ = srdag->addJoin(2);

	vxB0->addInParam(0, 1);
	vxB1->addInParam(0, 1);
	vxCheck->addInParam(0, 1);

	srdag->addEdge(
			vxA, 0,
			vxF, 0,
			2);
	srdag->addEdge(
			vxF, 0,
			vxB0, 0,
			1);
	srdag->addEdge(
			vxF, 1,
			vxB1, 0,
			1);
	srdag->addEdge(
			vxB0, 0,
			vxJ, 0,
			1);
	srdag->addEdge(
			vxB1, 0,
			vxJ, 1,
			1);
	srdag->addEdge(
			vxJ, 0,
			vxCheck, 0,
			2);

	return srdag;
}