dthuerck / mapmap_cpu

A high-performance general-purpose MRF MAP solver, heavily exploiting SIMD instructions.
BSD 3-Clause "New" or "Revised" License
102 stars 51 forks source link

fix compile errors under windows #23

Closed xubury closed 2 years ago

xubury commented 4 years ago

In windows unsigned long is 32bit which is illegal for a pointer to cast to. So change unsigned long to uintptr_t fix the compile errors.

xubury commented 4 years ago

However, Windows build failed testing while Ubuntu works perfectly. I think it is related to https://github.com/dthuerck/mapmap_cpu/issues/22. It have segmentation fault while executing _mm256_setzero_ps. I am not familiar with libtbb. But I do a simple tested on _mm256_setzero_ps and didn't got the segfault.

#include <tbb/tbb.h>
#include <iostream>
int main() {
    __m256 yfsSum = _mm256_setzero_ps();
    std::cout << "hello" << std::endl;
}

testFail sf