Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev committed Oct 1, 2024
1 parent a6d6e8b commit 8a01218
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#ifndef __KDTREE_KNN_CLASSIFICATION_PREDICT_DENSE_DEFAULT_BATCH_IMPL_I__
#define __KDTREE_KNN_CLASSIFICATION_PREDICT_DENSE_DEFAULT_BATCH_IMPL_I__

#include "src/threading/threading.h"
#include "services/daal_defines.h"
#include "src/threading/threading.h"
#include "src/services/service_utils.h"
#include "algorithms/algorithm.h"
#include "services/daal_atomic_int.h"
Expand Down Expand Up @@ -208,6 +208,8 @@ Status KNNClassificationPredictKernel<algorithmFpType, defaultDense, cpu>::compu

services::internal::TArrayScalable<algorithmFpType *, cpu> soa_arrays;
bool isHomogenSOA = checkHomogenSOA<algorithmFpType, cpu>(data, soa_arrays);

services::Environment::getInstance()->setNumberOfThreads(1);
daal::threader_for(blockCount, blockCount, [&](int iBlock) {
Local * const local = localTLS.local();
DAAL_CHECK_MALLOC_THR(local);
Expand Down Expand Up @@ -270,7 +272,7 @@ Status KNNClassificationPredictKernel<algorithmFpType, defaultDense, cpu>::compu

status = safeStat.detach();
if (!status) return status;

services::Environment::getInstance()->setNumberOfThreads(nThreads);
localTLS.reduce([&](Local * ptr) -> void {
if (ptr)
{
Expand Down

0 comments on commit 8a01218

Please sign in to comment.