--- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/FineGrainSVMCAS/FineGrainSVMCAS_Kernels.cl	2015-12-02 18:29:15.569686180 +0100
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/FineGrainSVMCAS/FineGrainSVMCAS_Kernels.cl	2015-12-02 18:29:36.613019709 +0100
@@ -26,7 +26,7 @@
 	if (i != get_global_size(0)) {
 		do {			
 				list[i] = head;
-		   } while (!atomic_compare_exchange_strong((atomic_int *)&list[0], &head, i));
+		   } while (!atomic_compare_exchange_strong((global atomic_int *)&list[0], &head, i));
 		}
 }
 
@@ -40,6 +40,6 @@
 		do {
 			if (head == 0) return;
 			next = list[list[0]];
-		} while (!atomic_compare_exchange_strong ((atomic_int *)&list[0], &head, next ));
+		} while (!atomic_compare_exchange_strong ((global atomic_int *)&list[0], &head, next ));
 	}
 }
--- a/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/FineGrainSVMCAS_Kernels.cl	2015-12-02 18:29:15.569686180 +0100
+++ b/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/FineGrainSVMCAS_Kernels.cl	2015-12-02 18:29:36.613019709 +0100
@@ -26,7 +26,7 @@
 	if (i != get_global_size(0)) {
 		do {			
 				list[i] = head;
-		   } while (!atomic_compare_exchange_strong((atomic_int *)&list[0], &head, i));
+		   } while (!atomic_compare_exchange_strong((global atomic_int *)&list[0], &head, i));
 		}
 }
 
@@ -40,6 +40,6 @@
 		do {
 			if (head == 0) return;
 			next = list[list[0]];
-		} while (!atomic_compare_exchange_strong ((atomic_int *)&list[0], &head, next ));
+		} while (!atomic_compare_exchange_strong ((global atomic_int *)&list[0], &head, next ));
 	}
 }
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/CalcPie/CalcPie_Kernels.cl	2015-12-02 18:26:51.179684865 +0100
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/CalcPie/CalcPie_Kernels.cl	2015-12-02 18:27:01.906351623 +0100
@@ -24,7 +24,7 @@
 	 
   float r = sqrt((rX[i]*rX[i])+(rY[i]*rY[i]));
   if (r <= 1) 
-	atomic_fetch_add_explicit ((atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
+	atomic_fetch_add_explicit ((global atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
 }
 
 
--- a/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/CalcPie_Kernels.cl	2015-12-02 18:26:51.179684865 +0100
+++ b/AMD-APP-SDK-3.0/samples/opencl/bin/x86_64/CalcPie_Kernels.cl	2015-12-02 18:27:01.906351623 +0100
@@ -24,7 +24,7 @@
 	 
   float r = sqrt((rX[i]*rX[i])+(rY[i]*rY[i]));
   if (r <= 1) 
-	atomic_fetch_add_explicit ((atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
+	atomic_fetch_add_explicit ((global atomic_int *)inside, 1, memory_order_seq_cst, memory_scope_device);
 }
 
 
--- a/AMD-APP-SDK-3.0/include/SDKUtil/CLUtil.hpp	2015-12-02 19:19:06.119713395 +0100
+++ b/AMD-APP-SDK-3.0/include/SDKUtil/CLUtil.hpp	2015-12-02 19:22:34.209715291 +0100
@@ -749,7 +749,7 @@
 				case CL_DEVICE_TYPE_GPU :
 				{
 					//first find platform having GPU
-					platformFound = getDefaultPlatform(numPlatforms, platforms, platform, dType);
+					platformFound = getDefaultPlatform(numPlatforms, platforms, platform, CL_DEVICE_TYPE_GPU);
 					if(platformFound)
 					{
 						break;
@@ -763,7 +763,7 @@
 					//then find platform having CPU
 					if(!platformFound)
 					{
-						platformFound = getDefaultPlatform(numPlatforms, platforms, platform, dType);
+						platformFound = getDefaultPlatform(numPlatforms, platforms, platform, CL_DEVICE_TYPE_CPU);
 					}
 				} /*end of CPU case*/
 
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope_Kernels.cl	2015-12-02 18:30:59.949687140 +0100
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope_Kernels.cl	2015-12-02 18:31:07.973020545 +0100
@@ -44,7 +44,7 @@
 
 
 
- __global uchar4 program_scope_temp[512 * 512];
+__constant uchar4 program_scope_temp[512 * 512];
 
 
 __kernel 
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter.cpp	2020-09-23 14:19:55.137508386 +0300
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter.cpp	2020-09-23 14:22:33.230012800 +0300
@@ -550,8 +550,9 @@
             float gx2 = pow((float)gx, 2);
             float gy2 = pow((float)gy, 2);
 
-
-            *(verificationOutput + i) = (cl_uchar)(sqrt(gx2 + gy2) / 2.0);
+            float tmp = sqrt(gx2 + gy2) / 2.0;
+            if (tmp > 255.0f) tmp = 255.0f;
+            *(verificationOutput + i) = (cl_uchar)(tmp);
         }
 
         // if reached at the end of its row then incr k
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter_Kernels.cl	2015-10-28 05:15:19.000000000 +0200
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SobelFilter/SobelFilter_Kernels.cl	2020-09-23 14:20:31.365623958 +0300
@@ -56,10 +56,8 @@
 		Gy =   i00 - i20  + (float4)(2)*i01 - (float4)(2)*i21 + i02  -  i22;
 
 		/* taking root of sums of squares of Gx and Gy */
-		outputImage[c] = convert_uchar4(hypot(Gx, Gy)/(float4)(2));
-
+		outputImage[c] = convert_uchar4_sat(hypot(Gx, Gy)/(float4)(2));
 	}
-			
 }
 
 	
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SimpleMultiDevice/SimpleMultiDevice.cpp	2020-09-28 15:43:52.310211779 +0300
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/1.x/SimpleMultiDevice/SimpleMultiDevice.cpp	2020-09-28 15:44:37.878321556 +0300
@@ -1471,15 +1471,6 @@
     return a * b + c;
 }
 
-// OpenCL HYPOT definition for CPU
-#if (_MSC_VER != 1800)
-float hypot(float a, float b)
-{
-    return sqrt(a * a + b * b);
-}
-#endif
-
-
 int
 CPUKernel()
 {
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/BinarySearchDeviceSideEnqueue/BinarySearchDeviceSideEnqueue.cpp	2020-09-28 17:21:15.609109066 +0300
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/BinarySearchDeviceSideEnqueue/BinarySearchDeviceSideEnqueue.cpp	2020-09-28 17:21:31.497172793 +0300
@@ -273,7 +273,7 @@
         commandQueue = clCreateCommandQueueWithProperties(
                            context,
                            devices[sampleArgs->deviceId],
-                           prop,
+                           &prop,
                            &status);
         CHECK_OPENCL_ERROR( status, "clCreateCommandQueueWithProperties failed.");
     }
--- a/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope.cpp.orig	2020-09-28 17:39:33.521349498 +0300
+++ b/AMD-APP-SDK-3.0/samples/opencl/cl/2.0/RecursiveGaussian_ProgramScope/RecursiveGaussian_ProgramScope.cpp	2020-09-28 17:39:44.301390304 +0300
@@ -255,7 +255,7 @@
         commandQueue = clCreateCommandQueueWithProperties(
                            context,
                            devices[sampleArgs->deviceId],
-                           prop,
+                           &prop,
                            &status);
         CHECK_OPENCL_ERROR( status, "clCreateCommandQueue failed.");
     }
