数组的零
Z = 0(深圳,
arraytype
)
Z = 0(深圳,数据类型
,arraytype
)
Z = 0(深圳,“喜欢”,P)
Z = 0(深圳,数据类型
“喜欢”,P)
codist C = 0(深圳)
C = 0(深圳,数据类型
codist)
C = 0(深圳,___、codist noCommunication)
C = 0(深圳,___codist“喜欢”,P)
Z = 0(深圳,
创建一个矩阵,其底层类为double,所有元素中都为零。arraytype
)
Z = 0(深圳,
创建一个矩阵,其底层类为数据类型
,arraytype
)数据类型
,所有元素均为零。
数组的大小和类型由参数选项根据下表指定。
论点 | 值 | 描述 |
---|---|---|
深圳 |
n |
将大小指定为n ——- - - - - -n 矩阵。 |
m, n 或(mn) |
将大小指定为米 ——- - - - - -n 矩阵。 |
|
m, n, k 或[m n…k) |
将大小指定为米 ——- - - - - -n ——-…——-k 数组中。 |
|
arraytype |
“分布式” |
指定分布式阵列。 |
“codistributed” |
指定使用默认分布方案的共分布数组。 | |
“gpuArray” |
指定gpuArray。 | |
数据类型 |
“双” (默认),“单一” ,“int8” ,“uint8” ,“int16” ,“uint16” ,“int32” ,“uint32” ,“int64” ,或“uint64” |
指定数组的底层类,即元素的数据类型。 |
Z = 0(深圳,“喜欢”,P)
创建与array具有相同类型和底层类(数据类型)的零数组P
。
Z = 0(深圳,
使用指定的底层类(数据类型
“喜欢”,P)数据类型
),与array类型相同P
。
codist C = 0(深圳)
或C = 0(深圳,
创建具有指定大小和底层类(默认值)的零的共分布数组数据类型
codist)数据类型
是“双”
)。codistributor对象codist
指定用于创建共分布数组的分配方案。有关构造codistributor对象的信息,请参阅参考页面codistributor1d
和codistributor2dbc
。要使用默认的分发方案,可以指定一个没有参数的codistributor构造函数。例如:
spmd C = 0 (8,codistributor1d());结束
C = 0(深圳,___、codist noCommunication)
指定在构造共分布数组时不执行任何工作者之间的通信,跳过一些错误检查步骤。
C = 0(深圳,___codist“喜欢”,P)
创建具有指定大小、底层类和分布模式的零的共分布数组。如果省略类或codistributor参数,则从codistributed数组中获取特征P
。
创建一个1000乘1000的分布式零数组与底层类double:
D = 0 (1000“分布式”);
创建一个1000乘1000共分布的双零矩阵,按其第二维(列)分布。
spmd(4) C = 0 (1000,“codistributed”);结束
有四个工人,每个工人包含一个1000乘250的本地块C
。
创建一个1000乘1000的共分布uint16
矩阵的零,分布的列。
spmd(4) codist = codistributor(“一维”,2100 * 1:numlabs);C = 0 (1000、1000、“uint16”,codist);结束
每个worker包含一个100乘-labindex
本地块C
。
创建一个包含底层类的1000 * 1000 gpuArrayuint32
:
G = 0 (1000“uint32”,“gpuArray”);