Skip to content

Rose::BitOps::replicateLsb

Replicate low‐order bits to fill region without affecting other bits.

Synopsis

Declared in <src/Rose/BitOps.h>

template<typename Unsigned>
Unsigned
replicateLsb(
    Unsigned src,
    size_t w,
    size_t n);

Description

This is identical to replicate except that instead of filling the entire return value with the replicated bits, at most w low‐order bits of the return value are filled with replicated bits and the remaining high order bits are copied from src.

Return Value

Updated value.

Parameters

Name

Description

src

Input value.

w

Width of the low‐order region to fill.

n

Width of the pattern to replicate.

Created with MrDocs