[arrayfire] 12/75: Cleaning up code in plot3
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:01:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.
commit 05296fba34458aaa9506e6e4d1339328c42094b3
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Tue Feb 9 16:19:20 2016 -0500
Cleaning up code in plot3
---
src/api/c/plot3.cpp | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/api/c/plot3.cpp b/src/api/c/plot3.cpp
index 63920bb..2e18251 100644
--- a/src/api/c/plot3.cpp
+++ b/src/api/c/plot3.cpp
@@ -46,16 +46,13 @@ fg::Plot3* setup_plot3(const af_array P, fg::PlotType ptype, fg::MarkerType mtyp
P_dims = pIn.dims();
}
- T max[3], min[3];
- if(P_dims[0] == 3) {
- copyData(max, reduce<af_max_t, T, T>(pIn, 1));
- copyData(min, reduce<af_min_t, T, T>(pIn, 1));
+ if(P_dims[1] == 3){
+ pIn = transpose(pIn, false);
}
- if(P_dims[1] == 3) {
- copyData(max, reduce<af_max_t, T, T>(pIn, 0));
- copyData(min, reduce<af_min_t, T, T>(pIn, 0));
- }
+ T max[3], min[3];
+ copyData(max, reduce<af_max_t, T, T>(pIn, 1));
+ copyData(min, reduce<af_min_t, T, T>(pIn, 1));
ForgeManager& fgMngr = ForgeManager::getInstance();
fg::Plot3* plot3 = fgMngr.getPlot3(P_dims.elements()/3, getGLType<T>(), ptype, mtype);
@@ -64,12 +61,7 @@ fg::Plot3* setup_plot3(const af_array P, fg::PlotType ptype, fg::MarkerType mtyp
max[1], min[1],
max[2], min[2]);
plot3->setAxesTitles("X Axis", "Y Axis", "Z Axis");
-
- if(P_dims[1] == 3){
- pIn = transpose(pIn, false);
- }
copy_plot3<T>(pIn, plot3);
-
return plot3;
}
--
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