From b73162290dffeb6436facc4c6f81ed2bd0010c8c Mon Sep 17 00:00:00 2001 From: Pavan Yalamanchili Date: Tue, 22 Dec 2015 22:56:01 -0500 Subject: [PATCH] Adding a simple example snippet -- intro.lua --- examples/lua/helloworld/intro.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/lua/helloworld/intro.lua diff --git a/examples/lua/helloworld/intro.lua b/examples/lua/helloworld/intro.lua new file mode 100644 index 0000000..99ca172 --- /dev/null +++ b/examples/lua/helloworld/intro.lua @@ -0,0 +1,19 @@ +--[[ +/******************************************************* + * 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 + ********************************************************/ + --]] + +local AF = require("af_lib") + +AF.main(function() + local x = AF.randu(5, "f32") + AF.print("x", x) + AF.print("min of x", AF.min(x)) + AF.print("max of x", AF.max(x)) +end)