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
Branches
Tags
No related merge requests found
......@@ -8,8 +8,11 @@
#ifndef DNASEQSTR_H_
#define DNASEQSTR_H_
#include <iostream>
#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
* 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 @@
class DnaSeqStr {
public :
char * fq_record_buf; //[MAX_FQ_RECORD_LENGTH];
char * const fq_record_buf; //[MAX_FQ_RECORD_LENGTH];
int start_idx;
int length;
public:
DnaSeqStr() {
fq_record_buf=new char[MAX_FQ_RECORD_LENGTH];
DnaSeqStr():fq_record_buf(new char[MAX_FQ_RECORD_LENGTH]) {
cout<<"Calling DnaSeqStr constructor"<<endl;
length=0;
start_idx=0;
}
......@@ -41,7 +44,8 @@ public:
}
~DnaSeqStr() {
delete fq_record_buf;
cout<<"Calling DnaSeqStr destructor"<<endl;
delete fq_record_buf[];
}
};
......
......@@ -24,7 +24,7 @@
#include "srp.h"
#include "FqBaseBackend.h"
#define DEBUG
//#define DEBUG
#ifdef DEBUG
#include <iostream>
using namespace std;
......
......@@ -29,7 +29,7 @@
#include "DnaSeqStr.h"
#include "read_utils.h"
#include "rock_commons.h"
#define DEBUG
//#define DEBUG
#ifdef DEBUG
#include <cassert>
......
......@@ -47,7 +47,7 @@
using namespace std;
// #define BENCHMARK
#define BENCHMARK
#ifdef BENCHMARK
#include <sys/time.h>
#include <sys/resource.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment