MLIR  20.0.0git
Static Public Member Functions | List of all members
mlir::x86vector::MaskHelper Struct Reference

Helper class to factor out the creation and extraction of masks from nibs. More...

#include "mlir/Dialect/X86Vector/Transforms.h"

Static Public Member Functions

template<uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5, uint8_t b6, uint8_t b7>
static uint8_t blend ()
 b0 captures the lowest bit, b7 captures the highest bit. More...
 
static void extractBlend (uint8_t mask, uint8_t &b0, uint8_t &b1, uint8_t &b2, uint8_t &b3, uint8_t &b4, uint8_t &b5, uint8_t &b6, uint8_t &b7)
 b0 captures the lowest bit, b7 captures the highest bit. More...
 
template<unsigned b67, unsigned b45, unsigned b23, unsigned b01>
static uint8_t shuffle ()
 b01 captures the lower 2 bits, b67 captures the higher 2 bits. More...
 
static void extractShuffle (uint8_t mask, uint8_t &b01, uint8_t &b23, uint8_t &b45, uint8_t &b67)
 b01 captures the lower 2 bits, b67 captures the higher 2 bits. More...
 
template<unsigned b47, unsigned b03>
static uint8_t permute ()
 b03 captures the lower 4 bits, b47 captures the higher 4 bits. More...
 
static void extractPermute (uint8_t mask, uint8_t &b03, uint8_t &b47)
 b03 captures the lower 4 bits, b47 captures the higher 4 bits. More...
 

Detailed Description

Helper class to factor out the creation and extraction of masks from nibs.

Definition at line 24 of file Transforms.h.

Member Function Documentation

◆ blend()

template<uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5, uint8_t b6, uint8_t b7>
static uint8_t mlir::x86vector::MaskHelper::blend ( )
inlinestatic

b0 captures the lowest bit, b7 captures the highest bit.

Meant to be used with instructions such as mm256BlendPs.

Definition at line 29 of file Transforms.h.

◆ extractBlend()

static void mlir::x86vector::MaskHelper::extractBlend ( uint8_t  mask,
uint8_t &  b0,
uint8_t &  b1,
uint8_t &  b2,
uint8_t &  b3,
uint8_t &  b4,
uint8_t &  b5,
uint8_t &  b6,
uint8_t &  b7 
)
inlinestatic

b0 captures the lowest bit, b7 captures the highest bit.

Meant to be used with instructions such as mm256BlendPs.

Definition at line 37 of file Transforms.h.

◆ extractPermute()

static void mlir::x86vector::MaskHelper::extractPermute ( uint8_t  mask,
uint8_t &  b03,
uint8_t &  b47 
)
inlinestatic

b03 captures the lower 4 bits, b47 captures the higher 4 bits.

Definition at line 76 of file Transforms.h.

◆ extractShuffle()

static void mlir::x86vector::MaskHelper::extractShuffle ( uint8_t  mask,
uint8_t &  b01,
uint8_t &  b23,
uint8_t &  b45,
uint8_t &  b67 
)
inlinestatic

b01 captures the lower 2 bits, b67 captures the higher 2 bits.

Definition at line 60 of file Transforms.h.

◆ permute()

template<unsigned b47, unsigned b03>
static uint8_t mlir::x86vector::MaskHelper::permute ( )
inlinestatic

b03 captures the lower 4 bits, b47 captures the higher 4 bits.

Meant to be used with instructions such as mm256Permute2f128Ps.

Definition at line 70 of file Transforms.h.

◆ shuffle()

template<unsigned b67, unsigned b45, unsigned b23, unsigned b01>
static uint8_t mlir::x86vector::MaskHelper::shuffle ( )
inlinestatic

b01 captures the lower 2 bits, b67 captures the higher 2 bits.

Meant to be used with instructions such as mm256ShufflePs.

Definition at line 52 of file Transforms.h.


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