Skip to content

Commit

Permalink
- some improvements concerning array.h
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22460 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
RuedKamp committed Sep 26, 2014
1 parent 29a8943 commit 451f9c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SimulationRuntime/cpp/Core/Math/ArrayOperations.cpp
Expand Up @@ -188,7 +188,11 @@ void multiply_array( BaseArray<T> & inputArray ,const T &b, BaseArray<T> & outpu
template < typename T>
void divide_array( BaseArray<T> & inputArray ,const T &b, BaseArray<T> & outputArray )
{
outputArray.setDims(inputArray.getDims());

if ( outputArray.getDims() != inputArray.getDims())
{
outputArray.setDims(inputArray.getDims());
}
T* data = inputArray.getData();
unsigned int nelems = inputArray.getNumElems();
T* aim = outputArray.getData();
Expand Down

0 comments on commit 451f9c6

Please sign in to comment.