Changeset View
Changeset View
Standalone View
Standalone View
libs/pigment/compositeops/KoStreamedMath.h
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | |||||
117 | static inline Vc::float_v fetch_mask_8(const quint8 *data) { | 117 | static inline Vc::float_v fetch_mask_8(const quint8 *data) { | ||
118 | uint_v data_i(data); | 118 | uint_v data_i(data); | ||
119 | return Vc::simd_cast<Vc::float_v>(int_v(data_i)); | 119 | return Vc::simd_cast<Vc::float_v>(int_v(data_i)); | ||
120 | } | 120 | } | ||
121 | 121 | | |||
122 | /** | 122 | /** | ||
123 | * Get an alpha values from Vc::float_v::size() pixels 32-bit each | 123 | * Get an alpha values from Vc::float_v::size() pixels 32-bit each | ||
124 | * (4 channels, 8 bit per channel). The alpha value is considered | 124 | * (4 channels, 8 bit per channel). The alpha value is considered | ||
125 | * to be stored in the most significat byte of the pixel | 125 | * to be stored in the most significant byte of the pixel | ||
126 | * | 126 | * | ||
127 | * \p aligned controls whether the \p data is fetched using aligned | 127 | * \p aligned controls whether the \p data is fetched using aligned | ||
128 | * instruction or not. | 128 | * instruction or not. | ||
129 | * 1) Fetching aligned data with unaligned instruction | 129 | * 1) Fetching aligned data with unaligned instruction | ||
130 | * degrades performance. | 130 | * degrades performance. | ||
131 | * 2) Fetching unaligned data with aligned instruction | 131 | * 2) Fetching unaligned data with aligned instruction | ||
132 | * causes #GP (General Protection Exception) | 132 | * causes #GP (General Protection Exception) | ||
133 | */ | 133 | */ | ||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |