Commit 815fd53a authored by Timo Schwarte's avatar Timo Schwarte
Browse files

add more locks for openCL functions

parent 5859c443
......@@ -203,7 +203,10 @@ namespace ntlab
void GNSSAquisition::run()
{
setupKernels();
{
auto l = sharedClDevice.getScopedLockOfQueueSection();
setupKernels();
}
initCACodeLUTs();
if (threadShouldExit())
......@@ -312,7 +315,10 @@ namespace ntlab
#ifdef GNSS_ACQUISITION_ENABLE_PERFORMANCE_MEASUREMENT
auto sm = acquisitionTime.startScopedMeasurement (numSamplesFrac);
#endif
acquisitionKernel.setArg (4, caCode);
{
auto l = sharedClDevice.getScopedLockOfQueueSection();
acquisitionKernel.setArg(4, caCode);
}
{
auto l = sharedClDevice.getScopedLockOfQueueSection();
queue.finish();
......
......@@ -22,6 +22,8 @@ along with SoftwareDefinedRadio4JUCE. If not, see <http://www.gnu.org/licenses/>
#include <ntlab_software_defined_radio/OpenCL2/cl2.hpp>
#include <juce_audio_basics/juce_audio_basics.h>
#include <ntlab_software_defined_radio/PerformanceMeasurement/ProcessingTimeMeasurement.h>
#include <ntlab_software_defined_radio/SampleBuffers/SampleBuffers.h>
#include "../OpenCL2/clArray.h"
namespace ntlab
{
......
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