added some comments on the modifications done into the code

This commit is contained in:
Joachim
2020-03-24 11:21:27 +01:00
parent edc7e1c033
commit 7742d416d4
9 changed files with 13 additions and 3 deletions

View File

@ -21,7 +21,8 @@ class AllocatorStatistics : public AllocatorStatisticsInterface
{
protected:
#ifdef CV_CXX11
std::atomic<long> curr, total, total_allocs, peak; // ESP32 modification (from <long long> to <long>)
// std::atomic<long long> curr, total, total_allocs, peak;
std::atomic<long> curr, total, total_allocs, peak; // esp32 doesn't support hardware 64bit atomic. FIXME: add software support
#else
volatile long long curr, total, total_allocs, peak; // overflow is possible, CV_XADD operates with 'int' only
#endif

View File

@ -942,6 +942,7 @@ int cv::getNumberOfCPUs(void)
#endif
// esp32 doesn't support sysconf call. FIXME: add support
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(ESP32)
static unsigned cpu_count_sysconf = (unsigned)sysconf( _SC_NPROCESSORS_ONLN );

View File

@ -1000,6 +1000,7 @@ String tempfile( const char* suffix )
fname = fname + "__opencv_temp.XXXXXX";
}
// FIXME: esp32 compilation only find mktemp and not mkstemp
//const int fd = mkstemp((char*)fname.c_str());
//if (fd == -1) return String();

View File

@ -136,6 +136,7 @@ public:
{
}
// Optimization doesn't works with xtensa cross-compiler
#pragma GCC push_options
#pragma GCC optimize ("-O0")
virtual void operator()(const Range& range) const CV_OVERRIDE

View File

@ -1777,6 +1777,7 @@ calcSparseBackProj_8u( std::vector<uchar*>& _ptrs, const std::vector<int>& _delt
}
// Optimization doesn't works with xtensa cross-compiler
#pragma GCC push_options
#pragma GCC optimize ("-O0")
void cv::calcBackProject( const Mat* images, int nimages, const int* channels,