Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
faust group
faust
Commits
2823274f
Commit
2823274f
authored
5 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Optimize pyfaust palm4msa as
fd17c283
did for matfaust.
parent
d2863e93
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
wrapper/python/src/FaustFact.hpp
+13
-11
13 additions, 11 deletions
wrapper/python/src/FaustFact.hpp
with
13 additions
and
11 deletions
wrapper/python/src/FaustFact.hpp
+
13
−
11
View file @
2823274f
...
...
@@ -305,21 +305,23 @@ FaustCoreCpp<FPP>* fact_palm4MSA_gen(FPP* mat, unsigned int num_rows, unsigned i
FPP2
lambda
=
palm
->
get_lambda
();
std
::
vector
<
Faust
::
MatDense
<
FPP
,
Cpu
>
>
facts
;
std
::
vector
<
Faust
::
MatGeneric
<
FPP
,
Cpu
>*>
sp
_facts
;
std
::
vector
<
Faust
::
MatGeneric
<
FPP
,
Cpu
>*>
rf
_facts
;
facts
=
palm
->
get_facts
();
for
(
typename
std
::
vector
<
Faust
::
MatDense
<
FPP
,
Cpu
>>::
iterator
it
=
facts
.
begin
();
it
!=
facts
.
end
();
it
++
)
{
Faust
::
MatSparse
<
FPP
,
Cpu
>
*
M
=
new
Faust
::
MatSparse
<
FPP
,
Cpu
>
(
*
it
);
sp_facts
.
push_back
(
M
);
}
int
sparse_weight
;
for
(
typename
std
::
vector
<
Faust
::
MatDense
<
FPP
,
Cpu
>>::
iterator
it
=
facts
.
begin
();
it
!=
facts
.
end
();
it
++
)
{
sparse_weight
=
2
*
it
->
getNonZeros
()
+
it
->
getNbRow
()
+
1
;
Faust
::
MatGeneric
<
FPP
,
Cpu
>*
M
;
if
(
sparse_weight
<
it
->
getNbRow
()
*
it
->
getNbCol
())
M
=
new
Faust
::
MatSparse
<
FPP
,
Cpu
>
(
*
it
);
else
M
=
new
Faust
::
MatDense
<
FPP
,
Cpu
>
(
*
it
);
rf_facts
.
push_back
(
M
);
}
Faust
::
TransformHelper
<
FPP
,
Cpu
>
*
th
=
new
Faust
::
TransformHelper
<
FPP
,
Cpu
>
(
sp
_facts
,
FPP
(
lambda
),
false
,
tru
e
,
/* internal call */
true
);
Faust
::
TransformHelper
<
FPP
,
Cpu
>
*
th
=
new
Faust
::
TransformHelper
<
FPP
,
Cpu
>
(
rf
_facts
,
FPP
(
lambda
),
false
,
fals
e
,
/* internal call */
true
);
for
(
typename
std
::
vector
<
Faust
::
MatGeneric
<
FPP
,
Cpu
>*>::
iterator
it
=
sp_facts
.
begin
();
it
!=
sp_facts
.
end
();
it
++
)
{
delete
*
it
;
}
if
(
p
->
is_verbose
)
th
->
display
();
core
=
new
FaustCoreCpp
<
FPP
>
(
th
);
...
...
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