Output uses new logging facility
This commit is contained in:
parent
0e2570b204
commit
df5455121c
@ -62,10 +62,10 @@ CRC32::CRC32CFunctionPtr CRC32::detectBestCRC32C() {
|
|||||||
unsigned ecx = cpuid(1);
|
unsigned ecx = cpuid(1);
|
||||||
bool hasSSE42 = ecx & (1 << SSE42_BIT);
|
bool hasSSE42 = ecx & (1 << SSE42_BIT);
|
||||||
if (hasSSE42) {
|
if (hasSSE42) {
|
||||||
std::cout << "using hardware base sse computation" << std::endl;
|
SimpleLogger().Write() << "using hardware base sse computation";
|
||||||
return &CRC32::SSEBasedCRC32; //crc32 hardware accelarated;
|
return &CRC32::SSEBasedCRC32; //crc32 hardware accelarated;
|
||||||
} else {
|
} else {
|
||||||
std::cout << "using software base sse computation" << std::endl;
|
SimpleLogger().Write() << "using software base sse computation";
|
||||||
return &CRC32::SoftwareBasedCRC32; //crc32cSlicingBy8;
|
return &CRC32::SoftwareBasedCRC32; //crc32cSlicingBy8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#ifndef CRC32_H_
|
#ifndef CRC32_H_
|
||||||
#define CRC32_H_
|
#define CRC32_H_
|
||||||
|
|
||||||
|
#include "../Util/SimpleLogger.h"
|
||||||
|
|
||||||
#include <boost/crc.hpp> // for boost::crc_32_type
|
#include <boost/crc.hpp> // for boost::crc_32_type
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#ifndef ITERATORBASEDCRC32_H_
|
#ifndef ITERATORBASEDCRC32_H_
|
||||||
#define ITERATORBASEDCRC32_H_
|
#define ITERATORBASEDCRC32_H_
|
||||||
|
|
||||||
|
#include "../Util/SimpleLogger.h"
|
||||||
|
|
||||||
#include <boost/crc.hpp> // for boost::crc_32_type
|
#include <boost/crc.hpp> // for boost::crc_32_type
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -80,10 +82,10 @@ private:
|
|||||||
unsigned ecx = cpuid(1);
|
unsigned ecx = cpuid(1);
|
||||||
bool hasSSE42 = ecx & (1 << SSE42_BIT);
|
bool hasSSE42 = ecx & (1 << SSE42_BIT);
|
||||||
if (hasSSE42) {
|
if (hasSSE42) {
|
||||||
std::cout << "using hardware base sse computation" << std::endl;
|
SimpleLogger().Write() << "using hardware base CRC32 computation";
|
||||||
return &IteratorbasedCRC32::SSEBasedCRC32; //crc32 hardware accelarated;
|
return &IteratorbasedCRC32::SSEBasedCRC32; //crc32 hardware accelarated;
|
||||||
} else {
|
} else {
|
||||||
std::cout << "using software base sse computation" << std::endl;
|
SimpleLogger().Write() << "using software based CRC32 computation";
|
||||||
return &IteratorbasedCRC32::SoftwareBasedCRC32; //crc32cSlicingBy8;
|
return &IteratorbasedCRC32::SoftwareBasedCRC32; //crc32cSlicingBy8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user