From 5190441dfd9cbae8b1f57f9757495327cb91123d Mon Sep 17 00:00:00 2001
From: philsmd <921533+philsmd@users.noreply.github.com>
Date: Mon, 18 May 2020 10:37:58 +0200
Subject: [PATCH] -m 21000 = BitShares fix for different vector width

---
 OpenCL/m21000_a3-pure.cl | 64 ++++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/OpenCL/m21000_a3-pure.cl b/OpenCL/m21000_a3-pure.cl
index 87c56c54f..4fd40a511 100644
--- a/OpenCL/m21000_a3-pure.cl
+++ b/OpenCL/m21000_a3-pure.cl
@@ -66,22 +66,22 @@ KERNEL_FQ void m21000_mxx (KERN_ATTR_VECTOR ())
 
     u32x final[32] = { 0 };
 
-    final[ 0] = h32_from_64_S (ctx0.h[0]);
-    final[ 1] = l32_from_64_S (ctx0.h[0]);
-    final[ 2] = h32_from_64_S (ctx0.h[1]);
-    final[ 3] = l32_from_64_S (ctx0.h[1]);
-    final[ 4] = h32_from_64_S (ctx0.h[2]);
-    final[ 5] = l32_from_64_S (ctx0.h[2]);
-    final[ 6] = h32_from_64_S (ctx0.h[3]);
-    final[ 7] = l32_from_64_S (ctx0.h[3]);
-    final[ 8] = h32_from_64_S (ctx0.h[4]);
-    final[ 9] = l32_from_64_S (ctx0.h[4]);
-    final[10] = h32_from_64_S (ctx0.h[5]);
-    final[11] = l32_from_64_S (ctx0.h[5]);
-    final[12] = h32_from_64_S (ctx0.h[6]);
-    final[13] = l32_from_64_S (ctx0.h[6]);
-    final[14] = h32_from_64_S (ctx0.h[7]);
-    final[15] = l32_from_64_S (ctx0.h[7]);
+    final[ 0] = h32_from_64 (ctx0.h[0]);
+    final[ 1] = l32_from_64 (ctx0.h[0]);
+    final[ 2] = h32_from_64 (ctx0.h[1]);
+    final[ 3] = l32_from_64 (ctx0.h[1]);
+    final[ 4] = h32_from_64 (ctx0.h[2]);
+    final[ 5] = l32_from_64 (ctx0.h[2]);
+    final[ 6] = h32_from_64 (ctx0.h[3]);
+    final[ 7] = l32_from_64 (ctx0.h[3]);
+    final[ 8] = h32_from_64 (ctx0.h[4]);
+    final[ 9] = l32_from_64 (ctx0.h[4]);
+    final[10] = h32_from_64 (ctx0.h[5]);
+    final[11] = l32_from_64 (ctx0.h[5]);
+    final[12] = h32_from_64 (ctx0.h[6]);
+    final[13] = l32_from_64 (ctx0.h[6]);
+    final[14] = h32_from_64 (ctx0.h[7]);
+    final[15] = l32_from_64 (ctx0.h[7]);
 
     sha512_update_vector (&ctx, final, 64);
 
@@ -160,22 +160,22 @@ KERNEL_FQ void m21000_sxx (KERN_ATTR_VECTOR ())
 
     u32x final[32] = { 0 };
 
-    final[ 0] = h32_from_64_S (ctx0.h[0]);
-    final[ 1] = l32_from_64_S (ctx0.h[0]);
-    final[ 2] = h32_from_64_S (ctx0.h[1]);
-    final[ 3] = l32_from_64_S (ctx0.h[1]);
-    final[ 4] = h32_from_64_S (ctx0.h[2]);
-    final[ 5] = l32_from_64_S (ctx0.h[2]);
-    final[ 6] = h32_from_64_S (ctx0.h[3]);
-    final[ 7] = l32_from_64_S (ctx0.h[3]);
-    final[ 8] = h32_from_64_S (ctx0.h[4]);
-    final[ 9] = l32_from_64_S (ctx0.h[4]);
-    final[10] = h32_from_64_S (ctx0.h[5]);
-    final[11] = l32_from_64_S (ctx0.h[5]);
-    final[12] = h32_from_64_S (ctx0.h[6]);
-    final[13] = l32_from_64_S (ctx0.h[6]);
-    final[14] = h32_from_64_S (ctx0.h[7]);
-    final[15] = l32_from_64_S (ctx0.h[7]);
+    final[ 0] = h32_from_64 (ctx0.h[0]);
+    final[ 1] = l32_from_64 (ctx0.h[0]);
+    final[ 2] = h32_from_64 (ctx0.h[1]);
+    final[ 3] = l32_from_64 (ctx0.h[1]);
+    final[ 4] = h32_from_64 (ctx0.h[2]);
+    final[ 5] = l32_from_64 (ctx0.h[2]);
+    final[ 6] = h32_from_64 (ctx0.h[3]);
+    final[ 7] = l32_from_64 (ctx0.h[3]);
+    final[ 8] = h32_from_64 (ctx0.h[4]);
+    final[ 9] = l32_from_64 (ctx0.h[4]);
+    final[10] = h32_from_64 (ctx0.h[5]);
+    final[11] = l32_from_64 (ctx0.h[5]);
+    final[12] = h32_from_64 (ctx0.h[6]);
+    final[13] = l32_from_64 (ctx0.h[6]);
+    final[14] = h32_from_64 (ctx0.h[7]);
+    final[15] = l32_from_64 (ctx0.h[7]);
 
     sha512_update_vector (&ctx, final, 64);