Skip to content

Commit

Permalink
fix for addContainerToWriteQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
niklwors committed Oct 12, 2015
1 parent 3a94984 commit eb0d209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
10 changes: 1 addition & 9 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -7055,14 +7055,6 @@ case SIMCODE(modelInfo = MODELINFO(__),simulationSettingsOpt = SOME(settings as
/* HistoryImplType::value_type_v v;
HistoryImplType::value_type_dv v2; */


HistoryImplType::values_type& container = _historyImpl->getFreeContainer();
get<0>(container) = outputRealVars.outputVars;
get<1>(container) = outputIntVars.outputVars;
get<2>(container) = outputBoolVars.outputVars;
get<3>(container) = _simTime;


<%if Flags.isSet(Flags.WRITE_TO_BUFFER) then
<<
HistoryImplType::value_type_r v3;
Expand All @@ -7079,7 +7071,7 @@ case SIMCODE(modelInfo = MODELINFO(__),simulationSettingsOpt = SOME(settings as
<%generateMeasureTimeEndCode("measuredFunctionStartValues", "measuredFunctionEndValues", "(*measureTimeFunctionsArray)[2]", "writeOutput", "MEASURETIME_MODELFUNCTIONS")%>

//_historyImpl->write(v,v2,_simTime);
_historyImpl->addContainerToWriteQueue(container);
_historyImpl->addContainerToWriteQueue(boost::make_tuple(outputRealVars.outputVars,outputIntVars.outputVars,outputBoolVars.outputVars,_simTime));
>>
%>
}
Expand Down
6 changes: 1 addition & 5 deletions SimulationRuntime/cpp/Include/Core/DataExchange/Writer.h
Expand Up @@ -76,11 +76,7 @@ class Writer
,_threadWorkDone(false)
#endif
{
for (int i = 0; i < CONTAINER_COUNT; ++i)
{
values_type vars = boost::make_tuple(real_vars_t(),int_vars_t(),bool_vars_t(),0.0);
_freeContainers.push_back(vars);
}

}

virtual ~Writer()
Expand Down

0 comments on commit eb0d209

Please sign in to comment.