Renamed namespace

This commit is contained in:
Vitor Fernandes 2020-07-08 09:24:19 +01:00
parent bc6f97024a
commit 9f5ce72356
No known key found for this signature in database
GPG key ID: EBFB4EE09F348A26
8 changed files with 10 additions and 10 deletions

View file

@ -4,11 +4,11 @@
using namespace std; using namespace std;
void CPU::avx2::avx_sum(int *a, int *b) void cpu::avx2::avx_sum(int *a, int *b)
{ {
} }
void CPU::avx2::printAVX2Num(int *num) void cpu::avx2::printAVX2Num(int *num)
{ {
for (int i = 0; i < avx2::AVX2_INT_SIZE; i++) for (int i = 0; i < avx2::AVX2_INT_SIZE; i++)
{ {

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
namespace CPU namespace cpu
{ {
class avx2 class avx2
{ {

View file

@ -4,7 +4,7 @@
#include "../naive.hpp" #include "../naive.hpp"
#include <sys/time.h> #include <sys/time.h>
using namespace CPU; using namespace cpu;
using namespace std; using namespace std;
long int gettime(){ long int gettime(){

View file

@ -2,7 +2,7 @@
#include "types.hpp" #include "types.hpp"
#include <iostream> #include <iostream>
void CPU::Naive::sum_128_long(UInt *a,UInt *b){ void cpu::Naive::sum_128_long(UInt *a,UInt *b){
ULong a1 = ((ULong)a[0] << 32) | a[1]; ULong a1 = ((ULong)a[0] << 32) | a[1];
ULong a2 = ((ULong)a[2] << 32) | a[3]; ULong a2 = ((ULong)a[2] << 32) | a[3];
ULong b1 = ((ULong)b[0] << 32) | b[1]; ULong b1 = ((ULong)b[0] << 32) | b[1];

View file

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "types.hpp" #include "types.hpp"
namespace CPU namespace cpu
{ {
class Naive class Naive
{ {

View file

@ -2,7 +2,7 @@
#include <iostream> #include <iostream>
//X86 Assembly to add two 128 bit numbers in the form of packed integers 32bit //X86 Assembly to add two 128 bit numbers in the form of packed integers 32bit
void CPU::SSE::paddw(UInt *a,UInt *b) { void cpu::SSE::paddw(UInt *a,UInt *b) {
asm( asm(
"movdqa %0, %%xmm1\n" "movdqa %0, %%xmm1\n"
"paddw %1, %%xmm1\n" "paddw %1, %%xmm1\n"
@ -14,7 +14,7 @@ void CPU::SSE::paddw(UInt *a,UInt *b) {
//X86 Assembly to add two 128 bit numbers in the form of packed long 64bit //X86 Assembly to add two 128 bit numbers in the form of packed long 64bit
void CPU::SSE::paddd(ULong *a,ULong *b) { void cpu::SSE::paddd(ULong *a,ULong *b) {
asm( asm(
"movdqa %0, %%xmm1\n" "movdqa %0, %%xmm1\n"
"paddd %1, %%xmm1\n" "paddd %1, %%xmm1\n"

View file

@ -3,7 +3,7 @@
#include "types.hpp" #include "types.hpp"
namespace CPU namespace cpu
{ {
class SSE class SSE
{ {

View file

@ -5,7 +5,7 @@
using namespace std; using namespace std;
namespace CPU namespace cpu
{ {
class Utils class Utils
{ {