[arrayfire] 328/408: Splitting up opencl sort_by_key files to compile in parallel
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:23 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 72f7ff5542d24c41a27e32484e0ec5fb3d056c17
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Mon Aug 24 07:47:55 2015 -0400
Splitting up opencl sort_by_key files to compile in parallel
---
src/backend/opencl/CMakeLists.txt | 6 ++--
src/backend/opencl/kernel/sift.hpp | 1 -
src/backend/opencl/sort_by_key/asc_b8.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/asc_f32.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/asc_f64.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/asc_s32.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/asc_u32.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/asc_u8.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/desc_b8.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/desc_f32.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/desc_f64.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/desc_s32.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/desc_u32.cpp | 15 ++++++++++
src/backend/opencl/sort_by_key/desc_u8.cpp | 15 ++++++++++
.../{sort_by_key.cpp => sort_by_key/impl.hpp} | 34 +++++++++-------------
15 files changed, 197 insertions(+), 24 deletions(-)
diff --git a/src/backend/opencl/CMakeLists.txt b/src/backend/opencl/CMakeLists.txt
index 3c6bc37..d933d0f 100644
--- a/src/backend/opencl/CMakeLists.txt
+++ b/src/backend/opencl/CMakeLists.txt
@@ -80,10 +80,12 @@ INCLUDE_DIRECTORIES(
FILE(GLOB opencl_headers
"*.hpp"
- "*.h")
+ "*.h"
+ "sort_by_key/*.hpp")
FILE(GLOB opencl_sources
- "*.cpp")
+ "*.cpp"
+ "sort_by_key/*.cpp")
FILE(GLOB magma_sources
"magma/*.cpp")
diff --git a/src/backend/opencl/kernel/sift.hpp b/src/backend/opencl/kernel/sift.hpp
index eaca91d..a3b156b 100644
--- a/src/backend/opencl/kernel/sift.hpp
+++ b/src/backend/opencl/kernel/sift.hpp
@@ -184,7 +184,6 @@ void convSepFull(Param& dst, Param src, Param filter)
const dim_t src_el = src.info.dims[3] * src.info.strides[3];
tmp.data = bufferAlloc(src_el * sizeof(T));
- const dim_t fLen = filter.info.dims[0];
convSep<T, convAccT, 0, false>(tmp, src, filter);
bufferFree(tmp.data);
diff --git a/src/backend/opencl/sort_by_key/asc_b8.cpp b/src/backend/opencl/sort_by_key/asc_b8.cpp
new file mode 100644
index 0000000..013911c
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/asc_b8.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,true) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(char,true)
+}
diff --git a/src/backend/opencl/sort_by_key/asc_f32.cpp b/src/backend/opencl/sort_by_key/asc_f32.cpp
new file mode 100644
index 0000000..8918ada
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/asc_f32.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,true) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(float,true)
+}
diff --git a/src/backend/opencl/sort_by_key/asc_f64.cpp b/src/backend/opencl/sort_by_key/asc_f64.cpp
new file mode 100644
index 0000000..52160c5
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/asc_f64.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,true) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(double,true)
+}
diff --git a/src/backend/opencl/sort_by_key/asc_s32.cpp b/src/backend/opencl/sort_by_key/asc_s32.cpp
new file mode 100644
index 0000000..d6e9508
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/asc_s32.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,true) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(int,true)
+}
diff --git a/src/backend/opencl/sort_by_key/asc_u32.cpp b/src/backend/opencl/sort_by_key/asc_u32.cpp
new file mode 100644
index 0000000..b797af8
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/asc_u32.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,true) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(uint,true)
+}
diff --git a/src/backend/opencl/sort_by_key/asc_u8.cpp b/src/backend/opencl/sort_by_key/asc_u8.cpp
new file mode 100644
index 0000000..32eed6a
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/asc_u8.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,true) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(uchar,true)
+}
diff --git a/src/backend/opencl/sort_by_key/desc_b8.cpp b/src/backend/opencl/sort_by_key/desc_b8.cpp
new file mode 100644
index 0000000..1383de4
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/desc_b8.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,false) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(char,false)
+}
diff --git a/src/backend/opencl/sort_by_key/desc_f32.cpp b/src/backend/opencl/sort_by_key/desc_f32.cpp
new file mode 100644
index 0000000..6610a64
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/desc_f32.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,false) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(float,false)
+}
diff --git a/src/backend/opencl/sort_by_key/desc_f64.cpp b/src/backend/opencl/sort_by_key/desc_f64.cpp
new file mode 100644
index 0000000..2d77793
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/desc_f64.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,false) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(double,false)
+}
diff --git a/src/backend/opencl/sort_by_key/desc_s32.cpp b/src/backend/opencl/sort_by_key/desc_s32.cpp
new file mode 100644
index 0000000..05b1847
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/desc_s32.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,false) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(int,false)
+}
diff --git a/src/backend/opencl/sort_by_key/desc_u32.cpp b/src/backend/opencl/sort_by_key/desc_u32.cpp
new file mode 100644
index 0000000..18456b3
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/desc_u32.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,false) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(uint,false)
+}
diff --git a/src/backend/opencl/sort_by_key/desc_u8.cpp b/src/backend/opencl/sort_by_key/desc_u8.cpp
new file mode 100644
index 0000000..f40214f
--- /dev/null
+++ b/src/backend/opencl/sort_by_key/desc_u8.cpp
@@ -0,0 +1,15 @@
+/*******************************************************
+ * Copyright (c,false) 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 "impl.hpp"
+
+namespace opencl
+{
+ INSTANTIATE1(uchar,false)
+}
diff --git a/src/backend/opencl/sort_by_key.cpp b/src/backend/opencl/sort_by_key/impl.hpp
similarity index 57%
rename from src/backend/opencl/sort_by_key.cpp
rename to src/backend/opencl/sort_by_key/impl.hpp
index 90db7f1..73bcaf2 100644
--- a/src/backend/opencl/sort_by_key.cpp
+++ b/src/backend/opencl/sort_by_key/impl.hpp
@@ -34,28 +34,20 @@ namespace opencl
}
}
-#define INSTANTIATE(Tk, Tv) \
+#define INSTANTIATE(Tk, Tv, isAscending) \
template void \
- sort_by_key<Tk, Tv, true>(Array<Tk> &okey, Array<Tv> &oval, \
- const Array<Tk> &ikey, const Array<Tv> &ival, \
- const unsigned dim); \
- template void \
- sort_by_key<Tk, Tv,false>(Array<Tk> &okey, Array<Tv> &oval, \
- const Array<Tk> &ikey, const Array<Tv> &ival, \
- const unsigned dim); \
+ sort_by_key<Tk, Tv, isAscending>(Array<Tk> &okey, Array<Tv> &oval, \
+ const Array<Tk> &ikey, \
+ const Array<Tv> &ival, \
+ const unsigned dim); \
+
-#define INSTANTIATE1(Tk) \
- INSTANTIATE(Tk, float) \
- INSTANTIATE(Tk, double) \
- INSTANTIATE(Tk, int) \
- INSTANTIATE(Tk, uint) \
- INSTANTIATE(Tk, char) \
- INSTANTIATE(Tk, uchar) \
+#define INSTANTIATE1(Tk, isAscending) \
+ INSTANTIATE(Tk, float , isAscending) \
+ INSTANTIATE(Tk, double, isAscending) \
+ INSTANTIATE(Tk, int , isAscending) \
+ INSTANTIATE(Tk, uint , isAscending) \
+ INSTANTIATE(Tk, char , isAscending) \
+ INSTANTIATE(Tk, uchar , isAscending) \
- INSTANTIATE1(float)
- INSTANTIATE1(double)
- INSTANTIATE1(int)
- INSTANTIATE1(uint)
- INSTANTIATE1(char)
- INSTANTIATE1(uchar)
}
--
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