BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::PerformanceHint Struct Reference

#include <bsls_performancehint.h>

Static Public Member Functions

static void prefetchForReading (const void *address)
 
static void prefetchForWriting (void *address)
 
static void rarelyCalled ()
 
static BSLS_PERFORMANCEHINT_ATTRIBUTE_COLD void lowFrequency ()
 

Detailed Description

This struct provides a namespace for a suite of functions that give performance hints to the compiler or hardware.

Member Function Documentation

◆ lowFrequency()

BSLS_PERFORMANCEHINT_ATTRIBUTE_COLD void bsls::PerformanceHint::lowFrequency ( )
inlinestatic

This is an empty function that is marked with low execution frequency using pragmas. If this function is placed in a block of code inside a branch, the compiler will optimize the assembly code generated and mark the block as unlikely.

◆ prefetchForReading()

void bsls::PerformanceHint::prefetchForReading ( const void *  address)
inlinestatic

Prefetch one cache line worth of data at the specified address for reading if the compiler built-in is available (see to the component level document for limitations). Otherwise this method has no effect.

◆ prefetchForWriting()

void bsls::PerformanceHint::prefetchForWriting ( void *  address)
inlinestatic

Prefetch one cache line worth of data at the specified address for writing if the compiler built-in is available (see to the component level document for limitations). Otherwise this method has no effect.

◆ rarelyCalled()

static void bsls::PerformanceHint::rarelyCalled ( )
static

This is an empty function that is marked as rarely called using pragmas. If this function is placed in a block of code inside a branch, the compiler will optimize the assembly code generated and mark the block as unlikely. Note that this function is intentionally not inlined.


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