CPU check updates
* Fixes overload resolution error on macos * Fixes avx looping index error
This commit is contained in:
6
avx.cc
6
avx.cc
@@ -102,7 +102,7 @@ std::string Avx::Avx256(int rounds) {
|
|||||||
x[2] = _mm256_mul_pd(minus_four, a[2]);
|
x[2] = _mm256_mul_pd(minus_four, a[2]);
|
||||||
x[3] = _mm256_mul_pd(minus_four, a[3]);
|
x[3] = _mm256_mul_pd(minus_four, a[3]);
|
||||||
}
|
}
|
||||||
for (int k = 1; k < 4; k++) {
|
for (int k = 0; k < 4; k++) {
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
if (gross_x[k][i] != gross_x[k][0]) {
|
if (gross_x[k][i] != gross_x[k][0]) {
|
||||||
return "avx256 pd";
|
return "avx256 pd";
|
||||||
@@ -140,7 +140,7 @@ std::string Avx::Avx256FMA(int rounds) {
|
|||||||
x[2] = _mm256_mul_pd(minus_four, a[2]);
|
x[2] = _mm256_mul_pd(minus_four, a[2]);
|
||||||
x[3] = _mm256_mul_pd(minus_four, a[3]);
|
x[3] = _mm256_mul_pd(minus_four, a[3]);
|
||||||
}
|
}
|
||||||
for (int k = 1; k < 4; k++) {
|
for (int k = 0; k < 4; k++) {
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
if (gross_x[k][i] != gross_x[k][0]) {
|
if (gross_x[k][i] != gross_x[k][0]) {
|
||||||
return "avx256 pd";
|
return "avx256 pd";
|
||||||
@@ -182,7 +182,7 @@ std::string Avx::Avx512(int rounds) {
|
|||||||
x[3] = _mm512_mul_pd(minus_four, a[3]);
|
x[3] = _mm512_mul_pd(minus_four, a[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int k = 1; k < 4; k++) {
|
for (int k = 0; k < 4; k++) {
|
||||||
for (int i = 0; i < 7; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
if (gross_x[k][i] != gross_x[k][0]) {
|
if (gross_x[k][i] != gross_x[k][0]) {
|
||||||
return "avx512 pd";
|
return "avx512 pd";
|
||||||
|
@@ -444,8 +444,9 @@ Worker::Choices Worker::MakeChoices(BufferSet *b) {
|
|||||||
Json("hash", c.hasher->Name()), ", ",
|
Json("hash", c.hasher->Name()), ", ",
|
||||||
Json("copy", MalignBuffer::ToString(c.copy_method)), ", ",
|
Json("copy", MalignBuffer::ToString(c.copy_method)), ", ",
|
||||||
Json("memset", c.use_repstos ? "rep;sto" : "memset"), ", ",
|
Json("memset", c.use_repstos ? "rep;sto" : "memset"), ", ",
|
||||||
JsonBool("madvise", c.madvise), ", ", Json("size", c.buf_size), ", ",
|
JsonBool("madvise", c.madvise), ", ",
|
||||||
Json("pid", pid_), ", ", Json("round", round_), ", ", c.hole.ToString());
|
Json("size", static_cast<uint64_t>(c.buf_size)), ", ", Json("pid", pid_),
|
||||||
|
", ", Json("round", round_), ", ", c.hole.ToString());
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
@@ -235,8 +235,8 @@ std::string MalignBuffer::Syndrome(const MalignBuffer &that) const {
|
|||||||
std::string MalignBuffer::CorruptionSyndrome(const MalignBuffer &that) const {
|
std::string MalignBuffer::CorruptionSyndrome(const MalignBuffer &that) const {
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
if (size() != that.size()) {
|
if (size() != that.size()) {
|
||||||
s << Json("unequalSizeThis", size()) << ", "
|
s << Json("unequalSizeThis", static_cast<uint64_t>(size())) << ", "
|
||||||
<< Json("unequalSizeThat", that.size());
|
<< Json("unequalSizeThat", static_cast<uint64_t>(that.size()));
|
||||||
return s.str();
|
return s.str();
|
||||||
}
|
}
|
||||||
bool failed_memcmp = memcmp(data(), that.data(), that.size());
|
bool failed_memcmp = memcmp(data(), that.data(), that.size());
|
||||||
|
@@ -28,8 +28,8 @@ class MalignBuffer {
|
|||||||
public:
|
public:
|
||||||
struct PunchedHole {
|
struct PunchedHole {
|
||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
size_t start = 0;
|
uint64_t start = 0;
|
||||||
size_t length = 0;
|
uint64_t length = 0;
|
||||||
unsigned char v = 0x53;
|
unsigned char v = 0x53;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -72,8 +72,8 @@ absl::Status Silkscreen::CheckMySlots(int tid, uint64_t round) const {
|
|||||||
const char v = *data(k);
|
const char v = *data(k);
|
||||||
if (v == expected) continue;
|
if (v == expected) continue;
|
||||||
error_count++;
|
error_count++;
|
||||||
last_error = absl::StrCat(Json("position", k), ", ", Json("is", v), ", ",
|
last_error = absl::StrCat(Json("position", static_cast<uint64_t>(k)), ", ",
|
||||||
Json("expected", expected));
|
Json("is", v), ", ", Json("expected", expected));
|
||||||
}
|
}
|
||||||
if (slot_count(tid) != slots_read) {
|
if (slot_count(tid) != slots_read) {
|
||||||
last_error = absl::StrCat(Json("read", slots_read), ", ",
|
last_error = absl::StrCat(Json("read", slots_read), ", ",
|
||||||
|
Reference in New Issue
Block a user