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
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
5717763e
Commit
5717763e
authored
3 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Fix stack variable reference returned in MatBSR::operator(int,int).
parent
a0231327
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/faust_linear_operator/CPU/faust_MatBSR.h
+4
-1
4 additions, 1 deletion
src/faust_linear_operator/CPU/faust_MatBSR.h
src/faust_linear_operator/CPU/faust_MatBSR.hpp
+1
-1
1 addition, 1 deletion
src/faust_linear_operator/CPU/faust_MatBSR.hpp
with
5 additions
and
2 deletions
src/faust_linear_operator/CPU/faust_MatBSR.h
+
4
−
1
View file @
5717763e
...
...
@@ -123,8 +123,11 @@ class BSRMat
// \brief the number of blocks along the column dimension of the matrix (n/bn).
int
b_per_coldim
;
// TODO: should be unsigned
// useful in operator()
T
zero
;
// private default constructor
BSRMat
()
:
data
(
nullptr
),
bcolinds
(
nullptr
),
browptr
(
nullptr
),
bnnz
(
0
),
m
(
0
),
n
(
0
),
bm
(
0
),
bn
(
0
),
b_per_rowdim
(
0
),
b_per_coldim
(
0
)
{}
BSRMat
()
:
data
(
nullptr
),
bcolinds
(
nullptr
),
browptr
(
nullptr
),
bnnz
(
0
),
m
(
0
),
n
(
0
),
bm
(
0
),
bn
(
0
),
b_per_rowdim
(
0
),
b_per_coldim
(
0
)
,
zero
(
T
(
0
))
{}
public
:
BSRMat
(
unsigned
long
int
nrows
,
unsigned
long
int
ncols
,
unsigned
long
int
bnrows
,
unsigned
long
int
bncols
,
unsigned
long
int
nblocks
,
const
T
*
data
,
const
int
*
block_rowptr
,
const
int
*
block_colinds
);
/** Copy constructor */
...
...
This diff is collapsed.
Click to expand it.
src/faust_linear_operator/CPU/faust_MatBSR.hpp
+
1
−
1
View file @
5717763e
...
...
@@ -860,7 +860,7 @@ const T& BSRMat<T, BlockStorageOrder>::operator()(unsigned int i, unsigned int j
return
data
[
k
*
bm
*
bn
+
j
%
bn
*
bm
+
i
%
bm
];
}
// (i,j) is not in a nz block
return
0
;
return
zero
;
}
throw
std
::
runtime_error
(
"BSRMat::operator() i or j is out of bounds."
);
}
...
...
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