| 5070 | DWORD WINAPI thread_process_bsgs_backward(LPVOID vargp) { |
| 5071 | #else |
| 5072 | void *thread_process_bsgs_backward(void *vargp) { |
| 5073 | #endif |
| 5074 | FILE *filekey; |
| 5075 | struct tothread *tt; |
| 5076 | char xpoint_raw[32],*aux_c,*hextemp; |
| 5077 | Int base_key,keyfound; |
| 5078 | Point base_point,point_aux,point_found; |
| 5079 | uint32_t k,l,r,salir,thread_number,entrar,cycles; |
| 5080 | |
| 5081 | IntGroup *grp = new IntGroup(CPU_GRP_SIZE / 2 + 1); |
| 5082 | Point startP; |
| 5083 | |
| 5084 | int hLength = (CPU_GRP_SIZE / 2 - 1); |
| 5085 | |
| 5086 | Int dx[CPU_GRP_SIZE / 2 + 1]; |
| 5087 | Point pts[CPU_GRP_SIZE]; |
| 5088 | |
| 5089 | Int dy; |
| 5090 | Int dyn; |
| 5091 | Int _s; |
| 5092 | Int _p; |
| 5093 | Int km,intaux; |
| 5094 | Point pp; |
| 5095 | Point pn; |
| 5096 | grp->Set(dx); |
| 5097 | |
| 5098 | tt = (struct tothread *)vargp; |
| 5099 | thread_number = tt->nt; |
| 5100 | free(tt); |
| 5101 | |
| 5102 | cycles = bsgs_aux / 1024; |
| 5103 | if(bsgs_aux % 1024 != 0) { |
| 5104 | cycles++; |
| 5105 | } |
| 5106 | |
| 5107 | intaux.Set(&BSGS_M_double); |
| 5108 | intaux.Mult(CPU_GRP_SIZE/2); |
| 5109 | intaux.Add(&BSGS_M); |
| 5110 | |
| 5111 | entrar = 1; |
| 5112 | /* |
| 5113 | while base_key is less than n_range_end then: |
| 5114 | */ |
| 5115 | do { |
| 5116 | |
| 5117 | #if defined(_WIN64) && !defined(__CYGWIN__) |
| 5118 | WaitForSingleObject(bsgs_thread, INFINITE); |
| 5119 | #else |
| 5120 | pthread_mutex_lock(&bsgs_thread); |
| 5121 | #endif |
| 5122 | if(n_range_end.IsGreater(&n_range_start)) { |
| 5123 | n_range_end.Sub(&BSGS_N_double); |
| 5124 | if(n_range_end.IsLower(&n_range_start)) { |
| 5125 | base_key.Set(&n_range_start); |
| 5126 | } |
| 5127 | else { |
| 5128 | base_key.Set(&n_range_end); |
| 5129 | } |
nothing calls this directly
no test coverage detected