diff --git a/kernel/src/kernel/player/ovkCPlayer.cpp b/kernel/src/kernel/player/ovkCPlayer.cpp index 9dc1d74beaef88fe88bb9d4953855c8c55c4bac0..790f1ddf34fc66069aa9141719dd0282a015199c 100644 --- a/kernel/src/kernel/player/ovkCPlayer.cpp +++ b/kernel/src/kernel/player/ovkCPlayer.cpp @@ -20,10 +20,8 @@ using namespace std; using namespace OpenViBE; using namespace /*OpenViBE::*/Kernel; -using namespace /*OpenViBE::*/Kernel; using namespace /*OpenViBE::*/Plugins; - const uint64_t SCHEDULER_DEFAULT_FREQUENCY = 128; const CTime SCHEDULER_MAXIMUM_LOOPS_DURATION = (100LL << 22); /* 100/1024 seconds, approx 100ms */ @@ -239,9 +237,7 @@ bool CPlayer::setFastForwardMaximumFactor(const double fastForwardFactor) } double CPlayer::getFastForwardMaximumFactor() const { return m_fastForwardMaximumFactor; } - double CPlayer::getCPUUsage() const { return m_scheduler.getCPUUsage(); } - bool CPlayer::isHoldingResources() const { return m_scheduler.isHoldingResources(); } bool CPlayer::loop(const CTime elapsedTime, const CTime maximumTimeToReach) diff --git a/toolkit/include/toolkit/tools/ovtkMatrix.h b/toolkit/include/toolkit/tools/ovtkMatrix.h index 0adfce16bec266dc7842b74eafce5d6b0210cf7a..cae2ef9cc718758ea49e987e0167d9ef8801ce3d 100644 --- a/toolkit/include/toolkit/tools/ovtkMatrix.h +++ b/toolkit/include/toolkit/tools/ovtkMatrix.h @@ -8,9 +8,6 @@ namespace Matrix { OVTK_API bool copy(CMatrix& dst, const CMatrix& src); OVTK_API bool copyDescription(CMatrix& dst, const CMatrix& src); OVTK_API bool copyContent(CMatrix& dst, const CMatrix& src); -OVTK_API bool isDescriptionSimilar(const CMatrix& src1, const CMatrix& src2, bool checkLabels = true); -OVTK_API bool isContentSimilar(const CMatrix& src1, const CMatrix& src2); -OVTK_API bool isContentValid(const CMatrix& src, const bool checkNotANumber = true, const bool checkInfinity = true); OVTK_API bool toString(const CMatrix& matrix, CString& str, const size_t precision = 6); OVTK_API bool fromString(CMatrix& matrix, const CString& str); @@ -18,11 +15,5 @@ OVTK_API bool fromString(CMatrix& matrix, const CString& str); OVTK_API bool saveToTextFile(const CMatrix& matrix, const CString& filename, const size_t precision = 6); OVTK_API bool loadFromTextFile(CMatrix& matrix, const CString& filename); } // namespace Matrix - -namespace MatrixManipulation { -inline bool copy(CMatrix& dst, const CMatrix& src) { return Matrix::copy(dst, src); } -inline bool copyDescription(CMatrix& dst, const CMatrix& src) { return Matrix::copyDescription(dst, src); } -inline bool copyContent(CMatrix& dst, const CMatrix& src) { return Matrix::copyContent(dst, src); } -} // namespace MatrixManipulation } // namespace Toolkit } // namespace OpenViBE diff --git a/toolkit/src/tools/ovtkMatrix.cpp b/toolkit/src/tools/ovtkMatrix.cpp index 21838ad3dfe8b6439d4184fa2c4efbe75a0f8f48..53e249cb7bf8cce2770364f6177d43b5da180e2b 100644 --- a/toolkit/src/tools/ovtkMatrix.cpp +++ b/toolkit/src/tools/ovtkMatrix.cpp @@ -54,50 +54,6 @@ bool Matrix::copyContent(CMatrix& dst, const CMatrix& src) return true; } -bool Matrix::isDescriptionSimilar(const CMatrix& src1, const CMatrix& src2, const bool checkLabels) -{ - if (&src1 == &src2) { return true; } - - if (src1.getDimensionCount() != src2.getDimensionCount()) { return false; } - - for (size_t i = 0; i < src1.getDimensionCount(); ++i) { if (src1.getDimensionSize(i) != src2.getDimensionSize(i)) { return false; } } - - if (checkLabels) - { - for (size_t i = 0; i < src1.getDimensionCount(); ++i) - { - for (size_t j = 0; j < src1.getDimensionSize(i); ++j) - { - if (src1.getDimensionLabel(i, j) == src2.getDimensionLabel(i, j)) { return false; } - } - } - } - - return true; -} - -bool Matrix::isContentSimilar(const CMatrix& src1, const CMatrix& src2) -{ - if (&src1 == &src2) { return true; } - - if (src1.getSize() != src2.getSize()) { return false; } - - return memcmp(src1.getBuffer(), src2.getBuffer(), src1.getSize() * sizeof(double)) == 0; -} - -bool Matrix::isContentValid(const CMatrix& src, const bool checkNotANumber, const bool checkInfinity) -{ - const double* buffer = src.getBuffer(); - const double* bufferEnd = src.getBuffer() + src.getSize(); - while (buffer != bufferEnd) - { - if (checkNotANumber && std::isnan(*buffer)) { return false; } - if (checkInfinity && std::isinf(*buffer)) { return false; } - buffer++; - } - return true; -} - enum class EParsingStatus { Nothing, ParsingHeader, ParsingHeaderDimension, ParsingHeaderLabel, ParsingBuffer, ParsingBufferValue }; // tokens in the ascii matrix format