| 1 | package net.bmahe.genetics4j.gpu.spec.fitness.cldata; | |
| 2 | ||
| 3 | import org.apache.commons.lang3.Validate; | |
| 4 | import org.jocl.CL; | |
| 5 | import org.jocl.Pointer; | |
| 6 | import org.jocl.Sizeof; | |
| 7 | import org.jocl.cl_image_desc; | |
| 8 | import org.jocl.cl_image_format; | |
| 9 | import org.jocl.cl_mem; | |
| 10 | ||
| 11 | public class StaticDataLoaders { | |
| 12 | ||
| 13 | private StaticDataLoaders() { | |
| 14 | } | |
| 15 | ||
| 16 | public static StaticDataLoader of(final boolean readOnly, final int dataType, final Pointer dataPtr, | |
| 17 | final int dataLength) { | |
| 18 | ||
| 19 |
1
1. of : Substituted 32 with 33 → NO_COVERAGE |
long bufferFlags = CL.CL_MEM_COPY_HOST_PTR; |
| 20 | ||
| 21 |
3
1. of : removed conditional - replaced equality check with true → NO_COVERAGE 2. of : removed conditional - replaced equality check with false → NO_COVERAGE 3. of : negated conditional → NO_COVERAGE |
if (readOnly) { |
| 22 |
2
1. of : Replaced bitwise OR with AND → NO_COVERAGE 2. of : Substituted 4 with 5 → NO_COVERAGE |
bufferFlags |= CL.CL_MEM_READ_ONLY; |
| 23 | } | |
| 24 | final long fBufferFlags = bufferFlags; | |
| 25 | ||
| 26 |
1
1. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return (openCLExecutionContext) -> { |
| 27 |
1
1. lambda$of$0 : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clContext → NO_COVERAGE |
final var clContext = openCLExecutionContext.clContext(); |
| 28 | ||
| 29 |
2
1. lambda$of$0 : removed call to org/jocl/CL::clCreateBuffer → NO_COVERAGE 2. lambda$of$0 : Replaced integer multiplication with division → NO_COVERAGE |
final cl_mem dataMem = CL.clCreateBuffer(clContext, fBufferFlags, dataType * dataLength, dataPtr, null); |
| 30 | ||
| 31 |
2
1. lambda$of$0 : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::lambda$of$0 → NO_COVERAGE 2. lambda$of$0 : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::of → NO_COVERAGE |
return CLData.of(dataMem, dataType, dataLength); |
| 32 | }; | |
| 33 | } | |
| 34 | ||
| 35 | public static StaticDataLoader of(final int[] data, final boolean readOnly) { | |
| 36 |
4
1. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. of : Substituted 4 with 5 → NO_COVERAGE 3. of : removed call to org/jocl/Pointer::to → NO_COVERAGE 4. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return of(readOnly, Sizeof.cl_int, Pointer.to(data), data.length); |
| 37 | } | |
| 38 | ||
| 39 | public static StaticDataLoader of(final int... data) { | |
| 40 |
3
1. of : Substituted 1 with 0 → NO_COVERAGE 2. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 3. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return of(data, true); |
| 41 | } | |
| 42 | ||
| 43 | public static StaticDataLoader of(final float[] data, final boolean readOnly) { | |
| 44 |
4
1. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. of : removed call to org/jocl/Pointer::to → NO_COVERAGE 3. of : Substituted 4 with 5 → NO_COVERAGE 4. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return of(readOnly, Sizeof.cl_float, Pointer.to(data), data.length); |
| 45 | } | |
| 46 | ||
| 47 | public static StaticDataLoader of(final float... data) { | |
| 48 |
3
1. of : Substituted 1 with 0 → NO_COVERAGE 2. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 3. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return of(data, true); |
| 49 | } | |
| 50 | ||
| 51 | public static StaticDataLoader of(final long[] data, final boolean readOnly) { | |
| 52 |
4
1. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. of : removed call to org/jocl/Pointer::to → NO_COVERAGE 3. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 4. of : Substituted 8 with 9 → NO_COVERAGE |
return of(readOnly, Sizeof.cl_long, Pointer.to(data), data.length); |
| 53 | } | |
| 54 | ||
| 55 | public static StaticDataLoader of(final long... data) { | |
| 56 |
3
1. of : Substituted 1 with 0 → NO_COVERAGE 2. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 3. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return of(data, true); |
| 57 | } | |
| 58 | ||
| 59 | public static StaticDataLoader of(final double[] data, final boolean readOnly) { | |
| 60 |
4
1. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. of : Substituted 8 with 9 → NO_COVERAGE 3. of : removed call to org/jocl/Pointer::to → NO_COVERAGE 4. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE |
return of(readOnly, Sizeof.cl_double, Pointer.to(data), data.length); |
| 61 | } | |
| 62 | ||
| 63 | public static StaticDataLoader of(final double... data) { | |
| 64 |
3
1. of : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. of : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 3. of : Substituted 1 with 0 → NO_COVERAGE |
return of(data, true); |
| 65 | } | |
| 66 | ||
| 67 | /** | |
| 68 | * Expect an evenly shaped data | |
| 69 | * | |
| 70 | * @param data | |
| 71 | * @param readOnly | |
| 72 | * @return | |
| 73 | */ | |
| 74 | public static StaticDataLoader ofLinearize(final double[][] data, final boolean readOnly) { | |
| 75 | Validate.isTrue(data.length > 0); | |
| 76 | Validate.isTrue(data[0].length > 0); | |
| 77 | ||
| 78 |
1
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
final int numColumns = data[0].length; |
| 79 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final double[] dataLinear = new double[data.length * numColumns]; |
| 80 |
5
1. ofLinearize : negated conditional → NO_COVERAGE 2. ofLinearize : changed conditional boundary → NO_COVERAGE 3. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE 4. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 5. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
for (int i = 0; i < data.length; i++) { |
| 81 |
3
1. ofLinearize : removed conditional - replaced equality check with false → NO_COVERAGE 2. ofLinearize : removed conditional - replaced equality check with true → NO_COVERAGE 3. ofLinearize : negated conditional → NO_COVERAGE |
if (data[i].length != numColumns) { |
| 82 |
2
1. ofLinearize : Substituted 3 with 4 → NO_COVERAGE 2. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
throw new IllegalArgumentException( |
| 83 |
8
1. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 2. ofLinearize : Substituted 2 with 3 → NO_COVERAGE 3. ofLinearize : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE 4. ofLinearize : Substituted 1 with 0 → NO_COVERAGE 5. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 6. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 7. ofLinearize : replaced call to java/lang/String::format with argument → NO_COVERAGE 8. ofLinearize : removed call to java/lang/String::format → NO_COVERAGE |
String.format("Got %d columns for index %d. Should have been %d", data[i].length, i, numColumns)); |
| 84 | } | |
| 85 | ||
| 86 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final int baseIndex = i * numColumns; |
| 87 |
5
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 2. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE 3. ofLinearize : changed conditional boundary → NO_COVERAGE 4. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 5. ofLinearize : negated conditional → NO_COVERAGE |
for (int j = 0; j < numColumns; j++) { |
| 88 |
1
1. ofLinearize : Replaced integer addition with subtraction → NO_COVERAGE |
dataLinear[baseIndex + j] = data[i][j]; |
| 89 | } | |
| 90 | } | |
| 91 | ||
| 92 |
2
1. ofLinearize : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. ofLinearize : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofLinearize → NO_COVERAGE |
return of(dataLinear, readOnly); |
| 93 | } | |
| 94 | ||
| 95 | /** | |
| 96 | * Expect an evenly shaped data | |
| 97 | * | |
| 98 | * @param data | |
| 99 | * @param readOnly | |
| 100 | * @return | |
| 101 | */ | |
| 102 | public static StaticDataLoader ofLinearize(final float[][] data, final boolean readOnly) { | |
| 103 | Validate.isTrue(data.length > 0); | |
| 104 | Validate.isTrue(data[0].length > 0); | |
| 105 | ||
| 106 |
1
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
final int numColumns = data[0].length; |
| 107 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final float[] dataLinear = new float[data.length * numColumns]; |
| 108 |
5
1. ofLinearize : negated conditional → NO_COVERAGE 2. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 3. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE 4. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 5. ofLinearize : changed conditional boundary → NO_COVERAGE |
for (int i = 0; i < data.length; i++) { |
| 109 |
3
1. ofLinearize : removed conditional - replaced equality check with false → NO_COVERAGE 2. ofLinearize : removed conditional - replaced equality check with true → NO_COVERAGE 3. ofLinearize : negated conditional → NO_COVERAGE |
if (data[i].length != numColumns) { |
| 110 |
2
1. ofLinearize : Substituted 3 with 4 → NO_COVERAGE 2. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
throw new IllegalArgumentException( |
| 111 |
8
1. ofLinearize : Substituted 2 with 3 → NO_COVERAGE 2. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 3. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 4. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 5. ofLinearize : removed call to java/lang/String::format → NO_COVERAGE 6. ofLinearize : replaced call to java/lang/String::format with argument → NO_COVERAGE 7. ofLinearize : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE 8. ofLinearize : Substituted 1 with 0 → NO_COVERAGE |
String.format("Got %d columns for index %d. Should have been %d", data[i].length, i, numColumns)); |
| 112 | } | |
| 113 | ||
| 114 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final int baseIndex = i * numColumns; |
| 115 |
5
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 2. ofLinearize : negated conditional → NO_COVERAGE 3. ofLinearize : changed conditional boundary → NO_COVERAGE 4. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 5. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE |
for (int j = 0; j < numColumns; j++) { |
| 116 |
1
1. ofLinearize : Replaced integer addition with subtraction → NO_COVERAGE |
dataLinear[baseIndex + j] = data[i][j]; |
| 117 | } | |
| 118 | } | |
| 119 | ||
| 120 |
2
1. ofLinearize : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. ofLinearize : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofLinearize → NO_COVERAGE |
return of(dataLinear, readOnly); |
| 121 | } | |
| 122 | ||
| 123 | /** | |
| 124 | * Expect an evenly shaped data | |
| 125 | * | |
| 126 | * @param data | |
| 127 | * @return | |
| 128 | */ | |
| 129 | public static StaticDataLoader ofLinearize(final float[][] data) { | |
| 130 |
3
1. ofLinearize : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofLinearize → NO_COVERAGE 2. ofLinearize : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofLinearize → NO_COVERAGE 3. ofLinearize : Substituted 1 with 0 → NO_COVERAGE |
return ofLinearize(data, true); |
| 131 | } | |
| 132 | ||
| 133 | /** | |
| 134 | * Expect an evenly shaped data | |
| 135 | * | |
| 136 | * @param data | |
| 137 | * @param readOnly | |
| 138 | * @return | |
| 139 | */ | |
| 140 | public static StaticDataLoader ofLinearize(final int[][] data, final boolean readOnly) { | |
| 141 | Validate.isTrue(data.length > 0); | |
| 142 | Validate.isTrue(data[0].length > 0); | |
| 143 | ||
| 144 |
1
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
final int numColumns = data[0].length; |
| 145 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final int[] dataLinear = new int[data.length * numColumns]; |
| 146 |
5
1. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 2. ofLinearize : negated conditional → NO_COVERAGE 3. ofLinearize : changed conditional boundary → NO_COVERAGE 4. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 5. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE |
for (int i = 0; i < data.length; i++) { |
| 147 |
3
1. ofLinearize : negated conditional → NO_COVERAGE 2. ofLinearize : removed conditional - replaced equality check with false → NO_COVERAGE 3. ofLinearize : removed conditional - replaced equality check with true → NO_COVERAGE |
if (data[i].length != numColumns) { |
| 148 |
2
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 2. ofLinearize : Substituted 3 with 4 → NO_COVERAGE |
throw new IllegalArgumentException( |
| 149 |
8
1. ofLinearize : Substituted 2 with 3 → NO_COVERAGE 2. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 3. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 4. ofLinearize : replaced call to java/lang/String::format with argument → NO_COVERAGE 5. ofLinearize : Substituted 1 with 0 → NO_COVERAGE 6. ofLinearize : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE 7. ofLinearize : removed call to java/lang/String::format → NO_COVERAGE 8. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE |
String.format("Got %d columns for index %d. Should have been %d", data[i].length, i, numColumns)); |
| 150 | } | |
| 151 | ||
| 152 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final int baseIndex = i * numColumns; |
| 153 |
5
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 2. ofLinearize : changed conditional boundary → NO_COVERAGE 3. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 4. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE 5. ofLinearize : negated conditional → NO_COVERAGE |
for (int j = 0; j < numColumns; j++) { |
| 154 |
1
1. ofLinearize : Replaced integer addition with subtraction → NO_COVERAGE |
dataLinear[baseIndex + j] = data[i][j]; |
| 155 | } | |
| 156 | } | |
| 157 | ||
| 158 |
2
1. ofLinearize : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. ofLinearize : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofLinearize → NO_COVERAGE |
return of(dataLinear, readOnly); |
| 159 | } | |
| 160 | ||
| 161 | /** | |
| 162 | * Expect an evenly shaped data | |
| 163 | * | |
| 164 | * @param data | |
| 165 | * @param readOnly | |
| 166 | * @return | |
| 167 | */ | |
| 168 | public static StaticDataLoader ofLinearize(final long[][] data, final boolean readOnly) { | |
| 169 | Validate.isTrue(data.length > 0); | |
| 170 | Validate.isTrue(data[0].length > 0); | |
| 171 | ||
| 172 |
1
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
final int numColumns = data[0].length; |
| 173 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final long[] dataLinear = new long[data.length * numColumns]; |
| 174 |
5
1. ofLinearize : changed conditional boundary → NO_COVERAGE 2. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 3. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE 4. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 5. ofLinearize : negated conditional → NO_COVERAGE |
for (int i = 0; i < data.length; i++) { |
| 175 |
3
1. ofLinearize : removed conditional - replaced equality check with true → NO_COVERAGE 2. ofLinearize : negated conditional → NO_COVERAGE 3. ofLinearize : removed conditional - replaced equality check with false → NO_COVERAGE |
if (data[i].length != numColumns) { |
| 176 |
2
1. ofLinearize : Substituted 0 with 1 → NO_COVERAGE 2. ofLinearize : Substituted 3 with 4 → NO_COVERAGE |
throw new IllegalArgumentException( |
| 177 |
8
1. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 2. ofLinearize : removed call to java/lang/String::format → NO_COVERAGE 3. ofLinearize : replaced call to java/lang/String::format with argument → NO_COVERAGE 4. ofLinearize : Substituted 1 with 0 → NO_COVERAGE 5. ofLinearize : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE 6. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 7. ofLinearize : removed call to java/lang/Integer::valueOf → NO_COVERAGE 8. ofLinearize : Substituted 2 with 3 → NO_COVERAGE |
String.format("Got %d columns for index %d. Should have been %d", data[i].length, i, numColumns)); |
| 178 | } | |
| 179 | ||
| 180 |
1
1. ofLinearize : Replaced integer multiplication with division → NO_COVERAGE |
final int baseIndex = i * numColumns; |
| 181 |
5
1. ofLinearize : negated conditional → NO_COVERAGE 2. ofLinearize : removed conditional - replaced comparison check with false → NO_COVERAGE 3. ofLinearize : removed conditional - replaced comparison check with true → NO_COVERAGE 4. ofLinearize : changed conditional boundary → NO_COVERAGE 5. ofLinearize : Substituted 0 with 1 → NO_COVERAGE |
for (int j = 0; j < numColumns; j++) { |
| 182 |
1
1. ofLinearize : Replaced integer addition with subtraction → NO_COVERAGE |
dataLinear[baseIndex + j] = data[i][j]; |
| 183 | } | |
| 184 | } | |
| 185 | ||
| 186 |
2
1. ofLinearize : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::of → NO_COVERAGE 2. ofLinearize : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofLinearize → NO_COVERAGE |
return of(dataLinear, readOnly); |
| 187 | } | |
| 188 | ||
| 189 | public static StaticDataLoader ofImage(final byte[] data, final int width, final int height, final int channelOrder, | |
| 190 | final int channelDataType, final boolean readOnly) { | |
| 191 | Validate.isTrue(data.length > 0); | |
| 192 | ||
| 193 |
1
1. ofImage : Substituted 32 with 33 → NO_COVERAGE |
long bufferFlags = CL.CL_MEM_COPY_HOST_PTR; |
| 194 | ||
| 195 |
3
1. ofImage : negated conditional → NO_COVERAGE 2. ofImage : removed conditional - replaced equality check with true → NO_COVERAGE 3. ofImage : removed conditional - replaced equality check with false → NO_COVERAGE |
if (readOnly) { |
| 196 |
2
1. ofImage : Replaced bitwise OR with AND → NO_COVERAGE 2. ofImage : Substituted 4 with 5 → NO_COVERAGE |
bufferFlags |= CL.CL_MEM_READ_ONLY; |
| 197 | } | |
| 198 | final long fBufferFlags = bufferFlags; | |
| 199 | ||
| 200 |
1
1. ofImage : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofImage → NO_COVERAGE |
return (openCLExecutionContext) -> { |
| 201 |
1
1. lambda$ofImage$1 : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clContext → NO_COVERAGE |
final var clContext = openCLExecutionContext.clContext(); |
| 202 |
1
1. lambda$ofImage$1 : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE |
final var clCommandQueue = openCLExecutionContext.clCommandQueue(); |
| 203 | ||
| 204 |
1
1. lambda$ofImage$1 : removed call to org/jocl/cl_image_desc::<init> → NO_COVERAGE |
final var imageDesc = new cl_image_desc(); |
| 205 |
2
1. lambda$ofImage$1 : Substituted 4337 with 4338 → NO_COVERAGE 2. lambda$ofImage$1 : Removed assignment to member variable image_type → NO_COVERAGE |
imageDesc.image_type = CL.CL_MEM_OBJECT_IMAGE2D; |
| 206 |
1
1. lambda$ofImage$1 : Removed assignment to member variable image_width → NO_COVERAGE |
imageDesc.image_width = width; |
| 207 |
1
1. lambda$ofImage$1 : Removed assignment to member variable image_height → NO_COVERAGE |
imageDesc.image_height = height; |
| 208 | ||
| 209 |
1
1. lambda$ofImage$1 : removed call to org/jocl/cl_image_format::<init> → NO_COVERAGE |
final var imageFormat = new cl_image_format(); |
| 210 |
1
1. lambda$ofImage$1 : Removed assignment to member variable image_channel_order → NO_COVERAGE |
imageFormat.image_channel_order = channelOrder; |
| 211 |
1
1. lambda$ofImage$1 : Removed assignment to member variable image_channel_data_type → NO_COVERAGE |
imageFormat.image_channel_data_type = channelDataType; |
| 212 | ||
| 213 |
2
1. lambda$ofImage$1 : removed call to org/jocl/Pointer::to → NO_COVERAGE 2. lambda$ofImage$1 : removed call to org/jocl/CL::clCreateImage → NO_COVERAGE |
final var clMem = CL.clCreateImage(clContext, fBufferFlags, imageFormat, imageDesc, Pointer.to(data), null); |
| 214 | ||
| 215 |
17
1. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 2. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 3. lambda$ofImage$1 : Substituted 1 with 0 → NO_COVERAGE 4. lambda$ofImage$1 : Substituted 1 with 0 → NO_COVERAGE 5. lambda$ofImage$1 : removed call to org/jocl/CL::clEnqueueWriteImage → NO_COVERAGE 6. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 7. lambda$ofImage$1 : replaced call to org/jocl/CL::clEnqueueWriteImage with argument → NO_COVERAGE 8. lambda$ofImage$1 : Substituted 2 with 3 → NO_COVERAGE 9. lambda$ofImage$1 : Substituted 1 with 2 → NO_COVERAGE 10. lambda$ofImage$1 : Substituted 2 with 3 → NO_COVERAGE 11. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 12. lambda$ofImage$1 : Substituted 3 with 4 → NO_COVERAGE 13. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 14. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 15. lambda$ofImage$1 : Substituted 1 with 0 → NO_COVERAGE 16. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 17. lambda$ofImage$1 : Substituted 3 with 4 → NO_COVERAGE |
CL.clEnqueueWriteImage(clCommandQueue, |
| 216 | clMem, | |
| 217 | true, | |
| 218 | new long[] { 0, 0, 0 }, | |
| 219 | new long[] { width, height, 1 }, | |
| 220 | 0, | |
| 221 | 0, | |
| 222 |
2
1. lambda$ofImage$1 : Substituted 0 with 1 → NO_COVERAGE 2. lambda$ofImage$1 : removed call to org/jocl/Pointer::to → NO_COVERAGE |
Pointer.to(data), |
| 223 | 0, | |
| 224 | null, | |
| 225 | null); | |
| 226 | ||
| 227 |
3
1. lambda$ofImage$1 : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::lambda$ofImage$1 → NO_COVERAGE 2. lambda$ofImage$1 : Substituted 1 with 0 → NO_COVERAGE 3. lambda$ofImage$1 : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::of → NO_COVERAGE |
return CLData.of(clMem, 1, data.length); |
| 228 | }; | |
| 229 | } | |
| 230 | ||
| 231 | public static StaticDataLoader ofImage(final byte[] data, final int width, final int height, final int channelOrder, | |
| 232 | final int channelDataType) { | |
| 233 |
3
1. ofImage : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofImage → NO_COVERAGE 2. ofImage : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/StaticDataLoaders::ofImage → NO_COVERAGE 3. ofImage : Substituted 1 with 0 → NO_COVERAGE |
return ofImage(data, width, height, channelOrder, channelDataType, true); |
| 234 | } | |
| 235 | } | |
Mutations | ||
| 19 |
1.1 |
|
| 21 |
1.1 2.2 3.3 |
|
| 22 |
1.1 2.2 |
|
| 26 |
1.1 |
|
| 27 |
1.1 |
|
| 29 |
1.1 2.2 |
|
| 31 |
1.1 2.2 |
|
| 36 |
1.1 2.2 3.3 4.4 |
|
| 40 |
1.1 2.2 3.3 |
|
| 44 |
1.1 2.2 3.3 4.4 |
|
| 48 |
1.1 2.2 3.3 |
|
| 52 |
1.1 2.2 3.3 4.4 |
|
| 56 |
1.1 2.2 3.3 |
|
| 60 |
1.1 2.2 3.3 4.4 |
|
| 64 |
1.1 2.2 3.3 |
|
| 78 |
1.1 |
|
| 79 |
1.1 |
|
| 80 |
1.1 2.2 3.3 4.4 5.5 |
|
| 81 |
1.1 2.2 3.3 |
|
| 82 |
1.1 2.2 |
|
| 83 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 |
|
| 86 |
1.1 |
|
| 87 |
1.1 2.2 3.3 4.4 5.5 |
|
| 88 |
1.1 |
|
| 92 |
1.1 2.2 |
|
| 106 |
1.1 |
|
| 107 |
1.1 |
|
| 108 |
1.1 2.2 3.3 4.4 5.5 |
|
| 109 |
1.1 2.2 3.3 |
|
| 110 |
1.1 2.2 |
|
| 111 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 |
|
| 114 |
1.1 |
|
| 115 |
1.1 2.2 3.3 4.4 5.5 |
|
| 116 |
1.1 |
|
| 120 |
1.1 2.2 |
|
| 130 |
1.1 2.2 3.3 |
|
| 144 |
1.1 |
|
| 145 |
1.1 |
|
| 146 |
1.1 2.2 3.3 4.4 5.5 |
|
| 147 |
1.1 2.2 3.3 |
|
| 148 |
1.1 2.2 |
|
| 149 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 |
|
| 152 |
1.1 |
|
| 153 |
1.1 2.2 3.3 4.4 5.5 |
|
| 154 |
1.1 |
|
| 158 |
1.1 2.2 |
|
| 172 |
1.1 |
|
| 173 |
1.1 |
|
| 174 |
1.1 2.2 3.3 4.4 5.5 |
|
| 175 |
1.1 2.2 3.3 |
|
| 176 |
1.1 2.2 |
|
| 177 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 |
|
| 180 |
1.1 |
|
| 181 |
1.1 2.2 3.3 4.4 5.5 |
|
| 182 |
1.1 |
|
| 186 |
1.1 2.2 |
|
| 193 |
1.1 |
|
| 195 |
1.1 2.2 3.3 |
|
| 196 |
1.1 2.2 |
|
| 200 |
1.1 |
|
| 201 |
1.1 |
|
| 202 |
1.1 |
|
| 204 |
1.1 |
|
| 205 |
1.1 2.2 |
|
| 206 |
1.1 |
|
| 207 |
1.1 |
|
| 209 |
1.1 |
|
| 210 |
1.1 |
|
| 211 |
1.1 |
|
| 213 |
1.1 2.2 |
|
| 215 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 11.11 12.12 13.13 14.14 15.15 16.16 17.17 |
|
| 222 |
1.1 2.2 |
|
| 227 |
1.1 2.2 3.3 |
|
| 233 |
1.1 2.2 3.3 |