Blender V4.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 1048 of file atomic_test.cc.

Referenced by TEST(), TEST(), and TEST().

Function Documentation

◆ TEST() [1/56]

TEST ( atomic ,
atomic_add_and_fetch_fl  )

Definition at line 1095 of file atomic_test.cc.

References atomic_add_and_fetch_fl().

◆ TEST() [2/56]

TEST ( atomic ,
atomic_add_and_fetch_int32  )

Definition at line 528 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 182 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 952 of file atomic_test.cc.

References atomic_add_and_fetch_u(), and EXPECT_EQ().

◆ TEST() [5/56]

TEST ( atomic ,
atomic_add_and_fetch_uint32  )

Definition at line 350 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 17 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 806 of file atomic_test.cc.

References atomic_add_and_fetch_z(), and EXPECT_EQ().

◆ TEST() [8/56]

TEST ( atomic ,
atomic_cas_float  )

Definition at line 1086 of file atomic_test.cc.

References atomic_cas_float(), and EXPECT_EQ().

◆ TEST() [9/56]

TEST ( atomic ,
atomic_cas_int32  )

Definition at line 576 of file atomic_test.cc.

References atomic_cas_int32(), and EXPECT_EQ().

◆ TEST() [10/56]

TEST ( atomic ,
atomic_cas_int64  )

Definition at line 278 of file atomic_test.cc.

References atomic_cas_int64(), and EXPECT_EQ().

◆ TEST() [11/56]

TEST ( atomic ,
atomic_cas_ptr  )

Definition at line 1050 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 1024 of file atomic_test.cc.

References atomic_cas_u(), and EXPECT_EQ().

◆ TEST() [13/56]

TEST ( atomic ,
atomic_cas_uint32  )

Definition at line 398 of file atomic_test.cc.

References atomic_cas_uint32(), and EXPECT_EQ().

◆ TEST() [14/56]

TEST ( atomic ,
atomic_cas_uint64  )

Definition at line 113 of file atomic_test.cc.

References atomic_cas_uint64(), and EXPECT_EQ().

◆ TEST() [15/56]

TEST ( atomic ,
atomic_cas_z  )

Definition at line 878 of file atomic_test.cc.

References atomic_cas_z(), and EXPECT_EQ().

◆ TEST() [16/56]

TEST ( atomic ,
atomic_fetch_and_add_int32  )

Definition at line 640 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 230 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 988 of file atomic_test.cc.

References atomic_fetch_and_add_u(), and EXPECT_EQ().

◆ TEST() [19/56]

TEST ( atomic ,
atomic_fetch_and_add_uint32  )

Definition at line 459 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 65 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 842 of file atomic_test.cc.

References atomic_fetch_and_add_z(), and EXPECT_EQ().

◆ TEST() [22/56]

TEST ( atomic ,
atomic_fetch_and_and_char  )

Definition at line 791 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 714 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 678 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 767 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 501 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 744 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 782 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 699 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 661 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 758 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 480 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 735 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 251 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 1006 of file atomic_test.cc.

References atomic_fetch_and_sub_u(), and EXPECT_EQ().

◆ TEST() [36/56]

TEST ( atomic ,
atomic_fetch_and_sub_uint64  )

Definition at line 86 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 860 of file atomic_test.cc.

References atomic_fetch_and_sub_z(), and EXPECT_EQ().

◆ TEST() [38/56]

TEST ( atomic ,
atomic_fetch_and_update_max_z  )

Definition at line 930 of file atomic_test.cc.

References atomic_fetch_and_update_max_z(), and EXPECT_EQ().

◆ TEST() [39/56]

TEST ( atomic ,
atomic_load_int32  )

Definition at line 606 of file atomic_test.cc.

References atomic_load_int32(), and EXPECT_EQ().

◆ TEST() [40/56]

TEST ( atomic ,
atomic_load_int64  )

Definition at line 310 of file atomic_test.cc.

References atomic_load_int64(), and EXPECT_EQ().

◆ TEST() [41/56]

TEST ( atomic ,
atomic_load_ptr  )

Definition at line 1059 of file atomic_test.cc.

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

◆ TEST() [42/56]

TEST ( atomic ,
atomic_load_uint32  )

Definition at line 425 of file atomic_test.cc.

References atomic_load_uint32(), and EXPECT_EQ().

◆ TEST() [43/56]

TEST ( atomic ,
atomic_load_uint64  )

Definition at line 142 of file atomic_test.cc.

References atomic_load_uint64(), and EXPECT_EQ().

◆ TEST() [44/56]

TEST ( atomic ,
atomic_load_z  )

Definition at line 896 of file atomic_test.cc.

References atomic_load_z(), and EXPECT_EQ().

◆ TEST() [45/56]

TEST ( atomic ,
atomic_store_int32  )

Definition at line 622 of file atomic_test.cc.

References atomic_store_int32(), and EXPECT_EQ().

◆ TEST() [46/56]

TEST ( atomic ,
atomic_store_int64  )

Definition at line 326 of file atomic_test.cc.

References atomic_store_int64(), and EXPECT_EQ().

◆ TEST() [47/56]

TEST ( atomic ,
atomic_store_ptr  )

Definition at line 1068 of file atomic_test.cc.

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

◆ TEST() [48/56]

TEST ( atomic ,
atomic_store_uint32  )

Definition at line 441 of file atomic_test.cc.

References atomic_store_uint32(), and EXPECT_EQ().

◆ TEST() [49/56]

TEST ( atomic ,
atomic_store_uint64  )

Definition at line 158 of file atomic_test.cc.

References atomic_store_uint64(), and EXPECT_EQ().

◆ TEST() [50/56]

TEST ( atomic ,
atomic_store_z  )

Definition at line 912 of file atomic_test.cc.

References atomic_store_z(), and EXPECT_EQ().

◆ TEST() [51/56]

TEST ( atomic ,
atomic_sub_and_fetch_int32  )

Definition at line 549 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 203 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 970 of file atomic_test.cc.

References atomic_sub_and_fetch_u(), and EXPECT_EQ().

◆ TEST() [54/56]

TEST ( atomic ,
atomic_sub_and_fetch_uint32  )

Definition at line 371 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 38 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 824 of file atomic_test.cc.

References atomic_sub_and_fetch_z(), and EXPECT_EQ().