/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
contrib/python/contourpy/src/util.cpp
24 строки
443 B
Anton Myagkov
Update ydb version to 24.4 (#4579)
07 фев 2026, 11:59
Не верифицирован
07 фев 2026, 11:59
2c21cae
Код
Авторство
О чём код?
#include "util.h" #include <thread> namespace contourpy { bool Util::_nan_loaded = false; double Util::nan = 0.0; void Util::ensure_nan_loaded() { if (!_nan_loaded) { auto numpy = py::module_::import("numpy"); nan = numpy.attr("nan").cast<double>(); _nan_loaded = true; } } index_t Util::get_max_threads() { return static_cast<index_t>(std::thread::hardware_concurrency()); } } // namespace contourpy