Hi there,
I’m looking for an answer to something that is really bugging me,
I cant get comparisons running in SIMDRegister.
My compiler (Xcode 10.1) says:
Undefined symbols for architecture x86_64:
“juce::dsp::SIMDNativeOps::kAllBitsSet”, referenced from:
juce::dsp::SIMDNativeOps::bit_not(long long vector[2]) in libGainPlugin.a(Main.o)
ld: symbol(s) not found for architecture x86_64
Here is a simple nonsense processblock to generate the error.
If anyone can check this (and help me fix it…), that would be really great.
Add at top of file:
#include <juce_dsp/juce_dsp.h>
Then add this processBlock:
void processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages) override
{
// get some input
auto* audioData = buffer.getWritePointer (0);
// make 2 vectors filled with the first bytes
auto inVector1 = dsp::SIMDRegister<float>::expand(audioData[0]);
auto inVector2 = dsp::SIMDRegister<float>::expand(audioData[1]);
auto mask = (dsp::SIMDRegister<float>::lessThan(inVector1, inVector2)) ;
// the following bitwise NOT function goes wrong ( Juce 5.4.3)
// macos xcode 10.1
auto notmask = ~mask;
auto outputVector = ( inVector1 & mask) + ( inVector2 & (notmask));
// write back the (admittedly) useless result
audioData[0]= outputVector[0];
}