Commit dfb0d9c9 authored by Markus Holzer's avatar Markus Holzer
Browse files

Replace some typedefs

parent e6d3fbce
......@@ -149,7 +149,7 @@ inline void static_assert_uint_t() {
// data structure specific data types
using cell_idx_t = int;
//typedef int64_t cell_idx_t;
//using cell_idx_t = int64_t ;
WALBERLA_STATIC_ASSERT( std::numeric_limits<cell_idx_t>::is_specialized &&
std::numeric_limits<cell_idx_t>::is_integer &&
......@@ -164,7 +164,7 @@ template< typename T > inline cell_idx_t cell_idx_c( T t ) { return numeric_cast
#ifdef WALBERLA_DOUBLE_ACCURACY
using real_t = double;
#else
typedef float real_t;
using real_t = float;
#endif
inline constexpr real_t operator"" _r( long double t ) { return static_cast< real_t >(t); }
......
......@@ -43,7 +43,7 @@ class CellVector
{
public:
/*! \name Standard container typedefs */
/*! \name Standard container alias-declarations */
//@{
using iterator = std::vector<Cell>::iterator;
using const_iterator = std::vector<Cell>::const_iterator;
......
......@@ -51,7 +51,7 @@ namespace cuda {
bool usePitchedMem
)
{
typedef GPUField< typename Field_T::value_type> GPUField_T;
using GPUField_T = GPUField< typename Field_T::value_type>;
const Field_T * f = block->getData<Field_T>( cpuFieldID );
auto gpuField = new GPUField_T( f->xSize(), f->ySize(), f->zSize(), f->fSize(),
......
......@@ -60,7 +60,7 @@ namespace cuda {
class GPUField
{
public:
typedef T value_type;
using value_type = T;
GPUField( uint_t _xSize, uint_t _ySize, uint_t _zSize, uint_t _fSize,
uint_t _nrOfGhostLayers, const Layout & _layout = zyxf, bool usePitchedMem = true );
......
......@@ -126,12 +126,12 @@ namespace cuda {
//** Type checking of parameters **********************************************************************************
/*! \name Type checking of parameters */
//@{
typedef typename std::remove_pointer<FuncPtr>::type FuncType;
using FuncType = typename std::remove_pointer<FuncPtr>::type;
#define CHECK_PARAMETER_FUNC( Number ) \
template<typename T> \
bool checkParameter##Number( typename std::enable_if< (FunctionTraits<FuncType>::arity > Number ), T >::type * = 0 ) { \
typedef typename FunctionTraits<FuncType>::template argument<Number>::type ArgType; \
using ArgType = typename FunctionTraits<FuncType>::template argument<Number>::type; \
return std::is_same< T, ArgType >::value; \
} \
template<typename T> \
......
......@@ -61,7 +61,7 @@ namespace communication {
class CustomMemoryBuffer
{
public:
typedef uint8_t ElementType;
using ElementType = uint8_t;
explicit CustomMemoryBuffer();
explicit CustomMemoryBuffer( std::size_t initSize );
......
......@@ -55,7 +55,7 @@ template<typename GPUField_T>
class GPUPackInfo : public walberla::communication::UniformPackInfo
{
public:
typedef typename GPUField_T::value_type FieldType;
using FieldType = typename GPUField_T::value_type;
GPUPackInfo( const BlockDataID & bdId )
: bdId_( bdId ), communicateAllGhostLayers_( true ), numberOfGhostLayers_( 0 ),
......
......@@ -72,19 +72,19 @@ namespace field {
/*! \name Type Definitions */
//@{
using value_type = T;
typedef ForwardFieldIterator<T> iterator;
typedef ForwardFieldIterator<const T> const_iterator;
using iterator = ForwardFieldIterator<T>;
using const_iterator = ForwardFieldIterator<const T>;
typedef ReverseFieldIterator<T> reverse_iterator;
typedef ReverseFieldIterator<const T> const_reverse_iterator;
using reverse_iterator = ReverseFieldIterator<T>;
using const_reverse_iterator = ReverseFieldIterator<const T>;
typedef FieldIterator<T > base_iterator;
typedef FieldIterator<const T > const_base_iterator;
using base_iterator = FieldIterator<T >;
using const_base_iterator = FieldIterator<const T >;
typedef FieldPointer<Field<T>, Field<T>, T > Ptr;
typedef FieldPointer<Field<T>, const Field<T>, const T > ConstPtr;
using Ptr = FieldPointer<Field<T>, Field<T>, T >;
using ConstPtr = FieldPointer<Field<T>, const Field<T>, const T >;
typedef typename std::conditional<VectorTrait<T>::F_SIZE!=0, Field<typename VectorTrait<T>::OutputType>, Field<T>>::type FlattenedField;
using FlattenedField = typename std::conditional<VectorTrait<T>::F_SIZE!=0, Field<typename VectorTrait<T>::OutputType>, Field<T>>::type;
//@}
//****************************************************************************************************************
......
This diff is collapsed.
......@@ -83,7 +83,7 @@ namespace stencil {
/*! \name Iteration*/
//@{
typedef stencil::Iterator<$name> iterator;
using iterator = stencil::Iterator<$name>;
static iterator begin() { return iterator(0); }
static iterator beginNoCenter() { return iterator(noCenterFirstIdx); }
......@@ -182,7 +182,7 @@ namespace stencil {
} // namespace internal
typedef internal::$name<> $name;
using $name = internal::$name<>;
} // namespace stencil
} // namespace walberla
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment