__may_alias__ Class — pytorch Architecture
Architecture documentation for the __may_alias__ class in vec256_int32_vsx.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/cpu/vec/vec256/vsx/vec256_int32_vsx.h lines 14–61
template <>
class Vectorized<int32_t> {
private:
union {
struct {
vint32 _vec0;
vint32 _vec1;
};
struct {
vbool32 _vecb0;
vbool32 _vecb1;
};
} __attribute__((__may_alias__));
public:
using value_type = int32_t;
using vec_internal_type = vint32;
using vec_internal_mask_type = vbool32;
using size_type = int;
static constexpr size_type size() {
return 8;
}
Vectorized() {}
C10_ALWAYS_INLINE Vectorized(vint32 v) : _vec0{v}, _vec1{v} {}
C10_ALWAYS_INLINE Vectorized(vbool32 vmask) : _vecb0{vmask}, _vecb1{vmask} {}
C10_ALWAYS_INLINE Vectorized(vint32 v1, vint32 v2) : _vec0{v1}, _vec1{v2} {}
C10_ALWAYS_INLINE Vectorized(vbool32 v1, vbool32 v2)
: _vecb0{v1}, _vecb1{v2} {}
C10_ALWAYS_INLINE Vectorized(int32_t scalar)
: _vec0{vec_splats(scalar)}, _vec1{vec_splats(scalar)} {}
C10_ALWAYS_INLINE Vectorized(
int32_t scalar1,
int32_t scalar2,
int32_t scalar3,
int32_t scalar4,
int32_t scalar5,
int32_t scalar6,
int32_t scalar7,
int32_t scalar8)
: _vec0{vint32{scalar1, scalar2, scalar3, scalar4}},
_vec1{vint32{scalar5, scalar6, scalar7, scalar8}} {}
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