qb
2.0.0.0
C++17 Actor Framework
|
Platform-specific alignment macros, cache-line definitions, and related utilities. More...
Go to the source code of this file.
Classes | |
struct | CacheLine |
A structure automatically aligned to cache line boundaries. More... | |
struct | EventBucket |
A structure aligned to event bucket boundaries, typically matching cache line size. More... |
Macros | |
#define | QB_LOCKFREE_CACHELINE_BYTES cache_line_size() |
#define | QB_LOCKFREE_EVENT_BUCKET_BYTES cache_line_size() |
Functions | |
constexpr std::size_t | cache_line_size () |
Determines the optimal cache line size for the current platform at compile time. |
Platform-specific alignment macros, cache-line definitions, and related utilities.
This file provides platform-specific macros and constants crucial for performance-sensitive code, especially in lock-free algorithms and memory-efficient data structures. It defines:
These are essential for optimizing memory layout to prevent false sharing and improve cache performance.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.