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


C++ Dims::push_back方法代码示例

本文整理汇总了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());
			
			/*
开发者ID:BRAHMS-SystemML,项目名称:brahms,代码行数:67,代码来源:modlin_activation_leaky.cpp


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