[arrayfire] 266/408: Using pre-defined constants for workgroup sizes in CUDA SIFT

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 079f4dfbd7693e8441f347d06e324aa7eb0b3e37
Author: Peter Andreas Entschev <peter at arrayfire.com>
Date:   Fri Aug 14 14:26:10 2015 -0400

    Using pre-defined constants for workgroup sizes in CUDA SIFT
---
 src/backend/cuda/kernel/sift.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/cuda/kernel/sift.hpp b/src/backend/cuda/kernel/sift.hpp
index 397cc0e..d1bb984 100644
--- a/src/backend/cuda/kernel/sift.hpp
+++ b/src/backend/cuda/kernel/sift.hpp
@@ -1202,7 +1202,7 @@ void sift(unsigned* out_feat,
         float* d_nodup_response = memAlloc<float>(interp_feat);
         float* d_nodup_size = memAlloc<float>(interp_feat);
 
-        threads = dim3(256, 1);
+        threads = dim3(SIFT_THREADS, 1);
         blocks = dim3(divup(interp_feat, threads.x), 1);
 
         CUDA_LAUNCH((removeDuplicates), blocks, threads,
@@ -1235,7 +1235,7 @@ void sift(unsigned* out_feat,
         float* d_oriented_size = memAlloc<float>(max_oriented_feat);
         float* d_oriented_ori = memAlloc<float>(max_oriented_feat);
 
-        threads = dim3(32, 8);
+        threads = dim3(SIFT_THREADS_X, SIFT_THREADS_Y);
         blocks = dim3(1, divup(nodup_feat, threads.y));
 
         const size_t ori_shared_size = ORI_HIST_BINS * threads.y * 2 * sizeof(float);
@@ -1273,7 +1273,7 @@ void sift(unsigned* out_feat,
         float scale = 1.f/(1 << i);
         if (double_input) scale *= 2.f;
 
-        threads = dim3(256, 1);
+        threads = dim3(SIFT_THREADS, 1);
         blocks  = dim3(1, divup(oriented_feat, threads.y));
 
         const unsigned histsz = 8;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list