[arrayfire] 25/84: Fixing surface.cpp example to work on windows

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:18 UTC 2016


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

ghisvail-guest pushed a commit to branch master
in repository arrayfire.

commit 57779c280e564ef3db10b2058eba0763a57a6437
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Mon Dec 14 15:27:48 2015 -0500

    Fixing surface.cpp example to work on windows
---
 examples/graphics/surface.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/examples/graphics/surface.cpp b/examples/graphics/surface.cpp
index 95b87bc..0d2648a 100644
--- a/examples/graphics/surface.cpp
+++ b/examples/graphics/surface.cpp
@@ -13,8 +13,8 @@
 
 using namespace af;
 
-static const int POINTS = 30;
-static const int N = 2 * POINTS;
+static const int M = 30;
+static const int N = 2 * M;
 
 int main(int argc, char *argv[])
 {
@@ -23,9 +23,9 @@ int main(int argc, char *argv[])
         af::info();
         af::Window myWindow(800, 800, "3D Surface example: ArrayFire");
 
-        // Creates grid of between [-1 1] with precision of 1 / POINTS
-        const array x = iota(dim4(N, 1), dim4(1, N)) / POINTS - 1;
-        const array y = iota(dim4(1, N), dim4(N, 1)) / POINTS - 1;
+        // Creates grid of between [-1 1] with precision of 1 / M
+        const array x = iota(dim4(N, 1), dim4(1, N)) / M - 1;
+        const array y = iota(dim4(1, N), dim4(N, 1)) / M - 1;
 
         std::cout << x.dims()  << y.dims() << std::endl;
 

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