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 521 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 528 of file MemoryX.h.

529 {
530 T::operator =(other);
531 }

◆ Set() [2/2]

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

Allow assignment from default-aligned base type.

Definition at line 534 of file MemoryX.h.

535 {
536 T::operator =(std::move(other));
537 }

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