ResultExtractor.java

1
package net.bmahe.genetics4j.gpu.spec.fitness;
2
3
import java.util.Map;
4
5
import org.apache.commons.lang3.Validate;
6
import org.apache.logging.log4j.LogManager;
7
import org.apache.logging.log4j.Logger;
8
import org.jocl.CL;
9
import org.jocl.Pointer;
10
import org.jocl.Sizeof;
11
12
import net.bmahe.genetics4j.gpu.opencl.OpenCLExecutionContext;
13
import net.bmahe.genetics4j.gpu.opencl.model.Device;
14
import net.bmahe.genetics4j.gpu.spec.fitness.cldata.CLData;
15
16
/**
17
 * Utility class for extracting computation results from OpenCL device memory after GPU kernel execution.
18
 * 
19
 * <p>ResultExtractor provides type-safe methods for retrieving different data types from OpenCL memory buffers
20
 * that contain the results of GPU-accelerated fitness evaluation. This class handles the device-to-host data
21
 * transfer and type conversion necessary to make GPU computation results available to the evolutionary algorithm.
22
 * 
23
 * <p>Key functionality includes:
24
 * <ul>
25
 * <li><strong>Type-safe extraction</strong>: Methods for extracting float, int, long arrays with type validation</li>
26
 * <li><strong>Image data support</strong>: Specialized extraction for OpenCL image objects</li>
27
 * <li><strong>Device management</strong>: Tracks result data across multiple devices</li>
28
 * <li><strong>Argument indexing</strong>: Maps kernel arguments to their corresponding result data</li>
29
 * </ul>
30
 * 
31
 * <p>Common usage patterns:
32
 * <pre>{@code
33
 * // Extract fitness values as float array
34
 * float[] fitnessValues = resultExtractor.extractFloatArray(context, 0);
35
 * 
36
 * // Extract integer results (e.g., classification results)
37
 * int[] classifications = resultExtractor.extractIntArray(context, 1);
38
 * 
39
 * // Extract long results (e.g., counters or large indices)
40
 * long[] counters = resultExtractor.extractLongArray(context, 2);
41
 * 
42
 * // Extract image data for visualization
43
 * byte[] imageData = resultExtractor.extractImageAsByteArray(context, 3, width, height, channels, channelSize);
44
 * 
45
 * // Use extracted results in fitness evaluation
46
 * List<Double> fitness = IntStream.range(0, fitnessValues.length)
47
 *     .mapToDouble(i -> (double) fitnessValues[i])
48
 *     .boxed()
49
 *     .collect(Collectors.toList());
50
 * }</pre>
51
 * 
52
 * <p>Data extraction workflow:
53
 * <ol>
54
 * <li><strong>Kernel execution</strong>: GPU kernels compute results and store them in device memory</li>
55
 * <li><strong>Result mapping</strong>: Results are mapped by device and kernel argument index</li>
56
 * <li><strong>Type validation</strong>: Data types are validated before extraction</li>
57
 * <li><strong>Data transfer</strong>: Results are transferred from device to host memory</li>
58
 * <li><strong>Type conversion</strong>: Data is converted to appropriate Java types</li>
59
 * </ol>
60
 * 
61
 * <p>Error handling and validation:
62
 * <ul>
63
 * <li><strong>Device validation</strong>: Ensures requested device has result data</li>
64
 * <li><strong>Argument validation</strong>: Validates argument indices exist in result mapping</li>
65
 * <li><strong>Type checking</strong>: Ensures extracted data matches expected OpenCL types</li>
66
 * <li><strong>Transfer validation</strong>: Validates successful device-to-host data transfer</li>
67
 * </ul>
68
 * 
69
 * <p>Performance considerations:
70
 * <ul>
71
 * <li><strong>Synchronous transfers</strong>: Uses blocking transfers to ensure data availability</li>
72
 * <li><strong>Memory efficiency</strong>: Allocates host memory based on actual data sizes</li>
73
 * <li><strong>Transfer optimization</strong>: Minimizes number of device-to-host transfers</li>
74
 * <li><strong>Type safety</strong>: Validates types at runtime to prevent data corruption</li>
75
 * </ul>
76
 * 
77
 * @see CLData
78
 * @see net.bmahe.genetics4j.gpu.spec.fitness.OpenCLFitness
79
 * @see OpenCLExecutionContext
80
 */
81
public class ResultExtractor {
82
	public static final Logger logger = LogManager.getLogger(ResultExtractor.class);
83
84
	private final Map<Device, Map<Integer, CLData>> resultData;
85
86
	/**
87
	 * Extracts CLData for the specified device and kernel argument index.
88
	 * 
89
	 * @param device the OpenCL device to extract data from
90
	 * @param argumentIndex the kernel argument index for the data
91
	 * @return the CLData object containing the result data
92
	 * @throws IllegalArgumentException if device is null, argumentIndex is negative,
93
	 *         device not found, or argument index not found
94
	 */
95
	protected CLData extractClData(final Device device, final int argumentIndex) {
96
		Validate.notNull(device);
97
		Validate.isTrue(argumentIndex >= 0);
98
99 4 1. extractClData : removed conditional - replaced equality check with true → NO_COVERAGE
2. extractClData : removed conditional - replaced equality check with false → NO_COVERAGE
3. extractClData : negated conditional → NO_COVERAGE
4. extractClData : removed call to java/util/Map::containsKey → NO_COVERAGE
		if (resultData.containsKey(device) == false) {
100 2 1. extractClData : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
2. extractClData : removed call to net/bmahe/genetics4j/gpu/opencl/model/Device::name → NO_COVERAGE
			throw new IllegalArgumentException("Could not find entry for device [" + device.name() + "]");
101
		}
102
103 2 1. extractClData : replaced call to java/util/Map::get with argument → NO_COVERAGE
2. extractClData : removed call to java/util/Map::get → NO_COVERAGE
		final var deviceResults = resultData.get(device);
104
105 5 1. extractClData : removed call to java/lang/Integer::valueOf → NO_COVERAGE
2. extractClData : removed conditional - replaced equality check with true → NO_COVERAGE
3. extractClData : negated conditional → NO_COVERAGE
4. extractClData : removed conditional - replaced equality check with false → NO_COVERAGE
5. extractClData : removed call to java/util/Map::containsKey → NO_COVERAGE
		if (deviceResults.containsKey(argumentIndex) == false) {
106 1 1. extractClData : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
			throw new IllegalArgumentException("No data defined for argument " + argumentIndex);
107
		}
108
109 3 1. extractClData : removed call to java/lang/Integer::valueOf → NO_COVERAGE
2. extractClData : removed call to java/util/Map::get → NO_COVERAGE
3. extractClData : replaced call to java/util/Map::get with argument → NO_COVERAGE
		final var clData = deviceResults.get(argumentIndex);
110 1 1. extractClData : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE
		return clData;
111
	}
112
113
	/**
114
	 * Constructs a ResultExtractor with the specified result data mapping.
115
	 * 
116
	 * @param _resultData mapping from devices to their kernel argument results
117
	 */
118
	public ResultExtractor(final Map<Device, Map<Integer, CLData>> _resultData) {
119
120 1 1. <init> : Removed assignment to member variable resultData → NO_COVERAGE
		this.resultData = _resultData;
121
	}
122
123
	/**
124
	 * Extracts image data from OpenCL device memory as a byte array.
125
	 * 
126
	 * <p>This method reads an OpenCL image object from device memory and converts it to a byte array
127
	 * suitable for host processing. The image dimensions and channel information must be provided
128
	 * to properly interpret the image data.
129
	 * 
130
	 * @param openCLExecutionContext the OpenCL execution context
131
	 * @param argumentIndex the kernel argument index containing the image data
132
	 * @param width the image width in pixels
133
	 * @param height the image height in pixels
134
	 * @param numChannels the number of color channels (e.g., 3 for RGB, 4 for RGBA)
135
	 * @param channelSize the size of each channel in bytes
136
	 * @return byte array containing the image data
137
	 * @throws IllegalArgumentException if any parameter is invalid
138
	 */
139
	public byte[] extractImageAsByteArray(final OpenCLExecutionContext openCLExecutionContext, final int argumentIndex,
140
			final int width, final int height, final int numChannels, final int channelSize) {
141
		Validate.isTrue(argumentIndex >= 0);
142
		Validate.isTrue(width > 0);
143
		Validate.isTrue(height > 0);
144
		Validate.isTrue(numChannels > 0);
145
		Validate.isTrue(channelSize > 0);
146
147 1 1. extractImageAsByteArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE
		final var device = openCLExecutionContext.device();
148 1 1. extractImageAsByteArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE
		final var clData = extractClData(device, argumentIndex);
149
150 1 1. extractImageAsByteArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE
		final var clCommandQueue = openCLExecutionContext.clCommandQueue();
151
152 3 1. extractImageAsByteArray : Replaced integer multiplication with division → NO_COVERAGE
2. extractImageAsByteArray : Replaced integer multiplication with division → NO_COVERAGE
3. extractImageAsByteArray : Replaced integer multiplication with division → NO_COVERAGE
		final byte[] data = new byte[width * height * numChannels * channelSize];
153 2 1. extractImageAsByteArray : removed call to org/jocl/CL::clEnqueueReadImage → NO_COVERAGE
2. extractImageAsByteArray : replaced call to org/jocl/CL::clEnqueueReadImage with argument → NO_COVERAGE
		CL.clEnqueueReadImage(clCommandQueue,
154 16 1. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
2. extractImageAsByteArray : Substituted 2 with 3 → NO_COVERAGE
3. extractImageAsByteArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE
4. extractImageAsByteArray : Substituted 1 with 0 → NO_COVERAGE
5. extractImageAsByteArray : Substituted 1 with 0 → NO_COVERAGE
6. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
7. extractImageAsByteArray : Substituted 3 with 4 → NO_COVERAGE
8. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
9. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
10. extractImageAsByteArray : Substituted 1 with 0 → NO_COVERAGE
11. extractImageAsByteArray : Substituted 3 with 4 → NO_COVERAGE
12. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
13. extractImageAsByteArray : Substituted 1 with 2 → NO_COVERAGE
14. extractImageAsByteArray : Substituted 2 with 3 → NO_COVERAGE
15. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
16. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
				clData.clMem(),
155
				CL.CL_TRUE,
156
				new long[] { 0, 0, 0 },
157
				new long[] { width, height, 1 },
158
				0,
159
				0,
160 2 1. extractImageAsByteArray : Substituted 0 with 1 → NO_COVERAGE
2. extractImageAsByteArray : removed call to org/jocl/Pointer::to → NO_COVERAGE
				Pointer.to(data),
161
				0,
162
				null,
163
				null);
164
165 1 1. extractImageAsByteArray : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractImageAsByteArray → NO_COVERAGE
		return data;
166
	}
167
168
	/**
169
	 * Extracts floating-point data from OpenCL device memory as a float array.
170
	 * 
171
	 * <p>This method reads floating-point data from device memory and transfers it to host memory.
172
	 * The data type is validated to ensure it contains floating-point values before extraction.
173
	 * 
174
	 * @param openCLExecutionContext the OpenCL execution context
175
	 * @param argumentIndex the kernel argument index containing the float data
176
	 * @return float array containing the extracted data
177
	 * @throws IllegalArgumentException if the data is not of type float
178
	 */
179
	public float[] extractFloatArray(final OpenCLExecutionContext openCLExecutionContext, final int argumentIndex) {
180 1 1. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE
		final var device = openCLExecutionContext.device();
181 1 1. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE
		final var clData = extractClData(device, argumentIndex);
182
183 5 1. extractFloatArray : negated conditional → NO_COVERAGE
2. extractFloatArray : removed conditional - replaced equality check with false → NO_COVERAGE
3. extractFloatArray : removed conditional - replaced equality check with true → NO_COVERAGE
4. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clType → NO_COVERAGE
5. extractFloatArray : Substituted 4 with 5 → NO_COVERAGE
		if (clData.clType() != Sizeof.cl_float) {
184 1 1. extractFloatArray : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
			throw new IllegalArgumentException("Data is not of type of float[]");
185
		}
186
187 1 1. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE
		final var clCommandQueue = openCLExecutionContext.clCommandQueue();
188
189 1 1. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE
		final float[] data = new float[clData.size()];
190 2 1. extractFloatArray : removed call to org/jocl/CL::clEnqueueReadBuffer → NO_COVERAGE
2. extractFloatArray : replaced call to org/jocl/CL::clEnqueueReadBuffer with argument → NO_COVERAGE
		CL.clEnqueueReadBuffer(clCommandQueue,
191 3 1. extractFloatArray : Substituted 1 with 0 → NO_COVERAGE
2. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE
3. extractFloatArray : Substituted 0 with 1 → NO_COVERAGE
				clData.clMem(),
192
				CL.CL_TRUE,
193
				0,
194 3 1. extractFloatArray : Replaced integer multiplication with division → NO_COVERAGE
2. extractFloatArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE
3. extractFloatArray : Substituted 4 with 5 → NO_COVERAGE
				clData.size() * Sizeof.cl_float,
195 2 1. extractFloatArray : removed call to org/jocl/Pointer::to → NO_COVERAGE
2. extractFloatArray : Substituted 0 with 1 → NO_COVERAGE
				Pointer.to(data),
196
				0,
197
				null,
198
				null);
199
200 1 1. extractFloatArray : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractFloatArray → NO_COVERAGE
		return data;
201
	}
202
203
	/**
204
	 * Extracts integer data from OpenCL device memory as an int array.
205
	 * 
206
	 * <p>This method reads integer data from device memory and transfers it to host memory.
207
	 * The data type is validated to ensure it contains integer values before extraction.
208
	 * 
209
	 * @param openCLExecutionContext the OpenCL execution context
210
	 * @param argumentIndex the kernel argument index containing the integer data
211
	 * @return int array containing the extracted data
212
	 * @throws IllegalArgumentException if the data is not of type int
213
	 */
214
	public int[] extractIntArray(final OpenCLExecutionContext openCLExecutionContext, final int argumentIndex) {
215 1 1. extractIntArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE
		final var device = openCLExecutionContext.device();
216 1 1. extractIntArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE
		final var clData = extractClData(device, argumentIndex);
217
218 5 1. extractIntArray : removed conditional - replaced equality check with true → NO_COVERAGE
2. extractIntArray : removed conditional - replaced equality check with false → NO_COVERAGE
3. extractIntArray : Substituted 4 with 5 → NO_COVERAGE
4. extractIntArray : negated conditional → NO_COVERAGE
5. extractIntArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clType → NO_COVERAGE
		if (clData.clType() != Sizeof.cl_int) {
219 1 1. extractIntArray : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
			throw new IllegalArgumentException("Data is not of type of int[]");
220
		}
221
222 1 1. extractIntArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE
		final var clCommandQueue = openCLExecutionContext.clCommandQueue();
223
224 1 1. extractIntArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE
		final int[] data = new int[clData.size()];
225 2 1. extractIntArray : removed call to org/jocl/CL::clEnqueueReadBuffer → NO_COVERAGE
2. extractIntArray : replaced call to org/jocl/CL::clEnqueueReadBuffer with argument → NO_COVERAGE
		CL.clEnqueueReadBuffer(clCommandQueue,
226 3 1. extractIntArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE
2. extractIntArray : Substituted 1 with 0 → NO_COVERAGE
3. extractIntArray : Substituted 0 with 1 → NO_COVERAGE
				clData.clMem(),
227
				CL.CL_TRUE,
228
				0,
229 3 1. extractIntArray : Replaced integer multiplication with division → NO_COVERAGE
2. extractIntArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE
3. extractIntArray : Substituted 4 with 5 → NO_COVERAGE
				clData.size() * Sizeof.cl_int,
230 2 1. extractIntArray : Substituted 0 with 1 → NO_COVERAGE
2. extractIntArray : removed call to org/jocl/Pointer::to → NO_COVERAGE
				Pointer.to(data),
231
				0,
232
				null,
233
				null);
234
235 1 1. extractIntArray : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractIntArray → NO_COVERAGE
		return data;
236
	}
237
238
	/**
239
	 * Extracts long integer data from OpenCL device memory as a long array.
240
	 * 
241
	 * <p>This method reads long integer data from device memory and transfers it to host memory.
242
	 * The data type is validated to ensure it contains long integer values before extraction.
243
	 * 
244
	 * @param openCLExecutionContext the OpenCL execution context
245
	 * @param argumentIndex the kernel argument index containing the long integer data
246
	 * @return long array containing the extracted data
247
	 * @throws IllegalArgumentException if the data is not of type long
248
	 */
249
	public long[] extractLongArray(final OpenCLExecutionContext openCLExecutionContext, final int argumentIndex) {
250 1 1. extractLongArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE
		final var device = openCLExecutionContext.device();
251 1 1. extractLongArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE
		final var clData = extractClData(device, argumentIndex);
252
253 5 1. extractLongArray : Substituted 8 with 9 → NO_COVERAGE
2. extractLongArray : removed conditional - replaced equality check with false → NO_COVERAGE
3. extractLongArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clType → NO_COVERAGE
4. extractLongArray : negated conditional → NO_COVERAGE
5. extractLongArray : removed conditional - replaced equality check with true → NO_COVERAGE
		if (clData.clType() != Sizeof.cl_long) {
254 1 1. extractLongArray : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
			throw new IllegalArgumentException("Data is not of type of long[]");
255
		}
256
257 1 1. extractLongArray : removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE
		final var clCommandQueue = openCLExecutionContext.clCommandQueue();
258
259 1 1. extractLongArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE
		final long[] data = new long[clData.size()];
260 2 1. extractLongArray : replaced call to org/jocl/CL::clEnqueueReadBuffer with argument → NO_COVERAGE
2. extractLongArray : removed call to org/jocl/CL::clEnqueueReadBuffer → NO_COVERAGE
		CL.clEnqueueReadBuffer(clCommandQueue,
261 3 1. extractLongArray : Substituted 1 with 0 → NO_COVERAGE
2. extractLongArray : Substituted 0 with 1 → NO_COVERAGE
3. extractLongArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE
				clData.clMem(),
262
				CL.CL_TRUE,
263
				0,
264 3 1. extractLongArray : removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE
2. extractLongArray : Substituted 8 with 9 → NO_COVERAGE
3. extractLongArray : Replaced integer multiplication with division → NO_COVERAGE
				clData.size() * Sizeof.cl_long,
265 2 1. extractLongArray : Substituted 0 with 1 → NO_COVERAGE
2. extractLongArray : removed call to org/jocl/Pointer::to → NO_COVERAGE
				Pointer.to(data),
266
				0,
267
				null,
268
				null);
269 1 1. extractLongArray : replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractLongArray → NO_COVERAGE
		return data;
270
	}
271
}

Mutations

99

1.1
Location : extractClData
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

2.2
Location : extractClData
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

3.3
Location : extractClData
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : extractClData
Killed by : none
removed call to java/util/Map::containsKey → NO_COVERAGE

100

1.1
Location : extractClData
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

2.2
Location : extractClData
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/Device::name → NO_COVERAGE

103

1.1
Location : extractClData
Killed by : none
replaced call to java/util/Map::get with argument → NO_COVERAGE

2.2
Location : extractClData
Killed by : none
removed call to java/util/Map::get → NO_COVERAGE

105

1.1
Location : extractClData
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

2.2
Location : extractClData
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

3.3
Location : extractClData
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : extractClData
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

5.5
Location : extractClData
Killed by : none
removed call to java/util/Map::containsKey → NO_COVERAGE

106

1.1
Location : extractClData
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

109

1.1
Location : extractClData
Killed by : none
removed call to java/lang/Integer::valueOf → NO_COVERAGE

2.2
Location : extractClData
Killed by : none
removed call to java/util/Map::get → NO_COVERAGE

3.3
Location : extractClData
Killed by : none
replaced call to java/util/Map::get with argument → NO_COVERAGE

110

1.1
Location : extractClData
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE

120

1.1
Location : <init>
Killed by : none
Removed assignment to member variable resultData → NO_COVERAGE

147

1.1
Location : extractImageAsByteArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE

148

1.1
Location : extractImageAsByteArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE

150

1.1
Location : extractImageAsByteArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE

152

1.1
Location : extractImageAsByteArray
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

2.2
Location : extractImageAsByteArray
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

3.3
Location : extractImageAsByteArray
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

153

1.1
Location : extractImageAsByteArray
Killed by : none
removed call to org/jocl/CL::clEnqueueReadImage → NO_COVERAGE

2.2
Location : extractImageAsByteArray
Killed by : none
replaced call to org/jocl/CL::clEnqueueReadImage with argument → NO_COVERAGE

154

1.1
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : extractImageAsByteArray
Killed by : none
Substituted 2 with 3 → NO_COVERAGE

3.3
Location : extractImageAsByteArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE

4.4
Location : extractImageAsByteArray
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

5.5
Location : extractImageAsByteArray
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

6.6
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

7.7
Location : extractImageAsByteArray
Killed by : none
Substituted 3 with 4 → NO_COVERAGE

8.8
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

9.9
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

10.10
Location : extractImageAsByteArray
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

11.11
Location : extractImageAsByteArray
Killed by : none
Substituted 3 with 4 → NO_COVERAGE

12.12
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

13.13
Location : extractImageAsByteArray
Killed by : none
Substituted 1 with 2 → NO_COVERAGE

14.14
Location : extractImageAsByteArray
Killed by : none
Substituted 2 with 3 → NO_COVERAGE

15.15
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

16.16
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

160

1.1
Location : extractImageAsByteArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : extractImageAsByteArray
Killed by : none
removed call to org/jocl/Pointer::to → NO_COVERAGE

165

1.1
Location : extractImageAsByteArray
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractImageAsByteArray → NO_COVERAGE

180

1.1
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE

181

1.1
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE

183

1.1
Location : extractFloatArray
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : extractFloatArray
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

3.3
Location : extractFloatArray
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

4.4
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clType → NO_COVERAGE

5.5
Location : extractFloatArray
Killed by : none
Substituted 4 with 5 → NO_COVERAGE

184

1.1
Location : extractFloatArray
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

187

1.1
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE

189

1.1
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE

190

1.1
Location : extractFloatArray
Killed by : none
removed call to org/jocl/CL::clEnqueueReadBuffer → NO_COVERAGE

2.2
Location : extractFloatArray
Killed by : none
replaced call to org/jocl/CL::clEnqueueReadBuffer with argument → NO_COVERAGE

191

1.1
Location : extractFloatArray
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

2.2
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE

3.3
Location : extractFloatArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

194

1.1
Location : extractFloatArray
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

2.2
Location : extractFloatArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE

3.3
Location : extractFloatArray
Killed by : none
Substituted 4 with 5 → NO_COVERAGE

195

1.1
Location : extractFloatArray
Killed by : none
removed call to org/jocl/Pointer::to → NO_COVERAGE

2.2
Location : extractFloatArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

200

1.1
Location : extractFloatArray
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractFloatArray → NO_COVERAGE

215

1.1
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE

216

1.1
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE

218

1.1
Location : extractIntArray
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

2.2
Location : extractIntArray
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

3.3
Location : extractIntArray
Killed by : none
Substituted 4 with 5 → NO_COVERAGE

4.4
Location : extractIntArray
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clType → NO_COVERAGE

219

1.1
Location : extractIntArray
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

222

1.1
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE

224

1.1
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE

225

1.1
Location : extractIntArray
Killed by : none
removed call to org/jocl/CL::clEnqueueReadBuffer → NO_COVERAGE

2.2
Location : extractIntArray
Killed by : none
replaced call to org/jocl/CL::clEnqueueReadBuffer with argument → NO_COVERAGE

226

1.1
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE

2.2
Location : extractIntArray
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

3.3
Location : extractIntArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

229

1.1
Location : extractIntArray
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

2.2
Location : extractIntArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE

3.3
Location : extractIntArray
Killed by : none
Substituted 4 with 5 → NO_COVERAGE

230

1.1
Location : extractIntArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : extractIntArray
Killed by : none
removed call to org/jocl/Pointer::to → NO_COVERAGE

235

1.1
Location : extractIntArray
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractIntArray → NO_COVERAGE

250

1.1
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::device → NO_COVERAGE

251

1.1
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractClData → NO_COVERAGE

253

1.1
Location : extractLongArray
Killed by : none
Substituted 8 with 9 → NO_COVERAGE

2.2
Location : extractLongArray
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

3.3
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clType → NO_COVERAGE

4.4
Location : extractLongArray
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : extractLongArray
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

254

1.1
Location : extractLongArray
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

257

1.1
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/OpenCLExecutionContext::clCommandQueue → NO_COVERAGE

259

1.1
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE

260

1.1
Location : extractLongArray
Killed by : none
replaced call to org/jocl/CL::clEnqueueReadBuffer with argument → NO_COVERAGE

2.2
Location : extractLongArray
Killed by : none
removed call to org/jocl/CL::clEnqueueReadBuffer → NO_COVERAGE

261

1.1
Location : extractLongArray
Killed by : none
Substituted 1 with 0 → NO_COVERAGE

2.2
Location : extractLongArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

3.3
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::clMem → NO_COVERAGE

264

1.1
Location : extractLongArray
Killed by : none
removed call to net/bmahe/genetics4j/gpu/spec/fitness/cldata/CLData::size → NO_COVERAGE

2.2
Location : extractLongArray
Killed by : none
Substituted 8 with 9 → NO_COVERAGE

3.3
Location : extractLongArray
Killed by : none
Replaced integer multiplication with division → NO_COVERAGE

265

1.1
Location : extractLongArray
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : extractLongArray
Killed by : none
removed call to org/jocl/Pointer::to → NO_COVERAGE

269

1.1
Location : extractLongArray
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gpu/spec/fitness/ResultExtractor::extractLongArray → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.6