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


C++ ExportStatementBlock类代码示例

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


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

示例1: getCode

returnValue ThreeSweepsERKExport::getCode(	ExportStatementBlock& code
											)
{
	int useOMP;
	get(CG_USE_OPENMP, useOMP);
	if ( useOMP )
	{
		getDataDeclarations( code, ACADO_LOCAL );

		code << "#pragma omp threadprivate( "
				<< getAuxVariable().getFullName()  << ", "
				<< rk_xxx.getFullName() << ", "
				<< rk_ttt.getFullName() << ", "
				<< rk_kkk.getFullName() << ", "
				<< rk_forward_sweep.getFullName() << ", "
				<< rk_backward_sweep.getFullName()
				<< " )\n\n";
	}

	int sensGen;
	get( DYNAMIC_SENSITIVITY,sensGen );
	if( exportRhs ) {
		code.addFunction( rhs );
		code.addFunction( diffs_rhs );
		code.addFunction( diffs_sweep3 );
	}

	double h = (grid.getLastTime() - grid.getFirstTime())/grid.getNumIntervals();
	code.addComment(std::string("Fixed step size:") + toString(h));
	code.addFunction( integrate );

	return SUCCESSFUL_RETURN;
}
开发者ID:RobotXiaoFeng,项目名称:acado,代码行数:33,代码来源:erk_3sweep_export.cpp

示例2: getCode

returnValue ExportCholeskySolver::getCode( ExportStatementBlock& code )
{
	code.addFunction( chol );
	code.addFunction( solve );

	return SUCCESSFUL_RETURN;
}
开发者ID:borishouska,项目名称:acado,代码行数:7,代码来源:export_cholesky_solver.cpp

示例3: getFunctionDeclarations

returnValue ExportCholeskySolver::getFunctionDeclarations(	ExportStatementBlock& declarations
															) const
{
	declarations.addDeclaration( chol );
	declarations.addDeclaration( solve );

	return SUCCESSFUL_RETURN;
}
开发者ID:borishouska,项目名称:acado,代码行数:8,代码来源:export_cholesky_solver.cpp

示例4: getFunctionDeclarations

returnValue ExplicitRungeKuttaExport::getFunctionDeclarations(	ExportStatementBlock& declarations
                                                             ) const
{
    declarations.addDeclaration( integrate );

    declarations.addDeclaration( rhs );
    declarations.addDeclaration( diffs_rhs );

    return SUCCESSFUL_RETURN;
}
开发者ID:rienq,项目名称:acado,代码行数:10,代码来源:erk_export.cpp

示例5: getFunctionDeclarations

returnValue DiscreteTimeExport::getFunctionDeclarations(	ExportStatementBlock& declarations
														) const
{
	declarations.addDeclaration( integrate );

	if( NX2 != NX ) 	declarations.addDeclaration( fullRhs );
	else				declarations.addDeclaration( rhs );

	return SUCCESSFUL_RETURN;
}
开发者ID:RobotXiaoFeng,项目名称:acado,代码行数:10,代码来源:discrete_export.cpp

示例6: getFunctionDeclarations

returnValue ExportGaussElim::getFunctionDeclarations(	ExportStatementBlock& declarations
															) const
{
	declarations.addDeclaration( solve );
	declarations.addDeclaration( solveTriangular );
	if( REUSE ) {
		declarations.addDeclaration( solveReuse );
	}

	return SUCCESSFUL_RETURN;
}
开发者ID:RobotXiaoFeng,项目名称:acado,代码行数:11,代码来源:gaussian_elimination_export.cpp

示例7: getCode

returnValue ExportGaussNewtonBlockForces::getCode(	ExportStatementBlock& code
											)
{
	setupQPInterface();
	code.addStatement( *qpInterface );

	code.addFunction( cleanup );
	code.addFunction( shiftQpData );

	code.addFunction( evaluateConstraints );
	code.addFunction( evaluateAffineConstraints );

	return ExportGaussNewtonCN2::getCode( code );
}
开发者ID:RobotXiaoFeng,项目名称:acado,代码行数:14,代码来源:export_gauss_newton_block_forces.cpp

示例8: getDataDeclarations

returnValue ExportGaussElim::getDataDeclarations(	ExportStatementBlock& declarations,
														ExportStruct dataStruct
														) const
{
	declarations.addDeclaration( rk_swap,dataStruct );			// needed for the row swaps
	if( REUSE ) {
		declarations.addDeclaration( rk_bPerm,dataStruct );		// reordered right-hand side
		if( TRANSPOSE ) {
			declarations.addDeclaration( rk_bPerm_trans,dataStruct );
		}
	}

	return SUCCESSFUL_RETURN;
}
开发者ID:RobotXiaoFeng,项目名称:acado,代码行数:14,代码来源:gaussian_elimination_export.cpp

示例9: getDataDeclarations

returnValue ExplicitRungeKuttaExport::getDataDeclarations(	ExportStatementBlock& declarations,
        ExportStruct dataStruct
                                                         ) const
{
    if( exportRhs ) {
        declarations.addDeclaration( getAuxVariable(),dataStruct );
    }
    declarations.addDeclaration( rk_ttt,dataStruct );
    declarations.addDeclaration( rk_xxx,dataStruct );
    declarations.addDeclaration( rk_kkk,dataStruct );

//	declarations.addDeclaration( reset_int,dataStruct );

    return SUCCESSFUL_RETURN;
}
开发者ID:rienq,项目名称:acado,代码行数:15,代码来源:erk_export.cpp

示例10: getDataDeclarations

returnValue ExportGaussNewtonForces::getDataDeclarations(	ExportStatementBlock& declarations,
															ExportStruct dataStruct
															) const
{
	returnValue status;
	status = ExportNLPSolver::getDataDeclarations(declarations, dataStruct);
	if (status != SUCCESSFUL_RETURN)
		return status;

	declarations.addDeclaration(x0, dataStruct);

	declarations.addDeclaration(lbValues, dataStruct);
	declarations.addDeclaration(ubValues, dataStruct);

	return SUCCESSFUL_RETURN;
}
开发者ID:ferreau,项目名称:acado,代码行数:16,代码来源:export_gauss_newton_forces.cpp

示例11:

returnValue ExportIRK4StageSimplifiedNewton::getFunctionDeclarations(	ExportStatementBlock& declarations
                                                                    ) const
{
    ExportGaussElim::getFunctionDeclarations( declarations );

    declarations.addDeclaration( solve_complex );
    if( REUSE ) {
        declarations.addDeclaration( solveReuse_complex );
    }

    declarations.addDeclaration( solve_full );
    if( REUSE ) {
        declarations.addDeclaration( solveReuse_full );
    }

    return SUCCESSFUL_RETURN;
}
开发者ID:helloxss,项目名称:acado,代码行数:17,代码来源:irk_4stage_simplified_newton_export.cpp

示例12: getCode

returnValue ExportCholeskyDecomposition::getCode(	ExportStatementBlock& code
													)
{
	if (A.getDim() != 0)
		return code.addFunction( fcn );

	return SUCCESSFUL_RETURN;
}
开发者ID:OspreyX,项目名称:acado,代码行数:8,代码来源:export_cholesky_decomposition.cpp

示例13: getFunctionDeclarations

returnValue ExportCholeskyDecomposition::getFunctionDeclarations(	ExportStatementBlock& declarations
																	) const
{
	if (A.getDim() != 0)
		return declarations.addFunction( fcn );

	return SUCCESSFUL_RETURN;
}
开发者ID:OspreyX,项目名称:acado,代码行数:8,代码来源:export_cholesky_decomposition.cpp

示例14: getDataDeclarations

returnValue DiscreteTimeExport::getDataDeclarations(	ExportStatementBlock& declarations,
														ExportStruct dataStruct
													) const
{
	ExportVariable max = getAuxVariable();
	declarations.addDeclaration( max,dataStruct );
	declarations.addDeclaration( rk_xxx,dataStruct );
	declarations.addDeclaration( reset_int,dataStruct );

	declarations.addDeclaration( rk_diffsPrev1,dataStruct );
	declarations.addDeclaration( rk_diffsPrev2,dataStruct );

	declarations.addDeclaration( rk_diffsNew1,dataStruct );
	declarations.addDeclaration( rk_diffsNew2,dataStruct );

	return SUCCESSFUL_RETURN;
}
开发者ID:skyhawkf119,项目名称:acado,代码行数:17,代码来源:discrete_export.cpp

示例15: getFunctionDeclarations

returnValue DiscreteTimeExport::getFunctionDeclarations(	ExportStatementBlock& declarations
														) const
{
	declarations.addDeclaration( integrate );
	if( NX2 != NX ) declarations.addDeclaration( fullRhs );

	if( exportRhs ) {
		if( NX1 > 0 ) {
			declarations.addDeclaration( lin_input );
		}
		if( NX2 > 0 ) {
			declarations.addDeclaration( rhs );
			declarations.addDeclaration( diffs_rhs );
		}
	}
	else {
		Function tmpFun;
		tmpFun << zeros(1,1);
		ExportODEfunction tmpExport(tmpFun, getNameRHS());
		declarations.addDeclaration( tmpExport );
		tmpExport = ExportODEfunction(tmpFun, getNameDiffsRHS());
		declarations.addDeclaration( tmpExport );
	}

	return SUCCESSFUL_RETURN;
}
开发者ID:skyhawkf119,项目名称:acado,代码行数:26,代码来源:discrete_export.cpp


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