Этот коммит содержится в:
Alex Voicu
2018-06-25 17:49:50 +01:00
родитель 859133a045
Коммит 9d91b802a5
5 изменённых файлов: 646 добавлений и 208 удалений
+18 -18
Просмотреть файл
@@ -355,33 +355,33 @@ __device__ int __hip_move_dpp(int src, int dpp_ctrl, int row_mask, int bank_mask
__device__ char4 __hip_hc_add8pk(char4 in1, char4 in2) {
char4 out;
unsigned one1 = in1.a & MASK1;
unsigned one2 = in2.a & MASK1;
out.a = (one1 + one2) & MASK1;
one1 = in1.a & MASK2;
one2 = in2.a & MASK2;
out.a = out.a | ((one1 + one2) & MASK2);
unsigned one1 = in1.w & MASK1;
unsigned one2 = in2.w & MASK1;
out.w = (one1 + one2) & MASK1;
one1 = in1.w & MASK2;
one2 = in2.w & MASK2;
out.w = out.w | ((one1 + one2) & MASK2);
return out;
}
__device__ char4 __hip_hc_sub8pk(char4 in1, char4 in2) {
char4 out;
unsigned one1 = in1.a & MASK1;
unsigned one2 = in2.a & MASK1;
out.a = (one1 - one2) & MASK1;
one1 = in1.a & MASK2;
one2 = in2.a & MASK2;
out.a = out.a | ((one1 - one2) & MASK2);
unsigned one1 = in1.w & MASK1;
unsigned one2 = in2.w & MASK1;
out.w = (one1 - one2) & MASK1;
one1 = in1.w & MASK2;
one2 = in2.w & MASK2;
out.w = out.w | ((one1 - one2) & MASK2);
return out;
}
__device__ char4 __hip_hc_mul8pk(char4 in1, char4 in2) {
char4 out;
unsigned one1 = in1.a & MASK1;
unsigned one2 = in2.a & MASK1;
out.a = (one1 * one2) & MASK1;
one1 = in1.a & MASK2;
one2 = in2.a & MASK2;
out.a = out.a | ((one1 * one2) & MASK2);
unsigned one1 = in1.w & MASK1;
unsigned one2 = in2.w & MASK1;
out.w = (one1 * one2) & MASK1;
one1 = in1.w & MASK2;
one2 = in2.w & MASK2;
out.w = out.w | ((one1 * one2) & MASK2);
return out;
}