Skip to content

Commit

Permalink
Исправление ошибок
Browse files Browse the repository at this point in the history
  • Loading branch information
anyks committed Sep 9, 2020
1 parent 7a05d95 commit fc4e3d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# [Change Log](https://github.com/anyks/asc/archive/release.tar.gz)

## [1.0.1](https://github.com/anyks/asc/archive/v1.0.1.tar.gz) Bug fixes

## [1.0.0](https://github.com/anyks/asc/archive/v1.0.0.tar.gz) Creating a repository
2 changes: 1 addition & 1 deletion app/asc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Название языковой модели
#define ANYKS_ASC_NAME "asc"
// Версия приложения
#define ANYKS_ASC_VERSION "1.0.0"
#define ANYKS_ASC_VERSION "1.0.1"
// Версия словаря
#define ANYKS_ASC_DICT_VERSION "1.0.0"
// Автор приложения
Expand Down
2 changes: 1 addition & 1 deletion contrib/include/hnswlib/hnswalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ namespace hnswlib {
size_t dim = *((size_t *) dist_func_param_);
std::vector<data_t> data;
data_t* data_ptr = (data_t*) data_ptrv;
for (int i = 0; i < dim; i++) {
for (size_t i = 0; i < dim; i++) {
data.push_back(*data_ptr);
data_ptr += 1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/hnsw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const pair <vector <labeltype>, vector <float>> anyks::Hnsw::query(const vector
// Если количество ядер не установлено, устанавливаем по дефолту
if(threads <= 0) threads = this->threads;
// Если количество строк меньше количества ядер * 4, тогда переводим всё на одно ядро
if(rows <= (threads * 4)) threads = 1;
if(rows <= size_t(threads * 4)) threads = 1;
// Создаем массив дистанций
result.second = vector <float> (rows * k);
// Создаем массив данных
Expand Down Expand Up @@ -432,7 +432,7 @@ void anyks::Hnsw::add(const vector <vector <float>> & input, const vector <size_
// Если количество фич не равно размерности вектора
if(features != this->dim) throw runtime_error("Wrong dimensionality of the vectors.");
// Если количество строк меньше количества ядер * 4, тогда переводим всё на одно ядро
if(rows <= (threads * 4)) threads = 1;
if(rows <= size_t(threads * 4)) threads = 1;
{
// Начало работы
u_short start = 0;
Expand Down

0 comments on commit fc4e3d4

Please sign in to comment.