classUnderlying
(不推荐)gpuArray 或分布式数组内的元素类
不推荐使用 classUnderlying。请改用 underlyingType。有关详细信息,请参阅版本历史记录。
语法
C = classUnderlying(D)
说明
C = classUnderlying(D) 返回 gpuArray 或分布式数组 D 中包含的元素的类的名称。与 MATLAB class 函数类似,该函数返回一个指示数据类别的字符向量。
示例
检查 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
检查分布式数组元素的类。
N = 1000; D8 = ones(1,N,'uint8','distributed'); D1 = NaN(1,N,'single','distributed'); c8 = classUnderlying(D8) c1 = classUnderlying(D1)
c8 = uint8 c1 = single