Merge vector and matrix source files