#include "Sieving.H"
#include "qsieve.H"
#include "modulo.H"
#include "mpqsPolynom.H"
#include "Sieving-inc.cc"
Go to the source code of this file.
Classes | |
class | StaticRelations |
Defines | |
#define | SIEBASM_386 |
#define | asm_sieb_init(logValue) |
#define | asm_search_sieb(offset) |
#define | asm_sieb(lp, d0, d1, P) |
#define | asm_sieb_small(lp, d0, d1, P) |
Functions | |
TSieveElement SieveArray_[PhysicalSieveSize+64+8] | __attribute__ ((aligned(64))) |
TSieveElement SieveControl::log_PrimeNumbers[StaticFactorbase::MaxSize] | __attribute__ ((aligned(16))) |
void | initialize_Sieve () |
void | initialize_Sieve (const int Image[]) |
void | do_scanning_Sieve (void) |
Variables | |
CmpqsPolynom | Polynom |
int | SieveOffset = -LogicalSieveSize |
TSieveElement | log_Primzahl_of_PrimePowers [StaticFactorbase::max_additional_Powers] |
unsigned int | clobbered_int |
Definition in file Sieving.cc.
#define asm_search_sieb | ( | offset | ) |
Definition at line 318 of file Sieving.cc.
#define asm_sieb | ( | lp, | |||
d0, | |||||
d1, | |||||
P | ) |
Value:
asm volatile ( \ "cmpl %[disp1],%[disp0]\n\t" \ "cmova %[disp0],%%eax # conditional swap part1\n\t" \ "cmova %[disp1],%[disp0] # part2 \n\t" \ "cmova %%eax,%[disp1] # part3 \n\t" \ "movl %[limit],%%eax\n\t" \ "jmp 1f \n\t" \ ".balign 16 \n\t" \ "0: subb %[val],(%[sieb],%[disp1])\n\t" \ "addl %[step],%[disp1]\n\t" \ "subb %[val],(%[sieb],%[disp0])\n\t" \ "addl %[step],%[disp0]\n\t" \ "1: cmpl %%eax,%[disp1]\n\t" \ "jb 0b\n\t" \ "cmpl %%eax,%[disp0] \n\t" \ "cmovb %[disp0],%%eax \n\t" \ "subb %[val],(%[sieb],%%eax)\n\t" \ "xorl %%eax,%%eax \n\t" \ "cmpl %[limit],%[disp0] \n\t" \ "cmovb %[step],%%eax \n\t" \ "addl %%eax,%[disp0] \n" \ : [disp0] "+q" (d0), [disp1] "+q" (d1) : [step] "r" (P), [val] "r" (lp), [sieb] "r" (&SieveArray[0]), [limit] "i" (PhysicalSieveSize) : "cc", "eax");
Definition at line 447 of file Sieving.cc.
#define asm_sieb_init | ( | logValue | ) |
Value:
asm volatile(\ "movd %%eax,%%xmm0 # -> (x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,a) \n\t" \ "punpcklbw %%xmm0,%%xmm0 # (x,x,x,x,x,x,x,x,x,x,x,x,x,x,a,a) \n\t" \ "movl %[count],%%eax \n\t" \ "punpcklbw %%xmm0,%%xmm0 # (x,x,x,x,x,x,x,x,x,x,x,x,a,a,a,a) \n\t" \ "punpcklbw %%xmm0,%%xmm0 # (x,x,x,x,x,x,x,x,a,a,a,a,a,a,a,a) \n\t" \ "punpcklbw %%xmm0,%%xmm0 # (a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a) \n\t" \ ".balign 16 \n\t" \ "1: \n\t" \ "movdqa %%xmm0,(%[Sieve]) \n\t" \ "movdqa %%xmm0,0x10(%[Sieve]) \n\t" \ "movdqa %%xmm0,0x20(%[Sieve]) \n\t" \ "movdqa %%xmm0,0x30(%[Sieve]) \n\t" \ "add $0x40,%[Sieve] \n\t" \ "sub $0x40,%%eax \n\t" \ "jnz 1b \n\t" \ "emms \n" \ : "=D" (clobbered_int), "=a" (clobbered_int) : [threshold] "a" (logValue), [Sieve] "D" (SieveArray), [count] "i" (PhysicalSieveSize) : "cc", "memory", "xmm0");
Definition at line 255 of file Sieving.cc.
#define asm_sieb_small | ( | lp, | |||
d0, | |||||
d1, | |||||
P | ) |
Value:
asm volatile ( \ "cmpl %[disp1],%[disp0]\n\t" \ "cmova %[disp0],%%eax # conditional swap part1\n\t" \ "cmova %[disp1],%[disp0] # part2 \n\t" \ "cmova %%eax,%[disp1] # part3 \n\t" \ "movl %[limit],%%eax\n\t" \ "jmp 0f \n\t" \ ".balign 16 \n\t" \ "0: subb %[val],(%[sieb],%[disp1])\n\t" \ "addl %[step],%[disp1]\n\t" \ "subb %[val],(%[sieb],%[disp0])\n\t" \ "addl %[step],%[disp0]\n\t" \ "1: cmpl %%eax,%[disp1]\n\t" \ "jb 0b\n\t" \ "cmpl %%eax,%[disp0] \n\t" \ "cmovb %[disp0],%%eax \n\t" \ "subb %[val],(%[sieb],%%eax)\n\t" \ "xorl %%eax,%%eax \n\t" \ "cmpl %[limit],%[disp0] \n\t" \ "cmovb %[step],%%eax \n\t" \ "addl %%eax,%[disp0] \n" \ : [disp0] "+q" (d0), [disp1] "+q" (d1) : [step] "r" (P), [val] "r" (lp), [sieb] "r" (&SieveArray[0]), [limit] "i" (PhysicalSieveSize) : "cc", "eax");
Definition at line 472 of file Sieving.cc.
#define SIEBASM_386 |
Definition at line 246 of file Sieving.cc.
TSieveElement SieveControl::log_PrimeNumbers [StaticFactorbase::MaxSize] __attribute__ | ( | (aligned(16)) | ) |
TSieveElement SieveArray_ [PhysicalSieveSize+64+8] __attribute__ | ( | (aligned(64)) | ) |
Referenced by myBitString::test_and_add_carry().
void do_scanning_Sieve | ( | void | ) |
Definition at line 1449 of file Sieving.cc.
void initialize_Sieve | ( | const int | Image[] | ) |
Definition at line 787 of file Sieving.cc.
void initialize_Sieve | ( | ) |
unsigned int clobbered_int |
Definition at line 248 of file Sieving.cc.
Definition at line 34 of file Sieving.cc.
Definition at line 87 of file file-client.cc.
Referenced by do_check(), CClientPolynomFetcher::fetch(), elliptic_curves::go(), performance_check(), polphi_template(), Cprocess_clients::process_data_stream(), and statistical_data::StatusReport().
int SieveOffset = -LogicalSieveSize |
Definition at line 15 of file Sieving.cc.
Referenced by do_sieving_DynamicFactors(), do_sieving_Squares(), and statistical_data::StatusReport().