Commit e9146847 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

Merge branch 'boostref' into 'master'

Replace remaining uses of boost::ref and remove comments about boost

See merge request walberla/walberla!188
parents 19d1f317 b3953c1e
......@@ -164,11 +164,11 @@ int main( int argc, char ** argv )
std::function<void(void)> syncCallWithoutTT;
if (bNN)
{
syncCallWithoutTT = std::bind( pe::syncNextNeighbors<BodyTuple>, boost::ref(*forest), storageID, &tt, real_c(0.1), false );
syncCallWithoutTT = std::bind( pe::syncNextNeighbors<BodyTuple>, std::ref(*forest), storageID, &tt, real_c(0.1), false );
WALBERLA_LOG_INFO_ON_ROOT("Using NextNeighbor sync!");
} else if (bSO)
{
syncCallWithoutTT = std::bind( pe::syncShadowOwners<BodyTuple>, boost::ref(*forest), storageID, &tt, real_c(0.1), false );
syncCallWithoutTT = std::bind( pe::syncShadowOwners<BodyTuple>, std::ref(*forest), storageID, &tt, real_c(0.1), false );
WALBERLA_LOG_INFO_ON_ROOT("Using ShadowOwner sync!");
} else
{
......
......@@ -841,7 +841,7 @@ inline const Matrix2<Type> fabs( const Matrix2<Type>& m );
//template< typename Type, typename Other >
//inline const Matrix2<HIGH> operator*( Other scalar, const Matrix2<Type>& matrix )
//{
// static_assert( ! boost::is_scalar<Other>::value, "Only scalar types allowed" );
// static_assert( ! std::is_scalar<Other>::value, "Only scalar types allowed" );
// return matrix*scalar;
//}
//**********************************************************************************************************************
......
......@@ -520,8 +520,6 @@ void GenericBufferSystem<Rb, Sb>::setCommunicationType( const bool knownSize )
//
//======================================================================================================================
// using boost::counting_range didn't work on all supported compilers
// so the range is created explicitly
template< typename Rb, typename Sb>
typename GenericBufferSystem<Rb, Sb>::RankRange GenericBufferSystem<Rb,Sb>::noRanks()
{
......
......@@ -153,7 +153,7 @@ public:
// http://graphics.stanford.edu/~seander/bithacks.html
static const boost::uint8_t logBase2LookupTable[256] =
static const uint8_t logBase2LookupTable[256] =
{
#define logBase2LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
......@@ -164,9 +164,9 @@ static const boost::uint8_t logBase2LookupTable[256] =
template< typename UINT > size_t logBase2( UINT value ); // 1000 -> 3, 0010 -> 1, 0001 -> 0, etc.
template<> inline size_t logBase2< boost::uint64_t >( boost::uint64_t value ) {
template<> inline size_t logBase2< uint64_t >( uint64_t value ) {
boost::uint64_t i, j;
uint64_t i, j;
i = value >> 32;
if( i != 0 ) {
......@@ -187,9 +187,9 @@ template<> inline size_t logBase2< boost::uint64_t >( boost::uint64_t value ) {
return ( i != 0 ) ? (8 + logBase2LookupTable[i]) : logBase2LookupTable[value];
}
template<> inline size_t logBase2< boost::uint32_t >( boost::uint32_t value ) {
template<> inline size_t logBase2< uint32_t >( uint32_t value ) {
boost::uint32_t i, j;
uint32_t i, j;
j = value >> 16;
if( j != 0 ) {
......
......@@ -231,7 +231,7 @@ namespace internal {
auto result = make_shared<boost::python::object>();
AddToStorageExporter exporter( blocks, name, fs, gl, layout, type, usePitchedMem );
python_coupling::for_each_noncopyable_type<GpuFields>( boost::ref(exporter) );
python_coupling::for_each_noncopyable_type<GpuFields>( std::ref(exporter) );
if ( ! exporter.successful() ) {
PyErr_SetString( PyExc_ValueError, "Adding Field failed.");
......
......@@ -40,7 +40,7 @@ namespace domain_decomposition {
//**********************************************************************************************************************
/*!
* For documentation, see documentation of free function
* 'void mapPointToPeriodicDomain( const boost::array< bool, 3 > & periodic, const AABB & domain,
* 'void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain,
* real_t & x, real_t & y, real_t & z )'
*/
//**********************************************************************************************************************
......@@ -57,7 +57,7 @@ void BlockStorage::mapToPeriodicDomain( real_t & x, real_t & y, real_t & z ) con
//**********************************************************************************************************************
/*!
* For documentation, see documentation of free function
* 'bool periodicIntersect( const boost::array< bool, 3 > & periodic, const math::AABB & domain, const math::AABB & box1, const math::AABB & box2 )'
* 'bool periodicIntersect( const std::array< bool, 3 > & periodic, const math::AABB & domain, const math::AABB & box1, const math::AABB & box2 )'
*/
//**********************************************************************************************************************
bool BlockStorage::periodicIntersect( const math::AABB & box1, const math::AABB & box2 ) const
......
......@@ -35,7 +35,6 @@
#include "core/uid/SUID.h"
#include <functional>
//#include <boost/type_traits/is_base_of.hpp>
#include <string>
#include <vector>
......@@ -660,7 +659,7 @@ template< typename T >
inline BlockDataID BlockStorage::addBlockData( const shared_ptr< T > & dataHandling, const std::string & identifier,
const Set<SUID> & requiredSelectors, const Set<SUID> & incompatibleSelectors )
{
//static_assert( boost::is_base_of< BlockDataHandling<typename T::value_type>, T >::value );
//static_assert( std::is_base_of< BlockDataHandling<typename T::value_type>, T >::value );
internal::SelectableBlockDataHandlingWrapper sbdhw( walberla::make_shared< internal::BlockDataHandlingHelper<typename T::value_type> >( dataHandling ),
requiredSelectors, incompatibleSelectors, identifier );
......
......@@ -46,7 +46,7 @@ void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AAB
/// see documetation of 'void mapPointToPeriodicDomain( const boost::array< bool, 3 > & periodic, const AABB & domain, real_t & x, real_t & y, real_t & z )'
/// see documetation of 'void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain, real_t & x, real_t & y, real_t & z )'
inline void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain, Vector3< real_t > & p )
{
mapPointToPeriodicDomain( periodic, domain, p[0], p[1], p[2] );
......@@ -54,7 +54,7 @@ inline void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, co
/// see documetation of 'void mapPointToPeriodicDomain( const boost::array< bool, 3 > & periodic, const AABB & domain, real_t & x, real_t & y, real_t & z )'
/// see documetation of 'void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain, real_t & x, real_t & y, real_t & z )'
inline Vector3< real_t > mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain, const Vector3< real_t > & p )
{
Vector3< real_t > point( p );
......
......@@ -90,7 +90,7 @@ int main( int argc, char **argv )
// pe coupling
const real_t overlap = real_t( 1.5 ) * dx;
std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, boost::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
// sphere positions for test scenarios
Vector3<real_t> positionInsideBlock(real_t(10), real_t(10), real_t(10));
......
......@@ -99,7 +99,7 @@ int main( int argc, char **argv )
// set up synchronization procedure
const real_t overlap = real_t( 1.5 ) * dx;
std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, boost::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
std::function<void(void)> syncCall = std::bind( pe::syncNextNeighbors<BodyTypeTuple>, std::ref(blocks->getBlockForest()), bodyStorageID, static_cast<WcTimingTree*>(nullptr), overlap, false );
// sphere positions for test scenarios
......
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