Blender  V3.3
Functions
atomic_ops_ext.h File Reference
#include "atomic_ops_utils.h"

Go to the source code of this file.

Functions

 ATOMIC_STATIC_ASSERT (sizeof(size_t)==LG_SIZEOF_PTR, "sizeof(size_t) != LG_SIZEOF_PTR")
 
ATOMIC_INLINE size_t atomic_add_and_fetch_z (size_t *p, size_t x)
 
ATOMIC_INLINE size_t atomic_sub_and_fetch_z (size_t *p, size_t x)
 
ATOMIC_INLINE size_t atomic_fetch_and_add_z (size_t *p, size_t x)
 
ATOMIC_INLINE size_t atomic_fetch_and_sub_z (size_t *p, size_t x)
 
ATOMIC_INLINE size_t atomic_cas_z (size_t *v, size_t old, size_t _new)
 
ATOMIC_INLINE size_t atomic_load_z (const size_t *v)
 
ATOMIC_INLINE void atomic_store_z (size_t *p, size_t v)
 
ATOMIC_INLINE size_t atomic_fetch_and_update_max_z (size_t *p, size_t x)
 
 ATOMIC_STATIC_ASSERT (sizeof(unsigned int)==LG_SIZEOF_INT, "sizeof(unsigned int) != LG_SIZEOF_INT")
 
ATOMIC_INLINE unsigned int atomic_add_and_fetch_u (unsigned int *p, unsigned int x)
 
ATOMIC_INLINE unsigned int atomic_sub_and_fetch_u (unsigned int *p, unsigned int x)
 
ATOMIC_INLINE unsigned int atomic_fetch_and_add_u (unsigned int *p, unsigned int x)
 
ATOMIC_INLINE unsigned int atomic_fetch_and_sub_u (unsigned int *p, unsigned int x)
 
ATOMIC_INLINE unsigned int atomic_cas_u (unsigned int *v, unsigned int old, unsigned int _new)
 
ATOMIC_INLINE char atomic_fetch_and_or_char (char *p, char b)
 
ATOMIC_INLINE char atomic_fetch_and_and_char (char *p, char b)
 
ATOMIC_INLINE voidatomic_cas_ptr (void **v, void *old, void *_new)
 
ATOMIC_INLINE voidatomic_load_ptr (void *const *v)
 
ATOMIC_INLINE void atomic_store_ptr (void **p, void *v)
 
 ATOMIC_STATIC_ASSERT (sizeof(float)==sizeof(uint32_t), "sizeof(float) != sizeof(uint32_t)")
 
ATOMIC_INLINE float atomic_cas_float (float *v, float old, float _new)
 
ATOMIC_INLINE float atomic_add_and_fetch_fl (float *p, const float x)
 

Function Documentation

◆ atomic_add_and_fetch_fl()

ATOMIC_INLINE float atomic_add_and_fetch_fl ( float p,
const float  x 
)

Definition at line 236 of file atomic_ops_ext.h.

References _ATOMIC_UNLIKELY, atomic_cas_uint32(), and x.

Referenced by pbvh_update_normals_accum_task_cb(), and TEST().

◆ atomic_add_and_fetch_u()

ATOMIC_INLINE unsigned int atomic_add_and_fetch_u ( unsigned int *  p,
unsigned int  x 
)

◆ atomic_add_and_fetch_z()

ATOMIC_INLINE size_t atomic_add_and_fetch_z ( size_t *  p,
size_t  x 
)

◆ atomic_cas_float()

ATOMIC_INLINE float atomic_cas_float ( float v,
float  old,
float  _new 
)

Definition at line 230 of file atomic_ops_ext.h.

References atomic_cas_uint32(), ret, and v.

Referenced by add_v3_v3_atomic(), and TEST().

◆ atomic_cas_ptr()

ATOMIC_INLINE void* atomic_cas_ptr ( void **  v,
void old,
void _new 
)

◆ atomic_cas_u()

ATOMIC_INLINE unsigned int atomic_cas_u ( unsigned int *  v,
unsigned int  old,
unsigned int  _new 
)

Definition at line 175 of file atomic_ops_ext.h.

References atomic_cas_uint32(), atomic_cas_uint64(), and v.

Referenced by TEST().

◆ atomic_cas_z()

ATOMIC_INLINE size_t atomic_cas_z ( size_t *  v,
size_t  old,
size_t  _new 
)

Definition at line 96 of file atomic_ops_ext.h.

References atomic_cas_uint32(), atomic_cas_uint64(), and v.

Referenced by atomic_fetch_and_update_max_z(), and TEST().

◆ atomic_fetch_and_add_u()

ATOMIC_INLINE unsigned int atomic_fetch_and_add_u ( unsigned int *  p,
unsigned int  x 
)

Definition at line 157 of file atomic_ops_ext.h.

References atomic_fetch_and_add_uint32(), atomic_fetch_and_add_uint64(), and x.

Referenced by BLI_threadpool_init(), and TEST().

◆ atomic_fetch_and_add_z()

ATOMIC_INLINE size_t atomic_fetch_and_add_z ( size_t *  p,
size_t  x 
)

Definition at line 78 of file atomic_ops_ext.h.

References atomic_fetch_and_add_uint32(), atomic_fetch_and_add_uint64(), and x.

Referenced by store_edge(), and TEST().

◆ atomic_fetch_and_and_char()

ATOMIC_INLINE char atomic_fetch_and_and_char ( char *  p,
char  b 
)

Definition at line 191 of file atomic_ops_ext.h.

References atomic_fetch_and_and_uint8(), and usdtokens::b().

Referenced by TEST().

◆ atomic_fetch_and_or_char()

ATOMIC_INLINE char atomic_fetch_and_or_char ( char *  p,
char  b 
)

Definition at line 186 of file atomic_ops_ext.h.

References atomic_fetch_and_or_uint8(), and usdtokens::b().

Referenced by TEST().

◆ atomic_fetch_and_sub_u()

ATOMIC_INLINE unsigned int atomic_fetch_and_sub_u ( unsigned int *  p,
unsigned int  x 
)

Definition at line 166 of file atomic_ops_ext.h.

References atomic_fetch_and_add_uint32(), atomic_fetch_and_add_uint64(), and x.

Referenced by TEST().

◆ atomic_fetch_and_sub_z()

ATOMIC_INLINE size_t atomic_fetch_and_sub_z ( size_t *  p,
size_t  x 
)

Definition at line 87 of file atomic_ops_ext.h.

References atomic_fetch_and_add_uint32(), atomic_fetch_and_add_uint64(), and x.

Referenced by TEST().

◆ atomic_fetch_and_update_max_z()

ATOMIC_INLINE size_t atomic_fetch_and_update_max_z ( size_t *  p,
size_t  x 
)

Definition at line 123 of file atomic_ops_ext.h.

References atomic_cas_z(), and x.

Referenced by Stats::mem_alloc(), TEST(), and update_maximum().

◆ atomic_load_ptr()

ATOMIC_INLINE void* atomic_load_ptr ( void *const *  v)

Definition at line 208 of file atomic_ops_ext.h.

References atomic_load_uint32(), atomic_load_uint64(), and v.

Referenced by TEST().

◆ atomic_load_z()

ATOMIC_INLINE size_t atomic_load_z ( const size_t *  v)

Definition at line 105 of file atomic_ops_ext.h.

References atomic_load_uint32(), atomic_load_uint64(), and v.

Referenced by TEST().

◆ ATOMIC_STATIC_ASSERT() [1/3]

ATOMIC_STATIC_ASSERT ( sizeof(float = =sizeof(uint32_t))

◆ ATOMIC_STATIC_ASSERT() [2/3]

ATOMIC_STATIC_ASSERT ( sizeof(size_t)  = =LG_SIZEOF_PTR)

◆ ATOMIC_STATIC_ASSERT() [3/3]

ATOMIC_STATIC_ASSERT ( sizeof(unsigned int)  = =LG_SIZEOF_INT)

◆ atomic_store_ptr()

ATOMIC_INLINE void atomic_store_ptr ( void **  p,
void v 
)

Definition at line 217 of file atomic_ops_ext.h.

References atomic_store_uint32(), atomic_store_uint64(), and v.

Referenced by TEST().

◆ atomic_store_z()

ATOMIC_INLINE void atomic_store_z ( size_t *  p,
size_t  v 
)

Definition at line 114 of file atomic_ops_ext.h.

References atomic_store_uint32(), atomic_store_uint64(), and v.

Referenced by TEST().

◆ atomic_sub_and_fetch_u()

ATOMIC_INLINE unsigned int atomic_sub_and_fetch_u ( unsigned int *  p,
unsigned int  x 
)

◆ atomic_sub_and_fetch_z()

ATOMIC_INLINE size_t atomic_sub_and_fetch_z ( size_t *  p,
size_t  x 
)