You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+8-11Lines changed: 8 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -7,28 +7,25 @@
7
7
//! not be concerned about low-level optimizations that are frequently required to
8
8
//! achieve high throughput on most parallel architectures.
9
9
10
-
//! This crate provides Rust bindings for the ArrayFire library. Given below table shows the rust bindings compatability with ArrayFire upstream. If you find any bugs, please report them on [github](https://github.com/arrayfire/arrayfire-rust/issues).
10
+
//! This crate provides Rust bindings for the ArrayFire library. Given below table shows
11
+
//! the rust bindings compatability with ArrayFire upstream. If you find any bugs,
12
+
//! please report them on [github](https://github.com/arrayfire/arrayfire-rust/issues).
11
13
//!
12
14
//! | arrayfire-rust crate | ArrayFire Upstream |
13
-
//! |:--------------|:---------|
14
-
//! | M.m.p1 | M.m.p2 |
15
+
//! |:--------------------:|:------------------:|
16
+
//! | M.m.p1 | M.m.p2 |
15
17
//!
16
18
//! Only, Major(M) & Minor(m) version numbers need to match. *p1* and *p2*
17
19
//! are patch/fix updates for `arrayfire-rust` & `ArrayFire` respectively,
18
20
//! and they don't need to match.
19
21
//!
20
-
//! ## Tutorials
21
-
//!
22
-
//! - [Getting Started with ArrayFire](./getting_started.html)
23
-
//! - [Introduction to Vectorization](./vectorization.html)
24
-
//! - [Array and Matrix Manipulation](./array_and_matrix_manipulation.html)
Note: af::setDevice call in the source code will take precedence over this
31
31
variable.
32
32
33
-
# AF_OPENCL_DEFAULT_DEVICE
33
+
##AF_OPENCL_DEFAULT_DEVICE
34
34
35
35
Use this variable to set the default OpenCL device. Valid values for this
36
-
variable are the device identifiers shown when [af::info](./fn.info.html) is run.
36
+
variable are the device identifiers shown when [af::info](../fn.info.html) is run.
37
37
38
38
```
39
39
AF_OPENCL_DEFAULT_DEVICE=1 ./myprogram
40
40
```
41
41
42
-
Note: [af::set_device](./fn.set_device.html) call in the source code will take precedence over this
42
+
Note: [af::set_device](../fn.set_device.html) call in the source code will take precedence over this
43
43
variable.
44
44
45
-
# AF_OPENCL_DEFAULT_DEVICE_TYPE
45
+
##AF_OPENCL_DEFAULT_DEVICE_TYPE
46
46
47
47
Use this variable to set the default OpenCL device type. Valid values for this
48
48
variable are: CPU, GPU, ACC (Accelerators).
@@ -53,9 +53,9 @@ When set, the first device of the specified type is chosen as default device.
53
53
AF_OPENCL_DEFAULT_DEVICE_TYPE=CPU ./myprogram
54
54
```
55
55
56
-
Note: `AF_OPENCL_DEFAULT_DEVICE` and [af::set_device](./fn.set_device.html) takes precedence over this variable.
56
+
Note: `AF_OPENCL_DEFAULT_DEVICE` and [af::set_device](../fn.set_device.html) takes precedence over this variable.
57
57
58
-
# AF_OPENCL_DEVICE_TYPE
58
+
##AF_OPENCL_DEVICE_TYPE
59
59
60
60
Use this variable to only choose OpenCL devices of specified type. Valid values for this
61
61
variable are:
@@ -71,7 +71,7 @@ When set, the remaining OpenCL device types are ignored by the OpenCL backend.
71
71
AF_OPENCL_DEVICE_TYPE=CPU ./myprogram
72
72
```
73
73
74
-
# AF_OPENCL_CPU_OFFLOAD
74
+
##AF_OPENCL_CPU_OFFLOAD
75
75
76
76
When ArrayFire runs on devices with unified memory with the host (ie.
77
77
`CL_DEVICE_HOST_UNIFIED_MENORY` is true for the device) then certain functions
@@ -92,13 +92,13 @@ Prior to v3.4, CPU Offload functionality was used only when the user set
92
92
From v3.4 onwards, CPU Offload is enabled by default and is disabled only when
93
93
`AF_OPENCL_CPU_OFFLOAD=0` is set.
94
94
95
-
# AF_OPENCL_SHOW_BUILD_INFO
95
+
##AF_OPENCL_SHOW_BUILD_INFO
96
96
97
97
This variable is useful when debuggin OpenCL kernel compilation failures. When
98
98
this variable is set to 1, and an error occurs during a OpenCL kernel
99
99
compilation, then the log and kernel are printed to screen.
100
100
101
-
# AF_DISABLE_GRAPHICS
101
+
##AF_DISABLE_GRAPHICS
102
102
103
103
Setting this variable to 1 will disable window creation when graphics
104
104
functions are being called. Disabling window creation will disable all other
@@ -109,12 +109,12 @@ without displays. When graphics calls are run on such machines, they will
109
109
print warning about window creation failing. To suppress those calls, set this
110
110
variable.
111
111
112
-
# AF_SYNCHRONOUS_CALLS
112
+
##AF_SYNCHRONOUS_CALLS
113
113
114
114
When this environment variable is set to 1, ArrayFire will execute all
115
115
functions synchronously.
116
116
117
-
# AF_SHOW_LOAD_PATH
117
+
##AF_SHOW_LOAD_PATH
118
118
119
119
When using the Unified backend, if this variable is set to 1, it will show the
120
120
path where the ArrayFire backend libraries are loaded from.
@@ -123,7 +123,7 @@ If the libraries are loaded from system paths, such as PATH or LD_LIBRARY_PATH
123
123
etc, then it will print "system path". If the libraries are loaded from other
124
124
paths, then those paths are shown in full.
125
125
126
-
# AF_MEM_DEBUG
126
+
##AF_MEM_DEBUG
127
127
128
128
When AF_MEM_DEBUG is set to 1 (or anything not equal to 0), the caching mechanism in the memory manager is disabled.
129
129
The device buffers are allocated using native functions as needed and freed when going out of scope.
@@ -134,27 +134,27 @@ When the environment variable is not set, it is treated to be non zero.
134
134
AF_MEM_DEBUG=1 ./myprogram
135
135
```
136
136
137
-
# AF_MAX_BUFFERS
137
+
##AF_MAX_BUFFERS
138
138
139
139
When AF_MAX_BUFFERS is set, this environment variable specifies the maximum number of buffers allocated before garbage collection kicks in.
140
140
141
141
Please note that the total number of buffers that can exist simultaneously can be higher than this number. This variable tells the garbage collector that it should free any available buffers immediately if the treshold is reached.
142
142
143
143
When not set, the default value is 1000.
144
144
145
-
# AF_OPENCL_MAX_JIT_LEN
145
+
##AF_OPENCL_MAX_JIT_LEN
146
146
147
147
When set, this environment variable specifies the maximum height of the OpenCL JIT tree after which evaluation is forced.
148
148
149
149
The default value, as of v3.4, is 50 on OSX, 100 everywhere else. This value was 20 for older versions.
150
150
151
-
# AF_CUDA_MAX_JIT_LEN
151
+
##AF_CUDA_MAX_JIT_LEN
152
152
153
153
When set, this environment variable specifies the maximum height of the CUDA JIT tree after which evaluation is forced.
154
154
155
155
The default value, as of v3.4, 100. This value was 20 for older versions.
156
156
157
-
# AF_CPU_MAX_JIT_LEN
157
+
##AF_CPU_MAX_JIT_LEN
158
158
159
159
When set, this environment variable specifies the maximum length of the CPU JIT tree after which evaluation is forced.
0 commit comments