Skip to content

Commit b731622

Browse files
committed
Adding a simple example snippet -- intro.lua
1 parent 67cbb7d commit b731622

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

examples/lua/helloworld/intro.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--[[
2+
/*******************************************************
3+
* Copyright (c) 2014, ArrayFire
4+
* All rights reserved.
5+
*
6+
* This file is distributed under 3-clause BSD license.
7+
* The complete license agreement can be obtained at:
8+
* http://arrayfire.com/licenses/BSD-3-Clause
9+
********************************************************/
10+
--]]
11+
12+
local AF = require("af_lib")
13+
14+
AF.main(function()
15+
local x = AF.randu(5, "f32")
16+
AF.print("x", x)
17+
AF.print("min of x", AF.min(x))
18+
AF.print("max of x", AF.max(x))
19+
end)

0 commit comments

Comments
 (0)