提交 b8d26ff4 编写于 作者: L liaogang 提交者: liaogang

fix float except bugs

上级 aaed5cfc
...@@ -46,7 +46,6 @@ PyDataProvider::PyDataProvider(const DataConfig& config, bool useGpu, ...@@ -46,7 +46,6 @@ PyDataProvider::PyDataProvider(const DataConfig& config, bool useGpu,
} }
void PyDataProvider::loadData(const std::vector<std::string>& fileList) { void PyDataProvider::loadData(const std::vector<std::string>& fileList) {
int feFlag = fegetexcept();
VLOG(1) << "module:" << pyModuleName_ << " class:" << pyClassName_; VLOG(1) << "module:" << pyModuleName_ << " class:" << pyClassName_;
classInstance_ = classInstance_ =
createPythonClass(pyModuleName_, pyClassName_, fileList, pyUserArgs_); createPythonClass(pyModuleName_, pyClassName_, fileList, pyUserArgs_);
...@@ -57,7 +56,7 @@ void PyDataProvider::loadData(const std::vector<std::string>& fileList) { ...@@ -57,7 +56,7 @@ void PyDataProvider::loadData(const std::vector<std::string>& fileList) {
std::string headerInfo = std::string headerInfo =
std::string(PyString_AsString(obj.get()), PyString_Size(obj.get())); std::string(PyString_AsString(obj.get()), PyString_Size(obj.get()));
parseHeaderData(headerInfo); parseHeaderData(headerInfo);
feenableexcept(feFlag); feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
} }
void PyDataProvider::parseHeaderData(const std::string& headerData) { void PyDataProvider::parseHeaderData(const std::string& headerData) {
......
...@@ -53,11 +53,7 @@ private: ...@@ -53,11 +53,7 @@ private:
void printAll(); void printAll();
std::unique_ptr<Allocator> allocator_; std::unique_ptr<Allocator> allocator_;
std::mutex mutex_; std::mutex mutex_;
#if defined(__APPLE__) || defined(__OSX__)
std::map<size_t, std::vector<void*>> pool_;
#else
std::unordered_map<size_t, std::vector<void*>> pool_; std::unordered_map<size_t, std::vector<void*>> pool_;
#endif
size_t sizeLimit_; size_t sizeLimit_;
size_t poolMemorySize_; size_t poolMemorySize_;
std::string name_; std::string name_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册