Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
51f6c511
Commit
51f6c511
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Mex/C++: reverted back to relying on RTO
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
e30a18de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_Cxx/include/DctMatlabData.h
+9
-5
9 additions, 5 deletions
zUtil_Cxx/include/DctMatlabData.h
with
9 additions
and
5 deletions
zUtil_Cxx/include/DctMatlabData.h
+
9
−
5
View file @
51f6c511
...
...
@@ -56,7 +56,7 @@ namespace dct {
static
DctProjectionVector
<
Type
,
MatlabAllocator
<
Type
>
>
create_collection_from_dims
(
const
mxArray
*
const
);
template
<
typename
Type
>
static
void
import_coefficients
(
DctProjectionTransformCoefficients
<
Type
>
&
out
,
const
mxArray
*
const
);
static
DctProjectionTransformCoefficients
<
Type
>
import_coefficients
(
const
mxArray
*
const
);
template
<
typename
Type
>
static
std
::
vector
<
DctProjectionTransformCoefficients
<
Type
>
>
import_coefficients_list
(
const
mxArray
*
const
);
...
...
@@ -181,9 +181,11 @@ namespace dct {
}
template
<
typename
Type
>
void
DctMatlabData
::
import_coefficients
(
DctProjectionTransformCoefficients
<
Type
>
&
output
,
const
mxArray
*
const
coeff
)
DctProjectionTransformCoefficients
<
Type
>
DctMatlabData
::
import_coefficients
(
const
mxArray
*
const
coeff
)
{
DctProjectionTransformCoefficients
<
Type
>
output
;
if
(
!
mxIsStruct
(
coeff
))
{
throw
WrongArgumentException
(
"Invalid Coeffs: third argument should be a structure!"
);
}
...
...
@@ -244,6 +246,8 @@ namespace dct {
const
double
*
const
coeffs
=
(
const
double
*
)
mxGetData
(
proj_coeffs_a
);
std
::
copy
(
coeffs
,
coeffs
+
num_elems
,
output
.
coeff
.
begin
());
return
output
;
}
template
<
typename
Type
>
...
...
@@ -253,11 +257,11 @@ namespace dct {
std
::
vector
<
DctProjectionTransformCoefficients
<
Type
>
>
output
;
const
mwSize
num_coeff_structs
=
mxGetNumberOfElements
(
coeffs
);
output
.
res
iz
e
(
num_coeff_structs
);
output
.
res
erv
e
(
num_coeff_structs
);
for
(
mwIndex
num_struct
=
0
;
num_struct
<
num_coeff_structs
;
num_struct
++
)
{
const
mxArray
*
const
coeff_cell
=
mxGetCell
(
coeffs
,
num_struct
);
DctMatlabData
::
import_coefficients
<
Type
>
(
output
[
num_struct
],
coeff_cell
);
output
.
emplace_back
(
DctMatlabData
::
import_coefficients
<
Type
>
(
coeff_cell
)
)
;
}
return
output
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment