Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
base: c94b565ae340
Choose a base ref
...
head repository: ngscopeclient/scopehal
compare: 45d156e1c215
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 7, 2020

  1. Compute next highest power of 2 function

    Compute next highest power of 2 to fix issues when using code (in different parts):
      const size_t npoints = pow(2, ceil(log2(depth))); (see scopehal\TestWaveformSource.cpp => TestWaveformSource::DegradeSerialData()...)
    The original code (pow(2, ceil(log2())) has some border effects when built with MSYS2 mingw64 "Release" mode as it does not compute correctly the highest power of 2 for example with parameter 100000 it was returning 131071 (instead of 131072) which crashed ffts.
    This implementation fix issue ngscopeclient/scopehal-apps#295
    The function next_pow2() shall replace pow(2, ceil(log2())) in following code:
    scopehal\TestWaveformSource.cpp
    	Line 282: 	//const size_t npoints = pow(2, ceil(log2(depth)));
    scopeprotocols\DeEmbedFilter.cpp
    	Line 230: 	const size_t npoints = pow(2, ceil(log2(npoints_raw)));
    scopeprotocols\FFTFilter.cpp
    	Line 179: 	const size_t npoints = pow(2, ceil(log2(npoints_raw)));
    scopeprotocols\JitterSpectrumFilter.cpp
    	Line 195: 	const size_t npoints = pow(2, ceil(log2(npoints_raw)));
    bvernoux committed Dec 7, 2020
    Copy the full SHA
    25a912f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #374 from bvernoux/patch-1

    Compute next highest power of 2 function
    azonenberg committed Dec 7, 2020
    Copy the full SHA
    45d156e View commit details
    Browse the repository at this point in the history