* Cleanup in main.cpp * Refactor in bmath.h * Refactor in avx2.hpp avx2.cpp * Added types.hpp to abstract architecture datatypes * Refactored utils.hpp * Refactored sse.cpp * Added some utility methods for integer, long packed values * Convert print into a generic method with use of templates
18 lines
No EOL
381 B
C++
18 lines
No EOL
381 B
C++
#include "naive.hpp"
|
|
#include "types.hpp"
|
|
#include <iostream>
|
|
|
|
void Core::Cpu::Naive::sum_128_long(UInt *a,UInt *b){
|
|
ULong a1 = ((ULong)a[0] << 32) | a[1];
|
|
ULong a2 = ((ULong)a[2] << 32) | a[3];
|
|
ULong b1 = ((ULong)b[0] << 32) | b[1];
|
|
ULong b2 = ((ULong)b[2] << 32) | b[3];
|
|
|
|
a1=a1+b1;
|
|
a2=a2+b2;
|
|
|
|
a[0]=a1>>32;
|
|
a[1]=a1;
|
|
a[2]=a2>>32;
|
|
a[3]=a2;
|
|
}; |