/** \brief swap content of this and other pointers. * \param other element to swap content with. */ void swap(this_type &other) { pointer tmp=other.release(); assert( other.get()==NULL ); other.t_=get(); t_=tmp; }
void swap(this_type& m) { WLock(); m.WLock(); parent_type::swap(m); m.WUnlock(); WUnlock(); }
bool operator<(const this_type& m) const { bool ret; RLock(); m.RLock(); ret = parent_type::operator<(m); m.RUnlock(); RUnlock(); return ret; }
bool operator==( this_type const& other ) const { if (empty()) return other.empty(); return (low_ == other.low_) && (high_ == other.high_); }
tensor( this_type const& expr, Geo_t const& geom, Basis_i_t const& fev ) : M_tensor_expr( expr.expression(), geom, fev ), M_inv( vf::detail::ExtractGm<Geo_t>::get( geom )->nPoints() ) { }
bool operator < (const this_type& rhs) const { value_type lhs_value = value(); value_type rhs_value = rhs.value(); if(lhs_value == rhs_value) return m_index < rhs.m_index; return lhs_value < rhs_value; }
//! @brief Deep comparison bool operator== (this_type const &rhs) const { return (!*this && !rhs) || (*this && rhs && ( (this->get() == rhs.get()) || (**this == *rhs) ) ); }
BStr::BStr(const this_type & val) : m_str(nullptr) { if (val.m_str) { m_str = ::SysAllocStringLen(val.m_str, val.size()); if (!m_str) CheckCom(E_OUTOFMEMORY); } }
void enque(value_type const q) { { libmaus2::parallel::ScopePosixSpinLock llock(lock); Q.push_back(q); } semaphore.post(); if ( parent ) parent->enque(q); }
static void copy( this_type const & from, this_type & to, uint64_t const blockid, uint64_t const numblocks ) { uint64_t const blocksize = (from.H.size()+numblocks-1) / numblocks; uint64_t const idlow = blockid*blocksize; uint64_t const idhigh = std::min(idlow+blocksize,from.H.size()); for ( uint64_t i = idlow; i < idhigh; ++i ) if ( from.H[i].first != base_type::unused() ) to.insert(from.H[i].first,from.H[i].second); }
static inline comparable_type apply(this_type const& input) { return comparable_type(input.radius()); }
tensor( this_type const& expr, Geo_t const& geom, Basis_i_t const& fev ) : M_tensor_expr( expr.expression(), geom, fev ) { }
tensor( this_type const& expr, Geo_t const& geom ) : M_tensor_expr( expr.expression(), geom ) { }
iterator operator++(int) { iterator copy = *this; v = owner->decode(); return copy; }
friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2) { return i2.distance_to(i); }
friend bool operator== ( const this_type& lhs, const this_type& rhs ) { return lhs.absolute() == rhs.absolute() ? true : false; }
iterator(this_type * rowner) : owner(rowner), v(owner->decode()) { }
friend difference_type operator- (const this_type& i, const this_type& i2) { return i2.distance_to(i); }
friend bool operator== (const this_type& i, const this_type& i2) { return i.equal(i2); }
/*! * Lexicographically compares the argument string literal to a part of this string * * \pre <tt>pos <= size()</tt> * \param pos Starting position within this string to perform comparison to * \param n Length of the substring of this string to perform comparison to * \param that Comparand * \return Zero if the comparand equals this string, a negative value if this string is less than the comparand, * a positive value if this string is greater than the comparand. * * \b Throws: An <tt>std::exception</tt>-based exception if \a pos is out of range. */ int compare(size_type pos, size_type n, this_type const& that) const { return compare(pos, n, that.c_str(), that.size()); }
/** \brief comapre pointers. * \param other element to compare with. * \return true if this pointer is less then other, false otherwise. */ bool operator<(const this_type &other) const { return get()<other.get(); }
friend bool operator==(const this_type& l, const this_type& r) { return l.size() == r.size() && ngx_strncmp(l.data(), r.data(), l.size()) == 0 ; }
static inline typename similar_type<this_type, P1, P2>::type apply(this_type const& input) { return comparable::haversine<P1, P2, CalculationType>(input.radius()); }
/** @brief this=右辺値か判定。 @param[in] i_right 右辺値。 */ public: bool operator==(this_type const& i_right) const { return this->get_malloc() == i_right.get_malloc() && this->get_free() == i_right.get_free(); }
/*! * Lexicographically compares the argument string to this string * * \param that Comparand * \return Zero if the comparand equals this string, a negative value if this string is less than the comparand, * a positive value if this string is greater than the comparand. */ int compare(this_type const& that) const { return compare(0, m_Len, that.c_str(), that.size()); }
fixed_size_vector(const this_type& v, allocator* alloc = default_allocator()) : begin_(elements_), size_(0), capacity_(count), allocator_(alloc) { insert(end(), v.begin(), v.end()); }
friend bool operator< (const this_type& i, const this_type& i2) { return i.less(i2); }
iterator operator++() { v = owner->decode(); return *this; }
void add( this_type const& f ) { M_vector->add( f.container() ); }
member_array(const this_type& o) : base_class(o.base()) { }