Skip to content

Commit 4a850bb

Browse files
ShadyBoukharyumar456
authored andcommitted
Removed intentional error in HelloWorld example.
1 parent 9170df5 commit 4a850bb

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

examples/HelloWorld.java

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ public static void main(String[] args) {
3636
Array A = new Array(dims, left);
3737
Array B = new Array(dims, right);
3838
Array C = new Array();
39-
Array D = Array.identity(new int[] { 0, 5 }, Array.FloatType);
40-
float[] values = D.getFloatArray();
41-
for (int x = 0; x < 5; x++) {
42-
for (int y = 0; y < 5; y++) {
43-
System.out.print(Float.toString(values[5 * x + y]) + " ");
44-
}
45-
46-
System.out.println();
47-
}
4839

4940
// Do vector addition on the device
5041
Arith.add(C, A, B);
@@ -60,11 +51,10 @@ public static void main(String[] args) {
6051
str = str + Float.toString(res[i]);
6152
System.out.println(str);
6253
}
63-
A.close();
64-
B.close();
65-
C.close();
66-
D.close();
6754

55+
A.close();
56+
B.close();
57+
C.close();
6858
} catch (Exception e) {
6959
System.out.println("Failed to use ArrayFire");
7060
e.printStackTrace();

0 commit comments

Comments
 (0)