Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding better af.print and updating README
  • Loading branch information
pavanky committed Feb 23, 2017
commit 60e06eb30c334351762cb5fc1788f91cceb1338b
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,30 @@ The wrapper is currently compliant with ArrayFire 3.4 API (and higher). If you f

## Example

TODO
Sample code:

```
local af = require('arrayfire')
af.info()
a = af.Array{1, 2, 3, 4}
af.print(a)
```

Sample output:

```
ArrayFire v3.5.0 (CUDA, 64-bit Linux, build 06e605b0)
Platform: CUDA Toolkit 8, Driver: 378.13
[0] GeForce GTX 950, 1996 MB, CUDA Compute 5.2

ArrayFire Array
[4 1 1 1]
1.0000
2.0000
3.0000
4.0000

```

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion arrayfire/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ funcs[34] = [[
af.lib.cdef(funcs)

af.print = function(arr)
af.clib.af_print_array(arr:get())
af.clib.af_print_array_gen(ffi.cast("char *", "ArrayFire Array"), arr:get(), 4)
end