1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/hanbert-faiss

Клонировать/Скачать
FaissException.cpp 878
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Lucas Hosseini Отправлено 06.07.2018 15:12 6880286
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD+Patents license found in the
* LICENSE file in the root directory of this source tree.
*/
// -*- c++ -*-
#include "FaissException.h"
namespace faiss {
FaissException::FaissException(const std::string& m)
: msg(m) {
}
FaissException::FaissException(const std::string& m,
const char* funcName,
const char* file,
int line) {
int size = snprintf(nullptr, 0, "Error in %s at %s:%d: %s",
funcName, file, line, m.c_str());
msg.resize(size + 1);
snprintf(&msg[0], msg.size(), "Error in %s at %s:%d: %s",
funcName, file, line, m.c_str());
}
const char*
FaissException::what() const noexcept {
return msg.c_str();
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/hanbert-faiss.git
git@api.gitlife.ru:oschina-mirror/hanbert-faiss.git
oschina-mirror
hanbert-faiss
hanbert-faiss
master