<commit_before>// bsls_alignment.h                                                   -*-C++-*-
#ifndef INCLUDED_BSLS_ALIGNMENT
#define INCLUDED_BSLS_ALIGNMENT

#ifndef INCLUDED_BSLS_IDENT
#include <bsls_ident.h>
#endif
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide a namespace for enumerating memory alignment strategies.
//
//@CLASSES:
//  bsls::Alignment: namespace for enumerated alignment strategy values
//
//@SEE_ALSO: bsls_alignmentutil
//
//@DESCRIPTION: This component provides a namespace, 'bsls::Alignment', for
// enumerating alignment strategies, and provides a function, 'toAscii', that
// converts each of the enumerators to its corresponding string representation.
//
///Alignment Strategy
///------------------
// This component supports three alignment strategies: 1) MAXIMUM ALIGNMENT,
// 2) NATURAL ALIGNMENT, and 3) 1-BYTE ALIGNMENT.
//
//: 1 MAXIMUM ALIGNMENT: This strategy, as indicated by the enumerator
//:   'BSLS_MAXIMUM', specifies that a memory block be aligned as per the
//:   *most* restrictive alignment requirement on the host platform.
//:
//: 2 NATURAL ALIGNMENT: This strategy, as indicated by the enumerator
//:   'BSLS_NATURAL', specifies that a memory block be aligned based on the
//:   size (in bytes) of that block.  An object of a fundamental type ('int',
//:   etc.) is *naturally* *aligned* when it's size evenly divides its address.
//:   An object of an aggregate type has natural alignment if the alignment of
//:   the most-restrictively aligned sub-object evenly divides the address of
//:   the aggregate.  Natural alignment is always at least as restrictive as
//:   the compiler's required alignment.
//:
//: 3 1-BYTE ALIGNMENT: This strategy, as indicated by the enumerator
//:   'BSLS_BYTEALIGNED', specifies that a memory block may be aligned
//:   arbitrarily on any 1-byte boundary.  This is the *least* restrictive
//:   alignment requirement.
//
///Usage
///-----
// Suppose that we want to create a static function, 'allocateFromBuffer', that
// takes a buffer, the size of the buffer, a cursor indicating a position
// within the buffer, an allocation request size, and a memory alignment<commit_msg>Adopt commit 5bbe625 from master: Merge pull request #399 from jolkin/patch-1<commit_after>// bsls_alignment.h                                                   -*-C++-*-
#ifndef INCLUDED_BSLS_ALIGNMENT
#define INCLUDED_BSLS_ALIGNMENT

#ifndef INCLUDED_BSLS_IDENT
#include <bsls_ident.h>
#endif
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide a namespace for enumerating memory alignment strategies.
//
//@CLASSES:
//  bsls::Alignment: namespace for enumerated alignment strategy values
//
//@SEE_ALSO: bsls_alignmentutil
//
//@DESCRIPTION: This component provides a namespace, 'bsls::Alignment', for
// enumerating alignment strategies, and provides a function, 'toAscii', that
// converts each of the enumerators to its corresponding string representation.
//
///Alignment Strategy
///------------------
// This component supports three alignment strategies: 1) MAXIMUM ALIGNMENT,
// 2) NATURAL ALIGNMENT, and 3) 1-BYTE ALIGNMENT.
//
//: 1 MAXIMUM ALIGNMENT: This strategy, as indicated by the enumerator
//:   'BSLS_MAXIMUM', specifies that a memory block be aligned as per the
//:   *most* restrictive alignment requirement on the host platform.
//:
//: 2 NATURAL ALIGNMENT: This strategy, as indicated by the enumerator
//:   'BSLS_NATURAL', specifies that a memory block be aligned based on the
//:   size (in bytes) of that block.  An object of a fundamental type ('int',
//:   etc.) is *naturally* *aligned* when its size evenly divides its address.
//:   An object of an aggregate type has natural alignment if the alignment of
//:   the most-restrictively aligned sub-object evenly divides the address of
//:   the aggregate.  Natural alignment is always at least as restrictive as
//:   the compiler's required alignment.
//:
//: 3 1-BYTE ALIGNMENT: This strategy, as indicated by the enumerator
//:   'BSLS_BYTEALIGNED', specifies that a memory block may be aligned
//:   arbitrarily on any 1-byte boundary.  This is the *least* restrictive
//:   alignment requirement.
//
///Usage
///-----
// Suppose that we want to create a static function, 'allocateFromBuffer', that
// takes a buffer, the size of the buffer, a cursor indicating a position
// within the buffer, an allocation request size, and a memory alignment
{'fraction_non_alphanumeric': 0.10791695185945699, 'fraction_numerical': 0.00593201003878622, 'mean_word_length': 3.3535253227408144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5809423', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1185, 'n_words': 519}