summaryrefslogtreecommitdiffstats
path: root/matlab
diff options
context:
space:
mode:
Diffstat (limited to 'matlab')
-rw-r--r--matlab/algorithms/DART/DARTalgorithm.m15
-rw-r--r--matlab/algorithms/DART/IterativeTomography.m435
-rw-r--r--matlab/algorithms/DART/IterativeTomography3D.m405
-rw-r--r--matlab/algorithms/DART/Kernels.m4
-rw-r--r--matlab/algorithms/DART/MaskingDefault.m4
-rw-r--r--matlab/algorithms/DART/MaskingGPU.m4
-rw-r--r--matlab/algorithms/DART/OutputDefault.m4
-rw-r--r--matlab/algorithms/DART/SegmentationDefault.m4
-rw-r--r--matlab/algorithms/DART/SmoothingDefault.m4
-rw-r--r--matlab/algorithms/DART/SmoothingGPU.m4
-rw-r--r--matlab/algorithms/DART/StatisticsDefault.m4
-rw-r--r--matlab/algorithms/DART/examples/example1.m40
-rw-r--r--matlab/algorithms/DART/examples/example2.m55
-rw-r--r--matlab/algorithms/DART/examples/example3.m21
-rw-r--r--matlab/mex/astra_mex.cpp3
-rw-r--r--matlab/mex/astra_mex_algorithm_c.cpp24
-rw-r--r--matlab/mex/astra_mex_algorithm_vc09.vcproj (renamed from matlab/mex/astra_mex_algorithm_vc08.vcproj)309
-rw-r--r--matlab/mex/astra_mex_algorithm_vc11.vcxproj209
-rw-r--r--matlab/mex/astra_mex_c.cpp5
-rw-r--r--matlab/mex/astra_mex_data2d_c.cpp85
-rw-r--r--matlab/mex/astra_mex_data2d_vc09.vcproj (renamed from matlab/mex/astra_mex_data2d_vc08.vcproj)323
-rw-r--r--matlab/mex/astra_mex_data2d_vc11.vcxproj207
-rw-r--r--matlab/mex/astra_mex_data3d_c.cpp93
-rw-r--r--matlab/mex/astra_mex_data3d_vc09.vcproj628
-rw-r--r--matlab/mex/astra_mex_data3d_vc11.vcxproj207
-rw-r--r--matlab/mex/astra_mex_log_c.cpp305
-rw-r--r--matlab/mex/astra_mex_log_vc09.vcproj (renamed from matlab/mex/astra_mex_data3d_vc08.vcproj)310
-rw-r--r--matlab/mex/astra_mex_log_vc11.vcxproj306
-rw-r--r--matlab/mex/astra_mex_matrix_c.cpp5
-rw-r--r--matlab/mex/astra_mex_matrix_vc09.vcproj (renamed from matlab/mex/astra_mex_matrix_vc08.vcproj)307
-rw-r--r--matlab/mex/astra_mex_matrix_vc11.vcxproj207
-rw-r--r--matlab/mex/astra_mex_projector3d_c.cpp29
-rw-r--r--matlab/mex/astra_mex_projector3d_vc09.vcproj (renamed from matlab/mex/astra_mex_projector3d_vc08.vcproj)304
-rw-r--r--matlab/mex/astra_mex_projector3d_vc11.vcxproj206
-rw-r--r--matlab/mex/astra_mex_projector_c.cpp21
-rw-r--r--matlab/mex/astra_mex_projector_vc09.vcproj (renamed from matlab/mex/astra_mex_projector_vc08.vcproj)307
-rw-r--r--matlab/mex/astra_mex_projector_vc11.vcxproj207
-rw-r--r--matlab/mex/astra_mex_vc09.vcproj (renamed from matlab/mex/astra_mex_vc08.vcproj)307
-rw-r--r--matlab/mex/astra_mex_vc11.vcxproj207
-rw-r--r--matlab/mex/mexCopyDataHelpFunctions.cpp44
-rw-r--r--matlab/mex/mexCopyDataHelpFunctions.h10
-rw-r--r--matlab/mex/mexDataManagerHelpFunctions.cpp52
-rw-r--r--matlab/mex/mexDataManagerHelpFunctions.h10
-rw-r--r--matlab/mex/mexHelpFunctions.cpp718
-rw-r--r--matlab/mex/mexHelpFunctions.h45
-rw-r--r--matlab/mex/mexInitFunctions.cpp24
-rw-r--r--matlab/mex/mexInitFunctions.h6
-rw-r--r--matlab/tools/astra_mex_log.m33
48 files changed, 4647 insertions, 2419 deletions
diff --git a/matlab/algorithms/DART/DARTalgorithm.m b/matlab/algorithms/DART/DARTalgorithm.m
index f8c2ce7..fc707dd 100644
--- a/matlab/algorithms/DART/DARTalgorithm.m
+++ b/matlab/algorithms/DART/DARTalgorithm.m
@@ -1,21 +1,16 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
%--------------------------------------------------------------------------
classdef DARTalgorithm < matlab.mixin.Copyable
-
% Algorithm class for Discrete Algebraic Reconstruction Technique (DART).
- % todo: reset()
- % todo: fixed random seed
- % todo: initialize from settings (?)
-
%----------------------------------------------------------------------
properties (GetAccess=public, SetAccess=public)
@@ -78,7 +73,6 @@ classdef DARTalgorithm < matlab.mixin.Copyable
error('invalid arguments')
end
end
-
%------------------------------------------------------------------
function D = deepcopy(this)
@@ -100,7 +94,6 @@ classdef DARTalgorithm < matlab.mixin.Copyable
% Initialize tomography part
if ~this.tomography.initialized
- this.tomography.sinogram = this.base.sinogram;
this.tomography.proj_geom = this.base.proj_geom;
this.tomography.initialize();
end
@@ -110,7 +103,7 @@ classdef DARTalgorithm < matlab.mixin.Copyable
this.V0 = this.base.V0;
else
this.output.pre_initial_iteration(this);
- this.V0 = this.tomography.reconstruct2(this.base.sinogram, [], this.t0);
+ this.V0 = this.tomography.reconstruct(this.base.sinogram, this.t0);
this.output.post_initial_iteration(this);
end
this.V = this.V0;
@@ -163,7 +156,7 @@ classdef DARTalgorithm < matlab.mixin.Copyable
this.R = this.base.sinogram - this.tomography.project(F);
% ART update part
- this.V = this.tomography.reconstruct2_mask(this.R, this.V, this.Mask, this.t);
+ this.V = this.tomography.reconstruct_mask(this.R, this.V, this.Mask, this.t);
% blur
this.V = this.smoothing.apply(this, this.V);
diff --git a/matlab/algorithms/DART/IterativeTomography.m b/matlab/algorithms/DART/IterativeTomography.m
new file mode 100644
index 0000000..3875e6b
--- /dev/null
+++ b/matlab/algorithms/DART/IterativeTomography.m
@@ -0,0 +1,435 @@
+classdef IterativeTomography < matlab.mixin.Copyable
+
+ % Algorithm class for 2D Iterative Tomography.
+
+ %----------------------------------------------------------------------
+ properties (SetAccess=public, GetAccess=public)
+ superresolution = 1; % SETTING: Volume upsampling factor.
+ proj_type = 'linear'; % SETTING: Projector type, only when gpu='no'.
+ method = 'SIRT_CUDA'; % SETTING: Iterative method (see ASTRA toolbox documentation).
+ gpu = 'yes'; % SETTING: Use gpu? {'yes', 'no'}
+ gpu_core = 0; % SETTING: Which gpu core to use? Only when gpu='yes'.
+ inner_circle = 'yes'; % SETTING: Do roi only? {'yes', 'no'}
+ image_size = []; % SETTING: Overwrite default reconstruction size. Only if no vol_geom is specified.
+ use_minc = 'no'; % SETTING: Use minimum constraint. {'no', 'yes'}
+ end
+ %----------------------------------------------------------------------
+ properties (SetAccess=public, GetAccess=public)
+ proj_geom = []; % DATA: Projection geometry.
+ vol_geom = []; % DATA: Volume geometry.
+ end
+ %----------------------------------------------------------------------
+ properties (SetAccess=private, GetAccess=public)
+ initialized = 0; % Is this object initialized?
+ end
+ %----------------------------------------------------------------------
+ properties (SetAccess=protected, GetAccess=protected)
+ cfg_base = struct(); % PROTECTED: base configuration structure for the reconstruction algorithm.
+ proj_geom_sr = []; % PROTECTED: geometry of sinogram (with super-resolution)
+ proj_id = []; % PROTECTED: astra id of projector (when gpu='no')
+ proj_id_sr = []; % PROTECTED: astra id of super-resolution projector (when gpu='no')
+ end
+ %----------------------------------------------------------------------
+
+ methods (Access=public)
+
+ %------------------------------------------------------------------
+ function this = IterativeTomography(varargin)
+ % Constructor
+ % >> tomography = IterativeTomography(proj_geom);
+ % >> tomography = IterativeTomography(proj_geom, vol_geom);
+
+ % Input: IterativeTomography(proj_geom)
+ if nargin == 1
+ this.proj_geom = varargin{1};
+
+ % Input: IterativeTomography(proj_geom, vol_geom)
+ elseif nargin == 2
+ this.proj_geom = varargin{1};
+ this.vol_geom = varargin{2};
+ end
+ end
+
+ %------------------------------------------------------------------
+ function delete(this)
+ % Destructor
+ % >> clear tomography;
+ if strcmp(this.gpu,'no') && numel(this.proj_id) > 0
+ astra_mex_projector('delete', this.proj_id, this.proj_id_sr);
+ end
+ end
+
+ %------------------------------------------------------------------
+ function settings = getsettings(this)
+ % Returns a structure containing all settings of this object.
+ % >> settings = tomography.getsettings();
+ settings.superresolution = this.superresolution;
+ settings.proj_type = this.proj_type;
+ settings.method = this.method;
+ settings.gpu = this.gpu;
+ settings.gpu_core = this.gpu_core;
+ settings.inner_circle = this.inner_circle;
+ settings.image_size = this.image_size;
+ settings.use_minc = this.use_minc;
+ end
+
+ %------------------------------------------------------------------
+ function ok = initialize(this)
+ % Initialize this object. Returns 1 if succesful.
+ % >> tomography.initialize();
+
+ % create projection geometry with super-resolution
+ if this.superresolution > 1
+ this.proj_geom_sr = astra_geom_superresolution(this.proj_geom, this.superresolution);
+ else
+ this.proj_geom_sr = this.proj_geom;
+ end
+
+ % if no volume geometry is specified by the user: create volume geometry
+ if numel(this.vol_geom) == 0
+ if numel(this.image_size) < 2
+ this.image_size(1) = this.proj_geom.DetectorCount;
+ this.image_size(2) = this.proj_geom.DetectorCount;
+ end
+ this.vol_geom = astra_create_vol_geom(this.image_size(1) * this.superresolution, this.image_size(2) * this.superresolution, ...
+ -this.image_size(1)/2, this.image_size(1)/2, -this.image_size(2)/2, this.image_size(2)/2);
+ else
+ this.image_size(1) = this.vol_geom.GridRowCount;
+ this.image_size(2) = this.vol_geom.GridColCount;
+ end
+
+ % create projector
+ if strcmp(this.gpu,'no')
+ this.proj_id = astra_create_projector(this.proj_type, this.proj_geom, this.vol_geom);
+ this.proj_id_sr = astra_create_projector(this.proj_type, this.proj_geom_sr, this.vol_geom);
+ end
+
+ % create reconstruction configuration
+ this.cfg_base = astra_struct(upper(this.method));
+ if strcmp(this.gpu,'no')
+ this.cfg_base.ProjectorId = this.proj_id;
+ this.cfg_base.ProjectionGeometry = this.proj_geom;
+ this.cfg_base.ReconstructionGeometry = this.vol_geom;
+ end
+ this.cfg_base.option.DetectorSuperSampling = this.superresolution;
+ if strcmp(this.gpu,'yes')
+ this.cfg_base.option.GPUindex = this.gpu_core;
+ end
+ if this.use_minc
+ this.cfg_base.option.MinConstraint = 0;
+ end
+
+ this.initialized = 1;
+ ok = this.initialized;
+ end
+
+ %------------------------------------------------------------------
+ function projections = project(this, volume)
+ % Compute forward projection.
+ % >> projections = tomography.project(volume);
+
+ if ~this.initialized
+ this.initialize();
+ end
+
+ % project
+ projections = this.project_c(volume);
+ end
+
+ %------------------------------------------------------------------
+ function reconstruction = reconstruct(this, varargin)
+ % Compute reconstruction.
+ % Uses tomography.sinogram
+ % Initial solution (if available) should be stored in tomography.V
+ % >> reconstruction = tomography.reconstruct(projections, iterations);
+ % >> reconstruction = tomography.reconstruct(projections, volume0, iterations);
+
+ if ~this.initialized
+ this.initialize();
+ end
+
+ if numel(varargin) == 2
+ reconstruction = this.reconstruct_c(varargin{1}, [], [], varargin{2});
+ elseif numel(varargin) == 3
+ reconstruction = this.reconstruct_c(varargin{1}, varargin{2}, [], varargin{3});
+ else
+ error('invalid parameter list')
+ end
+
+ if strcmp(this.inner_circle,'yes')
+ reconstruction = this.selectROI(reconstruction);
+ end
+ end
+
+ %------------------------------------------------------------------
+ function reconstruction = reconstruct_mask(this, varargin)
+ % Compute reconstruction with mask.
+ % Uses tomography.sinogram
+ % Initial solution (if available) should be stored in tomography.V
+ % >> reconstruction = tomography.reconstructMask(projections, mask, iterations);
+ % >> reconstruction = tomography.reconstructMask(projections, volume0, mask, iterations);
+
+ if ~this.initialized
+ this.initialize();
+ end
+
+ if numel(varargin) == 3
+ reconstruction = this.reconstruct_c(varargin{1}, [], varargin{2}, varargin{3});
+ elseif numel(varargin) == 4
+ reconstruction = this.reconstruct_c(varargin{1}, varargin{2}, varargin{3}, varargin{4});
+ else
+ error('invalid parameter list')
+ end
+
+ if strcmp(this.inner_circle,'yes')
+ reconstruction = this.selectROI(reconstruction);
+ end
+
+ end
+ %------------------------------------------------------------------
+
+ end
+
+ %----------------------------------------------------------------------
+ methods (Access = protected)
+
+ %------------------------------------------------------------------
+ % Protected function: create FP
+ function sinogram = project_c(this, volume)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ % data is stored in astra memory
+ if numel(volume) == 1
+
+ if strcmp(this.gpu, 'yes')
+ sinogram_tmp = astra_create_sino_cuda(volume, this.proj_geom_sr, this.vol_geom, this.gpu_core);
+ else
+ sinogram_tmp = astra_create_sino(volume, this.proj_id);
+ end
+
+ % sinogram downsampling
+ if this.superresolution > 1
+ sinogram_data = astra_mex_data2d('get', sinogram_tmp);
+ astra_mex_data2d('delete', sinogram_tmp);
+ sinogram_data = downsample_sinogram(sinogram_data, this.superresolution);
+ sinogram = astra_mex_data2d('create','sino', this.proj_geom, sinogram_data);
+ else
+ sinogram = sinogram_tmp;
+ end
+
+ % data is stored in matlab memory
+ else
+
+ % 2D and 3D slice by slice
+ sinogram_tmp = zeros([astra_geom_size(this.proj_geom_sr), size(volume,3)]);
+ sinogram_tmp2 = zeros([astra_geom_size(this.proj_geom), size(volume,3)]);
+ for slice = 1:size(volume,3)
+
+ if strcmp(this.gpu, 'yes')
+ [tmp_id, sinogram_tmp2(:,:,slice)] = astra_create_sino_sampling(volume(:,:,slice), this.proj_geom, this.vol_geom, this.gpu_core, this.superresolution);
+ astra_mex_data2d('delete', tmp_id);
+ else
+ [tmp_id, tmp] = astra_create_sino(volume(:,:,slice), this.proj_id_sr);
+ sinogram_tmp2(:,:,slice) = downsample_sinogram(tmp, this.superresolution) * (this.superresolution^2);
+ astra_mex_data2d('delete', tmp_id);
+ end
+
+ end
+
+ % sinogram downsampling
+ if strcmp(this.gpu, 'yes')
+ %sinogram = downsample_sinogram(sinogram_tmp, this.superresolution);
+ sinogram2 = sinogram_tmp2;
+ if strcmp(this.proj_geom.type,'fanflat_vec') || strcmp(this.proj_geom.type,'fanflat')
+ sinogram2 = sinogram2 / this.superresolution;
+ elseif strcmp(this.proj_geom.type,'parallel')
+ sinogram2 = sinogram2 / (this.superresolution * this.superresolution);
+ end
+ sinogram = sinogram2;
+ else
+ sinogram = sinogram_tmp2;
+ end
+
+ end
+
+ end
+
+ %------------------------------------------------------------------
+ % Protected function: reconstruct
+ function V = reconstruct_c(this, sinogram, V0, mask, iterations)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ % data is stored in astra memory
+ if numel(sinogram) == 1
+ V = this.reconstruct_c_astra(sinogram, V0, mask, iterations);
+
+ % data is stored in matlab memory
+ else
+ V = this.reconstruct_c_matlab(sinogram, V0, mask, iterations);
+ end
+
+ end
+
+ %------------------------------------------------------------------
+ % Protected function: reconstruct (data in matlab)
+ function V = reconstruct_c_matlab(this, sinogram, V0, mask, iterations)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ % parse method
+ method2 = upper(this.method);
+ if strcmp(method2, 'SART') || strcmp(method2, 'SART_CUDA')
+ iterations = iterations * size(sinogram,1);
+ elseif strcmp(method2, 'ART')
+ iterations = iterations * numel(sinogram);
+ end
+
+ % create data objects
+ V = zeros(this.vol_geom.GridRowCount, this.vol_geom.GridColCount, size(sinogram,3));
+ reconstruction_id = astra_mex_data2d('create', '-vol', this.vol_geom);
+ sinogram_id = astra_mex_data2d('create', '-sino', this.proj_geom);
+ if numel(mask) > 0
+ mask_id = astra_mex_data2d('create', '-vol', this.vol_geom);
+ end
+
+ % algorithm configuration
+ cfg = this.cfg_base;
+ cfg.ProjectionDataId = sinogram_id;
+ cfg.ReconstructionDataId = reconstruction_id;
+ if numel(mask) > 0
+ cfg.option.ReconstructionMaskId = mask_id;
+ end
+ alg_id = astra_mex_algorithm('create', cfg);
+
+ % loop slices
+ for slice = 1:size(sinogram,3)
+
+ % fetch slice of initial reconstruction
+ if numel(V0) > 0
+ astra_mex_data2d('store', reconstruction_id, V0(:,:,slice));
+ else
+ astra_mex_data2d('store', reconstruction_id, 0);
+ end
+
+ % fetch slice of sinogram
+ astra_mex_data2d('store', sinogram_id, sinogram(:,:,slice));
+
+ % fecth slice of mask
+ if numel(mask) > 0
+ astra_mex_data2d('store', mask_id, mask(:,:,slice));
+ end
+
+ % iterate
+ astra_mex_algorithm('iterate', alg_id, iterations);
+
+ % fetch data
+ V(:,:,slice) = astra_mex_data2d('get', reconstruction_id);
+
+ end
+
+ % correct attenuation factors for super-resolution
+ if this.superresolution > 1 && strcmp(this.gpu,'yes')
+ if strcmp(this.proj_geom.type,'fanflat_vec') || strcmp(this.proj_geom.type,'fanflat')
+ if numel(mask) > 0
+ V(mask > 0) = V(mask > 0) ./ this.superresolution;
+ else
+ V = V ./ this.superresolution;
+ end
+ end
+ end
+
+ % garbage collection
+ astra_mex_algorithm('delete', alg_id);
+ astra_mex_data2d('delete', sinogram_id, reconstruction_id);
+ if numel(mask) > 0
+ astra_mex_data2d('delete', mask_id);
+ end
+
+ end
+
+ %------------------------------------------------------------------
+ % Protected function: reconstruct (data in astra)
+ function V = reconstruct_c_astra(this, sinogram, V0, mask, iterations)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ if numel(V0) > 1 || numel(mask) > 1 || numel(sinogram) > 1
+ error('Not all required data is stored in the astra memory');
+ end
+
+ if numel(V0) == 0
+ V0 = astra_mex_data2d('create', '-vol', this.vol_geom, 0);
+ end
+
+ % parse method
+ method2 = upper(this.method);
+ if strcmp(method2, 'SART') || strcmp(method2, 'SART_CUDA')
+ iterations = iterations * astra_geom_size(this.proj_geom, 1)
+ this.cfg_base.option.ProjectionOrder = 'random';
+ elseif strcmp(method2, 'ART')
+ s = astra_geom_size(this.proj_geom);
+ iterations = iterations * s(1) * s(2);
+ end
+
+ % algorithm configuration
+ cfg = this.cfg_base;
+ cfg.ProjectionDataId = sinogram;
+ cfg.ReconstructionDataId = V0;
+ if numel(mask) > 0
+ cfg.option.ReconstructionMaskId = mask;
+ end
+ alg_id = astra_mex_algorithm('create', cfg);
+
+ % iterate
+ astra_mex_algorithm('iterate', alg_id, iterations);
+
+ % fetch data
+ V = V0;
+
+ % correct attenuation factors for super-resolution
+ if this.superresolution > 1
+ if strcmp(this.proj_geom.type,'fanflat_vec') || strcmp(this.proj_geom.type,'fanflat')
+ if numel(mask) > 0
+ astra_data_op_masked('$1./s1', [V V], [this.superresolution this.superresolution], mask, this.gpu_core);
+ else
+ astra_data_op('$1./s1', [V V], [this.superresolution this.superresolution], this.gpu_core);
+ end
+ end
+ end
+
+ % garbage collection
+ astra_mex_algorithm('delete', alg_id);
+
+ end
+
+ %------------------------------------------------------------------
+ function V_out = selectROI(~, V_in)
+
+ if numel(V_in) == 1
+ cfg = astra_struct('RoiSelect_CUDA');
+ cfg.DataId = V_in;
+ alg_id = astra_mex_algorithm('create',cfg);
+ astra_mex_algorithm('run', alg_id);
+ astra_mex_algorithm('delete', alg_id);
+ V_out = V_in;
+ else
+ V_out = ROIselectfull(V_in, min([size(V_in,1), size(V_in,2)]));
+ end
+
+ end
+ %------------------------------------------------------------------
+
+ end
+
+end
+
diff --git a/matlab/algorithms/DART/IterativeTomography3D.m b/matlab/algorithms/DART/IterativeTomography3D.m
new file mode 100644
index 0000000..29b963f
--- /dev/null
+++ b/matlab/algorithms/DART/IterativeTomography3D.m
@@ -0,0 +1,405 @@
+classdef IterativeTomography3D < matlab.mixin.Copyable
+
+ % Algorithm class for 3D Iterative Tomography.
+
+ %----------------------------------------------------------------------
+ properties (SetAccess=public, GetAccess=public)
+ superresolution = 1; % SETTING: Volume upsampling factor.
+ proj_type = 'linear'; % SETTING: Projector type, only when gpu='no'.
+ method = 'SIRT3D_CUDA'; % SETTING: Iterative method (see ASTRA toolbox documentation).
+ gpu = 'yes'; % SETTING: Use gpu? {'yes', 'no'}
+ gpu_core = 0; % SETTING: Which gpu core to use? Only when gpu='yes'.
+ inner_circle = 'yes'; % SETTING: Do roi only? {'yes', 'no'}
+ image_size = []; % SETTING: Overwrite default reconstruction size. Only if no vol_geom is specified.
+ use_minc = 'no'; % SETTING: Use minimum constraint. {'no', 'yes'}
+ maxc = +Inf; % SETTING: Maximum constraint. +Inf means off.
+ end
+ %----------------------------------------------------------------------
+ properties (SetAccess=public, GetAccess=public)
+ sinogram = []; % DATA: Projection data.
+ proj_geom = []; % DATA: Projection geometry.
+ V = []; % DATA: Volume data. Also used to set initial estimate (optional).
+ vol_geom = []; % DATA: Volume geometry.
+ end
+ %----------------------------------------------------------------------
+ properties (SetAccess=private, GetAccess=public)
+ initialized = 0; % Is this object initialized?
+ end
+ %----------------------------------------------------------------------
+ properties (SetAccess=protected, GetAccess=protected)
+ proj_geom_sr = []; % PROTECTED: geometry of sinogram (with super-resolution)
+ proj_id = []; % PROTECTED: astra id of projector (when gpu='no')
+ proj_id_sr = []; % PROTECTED: astra id of super-resolution projector (when gpu='no')
+ cfg_base = struct(); % PROTECTED: base configuration structure for the reconstruction algorithm.
+ end
+ %----------------------------------------------------------------------
+
+ methods (Access=public)
+
+ %------------------------------------------------------------------
+ function this = IterativeTomography3D(varargin)
+ % Constructor
+ % >> tomography = IterativeTomography3D(proj_geom);
+ % >> tomography = IterativeTomography3D(proj_geom, vol_geom);
+
+ % Input: IterativeTomography(proj_geom)
+ if nargin == 1
+ this.proj_geom = varargin{1};
+
+ % Input: IterativeTomography(proj_geom, vol_geom)
+ elseif nargin == 2
+ this.proj_geom = varargin{1};
+ this.vol_geom = varargin{2};
+ end
+ end
+
+ %------------------------------------------------------------------
+ function delete(this)
+ % Destructor
+ % >> clear tomography;
+ if strcmp(this.gpu,'no') && numel(this.proj_id) > 0
+ astra_mex_projector('delete', this.proj_id, this.proj_id_sr);
+ end
+ end
+
+ %------------------------------------------------------------------
+ function settings = getsettings(this)
+ % Returns a structure containing all settings of this object.
+ % >> settings = tomography.getsettings();
+ settings.superresolution = this.superresolution;
+ settings.proj_type = this.proj_type;
+ settings.method = this.method;
+ settings.gpu = this.gpu;
+ settings.gpu_core = this.gpu_core;
+ settings.inner_circle = this.inner_circle;
+ settings.image_size = this.image_size;
+ settings.use_minc = this.use_minc;
+ settings.maxc = this.maxc;
+ end
+
+ %------------------------------------------------------------------
+ function ok = initialize(this)
+ % Initialize this object. Returns 1 if succesful.
+ % >> tomography.initialize();
+
+% % create projection geometry with super-resolution
+% this.proj_geom_sr = astra_geom_superresolution(this.proj_geom, this.superresolution);
+
+ % if no volume geometry is specified by the user: create volume geometry
+ if numel(this.vol_geom) == 0
+ if numel(this.image_size) < 2
+ this.image_size(1) = this.proj_geom.DetectorRowCount;
+ this.image_size(2) = this.proj_geom.DetectorColCount;
+ end
+ this.vol_geom = astra_create_vol_geom(this.proj_geom.DetectorColCount, this.proj_geom.DetectorColCount, this.proj_geom.DetectorRowCount);
+ else
+ this.image_size(1) = this.vol_geom.GridRowCount;
+ this.image_size(2) = this.vol_geom.GridColCount;
+ end
+
+ % create projector
+ if strcmp(this.gpu, 'no')
+ this.proj_id = astra_create_projector(this.proj_type, this.proj_geom, this.vol_geom);
+ this.proj_id_sr = astra_create_projector(this.proj_type, this.proj_geom_sr, this.vol_geom);
+ end
+
+ % create reconstruction configuration
+ this.cfg_base = astra_struct(upper(this.method));
+ if strcmp(this.gpu,'no')
+ this.cfg_base.ProjectorId = this.proj_id;
+ this.cfg_base.ProjectionGeometry = this.proj_geom;
+ this.cfg_base.ReconstructionGeometry = this.vol_geom;
+ this.cfg_base.option.ProjectionOrder = 'random';
+ end
+ this.cfg_base.option.DetectorSuperSampling = this.superresolution;
+ if strcmp(this.gpu,'yes')
+ this.cfg_base.option.GPUindex = this.gpu_core;
+ end
+ this.cfg_base.option.UseMinConstraint = this.use_minc;
+ if ~isinf(this.maxc)
+ this.cfg_base.option.UseMaxConstraint = 'yes';
+ this.cfg_base.option.MaxConstraintValue = this.maxc;
+ end
+
+ this.initialized = 1;
+ ok = this.initialized;
+ end
+
+ %------------------------------------------------------------------
+ function projections = project(this, volume)
+ % Compute forward projection.
+ % >> projections = tomography.project(volume);
+
+ if ~this.initialized
+ this.initialize();
+ end
+
+ % project
+ projections = this.project_c(volume);
+ end
+
+ %------------------------------------------------------------------
+ function reconstruction = reconstruct(this, varargin)
+ % Compute reconstruction.
+ % Uses tomography.sinogram
+ % Initial solution (if available) should be stored in tomography.V
+ % >> reconstruction = tomography.reconstruct(projections, iterations);
+ % >> reconstruction = tomography.reconstruct(projections, volume0, iterations);
+
+ if ~this.initialized
+ this.initialize();
+ end
+
+ if numel(varargin) == 2
+ reconstruction = this.reconstruct_c(varargin{1}, [], [], varargin{2});
+ elseif numel(varargin) == 3
+ reconstruction = this.reconstruct_c(varargin{1}, varargin{2}, [], varargin{3});
+ else
+ error('invalid parameter list')
+ end
+
+ if strcmp(this.inner_circle,'yes')
+ reconstruction = this.selectROI(reconstruction);
+ end
+ end
+
+ %------------------------------------------------------------------
+ function reconstruction = reconstruct_mask(this, varargin)
+ % Compute reconstruction with mask.
+ % Uses tomography.sinogram
+ % Initial solution (if available) should be stored in tomography.V
+ % >> reconstruction = tomography.reconstructMask(projections, mask, iterations);
+ % >> reconstruction = tomography.reconstructMask(projections, volume0, mask, iterations);
+
+ if ~this.initialized
+ this.initialize();
+ end
+
+ if numel(varargin) == 3
+ reconstruction = this.reconstruct_c(varargin{1}, [], varargin{2}, varargin{3});
+ elseif numel(varargin) == 4
+ reconstruction = this.reconstruct_c(varargin{1}, varargin{2}, varargin{3}, varargin{4});
+ else
+ error('invalid parameter list')
+ end
+
+ if strcmp(this.inner_circle,'yes')
+ reconstruction = this.selectROI(reconstruction);
+ end
+
+ end
+ %------------------------------------------------------------------
+
+ end
+
+ %----------------------------------------------------------------------
+ methods (Access = protected)
+
+ %------------------------------------------------------------------
+ % Protected function: create FP
+ function sinogram = project_c(this, volume)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ % data is stored in astra memory
+ if numel(volume) == 1
+
+ if strcmp(this.gpu, 'yes')
+ sinogram_tmp = astra_create_sino_cuda(volume, this.proj_geom_sr, this.vol_geom, this.gpu_core);
+ else
+ sinogram_tmp = astra_create_sino(volume, this.proj_id);
+ end
+
+ % sinogram downsampling
+ if this.superresolution > 1
+ sinogram_data = astra_mex_data2d('get', sinogram_tmp);
+ astra_mex_data2d('delete', sinogram_tmp);
+ sinogram_data = downsample_sinogram(sinogram_data, this.superresolution);
+ sinogram = astra_mex_data2d('create', 'sino', this.proj_geom, sinogram_data);
+ else
+ sinogram = sinogram_tmp;
+ end
+
+ % data is stored in matlab memory
+ else
+ [tmp_id, sinogram] = astra_create_sino3d_cuda(volume, this.proj_geom, this.vol_geom);
+ astra_mex_data3d('delete', tmp_id);
+ end
+ end
+
+ %------------------------------------------------------------------
+ % Protected function: reconstruct
+ function V = reconstruct_c(this, sinogram, V0, mask, iterations)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ % data is stored in astra memory
+ if numel(sinogram) == 1
+ V = this.reconstruct_c_astra(sinogram, V0, mask, iterations);
+
+ % data is stored in matlab memory
+ else
+ V = this.reconstruct_c_matlab(sinogram, V0, mask, iterations);
+ end
+ end
+
+ %------------------------------------------------------------------
+ % Protected function: reconstruct (data in matlab)
+ function V = reconstruct_c_matlab(this, sinogram, V0, mask, iterations)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ % parse method
+ method2 = upper(this.method);
+ if strcmp(method2, 'SART') || strcmp(method2, 'SART_CUDA')
+ iterations = iterations * size(sinogram,1);
+ elseif strcmp(method2, 'ART')
+ iterations = iterations * numel(sinogram);
+ end
+
+ % create data objects
+% V = zeros(this.vol_geom.GridRowCount, this.vol_geom.GridColCount, size(sinogram,3));
+ reconstruction_id = astra_mex_data3d('create', '-vol', this.vol_geom);
+ sinogram_id = astra_mex_data3d('create', '-proj3d', this.proj_geom);
+ if numel(mask) > 0
+ mask_id = astra_mex_data3d('create', '-vol', this.vol_geom);
+ end
+
+ % algorithm configuration
+ cfg = this.cfg_base;
+ cfg.ProjectionDataId = sinogram_id;
+ cfg.ReconstructionDataId = reconstruction_id;
+ if numel(mask) > 0
+ cfg.option.ReconstructionMaskId = mask_id;
+ end
+ alg_id = astra_mex_algorithm('create', cfg);
+
+% % loop slices
+% for slice = 1:size(sinogram,3)
+
+ % fetch slice of initial reconstruction
+ if numel(V0) > 0
+ astra_mex_data3d('store', reconstruction_id, V0);
+ else
+ astra_mex_data3d('store', reconstruction_id, 0);
+ end
+
+ % fetch slice of sinogram
+ astra_mex_data3d('store', sinogram_id, sinogram);
+
+ % fecth slice of mask
+ if numel(mask) > 0
+ astra_mex_data3d('store', mask_id, mask);
+ end
+
+ % iterate
+ astra_mex_algorithm('iterate', alg_id, iterations);
+
+ % fetch data
+ V = astra_mex_data3d('get', reconstruction_id);
+
+% end
+
+ % correct attenuation factors for super-resolution
+ if this.superresolution > 1 && strcmp(this.gpu,'yes')
+ if strcmp(this.proj_geom.type,'fanflat_vec') || strcmp(this.proj_geom.type,'fanflat')
+ if numel(mask) > 0
+ V(mask > 0) = V(mask > 0) ./ this.superresolution;
+ else
+ V = V ./ this.superresolution;
+ end
+ end
+ end
+
+ % garbage collection
+ astra_mex_algorithm('delete', alg_id);
+ astra_mex_data3d('delete', sinogram_id, reconstruction_id);
+ if numel(mask) > 0
+ astra_mex_data3d('delete', mask_id);
+ end
+
+ end
+
+ %------------------------------------------------------------------
+ % Protected function: reconstruct (data in astra)
+ function V = reconstruct_c_astra(this, sinogram, V0, mask, iterations)
+
+ if this.initialized == 0
+ error('IterativeTomography not initialized');
+ end
+
+ if numel(V0) > 1 || numel(mask) > 1 || numel(sinogram) > 1
+ error('Not all required data is stored in the astra memory');
+ end
+
+ if numel(V0) == 0
+ V0 = astra_mex_data2d('create', '-vol', this.vol_geom, 0);
+ end
+
+ % parse method
+ method2 = upper(this.method);
+ if strcmp(method2, 'SART') || strcmp(method2, 'SART_CUDA')
+ iterations = iterations * astra_geom_size(this.proj_geom, 1);
+ elseif strcmp(method2, 'ART')
+ s = astra_geom_size(this.proj_geom);
+ iterations = iterations * s(1) * s(2);
+ end
+
+ % algorithm configuration
+ cfg = this.cfg_base;
+ cfg.ProjectionDataId = sinogram;
+ cfg.ReconstructionDataId = V0;
+ if numel(mask) > 0
+ cfg.option.ReconstructionMaskId = mask;
+ end
+ alg_id = astra_mex_algorithm('create', cfg);
+
+ % iterate
+ astra_mex_algorithm('iterate', alg_id, iterations);
+
+ % fetch data
+ V = V0;
+
+ % correct attenuation factors for super-resolution
+ if this.superresolution > 1
+ if strcmp(this.proj_geom.type,'fanflat_vec') || strcmp(this.proj_geom.type,'fanflat')
+ if numel(mask) > 0
+ astra_data_op_masked('$1./s1', [V V], [this.superresolution this.superresolution], mask, this.gpu_core);
+ else
+ astra_data_op('$1./s1', [V V], [this.superresolution this.superresolution], this.gpu_core);
+ end
+ end
+ end
+
+ % garbage collection
+ astra_mex_algorithm('delete', alg_id);
+
+ end
+
+ %------------------------------------------------------------------
+ function V_out = selectROI(~, V_in)
+
+ if numel(V_in) == 1
+ cfg = astra_struct('RoiSelect_CUDA');
+ cfg.DataId = V_in;
+ alg_id = astra_mex_algorithm('create',cfg);
+ astra_mex_algorithm('run', alg_id);
+ astra_mex_algorithm('delete', alg_id);
+ V_out = V_in;
+ else
+ V_out = ROIselectfull(V_in, min([size(V_in,1), size(V_in,2)]));
+ end
+
+ end
+ %------------------------------------------------------------------
+
+ end
+
+end
+
diff --git a/matlab/algorithms/DART/Kernels.m b/matlab/algorithms/DART/Kernels.m
index f91bf33..558f611 100644
--- a/matlab/algorithms/DART/Kernels.m
+++ b/matlab/algorithms/DART/Kernels.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/MaskingDefault.m b/matlab/algorithms/DART/MaskingDefault.m
index 1ecbacb..f91a6f5 100644
--- a/matlab/algorithms/DART/MaskingDefault.m
+++ b/matlab/algorithms/DART/MaskingDefault.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/MaskingGPU.m b/matlab/algorithms/DART/MaskingGPU.m
index dfbbd54..7d31aa8 100644
--- a/matlab/algorithms/DART/MaskingGPU.m
+++ b/matlab/algorithms/DART/MaskingGPU.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/OutputDefault.m b/matlab/algorithms/DART/OutputDefault.m
index 968261d..33e908b 100644
--- a/matlab/algorithms/DART/OutputDefault.m
+++ b/matlab/algorithms/DART/OutputDefault.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/SegmentationDefault.m b/matlab/algorithms/DART/SegmentationDefault.m
index 3b42740..98265c0 100644
--- a/matlab/algorithms/DART/SegmentationDefault.m
+++ b/matlab/algorithms/DART/SegmentationDefault.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/SmoothingDefault.m b/matlab/algorithms/DART/SmoothingDefault.m
index f89526e..1974fa1 100644
--- a/matlab/algorithms/DART/SmoothingDefault.m
+++ b/matlab/algorithms/DART/SmoothingDefault.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/SmoothingGPU.m b/matlab/algorithms/DART/SmoothingGPU.m
index 5a8fa48..1249e19 100644
--- a/matlab/algorithms/DART/SmoothingGPU.m
+++ b/matlab/algorithms/DART/SmoothingGPU.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/StatisticsDefault.m b/matlab/algorithms/DART/StatisticsDefault.m
index 31ead14..9d33256 100644
--- a/matlab/algorithms/DART/StatisticsDefault.m
+++ b/matlab/algorithms/DART/StatisticsDefault.m
@@ -1,8 +1,8 @@
%--------------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
-% 2014-2015, CWI, Amsterdam
+% Copyright: 2010-2014, iMinds-Vision Lab, University of Antwerp
+% 2014, CWI, Amsterdam
% License: Open Source under GPLv3
% Contact: astra@uantwerpen.be
% Website: http://sf.net/projects/astra-toolbox
diff --git a/matlab/algorithms/DART/examples/example1.m b/matlab/algorithms/DART/examples/example1.m
index 9a836f8..cb02e0f 100644
--- a/matlab/algorithms/DART/examples/example1.m
+++ b/matlab/algorithms/DART/examples/example1.m
@@ -8,15 +8,11 @@
% Website: http://sf.net/projects/astra-toolbox
%--------------------------------------------------------------------------
-clear all;
-
addpath('../');
-%%
-% Example 1: 2D parallel beam, cuda
-%
+%% Example 1: 2D parallel beam, cuda
-% Configuration
+% configuration
proj_count = 20;
dart_iterations = 20;
filename = 'cylinders.png';
@@ -26,26 +22,20 @@ rho = [0, 255];
tau = 128;
gpu_core = 0;
-% Load phantom
+% load phantom
I = imreadgs(filename);
-% Create projection and volume geometries
+% create projection and volume geometries
det_count = size(I, 1);
angles = linspace2(0, pi, proj_count);
proj_geom = astra_create_proj_geom('parallel', 1, det_count, angles);
-vol_geom = astra_create_vol_geom(det_count, det_count, 1);
+vol_geom = astra_create_vol_geom(det_count, det_count);
-% Create sinogram.
+% create sinogram
[sinogram_id, sinogram] = astra_create_sino_cuda(I, proj_geom, vol_geom);
astra_mex_data2d('delete', sinogram_id);
-%%
% DART
-%
-
-%base.sinogram = sinogram;
-%base.proj_geom = proj_geom;
-
D = DARTalgorithm(sinogram, proj_geom);
D.t0 = 100;
D.t = 10;
@@ -63,21 +53,19 @@ D.smoothing.gpu_core = gpu_core;
D.masking.random = 0.1;
D.masking.gpu_core = gpu_core;
-D.output.directory = outdir;
-D.output.pre = [prefix '_'];
-D.output.save_images = 'no';
-D.output.save_results = {'stats', 'settings', 'S', 'V'};
-D.output.save_interval = dart_iterations;
-D.output.verbose = 'yes';
+D.output.directory = outdir;
+D.output.pre = [prefix '_'];
+D.output.save_images = 'no';
+D.output.save_results = {'stats', 'settings', 'S', 'V'};
+D.output.save_interval = dart_iterations;
+D.output.verbose = 'yes';
-D.statistics.proj_diff = 'no';
+D.statistics.proj_diff = 'no';
D.initialize();
D.iterate(dart_iterations);
-%%
-% Convert middle slice of final iteration to png.
-%
+% save the reconstruction and the segmentation to file
imwritesc(D.S, [outdir '/' prefix '_S.png']);
imwritesc(D.V, [outdir '/' prefix '_V.png']);
diff --git a/matlab/algorithms/DART/examples/example2.m b/matlab/algorithms/DART/examples/example2.m
index 7fe6988..89660a5 100644
--- a/matlab/algorithms/DART/examples/example2.m
+++ b/matlab/algorithms/DART/examples/example2.m
@@ -8,15 +8,11 @@
% Website: http://sf.net/projects/astra-toolbox
%--------------------------------------------------------------------------
-clear all;
-
addpath('../');
-%%
-% Example Z: 3D parallel beam, cuda
-%
+%% Example 2: 3D parallel beam, cuda
-% Configuration
+% configuration
proj_count = 20;
dart_iterations = 20;
outdir = './';
@@ -25,50 +21,47 @@ rho = [0, 0.5, 1];
tau = [0.25, 0.75];
gpu_core = 0;
-% Load phantom
+% load phantom
load('phantom3d');
-% Create projection and volume geometries
+% create projection and volume geometries
det_count = size(I, 1);
slice_count = size(I,3);
angles = linspace2(0, pi, proj_count);
proj_geom = astra_create_proj_geom('parallel3d', 1, 1, slice_count, det_count, angles);
vol_geom = astra_create_vol_geom(size(I));
-% Create sinogram
+% create sinogram
[sinogram_id, sinogram] = astra_create_sino3d_cuda(I, proj_geom, vol_geom);
astra_mex_data3d('delete', sinogram_id);
-%%
% DART
-%
-
D = DARTalgorithm(sinogram, proj_geom);
D.t0 = 100;
D.t = 10;
D.tomography = IterativeTomography3D();
-D.tomography.method = 'SIRT3D_CUDA';
-D.tomography.gpu_core = gpu_core;
-D.tomography.use_minc = 'yes';
+D.tomography.method = 'SIRT3D_CUDA';
+D.tomography.gpu_core = gpu_core;
+D.tomography.use_minc = 'yes';
-D.segmentation.rho = rho;
-D.segmentation.tau = tau;
+D.segmentation.rho = rho;
+D.segmentation.tau = tau;
-D.smoothing.b = 0.1;
-D.smoothing.full3d = 'yes';
-D.smoothing.gpu_core = gpu_core;
+D.smoothing.b = 0.1;
+D.smoothing.full3d = 'yes';
+D.smoothing.gpu_core = gpu_core;
-D.masking.random = 0.1;
-D.masking.conn = 4;
-D.masking.gpu_core = gpu_core;
+D.masking.random = 0.1;
+D.masking.conn = 4;
+D.masking.gpu_core = gpu_core;
-D.output.directory = outdir;
-D.output.pre = [prefix '_'];
-D.output.save_images = 'no';
-D.output.save_results = {'stats', 'settings', 'S', 'V'};
-D.output.save_interval = dart_iterations;
-D.output.verbose = 'yes';
+D.output.directory = outdir;
+D.output.pre = [prefix '_'];
+D.output.save_images = 'no';
+D.output.save_results = {'stats', 'settings', 'S', 'V'};
+D.output.save_interval = dart_iterations;
+D.output.verbose = 'yes';
D.statistics.proj_diff = 'no';
@@ -76,8 +69,6 @@ D.initialize();
D.iterate(dart_iterations);
-%%
-% Convert output of final iteration to png.
-%
+% save the central slice of the reconstruction and the segmentation to file
imwritesc(D.S(:,:,64), [outdir '/' prefix '_S_slice_64.png']);
imwritesc(D.V(:,:,64), [outdir '/' prefix '_V_slice_64.png']);
diff --git a/matlab/algorithms/DART/examples/example3.m b/matlab/algorithms/DART/examples/example3.m
index 895630b..cc80b0f 100644
--- a/matlab/algorithms/DART/examples/example3.m
+++ b/matlab/algorithms/DART/examples/example3.m
@@ -8,15 +8,11 @@
% Website: http://sf.net/projects/astra-toolbox
%--------------------------------------------------------------------------
-clear all;
-
addpath('../');
-%%
-% Example 3: 3D cone beam, cuda
-%
+%% Example 3: 3D cone beam, cuda
-% Configuration
+% configuration
proj_count = 20;
dart_iterations = 20;
outdir = './';
@@ -25,24 +21,21 @@ rho = [0, 0.5, 1];
tau = [0.25, 0.75];
gpu_core = 0;
-% Load phantom
+% load phantom
load('phantom3d');
-% Create projection and volume geometries
+% create projection and volume geometries
det_count = size(I, 1);
slice_count = size(I,3);
angles = linspace2(0, pi, proj_count);
proj_geom = astra_create_proj_geom('cone', 1, 1, slice_count, det_count, angles, 500, 0);
vol_geom = astra_create_vol_geom(size(I));
-% Create sinogram
+% create sinogram
[sinogram_id, sinogram] = astra_create_sino3d_cuda(I, proj_geom, vol_geom);
astra_mex_data3d('delete', sinogram_id);
-%%
% DART
-%
-
D = DARTalgorithm(sinogram, proj_geom);
D.t0 = 100;
D.t = 10;
@@ -76,8 +69,6 @@ D.initialize();
D.iterate(dart_iterations);
-%%
-% Convert output of final iteration to png.
-%
+% save the central slice of the reconstruction and the segmentation to file
imwritesc(D.S(:,:,64), [outdir '/' prefix '_S_slice_64.png']);
imwritesc(D.V(:,:,64), [outdir '/' prefix '_V_slice_64.png']);
diff --git a/matlab/mex/astra_mex.cpp b/matlab/mex/astra_mex.cpp
index 0eb5662..4bf42dd 100644
--- a/matlab/mex/astra_mex.cpp
+++ b/matlab/mex/astra_mex.cpp
@@ -28,6 +28,7 @@ $Id$
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include "astra/Globals.h"
@@ -104,6 +105,8 @@ void mexFunction(int nlhs, mxArray* plhs[],
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == std::string("version")) {
astra_mex_version(nlhs, plhs, nrhs, prhs);
diff --git a/matlab/mex/astra_mex_algorithm_c.cpp b/matlab/mex/astra_mex_algorithm_c.cpp
index f719a6b..e4afa63 100644
--- a/matlab/mex/astra_mex_algorithm_c.cpp
+++ b/matlab/mex/astra_mex_algorithm_c.cpp
@@ -32,13 +32,15 @@ $Id$
*/
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
+#include "astra/Globals.h"
#define USE_MATLAB_UNDOCUMENTED
#ifdef USE_MATLAB_UNDOCUMENTED
extern "C" { bool utIsInterruptPending(); }
-#ifdef __linux__
+#ifdef USE_PTHREADS
#define USE_PTHREADS_CTRLC
#include <pthread.h>
#else
@@ -49,7 +51,6 @@ extern "C" { bool utIsInterruptPending(); }
-#include "astra/Globals.h"
#include "astra/AstraObjectManager.h"
#include "astra/AstraObjectFactory.h"
@@ -78,26 +79,23 @@ void astra_mex_algorithm_create(int nlhs, mxArray* plhs[], int nrhs, const mxArr
}
// turn MATLAB struct to an XML-based Config object
- XMLDocument* xml = struct2XML("Algorithm", prhs[1]);
- Config cfg;
- cfg.self = xml->getRootNode();
+ Config* cfg = structToConfig("Algorithm", prhs[1]);
- CAlgorithm* pAlg = CAlgorithmFactory::getSingleton().create(cfg.self->getAttribute("type"));
+ CAlgorithm* pAlg = CAlgorithmFactory::getSingleton().create(cfg->self->getAttribute("type"));
if (!pAlg) {
- delete xml;
+ delete cfg;
mexErrMsgTxt("Unknown algorithm. \n");
return;
}
// create algorithm
- if (!pAlg->initialize(cfg)) {
- delete xml;
+ if (!pAlg->initialize(*cfg)) {
+ delete cfg;
delete pAlg;
mexErrMsgTxt("Algorithm not initialized. \n");
return;
}
-
- delete xml;
+ delete cfg;
// store algorithm
int iIndex = CAlgorithmManager::getSingleton().store(pAlg);
@@ -322,12 +320,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == "create") {
astra_mex_algorithm_create(nlhs, plhs, nrhs, prhs);
diff --git a/matlab/mex/astra_mex_algorithm_vc08.vcproj b/matlab/mex/astra_mex_algorithm_vc09.vcproj
index baa4c44..d5cebc0 100644
--- a/matlab/mex/astra_mex_algorithm_vc08.vcproj
+++ b/matlab/mex/astra_mex_algorithm_vc09.vcproj
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,16 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -85,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -108,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -123,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -152,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -175,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -191,16 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="false"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -221,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -244,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -260,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -289,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -312,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -329,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -359,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -380,16 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- BrowseInformation="1"
- DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -401,17 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -432,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -455,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -471,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -501,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -522,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -540,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -570,6 +563,24 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
@@ -587,6 +598,14 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_algorithm_vc11.vcxproj b/matlab/mex/astra_mex_algorithm_vc11.vcxproj
index bdbca46..c133e26 100644
--- a/matlab/mex/astra_mex_algorithm_vc11.vcxproj
+++ b/matlab/mex/astra_mex_algorithm_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,215 +75,230 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
- <TargetExt>.mexw64</TargetExt>
<TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <GenerateDebugInformation>false</GenerateDebugInformation>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_INC_PATH);..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <BrowseInformation>true</BrowseInformation>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_algorithm_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/astra_mex_c.cpp b/matlab/mex/astra_mex_c.cpp
index 2989b7a..4a331f5 100644
--- a/matlab/mex/astra_mex_c.cpp
+++ b/matlab/mex/astra_mex_c.cpp
@@ -33,6 +33,7 @@ $Id$
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include "astra/Globals.h"
@@ -122,12 +123,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT0: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == std::string("version")) {
astra_mex_version(nlhs, plhs, nrhs, prhs);
diff --git a/matlab/mex/astra_mex_data2d_c.cpp b/matlab/mex/astra_mex_data2d_c.cpp
index b219179..9576896 100644
--- a/matlab/mex/astra_mex_data2d_c.cpp
+++ b/matlab/mex/astra_mex_data2d_c.cpp
@@ -32,6 +32,7 @@ $Id$
*/
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include <list>
@@ -98,10 +99,10 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
return;
}
- string sDataType = mex_util_get_string(prhs[1]);
+ string sDataType = mexToString(prhs[1]);
CFloat32Data2D* pDataObject2D = NULL;
- if (nrhs >= 4 && !(mex_is_scalar(prhs[3])|| mxIsDouble(prhs[3]) || mxIsLogical(prhs[3]) || mxIsSingle(prhs[3]) )) {
+ if (nrhs >= 4 && !(mexIsScalar(prhs[3])|| mxIsDouble(prhs[3]) || mxIsLogical(prhs[3]) || mxIsSingle(prhs[3]) )) {
mexErrMsgTxt("Data must be single, double or logical.");
return;
}
@@ -116,23 +117,20 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
if (!mxIsStruct(prhs[2])) {
mexErrMsgTxt("Argument 3 is not a valid MATLAB struct.\n");
}
- XMLDocument* xml = struct2XML(string("VolumeGeometry"), prhs[2]);
- if (!xml)
- return;
- Config cfg;
- cfg.self = xml->getRootNode();
+
+ Config* cfg = structToConfig("VolumeGeometry", prhs[2]);
CVolumeGeometry2D* pGeometry = new CVolumeGeometry2D();
- if (!pGeometry->initialize(cfg)) {
+ if (!pGeometry->initialize(*cfg)) {
mexErrMsgTxt("Geometry class not initialized. \n");
- delete xml;
+ delete cfg;
delete pGeometry;
return;
}
// If data is specified, check dimensions
- if (nrhs >= 4 && !mex_is_scalar(prhs[3])) {
+ if (nrhs >= 4 && !mexIsScalar(prhs[3])) {
if (pGeometry->getGridColCount() != mxGetN(prhs[3]) || pGeometry->getGridRowCount() != mxGetM(prhs[3])) {
mexErrMsgTxt("The dimensions of the data do not match those specified in the geometry. \n");
- delete xml;
+ delete cfg;
delete pGeometry;
return;
}
@@ -140,21 +138,18 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
// Initialize data object
pDataObject2D = new CFloat32VolumeData2D(pGeometry);
delete pGeometry;
- delete xml;
+ delete cfg;
}
else if (sDataType == "-sino") {
// Read geometry
if (!mxIsStruct(prhs[2])) {
mexErrMsgTxt("Argument 3 is not a valid MATLAB struct.\n");
}
- XMLDocument* xml = struct2XML("ProjectionGeometry", prhs[2]);
- if (!xml)
- return;
- Config cfg;
- cfg.self = xml->getRootNode();
+
+ Config* cfg = structToConfig("ProjectionGeometry", prhs[2]);
// FIXME: Change how the base class is created. (This is duplicated
// in 'change_geometry' and Projector2D.cpp.)
- std::string type = cfg.self->getAttribute("type");
+ std::string type = cfg->self->getAttribute("type");
CProjectionGeometry2D* pGeometry;
if (type == "sparse_matrix") {
pGeometry = new CSparseMatrixProjectionGeometry2D();
@@ -168,25 +163,25 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
} else {
pGeometry = new CParallelProjectionGeometry2D();
}
- if (!pGeometry->initialize(cfg)) {
+ if (!pGeometry->initialize(*cfg)) {
mexErrMsgTxt("Geometry class not initialized. \n");
delete pGeometry;
- delete xml;
+ delete cfg;
return;
}
// If data is specified, check dimensions
- if (nrhs >= 4 && !mex_is_scalar(prhs[3])) {
+ if (nrhs >= 4 && !mexIsScalar(prhs[3])) {
if (pGeometry->getDetectorCount() != mxGetN(prhs[3]) || pGeometry->getProjectionAngleCount() != mxGetM(prhs[3])) {
mexErrMsgTxt("The dimensions of the data do not match those specified in the geometry. \n");
delete pGeometry;
- delete xml;
+ delete cfg;
return;
}
}
// Initialize data object
pDataObject2D = new CFloat32ProjectionData2D(pGeometry);
delete pGeometry;
- delete xml;
+ delete cfg;
}
else {
mexErrMsgTxt("Invalid datatype. Please specify '-vol' or '-sino'. \n");
@@ -210,7 +205,7 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
// Store data
if (nrhs >= 4) {
// fill with scalar value
- if (mex_is_scalar(prhs[3])) {
+ if (mexIsScalar(prhs[3])) {
float32 fValue = (float32)mxGetScalar(prhs[3]);
for (int i = 0; i < pDataObject2D->getSize(); ++i) {
pDataObject2D->getData()[i] = fValue;
@@ -294,7 +289,7 @@ void astra_mex_data2d_store(int nlhs, mxArray* plhs[], int nrhs, const mxArray*
}
int iDataID = (int)(mxGetScalar(prhs[1]));
- if (!(mex_is_scalar(prhs[2]) || mxIsDouble(prhs[2]) || mxIsLogical(prhs[2]) || mxIsSingle(prhs[2]))) {
+ if (!(mexIsScalar(prhs[2]) || mxIsDouble(prhs[2]) || mxIsLogical(prhs[2]) || mxIsSingle(prhs[2]))) {
mexErrMsgTxt("Data must be single, double or logical.");
return;
}
@@ -312,7 +307,7 @@ void astra_mex_data2d_store(int nlhs, mxArray* plhs[], int nrhs, const mxArray*
// step3: insert data
// fill with scalar value
- if (mex_is_scalar(prhs[2])) {
+ if (mexIsScalar(prhs[2])) {
float32 fValue = (float32)mxGetScalar(prhs[2]);
for (int i = 0; i < pDataObject->getSize(); ++i) {
pDataObject->getData()[i] = fValue;
@@ -373,7 +368,7 @@ void astra_mex_data2d_store(int nlhs, mxArray* plhs[], int nrhs, const mxArray*
*/
void astra_mex_data2d_get_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
{
- // step1: input
+ // parse input
if (nrhs < 2) {
mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
return;
@@ -384,7 +379,7 @@ void astra_mex_data2d_get_geometry(int nlhs, mxArray* plhs[], int nrhs, const mx
}
int iDataID = (int)(mxGetScalar(prhs[1]));
- // step2: get data object
+ // fetch data object
CFloat32Data2D* pDataObject = astra::CData2DManager::getSingleton().get(iDataID);
if (!pDataObject || !pDataObject->isInitialized()) {
mexErrMsgTxt("Data object not found or not initialized properly.\n");
@@ -395,11 +390,11 @@ void astra_mex_data2d_get_geometry(int nlhs, mxArray* plhs[], int nrhs, const mx
if (1 <= nlhs) {
if (pDataObject->getType() == CFloat32Data2D::PROJECTION) {
CFloat32ProjectionData2D* pDataObject2 = dynamic_cast<CFloat32ProjectionData2D*>(pDataObject);
- plhs[0] = createProjectionGeometryStruct(pDataObject2->getGeometry());
+ plhs[0] = configToStruct(pDataObject2->getGeometry()->getConfiguration());
}
else if (pDataObject->getType() == CFloat32Data2D::VOLUME) {
CFloat32VolumeData2D* pDataObject2 = dynamic_cast<CFloat32VolumeData2D*>(pDataObject);
- plhs[0] = createVolumeGeometryStruct(pDataObject2->getGeometry());
+ plhs[0] = configToStruct(pDataObject2->getGeometry()->getConfiguration());
}
}
}
@@ -440,12 +435,10 @@ void astra_mex_data2d_change_geometry(int nlhs, mxArray* plhs[], int nrhs, const
if (!mxIsStruct(prhs[2])) {
mexErrMsgTxt("Argument 3 is not a valid MATLAB struct.\n");
}
- XMLDocument* xml = struct2XML("ProjectionGeometry", prhs[2]);
- Config cfg;
- cfg.self = xml->getRootNode();
+ Config* cfg = structToConfig("ProjectionGeometry2D", prhs[2]);
// FIXME: Change how the base class is created. (This is duplicated
// in 'create' and Projector2D.cpp.)
- std::string type = cfg.self->getAttribute("type");
+ std::string type = cfg->self->getAttribute("type");
CProjectionGeometry2D* pGeometry;
if (type == "sparse_matrix") {
pGeometry = new CSparseMatrixProjectionGeometry2D();
@@ -459,24 +452,24 @@ void astra_mex_data2d_change_geometry(int nlhs, mxArray* plhs[], int nrhs, const
} else {
pGeometry = new CParallelProjectionGeometry2D();
}
- if (!pGeometry->initialize(cfg)) {
+ if (!pGeometry->initialize(*cfg)) {
mexErrMsgTxt("Geometry class not initialized. \n");
delete pGeometry;
- delete xml;
+ delete cfg;
return;
}
// If data is specified, check dimensions
if (pGeometry->getDetectorCount() != pSinogram->getDetectorCount() || pGeometry->getProjectionAngleCount() != pSinogram->getAngleCount()) {
mexErrMsgTxt("The dimensions of the data do not match those specified in the geometry. \n");
delete pGeometry;
- delete xml;
+ delete cfg;
return;
}
// If ok, change geometry
pSinogram->changeGeometry(pGeometry);
delete pGeometry;
- delete xml;
+ delete cfg;
return;
}
@@ -490,27 +483,25 @@ void astra_mex_data2d_change_geometry(int nlhs, mxArray* plhs[], int nrhs, const
if (!mxIsStruct(prhs[2])) {
mexErrMsgTxt("Argument 3 is not a valid MATLAB struct.\n");
}
- XMLDocument* xml = struct2XML(string("VolumeGeometry"), prhs[2]);
- Config cfg;
- cfg.self = xml->getRootNode();
+ Config* cfg = structToConfig("VolumeGeometry2D", prhs[2]);
CVolumeGeometry2D* pGeometry = new CVolumeGeometry2D();
- if (!pGeometry->initialize(cfg)) {
+ if (!pGeometry->initialize(*cfg)) {
mexErrMsgTxt("Geometry class not initialized. \n");
- delete xml;
+ delete cfg;
delete pGeometry;
return;
}
// If data is specified, check dimensions
if (pGeometry->getGridColCount() != pVolume->getWidth() || pGeometry->getGridRowCount() != pVolume->getHeight()) {
mexErrMsgTxt("The dimensions of the data do not match those specified in the geometry. \n");
- delete xml;
+ delete cfg;
delete pGeometry;
return;
}
// If ok, change geometry
pVolume->changeGeometry(pGeometry);
- delete xml;
+ delete cfg;
delete pGeometry;
}
@@ -639,12 +630,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT0: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == std::string("get")) {
astra_mex_data2d_get(nlhs, plhs, nrhs, prhs);
diff --git a/matlab/mex/astra_mex_data2d_vc08.vcproj b/matlab/mex/astra_mex_data2d_vc09.vcproj
index 8f1fc13..2c8a63f 100644
--- a/matlab/mex/astra_mex_data2d_vc08.vcproj
+++ b/matlab/mex/astra_mex_data2d_vc09.vcproj
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,15 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -84,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -107,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -122,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -151,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -174,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -190,15 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -219,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -242,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -258,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -287,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -310,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -327,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -357,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -378,16 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;$(CUDA_INC_PATH)&quot;;$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- BrowseInformation="1"
- DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -399,17 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -430,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -453,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -469,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -499,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -520,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -538,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -568,6 +563,24 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
@@ -585,6 +598,30 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexCopyDataHelpFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexCopyDataHelpFunctions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mexDataManagerHelpFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexDataManagerHelpFunctions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_data2d_vc11.vcxproj b/matlab/mex/astra_mex_data2d_vc11.vcxproj
index eb09332..636780a 100644
--- a/matlab/mex/astra_mex_data2d_vc11.vcxproj
+++ b/matlab/mex/astra_mex_data2d_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,213 +75,234 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
<TargetName>$(ProjectName)_c</TargetName>
<TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_INC_PATH);$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <BrowseInformation>true</BrowseInformation>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_data2d_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">false</ExcludedFromBuild>
- </ClCompile>
+ <ClCompile Include="mexCopyDataHelpFunctions.cpp" />
<ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">false</ExcludedFromBuild>
- </ClInclude>
+ <ClInclude Include="mexCopyDataHelpFunctions.h" />
<ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/astra_mex_data3d_c.cpp b/matlab/mex/astra_mex_data3d_c.cpp
index db81519..32b0ba7 100644
--- a/matlab/mex/astra_mex_data3d_c.cpp
+++ b/matlab/mex/astra_mex_data3d_c.cpp
@@ -32,6 +32,7 @@ $Id$
*/
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include "mexCopyDataHelpFunctions.h"
#include "mexDataManagerHelpFunctions.h"
@@ -79,11 +80,11 @@ void astra_mex_data3d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
}
if (data && !checkDataType(data)) {
- mexErrMsgTxt("Data must be single or double.");
+ mexErrMsgTxt("Data must be single, double or logical.");
return;
}
- const string sDataType = mex_util_get_string(prhs[1]);
+ const string sDataType = mexToString(prhs[1]);
// step2: Allocate data
CFloat32Data3DMemory* pDataObject3D =
@@ -152,7 +153,7 @@ void astra_mex_data3d_link(int& nlhs, mxArray* plhs[], int& nrhs, const mxArray*
return;
}
- string sDataType = mex_util_get_string(prhs[1]);
+ string sDataType = mexToString(prhs[1]);
// step2: Allocate data
CFloat32Data3DMemory* pDataObject3D =
@@ -266,48 +267,46 @@ void astra_mex_data3d_dimensions(int nlhs, mxArray* plhs[], int nrhs, const mxAr
}
//-----------------------------------------------------------------------------------------
-/**
- * [geom] = astra_mex_data3d('geometry', id);
+/** geom = astra_mex_data3d('get_geometry', id);
+ *
+ * Fetch the geometry of a 3d data object stored in the astra-library.
+ * id: identifier of the 3d data object as stored in the astra-library.
+ * geom: MATLAB-struct containing information about the used geometry.
*/
-void astra_mex_data3d_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+void astra_mex_data3d_get_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
{
- //// Get input
- //if (nrhs < 2) {
- // mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
- // return;
- //}
- //int iDid = (int)(mxGetScalar(prhs[1]));
-
- //// Get data object
- //CFloat32Data3D* pData = CData3DManager::getSingleton().get(iDid);
- //if (!pData) {
- // mexErrMsgTxt("DataObject not valid. \n");
- // return;
- //}
-
- //// Projection Data
- //if (pData->getType() == CFloat32Data3D::PROJECTION) {
- // CFloat32ProjectionData3D* pData2 = dynamic_cast<CFloat32ProjectionData3D*>(pData);
- // CProjectionGeometry3D* pProjGeom = pData2->getGeometry();
- // XMLDocument* config = pProjGeom->toXML();
-
- // if (1 <= nlhs) {
- // plhs[0] = XML2struct(config);
- // }
- //}
- //// Volume Data
- //else if (pData->getType() == CFloat32Data3D::VOLUME) {
- //// CFloat32VolumeData3D* pData2 = dynamic_cast<CFloat32VolumeData3D*>(pData);
- //// CVolumeGeometry2D* pVolGeom = pData2->getGeometry2D(iSliceNr);
- //// if (1 <= nlhs) {
- //// plhs[0] = createVolumeGeometryStruct(pVolGeom);
- //// }
- //}
- //// Error
- //else {
- // mexErrMsgTxt("Type not valid. \n");
- // return;
- //}
+ // parse input
+ if (nrhs < 2) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ if (!mxIsDouble(prhs[1])) {
+ mexErrMsgTxt("Identifier should be a scalar value. \n");
+ return;
+ }
+ int iDataID = (int)(mxGetScalar(prhs[1]));
+
+ // fetch data object
+ CFloat32Data3D* pDataObject = astra::CData3DManager::getSingleton().get(iDataID);
+ if (!pDataObject || !pDataObject->isInitialized()) {
+ mexErrMsgTxt("Data object not found or not initialized properly.\n");
+ return;
+ }
+
+ // create output
+ if (1 <= nlhs) {
+ if (pDataObject->getType() == CFloat32Data3D::PROJECTION) {
+ CFloat32ProjectionData3DMemory* pDataObject2 = dynamic_cast<CFloat32ProjectionData3DMemory*>(pDataObject);
+ plhs[0] = configToStruct(pDataObject2->getGeometry()->getConfiguration());
+
+ }
+ else if (pDataObject->getType() == CFloat32Data3D::VOLUME) {
+ CFloat32VolumeData3DMemory* pDataObject2 = dynamic_cast<CFloat32VolumeData3DMemory*>(pDataObject);
+ plhs[0] = configToStruct(pDataObject2->getGeometry()->getConfiguration());
+ }
+ }
+
+
}
//-----------------------------------------------------------------------------------------
@@ -367,12 +366,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// 3D data
if (sMode == std::string("create")) {
astra_mex_data3d_create(nlhs, plhs, nrhs, prhs);
@@ -395,8 +396,8 @@ void mexFunction(int nlhs, mxArray* plhs[],
astra_mex_data3d_info(nlhs, plhs, nrhs, prhs);
} else if (sMode == std::string("dimensions")) {
astra_mex_data3d_dimensions(nlhs, plhs, nrhs, prhs);
- } else if (sMode == std::string("geometry")) {
- astra_mex_data3d_geometry(nlhs, plhs, nrhs, prhs);
+ } else if (sMode == std::string("get_geometry")) {
+ astra_mex_data3d_get_geometry(nlhs, plhs, nrhs, prhs);
} else {
printHelp();
}
diff --git a/matlab/mex/astra_mex_data3d_vc09.vcproj b/matlab/mex/astra_mex_data3d_vc09.vcproj
new file mode 100644
index 0000000..fd861a3
--- /dev/null
+++ b/matlab/mex/astra_mex_data3d_vc09.vcproj
@@ -0,0 +1,628 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="astra_mex_data3d"
+ ProjectGUID="{0BEC029B-0929-4BF9-BD8B-9C9806A52065}"
+ RootNamespace="astraMatlab"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug_CUDA|Win32"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_CUDA|x64"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_CUDA|Win32"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release_CUDA|x64"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\astra_mex_data3d_c.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexHelpFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexHelpFunctions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mexCopyDataHelpFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexCopyDataHelpFunctions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mexDataManagerHelpFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexDataManagerHelpFunctions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/matlab/mex/astra_mex_data3d_vc11.vcxproj b/matlab/mex/astra_mex_data3d_vc11.vcxproj
index 064a4a1..1c3c620 100644
--- a/matlab/mex/astra_mex_data3d_vc11.vcxproj
+++ b/matlab/mex/astra_mex_data3d_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,223 +75,234 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
<TargetName>$(ProjectName)_c</TargetName>
<TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
- <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
- <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
- <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
- <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);__SSE2__</PreprocessorDefinitions>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_data3d_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">false</ExcludedFromBuild>
- </ClCompile>
+ <ClCompile Include="mexCopyDataHelpFunctions.cpp" />
<ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">false</ExcludedFromBuild>
- </ClInclude>
+ <ClInclude Include="mexCopyDataHelpFunctions.h" />
<ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/astra_mex_log_c.cpp b/matlab/mex/astra_mex_log_c.cpp
new file mode 100644
index 0000000..ea4621e
--- /dev/null
+++ b/matlab/mex/astra_mex_log_c.cpp
@@ -0,0 +1,305 @@
+/*
+-----------------------------------------------------------------------
+Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+ 2014-2015, CWI, Amsterdam
+
+Contact: astra@uantwerpen.be
+Website: http://sf.net/projects/astra-toolbox
+
+This file is part of the ASTRA Toolbox.
+
+
+The ASTRA Toolbox is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+The ASTRA Toolbox is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+
+-----------------------------------------------------------------------
+$Id$
+*/
+
+/** \file astra_mex_log_c.cpp
+ *
+ * \brief Manages astra logging
+ */
+#include <mex.h>
+#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
+
+#include "astra/Logging.h"
+
+using namespace std;
+using namespace astra;
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('debug', file, line, message);
+ *
+ * Log a debug message.
+ * file: Originating file name
+ * line: Originating line number
+ * message: Log message.
+ */
+void astra_mex_log_debug(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 4) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string filename = mexToString(prhs[1]);
+ int linenumber = (int)mxGetScalar(prhs[2]);
+ string message = mexToString(prhs[3]);
+ astra::CLogger::debug(filename.c_str(),linenumber,message.c_str());
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('info', file, line, message);
+ *
+ * Log an info message.
+ * file: Originating file name
+ * line: Originating line number
+ * message: Log message.
+ */
+void astra_mex_log_info(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 4) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string filename = mexToString(prhs[1]);
+ int linenumber = (int)mxGetScalar(prhs[2]);
+ string message = mexToString(prhs[3]);
+ astra::CLogger::info(filename.c_str(),linenumber,message.c_str());
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('warn', file, line, message);
+ *
+ * Log a warning message.
+ * file: Originating file name
+ * line: Originating line number
+ * message: Log message.
+ */
+void astra_mex_log_warn(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 4) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string filename = mexToString(prhs[1]);
+ int linenumber = (int)mxGetScalar(prhs[2]);
+ string message = mexToString(prhs[3]);
+ astra::CLogger::warn(filename.c_str(),linenumber,message.c_str());
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('error', file, line, message);
+ *
+ * Log an error message.
+ * file: Originating file name
+ * line: Originating line number
+ * message: Log message.
+ */
+void astra_mex_log_error(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 4) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string filename = mexToString(prhs[1]);
+ int linenumber = (int)mxGetScalar(prhs[2]);
+ string message = mexToString(prhs[3]);
+ astra::CLogger::error(filename.c_str(),linenumber,message.c_str());
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('enable', type);
+ *
+ * Enable logging.
+ * type: which output to enable ('all', 'file', 'screen')
+ */
+void astra_mex_log_enable(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 2) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string sType = mexToString(prhs[1]);
+ if(sType == "all"){
+ astra::CLogger::enable();
+ }else if(sType == "file"){
+ astra::CLogger::enableFile();
+ }else if(sType == "screen"){
+ astra::CLogger::enableScreen();
+ } else {
+ mexErrMsgTxt("Specify which output to enable ('all', 'file', or 'screen')");
+ }
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('disable', type);
+ *
+ * Disable logging.
+ * type: which output to disable ('all', 'file', 'screen')
+ */
+void astra_mex_log_disable(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 2) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string sType = mexToString(prhs[1]);
+ if(sType == "all"){
+ astra::CLogger::disable();
+ }else if(sType == "file"){
+ astra::CLogger::disableFile();
+ }else if(sType == "screen"){
+ astra::CLogger::disableScreen();
+ } else {
+ mexErrMsgTxt("Specify which output to disable ('all', 'file', or 'screen')");
+ }
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('format', type, fmt);
+ *
+ * Enable logging.
+ * type: which output to format ('file', 'screen')
+ * fmt: format string
+ * Here are the substitutions you may use:
+ * %f: Source file name generating the log call.
+ * %n: Source line number where the log call was made.
+ * %m: The message text sent to the logger (after printf formatting).
+ * %d: The current date, formatted using the logger's date format.
+ * %t: The current time, formatted using the logger's time format.
+ * %l: The log level (one of "DEBUG", "INFO", "WARN", or "ERROR").
+ * %%: A literal percent sign.
+ * The default format string is "%d %t %f(%n): %l: %m\n".
+ */
+void astra_mex_log_format(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 3) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string sType = mexToString(prhs[1]);
+ string sFormat = mexToString(prhs[2]);
+ if (!sFormat.empty())
+ {
+ char lastChar = *sFormat.rbegin();
+ if (lastChar!='\n'){
+ sFormat += '\n';
+ }
+ }else{
+ sFormat += '\n';
+ }
+ if(sType == "file"){
+ astra::CLogger::setFormatFile(sFormat.c_str());
+ }else if(sType == "screen"){
+ astra::CLogger::setFormatScreen(sFormat.c_str());
+ } else {
+ mexErrMsgTxt("Specify which output to format ('file' or 'screen')");
+ }
+}
+
+//-----------------------------------------------------------------------------------------
+/** astra_mex_log('output', type, output, level);
+ *
+ * Set output file / output screen.
+ * type: which output to set ('file', 'screen')
+ * output: which output file / screen to use:
+ * 'file': filename
+ * 'screen': 'stdout' or 'stderr'
+ * level: logging level to use ('debug', 'info', 'warn', or 'error')
+ */
+void astra_mex_log_output(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+{
+ if (nrhs < 4) {
+ mexErrMsgTxt("Not enough arguments. See the help document for a detailed argument list. \n");
+ return;
+ }
+ string sType = mexToString(prhs[1]);
+ string sOutput = mexToString(prhs[2]);
+ string sLevel = mexToString(prhs[3]);
+ log_level eLevel;
+ if(sLevel == "debug"){
+ eLevel = LOG_DEBUG;
+ }else if(sLevel == "info"){
+ eLevel = LOG_INFO;
+ }else if(sLevel == "warn"){
+ eLevel = LOG_WARN;
+ }else if(sLevel == "error"){
+ eLevel = LOG_ERROR;
+ }else{
+ mexErrMsgTxt("Specify which log level to use ('debug', 'info', 'warn', or 'error')");
+ }
+ if(sType == "file"){
+ astra::CLogger::setOutputFile(sOutput.c_str(),eLevel);
+ }else if(sType == "screen"){
+ int fd;
+ if(sOutput == "stdout"){
+ fd=1;
+ }else if(sOutput == "stderr"){
+ fd=2;
+ }else{
+ mexErrMsgTxt("Specify which screen to output to ('stdout' or 'stderr')");
+ }
+ astra::CLogger::setOutputScreen(fd,eLevel);
+ } else {
+ mexErrMsgTxt("Specify which output to set ('file' or 'screen')");
+ }
+}
+
+//-----------------------------------------------------------------------------------------
+static void printHelp()
+{
+ mexPrintf("Please specify a mode of operation.\n");
+ mexPrintf("Valid modes: debug, info, warn, error, enable, disable, format, output\n");
+}
+
+//-----------------------------------------------------------------------------------------
+/**
+ * ... = astra_mex_log(mode, ...);
+ */
+void mexFunction(int nlhs, mxArray* plhs[],
+ int nrhs, const mxArray* prhs[])
+{
+ // INPUT: Mode
+ string sMode = "";
+ if (1 <= nrhs) {
+ sMode = mexToString(prhs[0]);
+ } else {
+ printHelp();
+ return;
+ }
+
+ initASTRAMex();
+
+ // SWITCH (MODE)
+ if (sMode == "debug") {
+ astra_mex_log_debug(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "info") {
+ astra_mex_log_info(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "warn") {
+ astra_mex_log_warn(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "error") {
+ astra_mex_log_error(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "enable") {
+ astra_mex_log_enable(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "disable") {
+ astra_mex_log_disable(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "format") {
+ astra_mex_log_format(nlhs, plhs, nrhs, prhs);
+ }else if (sMode == "output") {
+ astra_mex_log_output(nlhs, plhs, nrhs, prhs);
+ } else {
+ printHelp();
+ }
+ return;
+}
diff --git a/matlab/mex/astra_mex_data3d_vc08.vcproj b/matlab/mex/astra_mex_log_vc09.vcproj
index 2e69c16..0e0d469 100644
--- a/matlab/mex/astra_mex_data3d_vc08.vcproj
+++ b/matlab/mex/astra_mex_log_vc09.vcproj
@@ -2,8 +2,8 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
- Name="astra_mex_data3d"
- ProjectGUID="{0BEC029B-0929-4BF9-BD8B-9C9806A52065}"
+ Name="astra_mex_log"
+ ProjectGUID="{CA2840B3-DA68-41B5-AC57-F5DFD20ED8F8}"
RootNamespace="astraMatlab"
TargetFrameworkVersion="131072"
>
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,15 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -84,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -107,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -122,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -151,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -174,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -190,15 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -219,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -242,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -258,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -287,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -310,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -327,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -357,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -378,14 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -397,16 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -427,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -450,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -466,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -496,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -517,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -535,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -565,13 +563,31 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
- RelativePath=".\astra_mex_data3d_c.cpp"
+ RelativePath=".\astra_mex_log_c.cpp"
>
</File>
<File
@@ -582,6 +598,14 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_log_vc11.vcxproj b/matlab/mex/astra_mex_log_vc11.vcxproj
new file mode 100644
index 0000000..0a939cf
--- /dev/null
+++ b/matlab/mex/astra_mex_log_vc11.vcxproj
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug_CUDA|Win32">
+ <Configuration>Debug_CUDA</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_CUDA|x64">
+ <Configuration>Debug_CUDA</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_CUDA|Win32">
+ <Configuration>Release_CUDA</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_CUDA|x64">
+ <Configuration>Release_CUDA</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>astra_mex_log</ProjectName>
+ <ProjectGuid>{03B833F5-4FD6-4FBE-AAF4-E3305CD56D2E}</ProjectGuid>
+ <RootNamespace>astraMatlab</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="astra_mex_log_c.cpp" />
+ <ClCompile Include="mexHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="mexHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/matlab/mex/astra_mex_matrix_c.cpp b/matlab/mex/astra_mex_matrix_c.cpp
index 016566a..aa31383 100644
--- a/matlab/mex/astra_mex_matrix_c.cpp
+++ b/matlab/mex/astra_mex_matrix_c.cpp
@@ -32,6 +32,7 @@ $Id$
*/
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include <list>
@@ -406,12 +407,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT0: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == std::string("get")) {
astra_mex_matrix_get(nlhs, plhs, nrhs, prhs);
diff --git a/matlab/mex/astra_mex_matrix_vc08.vcproj b/matlab/mex/astra_mex_matrix_vc09.vcproj
index 47509f6..3aa17a5 100644
--- a/matlab/mex/astra_mex_matrix_vc08.vcproj
+++ b/matlab/mex/astra_mex_matrix_vc09.vcproj
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,15 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -84,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -107,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -122,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -151,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -174,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -190,15 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -219,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -242,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -258,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -287,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -310,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -327,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -357,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -378,16 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;$(CUDA_INC_PATH)&quot;;$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- BrowseInformation="1"
- DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -399,17 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -430,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -453,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -469,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -499,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -520,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -538,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -568,6 +563,24 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
@@ -585,6 +598,14 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_matrix_vc11.vcxproj b/matlab/mex/astra_mex_matrix_vc11.vcxproj
index 12393bf..abf86a7 100644
--- a/matlab/mex/astra_mex_matrix_vc11.vcxproj
+++ b/matlab/mex/astra_mex_matrix_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,213 +75,230 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
<TargetName>$(ProjectName)_c</TargetName>
<TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_INC_PATH);$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <BrowseInformation>true</BrowseInformation>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_matrix_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/astra_mex_projector3d_c.cpp b/matlab/mex/astra_mex_projector3d_c.cpp
index 25980f9..c3b547f 100644
--- a/matlab/mex/astra_mex_projector3d_c.cpp
+++ b/matlab/mex/astra_mex_projector3d_c.cpp
@@ -33,6 +33,7 @@ $Id$
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include "astra/Globals.h"
@@ -65,16 +66,16 @@ void astra_mex_projector3d_create(int nlhs, mxArray* plhs[], int nrhs, const mxA
}
// turn MATLAB struct to an XML-based Config object
- XMLDocument* xml = struct2XML("Projector3D", prhs[1]);
- Config cfg;
- cfg.self = xml->getRootNode();
+ Config* cfg = structToConfig("Projector3D", prhs[1]);
// create algorithm
- CProjector3D* pProj = CProjector3DFactory::getSingleton().create(cfg);
+ CProjector3D* pProj = CProjector3DFactory::getSingleton().create(*cfg);
if (pProj == NULL) {
+ delete cfg;
mexErrMsgTxt("Error creating Projector3D. \n");
return;
}
+ delete cfg;
// store projector
int iIndex = CProjector3DManager::getSingleton().store(pProj);
@@ -135,16 +136,16 @@ void astra_mex_projector3d_get_projection_geometry(int nlhs, mxArray* plhs[], in
}
// step3: get projection_geometry and turn it into a MATLAB struct
- //if (1 <= nlhs) {
- // plhs[0] = createProjectionGeometryStruct(pProjector->getProjectionGeometry());
- //}
+ if (1 <= nlhs) {
+ plhs[0] = configToStruct(pProjector->getProjectionGeometry()->getConfiguration());
+ }
}
//-----------------------------------------------------------------------------------------
/**
* [recon_geom] = astra_mex_projector3d('get_volume_geometry', pid);
*/
-void astra_mex_projector3d_get_reconstruction_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
+void astra_mex_projector3d_get_volume_geometry(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
{
// step1: read input
if (nrhs < 2) {
@@ -161,9 +162,9 @@ void astra_mex_projector3d_get_reconstruction_geometry(int nlhs, mxArray* plhs[]
}
// step3: get projection_geometry and turn it into a MATLAB struct
- //if (1 <= nlhs) {
- // plhs[0] = createVolumeGeometryStruct(pProjector->getVolumeGeometry());
- //}
+ if (1 <= nlhs) {
+ plhs[0] = configToStruct(pProjector->getVolumeGeometry()->getConfiguration());
+ }
}
//-----------------------------------------------------------------------------------------
@@ -397,12 +398,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == "create") {
astra_mex_projector3d_create(nlhs, plhs, nrhs, prhs);
@@ -413,7 +416,7 @@ void mexFunction(int nlhs, mxArray* plhs[],
} else if (sMode == "get_projection_geometry") {
astra_mex_projector3d_get_projection_geometry(nlhs, plhs, nrhs, prhs);
} else if (sMode == "get_volume_geometry") {
- astra_mex_projector3d_get_reconstruction_geometry(nlhs, plhs, nrhs, prhs);
+ astra_mex_projector3d_get_volume_geometry(nlhs, plhs, nrhs, prhs);
} else if (sMode == "weights_single_ray") {
astra_mex_projector_weights_single_ray(nlhs, plhs, nrhs, prhs);
//} else if (sMode == "weights_projection") {
diff --git a/matlab/mex/astra_mex_projector3d_vc08.vcproj b/matlab/mex/astra_mex_projector3d_vc09.vcproj
index bedc53b..b9464a2 100644
--- a/matlab/mex/astra_mex_projector3d_vc08.vcproj
+++ b/matlab/mex/astra_mex_projector3d_vc09.vcproj
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,15 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -84,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -107,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -122,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -151,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -174,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -190,15 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -219,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -242,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -258,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -287,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -310,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -327,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -357,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -378,14 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -397,16 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -427,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -450,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -466,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -496,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -517,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -535,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -565,6 +563,24 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
@@ -582,6 +598,14 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_projector3d_vc11.vcxproj b/matlab/mex/astra_mex_projector3d_vc11.vcxproj
index 7981806..42eb0f1 100644
--- a/matlab/mex/astra_mex_projector3d_vc11.vcxproj
+++ b/matlab/mex/astra_mex_projector3d_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,210 +75,230 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
<TargetName>$(ProjectName)_c</TargetName>
<TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_INC_PATH);..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_INC_PATH);..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_projector3d_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/astra_mex_projector_c.cpp b/matlab/mex/astra_mex_projector_c.cpp
index de73f07..204ba8e 100644
--- a/matlab/mex/astra_mex_projector_c.cpp
+++ b/matlab/mex/astra_mex_projector_c.cpp
@@ -34,6 +34,7 @@ $Id$
#include <mex.h>
#include "mexHelpFunctions.h"
+#include "mexInitFunctions.h"
#include "astra/AstraObjectManager.h"
#include "astra/Projector2D.h"
@@ -74,19 +75,16 @@ void astra_mex_projector_create(int nlhs, mxArray* plhs[], int nrhs, const mxArr
// turn MATLAB struct to an XML-based Config object
- XMLDocument* xml = struct2XML("Projector2D", prhs[1]);
- Config cfg;
- cfg.self = xml->getRootNode();
+ Config* cfg = structToConfig("Projector2D", prhs[1]);
// create algorithm
- CProjector2D* pProj = CProjector2DFactory::getSingleton().create(cfg);
+ CProjector2D* pProj = CProjector2DFactory::getSingleton().create(*cfg);
if (pProj == NULL) {
- delete xml;
+ delete cfg;
mexErrMsgTxt("Error creating projector. \n");
return;
}
-
- delete xml;
+ delete cfg;
// store projector
iIndex = CProjector2DManager::getSingleton().store(pProj);
@@ -162,7 +160,7 @@ void astra_mex_projector_projection_geometry(int nlhs, mxArray* plhs[], int nrhs
// step3: get projection_geometry and turn it into a MATLAB struct
if (1 <= nlhs) {
- plhs[0] = createProjectionGeometryStruct(pProjector->getProjectionGeometry());
+ plhs[0] = configToStruct(pProjector->getProjectionGeometry()->getConfiguration());
}
}
@@ -191,7 +189,8 @@ void astra_mex_projector_volume_geometry(int nlhs, mxArray* plhs[], int nrhs, co
// step3: get projection_geometry and turn it into a MATLAB struct
if (1 <= nlhs) {
- plhs[0] = createVolumeGeometryStruct(pProjector->getVolumeGeometry());
+ plhs[0] = configToStruct(pProjector->getVolumeGeometry()->getConfiguration());
+
}
}
@@ -472,12 +471,14 @@ void mexFunction(int nlhs, mxArray* plhs[],
// INPUT: Mode
string sMode = "";
if (1 <= nrhs) {
- sMode = mex_util_get_string(prhs[0]);
+ sMode = mexToString(prhs[0]);
} else {
printHelp();
return;
}
+ initASTRAMex();
+
// SWITCH (MODE)
if (sMode == "create") {
astra_mex_projector_create(nlhs, plhs, nrhs, prhs);
diff --git a/matlab/mex/astra_mex_projector_vc08.vcproj b/matlab/mex/astra_mex_projector_vc09.vcproj
index 1380061..05c207f 100644
--- a/matlab/mex/astra_mex_projector_vc08.vcproj
+++ b/matlab/mex/astra_mex_projector_vc09.vcproj
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,15 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -84,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -107,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -122,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -151,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -174,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -190,15 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -219,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -242,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="&quot;$(MATLAB_ROOT)\extern\include\&quot;;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -258,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -287,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -310,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -327,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -357,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -378,16 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- BrowseInformation="1"
- DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -399,17 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -430,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -453,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -469,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -499,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -520,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -538,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -568,6 +563,24 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
@@ -585,6 +598,14 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_projector_vc11.vcxproj b/matlab/mex/astra_mex_projector_vc11.vcxproj
index 3ab1806..e944949 100644
--- a/matlab/mex/astra_mex_projector_vc11.vcxproj
+++ b/matlab/mex/astra_mex_projector_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,213 +75,230 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
<TargetName>$(ProjectName)_c</TargetName>
<TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_INC_PATH);..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <BrowseInformation>true</BrowseInformation>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_projector_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/astra_mex_vc08.vcproj b/matlab/mex/astra_mex_vc09.vcproj
index 58c1e0a..e4d7d07 100644
--- a/matlab/mex/astra_mex_vc08.vcproj
+++ b/matlab/mex/astra_mex_vc09.vcproj
@@ -19,7 +19,7 @@
</ToolFiles>
<Configurations>
<Configuration
- Name="Release|Win32"
+ Name="Debug_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -40,12 +40,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -55,15 +49,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -84,9 +69,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -107,12 +111,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -122,15 +120,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -151,9 +140,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|Win32"
+ Name="Debug|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -174,13 +181,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -190,15 +190,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -219,9 +210,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Release_CUDA|x64"
+ Name="Debug|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -242,13 +252,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="2"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -258,15 +261,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -287,9 +281,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="0"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="true"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|Win32"
+ Name="Release_CUDA|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -310,14 +322,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -327,16 +331,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -357,9 +351,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug_CUDA|x64"
+ Name="Release_CUDA|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -378,16 +391,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;$(CUDA_INC_PATH)&quot;;$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- PreprocessorDefinitions="ASTRA_CUDA"
- RuntimeLibrary="3"
- BrowseInformation="1"
- DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -399,17 +402,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="AstraCuda64D.lib libmex.lib libmx.lib libut.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -430,9 +422,27 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;&quot;$(CUDA_INC_PATH)&quot;;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="ASTRA_CUDA;__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="AstraCuda64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
<Configuration
- Name="Debug|Win32"
+ Name="Release|Win32"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -453,13 +463,6 @@
Name="VCMIDLTool"
/>
<Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
- DebugInformationFormat="4"
- />
- <Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
@@ -469,16 +472,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra32D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
- AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft"
- ModuleDefinitionFile="mex.def"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -499,9 +492,28 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ EnableEnhancedInstructionSet="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra32.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw32"
+ AdditionalLibraryDirectories="..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;..\..\lib\win32"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="1"
+ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(SolutionDir)bin\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(OutDir)\obj\$(ProjectName)"
ConfigurationType="2"
@@ -520,13 +532,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
- RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -538,16 +543,6 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Astra64D.lib libmex.lib libmx.lib"
- OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
- AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft"
- ModuleDefinitionFile="mex.def"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
Name="VCALinkTool"
/>
<Tool
@@ -568,6 +563,24 @@
<Tool
Name="VCPostBuildEventTool"
/>
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include"
+ PreprocessorDefinitions="__SSE2__"
+ Optimization="2"
+ RuntimeLibrary="2"
+ OpenMP="true"
+ AdditionalOptions="/MP"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Astra64.lib libmex.lib libmx.lib libut.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_c.mexw64"
+ AdditionalLibraryDirectories="..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;..\..\lib\x64"
+ ModuleDefinitionFile="mex.def"
+ GenerateDebugInformation="false"
+ TargetMachine="17"
+ />
</Configuration>
</Configurations>
<References>
@@ -585,6 +598,14 @@
RelativePath=".\mexHelpFunctions.h"
>
</File>
+ <File
+ RelativePath=".\mexInitFunctions.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\mexInitFunctions.h"
+ >
+ </File>
</Files>
<Globals>
</Globals>
diff --git a/matlab/mex/astra_mex_vc11.vcxproj b/matlab/mex/astra_mex_vc11.vcxproj
index 2e6857c..f1324b4 100644
--- a/matlab/mex/astra_mex_vc11.vcxproj
+++ b/matlab/mex/astra_mex_vc11.vcxproj
@@ -40,19 +40,15 @@
<RootNamespace>astraMatlab</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -60,7 +56,7 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
@@ -68,6 +64,10 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
@@ -75,213 +75,230 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
<TargetName>$(ProjectName)_c</TargetName>
<TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw32</TargetExt>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(ProjectName)\</IntDir>
+ <TargetName>$(ProjectName)_c</TargetName>
+ <TargetExt>.mexw64</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Debug;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\lib\include\cuda;..\..\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Debug;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CUDA|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(CUDA_INC_PATH);$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ASTRA_CUDA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <BrowseInformation>true</BrowseInformation>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>ASTRA_CUDA;__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>AstraCuda64D.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>AstraCuda64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release_CUDA;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra32D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw32</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\win32;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra32.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\win32\;..\..\bin\win32\Release;$(MATLAB_ROOT)\extern\lib\win32\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(MATLAB_ROOT)\extern\include\;$(CUDA_PATH)\include;..\..\lib\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>__SSE2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>Astra64D.lib;libmex.lib;libmx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)_c.mexw64</OutputFile>
- <AdditionalLibraryDirectories>..\..\bin\x64;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>Astra64.lib;libmex.lib;libmx.lib;libut.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib\x64\;..\..\bin\x64\Release;$(MATLAB_ROOT)\extern\lib\win64\microsoft;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>mex.def</ModuleDefinitionFile>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="astra_mex_c.cpp" />
<ClCompile Include="mexHelpFunctions.cpp" />
- <ClCompile Include="mexCopyDataHelpFunctions.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="mexDataManagerHelpFunctions.cpp" />
+ <ClCompile Include="mexInitFunctions.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mexHelpFunctions.h" />
- <ClInclude Include="mexCopyDataHelpFunctions.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_CUDA|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="mexDataManagerHelpFunctions.h" />
+ <ClInclude Include="mexInitFunctions.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/matlab/mex/mexCopyDataHelpFunctions.cpp b/matlab/mex/mexCopyDataHelpFunctions.cpp
index bbcad30..80fb834 100644
--- a/matlab/mex/mexCopyDataHelpFunctions.cpp
+++ b/matlab/mex/mexCopyDataHelpFunctions.cpp
@@ -1,13 +1,13 @@
/*
-----------------------------------------------------------------------
-Copyright 2013 iMinds-Vision Lab, University of Antwerp
+Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+ 2014-2015, CWI, Amsterdam
-Contact: astra@ua.ac.be
-Website: http://astra.ua.ac.be
+Contact: astra@uantwerpen.be
+Website: http://sf.net/projects/astra-toolbox
+This file is part of the ASTRA Toolbox.
-This file is part of the
-All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
The ASTRA Toolbox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,7 +40,6 @@ $Id$
#if defined(__SSE2__)
# include <emmintrin.h>
-
# define STORE_32F_64F_CORE8(in, out, count, base) \
{\
const __m128 inV0 = *((const __m128 *) &in[count + 0 + base]);\
@@ -108,6 +107,17 @@ $Id$
out[count + 7 + base] = in[count + 7 + base];\
}
#endif
+#define STORE_8F_32F_CORE8(in, out, count, base) \
+ {\
+ out[count + 0 + base] = (float)in[count + 0 + base];\
+ out[count + 1 + base] = (float)in[count + 1 + base];\
+ out[count + 2 + base] = (float)in[count + 2 + base];\
+ out[count + 3 + base] = (float)in[count + 3 + base];\
+ out[count + 4 + base] = (float)in[count + 4 + base];\
+ out[count + 5 + base] = (float)in[count + 5 + base];\
+ out[count + 6 + base] = (float)in[count + 6 + base];\
+ out[count + 7 + base] = (float)in[count + 7 + base];\
+ }
const char * warnDataTypeNotSupported = "Data type not supported: nothing was copied";
@@ -118,6 +128,7 @@ _copyMexToCFloat32Array(const mxArray * const inArray, astra::float32 * const ou
const long long block = 32;
const long long totRoundedPixels = ROUND_DOWN(tot_size, block);
+ // Array of doubles
if (mxIsDouble(inArray)) {
const double * const pdMatlabData = mxGetPr(inArray);
@@ -133,6 +144,8 @@ _copyMexToCFloat32Array(const mxArray * const inArray, astra::float32 * const ou
out[count] = pdMatlabData[count];
}
}
+
+ // Array of floats
else if (mxIsSingle(inArray)) {
const float * const pfMatlabData = (const float *)mxGetData(inArray);
@@ -148,6 +161,23 @@ _copyMexToCFloat32Array(const mxArray * const inArray, astra::float32 * const ou
out[count] = pfMatlabData[count];
}
}
+
+ // Array of logicals
+ else if (mxIsLogical(inArray)) {
+ const mxLogical * const pfMatlabData = (const mxLogical *)mxGetLogicals(inArray);
+
+#pragma omp for nowait
+ for (long long count = 0; count < totRoundedPixels; count += block) {
+ STORE_8F_32F_CORE8(pfMatlabData, out, count, 0);
+ STORE_8F_32F_CORE8(pfMatlabData, out, count, 8);
+ STORE_8F_32F_CORE8(pfMatlabData, out, count, 16);
+ STORE_8F_32F_CORE8(pfMatlabData, out, count, 24);
+ }
+#pragma omp for nowait
+ for (long long count = totRoundedPixels; count < tot_size; count++) {
+ out[count] = pfMatlabData[count];
+ }
+ }
else {
#pragma omp single nowait
mexWarnMsgIdAndTxt("ASTRA_MEX:wrong_datatype", warnDataTypeNotSupported);
@@ -233,7 +263,7 @@ copyMexToCFloat32Array(const mxArray * const in,
#pragma omp parallel
{
// fill with scalar value
- if (mex_is_scalar(in)) {
+ if (mexIsScalar(in)) {
astra::float32 fValue = 0.f;
if (!mxIsEmpty(in)) {
fValue = (astra::float32)mxGetScalar(in);
diff --git a/matlab/mex/mexCopyDataHelpFunctions.h b/matlab/mex/mexCopyDataHelpFunctions.h
index d0cf3c6..0853879 100644
--- a/matlab/mex/mexCopyDataHelpFunctions.h
+++ b/matlab/mex/mexCopyDataHelpFunctions.h
@@ -1,13 +1,13 @@
/*
-----------------------------------------------------------------------
-Copyright 2013 iMinds-Vision Lab, University of Antwerp
+Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+ 2014-2015, CWI, Amsterdam
-Contact: astra@ua.ac.be
-Website: http://astra.ua.ac.be
+Contact: astra@uantwerpen.be
+Website: http://sf.net/projects/astra-toolbox
+This file is part of the ASTRA Toolbox.
-This file is part of the
-All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
The ASTRA Toolbox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/matlab/mex/mexDataManagerHelpFunctions.cpp b/matlab/mex/mexDataManagerHelpFunctions.cpp
index 2985a9d..d482428 100644
--- a/matlab/mex/mexDataManagerHelpFunctions.cpp
+++ b/matlab/mex/mexDataManagerHelpFunctions.cpp
@@ -1,13 +1,13 @@
/*
-----------------------------------------------------------------------
-Copyright 2013 iMinds-Vision Lab, University of Antwerp
+Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+ 2014-2015, CWI, Amsterdam
-Contact: astra@ua.ac.be
-Website: http://astra.ua.ac.be
+Contact: astra@uantwerpen.be
+Website: http://sf.net/projects/astra-toolbox
+This file is part of the ASTRA Toolbox.
-This file is part of the
-All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
The ASTRA Toolbox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -105,7 +105,7 @@ checkID(const astra::int32 & id, astra::CFloat32Data3DMemory *& pDataObj)
bool
checkDataType(const mxArray * const in)
{
- return (mex_is_scalar(in) || mxIsDouble(in) || mxIsSingle(in));
+ return (mexIsScalar(in) || mxIsDouble(in) || mxIsSingle(in) || mxIsLogical(in));
}
//-----------------------------------------------------------------------------------------
@@ -213,7 +213,7 @@ allocateDataObject(const std::string & sDataType,
bool bUnshare = true;
if (unshare)
{
- if (!mex_is_scalar(unshare))
+ if (!mexIsScalar(unshare))
{
mexErrMsgTxt("Argument 5 (read-only) must be scalar");
return NULL;
@@ -225,7 +225,7 @@ allocateDataObject(const std::string & sDataType,
mwIndex iZ = 0;
if (zIndex)
{
- if (!mex_is_scalar(zIndex))
+ if (!mexIsScalar(zIndex))
{
mexErrMsgTxt("Argument 6 (Z) must be scalar");
return NULL;
@@ -237,25 +237,19 @@ allocateDataObject(const std::string & sDataType,
if (sDataType == "-vol")
{
// Read geometry
- astra::XMLDocument* xml = struct2XML("VolumeGeometry", geometry);
- if (!xml) {
- return NULL;
- }
- astra::Config cfg;
- cfg.self = xml->getRootNode();
-
+ astra::Config* cfg = structToConfig("VolumeGeometry3D", geometry);
astra::CVolumeGeometry3D* pGeometry = new astra::CVolumeGeometry3D();
- if (!pGeometry->initialize(cfg))
+ if (!pGeometry->initialize(*cfg))
{
mexErrMsgTxt("Geometry class not initialized. \n");
delete pGeometry;
- delete xml;
+ delete cfg;
return NULL;
}
- delete xml;
+ delete cfg;
// If data is specified, check dimensions
- if (data && !mex_is_scalar(data))
+ if (data && !mexIsScalar(data))
{
if (! (zIndex
? checkDataSize(data, pGeometry, iZ)
@@ -288,16 +282,10 @@ allocateDataObject(const std::string & sDataType,
else if (sDataType == "-sino" || sDataType == "-proj3d" || sDataType == "-sinocone")
{
// Read geometry
- astra::XMLDocument* xml = struct2XML("ProjectionGeometry", geometry);
- if (!xml) {
- return NULL;
- }
- astra::Config cfg;
- cfg.self = xml->getRootNode();
-
+ astra::Config* cfg = structToConfig("ProjectionGeometry3D", geometry);
// FIXME: Change how the base class is created. (This is duplicated
- // in Projector2D.cpp.)
- std::string type = cfg.self->getAttribute("type");
+ // in Projector3D.cpp.)
+ std::string type = cfg->self->getAttribute("type");
astra::CProjectionGeometry3D* pGeometry = 0;
if (type == "parallel3d") {
pGeometry = new astra::CParallelProjectionGeometry3D();
@@ -312,16 +300,16 @@ allocateDataObject(const std::string & sDataType,
return NULL;
}
- if (!pGeometry->initialize(cfg)) {
+ if (!pGeometry->initialize(*cfg)) {
mexErrMsgTxt("Geometry class not initialized. \n");
delete pGeometry;
- delete xml;
+ delete cfg;
return NULL;
}
- delete xml;
+ delete cfg;
// If data is specified, check dimensions
- if (data && !mex_is_scalar(data))
+ if (data && !mexIsScalar(data))
{
if (! (zIndex
? checkDataSize(data, pGeometry, iZ)
diff --git a/matlab/mex/mexDataManagerHelpFunctions.h b/matlab/mex/mexDataManagerHelpFunctions.h
index 36b74d8..0614e05 100644
--- a/matlab/mex/mexDataManagerHelpFunctions.h
+++ b/matlab/mex/mexDataManagerHelpFunctions.h
@@ -1,13 +1,13 @@
/*
-----------------------------------------------------------------------
-Copyright 2013 iMinds-Vision Lab, University of Antwerp
+Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+ 2014-2015, CWI, Amsterdam
-Contact: astra@ua.ac.be
-Website: http://astra.ua.ac.be
+Contact: astra@uantwerpen.be
+Website: http://sf.net/projects/astra-toolbox
+This file is part of the ASTRA Toolbox.
-This file is part of the
-All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
The ASTRA Toolbox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/matlab/mex/mexHelpFunctions.cpp b/matlab/mex/mexHelpFunctions.cpp
index e919dd9..c0ac711 100644
--- a/matlab/mex/mexHelpFunctions.cpp
+++ b/matlab/mex/mexHelpFunctions.cpp
@@ -32,9 +32,11 @@ $Id$
*/
#include "mexHelpFunctions.h"
-#include "astra/SparseMatrixProjectionGeometry2D.h"
-#include "astra/FanFlatVecProjectionGeometry2D.h"
-#include "astra/AstraObjectManager.h"
+#include <algorithm>
+#include <boost/lexical_cast.hpp>
+#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/classification.hpp>
using namespace std;
using namespace astra;
@@ -42,387 +44,148 @@ using namespace astra;
//-----------------------------------------------------------------------------------------
// get string from matlab
-std::string mex_util_get_string(const mxArray* pInput)
+string mexToString(const mxArray* pInput)
{
- if (!mxIsChar(pInput)) {
- return "";
+ // is string?
+ if (mxIsChar(pInput)) {
+ mwSize iLength = mxGetNumberOfElements(pInput) + 1;
+ char* buf = new char[iLength];
+ mxGetString(pInput, buf, iLength);
+ std::string res = std::string(buf);
+ delete[] buf;
+ return res;
}
- mwSize iLength = mxGetNumberOfElements(pInput) + 1;
- char* buf = new char[iLength];
- mxGetString(pInput, buf, iLength);
- std::string res = std::string(buf);
- delete[] buf;
- return res;
+
+ // is scalar?
+ if (mxIsNumeric(pInput) && mxGetM(pInput)*mxGetN(pInput) == 1) {
+ return boost::lexical_cast<string>(mxGetScalar(pInput));
+ }
+
+ return "";
}
//-----------------------------------------------------------------------------------------
-// is option
-bool isOption(std::list<std::string> lOptions, std::string sOption)
+// return true if the argument is a scalar
+bool mexIsScalar(const mxArray* pInput)
{
- return std::find(lOptions.begin(), lOptions.end(), sOption) != lOptions.end();
+ return (mxIsNumeric(pInput) && mxGetM(pInput)*mxGetN(pInput) == 1);
}
//-----------------------------------------------------------------------------------------
-// turn a matlab struct into a c++ map
-std::map<std::string, mxArray*> parseStruct(const mxArray* pInput)
+void get3DMatrixDims(const mxArray* x, mwSize *dims)
{
- std::map<std::string, mxArray*> res;
-
- // check type
- if (!mxIsStruct(pInput)) {
- mexErrMsgTxt("Input must be a struct.");
- return res;
+ const mwSize* mdims = mxGetDimensions(x);
+ mwSize dimCount = mxGetNumberOfDimensions(x);
+ if (dimCount == 1) {
+ dims[0] = mdims[0];
+ dims[1] = 1;
+ dims[2] = 1;
+ } else if (dimCount == 2) {
+ dims[0] = mdims[0];
+ dims[1] = mdims[1];
+ dims[2] = 1;
+ } else if (dimCount == 3) {
+ dims[0] = mdims[0];
+ dims[1] = mdims[1];
+ dims[2] = mdims[2];
+ } else {
+ dims[0] = 0;
+ dims[1] = 0;
+ dims[2] = 0;
}
+}
+
+
+
+
- // get field names
- int nfields = mxGetNumberOfFields(pInput);
- for (int i = 0; i < nfields; i++) {
- std::string sFieldName = std::string(mxGetFieldNameByNumber(pInput, i));
- res[sFieldName] = mxGetFieldByNumber(pInput,0,i);
- }
- return res;
-}
//-----------------------------------------------------------------------------------------
-// turn a c++ map into a matlab struct
-mxArray* buildStruct(std::map<std::string, mxArray*> mInput)
+// turn an std vector<float32> object to an mxArray
+mxArray* vectorToMxArray(std::vector<astra::float32> mInput)
{
- mwSize dims[2] = {1, 1};
- mxArray* res = mxCreateStructArray(2,dims,0,0);
-
- for (std::map<std::string, mxArray*>::iterator it = mInput.begin(); it != mInput.end(); it++) {
- mxAddField(res, (*it).first.c_str());
- mxSetField(res, 0, (*it).first.c_str(), (*it).second);
+ mxArray* res = mxCreateDoubleMatrix(1, mInput.size(), mxREAL);
+ double* pdData = mxGetPr(res);
+ for (unsigned int i = 0; i < mInput.size(); i++) {
+ pdData[i] = mInput[i];
}
return res;
}
//-----------------------------------------------------------------------------------------
-// parse projection geometry data
-astra::CProjectionGeometry2D* parseProjectionGeometryStruct(const mxArray* prhs)
+// turn a vector<vector<float32>> object to an mxArray
+mxArray* vector2DToMxArray(std::vector<std::vector<astra::float32> > mInput)
{
- // parse struct
- std::map<string, mxArray*> mStruct = parseStruct(prhs);
-
- // create projection geometry object
- string type = mex_util_get_string(mStruct["type"]);
- if (type == "parallel") {
-
- // detector_width
- float32 fDetWidth = 1.0f;
- mxArray* tmp = mStruct["detector_width"];
- if (tmp != NULL) {
- fDetWidth = (float32)(mxGetScalar(tmp));
- }
-
- // detector_count
- int iDetCount = 100;
- tmp = mStruct["detector_count"];
- if (tmp != NULL) {
- iDetCount = (int)(mxGetScalar(tmp));
- }
-
- // angles
- float32* pfAngles;
- int iAngleCount;
- tmp = mStruct["projection_angles"];
- if (tmp != NULL) {
- double* angleValues = mxGetPr(tmp);
- iAngleCount = mxGetN(tmp) * mxGetM(tmp);
- pfAngles = new float32[iAngleCount];
- for (int i = 0; i < iAngleCount; i++) {
- pfAngles[i] = angleValues[i];
- }
- } else {
- mexErrMsgTxt("'angles' not specified, error.");
- return NULL;
- }
-
- // create projection geometry
- return new astra::CParallelProjectionGeometry2D(iAngleCount, // number of projections
- iDetCount, // number of detectors
- fDetWidth, // width of the detectors
- pfAngles); // angles array
- }
-
- else if (type == "fanflat") {
-
- // detector_width
- float32 fDetWidth = 1.0f;
- mxArray* tmp = mStruct["detector_width"];
- if (tmp != NULL) {
- fDetWidth = (float32)(mxGetScalar(tmp));
- }
-
- // detector_count
- int iDetCount = 100;
- tmp = mStruct["detector_count"];
- if (tmp != NULL) {
- iDetCount = (int)(mxGetScalar(tmp));
- }
-
- // angles
- float32* pfAngles;
- int iAngleCount;
- tmp = mStruct["projection_angles"];
- if (tmp != NULL) {
- double* angleValues = mxGetPr(tmp);
- iAngleCount = mxGetN(tmp) * mxGetM(tmp);
- pfAngles = new float32[iAngleCount];
- for (int i = 0; i < iAngleCount; i++) {
- pfAngles[i] = angleValues[i];
- }
- } else {
- mexErrMsgTxt("'angles' not specified, error.");
- return NULL;
- }
-
- // origin_source_dist
- int iDistOriginSource = 100;
- tmp = mStruct["origin_source_dist"];
- if (tmp != NULL) {
- iDistOriginSource = (int)(mxGetScalar(tmp));
- }
+ unsigned int sizex = mInput.size();
+ if (sizex == 0) return mxCreateString("empty");
+ unsigned int sizey = mInput[0].size();
- // origin_det_dist
- int iDistOriginDet = 100;
- tmp = mStruct["origin_det_dist"];
- if (tmp != NULL) {
- iDistOriginDet = (int)(mxGetScalar(tmp));
+ mxArray* res = mxCreateDoubleMatrix(sizex, sizey, mxREAL);
+ double* pdData = mxGetPr(res);
+ for (unsigned int i = 0; i < sizex; i++) {
+ for (unsigned int j = 0; j < sizey && j < mInput[i].size(); j++) {
+ pdData[j*sizex+i] = mInput[i][j];
}
-
- // create projection geometry
- return new astra::CFanFlatProjectionGeometry2D(iAngleCount, // number of projections
- iDetCount, // number of detectors
- fDetWidth, // width of the detectors
- pfAngles, // angles array
- iDistOriginSource, // distance origin source
- iDistOriginDet); // distance origin detector
- }
-
- else {
- mexPrintf("Only parallel and fanflat projection geometry implemented.");
- return NULL;
}
+ return res;
}
//-----------------------------------------------------------------------------------------
-// create projection geometry data
-mxArray* createProjectionGeometryStruct(astra::CProjectionGeometry2D* _pProjGeom)
+// turn a boost::any object to an mxArray
+mxArray* anyToMxArray(boost::any _any)
{
- // temporary map to store the data for the MATLAB struct
- std::map<std::string, mxArray*> mGeometryInfo;
-
- // detectorCount
- mGeometryInfo["DetectorCount"] = mxCreateDoubleScalar(_pProjGeom->getDetectorCount());
-
- if (!_pProjGeom->isOfType("fanflat_vec")) {
- // detectorWidth
- mGeometryInfo["DetectorWidth"] = mxCreateDoubleScalar(_pProjGeom->getDetectorWidth());
-
- // pfProjectionAngles
- mxArray* pAngles = mxCreateDoubleMatrix(1, _pProjGeom->getProjectionAngleCount(), mxREAL);
- double* out = mxGetPr(pAngles);
- for (int i = 0; i < _pProjGeom->getProjectionAngleCount(); i++) {
- out[i] = _pProjGeom->getProjectionAngle(i);
- }
- mGeometryInfo["ProjectionAngles"] = pAngles;
- }
- else {
- astra::CFanFlatVecProjectionGeometry2D* pVecGeom = dynamic_cast<astra::CFanFlatVecProjectionGeometry2D*>(_pProjGeom);
- mxArray* pVectors = mxCreateDoubleMatrix(1, pVecGeom->getProjectionAngleCount()*6, mxREAL);
- double* out = mxGetPr(pVectors);
- int iDetCount = pVecGeom->getDetectorCount();
- for (int i = 0; i < pVecGeom->getProjectionAngleCount(); i++) {
- const SFanProjection* p = &pVecGeom->getProjectionVectors()[i];
- out[6*i + 0] = p->fSrcX;
- out[6*i + 1] = p->fSrcY;
- out[6*i + 2] = p->fDetSX + 0.5f*iDetCount*p->fDetUX;
- out[6*i + 3] = p->fDetSY + 0.5f*iDetCount*p->fDetUY;
- out[6*i + 4] = p->fDetUX;
- out[6*i + 5] = p->fDetUY;
- }
- mGeometryInfo["Vectors"] = pVectors;
+ if (_any.type() == typeid(std::string)) {
+ std::string str = boost::any_cast<std::string>(_any);
+ return mxCreateString(str.c_str());
}
-
- // parallel specific options
- if (_pProjGeom->isOfType("parallel")) {
- // type
- mGeometryInfo["type"] = mxCreateString("parallel");
+ if (_any.type() == typeid(int)) {
+ return mxCreateDoubleScalar(boost::any_cast<int>(_any));
}
- // fanflat specific options
- else if (_pProjGeom->isOfType("fanflat")) {
- astra::CFanFlatProjectionGeometry2D* pFanFlatGeom = dynamic_cast<astra::CFanFlatProjectionGeometry2D*>(_pProjGeom);
- // detectorCount
- mGeometryInfo["DistanceOriginSource"] = mxCreateDoubleScalar(pFanFlatGeom->getOriginSourceDistance());
- // detectorWidth
- mGeometryInfo["DistanceOriginDetector"] = mxCreateDoubleScalar(pFanFlatGeom->getOriginDetectorDistance());
- // type
- mGeometryInfo["type"] = mxCreateString("fanflat");
+ if (_any.type() == typeid(float32)) {
+ return mxCreateDoubleScalar(boost::any_cast<float32>(_any));
}
- else if (_pProjGeom->isOfType("sparse_matrix")) {
- astra::CSparseMatrixProjectionGeometry2D* pSparseMatrixGeom = dynamic_cast<astra::CSparseMatrixProjectionGeometry2D*>(_pProjGeom);
- mGeometryInfo["type"] = mxCreateString("sparse_matrix");
- mGeometryInfo["MatrixID"] = mxCreateDoubleScalar(CMatrixManager::getSingleton().getIndex(pSparseMatrixGeom->getMatrix()));
+ if (_any.type() == typeid(std::vector<astra::float32>)) {
+ return vectorToMxArray(boost::any_cast<std::vector<float32> >(_any));
}
- else if(_pProjGeom->isOfType("fanflat_vec")) {
- mGeometryInfo["type"] = mxCreateString("fanflat_vec");
+ if (_any.type() == typeid(std::vector<std::vector<astra::float32> >)) {
+ return vector2DToMxArray(boost::any_cast<std::vector<std::vector<float32> > >(_any));
}
-
- // build and return the MATLAB struct
- return buildStruct(mGeometryInfo);
+ return NULL;
}
-//-----------------------------------------------------------------------------------------
-// parse reconstruction geometry data
-astra::CVolumeGeometry2D* parseVolumeGeometryStruct(const mxArray* prhs)
-{
- // parse struct
- std::map<string, mxArray*> mStruct = parseStruct(prhs);
-
- std::map<string, mxArray*> mOptions = parseStruct(mStruct["option"]);
-
- // GridColCount
- int iWindowColCount = 128;
- mxArray* tmp = mStruct["GridColCount"];
- if (tmp != NULL) {
- iWindowColCount = (int)(mxGetScalar(tmp));
- }
-
- // GridRowCount
- int iWindowRowCount = 128;
- tmp = mStruct["GridRowCount"];
- if (tmp != NULL) {
- iWindowRowCount = (int)(mxGetScalar(tmp));
- }
- // WindowMinX
- float32 fWindowMinX = - iWindowColCount / 2;
- tmp = mOptions["WindowMinX"];
- if (tmp != NULL) {
- fWindowMinX = (float32)(mxGetScalar(tmp));
- }
-
- // WindowMaxX
- float32 fWindowMaxX = iWindowColCount / 2;
- tmp = mOptions["WindowMaxX"];
- if (tmp != NULL) {
- fWindowMaxX = (float32)(mxGetScalar(tmp));
- }
-
- // WindowMinY
- float32 fWindowMinY = - iWindowRowCount / 2;
- tmp = mOptions["WindowMinY"];
- if (tmp != NULL) {
- fWindowMinY = (float32)(mxGetScalar(tmp));
- }
-
- // WindowMaxX
- float32 fWindowMaxY = iWindowRowCount / 2;
- tmp = mOptions["WindowMaxY"];
- if (tmp != NULL) {
- fWindowMaxY = (float32)(mxGetScalar(tmp));
- }
-
- // create and return reconstruction geometry
- return new astra::CVolumeGeometry2D(iWindowColCount, iWindowRowCount,
- fWindowMinX, fWindowMinY,
- fWindowMaxX, fWindowMaxY);
-}
-//-----------------------------------------------------------------------------------------
-// create reconstruction geometry data
-mxArray* createVolumeGeometryStruct(astra::CVolumeGeometry2D* _pReconGeom)
-{
- // temporary map to store the data for the MATLAB struct
- std::map<std::string, mxArray*> mGeometryInfo;
- // fill up map
- mGeometryInfo["GridColCount"] = mxCreateDoubleScalar(_pReconGeom->getGridColCount());
- mGeometryInfo["GridRowCount"] = mxCreateDoubleScalar(_pReconGeom->getGridRowCount());
- std::map<std::string, mxArray*> mGeometryOptions;
- mGeometryOptions["WindowMinX"] = mxCreateDoubleScalar(_pReconGeom->getWindowMinX());
- mGeometryOptions["WindowMaxX"] = mxCreateDoubleScalar(_pReconGeom->getWindowMaxX());
- mGeometryOptions["WindowMinY"] = mxCreateDoubleScalar(_pReconGeom->getWindowMinY());
- mGeometryOptions["WindowMaxY"] = mxCreateDoubleScalar(_pReconGeom->getWindowMaxY());
- mGeometryInfo["option"] = buildStruct(mGeometryOptions);
- // build and return the MATLAB struct
- return buildStruct(mGeometryInfo);
-}
//-----------------------------------------------------------------------------------------
-string matlab2string(const mxArray* pField)
+// turn a MATLAB struct into a Config object
+Config* structToConfig(string rootname, const mxArray* pStruct)
{
- // is string?
- if (mxIsChar(pField)) {
- return mex_util_get_string(pField);
- }
-
- // is scalar?
- if (mxIsNumeric(pField) && mxGetM(pField)*mxGetN(pField) == 1) {
- return boost::lexical_cast<string>(mxGetScalar(pField));
+ if (!mxIsStruct(pStruct)) {
+ mexErrMsgTxt("Input must be a struct.");
+ return NULL;
}
- return "";
-}
-
-//-----------------------------------------------------------------------------------------
-// Options struct to xml node
-bool readOptions(XMLNode* node, const mxArray* pOptionStruct)
-{
- // loop all fields
- int nfields = mxGetNumberOfFields(pOptionStruct);
- for (int i = 0; i < nfields; i++) {
- std::string sFieldName = std::string(mxGetFieldNameByNumber(pOptionStruct, i));
- const mxArray* pField = mxGetFieldByNumber(pOptionStruct, 0, i);
-
- if (node->hasOption(sFieldName)) {
- mexErrMsgTxt("Duplicate option");
- return false;
- }
-
- // string or scalar
- if (mxIsChar(pField) || mex_is_scalar(pField)) {
- string sValue = matlab2string(pField);
- node->addOption(sFieldName, sValue);
- } else
- // numerical array
- if (mxIsNumeric(pField) && mxGetM(pField)*mxGetN(pField) > 1) {
- if (!mxIsDouble(pField)) {
- mexErrMsgTxt("Numeric input must be double.");
- return false;
- }
+ // create the document
+ Config* cfg = new Config();
+ cfg->initialize(rootname);
- XMLNode* listbase = node->addChildNode("Option");
- listbase->addAttribute("key", sFieldName);
- listbase->addAttribute("listsize", mxGetM(pField)*mxGetN(pField));
- double* pdValues = mxGetPr(pField);
- int index = 0;
- for (unsigned int row = 0; row < mxGetM(pField); row++) {
- for (unsigned int col = 0; col < mxGetN(pField); col++) {
- XMLNode* item = listbase->addChildNode("ListItem");
- item->addAttribute("index", index);
- item->addAttribute("value", pdValues[col*mxGetM(pField)+row]);
- index++;
- delete item;
- }
- }
- delete listbase;
- } else {
- mexErrMsgTxt("Unsupported option type");
- return false;
- }
+ // read the struct
+ bool ret = structToXMLNode(cfg->self, pStruct);
+ if (!ret) {
+ delete cfg;
+ mexErrMsgTxt("Error parsing struct.");
+ return NULL;
}
- return true;
+ return cfg;
}
//-----------------------------------------------------------------------------------------
-// struct to xml node
-bool readStruct(XMLNode* root, const mxArray* pStruct)
+bool structToXMLNode(XMLNode* node, const mxArray* pStruct)
{
// loop all fields
int nfields = mxGetNumberOfFields(pStruct);
@@ -434,27 +197,27 @@ bool readStruct(XMLNode* root, const mxArray* pStruct)
// string
if (mxIsChar(pField)) {
- string sValue = matlab2string(pField);
+ string sValue = mexToString(pField);
if (sFieldName == "type") {
- root->addAttribute("type", sValue);
+ node->addAttribute("type", sValue);
} else {
- delete root->addChildNode(sFieldName, sValue);
+ delete node->addChildNode(sFieldName, sValue);
}
}
// scalar
- if (mex_is_scalar(pField)) {
- string sValue = matlab2string(pField);
- delete root->addChildNode(sFieldName, sValue);
+ else if (mxIsNumeric(pField) && mxGetM(pField)*mxGetN(pField) == 1) {
+ string sValue = mexToString(pField);
+ delete node->addChildNode(sFieldName, sValue);
}
// numerical array
- if (mxIsNumeric(pField) && mxGetM(pField)*mxGetN(pField) > 1) {
+ else if (mxIsNumeric(pField) && mxGetM(pField)*mxGetN(pField) > 1) {
if (!mxIsDouble(pField)) {
mexErrMsgTxt("Numeric input must be double.");
return false;
}
- XMLNode* listbase = root->addChildNode(sFieldName);
+ XMLNode* listbase = node->addChildNode(sFieldName);
listbase->addAttribute("listsize", mxGetM(pField)*mxGetN(pField));
double* pdValues = mxGetPr(pField);
int index = 0;
@@ -470,16 +233,15 @@ bool readStruct(XMLNode* root, const mxArray* pStruct)
delete listbase;
}
-
// not castable to a single string
- if (mxIsStruct(pField)) {
+ else if (mxIsStruct(pField)) {
if (sFieldName == "options" || sFieldName == "option" || sFieldName == "Options" || sFieldName == "Option") {
- bool ret = readOptions(root, pField);
+ bool ret = optionsToXMLNode(node, pField);
if (!ret)
return false;
} else {
- XMLNode* newNode = root->addChildNode(sFieldName);
- bool ret = readStruct(newNode, pField);
+ XMLNode* newNode = node->addChildNode(sFieldName);
+ bool ret = structToXMLNode(newNode, pField);
delete newNode;
if (!ret)
return false;
@@ -490,109 +252,101 @@ bool readStruct(XMLNode* root, const mxArray* pStruct)
return true;
}
+//-----------------------------------------------------------------------------------------
+// Options struct to xml node
+bool optionsToXMLNode(XMLNode* node, const mxArray* pOptionStruct)
+{
+ // loop all fields
+ int nfields = mxGetNumberOfFields(pOptionStruct);
+ for (int i = 0; i < nfields; i++) {
+ std::string sFieldName = std::string(mxGetFieldNameByNumber(pOptionStruct, i));
+ const mxArray* pField = mxGetFieldByNumber(pOptionStruct, 0, i);
+ if (node->hasOption(sFieldName)) {
+ mexErrMsgTxt("Duplicate option");
+ return false;
+ }
+
+ // string or scalar
+ if (mxIsChar(pField) || mexIsScalar(pField)) {
+ string sValue = mexToString(pField);
+ node->addOption(sFieldName, sValue);
+ }
+ // numerical array
+ else if (mxIsNumeric(pField) && mxGetM(pField)*mxGetN(pField) > 1) {
+ if (!mxIsDouble(pField)) {
+ mexErrMsgTxt("Numeric input must be double.");
+ return false;
+ }
+
+ XMLNode* listbase = node->addChildNode("Option");
+ listbase->addAttribute("key", sFieldName);
+ listbase->addAttribute("listsize", mxGetM(pField)*mxGetN(pField));
+ double* pdValues = mxGetPr(pField);
+ int index = 0;
+ for (unsigned int row = 0; row < mxGetM(pField); row++) {
+ for (unsigned int col = 0; col < mxGetN(pField); col++) {
+ XMLNode* item = listbase->addChildNode("ListItem");
+ item->addAttribute("index", index);
+ item->addAttribute("value", pdValues[col*mxGetM(pField)+row]);
+ index++;
+ delete item;
+ }
+ }
+ delete listbase;
+ } else {
+ mexErrMsgTxt("Unsupported option type");
+ return false;
+ }
+ }
+ return true;
+}
//-----------------------------------------------------------------------------------------
-// turn a MATLAB struct into an XML Document
-XMLDocument* struct2XML(string rootname, const mxArray* pStruct)
+// turn a matlab struct into a c++ map
+std::map<std::string, mxArray*> parseStruct(const mxArray* pInput)
{
- if (!mxIsStruct(pStruct)) {
+ std::map<std::string, mxArray*> res;
+
+ // check type
+ if (!mxIsStruct(pInput)) {
mexErrMsgTxt("Input must be a struct.");
- return NULL;
+ return res;
}
- // create the document
- XMLDocument* doc = XMLDocument::createDocument(rootname);
- XMLNode* rootnode = doc->getRootNode();
+ // get field names
+ int nfields = mxGetNumberOfFields(pInput);
+ for (int i = 0; i < nfields; i++) {
+ std::string sFieldName = std::string(mxGetFieldNameByNumber(pInput, i));
+ res[sFieldName] = mxGetFieldByNumber(pInput,0,i);
+ }
+ return res;
+}
+
+
- // read the struct
- bool ret = readStruct(rootnode, pStruct);
- //doc->getRootNode()->print();
- delete rootnode;
- if (!ret) {
- delete doc;
- doc = 0;
- }
- return doc;
-}
-//-----------------------------------------------------------------------------------------
-// turn an std vector<float32> object to an mxArray
-mxArray* vectorToMxArray(std::vector<astra::float32> mInput)
-{
- mxArray* res = mxCreateDoubleMatrix(1, mInput.size(), mxREAL);
- double* pdData = mxGetPr(res);
- for (unsigned int i = 0; i < mInput.size(); i++) {
- pdData[i] = mInput[i];
- }
- return res;
-}
-//-----------------------------------------------------------------------------------------
-// turn a vector<vector<float32>> object to an mxArray
-mxArray* vector2DToMxArray(std::vector<std::vector<astra::float32> > mInput)
-{
- unsigned int sizex = mInput.size();
- if (sizex == 0) return mxCreateString("empty");
- unsigned int sizey = mInput[0].size();
- mxArray* res = mxCreateDoubleMatrix(sizex, sizey, mxREAL);
- double* pdData = mxGetPr(res);
- for (unsigned int i = 0; i < sizex; i++) {
- for (unsigned int j = 0; j < sizey && j < mInput[i].size(); j++) {
- pdData[j*sizex+i] = mInput[i][j];
- }
- }
- return res;
-}
-//-----------------------------------------------------------------------------------------
-// turn a boost::any object to an mxArray
-mxArray* anyToMxArray(boost::any _any)
-{
- if (_any.type() == typeid(std::string)) {
- std::string str = boost::any_cast<std::string>(_any);
- return mxCreateString(str.c_str());
- }
- if (_any.type() == typeid(int)) {
- return mxCreateDoubleScalar(boost::any_cast<int>(_any));
- }
- if (_any.type() == typeid(float32)) {
- return mxCreateDoubleScalar(boost::any_cast<float32>(_any));
- }
- if (_any.type() == typeid(std::vector<astra::float32>)) {
- return vectorToMxArray(boost::any_cast<std::vector<float32> >(_any));
- }
- if (_any.type() == typeid(std::vector<std::vector<astra::float32> >)) {
- return vector2DToMxArray(boost::any_cast<std::vector<std::vector<float32> > >(_any));
- }
- return NULL;
-}
-//-----------------------------------------------------------------------------------------
-// return true ig the argument is a scalar
-bool mex_is_scalar(const mxArray* pInput)
-{
- return (mxIsNumeric(pInput) && mxGetM(pInput)*mxGetN(pInput) == 1);
-}
//-----------------------------------------------------------------------------------------
-mxArray* XML2struct(astra::XMLDocument* xml)
+// turn a Config object into a MATLAB struct
+mxArray* configToStruct(astra::Config* cfg)
{
- XMLNode* node = xml->getRootNode();
- mxArray* str = XMLNode2struct(xml->getRootNode());
- delete node;
- return str;
+ return XMLNodeToStruct(cfg->self);
}
//-----------------------------------------------------------------------------------------
-mxArray* XMLNode2struct(astra::XMLNode* node)
+mxArray* XMLNodeToStruct(astra::XMLNode* node)
{
- std::map<std::string, mxArray*> mList;
+ std::map<std::string, mxArray*> mList;
+ std::map<std::string, mxArray*> mOptions;
// type_attribute
if (node->hasAttribute("type")) {
@@ -602,41 +356,103 @@ mxArray* XMLNode2struct(astra::XMLNode* node)
list<XMLNode*> nodes = node->getNodes();
for (list<XMLNode*>::iterator it = nodes.begin(); it != nodes.end(); it++) {
XMLNode* subnode = (*it);
- // list
- if (subnode->hasAttribute("listsize")) {
- cout << "lkmdsqldqsjkl" << endl;
- cout << " " << node->getContentNumericalArray().size() << endl;
- mList[subnode->getName()] = vectorToMxArray(node->getContentNumericalArray());
+
+ // option
+ if (subnode->getName() == "Option") {
+ mOptions[subnode->getAttribute("key")] = stringToMxArray(subnode->getAttribute("value"));
}
- // string
+
+ // regular content
else {
- mList[subnode->getName()] = mxCreateString(subnode->getContent().c_str());
+ mList[subnode->getName()] = stringToMxArray(subnode->getContent());
}
delete subnode;
}
+ if (mOptions.size() > 0) mList["options"] = buildStruct(mOptions);
return buildStruct(mList);
}
-void get3DMatrixDims(const mxArray* x, mwSize *dims)
+//-----------------------------------------------------------------------------------------
+mxArray* stringToMxArray(std::string input)
{
- const mwSize* mdims = mxGetDimensions(x);
- mwSize dimCount = mxGetNumberOfDimensions(x);
- if (dimCount == 1) {
- dims[0] = mdims[0];
- dims[1] = 1;
- dims[2] = 1;
- } else if (dimCount == 2) {
- dims[0] = mdims[0];
- dims[1] = mdims[1];
- dims[2] = 1;
- } else if (dimCount == 3) {
- dims[0] = mdims[0];
- dims[1] = mdims[1];
- dims[2] = mdims[2];
- } else {
- dims[0] = 0;
- dims[1] = 0;
- dims[2] = 0;
+ // matrix
+ if (input.find(';') != std::string::npos) {
+
+ // split rows
+ std::vector<std::string> row_strings;
+ std::vector<std::string> col_strings;
+ boost::split(row_strings, input, boost::is_any_of(";"));
+ boost::split(col_strings, row_strings[0], boost::is_any_of(","));
+
+ // get dimensions
+ int rows = row_strings.size();
+ int cols = col_strings.size();
+
+ // init matrix
+ mxArray* pMatrix = mxCreateDoubleMatrix(rows, cols, mxREAL);
+ double* out = mxGetPr(pMatrix);
+
+ // loop elements
+ for (unsigned int row = 0; row < rows; row++) {
+ boost::split(col_strings, row_strings[row], boost::is_any_of(","));
+ // check size
+ for (unsigned int col = 0; col < col_strings.size(); col++) {
+ out[col*rows + row] = boost::lexical_cast<float32>(col_strings[col]);
+ }
+ }
+ return pMatrix;
}
-}
+
+ // vector
+ if (input.find(',') != std::string::npos) {
+
+ // split
+ std::vector<std::string> items;
+ boost::split(items, input, boost::is_any_of(","));
+
+ // init matrix
+ mxArray* pVector = mxCreateDoubleMatrix(1, items.size(), mxREAL);
+ double* out = mxGetPr(pVector);
+
+ // loop elements
+ for (unsigned int i = 0; i < items.size(); i++) {
+ out[i] = boost::lexical_cast<float32>(items[i]);
+ }
+ return pVector;
+ }
+
+ // number
+ char* end;
+ double content = ::strtod(input.c_str(), &end);
+ bool isnumber = !*end;
+ if (isnumber) {
+ return mxCreateDoubleScalar(content);
+ }
+
+ // string
+ return mxCreateString(input.c_str());
+}
+//-----------------------------------------------------------------------------------------
+// turn a c++ map into a matlab struct
+mxArray* buildStruct(std::map<std::string, mxArray*> mInput)
+{
+ mwSize dims[2] = {1, 1};
+ mxArray* res = mxCreateStructArray(2,dims,0,0);
+
+ for (std::map<std::string, mxArray*>::iterator it = mInput.begin(); it != mInput.end(); it++) {
+ mxAddField(res, (*it).first.c_str());
+ mxSetField(res, 0, (*it).first.c_str(), (*it).second);
+ }
+ return res;
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/matlab/mex/mexHelpFunctions.h b/matlab/mex/mexHelpFunctions.h
index 425b4ef..f9ffcf2 100644
--- a/matlab/mex/mexHelpFunctions.h
+++ b/matlab/mex/mexHelpFunctions.h
@@ -1,13 +1,13 @@
/*
-----------------------------------------------------------------------
-Copyright 2012 iMinds-Vision Lab, University of Antwerp
+Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+ 2014-2015, CWI, Amsterdam
-Contact: astra@ua.ac.be
-Website: http://astra.ua.ac.be
+Contact: astra@uantwerpen.be
+Website: http://sf.net/projects/astra-toolbox
+This file is part of the ASTRA Toolbox.
-This file is part of the
-All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
The ASTRA Toolbox is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,34 +43,31 @@ $Id$
#include "astra/Globals.h"
#include "astra/Utilities.h"
-#include "astra/ParallelProjectionGeometry2D.h"
-#include "astra/FanFlatProjectionGeometry2D.h"
-#include "astra/VolumeGeometry2D.h"
-
+#include "astra/Config.h"
#include "astra/XMLDocument.h"
#include "astra/XMLNode.h"
-std::string mex_util_get_string(const mxArray* pInput);
-bool isOption(std::list<std::string> lOptions, std::string sOption);
-
-bool mex_is_scalar(const mxArray* pInput);
+// utility functions
+string mexToString(const mxArray* pInput);
+bool mexIsScalar(const mxArray* pInput);
+void get3DMatrixDims(const mxArray* x, mwSize *dims);
-std::map<std::string, mxArray*> parseStruct(const mxArray* pInput);
-mxArray* buildStruct(std::map<std::string, mxArray*> mInput);
+// convert boost::any into a MALTAB object
mxArray* vectorToMxArray(std::vector<astra::float32> mInput);
-
mxArray* anyToMxArray(boost::any _any);
-astra::CProjectionGeometry2D* parseProjectionGeometryStruct(const mxArray*);
-mxArray* createProjectionGeometryStruct(astra::CProjectionGeometry2D*);
-astra::CVolumeGeometry2D* parseVolumeGeometryStruct(const mxArray*);
-mxArray* createVolumeGeometryStruct(astra::CVolumeGeometry2D* _pReconGeom);
+// turn a MATLAB struct into a Config object
+astra::Config* structToConfig(string rootname, const mxArray* pStruct);
+bool structToXMLNode(astra::XMLNode* node, const mxArray* pStruct);
+bool optionsToXMLNode(astra::XMLNode* node, const mxArray* pOptionStruct);
+std::map<std::string, mxArray*> parseStruct(const mxArray* pInput);
-astra::XMLDocument* struct2XML(string rootname, const mxArray* pStruct);
+// turn a Config object into a MATLAB struct
+mxArray* configToStruct(astra::Config* cfg);
+mxArray* XMLNodeToStruct(astra::XMLNode* xml);
+mxArray* stringToMxArray(std::string input);
+mxArray* buildStruct(std::map<std::string, mxArray*> mInput);
-mxArray* XML2struct(astra::XMLDocument* xml);
-mxArray* XMLNode2struct(astra::XMLNode* xml);
-void get3DMatrixDims(const mxArray* x, mwSize *dims);
#endif
diff --git a/matlab/mex/mexInitFunctions.cpp b/matlab/mex/mexInitFunctions.cpp
new file mode 100644
index 0000000..d8a50d7
--- /dev/null
+++ b/matlab/mex/mexInitFunctions.cpp
@@ -0,0 +1,24 @@
+#include <mex.h>
+#include "astra/Logging.h"
+
+bool mexIsInitialized=false;
+
+/**
+ * Callback to print log message to Matlab window.
+ *
+ */
+void logCallBack(const char *msg, size_t len){
+ mexPrintf(msg);
+}
+
+/**
+ * Initialize mex functions.
+ *
+ */
+void initASTRAMex(){
+ if(mexIsInitialized) return;
+ if(!astra::CLogger::setCallbackScreen(&logCallBack)){
+ mexErrMsgTxt("Error initializing mex functions.");
+ }
+ mexIsInitialized=true;
+}
diff --git a/matlab/mex/mexInitFunctions.h b/matlab/mex/mexInitFunctions.h
new file mode 100644
index 0000000..f16e9c9
--- /dev/null
+++ b/matlab/mex/mexInitFunctions.h
@@ -0,0 +1,6 @@
+#ifndef _INC_ASTRA_MEX_INITFUNCTIONS
+#define _INC_ASTRA_MEX_INITFUNCTIONS
+
+void initASTRAMex();
+
+#endif \ No newline at end of file
diff --git a/matlab/tools/astra_mex_log.m b/matlab/tools/astra_mex_log.m
new file mode 100644
index 0000000..28cfa18
--- /dev/null
+++ b/matlab/tools/astra_mex_log.m
@@ -0,0 +1,33 @@
+function [varargout] = astra_mex_log(varargin)
+%------------------------------------------------------------------------
+% Reference page in Help browser
+% <a href="matlab:docsearch('astra_mex_log' )">astra_mex_log</a>.
+%------------------------------------------------------------------------
+%------------------------------------------------------------------------
+% This file is part of the ASTRA Toolbox
+%
+% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
+% 2014-2015, CWI, Amsterdam
+% License: Open Source under GPLv3
+% Contact: astra@uantwerpen.be
+% Website: http://sf.net/projects/astra-toolbox
+%------------------------------------------------------------------------
+% $Id$
+if size(varargin,2)==2 && (strcmp(varargin{1},'debug') || strcmp(varargin{1},'info') || strcmp(varargin{1},'warn') || strcmp(varargin{1},'error'))
+ d = dbstack(1);
+ if size(d,1)==0
+ astra_mex_log_c(varargin{1},'Unknown',0,varargin{2})
+ else
+ astra_mex_log_c(varargin{1},d(1).file,d(1).line,varargin{2})
+ end
+else
+ if nargout == 0
+ astra_mex_log_c(varargin{:});
+ if exist('ans','var')
+ varargout{1} = ans;
+ end
+ else
+ varargout = cell(1,nargout);
+ [varargout{:}] = astra_mex_log_c(varargin{:});
+ end
+end \ No newline at end of file