Thread: mtsieve
View Single Post
Old 2018-06-26, 16:36   #59
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

61×97 Posts
Default

Quote:
Originally Posted by henryzz View Post
I need to give you my code for b_1^{n_1}b_2^{n_2}+c at some point. I need to work out whether it is TestPrimeChunk or BuildBNRemainders taking more time. If it is BuildBNRemainders then I will probably add a third variable base and n. I do want to at least add in support for a fixed multiplier.

It also needs to be converted to use SSE2/AVX where possible.
Good to know that someone is trying to use my framework for their own benefit.

You need to call CpuSupportsAvx() to determine if the CPU has AVX support. This is declared in Worker.h. If it returns false then you need to code with the FPU or SSE routines.

I suggest that you a look at avx-asm-x86.h as well as CullenWoodallWorker.cpp to help familiarize yourself with the AVX routines.

One other caveat is that you cannot use the AVX code and have data of type double (double * is fine). This is because the AVX routines don't save the xmm registers upon entry and restore them upon exit. I'll address that limitation in an upcoming release.
rogue is offline   Reply With Quote