cpplab/src/core/cpu/naive.cpp
Balhau 618e5efcfa Refactoring code
* 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
2018-12-02 10:09:37 +00:00

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;
};