Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,695
Issues
1,695
List
Boards
Labels
Service Desk
Milestones
Merge Requests
87
Merge Requests
87
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
2c916ebe
Commit
2c916ebe
authored
Jul 27, 2018
by
Cyprien Borée
Committed by
Mikaël Salson
Jul 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/read_storage: Add reallocate method
Will be called when not all the reads can be stored.
parent
ac03a391
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
algo/core/read_storage.cpp
algo/core/read_storage.cpp
+19
-0
algo/core/read_storage.h
algo/core/read_storage.h
+6
-0
No files found.
algo/core/read_storage.cpp
View file @
2c916ebe
...
...
@@ -42,6 +42,25 @@ void BinReadStorage::__init(size_t nb_bins, size_t max_score, const VirtualReadS
inited
=
true
;
}
void
BinReadStorage
::
reallocate
(){
list
<
Sequence
>
tmpBin
;
if
(
bins
)
tmpBin
=
bins
[
0
];
free_objects
();
all_read_lengths
=
0
;
smallest_bin_not_empty
=
~
0
;
total_nb_scores
=
0
;
nb_stored
=
0
;
inited
=
false
;
__init
(
max_bins
,
max_score
,
scorer
,
tmpBin
.
size
()
==
0
);
for
(
auto
s
:
tmpBin
){
this
->
add
(
s
);
}
nb_inserted
-=
nb_stored
;
}
BinReadStorage
::~
BinReadStorage
()
{
free_objects
();
}
...
...
algo/core/read_storage.h
View file @
2c916ebe
...
...
@@ -107,7 +107,13 @@ public:
public:
/**
* If the bin is full we need, the storage needs to be reallocated to have more memory.
*/
void
reallocate
();
~
BinReadStorage
();
void
add
(
Sequence
&
s
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment