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
ccf0bf24
Commit
ccf0bf24
authored
9 years ago
by
Nicolas Bellot
Committed by
hhakim
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
nettoyage classe C++ faust_core : method push_back push_first
parent
9a361bd6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/faust_linear_operator/CPU/faust_Transform.h
+0
-5
0 additions, 5 deletions
src/faust_linear_operator/CPU/faust_Transform.h
src/faust_linear_operator/CPU/faust_Transform.hpp
+8
-66
8 additions, 66 deletions
src/faust_linear_operator/CPU/faust_Transform.hpp
with
8 additions
and
71 deletions
src/faust_linear_operator/CPU/faust_Transform.h
+
0
−
5
View file @
ccf0bf24
...
...
@@ -83,11 +83,6 @@ namespace Faust
void
init_from_file
(
const
char
*
filename
);
long
long
int
get_total_nnz
()
const
{
return
totalNonZeros
;}
void
clear
(){
data
.
resize
(
0
);
totalNonZeros
=
0
;}
void
push_back
(
const
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
);
void
push_first
(
const
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
);
void
pop_back
(
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
);
void
pop_first
(
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
);
void
pop_first
(
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
)
const
;
void
Display
()
const
;
void
transpose
();
void
updateNonZeros
();
...
...
This diff is collapsed.
Click to expand it.
src/faust_linear_operator/CPU/faust_Transform.hpp
+
8
−
66
View file @
ccf0bf24
...
...
@@ -9,7 +9,7 @@
#include
<iostream>
#include
"faust_exception.h"
#include
<fstream>
#include
"faust_BlasHandle.h"
#include
"faust_BlasHandle.h"
#include
"faust_SpBlasHandle.h"
...
...
@@ -271,13 +271,13 @@ Faust::MatDense<FPP,Cpu> Faust::Transform<FPP,Cpu>::get_product()const
return
prod
;
}
template
<
typename
FPP
>
Faust
::
MatDense
<
FPP
,
Cpu
>
Faust
::
Transform
<
FPP
,
Cpu
>::
get_product
(
Faust
::
BlasHandle
<
Cpu
>
blas_handle
,
Faust
::
SpBlasHandle
<
Cpu
>
spblas_handle
)
const
{
return
(
*
this
).
get_product
();
}
template
<
typename
FPP
>
Faust
::
MatDense
<
FPP
,
Cpu
>
Faust
::
Transform
<
FPP
,
Cpu
>::
get_product
(
Faust
::
BlasHandle
<
Cpu
>
blas_handle
,
Faust
::
SpBlasHandle
<
Cpu
>
spblas_handle
)
const
{
return
(
*
this
).
get_product
();
}
template
<
typename
FPP
>
faust_unsigned_int
Faust
::
Transform
<
FPP
,
Cpu
>::
getNbRow
()
const
...
...
@@ -388,69 +388,11 @@ Faust::MatSparse<FPP,Cpu> Faust::Transform<FPP,Cpu>::get_fact(int id)const
return
data
[
id
];
}
template
<
typename
FPP
>
void
Faust
::
Transform
<
FPP
,
Cpu
>::
push_back
(
const
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
)
{
if
(
size
()
>
0
)
{
if
(
data
[
size
()
-
1
].
getNbCol
()
!=
S
.
getNbRow
()
||
S
.
getNbRow
()
<
1
)
{
handleError
(
m_className
,
"push_back : incorrect dimensions"
);
}
}
data
.
push_back
(
S
);
totalNonZeros
+=
S
.
getNonZeros
();
}
template
<
typename
FPP
>
void
Faust
::
Transform
<
FPP
,
Cpu
>::
push_first
(
const
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
)
{
if
(
size
()
>
0
)
if
(
data
[
0
].
getNbRow
()
!=
S
.
getNbCol
()
||
S
.
getNbRow
()
<
1
)
{
handleError
(
m_className
,
"push_first : incorrect dimensions"
);
}
data
.
insert
(
data
.
begin
(),
S
);
totalNonZeros
+=
S
.
getNonZeros
();
}
template
<
typename
FPP
>
void
Faust
::
Transform
<
FPP
,
Cpu
>::
pop_back
(
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
)
{
if
(
size
()
>
0
)
{
S
=
data
[
size
()
-
1
];
data
.
pop_back
();
totalNonZeros
-=
S
.
getNonZeros
();
}
handleWarning
(
"Faust::Transform<FPP,Cpu>::pop_back : empty Faust::Transform"
);
}
template
<
typename
FPP
>
void
Faust
::
Transform
<
FPP
,
Cpu
>::
pop_first
(
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
)
{
if
(
size
()
>
0
)
{
S
=
data
[
0
];
data
.
erase
(
data
.
begin
());
totalNonZeros
-=
S
.
getNonZeros
();
}
handleWarning
(
"Faust::Transform<FPP,Cpu>::pop_back : empty Faust::Transform"
);
}
template
<
typename
FPP
>
void
Faust
::
Transform
<
FPP
,
Cpu
>::
pop_first
(
Faust
::
MatSparse
<
FPP
,
Cpu
>&
S
)
const
{
if
(
size
()
>
0
)
{
S
=
data
[
0
];
//data.erase(data.begin());
//totalNonZeros -= S.getNonZeros();
}
}
template
<
typename
FPP
>
void
Faust
::
Transform
<
FPP
,
Cpu
>::
transpose
()
...
...
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