diff --git a/MATLAB/Algorithms/FDK.m b/MATLAB/Algorithms/FDK.m index 67e418e5..1b6bd247 100644 --- a/MATLAB/Algorithms/FDK.m +++ b/MATLAB/Algorithms/FDK.m @@ -38,7 +38,7 @@ % Codes: https://github.com/CERN/TIGRE/ % Coded by: Kyungsang Kim, modified by Ander Biguri, Brandon Nelson %-------------------------------------------------------------------------- -[filter,parker,dowang,gpuids]=parse_inputs(angles,varargin); +[filter,parker,dowang,usegpufft,gpuids]=parse_inputs(angles,varargin); geo=checkGeo(geo,angles); geo.filter=filter; @@ -73,7 +73,7 @@ proj(:,:,ii) = proj(:,:,ii).*w'; end %% Fourier transform based filtering -proj = filtering(proj,geo,angles,parker); % Not sure if offsets are good in here +proj = filtering(proj,geo,angles,parker,usegpufft); % Not sure if offsets are good in here %RMFIELD Remove fields from a structure array. geo=rmfield(geo,'filter'); @@ -113,9 +113,9 @@ end -function [filter, parker, wang, gpuids]=parse_inputs(angles,argin) +function [filter, parker, wang, usegpufft, gpuids]=parse_inputs(angles,argin) -opts = {'filter','parker','wang','gpuids'}; +opts = {'filter','parker','wang','usegpufft','gpuids'}; defaults=ones(length(opts),1); % Check inputs @@ -174,6 +174,12 @@ end filter=val; end + case 'usegpufft' + if default + usegpufft=true; + else + usegpufft=val; + end case 'gpuids' if default gpuids = GpuIds(); diff --git a/MATLAB/Compile.m b/MATLAB/Compile.m index e0b82ff1..034d08a3 100644 --- a/MATLAB/Compile.m +++ b/MATLAB/Compile.m @@ -62,15 +62,16 @@ if ispc if ~isempty(strfind(computer('arch'),'64')) - mex -largeArrayDims ./Utilities/cuda_interface/Ax_mex.cpp ../Common/CUDA/ray_interpolated_projection.cu ../Common/CUDA/Siddon_projection.cu ../Common/CUDA/ray_interpolated_projection_parallel.cu ../Common/CUDA/Siddon_projection_parallel.cu ../Common/CUDA/GpuIds.cpp -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/cuda_interface/Atb_mex.cpp ../Common/CUDA/voxel_backprojection.cu ../Common/CUDA/voxel_backprojection2.cu ../Common/CUDA/voxel_backprojection_parallel.cu ../Common/CUDA/GpuIds.cpp -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/cuda_interface/minTV.cpp ../Common/CUDA/POCS_TV.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/IO/VarianCBCT/mexReadXim.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 - mex -largeArrayDims ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/Ax_mex.cpp ../Common/CUDA/ray_interpolated_projection.cu ../Common/CUDA/Siddon_projection.cu ../Common/CUDA/ray_interpolated_projection_parallel.cu ../Common/CUDA/Siddon_projection_parallel.cu ../Common/CUDA/GpuIds.cpp -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/Atb_mex.cpp ../Common/CUDA/voxel_backprojection.cu ../Common/CUDA/voxel_backprojection2.cu ../Common/CUDA/voxel_backprojection_parallel.cu ../Common/CUDA/GpuIds.cpp -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/minTV.cpp ../Common/CUDA/POCS_TV.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/cuda_interface/ApplyFbpFiltration.cpp ../Common/CUDA/FbpFiltration.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/IO/VarianCBCT/mexReadXim.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 + mex -largeArrayDims ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win64 else mex ./Utilities/cuda_interface/Ax_mex.cpp ../Common/CUDA/ray_interpolated_projection.cu ../Common/CUDA/Siddon_projection.cu ../Common/CUDA/ray_interpolated_projection_parallel.cu ../Common/CUDA/Siddon_projection_parallel.cu ../Common/CUDA/GpuIds.cpp -outdir ./Mex_files/win64 mex ./Utilities/cuda_interface/Atb_mex.cpp ../Common/CUDA/voxel_backprojection.cu ../Common/CUDA/voxel_backprojection2.cu ../Common/CUDA/voxel_backprojection_parallel.cu -outdir ../Common/CUDA/GpuIds.cpp ./Mex_files/win64 @@ -78,6 +79,7 @@ mex ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 mex ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 mex ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 + mex ./Utilities/cuda_interface/ApplyFbpFiltration.cpp ../Common/CUDA/FbpFiltration.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 mex ./Utilities/IO/VarianCBCT/mexReadXim.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 mex ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 mex ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/win32 @@ -92,6 +94,7 @@ mex -largeArrayDims ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac64 mex -largeArrayDims ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac64 mex -largeArrayDims ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac64 + mex -largeArrayDims ./Utilities/cuda_interface/ApplyFbpFiltration.cpp ../Common/CUDA/FbpFiltration.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac64 mex -largeArrayDims ./Utilities/IO/VarianCBCT/mexReadXim.cpp -outdir ./Mex_files/mac64 mex -largeArrayDims ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac64 mex -largeArrayDims ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac64 @@ -102,6 +105,7 @@ mex ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac32 mex ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac32 mex ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac32 + mex ./Utilities/cuda_interface/ApplyFbpFiltration.cpp ../Common/CUDA/FbpFiltration.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac32 mex ./Utilities/IO/VarianCBCT/mexReadXim.cpp -outdir ./Mex_files/mac32 mex ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac32 mex ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/mac32 @@ -115,6 +119,7 @@ mex -largeArrayDims ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux64 mex -largeArrayDims ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux64 mex -largeArrayDims ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux64 + mex -largeArrayDims ./Utilities/cuda_interface/ApplyFbpFiltration.cpp ../Common/CUDA/FbpFiltration.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux64 mex -largeArrayDims ./Utilities/IO/VarianCBCT/mexReadXim.cpp -outdir ./Mex_files/linux64 mex -largeArrayDims ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux64 mex -largeArrayDims ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux64 @@ -125,6 +130,7 @@ mex ./Utilities/cuda_interface/AwminTV.cpp ../Common/CUDA/POCS_TV2.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux32 mex ./Utilities/cuda_interface/tvDenoise.cpp ../Common/CUDA/tvdenoising.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux32 mex ./Utilities/cuda_interface/AddNoise.cpp ../Common/CUDA/RandomNumberGenerator.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux32 + mex ./Utilities/cuda_interface/ApplyFbpFiltration.cpp ../Common/CUDA/FbpFiltration.cu ../Common/CUDA/GpuIds.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux32 mex -largeArrayDims ./Utilities/IO/VarianCBCT/mexReadXim.cpp -outdir ./Mex_files/linux32 mex ./Utilities/GPU/getGpuName_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux32 mex ./Utilities/GPU/getGpuCount_mex.cpp ../Common/CUDA/gpuUtils.cu -outdir ./Mex_files/linux32 diff --git a/MATLAB/Utilities/cuda_interface/ApplyFbpFiltration.cpp b/MATLAB/Utilities/cuda_interface/ApplyFbpFiltration.cpp new file mode 100644 index 00000000..ef9cc8e6 --- /dev/null +++ b/MATLAB/Utilities/cuda_interface/ApplyFbpFiltration.cpp @@ -0,0 +1,130 @@ +/*------------------------------------------------------------------------- + * + * MATLAB MEX functions for convolution. Check inputs and parses + * MATLAB data to C++ data. + * + * + * CODE by Tomoyuki SADAKANE + * +--------------------------------------------------------------------------- +--------------------------------------------------------------------------- +Copyright (c) 2015, University of Bath and CERN- European Organization for +Nuclear Research +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + --------------------------------------------------------------------------- + +Contact: tigre.toolbox@gmail.com +Codes : https://github.com/CERN/TIGRE +--------------------------------------------------------------------------- + */ + +#include +#include +#include +#include +#include +#include +#include +#include +/** + * MEX gateway + * ApplyFbpFiltration(mat2dProj, mat1dFlt, "gpuids", gpuids); + */ + +void mexFunction(int nlhs, mxArray *plhs[], + int nrhs, mxArray const *prhs[]) +{ + GpuIds gpuids; + if (nrhs==4) { + size_t iM = mxGetM(prhs[3]); + if (iM != 1) { + mexErrMsgIdAndTxt( "TIGRE:MEX:ApplyFbpFiltration:unknown","5th parameter must be a row vector."); + return; + } + size_t uiGpuCount = mxGetN(prhs[3]); + if (uiGpuCount == 0) { + mexErrMsgIdAndTxt( "TIGRE:MEX:ApplyFbpFiltration:unknown","5th parameter must be a row vector."); + return; + } + int* piGpuIds = (int*)mxGetData(prhs[3]); + gpuids.SetIds(uiGpuCount, piGpuIds); + } else { + int iGpuCount = GetGpuCount(); + int* piDev = (int*)malloc(iGpuCount * sizeof(int)); + for (int iI = 0; iI < iGpuCount; ++iI) { + piDev[iI] = iI; + } + gpuids.SetIds(iGpuCount, piDev); + free(piDev); piDev = 0; + } + if (nrhs < 2) { + mexErrMsgIdAndTxt("TIGRE:MEX:ApplyFbpFiltration", "At least two input argumet required."); + } else if (nrhs==2 || nrhs==4){ + size_t mrows = mxGetM(prhs[0]); + size_t ncols = mxGetN(prhs[0]); + if (mrows ==1 && ncols ==1) { + mexErrMsgIdAndTxt("TIGRE:MEX:ApplyFbpFiltration", "1st parameter should not be 1x1"); + } + mrows = mxGetM(prhs[1]); + ncols = mxGetN(prhs[1]); + if (mrows==1 || ncols !=1) { + mexErrMsgIdAndTxt("TIGRE:MEX:ApplyFbpFiltration", "2nd parameter should be Mx1 (M>1)"); + } + } else if (nrhs>4) { + mexErrMsgIdAndTxt("TIGRE:MEX:ApplyFbpFiltration", "Too many imput argumets"); + } + /////////////// First input argumet. Projection + mxArray const * const proj = prhs[0]; + float* pfProj = static_cast(mxGetData(proj)); + const mwSize numDimsProj = mxGetNumberOfDimensions(proj); // get dim of proj + const mwSize *size_proj= mxGetDimensions(proj); //get size of proj + // printf("numDimsProj = %d\n", numDimsProj); + // for (int iI = 0; iI < numDimsProj; ++iI) { + // printf("size_proj[%d] = %d\n", iI, size_proj[iI]); + // } + /////////////// Second input argumet. Filter + const mxArray* filter = prhs[1]; + float* pfFilter = static_cast(mxGetData(filter)); + const mwSize numDimsFilter = mxGetNumberOfDimensions(filter); // get dim of filter + const mwSize *size_filter= mxGetDimensions(filter); //get size of filter + // printf("numDimsFilter = %d\n", numDimsFilter); + // for (int iI = 0; iI < numDimsFilter; ++iI) { + // printf("size_filter[%d] = %d\n", iI, size_filter[iI]); + // } + if (size_filter[0] != size_proj[0]) { + mexErrMsgIdAndTxt("TIGRE:MEX:ApplyFbpFiltration", "Width of projection must be equal to filter."); + } + ////////////// + //prepare outputs + // Allocate output projection + plhs[0] = mxCreateNumericArray(numDimsProj, size_proj, mxSINGLE_CLASS, mxREAL); + float *pfProjOut =(float*) mxGetPr(plhs[0]); + // call CUDA filtering + apply_filtration(pfProj, size_proj[0], size_proj[1], pfFilter, pfProjOut, gpuids); +} diff --git a/MATLAB/Utilities/filtering.m b/MATLAB/Utilities/filtering.m index 8974e875..54cb2726 100644 --- a/MATLAB/Utilities/filtering.m +++ b/MATLAB/Utilities/filtering.m @@ -1,4 +1,4 @@ -function [ proj ] = filtering(proj,geo,angles,parker) +function [ proj ] = filtering(proj,geo,angles,parker,usegpu) %FILTERING Summary of this function goes here % Detailed explanation goes here %-------------------------------------------------------------------------- @@ -30,19 +30,25 @@ d = 1; % cut off (0~1) [filt] = Filter(geo.filter, ramp_kernel, filt_len, d); -filt = repmat(filt',[1 geo.nDetector(2)]); - +if usegpu + filt = filt'; + gpuids = GpuIds(); +else + filt = repmat(filt',[1 geo.nDetector(2)]); +end for ii=1:size(angles,2) fproj = (zeros(filt_len,geo.nDetector(2),'single')); fproj(round(filt_len/2-geo.nDetector(1)/2+1):round(filt_len/2+geo.nDetector(1)/2),:) = proj(:,:,ii); - - fproj = fft(fproj); - - fproj = fproj.*filt; - - fproj = (real(ifft(fproj))); + + if usegpu + fproj = ApplyFbpFiltration(fproj, filt, gpuids); + else + fproj = fft(fproj); + fproj = fproj.*filt; + fproj = (real(ifft(fproj))); + end if parker proj(:,:,ii) = fproj(round(end/2-geo.nDetector(1)/2+1):round(end/2+geo.nDetector(1)/2),:)/2/geo.dDetector(1)*(2*pi/ (pi/angle_step) )/2*(geo.DSD(ii)/geo.DSO(ii)); diff --git a/MATLAB/mex_CUDA_win64_MSV2019.xml b/MATLAB/mex_CUDA_win64_MSV2019.xml index 5f2f0a12..892262c7 100644 --- a/MATLAB/mex_CUDA_win64_MSV2019.xml +++ b/MATLAB/mex_CUDA_win64_MSV2019.xml @@ -44,7 +44,7 @@ LINKFLAGS="/nologo /manifest" LINKTYPE="/DLL " LINKEXPORT="/EXPORT:mexFunction" - LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" + LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib cudart.lib cufft.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb"" LINKOPTIMFLAGS="" OBJEXT=".obj" diff --git a/MATLAB/mex_CUDA_win64_MVS2013.xml b/MATLAB/mex_CUDA_win64_MVS2013.xml index e6620936..91d9f15d 100644 --- a/MATLAB/mex_CUDA_win64_MVS2013.xml +++ b/MATLAB/mex_CUDA_win64_MVS2013.xml @@ -46,7 +46,7 @@ LINKFLAGS="/nologo /manifest" LINKTYPE="/DLL " LINKEXPORT="/EXPORT:mexFunction" - LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib gpu.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" + LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib gpu.lib cudart.lib cufft.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb"" LINKOPTIMFLAGS="" OBJEXT=".obj" diff --git a/MATLAB/mex_CUDA_win64_MVS2015.xml b/MATLAB/mex_CUDA_win64_MVS2015.xml index 0eda60bc..430efcf0 100644 --- a/MATLAB/mex_CUDA_win64_MVS2015.xml +++ b/MATLAB/mex_CUDA_win64_MVS2015.xml @@ -44,7 +44,7 @@ LINKFLAGS="/nologo /manifest" LINKTYPE="/DLL " LINKEXPORT="/EXPORT:mexFunction" - LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" + LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib cudart.lib cufft.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb"" LINKOPTIMFLAGS="" OBJEXT=".obj" diff --git a/MATLAB/mex_CUDA_win64_MVS2022.xml b/MATLAB/mex_CUDA_win64_MVS2022.xml index cc140d68..705e18a0 100644 --- a/MATLAB/mex_CUDA_win64_MVS2022.xml +++ b/MATLAB/mex_CUDA_win64_MVS2022.xml @@ -44,7 +44,7 @@ LINKFLAGS="/nologo /manifest" LINKTYPE="/DLL " LINKEXPORT="/EXPORT:mexFunction" - LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" + LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib cudart.lib cufft.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb"" LINKOPTIMFLAGS="" OBJEXT=".obj"