[arrayfire] 336/408: Remove unused opencl/kernel/set files

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:24 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 d0e1e7b1ead38339f475c23cc93ba63424af9b25
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Mon Aug 24 18:02:01 2015 -0400

    Remove unused opencl/kernel/set files
---
 src/backend/opencl/kernel/set.cl  | 20 ------------
 src/backend/opencl/kernel/set.hpp | 67 ---------------------------------------
 2 files changed, 87 deletions(-)

diff --git a/src/backend/opencl/kernel/set.cl b/src/backend/opencl/kernel/set.cl
deleted file mode 100644
index c5e43e5..0000000
--- a/src/backend/opencl/kernel/set.cl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************
- * Copyright (c) 2014, ArrayFire
- * All rights reserved.
- *
- * This file is distributed under 3-clause BSD license.
- * The complete license agreement can be obtained at:
- * http://arrayfire.com/licenses/BSD-3-Clause
- ********************************************************/
-
-kernel
-void
-set(    global  T*      ptr,
-                T       val,
-        const   unsigned long  elements)
-{
-    if(get_global_id(0) < elements) {
-        ptr[get_global_id(0)] = val;
-    }
-}
-
diff --git a/src/backend/opencl/kernel/set.hpp b/src/backend/opencl/kernel/set.hpp
deleted file mode 100644
index c5a8b50..0000000
--- a/src/backend/opencl/kernel/set.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************
- * Copyright (c) 2014, ArrayFire
- * All rights reserved.
- *
- * This file is distributed under 3-clause BSD license.
- * The complete license agreement can be obtained at:
- * http://arrayfire.com/licenses/BSD-3-Clause
- ********************************************************/
-
-#include <platform.hpp>
-#include <kernel_headers/set.hpp>
-#include <traits.hpp>
-#include <mutex>
-#include <map>
-#include <backend.hpp>
-
-using cl::Buffer;
-using cl::Program;
-using cl::Kernel;
-using cl::make_kernel;
-using cl::EnqueueArgs;
-using cl::NDRange;
-using std::string;
-
-namespace opencl {
-namespace kernel {
-
-//TODO: Build only once for each instance of a kernel.  NOTE: Static objects in
-//      different instances of templates are the same.
-template<typename T>
-void
-set(Buffer &ptr, T val, const size_t &elements)
-{
-    try {
-        static std::once_flag compileFlags[DeviceManager::MAX_DEVICES];
-        static std::map<int, Program*>   setProgs;
-        static std::map<int, Kernel *> setKernels;
-
-        int device = getActiveDeviceId();
-
-        std::call_once( compileFlags[device], [device] () {
-                    Program::Sources setSrc;
-                    setSrc.emplace_back(set_cl, set_cl_len);
-
-                    setProgs[device] = new Program(getContext(), setSrc);
-
-                    string opt = string("-D T=") + dtype_traits<T>::getName();
-                    if (std::is_same<T, double>::value ||
-                        std::is_same<T, cdouble>::value) {
-                        opt << " -D USE_DOUBLE";
-                    }
-                    setProgs[device]->build(opt.c_str());
-
-                    setKernels[device] = new Kernel(*setProgs[device], "set");
-                });
-
-        auto setKern = make_kernel<Buffer, T, const unsigned long>(setKernels[device]);
-        setKern(EnqueueArgs(getQueue(), NDRange(elements)), ptr, val, elements);
-        CL_DEBUG_FINISH(getQueue());
-    } catch (cl::Error &err) {
-        CL_TO_AF_ERROR(err);
-        throw;
-    }
-}
-
-}
-}

-- 
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