本文整理汇总了C++中Dims::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Dims::push_back方法的具体用法?C++ Dims::push_back怎么用?C++ Dims::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dims
的用法示例。
在下文中一共展示了Dims::push_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: event
//.........这里部分代码省略.........
Symbol out = oif.getData(hOutput);
numeric_set_structure(out, TYPE_DOUBLE | TYPE_REAL, dims);
}
// check inputs for veracity...
if (event.flags & F_LAST_CALL)
{
Symbol hInput;
for (UINT32 i=0; i<iif.getNumberOfPorts(); i++) {
hInput = (iif.getPort(i));
/*Symbol data = iif.getData(hInput);
assertClass(data, "dev/std/data/numeric");
numeric_validate(data, TYPE_DOUBLE);*/
}
}
// check input dimensions against state data
/*Dims srcDims = cppdims(structure);
if (srcDims[0] != src.dims[0] || srcDims[1] != src.dims[1]) {berr << "Source dimensions of input do not match dims";}
}*/
event.response = C_OK;
return;
}
case EVENT_INIT_POSTCONNECT:
{
// get the ports for the different sets
hInputs.resize(hSets.size());
for (UINT32 i=0; i < hSets.size(); i++) {
numPorts.push_back(iif.getNumberOfPorts(hSets[i]));
for (UINT32 j=0; j < numPorts[i]; j++) {
hInputs[i].push_back(iif.getPort(hSets[i], j));
}
}
// assume ports on the default set are addition and add them to that list
numPorts[0] += iif.getNumberOfPorts();
for (UINT32 i=0; i < iif.getNumberOfPorts(); i++) {
hInputs[0].push_back(iif.getPort(i));
}
event.response = C_OK;
return;
}
case EVENT_STATE_SET:
{
/* ######################################################### */
// create operation sets
hSets.push_back(iif.getSet("add"));
hSets.push_back(iif.getSet("shunt"));
hSets.push_back(iif.getSet("shunt_dev"));
/* ######################################################### */
// create and seed RNG
rng = coreCreateUtility(hComponent, "dev/std/util/rng", 0);
dev_std_util_rng::select(hComponent, rng, "MT2000.normal");
dev_std_util_rng::seed(hComponent, rng, &(*event.state.seed)[0], event.state.seed->size());
/*