Added the free function addInPlace as a helper to implement saxpy