You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_hnswSpace = std::make_unique<hnswlib::L2Space>(dimensions); //If we use a local parameter here instead of a member variable we get a crash later on in the program when calling the hwnsIndex again
//_faissIndexIVF->nprobe = _nprobe; // Set the number of clusters to search
765
+
799
766
}
767
+
else {
800
768
801
-
// Set a high ef for query-time (improves recall, at the expense of query latency)
802
-
//_hnswIndex->setEf(_hwnsEfSearch);
803
-
804
-
// Test recall: query each point for its nearest neighbor.
805
-
float correct = 0;
806
-
#pragma omp parallel for schedule(guided)
807
-
for (int32_t i = 0; i < numVoxels; i++) {
808
-
constfloat* queryPoint = voxelData.data() + i * dimensions;
809
-
std::priority_queue<std::pair<float, hnswlib::labeltype>> result = _hnswIndex->searchKnn(queryPoint, 1);
810
-
float distance = result.top().first;
811
-
#pragma omp critical
812
-
{
813
-
if (distance == 0)
814
-
correct++;
769
+
// Initialize HNSW space and index
770
+
_hnswSpace = std::make_unique<hnswlib::L2Space>(dimensions); //If we use a local parameter here instead of a member variable we get a crash later on in the program when calling the hwnsIndex again
QVector2D ComputeMeanOfNN(const std::vector<std::pair<float, hnswlib::labeltype>>& neighbors, int k, const std::vector<float>& positionData);
130
+
QVector2D ComputeMeanOfNN(const std::vector<std::pair<float, int64_t>>& neighbors, int k, const std::vector<float>& positionData);
127
131
voidupdateRenderModeParameters();
128
132
129
133
voidrenderFullData();
@@ -230,14 +234,22 @@ class VolumeRenderer : protected QOpenGLFunctions_4_3_Core
230
234
mv::Vector3f _cameraPos;
231
235
232
236
size_t _fullDataMemorySize = 0; // The size of the full data in bytes
233
-
size_t _fullGPUMemorySize = static_cast<size_t>(2 * 1024 * 1024) * 1024; // The size of the full data in bytes on the GPU if we use normal int it causes a overflow; The SSBOs are limited to 2GB, so even if the GPU has more VRAM we limit the size to 2GB for the full data mode.
237
+
size_t _fullGPUMemorySize = static_cast<size_t>(14 * 1024 * 1024) * 1024; // The size of the full data in bytes on the GPU if we use normal int it causes a overflow; The SSBOs are limited to 2GB, so even if the GPU has more VRAM we limit the size to 2GB for the full data mode.
int _nprobe = 100; // Number of probes for Faiss IVF index
250
+
251
+
// Boolean to select ANN library
252
+
bool _useFaissANN = true;
241
253
242
254
// Full Data Rendermode Parameters
243
255
std::vector<std::vector<int>> _GPUBatches; // Batches of pixel indices for the full data mode as it is not always possible to fit all pixels in one batch
0 commit comments