Skip to content

Commit

Permalink
updated struct to contain local lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 22, 2025
1 parent f085b11 commit f7e004d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion merge_bdamage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@


int main_mergedamage(int argc, char **argv){

fprintf(stderr,"argc: %d\n",argc);
argc--;argv++;
for(int i=0;i<argc;i++){
fprintf(stderr,"argc: %d val: %s\n",i,argv[i]);
int howmany;
char *fname = argv[i];
std::map<int, mydataD> retmap = load_bdamage_full(fname, howmany);
fprintf(stderr, "\t-> Number of entries in damage pattern file: %lu printlength(howmany):%d\n", retmap.size(), howmany);
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ std::map<int, mydataD> load_bdamage_full(const char *fname, int &printlength) {
break;
assert(nread == 2 * sizeof(int));
mydataD md;

md.howmany = printlength;
md.fwD = new double[16 * printlength];
md.bwD = new double[16 * printlength];
md.nreads = ref_nreads[1];
Expand Down
1 change: 1 addition & 0 deletions profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ std::map<int, double *> load_bdamage3(const char *fname, int howmany);

typedef struct {
int nreads; // this is nalignements
int howmany;
double *fwD;
double *bwD;
} mydataD;
Expand Down

0 comments on commit f7e004d

Please sign in to comment.