Skip to content

Commit 76c173a

Browse files
committed
Files required to generate documentation
1 parent 47b8924 commit 76c173a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1102
-37
lines changed

arrayfire/__init__.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@
88
########################################################
99

1010
"""
11-
A high performance scientific computing library for CUDA, OpenCL and CPU devices.
11+
ArrayFire is a high performance scientific computing library with an easy to use API.
1212
13-
The functionality provided by ArrayFire spans the following domains:
1413
15-
1. Vector Algorithms
16-
2. Image Processing
17-
3. Signal Processing
18-
4. Computer Vision
19-
5. Linear Algebra
20-
6. Statistics
14+
>>> # Monte Carlo estimation of pi
15+
>>> def calc_pi_device(samples):
16+
# Simple, array based API
17+
# Generate uniformly distributed random numers
18+
x = af.randu(samples)
19+
y = af.randu(samples)
20+
# Supports Just In Time Compilation
21+
# The following line generates a single kernel
22+
within_unit_circle = (x * x + y * y) < 1
23+
# Intuitive function names
24+
return 4 * af.count(within_unit_circle) / samples
2125
22-
Programs written using ArrayFire are portable across CUDA, OpenCL and CPU devices
26+
Programs written using ArrayFire are portable across CUDA, OpenCL and CPU devices.
2327
2428
The default backend is chosen in the following order of preference based on the available libraries:
2529
@@ -31,7 +35,16 @@
3135
3236
>>> af.backend.set(name)
3337
34-
where name is one of 'cuda', 'opencl' or 'cpu'
38+
where name is one of 'cuda', 'opencl' or 'cpu'.
39+
40+
The functionality provided by ArrayFire spans the following domains:
41+
42+
1. Vector Algorithms
43+
2. Image Processing
44+
3. Signal Processing
45+
4. Computer Vision
46+
5. Linear Algebra
47+
6. Statistics
3548
3649
"""
3750

arrayfire/algorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
########################################################
99

1010
"""
11-
Vector algorithms for ArrayFire
11+
Vector algorithms (sum, min, sort, etc).
1212
"""
1313

1414
from .library import *
@@ -283,7 +283,7 @@ def imax(a, dim=None):
283283

284284
def accum(a, dim=0):
285285
"""
286-
Cumulative sum of an array along a specified dimension.
286+
Cumulative sum of an array along a specified dimension
287287
288288
Parameters
289289
----------

arrayfire/arith.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
########################################################
99

1010
"""
11-
Math functions for ArrayFire
11+
Math functions (sin, sqrt, exp, etc).
1212
"""
1313

1414
from .library import *

arrayfire/array.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
########################################################
99

1010
"""
11-
arrayfire.Array class and helper functions.
11+
Array class and helper functions.
1212
"""
1313

1414
import inspect
@@ -488,7 +488,7 @@ def device_ptr(self):
488488
Return the device pointer exclusively held by the array.
489489
490490
Returns
491-
------
491+
--------
492492
ptr : int
493493
Contains location of the device pointer
494494
@@ -508,7 +508,7 @@ def raw_ptr(self):
508508
Return the device pointer held by the array.
509509
510510
Returns
511-
------
511+
--------
512512
ptr : int
513513
Contains location of the device pointer
514514
@@ -529,7 +529,7 @@ def offset(self):
529529
Return the offset, of the first element relative to the raw pointer.
530530
531531
Returns
532-
------
532+
--------
533533
offset : int
534534
The offset in number of elements
535535
"""
@@ -542,7 +542,7 @@ def strides(self):
542542
Return the distance in bytes between consecutive elements for each dimension.
543543
544544
Returns
545-
------
545+
--------
546546
strides : tuple
547547
The strides for each dimension
548548
"""
@@ -1078,7 +1078,7 @@ def to_ctype(self, row_major=False, return_shape=False):
10781078
Return the data as a ctype C array after copying to host memory
10791079
10801080
Parameters
1081-
---------
1081+
-----------
10821082
10831083
row_major: optional: bool. default: False.
10841084
Specifies if a transpose needs to occur before copying to host memory.
@@ -1112,7 +1112,7 @@ def to_array(self, row_major=False, return_shape=False):
11121112
Return the data as array.array
11131113
11141114
Parameters
1115-
---------
1115+
-----------
11161116
11171117
row_major: optional: bool. default: False.
11181118
Specifies if a transpose needs to occur before copying to host memory.
@@ -1147,7 +1147,7 @@ def to_list(self, row_major=False):
11471147
Return the data as list
11481148
11491149
Parameters
1150-
---------
1150+
-----------
11511151
11521152
row_major: optional: bool. default: False.
11531153
Specifies if a transpose needs to occur before copying to host memory.

arrayfire/blas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
########################################################
99

1010
"""
11-
BLAS functions for arrayfire.
11+
BLAS functions (matmul, dot, etc)
1212
"""
1313

1414
from .library import *

arrayfire/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def join(dim, first, second, third=None, fourth=None):
384384
An array containing the input arrays joined along the specified dimension.
385385
386386
Examples
387-
-------
387+
---------
388388
389389
>>> import arrayfire as af
390390
>>> a = af.randu(2, 3)
@@ -460,7 +460,7 @@ def tile(a, d0, d1=1, d2=1, d3=1):
460460
An array containing the input after tiling the the specified number of times.
461461
462462
Examples
463-
-------
463+
---------
464464
465465
>>> import arrayfire as af
466466
>>> a = af.randu(2, 3)
@@ -710,7 +710,7 @@ def flip(a, dim=0):
710710
The output after flipping `a` along `dim`.
711711
712712
Examples
713-
-------
713+
---------
714714
715715
>>> import arrayfire as af
716716
>>> a = af.randu(3, 3)

arrayfire/device.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def set_device(num):
7676
Change the active device to the specified id.
7777
7878
Parameters
79-
---------
79+
-----------
8080
num: int.
8181
id of the desired device.
8282
"""
@@ -136,7 +136,7 @@ def is_dbl_supported(device=None):
136136
Check if double precision is supported on specified device.
137137
138138
Parameters
139-
---------
139+
-----------
140140
device: optional: int. default: None.
141141
id of the desired device.
142142
@@ -155,7 +155,7 @@ def sync(device=None):
155155
Block until all the functions on the device have completed execution.
156156
157157
Parameters
158-
---------
158+
-----------
159159
device: optional: int. default: None.
160160
id of the desired device.
161161
"""

arrayfire/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# http://arrayfire.com/licenses/BSD-3-Clause
88
########################################################
99
"""
10-
arrayfire.Features class
10+
Features class used for Computer Vision algorithms.
1111
"""
1212
from .library import *
1313
from .array import *

arrayfire/graphics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
########################################################
99

1010
"""
11-
graphics functions for arrayfire
11+
Graphics functions (plot, image, etc).
1212
"""
1313

1414
from .library import *

arrayfire/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
########################################################
99

1010
"""
11-
Image processing functions for arrayfire.
11+
Image processing functions.
1212
"""
1313

1414
from .library import *

0 commit comments

Comments
 (0)