Main Content

classUnderlying

(Not recommended) Class of elements within gpuArray or distributed array

classUnderlying is not recommended. Use underlyingType instead. For more information, see Compatibility Considerations.

Syntax

C = classUnderlying(D)

Description

C = classUnderlying(D) returns the name of the class of the elements contained within the gpuArray or distributed array D. Similar to the MATLAB class function, this returns a character vector indicating the class of the data.

Examples

Examine the class of the elements of a gpuArray.

N  = 1000;
G8 = ones(1,N,'uint8','gpuArray');
G1 = NaN(1,N,'single','gpuArray');
c8 = classUnderlying(G8)
c1 = classUnderlying(G1)
c8 =

uint8

c1 =

single

Examine the class of the elements of a distributed array.

N  = 1000;
D8 = ones(1,N,'uint8','distributed');
D1 = NaN(1,N,'single','distributed');
c8 = classUnderlying(D8)
c1 = classUnderlying(D1)
c8 =

uint8

c1 =

single

Version History

Introduced in R2013b

expand all