|
12 | 12 |
|
13 | 13 | % Barnett 6/19/20, split out from guru so simple ints can check before plan.
|
14 | 14 | % s,t,u are only checked for type 3.
|
15 |
| -% note that isvector([]) is false, finufft_isgpuarray([]) is false, finufft_isgpuarray(gpuArray([])) is true. |
| 15 | +% note that isvector([]) is false, isa([], 'gpuArray') is false, isa(gpuArray([]), 'gpuArray') is true. |
16 | 16 | if ~isvector(x), error('FINUFFT:badXshape','FINUFFT x must be a vector'); end
|
17 |
| -if finufft_isgpuarray(x) ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
| 17 | +if isa(x, 'gpuArray') ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
18 | 18 | nj = numel(x);
|
19 | 19 | if type==3
|
20 | 20 | nk = numel(s);
|
21 | 21 | if ~isvector(s), error('FINUFFT:badSshape','FINUFFT s must be a vector'); end
|
22 |
| - if finufft_isgpuarray(s) ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
| 22 | + if isa(s, 'gpuArray') ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
23 | 23 | else
|
24 | 24 | nk = 0; % dummy output
|
25 | 25 | end
|
26 | 26 | if dim>1
|
27 | 27 | if ~isvector(y), error('FINUFFT:badYshape','FINUFFT y must be a vector'); end
|
28 |
| - if finufft_isgpuarray(y) ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
| 28 | + if isa(y, 'gpuArray') ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
29 | 29 | if numel(y)~=nj, error('FINUFFT:badYlen','FINUFFT y must have same length as x'); end
|
30 | 30 | if type==3
|
31 | 31 | if ~isvector(t), error('FINUFFT:badTshape','FINUFFT t must be a vector'); end
|
32 |
| - if finufft_isgpuarray(t) ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
| 32 | + if isa(t, 'gpuArray') ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
33 | 33 | if numel(t)~=nk, error('FINUFFT:badTlen','FINUFFT t must have same length as s'); end
|
34 | 34 | end
|
35 | 35 | end
|
36 | 36 | if dim>2
|
37 | 37 | if ~isvector(z), error('FINUFFT:badZshape','FINUFFT z must be a vector'); end
|
38 |
| - if finufft_isgpuarray(z) ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
| 38 | + if isa(z, 'gpuArray') ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
39 | 39 | if numel(z)~=nj, error('FINUFFT:badZlen','FINUFFT z must have same length as x'); end
|
40 | 40 | if type==3
|
41 | 41 | if ~isvector(u), error('FINUFFT:badUshape','FINUFFT u must be a vector'); end
|
42 |
| - if finufft_isgpuarray(u) ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
| 42 | + if isa(u, 'gpuArray') ~= is_gpuarray, error('FINUFFT:badDataDevice', 'input data must be on the specified device'); end |
43 | 43 | if numel(u)~=nk, error('FINUFFT:badUlen','FINUFFT u must have same length as s'); end
|
44 | 44 | end
|
45 | 45 | end
|
0 commit comments