Skip to content

Commit

Permalink
Adding a simple example snippet -- intro.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanky committed Dec 23, 2015
1 parent 67cbb7d commit b731622
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/lua/helloworld/intro.lua
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit b731622

Please sign in to comment.