Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit b264e2e7 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

OpenCL bug-fix: memory leaks.

parent 376f75c4
......@@ -107,6 +107,7 @@ public class CLConvolution {
initCL();
buildProgram();
hostGaussKernel = CLUtils.toFloatBuffer(kernel);
hostScenario = MemoryUtil.memAllocFloat(matrixWidth * matrixHeight);
output = MemoryUtil.memAllocFloat(matrixWidth * matrixHeight);
......
......@@ -48,7 +48,7 @@ public class TestConvolution {
float[] input = Convolution.generdateInputMatrix(inputWidth * inputHeight);
float[] javaOutput = Convolution.convolve(input, kernel, inputWidth, inputHeight, kernelWidth);
CLConvolution clConvolution = new CLConvolution(inputWidth, inputHeight, kernelWidth, kernel);
CLConvolution clConvolution = new CLConvolution(CLConvolution.KernelType.NonSeparate, inputWidth, inputHeight, kernelWidth, kernel);
float[] clOutput = clConvolution.convolve(input);
clConvolution.clearCL();
equalsMatrixValues(javaOutput, clOutput, 0.00001f);
......@@ -66,7 +66,7 @@ public class TestConvolution {
float[] output = Convolution.convolveCol(input, rowVector, inputWidth, inputHeight, kernelWidth);
CLConvolution clConvolution = new CLConvolution(inputWidth, inputHeight, kernelWidth, rowVector);
CLConvolution clConvolution = new CLConvolution(CLConvolution.KernelType.Col, inputWidth, inputHeight, kernelWidth, rowVector);
float[] clOutput = clConvolution.convolve(input);
clConvolution.clearCL();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment