KernelInfoReader.java

1
package net.bmahe.genetics4j.gpu.opencl;
2
3
import java.util.Objects;
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.cl_device_id;
10
import org.jocl.cl_kernel;
11
12
import net.bmahe.genetics4j.gpu.opencl.model.KernelInfo;
13
14
public class KernelInfoReader {
15
	public static final Logger logger = LogManager.getLogger(KernelInfoReader.class);
16
17
	public KernelInfo read(final cl_device_id deviceId, final cl_kernel kernel, final String kernelName) {
18
		Objects.requireNonNull(deviceId);
19
		Objects.requireNonNull(kernel);
20
		Validate.notBlank(kernelName);
21
22 1 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/KernelInfo::builder → NO_COVERAGE
		final var kernelInfoBuilder = KernelInfo.builder();
23 2 1. read : replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::name with receiver → NO_COVERAGE
2. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::name → NO_COVERAGE
		kernelInfoBuilder.name(kernelName);
24
25 1 1. read : Substituted 4528 with 4529 → NO_COVERAGE
		final long workGroupSize = KernelInfoUtils
26 1 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE
				.getKernelWorkGroupInfoLong(deviceId, kernel, CL.CL_KERNEL_WORK_GROUP_SIZE);
27 2 1. read : replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::workGroupSize with receiver → NO_COVERAGE
2. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::workGroupSize → NO_COVERAGE
		kernelInfoBuilder.workGroupSize(workGroupSize);
28
29 1 1. read : Substituted 4531 with 4532 → NO_COVERAGE
		final long preferredWorkGroupSizeMultiple = KernelInfoUtils
30 1 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE
				.getKernelWorkGroupInfoLong(deviceId, kernel, CL.CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE);
31 2 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::preferredWorkGroupSizeMultiple → NO_COVERAGE
2. read : replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::preferredWorkGroupSizeMultiple with receiver → NO_COVERAGE
		kernelInfoBuilder.preferredWorkGroupSizeMultiple(preferredWorkGroupSizeMultiple);
32
33 1 1. read : Substituted 4530 with 4531 → NO_COVERAGE
		final long localMemSize = KernelInfoUtils
34 1 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE
				.getKernelWorkGroupInfoLong(deviceId, kernel, CL.CL_KERNEL_LOCAL_MEM_SIZE);
35 2 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::localMemSize → NO_COVERAGE
2. read : replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::localMemSize with receiver → NO_COVERAGE
		kernelInfoBuilder.localMemSize(localMemSize);
36
37 1 1. read : Substituted 4532 with 4533 → NO_COVERAGE
		final long privateMemSize = KernelInfoUtils
38 1 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE
				.getKernelWorkGroupInfoLong(deviceId, kernel, CL.CL_KERNEL_PRIVATE_MEM_SIZE);
39 2 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::privateMemSize → NO_COVERAGE
2. read : replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::privateMemSize with receiver → NO_COVERAGE
		kernelInfoBuilder.privateMemSize(privateMemSize);
40
41 2 1. read : removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::build → NO_COVERAGE
2. read : replaced return value with null for net/bmahe/genetics4j/gpu/opencl/KernelInfoReader::read → NO_COVERAGE
		return kernelInfoBuilder.build();
42
	}
43
}

Mutations

22

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/KernelInfo::builder → NO_COVERAGE

23

1.1
Location : read
Killed by : none
replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::name with receiver → NO_COVERAGE

2.2
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::name → NO_COVERAGE

25

1.1
Location : read
Killed by : none
Substituted 4528 with 4529 → NO_COVERAGE

26

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE

27

1.1
Location : read
Killed by : none
replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::workGroupSize with receiver → NO_COVERAGE

2.2
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::workGroupSize → NO_COVERAGE

29

1.1
Location : read
Killed by : none
Substituted 4531 with 4532 → NO_COVERAGE

30

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE

31

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::preferredWorkGroupSizeMultiple → NO_COVERAGE

2.2
Location : read
Killed by : none
replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::preferredWorkGroupSizeMultiple with receiver → NO_COVERAGE

33

1.1
Location : read
Killed by : none
Substituted 4530 with 4531 → NO_COVERAGE

34

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE

35

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::localMemSize → NO_COVERAGE

2.2
Location : read
Killed by : none
replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::localMemSize with receiver → NO_COVERAGE

37

1.1
Location : read
Killed by : none
Substituted 4532 with 4533 → NO_COVERAGE

38

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/KernelInfoUtils::getKernelWorkGroupInfoLong → NO_COVERAGE

39

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::privateMemSize → NO_COVERAGE

2.2
Location : read
Killed by : none
replaced call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::privateMemSize with receiver → NO_COVERAGE

41

1.1
Location : read
Killed by : none
removed call to net/bmahe/genetics4j/gpu/opencl/model/ImmutableKernelInfo$Builder::build → NO_COVERAGE

2.2
Location : read
Killed by : none
replaced return value with null for net/bmahe/genetics4j/gpu/opencl/KernelInfoReader::read → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.25.7 support