-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getClusters
methods and enhance general interface
#81
Conversation
2 * nPoints); | ||
|
||
// Wait for all the operations in the queue to finish | ||
alpaka::wait(queue_); | ||
} | ||
|
||
template <uint8_t Ndim> | ||
std::map<int, std::vector<int>> CLUEAlgoAlpaka<Ndim>::getClusters( |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
std::map<int, std::vector<int>> CLUEAlgoAlpaka<Ndim>::getClusters( | ||
const PointsSoA<Ndim>& h_points) { | ||
// cluster all points with same clusterId | ||
std::map<int, std::vector<int>> clusters; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good. Please update the binding modules and run.h too.
PointsAlpaka<Ndim>& dev_points, | ||
Queue queue_, | ||
std::size_t block_size) { | ||
// calculate the number of tiles and their size |
Check warning
Code scanning / Flawfinder (reported by Codacy)
Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. Warning
include/CLUEstering/CLUEstering.hpp
Outdated
alpaka::memcpy(queue_, | ||
clue::make_device_view(device, (*d_tiles)->minMax(), 2 * Ndim), | ||
clue::make_host_view(min_max.data(), 2 * Ndim)); | ||
alpaka::memcpy(queue_, |
Check warning
Code scanning / Flawfinder (reported by Codacy)
Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. Warning
const KernelType& kernel, | ||
Queue queue_, | ||
std::size_t block_size); | ||
|
||
template <typename KernelType> | ||
void make_clusters(PointsSoA<Ndim>& h_points, |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
const KernelType& kernel, | ||
Queue queue_, | ||
std::size_t block_size); | ||
|
||
template <typename KernelType> | ||
void make_clusters(PointsSoA<Ndim>& h_points, | ||
PointsAlpaka<Ndim>& dev_points, |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
include/CLUEstering/CLUEstering.hpp
Outdated
clue::make_device_view(device, (*d_tiles)->tileSize(), Ndim), | ||
clue::make_host_view(tile_size, Ndim)); | ||
alpaka::wait(queue_); | ||
|
Check notice
Code scanning / Cppcheck (reported by Codacy)
memset() called to fill 0 bytes. Note
alpaka::memcpy(queue_, | ||
clue::make_host_view(h_points.clusterIndexes(), 2 * nPoints), | ||
clue::make_device_view( | ||
device, dev_points.result_buffer.data() + nPoints, 2 * nPoints), |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 10.4 rule Note
one instantiates the device points, the other takes them from outside
777a9b1
to
a7b3d21
Compare
getClusters
methods and enhance interface
getClusters
methods and enhance interfacegetClusters
methods and enhance general interface
in
CLUEAlgoAlpaka
:getClusters
methodalso:
PointsAlpakaView
out ofPointsAlpaka