From 51b2e49e08901fd649f8cc13b8ba1d33166e413f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 18 Nov 2016 17:49:45 +0100 Subject: Improve consts in matlab undocumented function declarations --- matlab/mex/mexDataManagerHelpFunctions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'matlab/mex/mexDataManagerHelpFunctions.cpp') diff --git a/matlab/mex/mexDataManagerHelpFunctions.cpp b/matlab/mex/mexDataManagerHelpFunctions.cpp index 1794abb..95d4640 100644 --- a/matlab/mex/mexDataManagerHelpFunctions.cpp +++ b/matlab/mex/mexDataManagerHelpFunctions.cpp @@ -42,10 +42,10 @@ $Id$ #ifdef USE_MATLAB_UNDOCUMENTED extern "C" { mxArray *mxCreateSharedDataCopy(const mxArray *pr); -bool mxUnshareArray(const mxArray *pr, const bool noDeepCopy); -mxArray *mxUnreference(const mxArray *pr); +bool mxUnshareArray(mxArray *pr, bool noDeepCopy); +mxArray *mxUnreference(mxArray *pr); #if 0 -// Unsupported in Matlab R2014b +// Unsupported in Matlab R2014b and later bool mxIsSharedArray(const mxArray *pr); #endif } @@ -66,12 +66,12 @@ public: // First unshare the input array, so that we may modify it. if (bUnshare) { #if 0 - // Unsupported in Matlab R2014b + // Unsupported in Matlab R2014b and later if (mxIsSharedArray(_pArray)) { fprintf(stderr, "Performance note: unsharing shared array in link\n"); } #endif - mxUnshareArray(_pArray, false); + mxUnshareArray(const_cast(_pArray), false); //fprintf(stderr, "Unshared:\narray: %p\tdata: %p\n", (void*)_pArray, (void*)mxGetData(_pArray)); } // Then create a (persistent) copy so the data won't be deleted -- cgit v1.2.3 From 64a48bea80b909311351dc3b1345a17c693ddb69 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 28 Sep 2016 14:58:41 +0200 Subject: Add experimental support for Octave Based on initial patch by @kalvdans. --- matlab/mex/mexDataManagerHelpFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'matlab/mex/mexDataManagerHelpFunctions.cpp') diff --git a/matlab/mex/mexDataManagerHelpFunctions.cpp b/matlab/mex/mexDataManagerHelpFunctions.cpp index 95d4640..a514565 100644 --- a/matlab/mex/mexDataManagerHelpFunctions.cpp +++ b/matlab/mex/mexDataManagerHelpFunctions.cpp @@ -79,7 +79,7 @@ public: m_pLink = mxCreateSharedDataCopy(_pArray); //fprintf(stderr, "SharedDataCopy:\narray: %p\tdata: %p\n", (void*)m_pLink, (void*)mxGetData(m_pLink)); mexMakeArrayPersistent(m_pLink); - m_fPtr = (float *)mxGetData(m_pLink); + m_fPtr = (float *)mxGetData(_pArray); m_fPtr += iOffset; } virtual ~CFloat32CustomMemoryMatlab3D() { -- cgit v1.2.3 From 71db6331f8dd0d5abbeee92977af01293be4f427 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 28 Nov 2016 15:54:07 +0100 Subject: Update headers (website+2016) --- matlab/mex/mexDataManagerHelpFunctions.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'matlab/mex/mexDataManagerHelpFunctions.cpp') diff --git a/matlab/mex/mexDataManagerHelpFunctions.cpp b/matlab/mex/mexDataManagerHelpFunctions.cpp index a514565..ebf6f8f 100644 --- a/matlab/mex/mexDataManagerHelpFunctions.cpp +++ b/matlab/mex/mexDataManagerHelpFunctions.cpp @@ -1,10 +1,10 @@ /* ----------------------------------------------------------------------- -Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp - 2014-2015, CWI, Amsterdam +Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp + 2014-2016, CWI, Amsterdam Contact: astra@uantwerpen.be -Website: http://sf.net/projects/astra-toolbox +Website: http://www.astra-toolbox.com/ This file is part of the ASTRA Toolbox. @@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License along with the ASTRA Toolbox. If not, see . ----------------------------------------------------------------------- -$Id$ */ #include "mexDataManagerHelpFunctions.h" -- cgit v1.2.3 From 1d851f0a8fa093e044c7264569cc6f88df39a16e Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 26 Jan 2017 14:57:42 +0100 Subject: Remove unused 3d global min/max --- matlab/mex/mexDataManagerHelpFunctions.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'matlab/mex/mexDataManagerHelpFunctions.cpp') diff --git a/matlab/mex/mexDataManagerHelpFunctions.cpp b/matlab/mex/mexDataManagerHelpFunctions.cpp index ebf6f8f..c47ee27 100644 --- a/matlab/mex/mexDataManagerHelpFunctions.cpp +++ b/matlab/mex/mexDataManagerHelpFunctions.cpp @@ -164,17 +164,6 @@ checkDataSize(const mxArray * const mArray, && (zOffset + geom->getGridSliceCount()) <= dims[2]); } -//----------------------------------------------------------------------------------------- -void -updateStatistics(const std::vector & vecIn) -{ - const size_t tot_size = vecIn.size(); - for (size_t count = 0; count < tot_size; count++) - { - vecIn[count]->updateStatistics(); - } -} - //----------------------------------------------------------------------------------------- void getDataPointers(const std::vector & vecIn, -- cgit v1.2.3