Author Archives: jeroen

Making a virtue out of sin

Signal processing often requires us to perform a sin(). Indeed, we often have to perform a cos(), too! In fact, we often need to do a lot of them, and do them quickly too! In case this wasn’t clear, we’re … Continue reading

Posted in FOX | Leave a comment

Fast, Vectorizable Arc Tangent

Arctangent(x) (or atan(x)) is an often-used function to obtain the angle given the slope. Closely related is atan2(y,x) which usually returns the full angle. While the library implementation is usually not horrible in terms of performance, it can still be … Continue reading

Posted in FOX | Leave a comment

Branch-Free Blend()

Often, we want to evaluate simple expressions like: 1 result=(a<b) ? x : yresult=(a<b) ? x : y Clearly, this implies performing a conditional branch. This is not a huge problem, unless the code fragment absolutely needs to be as … Continue reading

Posted in FOX | Leave a comment

Handling vector loop left-overs with masked loads and stores

In the previous example we used a nice little trick which is not available until AVX came to the scene: masked loads and stores. In this note we’ll go a little deeper into the use of masked loads and stores, … Continue reading

Posted in FOX | Leave a comment

FUN With AVX

Over the last few years, Intel and AMD have added 256-bit vector-support to their processors. The support for these wider vectors is commonly known as AVX (Advanced Vector eXtension). Since wider vectors also introduce more processor-state, in order to use … Continue reading

Posted in FOX, Programming | Leave a comment

Fast Power of Two Test

A quick and nifty check to see if a number is a power of two is to note that for numbers that are a power of two, you’ll get a number which is all ones. For example: 1000 -1 0111 … Continue reading

Posted in Programming | Leave a comment

The Case for Negative Semaphore Counts

The new FXParallel feature being worked on in FOX has a atomic variable for tracking completed tasks of a task-group.  This kind of works as follows: 1 2 3 if(atomicAdd(&counter,-1)==1){ completion.post(); }if(atomicAdd(&counter,-1)==1){ completion.post(); } In other words, when the specified … Continue reading

Posted in FOX, Programming | Leave a comment

Dell XPS15 Surgery

So I got this Dell XPS15 laptop, and decided to bump up the specs a bit.  A quick visit to NewEgg and I received a new 1TB laptop drive, two RAM sticks, and a nice 120GB SSD drive; the latter … Continue reading

Posted in Uncategorized | Comments Off on Dell XPS15 Surgery

WordPress Pressing Problems

Apparently, you can not load WordPress into your document root, set stuff up, and then change the domain name of your machine. For some unfathomable reason, the original url (containing your domain name!) is getting hardwired into the database in … Continue reading

Posted in Website | Comments Off on WordPress Pressing Problems

Conversion of Unsigned Int to Float

Conversion of unsigned int to float appears to be difficult for x86-64 processor. However, signed int to float is directly supported in the hardware. The GCC compiler is clever enough to use the hardware instruction CVTSI2SS. However in the case … Continue reading

Posted in Programming | Leave a comment