Dataset Viewer
Auto-converted to Parquet Duplicate
rem
stringlengths
0
274k
add
stringlengths
0
169k
context
stringlengths
9
471k
unsigned32 regno, unsigned32 value
uint32_t regno, uint32_t value
void erc32_sonic_write_register( void *base, unsigned32 regno, unsigned32 value){ volatile unsigned32 *p = base;#if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS) printf( "%p Write 0x%04x to %s (0x%02x)\n", &p[regno], value, SONIC_Reg_name[regno], regno ); fflush( stdout );#endif p[regno] = 0x0ffff & v...
volatile unsigned32 *p = base;
volatile uint32_t *p = base;
void erc32_sonic_write_register( void *base, unsigned32 regno, unsigned32 value){ volatile unsigned32 *p = base;#if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS) printf( "%p Write 0x%04x to %s (0x%02x)\n", &p[regno], value, SONIC_Reg_name[regno], regno ); fflush( stdout );#endif p[regno] = 0x0ffff & v...
return Flx_renormalize(res,lg(res));
return FlxX_renormalize(res,lg(res));
FlxqX_Flxq_mul(GEN P, GEN U, GEN T, ulong p){ int i, lP = lg(P); GEN res = cgetg(lP,t_POL); res[1] = P[1]; for(i=2; i<lP; i++) res[i] = (long)Flxq_mul(U,(GEN)P[i], T,p); return Flx_renormalize(res,lg(res));}
for (i=2; i<ly; i++) z[i] = (long) FpX_add((GEN)x[i], (GEN)y[i], p);
for (i=2; i<ly; i++) z[i] = (long) Fq_add((GEN)x[i], (GEN)y[i], NULL, p);
FpXX_add(GEN x, GEN y, GEN p){ long i,lz; GEN z; long lx=lg(x); long ly=lg(y); if (ly>lx) swapspec(x,y, lx,ly); lz = lx; z = cgetg(lz, t_POL); z[1]=x[1]; for (i=2; i<ly; i++) z[i] = (long) FpX_add((GEN)x[i], (GEN)y[i], p); for ( ; i<lx; i++) z[i] = (long) gcopy((GEN)x[i]); return FpXX_renormalize(z, lz);}
x += 2; y += 2; dz = dx-dy;
dz = dx-dy;
u_FpX_divrem(GEN x, GEN y, ulong p, int malloc, GEN *pr){ GEN z,q,c; long dx,dy,dz,i,j; ulong p1,inv; dy = deg(y); if (!dy) { if (pr) { if (pr == ONLY_REM) return u_zeropol(malloc); *pr = u_zeropol(malloc); } if (y[2] == 1UL) return u_copy(x,malloc); return u_FpX_Fp_mul(x, u_invmod(y[2], ...
c = u_copy(x-2, malloc);
c = u_copy(x, malloc);
u_FpX_divrem(GEN x, GEN y, ulong p, int malloc, GEN *pr){ GEN z,q,c; long dx,dy,dz,i,j; ulong p1,inv; dy = deg(y); if (!dy) { if (pr) { if (pr == ONLY_REM) return u_zeropol(malloc); *pr = u_zeropol(malloc); } if (y[2] == 1UL) return u_copy(x,malloc); return u_FpX_Fp_mul(x, u_invmod(y[2], ...
x += 2; y += 2;
u_FpX_divrem(GEN x, GEN y, ulong p, int malloc, GEN *pr){ GEN z,q,c; long dx,dy,dz,i,j; ulong p1,inv; dy = deg(y); if (!dy) { if (pr) { if (pr == ONLY_REM) return u_zeropol(malloc); *pr = u_zeropol(malloc); } if (y[2] == 1UL) return u_copy(x,malloc); return u_FpX_Fp_mul(x, u_invmod(y[2], ...
GEN a = gzero, b = gzero;
GEN a = gzero, b = gzero, run = realun(DEFAULTPREC);
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i]));
for (i=2; i<lA; i++) a = gadd(a, gmul(gsqr((GEN)A[i]),run));
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t));
GEN t = gmul((GEN)B[i], run); if (typ(t) == t_POL) t = gnorml1(t, 0); b = gadd(b, gsqr(t));
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
b = mulii(gpowgs(a, deg(B)), gpowgs(b, deg(A))); return gerepileupto(av, addis(racine(b), 1));
b = gmul(gpowgs(a, deg(B)), gpowgs(b, deg(A))); avma = av; return 1 + (gexpo(b)>>1);
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
if ( !temp_loc.ops->utime_h )
if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc );
int utime( const char *path, const struct utimbuf *times){ rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; if ( !temp_loc.ops->utime_h ) set_errno_and_return_minus_one( ENOTSUP )...
}
int utime( const char *path, const struct utimbuf *times){ rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; if ( !temp_loc.ops->utime_h ) set_errno_and_return_minus_one( ENOTSUP )...
while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM1, LSR) & DR )) { buf[off++] = uread(BSP_UART_COM1, RBR);
while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM2, LSR) & DR )) { buf[off++] = uread(BSP_UART_COM2, RBR);
BSP_uart_termios_read_com2(int uart){ int off = (int)0; char buf[40]; /* read current byte */ while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM1, LSR) & DR )) { buf[off++] = uread(BSP_UART_COM1, RBR); } /* write out data */ if ( off > 0 ) { rtems_termios_enqueue_raw_characters(termios_ttyp_com2, ...
unsigned32 buf_size = 0;
uint32_t buf_size = 0;
void fileio_read_file(void){ char fname[1024]; char tmp_str[32]; unsigned32 buf_size = 0; size_t curr_pos; int fd = -1; ssize_t n; rtems_interval start_tick,curr_tick,ticks_per_sec; char *bufptr = NULL; boolean failed = FALSE; printf(" =========================\n"); printf(" READ FILE ... \n");...
boolean fileio_str2size(const char *str,unsigned32 *res_ptr)
boolean fileio_str2size(const char *str,uint32_t *res_ptr)
boolean fileio_str2size(const char *str,unsigned32 *res_ptr){ boolean failed = FALSE; unsigned long size; char suffix = ' '; if (1 > sscanf(str,"%lu%c",&size,&suffix)) { failed = TRUE; } else if (toupper(suffix) == 'K') { size *= 1024; } else if (toupper(suffix) == 'M') { size *= 1024UL*1024UL; } els...
unsigned32 flen = 0;
uint32_t flen = 0;
void fileio_list_file(void){ char fname[1024]; char *buf_ptr = NULL; unsigned32 flen = 0; int fd = -1; ssize_t n; size_t buf_size = 100; rtems_interval start_tick,curr_tick,ticks_per_sec; printf(" =========================\n"); printf(" LIST FILE ... \n"); printf(" =========================\n"); f...
dst = strdup(src);
if (src) dst = strdup(src);
void *bootp_strdup_realloc(char *dst,const char *src){ size_t len; void *realloc(void * __r, size_t __size); if (dst == NULL) { /* first allocation, simply use strdup */ dst = strdup(src); } else { /* already allocated, so use realloc/strcpy */ len = strlen(src) + 1; dst = realloc(dst,len); if ...
len = strlen(src) + 1;
len = src ? strlen(src) + 1 : 0;
void *bootp_strdup_realloc(char *dst,const char *src){ size_t len; void *realloc(void * __r, size_t __size); if (dst == NULL) { /* first allocation, simply use strdup */ dst = strdup(src); } else { /* already allocated, so use realloc/strcpy */ len = strlen(src) + 1; dst = realloc(dst,len); if ...
so->so_rcv.sb_flags |= SB_WAIT;
so->so_snd.sb_flags |= SB_WAIT;
socket_select (struct socket *so, int which, rtems_id tid){ switch (which) { case FREAD: if (soreadable(so)) return (1); so->so_rcv.sb_flags |= SB_WAIT; so->so_rcv.sb_sel.si_pid = tid; break; case FWRITE: if (sowriteable(so)) return (1); so->so_rcv.sb_flags |= SB_WAIT; so->so_snd.sb_sel.si_pid = tid; break;...
unsigned32 count;
uint32_t count;
nvram_driver_write(rtems_device_major_number major, rtems_device_minor_number minor, void *arg){ rtems_libio_rw_args_t *args = arg; unsigned32 count; i2c_bus_number bus = DS1307_I2C_BUS_NUMBER; i2c_address addr = DS1307_I2C_ADDRESS; i2c_message_status status; ...
rtems_unsigned8 buf[DS1307_NVRAM_SIZE + 1];
uint8_t buf[DS1307_NVRAM_SIZE + 1];
nvram_driver_write(rtems_device_major_number major, rtems_device_minor_number minor, void *arg){ rtems_libio_rw_args_t *args = arg; unsigned32 count; i2c_bus_number bus = DS1307_I2C_BUS_NUMBER; i2c_address addr = DS1307_I2C_ADDRESS; i2c_message_status status; ...
volatile rtems_unsigned8 *VME_interrupt_enable; rtems_unsigned8 value;
volatile uint8_t *VME_interrupt_enable; uint8_t value;
void VME_interrupt_Enable ( VME_interrupt_Mask mask /* IN */){ volatile rtems_unsigned8 *VME_interrupt_enable; rtems_unsigned8 value;#if 0 VME_interrupt_enable = ACC_VIE;#else VME_interrupt_enable = 0;#endif value = *VME_interrupt_enable; value |= mask; /* turn on interr...
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc)
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN u, GEN gell, long rc)
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
GEN y, logdisc, b;
GEN logdisc, b, y = isprincipalgenforce(bnfz,id);
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
y = isprincipalgenforce(bnfz,id);
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell);
GEN e = modii(mulii((GEN)logdisc[i],(GEN)u[i]), gell);
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
return &prototab[i];
return (struct protoent *) &prototab[i];
getprotobynumber (int proto){ int i; for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) { if (proto == prototab[i].p_proto) return &prototab[i]; } return NULL;}
if (*analyseur == '"') bp = readstring_i(bp, &buf,&limit); else bp = expand_string(bp, &buf,&limit);
bp = expand_string(bp, &buf,&limit);
identifier(void){ long m, i, matchcomma, deriv; gpmem_t av; char *ch1; entree *ep; GEN res, newfun, ptr; mark.identifier = analyseur; ep = entry(); if (EpVALENCE(ep)==EpVAR || EpVALENCE(ep)==EpGVAR) { /* optimized for simple variables */ switch (*analyseur) { case ')': case ',': return (GEN)ep->value...
int i; unsigned long hash,api; PTE pte;
int i; unsigned long hash, api; APte pte;
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
printf( "gettimeofday: %s", ctime( &tv.tv_sec ) );
a_time_t = tv.tv_sec; printf( "gettimeofday: %s", ctime( &a_time_t) );
void check_a_tod( rtems_time_of_day *the_tod){ rtems_status_code status; rtems_time_of_day new_tod; time_t a_time_t; struct timeval tv; struct tm *a_tm; int result; int i = 0; print_time( "rtems_clock_set ", the_tod, "\n" ); status = rtems_clock_set( t...
ulong M_2 = h->M << 1; long x = 0, count = 0;
long x = 0, count = 0, M_2 = h->M << 1;
mpqs_eval_sieve(mpqs_handle_t *h){ ulong M_2 = h->M << 1; long x = 0, count = 0; /* XX Todo: replace the following by an auto-adjusting threshold driven * XX by histogram yield measurements */ unsigned char th = h->sieve_threshold; unsigned char *sieve_array = h->sieve_array; long *candidates = h->candidates; ...
GEN g = mppgcd(Qx, kN);
GEN g = gcdii(Qx, kN);
mpqs_eval_candidates(GEN A, GEN inv_A4, GEN B, GEN kN, long k, double sqrt_kN, long *FB, long *start_1, long *start_2, ulong M, long bin_index, long *candidates, long number_of_candidates, long lp_bound, long start_index_FB_for_A, FILE *FREL, FILE *LPREL) /* NB FREL, LPREL are ac...
if (pi < h->index0_FB) {
if ((mpqs_int32_t)pi < h->index0_FB) {
mpqs_eval_cand(mpqs_handle_t *h, long number_of_cand, FILE *FREL, FILE *LPREL) /* NB FREL, LPREL are actually FNEW, LPNEW when we get called */{ pari_sp av; long number_of_relations = 0; char *relations = h->relations; long *relaprimes = h->relaprimes; ulong i, pi; mpqs_FB_entry_t *FB = h->FB; GEN A =...
idpowred(GEN x, GEN n) { return idealpowred(static_OBJ, x, n, 0); }
idpowred(void *nf, GEN x, GEN n) { return idealpowred((GEN) nf, x, n, 0); }
idpowred(GEN x, GEN n) { return idealpowred(static_OBJ, x, n, 0); }
progname = *argv;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
status = EXIT_OK;
pppd_status = EXIT_OK;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
kill_link = 0;
pppd_kill_link = 0;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
status = EXIT_OPEN_FAILED;
pppd_status = EXIT_OPEN_FAILED;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
status = EXIT_INIT_FAILED;
pppd_status = EXIT_INIT_FAILED;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
if (kill_link)
if (pppd_kill_link)
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
status = EXIT_CONNECT_FAILED;
pppd_status = EXIT_CONNECT_FAILED;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
27

Collections including h4iku/coconut_c2005_preprocessed