1 import Benchmarks.SSJava.EyeTracking.LOC;
5 // Definitely written analysis assumes that the first parameter may have write
6 // effects through the below methods
8 static void arrayinit(float array[], float value) {
9 for (int i = 0; i < array.length; i++) {
14 static void arrayinit(int array[], int value) {
15 for (int i = 0; i < array.length; i++) {
20 static void arrayinit(float array[][][], int size_1, int size_2, int size_3, float value) {
22 for (int idx1 = 0; idx1 < size_1; idx1++) {
23 if (array[idx1].length != size_2) {
24 throw new Error("Array initilizatiion failed to assign to all of elements.");
26 for (int idx2 = 0; idx2 < size_2; idx2++) {
27 if (array[idx1][idx2].length != size_3) {
28 throw new Error("Array initilizatiion failed to assign to all of elements.");
30 for (int idx3 = 0; idx3 < size_3; idx3++) {
31 array[idx1][idx2][idx3] = value;
37 static void arrayinit(float array[][], int size_1, int size_2, float value) {
39 for (int idx1 = 0; idx1 < size_1; idx1++) {
40 if (array[idx1].length != size_2) {
41 throw new Error("Array initilizatiion failed to assign to all of elements.");
43 for (int idx2 = 0; idx2 < size_2; idx2++) {
44 array[idx1][idx2] = value;
49 static void arraycopy(float array[][], float src[][], int size_1, int size_2) {
51 for (int idx1 = 0; idx1 < size_1; idx1++) {
52 if (array[idx1].length != size_2 || src[idx1].length != size_2) {
53 throw new Error("Array initilizatiion failed to assign to all of elements.");
55 for (int idx2 = 0; idx2 < size_2; idx2++) {
56 array[idx1][idx2] = src[idx1][idx2];
61 static void append(Object array[], Object item) {
62 for (int i = 1; i < array.length; i++) {
63 array[i - 1] = array[i];
66 array[array.length - 1] = item;