__may_alias__ Class — pytorch Architecture
Architecture documentation for the __may_alias__ class in vec256_int16_vsx.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/cpu/vec/vec256/vsx/vec256_int16_vsx.h lines 14–86
template <>
class Vectorized<int16_t> {
private:
union {
struct {
vint16 _vec0;
vint16 _vec1;
};
struct {
vbool16 _vecb0;
vbool16 _vecb1;
};
} __attribute__((__may_alias__));
public:
using value_type = int16_t;
using vec_internal_type = vint16;
using vec_internal_mask_type = vbool16;
using size_type = int;
static constexpr size_type size() {
return 16;
}
Vectorized() {}
C10_ALWAYS_INLINE Vectorized(vint16 v) : _vec0{v}, _vec1{v} {}
C10_ALWAYS_INLINE Vectorized(vbool16 vmask) : _vecb0{vmask}, _vecb1{vmask} {}
C10_ALWAYS_INLINE Vectorized(vint16 v1, vint16 v2) : _vec0{v1}, _vec1{v2} {}
C10_ALWAYS_INLINE Vectorized(vbool16 v1, vbool16 v2)
: _vecb0{v1}, _vecb1{v2} {}
C10_ALWAYS_INLINE Vectorized(int16_t scalar)
: _vec0{vec_splats(scalar)}, _vec1{vec_splats(scalar)} {}
C10_ALWAYS_INLINE Vectorized(
int16_t scalar1,
int16_t scalar2,
int16_t scalar3,
int16_t scalar4,
int16_t scalar5,
int16_t scalar6,
int16_t scalar7,
int16_t scalar8,
int16_t scalar9,
int16_t scalar10,
int16_t scalar11,
int16_t scalar12,
int16_t scalar13,
int16_t scalar14,
int16_t scalar15,
int16_t scalar16)
: _vec0{vint16{
scalar1,
scalar2,
scalar3,
scalar4,
scalar5,
scalar6,
scalar7,
scalar8}},
_vec1{vint16{
scalar9,
scalar10,
scalar11,
scalar12,
scalar13,
scalar14,
scalar15,
scalar16}} {}
C10_ALWAYS_INLINE const vec_internal_type& vec0() const {
return _vec0;
}
C10_ALWAYS_INLINE const vec_internal_type& vec1() const {
return _vec1;
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free