-
Notifications
You must be signed in to change notification settings - Fork 1
/
disableCuda.m
43 lines (37 loc) · 1.19 KB
/
disableCuda.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% function disableCuda() : temporarily disables the use of cuda. Thus all cuda generator functions are set back to zero (no cuda object will be generated).
% The meaning of a double case also changes automatically to force_double().
function disableCuda()
global cuda_enabled;
global use_zeros_cuda;
global use_ones_cuda;
global use_rand_cuda;
global use_newim_cuda;
global use_newimar_cuda;
global use_xyz_cuda;
global use_ramp_cuda;
global use_double_cuda;
global remember_use_zeros_cuda;
global remember_use_ones_cuda;
global remember_use_rand_cuda;
global remember_use_newim_cuda;
global remember_use_newimar_cuda;
global remember_use_xyz_cuda;
global remember_use_ramp_cuda;
global remember_use_double_cuda;
remember_use_zeros_cuda=use_zeros_cuda;
remember_use_ones_cuda=use_ones_cuda;
remember_use_rand_cuda=use_rand_cuda;
remember_use_newim_cuda=use_newim_cuda;
remember_use_newimar_cuda=use_newimar_cuda;
remember_use_xyz_cuda=use_xyz_cuda;
remember_use_ramp_cuda=use_ramp_cuda;
remember_use_double_cuda=use_double_cuda;
use_zeros_cuda=0;
use_ones_cuda=0;
use_rand_cuda=0;
use_newim_cuda=0;
use_newimar_cuda=0;
use_xyz_cuda=0;
use_ramp_cuda=0;
use_double_cuda=0;
cuda_enabled=0;