Error in assignment to multidimensional arrays
还没有人认领这个 Issue。
评估
调研方向
从 .NET wrapper 中的 [] 索引和赋值入口开始,然后在 CPU 和 OpenCL 后端上分别复现所提供的 A1D、A2D 和 A3D 示例。跟踪对多维数组进行单索引写入时,是由 wrapper 还是由 ArrayFire 实现处理;当文档中记录的赋值场景在两个后端上的行为一致时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
There's a problem with [] (indexing) operator. Indexing with with one number can be used to read value from the entire table, but it cannot be used to write to multidimensional table. While indexing with 2 or more numbers you can write to any table.
I am not sure, if it is the consequence of C implementation or problem with the wrapper, but this behavior is very unintuitive.
Checked on CPU and OpenCL Backend.
I'll try to fix it on my own
There's an example of the problem
ArrayFire.Array A1D = Data.CreateArray(new int[] { 1, 2, 4 });
A1D[1] = Data.CreateArray(new int[] { 100 });
Util.Print(A1D, "A1");
A2D[0, 0] = Data.CreateArray(new int[] { 11 });
A2D[1] = Data.CreateArray(new int[] { 100 });
Util.Print(A2D, "A");
A3D[1,1,1] = Data.CreateArray(new int[] { 100 });
A3D[0, 1] = Data.CreateArray(new int[] { 100 });
A3D[0] = Data.CreateArray(new int[] { 100 });
Util.Print(A3D[1,1], "A3D");
Generates the output
A1D
[3 1 1 1]
1
100
4
A2D
[3 3 1 1]
100 -1 4
2 2 2
4 0 3
A3D
[2 2 2 1]
1 100
2 -1
2 4
0 100
- 主要语言
- C#
- 星标
- 76
- 派生
- 19
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
arrayfire/arrayfire-dotnet 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 25/100
-
Error in ar_topk 未关闭
难度 3/5 1-2 天 新手友好度 35/100
-
af_index_t 未关闭question
难度 5/5 一周以上 新手友好度 20/100
arrayfire/arrayfire-dotnet#31 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
arrayfire/arrayfire-dotnet#29 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
arrayfire/arrayfire-dotnet#25 · 5 条评论 ·
查看 arrayfire/arrayfire-dotnet 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
nightscout/nocturne#1425 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100