Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CXX11_ATOMIC_H
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
# error "Compiler version error. Clang version 3.3.0 and above is supported"
#endif
-#if defined(_LIBCPP_VERSION) && !defined(CDS_USE_BOOST_ATOMIC)
+#if defined(_LIBCPP_VERSION) && !defined(CDS_USE_BOOST_ATOMIC) && CDS_COMPILER_VERSION < 30700
// Note: Clang libc++ atomic leads to program crash.
// So, we use libcds atomic implementation
# define CDS_USE_LIBCDS_ATOMIC
{
typedef std::uint64_t type;
};
+#if CDS_BUILD_BITS == 64 && CDS_DCAS_SUPPORT
+ template <>
+ struct primary_type<16>
+ {
+ typedef unsigned __int128_t type;
+ };
+#endif
template <typename T, typename Primary>
struct make_atomic_primary
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_STRIPED_MAP_STD_MAP_ADAPTER_H
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
</Filter>\r
- <Filter Include="Resource Files">\r
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
- </Filter>\r
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="..\..\..\test\stress\pqueue\pqueue_type.h">\r
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSUNIT_MAP_TYPE_H
template <typename Key>
struct hash;
-#define CDSUNIT_INT_COMPARE(t) template <> struct cmp<t> { int operator()( t k1, t k2 ){ return (int)(k1 - k2); } }
+#define CDSUNIT_INT_COMPARE(t) template <> struct cmp<t> { int operator()( t k1, t k2 ) const { return (int)(k1 - k2); } }
CDSUNIT_INT_COMPARE(char);
CDSUNIT_INT_COMPARE(unsigned char);
CDSUNIT_INT_COMPARE(int);
CDSUNIT_INT_COMPARE(unsigned long long);
#undef CDSUNIT_INT_COMPARE
-#define CDSUNIT_INT_LESS(t) template <> struct less<t> { bool operator()( t k1, t k2 ){ return k1 < k2; } }
+#define CDSUNIT_INT_LESS(t) template <> struct less<t> { bool operator()( t k1, t k2 ) const { return k1 < k2; } }
CDSUNIT_INT_LESS( char );
CDSUNIT_INT_LESS( unsigned char );
CDSUNIT_INT_LESS( int );
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSSTRESS_PQUEUE_ITEM_H
simple_value( key_type n )
: key(n)
{}
- };
-} // namespace pqueue
-namespace std {
- template <class T> struct less;
- template <class T> struct greater;
-
- template <>
- struct less<pqueue::simple_value>
- {
- bool operator()( pqueue::simple_value const& k1, pqueue::simple_value const& k2 ) const
+ friend bool operator <( simple_value const& lhs, simple_value const& rhs )
{
- return k1.key < k2.key;
+ return lhs.key < rhs.key;
}
-
- bool operator()( pqueue::simple_value const& k1, size_t k2 ) const
+ friend bool operator <( simple_value const& lhs, size_t rhs )
{
- return k1.key < k2;
+ return lhs.key < rhs;
}
-
- bool operator()( size_t k1, pqueue::simple_value const& k2 ) const
+ friend bool operator <( size_t lhs, simple_value const& rhs )
{
- return k1 < k2.key;
+ return lhs < rhs.key;
}
- bool operator()( size_t k1, size_t k2 ) const
+ friend bool operator >( simple_value const& lhs, simple_value const& rhs )
{
- return k1 < k2;
+ return lhs.key > rhs.key;
}
- };
-
- template <>
- struct greater<pqueue::simple_value>
- {
- bool operator()( pqueue::simple_value const& k1, pqueue::simple_value const& k2 ) const
+ friend bool operator >( simple_value const& lhs, size_t rhs )
{
- return k1.key > k2.key;
+ return lhs.key > rhs;
}
-
- bool operator()( pqueue::simple_value const& k1, size_t k2 ) const
+ friend bool operator >( size_t lhs, simple_value const& rhs )
{
- return k1.key > k2;
- }
-
- bool operator()( size_t k1, pqueue::simple_value const& k2 ) const
- {
- return k1 > k2.key;
- }
-
- bool operator()( size_t k1, size_t k2 ) const
- {
- return k1 > k2;
+ return lhs > rhs.key;
}
};
-
-} // namespace std
+} // namespace pqueue
#endif // #ifndef CDSSTRESS_PQUEUE_ITEM_H
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
test_atomic_integral_volatile<unsigned long long>();
}
-#if CDS_COMPILER != CDS_COMPILER_CLANG || defined(_LIBCPP_VERSION)
+#if !( CDS_COMPILER == CDS_COMPILER_CLANG && defined(_LIBCPP_VERSION) && CDS_COMPILER_VERSION < 30800 )
+ //clang error (libc++) with atomic<void> fetch_add/fetch_sub
TEST_F( cxx11_atomic_class, atomic_pointer_void )
{
do_test_atomic_pointer_void<false>();
test_atomic_integral_volatile<unsigned long long>();
}
-#if CDS_COMPILER != CDS_COMPILER_CLANG || defined(_LIBCPP_VERSION)
+#if !( CDS_COMPILER == CDS_COMPILER_CLANG && defined(_LIBCPP_VERSION) && CDS_COMPILER_VERSION < 30800 )
+ //clang error (libc++) with atomic<void> fetch_add/fetch_sub
TEST_F( cxx11_atomic_func, atomic_pointer_void )
{
do_test_atomic_pointer_void<false>();