Skip to content

Commit 6c21056

Browse files
committed
Merge branch 'master' into devel
2 parents 7a79ae7 + 619de82 commit 6c21056

File tree

3 files changed

+21
-71
lines changed

3 files changed

+21
-71
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v3.3.20160624
2+
- Adding 16 bit integer support
3+
- Adding support for sphinx documentation
4+
15
### v3.3.20160516
26
- Bugfix: Increase arrayfire's priority over numpy for mixed operations
37

README.md

Lines changed: 15 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,80 +10,26 @@
1010
| OSX | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-wrappers/python-osx)](http://ci.arrayfire.org/view/All/job/arrayfire-wrappers/job/python-osx/) |
1111
| Linux on ARM | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-wrappers/python-tegrak1)](http://ci.arrayfire.org/view/All/job/arrayfire-wrappers/job/python-tegrak1/)|
1212

13-
## Example
14-
15-
```python
16-
import arrayfire as af
17-
18-
# Display backend information
19-
af.info()
20-
21-
# Generate a uniform random array with a size of 5 elements
22-
a = af.randu(5, 1)
23-
24-
# Print a and its minimum value
25-
af.display(a)
26-
27-
# Print min and max values of a
28-
print("Minimum, Maximum: ", af.min(a), af.max(a))
29-
```
30-
31-
## Sample outputs
13+
## Documentation
3214

33-
On an AMD GPU:
15+
Documentation for this project can be found [over here](http://arrayfire.org/arrayfire-python/).
3416

35-
```
36-
Using opencl backend
37-
ArrayFire v3.0.1 (OpenCL, 64-bit Linux, build 17db1c9)
38-
[0] AMD : Spectre
39-
-1- AMD : AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G
40-
41-
[5 1 1 1]
42-
0.4107
43-
0.8224
44-
0.9518
45-
0.1794
46-
0.4198
47-
48-
Minimum, Maximum: 0.17936542630195618 0.9517996311187744
49-
```
50-
51-
On an NVIDIA GPU:
17+
## Example
5218

19+
```python
20+
# Monte Carlo estimation of pi
21+
def calc_pi_device(samples):
22+
# Simple, array based API
23+
# Generate uniformly distributed random numers
24+
x = af.randu(samples)
25+
y = af.randu(samples)
26+
# Supports Just In Time Compilation
27+
# The following line generates a single kernel
28+
within_unit_circle = (x * x + y * y) < 1
29+
# Intuitive function names
30+
return 4 * af.count(within_unit_circle) / samples
5331
```
54-
Using cuda backend
55-
ArrayFire v3.0.0 (CUDA, 64-bit Linux, build 86426db)
56-
Platform: CUDA Toolkit 7, Driver: 346.46
57-
[0] Tesla K40c, 12288 MB, CUDA Compute 3.5
58-
-1- GeForce GTX 750, 1024 MB, CUDA Compute 5.0
59-
60-
Generate a random matrix a:
61-
[5 1 1 1]
62-
0.7402
63-
0.9210
64-
0.0390
65-
0.9690
66-
0.9251
67-
68-
Minimum, Maximum: 0.039020489901304245 0.9689629077911377
69-
```
70-
71-
Fallback to CPU when CUDA and OpenCL are not availabe:
7232

73-
```
74-
Using cpu backend
75-
ArrayFire v3.0.0 (CPU, 64-bit Linux, build 86426db)
76-
77-
Generate a random matrix a:
78-
[5 1 1 1]
79-
0.0000
80-
0.1315
81-
0.7556
82-
0.4587
83-
0.5328
84-
85-
Minimum, Maximum: 7.825903594493866e-06 0.7556053400039673
86-
```
8733

8834
Choosing a particular backend can be done using `af.backend.set( backend_name )` where backend_name can be one of: "_cuda_", "_opencl_", or "_cpu_". The default device is chosen in the same order of preference.
8935

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
########################################################
1111

1212
from setuptools import setup, find_packages
13-
from __af_version__ import full_version
13+
#from __af_version__ import full_version
1414

1515
#TODO:
1616
#1) Look for af libraries during setup
@@ -20,7 +20,7 @@
2020
author="Pavan Yalamanchili",
2121
author_email="[email protected]",
2222
name="arrayfire",
23-
version=full_version,
23+
version="3.4.0"
2424
description="Python bindings for ArrayFire",
2525
license="BSD",
2626
url="http://arrayfire.com",

0 commit comments

Comments
 (0)