declarator is the data that you're declaring as aligned.įor information about how to return a value of type size_t that is the alignment requirement of the type, see alignof. Valid entries are integer powers of two from 1 to 8192 (bytes), such as 2, 4, 8, 16, 32, or 64. For example, if you define a structure whose size is less than 32 bytes, you may want 32 byte alignment to make sure that objects of that structure type are efficiently cached. Additionally, by aligning frequently used data to the processor's cache line size, you improve cache performance. Many new instructions require data that's aligned to 16-byte boundaries. Writing applications that use the latest processor instructions introduces some new constraints and issues. _declspec( align( # ) ) declarator Remarks ![]() Use _declspec(align(#)) to precisely control the alignment of user-defined data (for example, static allocations or automatic data in a function). In Visual Studio 2015 and later, use the C++11 standard alignas specifier to control alignment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |