Closed tprtuai5061 closed 1 year ago
Thanks for testing this. I am currently swamped with some other stuff, but I could try to set up GitHub CI on a Windows server to get compilation results. However, based on your errors, I can improve the code already, which I'll try a bit later today. You can try again then, and let me know if it works.
Or if you feel like trying yourself, I'll happily accept your PR.
Basically, I seemed to have forgotten to define the sub
function, and use the simd::sub
and simd::add
functions, instead of the operators operator-
and operator+
.
Additionally, the prefetch intrinsics need a cast.
Thank you for your answer, you are really a good person, I will try again.
Could you please tell me how to run this on Microsoft Visual Studio? I have tried using (/arch:AVX2) and
ifdef _MSC_VER
include
pragma intrinsic(_BitScanForward)
else
include
endif
int __builtin_ctz(unsigned int x) {
ifdef _MSC_VER
else
endif
}
However, I am still encountering errors when trying to run it. Specifically, I am getting the following errors:
At _mm_prefetch(address, _MM_HINT_T1): "error C2664: cannot convert argument 1 from 'const float ' to 'const char '"
At cand_x = simd::splat(bi bucket_size + svi simd::size) + simd::load(ramp_f32_data): "error C2676: binary '+': 'lttb::simd::type' does not define this operator or a conversion to a type acceptable to the predefined operator"
At _mm_prefetch(&in_y[(svi + num_vecs_per_cacheline) simd::size], _MM_HINT_T1): "error C2664: cannot convert argument 1 from 'const T ' to 'const char *'"
At vec_t d1_x = cand_x - last_x; vec_t d2_x = next_x - last_x; vec_t d1_y = cand_y - last_y; vec_t d2_y = next_y - last_y; vec_t surf = simd::abs(d1_x d2_y - d1_y d1_x);"error C2676: binary '-': 'vec_t' does not define this operator or a conversion to a type acceptable to the predefined operator"
At _mm_prefetch(address, _MM_HINT_T1): "error C2664: cannot convert argument 1 from 'const double ' to 'const char '"
At cand_x = simd::splat(bi bucket_size + svi simd::size) + simd::load(ramp_f64_data): "error C2676: binary '+': 'lttb::simd::type' does not define this operator or a conversion to a type acceptable to the predefined operator"
At _mm_prefetch(&in_y[(svi + num_vecs_per_cacheline) simd::size], _MM_HINT_T1): "error C2664: cannot convert argument 1 from 'const T ' to 'const char *'"
These errors are preventing me from running the program. I am wondering if the header file Tracy.hpp in lttb.cpp is necessary, as I do not have that file and have not included it. Could you please help me? Thank you very much!