azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/azonenberg/scopehal-apps | Logs: https://freenode.irclog.whitequark.org/scopehal
juli968 has quit [Quit: Nettalk6 - www.ntalk.de]
<_whitenotifier-5> [scopehal] sam210723 synchronize pull request #396: Add binary capture file parser - https://git.io/JtyXM
<sam210723_> azonenberg: pr ready for you to have a look
<azonenberg> Great
<azonenberg> sam210723_: scopehal/MockOscilloscope.cpp:593, shouldn't that be idx+1 to allow room for the null terminator?
<azonenberg> and i don't see you adding null terminators
<azonenberg> for that matter, allocating temporary buffers there isn't necessary
<azonenberg> you can just use operator+=() on m_name / m_serial directly
<azonenberg> since they're std::string objects
<azonenberg> the concatenation is handled for you
<azonenberg> rather than doing memcpy's on 663/669, you should be able to just cast the pointer to a float* or int* and dereference it
<azonenberg> or uint8_t*
<azonenberg> I believe that #pragma pack affects the packing for all subsequent structs/classes in the translation unit which you probably don't want
<azonenberg> you should use #pragma pack(push, 1) and #pragma pack(pop) before/after
<azonenberg> to ensure that the default compiler packing isn't changed for anything but what you intend
<azonenberg> For both FileHeader and WaveHeader (or any other data structure being serialized/memory mapped), avoid use of the "int" type. Use stdint types like int32_t to ensure they're the same size on all platforms
Degi_ has joined #scopehal
Degi has quit [Ping timeout: 272 seconds]
Degi_ is now known as Degi
electronic_eel_ has joined #scopehal
electronic_eel has quit [Ping timeout: 276 seconds]
<sam210723_> azonenberg: does using .assign() on m_name / m_serial make sense here?
<sam210723_> pulling straight from the hardware char array
<azonenberg> I didn't realize that had a length argument as an option. Yes, that would work perfectly
<sam210723_> great, done
<sam210723_> also header ints all now fixed width, packing is reset after last header struct
<azonenberg> Great, i'll have a look again in a bit
<_whitenotifier-5> [scopehal] sam210723 synchronize pull request #396: Add binary capture file parser - https://git.io/JtyXM
<sam210723_> memcpy removed from sample loop
<_whitenotifier-5> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±4] https://git.io/JtAbk
<_whitenotifier-5> [scopehal] azonenberg 97df503 - DemoOscilloscope/TestWaveformSource: Added configurable impairments vs always on, plus new "fast edge" waveform
juli968 has joined #scopehal
electronic_eel_ has quit [Ping timeout: 276 seconds]
electronic_eel has joined #scopehal
_whitelogger has joined #scopehal
electronic_eel has quit [Ping timeout: 264 seconds]
electronic_eel_ has joined #scopehal
bvernoux has joined #scopehal
_whitelogger has joined #scopehal
electronic_eel_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<_whitenotifier-5> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±5] https://git.io/Jtxi0
<_whitenotifier-5> [scopehal] azonenberg 5cf7d96 - Added g_disableOpenCL. Fixed several bugs in filters that assumed OpenCL enabled at compile time implied availability at run time.
electronic_eel has joined #scopehal
<_whitenotifier-5> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±2] https://git.io/Jtxiu
<_whitenotifier-5> [scopehal-apps] azonenberg d088dfe - Added --noopencl argument to disable OpenCL at run time
electronic_eel has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
electronic_eel has joined #scopehal
<azonenberg> So apparently i can't run glscopeclient under valgrind
<azonenberg> because the version of valgrind that ships with debian stable doesn't understand some of the AVX instructions I use
<azonenberg> and kills it with an "illegal instruction" error :p