Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22132 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Sep 4, 2014
1 parent f61e671 commit 52a577b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Expression.mo
Expand Up @@ -10910,7 +10910,7 @@ public function checkDimensionSizes
DAE.Exp e;
algorithm
value := matchcontinue(dim)

case DAE.DIM_INTEGER(integer = i) then true;
case DAE.DIM_ENUM(size = i) then true;
case DAE.DIM_BOOLEAN() then true;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenCpp.tpl
Expand Up @@ -6983,7 +6983,7 @@ end dimension;
template checkDimension(Dimensions dims)
::=
dimensionsList(dims) |> dim as Integer => '<%dim%>';separator=","

end checkDimension;


Expand Down
4 changes: 2 additions & 2 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -2754,12 +2754,12 @@ package Expression
input list<DAE.Exp> iExpressions;
output Boolean oCrefWithEqualIdents;
end isCrefListWithEqualIdents;

function dimensionsList
input DAE.Dimensions inDims;
output list<Integer> outValues;
end dimensionsList;

end Expression;

package ExpressionDump
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Core/Math/ArrayOperations.cpp
Expand Up @@ -103,7 +103,7 @@ void create_array_from_shape(const spec_type& sp,BaseArray<T>& s,BaseArray<T>& d

}
d.setDims(shape);

//Check if the dimension of passed indices match the dimension of target array
if(sp.second.size()!=s.getNumDims())
throw std::invalid_argument("Erro in create array from shape, number of dimensions does not match");
Expand Down Expand Up @@ -166,7 +166,7 @@ void transpose_array (BaseArray< T >& a, BaseArray< T >& x )
{
if(a.getNumDims()!=2 || x.getNumDims()!=2)
throw std::invalid_argument("Erro in transpose_array, number of dimensions does not match");

vector<size_t> ex = x.getDims();
std::swap( ex[0], ex[1] );
a.setDims(ex);
Expand Down
32 changes: 16 additions & 16 deletions SimulationRuntime/cpp/Include/Core/Math/Array.h
Expand Up @@ -12,11 +12,11 @@ template<class T>class BaseArray
:_static(is_static)
{};
//interface methods for all arrays

virtual T& operator()(vector<size_t> idx) = 0;
virtual void assign(const T* data) = 0;
virtual void assign(const T* data) = 0;
virtual void assign(const BaseArray<T>& otherArray) = 0;

virtual std::vector<size_t> getDims() const
{
throw std::invalid_argument("Wrong virtual Array getDims call");
Expand All @@ -43,13 +43,13 @@ template<class T>class BaseArray
throw std::invalid_argument("Wrong virtual Array setDims call");
}



virtual T& operator()(unsigned int i)
{
throw std::invalid_argument("Wrong virtual Array operator call");
};

virtual const T& operator()(unsigned int i) const
{
throw std::invalid_argument("Wrong virtual Array operator call");
Expand All @@ -70,7 +70,7 @@ template<class T>class BaseArray
{
throw std::invalid_argument("Wrong virtual Array operator call");
};

bool isStatic()
{
return _static;
Expand Down Expand Up @@ -108,7 +108,7 @@ template<typename T, std::size_t size>class StatArrayDim1 : public BaseArray<T>
// _real_array = otherArray._real_array;
//}


StatArrayDim1<T,size>& operator=(BaseArray<T>& rhs)
{
if (this != &rhs)
Expand Down Expand Up @@ -209,7 +209,7 @@ template<typename T, std::size_t size>class StatArrayDim1 : public BaseArray<T>
{
return 1;
}

virtual void setDims(std::vector<size_t> v)
{

Expand Down Expand Up @@ -348,7 +348,7 @@ template<typename T ,std::size_t size1,std::size_t size2,bool fotran = false>cla
{
return size1 * size2;
}

virtual unsigned int getNumDims()
{
return 2;
Expand Down Expand Up @@ -459,12 +459,12 @@ template<typename T ,std::size_t size1, std::size_t size2, std::size_t size3> cl
{
return size1 + size2 + size3;
}

virtual unsigned int getNumDims()
{
return 2;
}

virtual void setDims(std::vector<size_t> v)
{

Expand Down Expand Up @@ -810,8 +810,8 @@ template<typename T>class DynArrayDim1 : public BaseArray<T>
{
_multi_array.assign(data, data + _multi_array.num_elements() );
}


virtual T& operator()(vector<size_t> idx)
{
return _multi_array[idx[0]];
Expand Down Expand Up @@ -1006,7 +1006,7 @@ template<typename T >class DynArrayDim2 : public BaseArray<T>
{
return 2;
}

/*
access to data
*/
Expand Down Expand Up @@ -1147,7 +1147,7 @@ template<typename T> class DynArrayDim3 : public BaseArray<T>
{
return 3;
}

/*
access to data
*/
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Include/Core/Math/ArrayOperations.h
Expand Up @@ -351,7 +351,7 @@ template < typename T >
void create_array_from_shape(const spec_type& sp,BaseArray<T>& s,BaseArray<T>& d);



template < typename T >
void promote_array(unsigned int n,BaseArray<T>& s,BaseArray<T>& d);

Expand Down

0 comments on commit 52a577b

Please sign in to comment.