Audacity 3.2.0
Public Member Functions | List of all members
NonInterfering< T > Struct Template Reference

#include <MemoryX.h>

Inheritance diagram for NonInterfering< T >:
[legend]
Collaboration diagram for NonInterfering< T >:
[legend]

Public Member Functions

void Set (const T &other)
 Allow assignment from default-aligned base type. More...
 
void Set (T &&other)
 Allow assignment from default-aligned base type. More...
 

Detailed Description

template<typename T>
struct NonInterfering< T >

Given a structure type T, derive a structure with sufficient padding so that there is not false sharing of cache lines between successive elements of an array of those structures.

Definition at line 316 of file MemoryX.h.

Member Function Documentation

◆ Set() [1/2]

template<typename T >
void NonInterfering< T >::Set ( const T &  other)
inline

Allow assignment from default-aligned base type.

Definition at line 323 of file MemoryX.h.

324 {
325 T::operator =(other);
326 }

◆ Set() [2/2]

template<typename T >
void NonInterfering< T >::Set ( T &&  other)
inline

Allow assignment from default-aligned base type.

Definition at line 329 of file MemoryX.h.

330 {
331 T::operator =(std::move(other));
332 }

The documentation for this struct was generated from the following file: