fix build error of kernel on Mali
authorTomoaki Teshima <tomoaki.teshima@gmail.com>
Wed, 23 Sep 2020 12:38:12 +0000 (21:38 +0900)
committerTomoaki Teshima <tomoaki.teshima@gmail.com>
Wed, 23 Sep 2020 12:38:12 +0000 (21:38 +0900)
modules/dnn/src/opencl/ocl4dnn_lrn.cl

index 36d9d2ae04fd1fa7aeb57e28c67c4943af4dccac..31c9f49451a4c4ae074e47b04f9964f41fa299da 100644 (file)
@@ -83,7 +83,7 @@ __kernel void TEMPLATE(lrn_full_no_scale,Dtype)(const int nthreads, __global con
             * in_off[(head - size) * step];
       }
       scale_val = k + accum_scale * alpha_over_size;
-      out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr((Dtype)scale_val, (Dtype)negative_beta);
+      out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr(scale_val, negative_beta);
       ++head;
     }
     // subtract only
@@ -93,7 +93,7 @@ __kernel void TEMPLATE(lrn_full_no_scale,Dtype)(const int nthreads, __global con
             * in_off[(head - size) * step];
       }
       scale_val = k + accum_scale * alpha_over_size;
-      out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr((Dtype)scale_val, (Dtype)negative_beta);
+      out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr(scale_val, negative_beta);
       ++head;
     }
   }