FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
compiler_hints.h File Reference

Compiler-specific macros to provide performance-related hints. More...

#include <typeinfo>
#include <stdlib.h>
#include <unistd.h>
#include <cxxabi.h>
#include <string.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define NONNULL_PARAMETERS(...)   __attribute__((nonnull(__VA_ARGS__)))
 Mark parameters to a function as not permitting null pointers. More...
 
#define NONNULL_CLASS_PARAMETERS(...)   __attribute__((nonnull(__VA_ARGS__)))
 Mark a function as never returning a null pointer. More...
 
#define NONNULL_RETURN   __attribute__((returns_nonnull))
 Mark a function as never returning a null pointer. More...
 
#define OME_EXPECT(expr, expected)   __builtin_expect((expr), expected)
 Annotation macro for conditional expression to indicate expected Boolean outcome. More...
 
#define OME_PREFETCH(addr, rw, locality)   __builtin_prefetch(addr, rw, locality)
 Macro to request prefetch. More...
 
#define OME_ALWAYS_INLINE   __attribute__((always_inline))
 Tell the compiler to alway inline a function, regardless of optimization level. More...
 
#define OME_NEVER_INLINE   __attribute__((noinline))
 Tell the compiler to not inline a function, regardless of optimization level. More...
 
#define OME_ALWAYS_FLATTEN   __attribute__((flatten))
 Annotation macro to request compiler to always inline body and any called routines. More...
 
#define OME_COLD_ROUTINE   __attribute__((cold))
 Annotation macro to tell compiler a routine may never be used. More...
 
#define OME_INIT_PRIORITY(n)   __attribute__((init_priority(n)))
 Override initialization priority of a C++ variable. More...
 
#define OME_DEPRECATED   __attribute__((deprecated))
 Mark interface as deprecated. More...
 
#define OME_USAGE_WARNING(msg)   __attribute__((warning(msg)))
 Emit a warning if the element is used. More...
 
#define OME_USAGE_ERROR(msg)   __attribute__((error(msg)))
 Emit an error if the element is used. More...
 
#define OME_USED   __attribute__((used))
 Tell the compiler an element is used to prevent it from being optimized away. More...
 
#define OME_UNUSED   __attribute__((unused))
 Tell the compiler it is known that an element is not used. More...
 
#define OME_WEAK   __attribute__((weak))
 Force generation of weak symbol. More...
 
#define OME_PURE_FUNCTION   __attribute__((pure))
 Mark as an idempotent function that can access global variables. More...
 
#define OME_CONST_FUNCTION   __attribute__((const))
 Mark as an idempotent function that only accesses arguments – no global data. More...
 
#define AN_ENUM(x)   x
 Label an enum expression to avoid ambiguity. More...
 
#define OME_DEPRECATED_BECAUSE(msg)   __attribute__((deprecated(msg)))
 Mark interface as deprecated and provide reason or suggested alternative. More...
 
#define OME_ALWAYS_OPTIMIZE(level)   __attribute__((optimize(level)))
 Mark a function to be compiled with a specific level of optimization. More...
 
#define EXPLICIT_CONVERSION   explicit
 Generates explicit if the compiler supports it. More...
 
#define CONSTEXPR   constexpr
 Generates constexpr if the compiler supports it. More...
 
#define VIRTUAL_OVERRIDE   override
 Generates override if the compiler supports it. More...
 
#define NOEXCEPT_SPECIFIER   noexcept
 Generates noexcept if the compiler supports it. More...
 
#define OME_DLL_EXPORT   /* nothing */
 
#define OME_FAST_CALL   /* nothing */
 
#define OME_CORE_CALL   /* nothing */
 
#define OME_EXPECT_FALSE(expr)   OME_EXPECT(expr, false)
 Annotation macro for conditional expression expected to be false. More...
 
#define OME_EXPECT_TRUE(expr)   OME_EXPECT(expr, true)
 Annotation macro for conditional expression expected to be true. More...
 
#define OME_YIELD_THREAD()   sched_yield()
 Macro for platform-specific yield of thread's time slice. More...
 
#define USE_GCC_PREFETCH   1
 
#define MemoryBarrier()   __sync_synchronize()
 
#define CACHE_LINE_LENGTH   64
 Definition for target system's cache line length. More...
 
#define MAX_PREFETCH_REQUESTS   8
 Maximum number of prefetch requests supported by the hardware. More...
 
#define DO_PREFETCH(a)   OME_PREFETCH(a, 0, 1)
 Prefetch an address line for read. More...
 
#define OME_PREFETCH_OBJECT_VTABLE(obj, relativeFunction)
 Prefetch the v-table entry for an object. More...
 
#define safe_strcpy(d, s, l)   ((memccpy(d, s, 0, (l)) == 0) ? (*(d + (l) -1) = 0) : 1)
 Safe strcpy() routine that will not copy more than l bytes and always ensures that a null is present to mark the end of the string. More...
 
#define demangledTypeIdName(typeid_var, bfr)   demangleEncodedTypeName((typeid_var).name(), bfr, sizeof(bfr))
 Convenience macro to return the demangled type provided by a std::typeinfo value. More...
 

Functions

int prefetch_memory_block (const void *addr, const unsigned int len)
 Prefetch a memory block into the CPU's cache. More...
 
template<uint_fast8_t N>
char * do_copyShortStringUntil (char *bfr, const char *src, const char stopAt='\0', const char altStopAt='\0') OME_ALWAYS_INLINE OME_ALWAYS_FLATTEN OME_ALWAYS_OPTIMIZE("-O3") NONNULL_PARAMETERS(1
 Templated C++-only routine similar to memccpy() that is suitable for handling short strings that are being copied into buffers whose size is known at compile time. The maximum number of characters to be copied from the source is specified as the template parameter. More...
 
template<>
char * do_copyShortStringUntil< 0 > (char *bfr, const char *src, const char stopAt, const char altStopAt) OME_ALWAYS_INLINE OME_ALWAYS_FLATTEN OME_ALWAYS_OPTIMIZE("-O3") NONNULL_PARAMETERS(1
 
template<uint_fast8_t N>
char * copyShortStringUntil (char *bfr, const char *src, const char stopAt='\0', const char altStopAt='\0', const bool truncateIfNeeded=false) OME_ALWAYS_INLINE OME_ALWAYS_FLATTEN OME_ALWAYS_OPTIMIZE("-O3") NONNULL_PARAMETERS(1
 Templated C++-only variant of safe_strcpy() suitable for handling small-sized strings that are being copied into buffers whose size is known at compile time. More...
 
template<uint_fast8_t N>
uint_fast32_t copyShortStringUntilAndReturnLength (char *bfr, const char *src, const char stopAt='\0', const char altStopAt='\0', const bool truncateIfNeeded=false) OME_ALWAYS_INLINE OME_ALWAYS_FLATTEN OME_ALWAYS_OPTIMIZE("-O3") NONNULL_PARAMETERS(1
 Similar to copyShortStringUntil<>(), but returns the number of bytes before the trailing null. This would be the equivalent of strlen(bfr). More...
 
template<uint_fast8_t N>
uint_fast32_t uint_fast32_t copyShortStringUntilAndReturnLength (char *bfr, const char *src, const char stopAt, const char altStopAt, const bool truncateIfNeeded)
 
const char * demangleEncodedTypeName (const char *name, char *bfr, uint32_t bfrLen) NONNULL_PARAMETERS(1
 Demangles a C++ encoded type name into its human-readable name. More...
 
template<typename TYPENAME >
const char * demangledTypeName (char *bfr, uint32_t bfrLen)
 Templated convenience function that obtains the demangled type name of a C++ type. More...
 

Variables

char NONNULL_RETURN
 

Detailed Description

Compiler-specific macros to provide performance-related hints.

Note
This file contains compiler-specific macros to provide hints for higher-performance. Correctness should not be affected if a compiler fails to provide support for a given feature.

To generate list of predefined macros:

$(CXX) -dM -E -x c /dev/null

Macro Definition Documentation

◆ AN_ENUM

#define AN_ENUM (   x)    x

Label an enum expression to avoid ambiguity.

◆ CACHE_LINE_LENGTH

#define CACHE_LINE_LENGTH   64

Definition for target system's cache line length.

Note: Assume 64 bytes per cache line, which is appropriate for modern CPUs.

◆ CONSTEXPR

#define CONSTEXPR   constexpr

Generates constexpr if the compiler supports it.

◆ demangledTypeIdName

#define demangledTypeIdName (   typeid_var,
  bfr 
)    demangleEncodedTypeName((typeid_var).name(), bfr, sizeof(bfr))

Convenience macro to return the demangled type provided by a std::typeinfo value.

Parameters
typeid_varspecifies the std::typeinfo content, typically obtained from the typeid() operator.
bfrspecifies the output buffer into which the demangled name will be placed. It is expected to be passed as char array, not a pointer to a buffer.

No length is specified as it is taken from the sizeof(bfr).

Returns
A pointer to the demangled type name in bfr is returned.

This macro is useful in code that has no idea what it was provided.

char bfr[256];
const char *typeName = demangledEncodedTypeName(typeid(*somePointer), bfr);

◆ DO_PREFETCH

#define DO_PREFETCH (   a)    OME_PREFETCH(a, 0, 1)

Prefetch an address line for read.

Parameters
aspecifies the address line to be fetched
See also
OME_PREFETCH

◆ EXPLICIT_CONVERSION

#define EXPLICIT_CONVERSION   explicit

Generates explicit if the compiler supports it.

◆ MAX_PREFETCH_REQUESTS

#define MAX_PREFETCH_REQUESTS   8

Maximum number of prefetch requests supported by the hardware.

◆ MemoryBarrier

#define MemoryBarrier ( )    __sync_synchronize()

◆ NOEXCEPT_SPECIFIER

#define NOEXCEPT_SPECIFIER   noexcept

Generates noexcept if the compiler supports it.

◆ NONNULL_CLASS_PARAMETERS

#define NONNULL_CLASS_PARAMETERS (   ...)    __attribute__((nonnull(__VA_ARGS__)))

Mark a function as never returning a null pointer.

The arguments to this macro are a comma-separated list of integers, starting from 2, that identify the parameter positions of interest. Parameter position 1 refers to the this pointer.

See also
NONNULL_PARAMETERS

◆ NONNULL_PARAMETERS

#define NONNULL_PARAMETERS (   ...)    __attribute__((nonnull(__VA_ARGS__)))

Mark parameters to a function as not permitting null pointers.

The arguments to this macro are a comma-separated list of integers, starting from 1, that identify the parameter positions of interest.

See also
NONNULL_CLASS_PARAMETERS

◆ NONNULL_RETURN

const char NONNULL_RETURN   __attribute__((returns_nonnull))

Mark a function as never returning a null pointer.

See also
NONNULL_PARAMETERS
NONNULL_CLASS_PARAMETERS

◆ OME_ALWAYS_FLATTEN

#define OME_ALWAYS_FLATTEN   __attribute__((flatten))

Annotation macro to request compiler to always inline body and any called routines.

See also
OME_ALWAYS_INLINE

◆ OME_ALWAYS_INLINE

#define OME_ALWAYS_INLINE   __attribute__((always_inline))

Tell the compiler to alway inline a function, regardless of optimization level.

This attribute is best used with trivial routines for which it would be a waste to ever incur the overhead of a function call, even in unoptimized code.

See also
OME_ALWAYS_OPTIMIZE

◆ OME_ALWAYS_OPTIMIZE

#define OME_ALWAYS_OPTIMIZE (   level)    __attribute__((optimize(level)))

Mark a function to be compiled with a specific level of optimization.

Parameters
levelis a string that specifies the optimization level, such as "-O3".
Note
Usually this is used to force high-levels of optimization on core functions, but it can be used to reduce optimization.
See also
OME_ALWAYS_INLINE

◆ OME_COLD_ROUTINE

#define OME_COLD_ROUTINE   __attribute__((cold))

Annotation macro to tell compiler a routine may never be used.

◆ OME_CONST_FUNCTION

#define OME_CONST_FUNCTION   __attribute__((const))

Mark as an idempotent function that only accesses arguments – no global data.

This is similar to declaring a C++ function as constexpr. Few functions will qualify for this treatment.

See also
OME_PURE_FUNCTION

◆ OME_CORE_CALL

#define OME_CORE_CALL   /* nothing */

◆ OME_DEPRECATED

#define OME_DEPRECATED   __attribute__((deprecated))

Mark interface as deprecated.

Note
In general, one should use OME_DEPRECATED_BECAUSE() instead to provide an explanation as to why the function or variable has been deprecated and suggest an alternative.

◆ OME_DEPRECATED_BECAUSE

#define OME_DEPRECATED_BECAUSE (   msg)    __attribute__((deprecated(msg)))

Mark interface as deprecated and provide reason or suggested alternative.

Parameters
msgspecifies a string of informational content to be emitted with the warning message

◆ OME_DLL_EXPORT

#define OME_DLL_EXPORT   /* nothing */

◆ OME_EXPECT

#define OME_EXPECT (   expr,
  expected 
)    __builtin_expect((expr), expected)

Annotation macro for conditional expression to indicate expected Boolean outcome.

Parameters
exprspecifies the expression being evaluated
expectedis a Boolean that indicates the expected result of the expression

Useful to give the compiler a hint as to the expected outcome of an conditional expression to assist with layout of the object code.

See also
OME_EXPECT_TRUE
OME_EXPECT_FALSE

◆ OME_EXPECT_FALSE

#define OME_EXPECT_FALSE (   expr)    OME_EXPECT(expr, false)

Annotation macro for conditional expression expected to be false.

Parameters
exprspecifies the expression being evaluated

◆ OME_EXPECT_TRUE

#define OME_EXPECT_TRUE (   expr)    OME_EXPECT(expr, true)

Annotation macro for conditional expression expected to be true.

Parameters
exprspecifies the expression being evaluated

◆ OME_FAST_CALL

#define OME_FAST_CALL   /* nothing */

◆ OME_INIT_PRIORITY

#define OME_INIT_PRIORITY (   n)    __attribute__((init_priority(n)))

Override initialization priority of a C++ variable.

Parameters
nspecifies the priority; lower values have higher priority.

◆ OME_NEVER_INLINE

#define OME_NEVER_INLINE   __attribute__((noinline))

Tell the compiler to not inline a function, regardless of optimization level.

This attribute is best used with routines for which there should be a single implementation.

◆ OME_PREFETCH

#define OME_PREFETCH (   addr,
  rw,
  locality 
)    __builtin_prefetch(addr, rw, locality)

Macro to request prefetch.

Parameters
addris the address of the memory block
rwis 0 for read-only, 1 for to be updated
localityis an integer value 0 to 3, where 0 means no further use and 3 for retain if at all possible.

◆ OME_PREFETCH_OBJECT_VTABLE

#define OME_PREFETCH_OBJECT_VTABLE (   obj,
  relativeFunction 
)
Value:
do { /* open scope */ \
unsigned char ***vTablePtr = (unsigned char ***) (obj); /* get hidden v-table pointer */ \
unsigned char **vTableBase = *vTablePtr; /* read v-table pointer */ \
unsigned char **funcPtrAddr = vTableBase + relativeFunction; \
OME_PREFETCH(funcPtrAddr, 0, 3); /* read-only, retain */ \
} while (0)

Prefetch the v-table entry for an object.

Parameters
objis the pointer to the object.
relativeFunctionis an integer corresponding to the relative index of the virtual function associated with the class.

Sometimes the easiest mechanism to determine the relativeFunction value is by disassembling the source. An alternative would be to scan the v-table for the function of interest to derive the relative index.

Note
While the value of the v-table pointer will be identical among all of an object's peers, the v-table pointer itself will be local to each object that has virtual functions. Prefetching the object pointer itself should be sufficient to obtain the v-table pointer, but it does not perform the needed indirection.
See also
DO_PREFETCH

◆ OME_PURE_FUNCTION

#define OME_PURE_FUNCTION   __attribute__((pure))

Mark as an idempotent function that can access global variables.

For a given set of argument values, the function must always return the same value. It may access data other than that provided by the arguments, such as looking up an entry in table, but the external data cannot have a variable influence on the result to be returned. The intent is to indicate to the compiler when a single call to the routine can be made; this is used for common sub-expression elimination and potentially hoisting a call out of a loop body.

Warning
A common mistake is to declare as pure a function that takes an argument which is a pointer to a memory address that remains constant but the pointed-at content changes between calls. A good example would be an input buffer: the buffer address does not change, but new content read from disk, the network or the keyboard does alter the contents of the buffer. The function is not idempotent because the result varies depending on the contents of the pointed-at buffer.

◆ OME_UNUSED

#define OME_UNUSED   __attribute__((unused))

Tell the compiler it is known that an element is not used.

This rarely used attribute is intended to silence compiler complaints.

◆ OME_USAGE_ERROR

#define OME_USAGE_ERROR (   msg)    __attribute__((error(msg)))

Emit an error if the element is used.

Parameters
msgspecifies a string of informational content to be emitted with the error message
See also
OME_USAGE_WARNING

◆ OME_USAGE_WARNING

#define OME_USAGE_WARNING (   msg)    __attribute__((warning(msg)))

Emit a warning if the element is used.

Parameters
msgspecifies a string of informational content to be emitted with the warning message
See also
OME_USAGE_ERROR

◆ OME_USED

#define OME_USED   __attribute__((used))

Tell the compiler an element is used to prevent it from being optimized away.

◆ OME_WEAK

#define OME_WEAK   __attribute__((weak))

Force generation of weak symbol.

◆ OME_YIELD_THREAD

#define OME_YIELD_THREAD ( )    sched_yield()

Macro for platform-specific yield of thread's time slice.

◆ safe_strcpy

#define safe_strcpy (   d,
  s,
  l 
)    ((memccpy(d, s, 0, (l)) == 0) ? (*(d + (l) -1) = 0) : 1)

Safe strcpy() routine that will not copy more than l bytes and always ensures that a null is present to mark the end of the string.

Parameters
dspeciries the destination to which the string will be copied
sspecifies the source of the string content
lspecifies the length of the destination
Return values
0indicates the string had to be truncated
1indicates the string was copied in its entirety.

◆ USE_GCC_PREFETCH

#define USE_GCC_PREFETCH   1

◆ VIRTUAL_OVERRIDE

#define VIRTUAL_OVERRIDE   override

Generates override if the compiler supports it.

Function Documentation

◆ copyShortStringUntil()

template<uint_fast8_t N>
char * copyShortStringUntil ( char *  bfr,
const char *  src,
const char  stopAt = '\0',
const char  altStopAt = '\0',
const bool  truncateIfNeeded = false 
)
inline

Templated C++-only variant of safe_strcpy() suitable for handling small-sized strings that are being copied into buffers whose size is known at compile time.

When used as intended and inlined, the tail recursion will be flattened into a sequence of test and jumps and register pressure will be reduced.

  • N is the template parameter that specifies the maximum number of bytes that can be taken from the source buffer.
    Parameters
    bfrpoints to the output buffer. The output buffer must be at least N bytes long. If truncateIfNeeded is false, then the output buffer must be at least N + 1 bytes long to hold the null marker.
    srcpoints to the source buffer.
    stopAtspecifies a character that marks the end of the source string. It defaults to the null character.
    altStopAtspecifies an alternate character that can be tested as a stop character. It defaults to the null character.
    truncateIfNeededis a Boolean that indicates if the destination buffer only has N characters and N characters were copied from the source, then the last character must be replaced by a null. This is not an issue if the destination buffer can hold at least N + 1 characters.
    Returns
    Always returns the start of the output buffer.

◆ copyShortStringUntilAndReturnLength() [1/2]

template<uint_fast8_t N>
uint_fast32_t uint_fast32_t copyShortStringUntilAndReturnLength ( char *  bfr,
const char *  src,
const char  stopAt,
const char  altStopAt,
const bool  truncateIfNeeded 
)
inline

◆ copyShortStringUntilAndReturnLength() [2/2]

template<uint_fast8_t N>
uint_fast32_t copyShortStringUntilAndReturnLength ( char *  bfr,
const char *  src,
const char  stopAt = '\0',
const char  altStopAt = '\0',
const bool  truncateIfNeeded = false 
)

Similar to copyShortStringUntil<>(), but returns the number of bytes before the trailing null. This would be the equivalent of strlen(bfr).

  • N is the template parameter that specifies the maximum number of bytes that can be taken from the source buffer.
    Parameters
    bfrpoints to the output buffer. The output buffer must be at least N bytes long. If truncateIfNeeded is false, then the output buffer must be at least N + 1 bytes long to hold the null marker.
    srcpoints to the source buffer.
    stopAtspecifies a character that marks the end of the source string. It defaults to the null character.
    altStopAtspecifies an alternate character that can be tested as a stop character. It defaults to the null character.
    truncateIfNeededis a Boolean that indicates if the destination buffer only has N characters and N characters were copied from the source, then the last character must be replaced by a null. This is not an issue if the destination buffer can hold at least N + 1 characters.
    Returns
    The length of the copied string is returned. The value is the equivalent of strlen(bfr). Performance-senstive applications can use this to avoid the need to make a strlen() call of their own.

◆ demangledTypeName()

template<typename TYPENAME >
const char* demangledTypeName ( char *  bfr,
uint32_t  bfrLen 
)
inline

Templated convenience function that obtains the demangled type name of a C++ type.

  • TYPENAME is the template parameter that specifies the type.
    Parameters
    bfrpoints to an output buffer into which the demangled name will be placed.
    bfrLenspecifies the length of the output buffer.
    Returns
    A pointer to the demangled type name in bfr is returned.
    Most usage scenarios find this routine to be the easiest to use when the type is known, such as via an incoming template argument. A buffer is created to hold the demangled name and the type of interest is used the template parameter:
    char bfr[256];
    char *typeName = demangledTypeName<uint64_t>(bfr, sizeof(bfr));

References demangleEncodedTypeName().

◆ demangleEncodedTypeName()

const char * demangleEncodedTypeName ( const char *  name,
char *  bfr,
uint32_t  bfrLen 
)
inline

Demangles a C++ encoded type name into its human-readable name.

Parameters
namespecifies the encoded type name.
bfrpoints to an output buffer into which the demangled name will be placed.
bfrLenspecifies the length of the output buffer.
Returns
A pointer to the demangled type name in bfr is returned.

References free(), and safe_strcpy.

Referenced by demangledTypeName().

◆ do_copyShortStringUntil()

template<uint_fast8_t N>
char * do_copyShortStringUntil ( char *  bfr,
const char *  src,
const char  stopAt = '\0',
const char  altStopAt = '\0' 
)
inline

Templated C++-only routine similar to memccpy() that is suitable for handling short strings that are being copied into buffers whose size is known at compile time. The maximum number of characters to be copied from the source is specified as the template parameter.

When used as intended, the tail recursion will be flattened into a sequence of test and jumps and register pressure will be reduced. The number of instructions generated will be proportional to the length of the string. On hardware that supports a load-from-immediate-offset, no register is needed to traverse the length of the string, nor do the pointers to the source and destination need to be modified.

  • N is the template parameter that specifies the maximum number of bytes that can be copied from the source buffer.
Parameters
bfrpoints to the output buffer.
srcpoints to the source buffer.
stopAtspecifies a character that marks the end of the source string. It defaults to the null character.
altStopAtspecifies an alternate character that can be tested as a stop character in addition to a null. The default is a null character. If both stopAt and altStopAt are the same character, the redundant test will be optimized away at compile-time.
Note
If the string is only terminated by something other than a null character, specify the same stop character for both stopAt and altStopAt to remove the unneeded/undesired test for a null character. When there is only a 1-bit difference between the two values, the optimizer can reduce this to a single test against the other bits. One common scenario that fits this pattern is an ASCII space (0x20) and a null: the resulting test is against 0xdf.
Returns
A pointer to the end of the destination buffer is returned; this will be 1 byte past last character that was copied. The end of the buffer might be less than bfr + N if any of the stop characters were seen.

No trailing null or stop character is added to mark the end of the string. See copyShortStringUntil<>() for a routine which enforces returning a null-terminated string.

References OME_EXPECT.

◆ do_copyShortStringUntil< 0 >()

template<>
char * do_copyShortStringUntil< 0 > ( char *  bfr,
const char *  src,
const char  stopAt,
const char  altStopAt 
)
inline

◆ prefetch_memory_block()

int prefetch_memory_block ( const void *  addr,
const unsigned int  len 
)
inline

Prefetch a memory block into the CPU's cache.

Parameters
addrpoints to the base of the memory block
lenis the number of bytes in the block

Note: the AMD Opteron/Athlon's have 64-byte cache lines and can perform a maximum of 8 outstanding prefetch requests. These CPU-specific attributes are represented by the use of the CACHE_LINE_LENGTH and MAX_PREFETCH_REQUESTS. With their normal values, a maximum amount of 64 * 8 = 512 bytes can be prefetched by this call.

Returns
The return value is undefined and logically this routine should be thought of as being of type void. If compiler-specific directives are used to perform the prefetching, then a constant value of zero is returned; otherwise the return value is derived from words used to trigger the reads of various cache lines.

References CACHE_LINE_LENGTH, CACHE_LINE_LENGTH_IN_WORDS, DO_PREFETCH, and MAX_PREFETCH_REQUESTS.

Variable Documentation

◆ NONNULL_RETURN

const char NONNULL_RETURN
Generated: Tue Jul 28 2020 16:03:26
Support Information