Skip to content

Commit

Permalink
Addressed more comments #3
Browse files Browse the repository at this point in the history
  • Loading branch information
amgrigoriev committed Oct 9, 2020
1 parent cae87cf commit 442c323
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ template <typename algorithmFPType>
Status DBSCANBatchKernelUCAPI<algorithmFPType>::setQueueFront(uint32_t queueEnd)
{
Status st;
auto val = _queueFront.template get<int>().toHost(ReadWriteMode::writeOnly, &st);
const auto valBuffer = _queueFront.template get<int>();
DAAL_CHECK(valBuffer.size() >= 1, services::ErrorBufferSizeIntegerOverflow);
const auto val = valBuffer.toHost(ReadWriteMode::readOnly, &st);
DAAL_CHECK_STATUS_VAR(st);
if (!val)
{
Expand All @@ -424,13 +426,14 @@ template <typename algorithmFPType>
Status DBSCANBatchKernelUCAPI<algorithmFPType>::getQueueFront(uint32_t & queueEnd)
{
Status st;
auto val = _queueFront.template get<int>().toHost(ReadWriteMode::readOnly, &st);
const auto valBuffer = _queueFront.template get<int>();
DAAL_CHECK(valBuffer.size() >= 1, services::ErrorBufferSizeIntegerOverflow);
const auto val = valBuffer.toHost(ReadWriteMode::readOnly, &st);
DAAL_CHECK_STATUS_VAR(st);
if (!val)
{
return Status(ErrorNullPtr);
}

queueEnd = *val.get();
return st;
}
Expand Down

0 comments on commit 442c323

Please sign in to comment.