本文整理汇总了C++中PiSDFGraph::addDependentParam方法的典型用法代码示例。如果您正苦于以下问题:C++ PiSDFGraph::addDependentParam方法的具体用法?C++ PiSDFGraph::addDependentParam怎么用?C++ PiSDFGraph::addDependentParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PiSDFGraph
的用法示例。
在下文中一共展示了PiSDFGraph::addDependentParam方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
//.........这里部分代码省略.........
示例2: DispComp
// Method building PiSDFGraphDispComp
PiSDFGraph* DispComp(Archi* archi, Stack* stack) {
PiSDFGraph* graph = CREATE(stack, PiSDFGraph)(
/*Edges*/ 10,
/*Params*/ 8,
/*InputIf*/ 5,
/*OutputIf*/ 1,
/*Config*/ 0,
/*Body*/ 3,
/*Archi*/ archi,
/*Stack*/ stack);
/* Parameters */
PiSDFParam *param_height = graph->addHeritedParam("height", 0);
PiSDFParam *param_width = graph->addHeritedParam("width", 1);
PiSDFParam *param_nIter = graph->addHeritedParam("nIter", 2);
PiSDFParam *param_scale = graph->addHeritedParam("scale", 3);
PiSDFParam *param_minDisp = graph->addHeritedParam("minDisp", 4);
PiSDFParam *param_maxDisp = graph->addHeritedParam("maxDisp", 5);
PiSDFParam *param_size = graph->addDependentParam("size", "height*width");
PiSDFParam *param_nDisp = graph->addDependentParam("nDisp", "maxDisp-minDisp+1");
/* Vertices */
PiSDFVertex* bo_AggregateCost = graph->addBodyVertex(
/*Name*/ "AggregateCost",
/*FctId*/ DISPCOMP_AGGREGATECOST_FCT,
/*InData*/ 4,
/*OutData*/ 1,
/*InParam*/ 3);
bo_AggregateCost->addInParam(0, param_height);
bo_AggregateCost->addInParam(1, param_width);
bo_AggregateCost->addInParam(2, param_nIter);
// bo_AggregateCost->isExecutableOnPE(CORE_ARM0);
bo_AggregateCost->isExecutableOnPE(CORE_DSP0);
bo_AggregateCost->isExecutableOnPE(CORE_DSP1);
bo_AggregateCost->isExecutableOnPE(CORE_DSP2);
bo_AggregateCost->isExecutableOnPE(CORE_DSP3);
bo_AggregateCost->isExecutableOnPE(CORE_DSP4);
bo_AggregateCost->isExecutableOnPE(CORE_DSP5);
bo_AggregateCost->isExecutableOnPE(CORE_DSP6);
bo_AggregateCost->isExecutableOnPE(CORE_DSP7);
bo_AggregateCost->setTimingOnType(CORE_TYPE_C6X, "127693715", stack);
bo_AggregateCost->setTimingOnType(CORE_TYPE_ARM, "255956368", stack);
PiSDFVertex* bo_DisparitySelect = graph->addBodyVertex(
/*Name*/ "DisparitySelect",
/*FctId*/ DISPCOMP_DISPARITYSELECT_FCT,
/*InData*/ 4,
/*OutData*/ 2,
/*InParam*/ 5);
bo_DisparitySelect->addInParam(0, param_height);
bo_DisparitySelect->addInParam(1, param_width);
bo_DisparitySelect->addInParam(2, param_scale);
bo_DisparitySelect->addInParam(3, param_minDisp);
bo_DisparitySelect->addInParam(4, param_maxDisp);
// bo_DisparitySelect->isExecutableOnPE(CORE_ARM0);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP0);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP1);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP2);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP3);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP4);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP5);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP6);
bo_DisparitySelect->isExecutableOnPE(CORE_DSP7);
bo_DisparitySelect->setTimingOnType(CORE_TYPE_C6X, "43926345", stack);
bo_DisparitySelect->setTimingOnType(CORE_TYPE_ARM, "177962862", stack);
PiSDFVertex* bo_Br_Disp = graph->addSpecialVertex(
/*Type*/ PISDF_SUBTYPE_BROADCAST,
/*InData*/ 1,
/*OutData*/ 2,
/*InParam*/ 1);
bo_Br_Disp->addInParam(0, param_size);
PiSDFVertex* if_rawDisparity = graph->addOutputIf(
/*Name*/ "if_rawDisparity",
/*InParam*/ 1);
if_rawDisparity->addInParam(0, param_size);
PiSDFVertex* if_offsets = graph->addInputIf(
/*Name*/ "if_offsets",
/*InParam*/ 2);
if_offsets->addInParam(0, param_nDisp);
if_offsets->addInParam(1, param_nIter);
PiSDFVertex* if_vWeights = graph->addInputIf(
/*Name*/ "if_vWeights",
/*InParam*/ 2);
if_vWeights->addInParam(0, param_size);
if_vWeights->addInParam(1, param_nIter);
PiSDFVertex* if_hWeights = graph->addInputIf(
/*Name*/ "if_hWeights",
/*InParam*/ 2);
if_hWeights->addInParam(0, param_size);
if_hWeights->addInParam(1, param_nIter);
PiSDFVertex* if_dispIx = graph->addInputIf(
/*Name*/ "if_dispIx",
/*InParam*/ 1);
//.........这里部分代码省略.........
示例3: costParallel
// Method building PiSDFGraphcostParallel
PiSDFGraph* costParallel(Archi* archi, Stack* stack) {
PiSDFGraph* graph = CREATE(stack, PiSDFGraph)(
/*Edges*/ 18,
/*Params*/ 9,
/*InputIf*/ 5,
/*OutputIf*/ 1,
/*Config*/ 0,
/*Body*/ 9,
/*Archi*/ archi,
/*Stack*/ stack);
/* Parameters */
PiSDFParam *param_nIter = graph->addHeritedParam("nIter", 0);
PiSDFParam *param_height = graph->addHeritedParam("height", 1);
PiSDFParam *param_width = graph->addHeritedParam("width", 2);
PiSDFParam *param_maxDisp = graph->addHeritedParam("maxDisp", 3);
PiSDFParam *param_minDisp = graph->addHeritedParam("minDisp", 4);
PiSDFParam *param_truncValue = graph->addHeritedParam("truncValue", 5);
PiSDFParam *param_scale = graph->addHeritedParam("scale", 6);
PiSDFParam *param_size = graph->addDependentParam("size", "height*width");
PiSDFParam *param_nDisp = graph->addDependentParam("nDisp", "maxDisp-minDisp+1");
/* Vertices */
PiSDFVertex* if_cenL = graph->addInputIf(
/*Name*/ "if_cenL",
/*InParam*/ 1);
if_cenL->addInParam(0, param_size);
PiSDFVertex* if_cenR = graph->addInputIf(
/*Name*/ "if_cenR",
/*InParam*/ 1);
if_cenR->addInParam(0, param_size);
PiSDFVertex* if_grayL = graph->addInputIf(
/*Name*/ "if_grayL",
/*InParam*/ 1);
if_grayL->addInParam(0, param_size);
PiSDFVertex* if_grayR = graph->addInputIf(
/*Name*/ "if_grayR",
/*InParam*/ 1);
if_grayR->addInParam(0, param_size);
PiSDFVertex* if_rgb = graph->addInputIf(
/*Name*/ "if_rgb",
/*InParam*/ 1);
if_rgb->addInParam(0, param_size);
PiSDFVertex* bo_Br_rgb = graph->addSpecialVertex(
/*Type*/ PISDF_SUBTYPE_BROADCAST,
/*InData*/ 1,
/*OutData*/ 2,
/*InParam*/ 1);
bo_Br_rgb->addInParam(0, param_size);
PiSDFVertex* bo_GenIx = graph->addBodyVertex(
/*Name*/ "GenIx",
/*FctId*/ COSTPARALLEL_GENIX_FCT,
/*InData*/ 0,
/*OutData*/ 1,
/*InParam*/ 1);
bo_GenIx->addInParam(0, param_nIter);
bo_GenIx->isExecutableOnPE(CORE_ARM0);
bo_GenIx->setTimingOnType(CORE_TYPE_ARM, "3330", stack);
PiSDFVertex* bo_GenDisp = graph->addBodyVertex(
/*Name*/ "GenDisp",
/*FctId*/ COSTPARALLEL_GENDISP_FCT,
/*InData*/ 0,
/*OutData*/ 1,
/*InParam*/ 2);
bo_GenDisp->addInParam(0, param_minDisp);
bo_GenDisp->addInParam(1, param_maxDisp);
bo_GenDisp->isExecutableOnPE(CORE_ARM0);
bo_GenDisp->setTimingOnType(CORE_TYPE_ARM, "4025", stack);
PiSDFVertex* bo_VWeights = graph->addBodyVertex(
/*Name*/ "VWeights",
/*FctId*/ COSTPARALLEL_VWEIGHTS_FCT,
/*InData*/ 2,
/*OutData*/ 1,
/*InParam*/ 2);
bo_VWeights->addInParam(0, param_height);
bo_VWeights->addInParam(1, param_width);
// bo_VWeights->isExecutableOnPE(CORE_ARM0);
bo_VWeights->isExecutableOnPE(CORE_DSP0);
bo_VWeights->isExecutableOnPE(CORE_DSP1);
bo_VWeights->isExecutableOnPE(CORE_DSP2);
bo_VWeights->isExecutableOnPE(CORE_DSP3);
bo_VWeights->isExecutableOnPE(CORE_DSP4);
bo_VWeights->isExecutableOnPE(CORE_DSP5);
bo_VWeights->isExecutableOnPE(CORE_DSP6);
bo_VWeights->isExecutableOnPE(CORE_DSP7);
bo_VWeights->setTimingOnType(CORE_TYPE_C6X, "58039643", stack);
bo_VWeights->setTimingOnType(CORE_TYPE_ARM, "219177142", stack);
PiSDFVertex* bo_HWeight = graph->addBodyVertex(
/*Name*/ "HWeight",
/*FctId*/ COSTPARALLEL_HWEIGHT_FCT,
//.........这里部分代码省略.........
示例4: 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,
//.........这里部分代码省略.........