star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.com/star-line.git
Log | Files | Refs | README | LICENSE

commit 636b21618b76b2ebda389b3f4a920002c92affa6
parent 7da5293205e492c5fb7eb96c200d29ab7ac21d7d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 23 Sep 2026 11:23:26 +0200

Remove dead code

Diffstat:
Msrc/test_sln_tree.c | 44--------------------------------------------
1 file changed, 0 insertions(+), 44 deletions(-)

diff --git a/src/test_sln_tree.c b/src/test_sln_tree.c @@ -28,50 +28,6 @@ /******************************************************************************* * Helper function ******************************************************************************/ -/* Return the index of the line in the line_list or SIZE_MAX if the line does - * not exist */ -static INLINE size_t -find_line - (struct shtr_line_list* line_list, - const struct shtr_line* line) -{ - struct shtr_line ln = SHTR_LINE_NULL; - size_t lo, hi, mid; - size_t iline; - size_t nlines; - - CHK(shtr_line_list_get_size(line_list, &nlines) == RES_OK); - - /* Dichotomic search */ - lo = 0; hi = nlines -1; - while(lo < hi) { - mid = (lo+hi)/2; - - CHK(shtr_line_list_at(line_list, mid, &ln) == RES_OK); - if(line->wavenumber > ln.wavenumber) { - lo = mid + 1; - } else { - hi = mid; - } - } - iline = lo; - - CHK(shtr_line_list_at(line_list, iline, &ln) == RES_OK); - if(ln.wavenumber != line->wavenumber) return SIZE_MAX; - - - /* Find a line with the same wavenumber as the one searched for and whose - * other member variables are also equal to those of the line searched for */ - while(ln.wavenumber == line->wavenumber - && !shtr_line_eq(&ln, line) - && iline < nlines) { - iline += 1; - CHK(shtr_line_list_at(line_list, iline, &ln) == RES_OK); - } - - return shtr_line_eq(&ln, line) ? iline : SIZE_MAX; -} - /* This test assumes that all the lines contained into the list are * partitionned in the tree */ static void