Skip to content

Commit

Permalink
smokeview source: moreve pp_SORT_TAGS and pp_SORT_TAGS_BG directrives
Browse files Browse the repository at this point in the history
  • Loading branch information
gforney committed Nov 6, 2024
1 parent b0375cf commit 9476ede
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 23 deletions.
15 changes: 0 additions & 15 deletions Source/smokeview/IOpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,6 @@ void GeneratePartHistograms(void){
}
}

#ifdef pp_SORT_TAGS
/* ------------------ SortPartTags ------------------------ */

void SortPartTags(partdata *parti){
Expand Down Expand Up @@ -1223,11 +1222,8 @@ void *SortAllPartTags(void *arg){
SortPartTags(parti);
}
PRINT_TIMER(timer_sortparttags, "SortPartTags");
#ifdef pp_SORT_TAGS_BG
THREAD_EXIT(sorttags_threads);
#endif
}
#endif

/* ------------------ GetPartData ------------------------ */

Expand Down Expand Up @@ -1358,9 +1354,6 @@ void GetPartData(partdata *parti, int nf_all_arg, FILE_SIZE *file_size_arg){
sort_tags_local[2*j]=datacopy_local->tags[j];
sort_tags_local[2*j+1]=j;
}
#ifndef pp_SORT_TAGS
qsort( sort_tags_local, (size_t)nparts_local, 2*sizeof(int), CompareTags);
#endif
}
}
else{
Expand Down Expand Up @@ -1506,11 +1499,9 @@ partpropdata *GetPartProp(char *label){
/* ------------------ SetStreakShow ------------------------ */

void SetStreakShow(int show){
#ifdef pp_SORT_TAGS_BG
if(show == 1){
THREADcontrol(sorttags_threads, THREAD_JOIN);
}
#endif
streak5show = show;
}

Expand Down Expand Up @@ -2173,16 +2164,10 @@ void FinalizePartLoad(partdata *parti){
}
}
visParticles = 1;
#ifdef pp_SORT_TAGS
#ifdef pp_SORT_TAGS_BG
THREADrun(sorttags_threads);
if(runscript == 1 || streak5show == 1){
THREADcontrol(sorttags_threads, THREAD_JOIN);
}
#else
SortAllPartTags(NULL);
#endif
#endif

// generate histograms now rather than in the background if a script is running

Expand Down
2 changes: 0 additions & 2 deletions Source/smokeview/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
//#define pp_FDS // create a 1 mesh input file
#define pp_HIDDEN6 // handle hidden6 info on obst line
#define pp_PART_SHOW // add option to show selected particle values as well as tags
#define pp_SORT_TAGS // sort particle tags after after particles are read in
#define pp_SORT_TAGS_BG // sort particle tags in background

#ifdef pp_FRAME // turn on each frame type if pp_FRAME is set
#define pp_BOUNDFRAME // turn on frame code for boundary files
Expand Down
2 changes: 0 additions & 2 deletions Source/smokeview/readsmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -11939,11 +11939,9 @@ int ReadSMV_Configure(){
THREADrun(ffmpeg_threads);
PRINT_TIMER(timer_readsmv, "SetupFFMT");

#ifdef pp_SORT_TAGS_BG
if(sorttags_threads == NULL){
sorttags_threads = THREADinit(&n_sorttags_threads, &use_sorttags_threads, SortAllPartTags);
}
#endif

if(isosurface_threads == NULL){
isosurface_threads = THREADinit(&n_isosurface_threads, &use_isosurface_threads, SetupAllIsosurfaces);
Expand Down
2 changes: 0 additions & 2 deletions Source/smokeview/smokeheaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ EXTERNCPP void *ReadVolsmokeAllFramesAllMeshes2(void *arg);
EXTERNCPP void *SetupAllIsosurfaces(void *arg);
EXTERNCPP void *MtMergeSmoke3D(void *arg);
EXTERNCPP void UpdateGluiMergeSmoke(void);
#ifdef pp_SORT_TAGS
EXTERNCPP void *SortAllPartTags(void *arg);
#endif

//*** glui_bounds.cpp headers
EXTERNCPP int GLUIGetChopHide(char *label);
Expand Down
2 changes: 0 additions & 2 deletions Source/smokeview/smokeviewvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ SVEXTERN int SVDECL(use_partload_threads, 1);
#endif
SVEXTERN threaderdata SVDECL(*partload_threads, NULL);

#ifdef pp_SORT_TAGS_BG
//*** sorttags
SVEXTERN int SVDECL(n_sorttags_threads, 1), SVDECL(use_sorttags_threads, 1);
SVEXTERN threaderdata SVDECL(*sorttags_threads, NULL);
#endif

//*** patchbounds
SVEXTERN int SVDECL(n_patchbound_threads, 1), SVDECL(use_patchbound_threads, 1);
Expand Down

0 comments on commit 9476ede

Please sign in to comment.