当前位置: 首页>>代码示例>>C++>>正文


C++ PiSDFGraph::addConfigVertex方法代码示例

本文整理汇总了C++中PiSDFGraph::addConfigVertex方法的典型用法代码示例。如果您正苦于以下问题:C++ PiSDFGraph::addConfigVertex方法的具体用法?C++ PiSDFGraph::addConfigVertex怎么用?C++ PiSDFGraph::addConfigVertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PiSDFGraph的用法示例。


在下文中一共展示了PiSDFGraph::addConfigVertex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: daq_fft


//.........这里部分代码省略.........
    bo_FFT_5->setTimingOnType(CORE_TYPE_CORTEXA15, "17000", stack);

    PiSDFVertex* bo_T_6 = graph->addBodyVertex(
                              /*Name*/    "T_6",
                              /*FctId*/   T_6_FCT,
                              /*InData*/  1,
                              /*OutData*/ 1,
                              /*InParam*/ 2);
    bo_T_6->addInParam(0, param_Nc);
    bo_T_6->addInParam(1, param_Nr);
    bo_T_6->isExecutableOnPE(CORE_DSP0);
    bo_T_6->isExecutableOnPE(CORE_DSP3);
    bo_T_6->isExecutableOnPE(CORE_DSP4);
    bo_T_6->isExecutableOnPE(CORE_DSP1);
    bo_T_6->isExecutableOnPE(CORE_DSP2);
    bo_T_6->isExecutableOnPE(CORE_DSP7);
    bo_T_6->isExecutableOnPE(CORE_DSP5);
    bo_T_6->isExecutableOnPE(CORE_DSP6);
//	bo_T_6->isExecutableOnPE(CORE_ARM0);
    bo_T_6->setTimingOnType(CORE_TYPE_C6678, "1000", stack);
    bo_T_6->setTimingOnType(CORE_TYPE_CORTEXA15, "1000", stack);

    PiSDFVertex* bo_snk = graph->addBodyVertex(
                              /*Name*/    "snk",
                              /*FctId*/   SNK_FCT,
                              /*InData*/  1,
                              /*OutData*/ 0,
                              /*InParam*/ 1);
    bo_snk->addInParam(0, param_size);
    bo_snk->isExecutableOnPE(CORE_ARM0);
    bo_snk->setTimingOnType(CORE_TYPE_C6678, "1000", stack);
    bo_snk->setTimingOnType(CORE_TYPE_CORTEXA15, "1000", stack);

    PiSDFVertex* cf_cfg = graph->addConfigVertex(
                              /*Name*/    "cfg",
                              /*FctId*/   CFG_FCT,
                              /*SubType*/ PISDF_SUBTYPE_NORMAL,
                              /*InData*/  0,
                              /*OutData*/ 0,
                              /*InParam*/ 1,
                              /*OutParam*/4);
    cf_cfg->addOutParam(0, param_Nr);
    cf_cfg->addOutParam(1, param_Nc);
    cf_cfg->addOutParam(2, param_N1);
    cf_cfg->addOutParam(3, param_N2);
    cf_cfg->addInParam(0, param_size);
    cf_cfg->isExecutableOnPE(CORE_ARM0);
    cf_cfg->setTimingOnType(CORE_TYPE_C6678, "1000", stack);
    cf_cfg->setTimingOnType(CORE_TYPE_CORTEXA15, "1000", stack);

    PiSDFVertex* bo_genIx = graph->addBodyVertex(
                                /*Name*/    "genIx",
                                /*FctId*/   GENIX_FCT,
                                /*InData*/  0,
                                /*OutData*/ 1,
                                /*InParam*/ 2);
    bo_genIx->addInParam(0, param_Nr);
    bo_genIx->addInParam(1, param_N2);
    bo_genIx->isExecutableOnPE(CORE_ARM0);
    bo_genIx->isExecutableOnPE(CORE_DSP0);
    bo_genIx->setTimingOnType(CORE_TYPE_C6678, "1000", stack);
    bo_genIx->setTimingOnType(CORE_TYPE_CORTEXA15, "1000", stack);


    /* Edges */
    graph->connect(
开发者ID:preesm,项目名称:spider,代码行数:67,代码来源:pi_daq_fft.cpp

示例2: CREATE

PiSDFGraph* test0(Archi* archi, Stack* stack, int N){
	PiSDFGraph* graph = CREATE(stack, PiSDFGraph)(
			/*Edges*/ 	2,
			/*Params*/	1,
			/*InIf*/	0,
			/*OutIf*/	0,
			/*Config*/	1,
			/*Normal*/	3,
			archi,
			stack);

	// Parameters.
	PiSDFParam *paramN = graph->addDynamicParam("N");

	// Configure vertices.
	PiSDFVertex *vxC = graph->addConfigVertex(
			"C", /*Fct*/ 2,
			PISDF_SUBTYPE_NORMAL,
			/*In*/ 0,  /*Out*/ 0,
			/*Par*/ 0, /*Cfg*/ 1);
	vxC->addOutParam(0, paramN);

	// Other vertices
	PiSDFVertex *vxA = graph->addBodyVertex(
			"A", /*Fct*/ 0,
			/*In*/ 0, /*Out*/ 1,
			/*Par*/ 0);

	PiSDFVertex *vxB = graph->addBodyVertex(
			"B", /*Fct*/ 1,
			/*In*/ 1, /*Out*/ 1,
			/*Par*/ 1);
	vxB->addInParam(0, paramN);

	PiSDFVertex *vxCheck = graph->addBodyVertex(
			"Check", /*Fct*/ 3,
			/*In*/ 1, /*Out*/ 0,
			/*Par*/ 1);
	vxCheck->addInParam(0, paramN);

	// Edges.
	graph->connect(
			/*Src*/ vxA, /*SrcPrt*/ 0, /*Prod*/ "2",
			/*Snk*/ vxB, /*SnkPrt*/ 0, /*Cons*/ "N",
			/*Delay*/ "0", 0);
	graph->connect(
			/*Src*/ vxB, /*SrcPrt*/ 0, /*Prod*/ "N",
			/*Snk*/ vxCheck, /*SnkPrt*/ 0, /*Cons*/ "4*(N/3)+2",
			/*Delay*/ "0", 0);

	// Timings
	vxA->isExecutableOnAllPE();
	vxA->setTimingOnType(0, "10", stack);
	vxB->isExecutableOnAllPE();
	vxB->setTimingOnType(0, "10", stack);
	vxC->isExecutableOnAllPE();
	vxC->setTimingOnType(0, "10", stack);
	vxCheck->isExecutableOnPE(0);
	vxCheck->setTimingOnType(0, "10", stack);

	// Subgraphs

	return graph;
}
开发者ID:hewumars,项目名称:Spider,代码行数:64,代码来源:PiSDFTest_0.cpp

示例3: CREATE

// Method building PiSDFGraphRadix2_fft
PiSDFGraph* Radix2_fft(Archi* archi, Stack* stack){
	PiSDFGraph* graph = CREATE(stack, PiSDFGraph)(
		/*Edges*/    4,
		/*Params*/   6,
		/*InputIf*/  0,
		/*OutputIf*/ 0,
		/*Config*/   1,
		/*Body*/     5,
		/*Archi*/    archi,
		/*Stack*/    stack);

	/* Parameters */
	PiSDFParam *param_fftSize = graph->addDynamicParam("fftSize");
	PiSDFParam *param_P = graph->addDynamicParam("P");
	PiSDFParam *param_n1 = graph->addDynamicParam("n1");
	PiSDFParam *param_n2 = graph->addDynamicParam("n2");
	PiSDFParam *param_N1 = graph->addDependentParam("N1", "2^P");
	PiSDFParam *param_N2 = graph->addDependentParam("N2", "fftSize/2^P");

	/* Vertices */
	PiSDFVertex* bo_src = graph->addBodyVertex(
		/*Name*/    "src",
		/*FctId*/   RADIX2_FFT_SRC_FCT,
		/*InData*/  0,
		/*OutData*/ 1,
		/*InParam*/ 1);
	bo_src->addInParam(0, param_fftSize);
//	bo_src->isExecutableOnPE(CORE_ARM0);
//	bo_src->isExecutableOnPE(CORE_ARM1);
//	bo_src->isExecutableOnPE(CORE_ARM2);
//	bo_src->isExecutableOnPE(CORE_ARM3);
	bo_src->isExecutableOnPE(CORE_DSP0);
	bo_src->setTimingOnType(CORE_TYPE_C6X, "100", stack);
	bo_src->setTimingOnType(CORE_TYPE_ARM, "100", stack);

	PiSDFVertex* bo_T = graph->addBodyVertex(
		/*Name*/    "T",
		/*FctId*/   RADIX2_FFT_T_FCT,
		/*InData*/  1,
		/*OutData*/ 1,
		/*InParam*/ 2);
	bo_T->addInParam(0, param_N1);
	bo_T->addInParam(1, param_N2);
//	bo_T->isExecutableOnPE(CORE_ARM0);
//	bo_T->isExecutableOnPE(CORE_ARM1);
//	bo_T->isExecutableOnPE(CORE_ARM2);
//	bo_T->isExecutableOnPE(CORE_ARM3);
	bo_T->isExecutableOnPE(CORE_DSP0);
//	bo_T->isExecutableOnPE(CORE_DSP1);
//	bo_T->isExecutableOnPE(CORE_DSP2);
//	bo_T->isExecutableOnPE(CORE_DSP3);
//	bo_T->isExecutableOnPE(CORE_DSP4);
//	bo_T->isExecutableOnPE(CORE_DSP5);
//	bo_T->isExecutableOnPE(CORE_DSP6);
//	bo_T->isExecutableOnPE(CORE_DSP7);
	bo_T->setTimingOnType(CORE_TYPE_C6X, "100", stack);
	bo_T->setTimingOnType(CORE_TYPE_ARM, "100", stack);

	PiSDFVertex* bo_DFT_N2 = graph->addBodyVertex(
		/*Name*/    "DFT_N2",
		/*FctId*/   RADIX2_FFT_DFT_N2_FCT,
		/*InData*/  1,
		/*OutData*/ 1,
		/*InParam*/ 2);
	bo_DFT_N2->addInParam(0, param_N2);
	bo_DFT_N2->addInParam(1, param_n2);
//	bo_DFT_N2->isExecutableOnPE(CORE_ARM0);
	bo_DFT_N2->isExecutableOnPE(CORE_ARM1);
	bo_DFT_N2->isExecutableOnPE(CORE_ARM2);
//	bo_DFT_N2->isExecutableOnPE(CORE_ARM3);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP0);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP1);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP2);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP3);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP4);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP5);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP6);
	bo_DFT_N2->isExecutableOnPE(CORE_DSP7);
	bo_DFT_N2->setTimingOnType(CORE_TYPE_C6X, "117445", stack);
	bo_DFT_N2->setTimingOnType(CORE_TYPE_ARM, "78130", stack);

	PiSDFVertex* bo_snk = graph->addBodyVertex(
		/*Name*/    "snk",
		/*FctId*/   RADIX2_FFT_SNK_FCT,
		/*InData*/  1,
		/*OutData*/ 0,
		/*InParam*/ 1);
	bo_snk->addInParam(0, param_fftSize);
//	bo_snk->isExecutableOnPE(CORE_ARM0);
//	bo_snk->isExecutableOnPE(CORE_ARM1);
//	bo_snk->isExecutableOnPE(CORE_ARM2);
//	bo_snk->isExecutableOnPE(CORE_ARM3);
	bo_snk->isExecutableOnPE(CORE_DSP0);
	bo_snk->setTimingOnType(CORE_TYPE_C6X, "100", stack);
	bo_snk->setTimingOnType(CORE_TYPE_ARM, "100", stack);

	PiSDFVertex* cf_cfgFFT = graph->addConfigVertex(
		/*Name*/    "cfgFFT",
		/*FctId*/   RADIX2_FFT_CFGFFT_FCT,
//.........这里部分代码省略.........
开发者ID:preesm,项目名称:spider,代码行数:101,代码来源:pi_Radix2_fft.cpp

示例4: stereo

// Method building PiSDFGraphstereo
PiSDFGraph* stereo(Archi* archi, Stack* stack) {
    PiSDFGraph* graph = CREATE(stack, PiSDFGraph)(
                            /*Edges*/    16,
                            /*Params*/   11,
                            /*InputIf*/  0,
                            /*OutputIf*/ 0,
                            /*Config*/   1,
                            /*Body*/     12,
                            /*Archi*/    archi,
                            /*Stack*/    stack);

    /* Parameters */
    PiSDFParam *param_nSlice = graph->addDynamicParam("nSlice");
    PiSDFParam *param_truncValue = graph->addDynamicParam("truncValue");
    PiSDFParam *param_scale = graph->addDynamicParam("scale");
    PiSDFParam *param_nIter = graph->addDynamicParam("nIter");
    PiSDFParam *param_sizeFilter = graph->addDynamicParam("sizeFilter");
    PiSDFParam *param_minDisp = graph->addDynamicParam("minDisp");
    PiSDFParam *param_maxDisp = graph->addDynamicParam("maxDisp");
    PiSDFParam *param_height = graph->addDynamicParam("height");
    PiSDFParam *param_width = graph->addDynamicParam("width");
    PiSDFParam *param_size = graph->addDependentParam("size", "width*height");
    PiSDFParam *param_sliceHeight = graph->addDependentParam("sliceHeight", "height/nSlice+2*sizeFilter");

    /* Vertices */
    PiSDFVertex* cf_Config = graph->addConfigVertex(
                                 /*Name*/    "Config",
                                 /*FctId*/   STEREO_CONFIG_FCT,
                                 /*SubType*/ PISDF_SUBTYPE_NORMAL,
                                 /*InData*/  0,
                                 /*OutData*/ 0,
                                 /*InParam*/ 0,
                                 /*OutParam*/9);
    cf_Config->addOutParam(0, param_scale);
    cf_Config->addOutParam(1, param_maxDisp);
    cf_Config->addOutParam(2, param_minDisp);
    cf_Config->addOutParam(3, param_nSlice);
    cf_Config->addOutParam(4, param_truncValue);
    cf_Config->addOutParam(5, param_height);
    cf_Config->addOutParam(6, param_width);
    cf_Config->addOutParam(7, param_sizeFilter);
    cf_Config->addOutParam(8, param_nIter);
    cf_Config->isExecutableOnPE(CORE_ARM0);
    cf_Config->setTimingOnType(CORE_TYPE_ARM, "940", stack);

    PiSDFVertex* bo_Camera = graph->addBodyVertex(
                                 /*Name*/    "Camera",
                                 /*FctId*/   STEREO_CAMERA_FCT,
                                 /*InData*/  0,
                                 /*OutData*/ 2,
                                 /*InParam*/ 2);
    bo_Camera->addInParam(0, param_width);
    bo_Camera->addInParam(1, param_height);
    bo_Camera->isExecutableOnPE(CORE_ARM0);
    bo_Camera->setTimingOnType(CORE_TYPE_ARM, "99175505", stack);

    PiSDFVertex* bo_Br_rgbL = graph->addSpecialVertex(
                                  /*Type*/    PISDF_SUBTYPE_BROADCAST,
                                  /*InData*/  1,
                                  /*OutData*/ 3,
                                  /*InParam*/ 1);
    bo_Br_rgbL->addInParam(0, param_size);

    PiSDFVertex* bo_RGB2Gray_L = graph->addBodyVertex(
                                     /*Name*/    "RGB2Gray_L",
                                     /*FctId*/   STEREO_RGB2GRAY_L_FCT,
                                     /*InData*/  1,
                                     /*OutData*/ 1,
                                     /*InParam*/ 1);
    bo_RGB2Gray_L->addInParam(0, param_size);
//	bo_RGB2Gray_L->isExecutableOnPE(CORE_ARM0);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP0);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP1);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP2);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP3);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP4);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP5);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP6);
    bo_RGB2Gray_L->isExecutableOnPE(CORE_DSP7);
    bo_RGB2Gray_L->setTimingOnType(CORE_TYPE_C6X, "39804751", stack);
    bo_RGB2Gray_L->setTimingOnType(CORE_TYPE_ARM, "216379565", stack);

    PiSDFVertex* bo_RGB2Gray_R = graph->addBodyVertex(
                                     /*Name*/    "RGB2Gray_R",
                                     /*FctId*/   STEREO_RGB2GRAY_R_FCT,
                                     /*InData*/  1,
                                     /*OutData*/ 1,
                                     /*InParam*/ 1);
    bo_RGB2Gray_R->addInParam(0, param_size);
//	bo_RGB2Gray_R->isExecutableOnPE(CORE_ARM0);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP0);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP1);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP2);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP3);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP4);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP5);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP6);
    bo_RGB2Gray_R->isExecutableOnPE(CORE_DSP7);
    bo_RGB2Gray_R->setTimingOnType(CORE_TYPE_C6X, "39804751", stack);
//.........这里部分代码省略.........
开发者ID:preesm,项目名称:spider,代码行数:101,代码来源:pi_stereo.cpp


注:本文中的PiSDFGraph::addConfigVertex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。