Skip to content
Snippets Groups Projects
Commit a0014ac6 authored by Véronique  LEGRAND's avatar Véronique LEGRAND
Browse files

work in progress; Investigating why it is so slow.

parent 37f1d516
No related branches found
No related tags found
No related merge requests found
...@@ -8,8 +8,11 @@ ...@@ -8,8 +8,11 @@
#ifndef DNASEQSTR_H_ #ifndef DNASEQSTR_H_
#define DNASEQSTR_H_ #define DNASEQSTR_H_
#include <iostream>
#include "FqConstants.h" #include "FqConstants.h"
using namespace std;
/* /*
* Here, for performance matters, do not want to have to do a memmove nor strcpy or strcat to extract only DNA sequence for all * Here, for performance matters, do not want to have to do a memmove nor strcpy or strcat to extract only DNA sequence for all
* the fastq records that we'll have to process (potentially millions). So, use a structure to store start position of DNA sequence in buffer and its length. * the fastq records that we'll have to process (potentially millions). So, use a structure to store start position of DNA sequence in buffer and its length.
...@@ -23,13 +26,13 @@ ...@@ -23,13 +26,13 @@
class DnaSeqStr { class DnaSeqStr {
public : public :
char * fq_record_buf; //[MAX_FQ_RECORD_LENGTH]; char * const fq_record_buf; //[MAX_FQ_RECORD_LENGTH];
int start_idx; int start_idx;
int length; int length;
public: public:
DnaSeqStr() { DnaSeqStr():fq_record_buf(new char[MAX_FQ_RECORD_LENGTH]) {
fq_record_buf=new char[MAX_FQ_RECORD_LENGTH]; cout<<"Calling DnaSeqStr constructor"<<endl;
length=0; length=0;
start_idx=0; start_idx=0;
} }
...@@ -41,7 +44,8 @@ public: ...@@ -41,7 +44,8 @@ public:
} }
~DnaSeqStr() { ~DnaSeqStr() {
delete fq_record_buf; cout<<"Calling DnaSeqStr destructor"<<endl;
delete fq_record_buf[];
} }
}; };
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "srp.h" #include "srp.h"
#include "FqBaseBackend.h" #include "FqBaseBackend.h"
#define DEBUG //#define DEBUG
#ifdef DEBUG #ifdef DEBUG
#include <iostream> #include <iostream>
using namespace std; using namespace std;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "DnaSeqStr.h" #include "DnaSeqStr.h"
#include "read_utils.h" #include "read_utils.h"
#include "rock_commons.h" #include "rock_commons.h"
#define DEBUG //#define DEBUG
#ifdef DEBUG #ifdef DEBUG
#include <cassert> #include <cassert>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
using namespace std; using namespace std;
// #define BENCHMARK #define BENCHMARK
#ifdef BENCHMARK #ifdef BENCHMARK
#include <sys/time.h> #include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment