Blender  V3.3
atomic_test.cc File Reference
#include <limits>
#include "atomic_ops.h"
#include "testing/testing.h"

Go to the source code of this file.

Functions

64 bit unsigned int atomics
 TEST (atomic, atomic_add_and_fetch_uint64)
 
 TEST (atomic, atomic_sub_and_fetch_uint64)
 
 TEST (atomic, atomic_fetch_and_add_uint64)
 
 TEST (atomic, atomic_fetch_and_sub_uint64)
 
 TEST (atomic, atomic_cas_uint64)
 
 TEST (atomic, atomic_load_uint64)
 
 TEST (atomic, atomic_store_uint64)
 
64 bit signed int atomics
 TEST (atomic, atomic_add_and_fetch_int64)
 
 TEST (atomic, atomic_sub_and_fetch_int64)
 
 TEST (atomic, atomic_fetch_and_add_int64)
 
 TEST (atomic, atomic_fetch_and_sub_int64)
 
 TEST (atomic, atomic_cas_int64)
 
 TEST (atomic, atomic_load_int64)
 
 TEST (atomic, atomic_store_int64)
 
32 bit unsigned int atomics
 TEST (atomic, atomic_add_and_fetch_uint32)
 
 TEST (atomic, atomic_sub_and_fetch_uint32)
 
 TEST (atomic, atomic_cas_uint32)
 
 TEST (atomic, atomic_load_uint32)
 
 TEST (atomic, atomic_store_uint32)
 
 TEST (atomic, atomic_fetch_and_add_uint32)
 
 TEST (atomic, atomic_fetch_and_or_uint32)
 
 TEST (atomic, atomic_fetch_and_and_uint32)
 
32 bit signed int atomics
 TEST (atomic, atomic_add_and_fetch_int32)
 
 TEST (atomic, atomic_sub_and_fetch_int32)
 
 TEST (atomic, atomic_cas_int32)
 
 TEST (atomic, atomic_load_int32)
 
 TEST (atomic, atomic_store_int32)
 
 TEST (atomic, atomic_fetch_and_add_int32)
 
 TEST (atomic, atomic_fetch_and_or_int32)
 
 TEST (atomic, atomic_fetch_and_and_int32)
 
16 bit signed int atomics
 TEST (atomic, atomic_fetch_and_or_int16)
 
 TEST (atomic, atomic_fetch_and_and_int16)
 
8 bit unsigned int atomics
 TEST (atomic, atomic_fetch_and_or_uint8)
 
 TEST (atomic, atomic_fetch_and_and_uint8)
 
8 bit signed int atomics
 TEST (atomic, atomic_fetch_and_or_int8)
 
 TEST (atomic, atomic_fetch_and_and_int8)
 
char aliases
 TEST (atomic, atomic_fetch_and_or_char)
 
 TEST (atomic, atomic_fetch_and_and_char)
 
size_t aliases
 TEST (atomic, atomic_add_and_fetch_z)
 
 TEST (atomic, atomic_sub_and_fetch_z)
 
 TEST (atomic, atomic_fetch_and_add_z)
 
 TEST (atomic, atomic_fetch_and_sub_z)
 
 TEST (atomic, atomic_cas_z)
 
 TEST (atomic, atomic_load_z)
 
 TEST (atomic, atomic_store_z)
 
 TEST (atomic, atomic_fetch_and_update_max_z)
 
unsigned int aliases
 TEST (atomic, atomic_add_and_fetch_u)
 
 TEST (atomic, atomic_sub_and_fetch_u)
 
 TEST (atomic, atomic_fetch_and_add_u)
 
 TEST (atomic, atomic_fetch_and_sub_u)
 
 TEST (atomic, atomic_cas_u)
 
floating point atomics
 TEST (atomic, atomic_cas_float)
 
 TEST (atomic, atomic_add_and_fetch_fl)
 

pointer aliases

#define INT_AS_PTR(a)   reinterpret_cast<void *>((a))
 
 TEST (atomic, atomic_cas_ptr)
 
 TEST (atomic, atomic_load_ptr)
 
 TEST (atomic, atomic_store_ptr)
 

Macro Definition Documentation

◆ INT_AS_PTR

#define INT_AS_PTR (   a)    reinterpret_cast<void *>((a))

Definition at line 1052 of file atomic_test.cc.

Function Documentation

◆ TEST() [1/56]

TEST ( atomic  ,
atomic_add_and_fetch_fl   
)

Definition at line 1099 of file atomic_test.cc.

References atomic_add_and_fetch_fl().

◆ TEST() [2/56]

TEST ( atomic  ,
atomic_add_and_fetch_int32   
)

Definition at line 532 of file atomic_test.cc.

References atomic_add_and_fetch_int32(), and EXPECT_EQ().

◆ TEST() [3/56]

TEST ( atomic  ,
atomic_add_and_fetch_int64   
)

Definition at line 186 of file atomic_test.cc.

References atomic_add_and_fetch_int64(), and EXPECT_EQ().

◆ TEST() [4/56]

TEST ( atomic  ,
atomic_add_and_fetch_u   
)

Definition at line 956 of file atomic_test.cc.

References atomic_add_and_fetch_u(), EXPECT_EQ(), and max.

◆ TEST() [5/56]

TEST ( atomic  ,
atomic_add_and_fetch_uint32   
)

Definition at line 354 of file atomic_test.cc.

References atomic_add_and_fetch_uint32(), and EXPECT_EQ().

◆ TEST() [6/56]

TEST ( atomic  ,
atomic_add_and_fetch_uint64   
)

Definition at line 21 of file atomic_test.cc.

References atomic_add_and_fetch_uint64(), and EXPECT_EQ().

◆ TEST() [7/56]

TEST ( atomic  ,
atomic_add_and_fetch_z   
)

Definition at line 810 of file atomic_test.cc.

References atomic_add_and_fetch_z(), EXPECT_EQ(), and max.

◆ TEST() [8/56]

TEST ( atomic  ,
atomic_cas_float   
)

Definition at line 1090 of file atomic_test.cc.

References atomic_cas_float(), and EXPECT_EQ().

◆ TEST() [9/56]

TEST ( atomic  ,
atomic_cas_int32   
)

Definition at line 580 of file atomic_test.cc.

References atomic_cas_int32(), and EXPECT_EQ().

◆ TEST() [10/56]

TEST ( atomic  ,
atomic_cas_int64   
)

Definition at line 282 of file atomic_test.cc.

References atomic_cas_int64(), and EXPECT_EQ().

◆ TEST() [11/56]

TEST ( atomic  ,
atomic_cas_ptr   
)

Definition at line 1054 of file atomic_test.cc.

References atomic_cas_ptr(), EXPECT_EQ(), and INT_AS_PTR.

◆ TEST() [12/56]

TEST ( atomic  ,
atomic_cas_u   
)

Definition at line 1028 of file atomic_test.cc.

References atomic_cas_u(), EXPECT_EQ(), and max.

◆ TEST() [13/56]

TEST ( atomic  ,
atomic_cas_uint32   
)

Definition at line 402 of file atomic_test.cc.

References atomic_cas_uint32(), and EXPECT_EQ().

◆ TEST() [14/56]

TEST ( atomic  ,
atomic_cas_uint64   
)

Definition at line 117 of file atomic_test.cc.

References atomic_cas_uint64(), and EXPECT_EQ().

◆ TEST() [15/56]

TEST ( atomic  ,
atomic_cas_z   
)

Definition at line 882 of file atomic_test.cc.

References atomic_cas_z(), EXPECT_EQ(), and max.

◆ TEST() [16/56]

TEST ( atomic  ,
atomic_fetch_and_add_int32   
)

Definition at line 644 of file atomic_test.cc.

References atomic_fetch_and_add_int32(), and EXPECT_EQ().

◆ TEST() [17/56]

TEST ( atomic  ,
atomic_fetch_and_add_int64   
)

Definition at line 234 of file atomic_test.cc.

References atomic_fetch_and_add_int64(), and EXPECT_EQ().

◆ TEST() [18/56]

TEST ( atomic  ,
atomic_fetch_and_add_u   
)

Definition at line 992 of file atomic_test.cc.

References atomic_fetch_and_add_u(), EXPECT_EQ(), and max.

◆ TEST() [19/56]

TEST ( atomic  ,
atomic_fetch_and_add_uint32   
)

Definition at line 463 of file atomic_test.cc.

References atomic_fetch_and_add_uint32(), and EXPECT_EQ().

◆ TEST() [20/56]

TEST ( atomic  ,
atomic_fetch_and_add_uint64   
)

Definition at line 69 of file atomic_test.cc.

References atomic_fetch_and_add_uint64(), and EXPECT_EQ().

◆ TEST() [21/56]

TEST ( atomic  ,
atomic_fetch_and_add_z   
)

Definition at line 846 of file atomic_test.cc.

References atomic_fetch_and_add_z(), EXPECT_EQ(), and max.

◆ TEST() [22/56]

TEST ( atomic  ,
atomic_fetch_and_and_char   
)

Definition at line 795 of file atomic_test.cc.

References atomic_fetch_and_and_char(), and EXPECT_EQ().

◆ TEST() [23/56]

TEST ( atomic  ,
atomic_fetch_and_and_int16   
)

Definition at line 718 of file atomic_test.cc.

References atomic_fetch_and_and_int16(), and EXPECT_EQ().

◆ TEST() [24/56]

TEST ( atomic  ,
atomic_fetch_and_and_int32   
)

Definition at line 682 of file atomic_test.cc.

References atomic_fetch_and_and_int32(), and EXPECT_EQ().

◆ TEST() [25/56]

TEST ( atomic  ,
atomic_fetch_and_and_int8   
)

Definition at line 771 of file atomic_test.cc.

References atomic_fetch_and_and_int8(), and EXPECT_EQ().

◆ TEST() [26/56]

TEST ( atomic  ,
atomic_fetch_and_and_uint32   
)

Definition at line 505 of file atomic_test.cc.

References atomic_fetch_and_and_uint32(), and EXPECT_EQ().

◆ TEST() [27/56]

TEST ( atomic  ,
atomic_fetch_and_and_uint8   
)

Definition at line 748 of file atomic_test.cc.

References atomic_fetch_and_and_uint8(), and EXPECT_EQ().

◆ TEST() [28/56]

TEST ( atomic  ,
atomic_fetch_and_or_char   
)

Definition at line 786 of file atomic_test.cc.

References atomic_fetch_and_or_char(), and EXPECT_EQ().

◆ TEST() [29/56]

TEST ( atomic  ,
atomic_fetch_and_or_int16   
)

Definition at line 703 of file atomic_test.cc.

References atomic_fetch_and_or_int16(), and EXPECT_EQ().

◆ TEST() [30/56]

TEST ( atomic  ,
atomic_fetch_and_or_int32   
)

Definition at line 665 of file atomic_test.cc.

References atomic_fetch_and_or_int32(), and EXPECT_EQ().

◆ TEST() [31/56]

TEST ( atomic  ,
atomic_fetch_and_or_int8   
)

Definition at line 762 of file atomic_test.cc.

References atomic_fetch_and_or_int8(), and EXPECT_EQ().

◆ TEST() [32/56]

TEST ( atomic  ,
atomic_fetch_and_or_uint32   
)

Definition at line 484 of file atomic_test.cc.

References atomic_fetch_and_or_uint32(), and EXPECT_EQ().

◆ TEST() [33/56]

TEST ( atomic  ,
atomic_fetch_and_or_uint8   
)

Definition at line 739 of file atomic_test.cc.

References atomic_fetch_and_or_uint8(), and EXPECT_EQ().

◆ TEST() [34/56]

TEST ( atomic  ,
atomic_fetch_and_sub_int64   
)

Definition at line 255 of file atomic_test.cc.

References atomic_fetch_and_sub_int64(), and EXPECT_EQ().

◆ TEST() [35/56]

TEST ( atomic  ,
atomic_fetch_and_sub_u   
)

Definition at line 1010 of file atomic_test.cc.

References atomic_fetch_and_sub_u(), EXPECT_EQ(), and max.

◆ TEST() [36/56]

TEST ( atomic  ,
atomic_fetch_and_sub_uint64   
)

Definition at line 90 of file atomic_test.cc.

References atomic_fetch_and_sub_uint64(), and EXPECT_EQ().

◆ TEST() [37/56]

TEST ( atomic  ,
atomic_fetch_and_sub_z   
)

Definition at line 864 of file atomic_test.cc.

References atomic_fetch_and_sub_z(), EXPECT_EQ(), and max.

◆ TEST() [38/56]

TEST ( atomic  ,
atomic_fetch_and_update_max_z   
)

Definition at line 934 of file atomic_test.cc.

References atomic_fetch_and_update_max_z(), EXPECT_EQ(), and max.

◆ TEST() [39/56]

TEST ( atomic  ,
atomic_load_int32   
)

Definition at line 610 of file atomic_test.cc.

References atomic_load_int32(), EXPECT_EQ(), and max.

◆ TEST() [40/56]

TEST ( atomic  ,
atomic_load_int64   
)

Definition at line 314 of file atomic_test.cc.

References atomic_load_int64(), EXPECT_EQ(), and max.

◆ TEST() [41/56]

TEST ( atomic  ,
atomic_load_ptr   
)

Definition at line 1063 of file atomic_test.cc.

References atomic_load_ptr(), dest, EXPECT_EQ(), and INT_AS_PTR.

◆ TEST() [42/56]

TEST ( atomic  ,
atomic_load_uint32   
)

Definition at line 429 of file atomic_test.cc.

References atomic_load_uint32(), EXPECT_EQ(), and max.

◆ TEST() [43/56]

TEST ( atomic  ,
atomic_load_uint64   
)

Definition at line 146 of file atomic_test.cc.

References atomic_load_uint64(), EXPECT_EQ(), and max.

◆ TEST() [44/56]

TEST ( atomic  ,
atomic_load_z   
)

Definition at line 900 of file atomic_test.cc.

References atomic_load_z(), EXPECT_EQ(), and max.

◆ TEST() [45/56]

TEST ( atomic  ,
atomic_store_int32   
)

Definition at line 626 of file atomic_test.cc.

References atomic_store_int32(), EXPECT_EQ(), and max.

◆ TEST() [46/56]

TEST ( atomic  ,
atomic_store_int64   
)

Definition at line 330 of file atomic_test.cc.

References atomic_store_int64(), EXPECT_EQ(), and max.

◆ TEST() [47/56]

TEST ( atomic  ,
atomic_store_ptr   
)

Definition at line 1072 of file atomic_test.cc.

References atomic_store_ptr(), dest, EXPECT_EQ(), and INT_AS_PTR.

◆ TEST() [48/56]

TEST ( atomic  ,
atomic_store_uint32   
)

Definition at line 445 of file atomic_test.cc.

References atomic_store_uint32(), EXPECT_EQ(), and max.

◆ TEST() [49/56]

TEST ( atomic  ,
atomic_store_uint64   
)

Definition at line 162 of file atomic_test.cc.

References atomic_store_uint64(), EXPECT_EQ(), and max.

◆ TEST() [50/56]

TEST ( atomic  ,
atomic_store_z   
)

Definition at line 916 of file atomic_test.cc.

References atomic_store_z(), EXPECT_EQ(), and max.

◆ TEST() [51/56]

TEST ( atomic  ,
atomic_sub_and_fetch_int32   
)

Definition at line 553 of file atomic_test.cc.

References atomic_sub_and_fetch_int32(), and EXPECT_EQ().

◆ TEST() [52/56]

TEST ( atomic  ,
atomic_sub_and_fetch_int64   
)

Definition at line 207 of file atomic_test.cc.

References atomic_sub_and_fetch_int64(), and EXPECT_EQ().

◆ TEST() [53/56]

TEST ( atomic  ,
atomic_sub_and_fetch_u   
)

Definition at line 974 of file atomic_test.cc.

References atomic_sub_and_fetch_u(), EXPECT_EQ(), and max.

◆ TEST() [54/56]

TEST ( atomic  ,
atomic_sub_and_fetch_uint32   
)

Definition at line 375 of file atomic_test.cc.

References atomic_sub_and_fetch_uint32(), and EXPECT_EQ().

◆ TEST() [55/56]

TEST ( atomic  ,
atomic_sub_and_fetch_uint64   
)

Definition at line 42 of file atomic_test.cc.

References atomic_sub_and_fetch_uint64(), and EXPECT_EQ().

◆ TEST() [56/56]

TEST ( atomic  ,
atomic_sub_and_fetch_z   
)

Definition at line 828 of file atomic_test.cc.

References atomic_sub_and_fetch_z(), EXPECT_EQ(), and max.