26 #if (AE_CPU==AE_INTEL) 28 #if AE_COMPILER==AE_MSVC 36 #if (AE_COMPILER==AE_MSVC) 37 #pragma warning(disable:4100) 38 #pragma warning(disable:4127) 39 #pragma warning(disable:4702) 40 #pragma warning(disable:4996) 56 #define AE_DATA_ALIGN 16 57 #define AE_PTR_ALIGN sizeof(void*) 58 #define DYN_BOTTOM ((void*)1) 59 #define DYN_FRAME ((void*)2) 60 #define AE_LITTLE_ENDIAN 1 61 #define AE_BIG_ENDIAN 2 62 #define AE_MIXED_ENDIAN 3 63 #define AE_SER_ENTRY_LENGTH 11 64 #define AE_SER_ENTRIES_PER_ROW 5 66 #define AE_SM_DEFAULT 0 68 #define AE_SM_READY2S 2 69 #define AE_SM_TO_STRING 10 70 #define AE_SM_FROM_STRING 20 71 #define AE_SM_TO_CPPSTRING 11 73 #define AE_LOCK_CYCLES 512 74 #define AE_LOCK_TESTS_BEFORE_YIELD 16 75 #define AE_CRITICAL_ASSERT(x) if( !(x) ) abort() 81 #ifdef AE_USE_ALLOC_COUNTER 88 #ifdef AE_SMP_DEBUGCOUNTERS 102 static char _ae_int32_t_must_be_32_bits_wide[1-2*((int)(
sizeof(
ae_int32_t))-4)*((int)(
sizeof(
ae_int32_t))-4)];
103 static char _ae_int64_t_must_be_64_bits_wide[1-2*((int)(
sizeof(
ae_int64_t))-8)*((int)(
sizeof(
ae_int64_t))-8)];
104 static char _ae_int_t_must_be_pointer_sized [1-2*((int)(
sizeof(
ae_int_t))-(
int)
sizeof(
void*))*((int)(
sizeof(
ae_int_t))-(
int)(
sizeof(
void*)))];
111 static volatile ae_int_t ae_never_change_it = 1;
126 char *result = (
char*)ptr;
127 if( (result-(
char*)0)%alignment!=0 )
128 result += alignment - (result-(
char*)0)%alignment;
134 #ifndef AE_USE_CPP_ERROR_HANDLING 142 if( state->break_jump!=NULL )
143 longjmp(*(state->break_jump), 1);
171 block = malloc(
sizeof(
void*)+size);
176 #ifdef AE_USE_ALLOC_COUNTER 179 return (
void*)((
char*)block+
sizeof(
void*));
186 block = malloc(alignment-1+
sizeof(
void*)+size);
189 result = (
char*)block+
sizeof(
void*);
192 result = (
char*)
ae_align(result, alignment);
193 *((
void**)(result-
sizeof(
void*))) = block;
194 #ifdef AE_USE_ALLOC_COUNTER 206 p = *((
void**)((
char*)block-
sizeof(
void*)));
208 #ifdef AE_USE_ALLOC_COUNTER 228 if( result==NULL && state!=NULL)
231 sprintf(buf,
"ae_malloc(): out of memory (attempted to allocate %llu bytes)", (
unsigned long long)size);
259 p_base = (
char*)storage;
260 pp_ptr = (
void**)dst->
data.
ptr;
296 void *
volatile fake_variable0 = p;
297 void *
volatile fake_variable1 = fake_variable0;
298 fake_variable0 = fake_variable1;
324 #ifndef AE_USE_CPP_ERROR_HANDLING 325 state->break_jump = NULL;
380 #ifndef AE_USE_CPP_ERROR_HANDLING 386 void ae_state_set_break_jump(
ae_state *state, jmp_buf *buf)
388 state->break_jump = buf;
466 ae_assert(size>=0,
"ae_db_malloc(): negative size", state);
472 if( block->
ptr==NULL && size!=0 )
474 if( make_automatic && state!=NULL )
509 ae_assert(size>=0,
"ae_db_realloc(): negative size", state);
514 if( block->
ptr!=NULL )
517 if( block->
ptr==NULL && size!=0 )
536 if( block->
ptr!=NULL )
552 void (*deallocator)(
void*) = NULL;
556 block1->
ptr = block2->
ptr;
585 ae_assert(size>=0,
"ae_vector_init(): negative size", state);
663 ae_assert(newsize>=0,
"ae_vector_set_length(): negative size", state);
668 if( dst->
cnt==newsize )
761 ae_assert(rows>=0 && cols>=0,
"ae_matrix_init(): negative length", state);
762 if( rows<0 || cols<0 )
766 if( rows==0 || cols==0 )
811 for(i=0; i<dst->
rows; i++)
827 p_src_row = (
char*)src->
ptr;
831 memcpy(p_dst_row, p_src_row, (
size_t)(row_size));
859 ae_assert(rows>=0 && cols>=0,
"ae_matrix_set_length(): negative length", state);
860 if( rows<0 || cols<0 )
863 if( dst->
rows==rows && dst->
cols==cols )
977 if( make_automatic && state!=NULL )
1149 p_dst_row = (
char*)dst->
ptr;
1152 memcpy(p_dst_row, p_src_row, (
size_t)(row_size));
1263 if( !_ae_cpuid_initialized )
1269 #if (AE_CPU==AE_INTEL) && defined(AE_HAS_SSE2_INTRINSICS) 1270 #if AE_COMPILER==AE_MSVC 1273 __cpuid(CPUInfo, 1);
1274 if( (CPUInfo[3]&0x04000000)!=0 )
1277 #elif AE_COMPILER==AE_GNUC 1280 __asm__ __volatile__ (
"cpuid":
"=a" (a),
"=b" (b),
"=c" (c),
"=d" (d) :
"a" (1));
1281 if( (d&0x04000000)!=0 )
1284 #elif AE_COMPILER==AE_SUNC 1287 __asm__ __volatile__ (
"cpuid":
"=a" (a),
"=b" (b),
"=c" (c),
"=d" (d) :
"a" (1));
1288 if( (d&0x04000000)!=0 )
1298 _ae_cpuid_initialized =
ae_true;
1305 if( _ae_cpuid_has_sse2 )
1316 volatile double x =
v1;
1317 volatile double y = v2;
1330 volatile double x =
v1;
1331 volatile double y = v2;
1338 volatile double x =
v1;
1339 volatile double y = v2;
1346 volatile double x =
v1;
1347 volatile double y = v2;
1354 volatile double x =
v1;
1355 volatile double y = v2;
1394 return ((high &0x7FF00000)==0x7FF00000) && (((high &0x000FFFFF)!=0) || (low!=0));
1418 return ((high&0x7FFFFFFF)==0x7FF00000) && (low==0);
1442 return (high==(
ae_int32_t)0x7FF00000) && (low==0);
1466 return ((high&0x7FFFFFFF)==0x7FF00000) && (high!=(
ae_int32_t)0x7FF00000) && (low==0);
1527 return x>=0 ?
x : -
x;
1543 if( x<0 )
return -1;
1569 return m1>m2 ? m1 : m2;
1574 return m1>m2 ? m2 : m1;
1579 return m1>m2 ? m1 : m2;
1584 return m1>m2 ? m2 : m1;
1592 k = _debug_rng_s0/53668;
1593 _debug_rng_s0 = 40014*(_debug_rng_s0-k*53668)-k*12211;
1594 if( _debug_rng_s0<0 )
1595 _debug_rng_s0 = _debug_rng_s0+2147483563;
1596 k = _debug_rng_s1/52774;
1597 _debug_rng_s1 = 40692*(_debug_rng_s1-k*52774)-k*3791;
1598 if( _debug_rng_s1<0 )
1599 _debug_rng_s1 = _debug_rng_s1+2147483399;
1600 result = _debug_rng_s0-_debug_rng_s1;
1602 result = result+2147483562;
1610 return ae_debugrng()/2147483563.0;
1614 double mx = (double)(RAND_MAX)+1.0;
1615 volatile double tmp0 = i2/mx;
1616 volatile double tmp1 = i1+tmp0;
1624 return (ae_debugrng()-1)%maxv;
1726 static double x_safepythag2(
double x,
double y)
1734 w = xabs>yabs ? xabs : yabs;
1735 z = xabs<yabs ? xabs : yabs;
1742 return w*
sqrt(1+t*t);
1768 x_split_length(len0,
x_nb, &n1, &n2);
1769 is_symmetric_rec_off_stat(a, offset0, offset1, n1, len1, nonfinite, mx, err, _state);
1770 is_symmetric_rec_off_stat(a, offset0+n1, offset1, n2, len1, nonfinite, mx, err, _state);
1774 x_split_length(len1,
x_nb, &n1, &n2);
1775 is_symmetric_rec_off_stat(a, offset0, offset1, len0, n1, nonfinite, mx, err, _state);
1776 is_symmetric_rec_off_stat(a, offset0, offset1+n1, len0, n2, nonfinite, mx, err, _state);
1783 double *p1, *p2, *prow, *pcol;
1787 p1 = (
double*)(a->
ptr)+offset0*a->
stride+offset1;
1788 p2 = (
double*)(a->
ptr)+offset1*a->
stride+offset0;
1789 for(i=0; i<len0; i++)
1793 for(j=0; j<len1; j++)
1802 *mx = *mx>v ? *mx : v;
1804 *mx = *mx>v ? *mx : v;
1805 v = fabs(*pcol-*prow);
1806 *err = *err>v ? *err : v;
1830 double *p, *prow, *pcol;
1838 x_split_length(len,
x_nb, &n1, &n2);
1839 is_symmetric_rec_diag_stat(a, offset, n1, nonfinite, mx, err, _state);
1840 is_symmetric_rec_diag_stat(a, offset+n1, n2, nonfinite, mx, err, _state);
1841 is_symmetric_rec_off_stat(a, offset+n1, offset, n2, n1, nonfinite, mx, err, _state);
1846 p = (
double*)(a->
ptr)+offset*a->
stride+offset;
1847 for(i=0; i<
len; i++)
1851 for(j=0; j<
i; j++,pcol+=a->
stride,prow++)
1860 *mx = *mx>v ? *mx : v;
1862 *mx = *mx>v ? *mx : v;
1863 v = fabs(*pcol-*prow);
1864 *err = *err>v ? *err : v;
1867 v = fabs(p[i+i*a->
stride]);
1868 *mx = *mx>v ? *mx : v;
1894 x_split_length(len0,
x_nb, &n1, &n2);
1895 is_hermitian_rec_off_stat(a, offset0, offset1, n1, len1, nonfinite, mx, err, _state);
1896 is_hermitian_rec_off_stat(a, offset0+n1, offset1, n2, len1, nonfinite, mx, err, _state);
1900 x_split_length(len1,
x_nb, &n1, &n2);
1901 is_hermitian_rec_off_stat(a, offset0, offset1, len0, n1, nonfinite, mx, err, _state);
1902 is_hermitian_rec_off_stat(a, offset0, offset1+n1, len0, n2, nonfinite, mx, err, _state);
1915 for(i=0; i<len0; i++)
1919 for(j=0; j<len1; j++)
1927 v = x_safepythag2(pcol->
x, pcol->
y);
1928 *mx = *mx>v ? *mx : v;
1929 v = x_safepythag2(prow->
x, prow->
y);
1930 *mx = *mx>v ? *mx : v;
1931 v = x_safepythag2(pcol->
x-prow->
x, pcol->
y+prow->
y);
1932 *err = *err>v ? *err : v;
1964 x_split_length(len,
x_nb, &n1, &n2);
1965 is_hermitian_rec_diag_stat(a, offset, n1, nonfinite, mx, err, _state);
1966 is_hermitian_rec_diag_stat(a, offset+n1, n2, nonfinite, mx, err, _state);
1967 is_hermitian_rec_off_stat(a, offset+n1, offset, n2, n1, nonfinite, mx, err, _state);
1973 for(i=0; i<
len; i++)
1977 for(j=0; j<
i; j++,pcol+=a->
stride,prow++)
1985 v = x_safepythag2(pcol->x, pcol->y);
1986 *mx = *mx>v ? *mx : v;
1987 v = x_safepythag2(prow->
x, prow->
y);
1988 *mx = *mx>v ? *mx : v;
1989 v = x_safepythag2(pcol->x-prow->
x, pcol->y+prow->
y);
1990 *err = *err>v ? *err : v;
2000 *mx = *mx>v ? *mx : v;
2002 *err = *err>v ? *err : v;
2025 x_split_length(len0,
x_nb, &n1, &n2);
2026 force_symmetric_rec_off_stat(a, offset0, offset1, n1, len1);
2027 force_symmetric_rec_off_stat(a, offset0+n1, offset1, n2, len1);
2031 x_split_length(len1,
x_nb, &n1, &n2);
2032 force_symmetric_rec_off_stat(a, offset0, offset1, len0, n1);
2033 force_symmetric_rec_off_stat(a, offset0, offset1+n1, len0, n2);
2040 double *p1, *p2, *prow, *pcol;
2043 p1 = (
double*)(a->
ptr)+offset0*a->
stride+offset1;
2044 p2 = (
double*)(a->
ptr)+offset1*a->
stride+offset0;
2045 for(i=0; i<len0; i++)
2049 for(j=0; j<len1; j++)
2070 double *p, *prow, *pcol;
2077 x_split_length(len,
x_nb, &n1, &n2);
2078 force_symmetric_rec_diag_stat(a, offset, n1);
2079 force_symmetric_rec_diag_stat(a, offset+n1, n2);
2080 force_symmetric_rec_off_stat(a, offset+n1, offset, n2, n1);
2085 p = (
double*)(a->
ptr)+offset*a->
stride+offset;
2086 for(i=0; i<
len; i++)
2090 for(j=0; j<
i; j++,pcol+=a->
stride,prow++)
2112 x_split_length(len0,
x_nb, &n1, &n2);
2113 force_hermitian_rec_off_stat(a, offset0, offset1, n1, len1);
2114 force_hermitian_rec_off_stat(a, offset0+n1, offset1, n2, len1);
2118 x_split_length(len1,
x_nb, &n1, &n2);
2119 force_hermitian_rec_off_stat(a, offset0, offset1, len0, n1);
2120 force_hermitian_rec_off_stat(a, offset0, offset1+n1, len0, n2);
2132 for(i=0; i<len0; i++)
2136 for(j=0; j<len1; j++)
2164 x_split_length(len,
x_nb, &n1, &n2);
2165 force_hermitian_rec_diag_stat(a, offset, n1);
2166 force_hermitian_rec_diag_stat(a, offset+n1, n2);
2167 force_hermitian_rec_off_stat(a, offset+n1, offset, n2, n1);
2173 for(i=0; i<
len; i++)
2177 for(j=0; j<
i; j++,pcol+=a->
stride,prow++)
2196 is_symmetric_rec_diag_stat(a, 0, (
ae_int_t)a->
rows, &nonfinite, &mx, &err, &_alglib_env_state);
2201 return err/mx<=1.0E-14;
2218 is_hermitian_rec_diag_stat(a, 0, (
ae_int_t)a->
rows, &nonfinite, &mx, &err, &_alglib_env_state);
2223 return err/mx<=1.0E-14;
2233 force_symmetric_rec_diag_stat(a, 0, (
ae_int_t)a->
rows);
2244 force_hermitian_rec_diag_stat(a, 0, (
ae_int_t)a->
rows);
2286 static char _sixbits2char_tbl[64] = {
2287 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
2288 '8',
'9',
'A',
'B',
'C',
'D',
'E',
'F',
2289 'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
2290 'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
2291 'W',
'X',
'Y',
'Z',
'a',
'b',
'c',
'd',
2292 'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
2293 'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
2294 'u',
'v',
'w',
'x',
'y',
'z',
'-',
'_' };
2301 return _sixbits2char_tbl[v];
2322 static ae_int_t _ae_char2sixbits_tbl[] = {
2323 -1, -1, -1, -1, -1, -1, -1, -1,
2324 -1, -1, -1, -1, -1, -1, -1, -1,
2325 -1, -1, -1, -1, -1, -1, -1, -1,
2326 -1, -1, -1, -1, -1, -1, -1, -1,
2327 -1, -1, -1, -1, -1, -1, -1, -1,
2328 -1, -1, -1, -1, -1, 62, -1, -1,
2329 0, 1, 2, 3, 4, 5, 6, 7,
2330 8, 9, -1, -1, -1, -1, -1, -1,
2331 -1, 10, 11, 12, 13, 14, 15, 16,
2332 17, 18, 19, 20, 21, 22, 23, 24,
2333 25, 26, 27, 28, 29, 30, 31, 32,
2334 33, 34, 35, -1, -1, -1, -1, 63,
2335 -1, 36, 37, 38, 39, 40, 41, 42,
2336 43, 44, 45, 46, 47, 48, 49, 50,
2337 51, 52, 53, 54, 55, 56, 57, 58,
2338 59, 60, 61, -1, -1, -1, -1, -1 };
2341 return (c>=0 && c<127) ? _ae_char2sixbits_tbl[(int)c] : -1;
2353 dst[0] = src[0] & 0x3F;
2354 dst[1] = (src[0]>>6) | ((src[1]&0x0F)<<2);
2355 dst[2] = (src[1]>>4) | ((src[2]&0x03)<<4);
2368 dst[0] = (
unsigned char)( src[0] | ((src[1]&0x03)<<6));
2369 dst[1] = (
unsigned char)((src[1]>>2) | ((src[2]&0x0F)<<4));
2370 dst[2] = (
unsigned char)((src[2]>>4) | (src[3]<<2));
2383 char c = v ?
'1' :
'0';
2403 const char *emsg =
"ALGLIB: unable to read boolean value from stream";
2407 while( *buf==
' ' || *buf==
'\t' || *buf==
'\n' || *buf==
'\r' )
2409 while( *buf!=
' ' && *buf!=
'\t' && *buf!=
'\n' && *buf!=
'\r' && *buf!=0 )
2426 if( (!was0) && (!was1) )
2446 unsigned char bytes[9];
2465 c = v<0 ? (
unsigned char)0xFF : (
unsigned char)0x00;
2506 const char *emsg =
"ALGLIB: unable to read integer value from stream";
2512 unsigned char bytes[9];
2521 while( *buf==
' ' || *buf==
'\t' || *buf==
'\n' || *buf==
'\r' )
2524 while( *buf!=
' ' && *buf!=
'\t' && *buf!=
'\n' && *buf!=
'\r' && *buf!=0 )
2530 sixbits[sixbitsread] =
d;
2535 if( sixbitsread==0 )
2537 for(i=sixbitsread; i<12; i++)
2569 unsigned char bytes[9];
2579 const char *s =
".nan_______";
2580 memcpy(buf, s, strlen(s)+1);
2585 const char *s =
".posinf____";
2586 memcpy(buf, s, strlen(s)+1);
2591 const char *s =
".neginf____";
2592 memcpy(buf, s, strlen(s)+1);
2609 for(i=0; i<(
ae_int_t)(
sizeof(
double)/2); i++)
2613 u.bytes[
i] =
u.bytes[
sizeof(double)-1-i];
2614 u.bytes[
sizeof(double)-1-i] = tc;
2637 const char *emsg =
"ALGLIB: unable to read double value from stream";
2643 unsigned char bytes[9];
2650 while( *buf==
' ' || *buf==
'\t' || *buf==
'\n' || *buf==
'\r' )
2658 const char *s_nan =
".nan_______";
2659 const char *s_posinf =
".posinf____";
2660 const char *s_neginf =
".neginf____";
2661 if( strncmp(buf, s_nan, strlen(s_nan))==0 )
2663 *pasttheend = buf+strlen(s_nan);
2664 return state->
v_nan;
2666 if( strncmp(buf, s_posinf, strlen(s_posinf))==0 )
2668 *pasttheend = buf+strlen(s_posinf);
2671 if( strncmp(buf, s_neginf, strlen(s_neginf))==0 )
2673 *pasttheend = buf+strlen(s_neginf);
2688 while( *buf!=
' ' && *buf!=
'\t' && *buf!=
'\n' && *buf!=
'\r' && *buf!=0 )
2694 sixbits[sixbitsread] =
d;
2707 for(i=0; i<(
ae_int_t)(
sizeof(
double)/2); i++)
2711 u.bytes[
i] =
u.bytes[
sizeof(double)-1-i];
2712 u.bytes[
sizeof(double)-1-i] = tc;
2731 if( cnt>0x12345678 )
2732 ae_never_change_it = cnt%10;
2735 for(i=0; i<cnt; i++)
2736 if( ae_never_change_it>0 )
2737 ae_never_change_it--;
2750 #if AE_OS==AE_WINDOWS 2751 if( !SwitchToThread() )
2753 #elif AE_OS==AE_POSIX 2765 #if AE_OS==AE_WINDOWS 2767 lock->p_lock[0] = 0;
2768 #elif AE_OS==AE_POSIX 2769 pthread_mutex_init(&lock->mutex, NULL);
2782 #if AE_OS==AE_WINDOWS 2784 #ifdef AE_SMP_DEBUGCOUNTERS 2785 InterlockedIncrement((LONG
volatile *)&_ae_dbg_lock_acquisitions);
2789 if( InterlockedCompareExchange((LONG
volatile *)lock->p_lock, 1, 0)==0 )
2792 #ifdef AE_SMP_DEBUGCOUNTERS 2793 InterlockedIncrement((LONG
volatile *)&_ae_dbg_lock_spinwaits);
2798 #ifdef AE_SMP_DEBUGCOUNTERS 2799 InterlockedIncrement((LONG
volatile *)&_ae_dbg_lock_yields);
2804 #elif AE_OS==AE_POSIX 2808 if( pthread_mutex_trylock(&lock->mutex)==0 )
2828 #if AE_OS==AE_WINDOWS 2829 InterlockedExchange((LONG
volatile *)lock->p_lock, 0);
2830 #elif AE_OS==AE_POSIX 2831 pthread_mutex_unlock(&lock->mutex);
2844 pthread_mutex_destroy(&lock->mutex);
2881 if( make_automatic && state!=NULL )
2982 if( tmp->
obj==NULL )
3019 ae_shared_pool_internalclear(dst);
3085 void (*destroy)(
void* ptr),
3089 ae_shared_pool_internalclear(dst);
3092 dst->size_of_object = size_of_object;
3094 dst->init_copy = init_copy;
3095 dst->destroy = destroy;
3098 dst->seed_object =
ae_malloc(size_of_object, state);
3099 ae_assert(dst->seed_object!=NULL,
"ALGLIB: unable to allocate memory for ae_shared_pool_set_seed()", state);
3101 init_copy(dst->seed_object, seed_object, state,
ae_false),
3102 "ALGLIB: unable to initialize seed in ae_shared_pool_set_seed()",
3132 "ALGLIB: shared pool is not seeded, PoolRetrieve() failed",
3147 new_obj = result->
obj;
3167 ae_assert(new_obj!=NULL,
"ALGLIB: unable to allocate memory for ae_shared_pool_retrieve()", state);
3170 "ALGLIB: unable to initialize object in ae_shared_pool_retrieve()",
3202 "ALGLIB: shared pool is not seeded, PoolRecycle() failed",
3206 ae_assert(pptr->
is_owner,
"ALGLIB: pptr in ae_shared_pool_recycle() does not own its pointer", state);
3207 ae_assert(pptr->
ptr!=NULL,
"ALGLIB: pptr in ae_shared_pool_recycle() is NULL", state);
3229 ae_assert(new_entry!=NULL,
"ALGLIB: unable to allocate memory in ae_shared_pool_recycle()", state);
3234 new_entry->
obj = pptr->
ptr;
3376 ae_shared_pool_internalclear(pool);
3418 ae_int_t rows, lastrowsize, result;
3446 #ifdef AE_USE_CPP_SERIALIZATION 3456 #ifdef AE_USE_CPP_SERIALIZATION 3460 serializer->
in_str = buf->c_str();
3476 serializer->
in_str = buf;
3482 const char *emsg =
"ALGLIB: serialization integrity error";
3491 strcat(buf,
"\r\n");
3492 bytes_appended = (
ae_int_t)strlen(buf);
3498 #ifdef AE_USE_CPP_SERIALIZATION 3507 strcat(serializer->
out_str, buf);
3508 serializer->
out_str += bytes_appended;
3517 const char *emsg =
"ALGLIB: serialization integrity error";
3526 strcat(buf,
"\r\n");
3527 bytes_appended = (
ae_int_t)strlen(buf);
3533 #ifdef AE_USE_CPP_SERIALIZATION 3542 strcat(serializer->
out_str, buf);
3543 serializer->
out_str += bytes_appended;
3552 const char *emsg =
"ALGLIB: serialization integrity error";
3561 strcat(buf,
"\r\n");
3562 bytes_appended = (
ae_int_t)strlen(buf);
3568 #ifdef AE_USE_CPP_SERIALIZATION 3577 strcat(serializer->
out_str, buf);
3578 serializer->
out_str += bytes_appended;
3634 result.
x = lhs.
x*lhs.
x-lhs.
y*lhs.
y;
3635 result.
y = 2*lhs.
x*lhs.
y;
3648 w = xabs>yabs ? xabs : yabs;
3649 v = xabs<yabs ? xabs : yabs;
3655 return w*
sqrt(1+t*t);
3661 volatile double x1 = lhs.
x;
3662 volatile double x2 = rhs.
x;
3663 volatile double y1 = lhs.
y;
3664 volatile double y2 = rhs.
y;
3665 return x1==x2 && y1==y2;
3670 volatile double x1 = lhs.
x;
3671 volatile double x2 = rhs.
x;
3672 volatile double y1 = lhs.
y;
3673 volatile double y2 = rhs.
y;
3674 return x1!=x2 || y1!=y2;
3680 result.
x = lhs.
x+rhs.
x;
3681 result.
y = lhs.
y+rhs.
y;
3688 result.
x = lhs.
x*rhs.
x-lhs.
y*rhs.
y;
3689 result.
y = lhs.
x*rhs.
y+lhs.
y*rhs.
x;
3696 result.
x = lhs.
x-rhs.
x;
3697 result.
y = lhs.
y-rhs.
y;
3706 if( fabs(rhs.
y)<fabs(rhs.
x) )
3710 result.
x = (lhs.
x+lhs.
y*e)/f;
3711 result.
y = (lhs.
y-lhs.
x*e)/f;
3717 result.
x = (lhs.
y+lhs.
x*e)/f;
3718 result.
y = (-lhs.
x+lhs.
y*e)/f;
3725 volatile double x1 = lhs.
x;
3726 volatile double x2 = rhs;
3727 volatile double y1 = lhs.
y;
3728 volatile double y2 = 0;
3729 return x1==x2 && y1==y2;
3734 volatile double x1 = lhs.
x;
3735 volatile double x2 = rhs;
3736 volatile double y1 = lhs.
y;
3737 volatile double y2 = 0;
3738 return x1!=x2 || y1!=y2;
3744 result.
x = lhs.
x+rhs;
3752 result.
x = lhs.
x*rhs;
3753 result.
y = lhs.
y*rhs;
3760 result.
x = lhs.
x-rhs;
3768 result.
x = lhs-rhs.
x;
3776 result.
x = lhs.
x/rhs;
3777 result.
y = lhs.
y/rhs;
3786 if( fabs(rhs.
y)<fabs(rhs.
x) )
3791 result.
y = -lhs*e/
f;
3809 double rx = 0, ry = 0;
3811 ae_bool bconj0 = !((conj0[0]==
'N') || (conj0[0]==
'n'));
3812 ae_bool bconj1 = !((conj1[0]==
'N') || (conj1[0]==
'n'));
3814 if( bconj0 && bconj1 )
3816 double v0x, v0y, v1x, v1y;
3817 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
3823 rx += v0x*v1x-v0y*v1y;
3824 ry += v0x*v1y+v0y*v1x;
3827 if( !bconj0 && bconj1 )
3829 double v0x, v0y, v1x, v1y;
3830 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
3836 rx += v0x*v1x-v0y*v1y;
3837 ry += v0x*v1y+v0y*v1x;
3840 if( bconj0 && !bconj1 )
3842 double v0x, v0y, v1x, v1y;
3843 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
3849 rx += v0x*v1x-v0y*v1y;
3850 ry += v0x*v1y+v0y*v1x;
3853 if( !bconj0 && !bconj1 )
3855 double v0x, v0y, v1x, v1y;
3856 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
3862 rx += v0x*v1x-v0y*v1y;
3863 ry += v0x*v1y+v0y*v1x;
3873 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
3875 if( stride_dst!=1 || stride_src!=1 )
3882 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
3890 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
3901 for(i=0; i<
n; i++, vdst++, vsrc++)
3909 for(i=0; i<
n; i++, vdst++, vsrc++)
3917 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
3919 if( stride_dst!=1 || stride_src!=1 )
3926 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
3934 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
3948 for(i=0; i<
n; i++, vdst++, vsrc++)
3956 for(i=0; i<
n; i++, vdst++, vsrc++)
3967 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
3969 if( stride_dst!=1 || stride_src!=1 )
3976 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
3978 vdst->x = alpha*vsrc->x;
3979 vdst->y = -alpha*vsrc->y;
3984 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
3986 vdst->x = alpha*vsrc->x;
3987 vdst->y = alpha*vsrc->y;
3998 for(i=0; i<
n; i++, vdst++, vsrc++)
4000 vdst->x = alpha*vsrc->
x;
4001 vdst->y = -alpha*vsrc->
y;
4006 for(i=0; i<
n; i++, vdst++, vsrc++)
4008 vdst->x = alpha*vsrc->
x;
4009 vdst->y = alpha*vsrc->
y;
4017 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
4019 if( stride_dst!=1 || stride_src!=1 )
4026 double ax = alpha.
x, ay = alpha.
y;
4027 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4029 vdst->x = ax*vsrc->x+ay*vsrc->y;
4030 vdst->y = -ax*vsrc->y+ay*vsrc->x;
4035 double ax = alpha.
x, ay = alpha.
y;
4036 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4038 vdst->x = ax*vsrc->x-ay*vsrc->y;
4039 vdst->y = ax*vsrc->y+ay*vsrc->x;
4050 double ax = alpha.
x, ay = alpha.
y;
4051 for(i=0; i<
n; i++, vdst++, vsrc++)
4053 vdst->x = ax*vsrc->
x+ay*vsrc->
y;
4054 vdst->y = -ax*vsrc->
y+ay*vsrc->
x;
4059 double ax = alpha.
x, ay = alpha.
y;
4060 for(i=0; i<
n; i++, vdst++, vsrc++)
4062 vdst->x = ax*vsrc->
x-ay*vsrc->
y;
4063 vdst->y = ax*vsrc->
y+ay*vsrc->
x;
4071 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
4073 if( stride_dst!=1 || stride_src!=1 )
4080 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4088 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4102 for(i=0; i<
n; i++, vdst++, vsrc++)
4110 for(i=0; i<
n; i++, vdst++, vsrc++)
4121 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
4123 if( stride_dst!=1 || stride_src!=1 )
4130 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4132 vdst->x += alpha*vsrc->x;
4133 vdst->y -= alpha*vsrc->y;
4138 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4140 vdst->x += alpha*vsrc->x;
4141 vdst->y += alpha*vsrc->y;
4152 for(i=0; i<
n; i++, vdst++, vsrc++)
4154 vdst->x += alpha*vsrc->
x;
4155 vdst->y -= alpha*vsrc->
y;
4160 for(i=0; i<
n; i++, vdst++, vsrc++)
4162 vdst->x += alpha*vsrc->
x;
4163 vdst->y += alpha*vsrc->
y;
4171 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
4173 if( stride_dst!=1 || stride_src!=1 )
4178 double ax = alpha.
x, ay = alpha.
y;
4181 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4183 vdst->x += ax*vsrc->x+ay*vsrc->y;
4184 vdst->y -= ax*vsrc->y-ay*vsrc->x;
4189 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4191 vdst->x += ax*vsrc->x-ay*vsrc->y;
4192 vdst->y += ax*vsrc->y+ay*vsrc->x;
4201 double ax = alpha.
x, ay = alpha.
y;
4204 for(i=0; i<
n; i++, vdst++, vsrc++)
4206 vdst->x += ax*vsrc->
x+ay*vsrc->
y;
4207 vdst->y -= ax*vsrc->
y-ay*vsrc->
x;
4212 for(i=0; i<
n; i++, vdst++, vsrc++)
4214 vdst->x += ax*vsrc->
x-ay*vsrc->
y;
4215 vdst->y += ax*vsrc->
y+ay*vsrc->
x;
4223 ae_bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
4225 if( stride_dst!=1 || stride_src!=1 )
4232 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4240 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4254 for(i=0; i<
n; i++, vdst++, vsrc++)
4262 for(i=0; i<
n; i++, vdst++, vsrc++)
4273 ae_v_caddd(vdst, stride_dst, vsrc, stride_src, conj_src, n, -alpha);
4280 ae_v_caddc(vdst, stride_dst, vsrc, stride_src, conj_src, n, alpha);
4291 for(i=0; i<
n; i++, vdst+=stride_dst)
4302 for(i=0; i<
n; i++, vdst++)
4318 double ax = alpha.
x, ay = alpha.
y;
4319 for(i=0; i<
n; i++, vdst+=stride_dst)
4321 double dstx = vdst->x, dsty = vdst->y;
4322 vdst->x = ax*dstx-ay*dsty;
4323 vdst->y = ax*dsty+ay*dstx;
4331 double ax = alpha.
x, ay = alpha.
y;
4332 for(i=0; i<
n; i++, vdst++)
4334 double dstx = vdst->
x, dsty = vdst->
y;
4335 vdst->
x = ax*dstx-ay*dsty;
4336 vdst->
y = ax*dsty+ay*dstx;
4348 if( stride0!=1 || stride1!=1 )
4353 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
4354 result += (*v0)*(*v1);
4363 for(i=0; i<n4; i++, v0+=4, v1+=4)
4364 result += v0[0]*v1[0]+v0[1]*v1[1]+v0[2]*v1[2]+v0[3]*v1[3];
4365 for(i=0; i<nleft; i++, v0++, v1++)
4366 result += v0[0]*v1[0];
4374 if( stride_dst!=1 || stride_src!=1 )
4379 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4388 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
4401 if( stride_dst!=1 || stride_src!=1 )
4406 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4415 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
4428 if( stride_dst!=1 || stride_src!=1 )
4433 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4434 *vdst = alpha*(*vsrc);
4442 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
4444 vdst[0] = alpha*vsrc[0];
4445 vdst[1] = alpha*vsrc[1];
4448 vdst[0] = alpha*vsrc[0];
4455 if( stride_dst!=1 || stride_src!=1 )
4460 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4469 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
4482 if( stride_dst!=1 || stride_src!=1 )
4487 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4488 *vdst += alpha*(*vsrc);
4496 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
4498 vdst[0] += alpha*vsrc[0];
4499 vdst[1] += alpha*vsrc[1];
4502 vdst[0] += alpha*vsrc[0];
4509 if( stride_dst!=1 || stride_src!=1 )
4514 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
4523 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
4535 ae_v_addd(vdst, stride_dst, vsrc, stride_src, n, -alpha);
4546 for(i=0; i<
n; i++, vdst+=stride_dst)
4554 for(i=0; i<
n; i++, vdst++)
4610 #ifdef AE_DEBUG4WINDOWS 4613 return GetTickCount();
4617 #ifdef AE_DEBUG4POSIX 4621 struct timespec now;
4622 if (clock_gettime(CLOCK_MONOTONIC, &now) )
4624 return now.tv_sec * 1000.0 + now.tv_nsec / 1000000.0;
4631 ae_int_t hqrnd_hqrndm1 = 2147483563;
4632 ae_int_t hqrnd_hqrndm2 = 2147483399;
4635 s0 += hqrnd_hqrndm1-1;
4636 while(s0>hqrnd_hqrndm1-1)
4637 s0 -= hqrnd_hqrndm1-1;
4640 s1 += hqrnd_hqrndm2-1;
4641 while(s1>hqrnd_hqrndm2-1)
4642 s1 -= hqrnd_hqrndm2-1;
4650 *s0 = _debug_rng_s0;
4651 *s1 = _debug_rng_s1;
4672 void str_vector_create(
const char *src,
bool match_head_only, std::vector<const char*> *p_vec);
4673 void str_matrix_create(
const char *src, std::vector< std::vector<const char*> > *p_mat);
4677 bool _parse_real_delim(
const char *s,
const char *delim,
double *result,
const char **new_s);
4799 double t = x*z.
x-y*z.
y;
4810 if( fabs(z.
y)<fabs(z.
x) )
4814 result.
x = (x+y*e)/f;
4815 result.
y = (y-x*e)/f;
4821 result.
x = (y+x*e)/f;
4822 result.
y = (-x+y*e)/f;
4844 int dps = _dps>=0 ? _dps : -_dps;
4845 if( dps<=0 || dps>=20 )
4846 throw ap_error(
"complex::tostring(): incorrect dps");
4855 if( sprintf(mask,
"%%.%d%s", dps, _dps>=0 ?
"f" :
"e")>=(
int)
sizeof(mask) )
4856 throw ap_error(
"complex::tostring(): buffer overflow");
4859 if( sprintf(buf_x, mask, (
double)(fabs(x)))>=(
int)
sizeof(buf_x) )
4860 throw ap_error(
"complex::tostring(): buffer overflow");
4861 if( sprintf(buf_y, mask, (
double)(fabs(y)))>=(
int)
sizeof(buf_y) )
4862 throw ap_error(
"complex::tostring(): buffer overflow");
4863 if( sprintf(buf_zero, mask, (
double)0)>=(
int)
sizeof(buf_zero) )
4864 throw ap_error(
"complex::tostring(): buffer overflow");
4867 if( strcmp(buf_x,buf_zero)!=0 && strcmp(buf_y,buf_zero)!=0 )
4868 return std::string(x>0 ?
"" :
"-")+buf_x+(y>0 ?
"+" :
"-")+buf_y+
"i";
4869 if( strcmp(buf_x,buf_zero)!=0 && strcmp(buf_y,buf_zero)==0 )
4870 return std::string(x>0 ?
"" :
"-")+buf_x;
4871 if( strcmp(buf_x,buf_zero)==0 && strcmp(buf_y,buf_zero)!=0 )
4872 return std::string(y>0 ?
"" :
"-")+buf_y+
"i";
4873 return std::string(
"0");
4878 volatile double x1 = lhs.
x;
4879 volatile double x2 = rhs.
x;
4880 volatile double y1 = lhs.
y;
4881 volatile double y2 = rhs.
y;
4882 return x1==x2 && y1==y2;
4886 {
return !(lhs==rhs); }
4926 if( fabs(rhs.
y)<fabs(rhs.
x) )
4930 result.
x = (lhs.
x+lhs.
y*e)/f;
4931 result.
y = (lhs.
y-lhs.
x*e)/f;
4937 result.
x = (lhs.
y+lhs.
x*e)/f;
4938 result.
y = (-lhs.
x+lhs.
y*e)/f;
4948 if( fabs(rhs.
y)<fabs(rhs.
x) )
4953 result.
y = -lhs*e/
f;
4977 w = xabs>yabs ? xabs : yabs;
4978 v = xabs<yabs ? xabs : yabs;
4984 return w*
sqrt(1+t*t);
4997 alglib_impl::ae_set_cores_to_use(nworkers);
5008 if( stride0!=1 || stride1!=1 )
5013 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
5014 result += (*v0)*(*v1);
5023 for(i=0; i<n4; i++, v0+=4, v1+=4)
5024 result += v0[0]*v1[0]+v0[1]*v1[1]+v0[2]*v1[2]+v0[3]*v1[3];
5025 for(i=0; i<nleft; i++, v0++, v1++)
5026 result += v0[0]*v1[0];
5038 double rx = 0, ry = 0;
5040 bool bconj0 = !((conj0[0]==
'N') || (conj0[0]==
'n'));
5041 bool bconj1 = !((conj1[0]==
'N') || (conj1[0]==
'n'));
5042 if( bconj0 && bconj1 )
5044 double v0x, v0y, v1x, v1y;
5045 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
5051 rx += v0x*v1x-v0y*v1y;
5052 ry += v0x*v1y+v0y*v1x;
5055 if( !bconj0 && bconj1 )
5057 double v0x, v0y, v1x, v1y;
5058 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
5064 rx += v0x*v1x-v0y*v1y;
5065 ry += v0x*v1y+v0y*v1x;
5068 if( bconj0 && !bconj1 )
5070 double v0x, v0y, v1x, v1y;
5071 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
5077 rx += v0x*v1x-v0y*v1y;
5078 ry += v0x*v1y+v0y*v1x;
5081 if( !bconj0 && !bconj1 )
5083 double v0x, v0y, v1x, v1y;
5084 for(i=0; i<
n; i++, v0+=stride0, v1+=stride1)
5090 rx += v0x*v1x-v0y*v1y;
5091 ry += v0x*v1y+v0y*v1x;
5105 if( stride_dst!=1 || stride_src!=1 )
5110 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5119 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
5131 vmove(vdst, 1, vsrc, 1, N);
5136 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5138 if( stride_dst!=1 || stride_src!=1 )
5145 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5153 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5164 for(i=0; i<
n; i++, vdst++, vsrc++)
5172 for(i=0; i<
n; i++, vdst++, vsrc++)
5180 vmove(vdst, 1, vsrc, 1,
"N", N);
5186 if( stride_dst!=1 || stride_src!=1 )
5191 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5200 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
5217 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5219 if( stride_dst!=1 || stride_src!=1 )
5226 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5234 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5248 for(i=0; i<
n; i++, vdst++, vsrc++)
5256 for(i=0; i<
n; i++, vdst++, vsrc++)
5267 vmoveneg(vdst, 1, vsrc, 1,
"N", N);
5273 if( stride_dst!=1 || stride_src!=1 )
5278 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5279 *vdst = alpha*(*vsrc);
5287 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
5289 vdst[0] = alpha*vsrc[0];
5290 vdst[1] = alpha*vsrc[1];
5293 vdst[0] = alpha*vsrc[0];
5299 vmove(vdst, 1, vsrc, 1, N, alpha);
5304 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5306 if( stride_dst!=1 || stride_src!=1 )
5313 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5315 vdst->x = alpha*vsrc->x;
5316 vdst->y = -alpha*vsrc->y;
5321 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5323 vdst->x = alpha*vsrc->x;
5324 vdst->y = alpha*vsrc->y;
5335 for(i=0; i<
n; i++, vdst++, vsrc++)
5337 vdst->x = alpha*vsrc->
x;
5338 vdst->y = -alpha*vsrc->
y;
5343 for(i=0; i<
n; i++, vdst++, vsrc++)
5345 vdst->x = alpha*vsrc->
x;
5346 vdst->y = alpha*vsrc->
y;
5354 vmove(vdst, 1, vsrc, 1,
"N", N, alpha);
5359 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5361 if( stride_dst!=1 || stride_src!=1 )
5368 double ax = alpha.
x, ay = alpha.
y;
5369 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5371 vdst->x = ax*vsrc->x+ay*vsrc->y;
5372 vdst->y = -ax*vsrc->y+ay*vsrc->x;
5377 double ax = alpha.
x, ay = alpha.
y;
5378 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5380 vdst->x = ax*vsrc->x-ay*vsrc->y;
5381 vdst->y = ax*vsrc->y+ay*vsrc->x;
5392 double ax = alpha.
x, ay = alpha.
y;
5393 for(i=0; i<
n; i++, vdst++, vsrc++)
5395 vdst->x = ax*vsrc->
x+ay*vsrc->
y;
5396 vdst->y = -ax*vsrc->
y+ay*vsrc->
x;
5401 double ax = alpha.
x, ay = alpha.
y;
5402 for(i=0; i<
n; i++, vdst++, vsrc++)
5404 vdst->x = ax*vsrc->
x-ay*vsrc->
y;
5405 vdst->y = ax*vsrc->
y+ay*vsrc->
x;
5413 vmove(vdst, 1, vsrc, 1,
"N", N, alpha);
5419 if( stride_dst!=1 || stride_src!=1 )
5424 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5433 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
5445 vadd(vdst, 1, vsrc, 1, N);
5450 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5452 if( stride_dst!=1 || stride_src!=1 )
5459 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5467 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5481 for(i=0; i<
n; i++, vdst++, vsrc++)
5489 for(i=0; i<
n; i++, vdst++, vsrc++)
5500 vadd(vdst, 1, vsrc, 1,
"N", N);
5506 if( stride_dst!=1 || stride_src!=1 )
5511 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5512 *vdst += alpha*(*vsrc);
5520 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
5522 vdst[0] += alpha*vsrc[0];
5523 vdst[1] += alpha*vsrc[1];
5526 vdst[0] += alpha*vsrc[0];
5532 vadd(vdst, 1, vsrc, 1, N, alpha);
5537 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5539 if( stride_dst!=1 || stride_src!=1 )
5546 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5548 vdst->x += alpha*vsrc->x;
5549 vdst->y -= alpha*vsrc->y;
5554 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5556 vdst->x += alpha*vsrc->x;
5557 vdst->y += alpha*vsrc->y;
5568 for(i=0; i<
n; i++, vdst++, vsrc++)
5570 vdst->x += alpha*vsrc->
x;
5571 vdst->y -= alpha*vsrc->
y;
5576 for(i=0; i<
n; i++, vdst++, vsrc++)
5578 vdst->x += alpha*vsrc->
x;
5579 vdst->y += alpha*vsrc->
y;
5587 vadd(vdst, 1, vsrc, 1,
"N", N, alpha);
5592 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5594 if( stride_dst!=1 || stride_src!=1 )
5599 double ax = alpha.
x, ay = alpha.
y;
5602 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5604 vdst->x += ax*vsrc->x+ay*vsrc->y;
5605 vdst->y -= ax*vsrc->y-ay*vsrc->x;
5610 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5612 vdst->x += ax*vsrc->x-ay*vsrc->y;
5613 vdst->y += ax*vsrc->y+ay*vsrc->x;
5622 double ax = alpha.
x, ay = alpha.
y;
5625 for(i=0; i<
n; i++, vdst++, vsrc++)
5627 vdst->x += ax*vsrc->
x+ay*vsrc->
y;
5628 vdst->y -= ax*vsrc->
y-ay*vsrc->
x;
5633 for(i=0; i<
n; i++, vdst++, vsrc++)
5635 vdst->x += ax*vsrc->
x-ay*vsrc->
y;
5636 vdst->y += ax*vsrc->
y+ay*vsrc->
x;
5644 vadd(vdst, 1, vsrc, 1,
"N", N, alpha);
5650 if( stride_dst!=1 || stride_src!=1 )
5655 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5664 for(i=0; i<n2; i++, vdst+=2, vsrc+=2)
5676 vsub(vdst, 1, vsrc, 1, N);
5681 bool bconj = !((conj_src[0]==
'N') || (conj_src[0]==
'n'));
5683 if( stride_dst!=1 || stride_src!=1 )
5690 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5698 for(i=0; i<
n; i++, vdst+=stride_dst, vsrc+=stride_src)
5712 for(i=0; i<
n; i++, vdst++, vsrc++)
5720 for(i=0; i<
n; i++, vdst++, vsrc++)
5731 vsub(vdst, 1, vsrc, 1,
"N", N);
5736 vadd(vdst, stride_dst, vsrc, stride_src, n, -alpha);
5741 vadd(vdst, 1, vsrc, 1, N, -alpha);
5746 vadd(vdst, stride_dst, vsrc, stride_src, conj_src, n, -alpha);
5751 vadd(vdst, 1, vsrc, 1,
"N", n, -alpha);
5756 vadd(vdst, stride_dst, vsrc, stride_src, conj_src, n, -alpha);
5761 vadd(vdst, 1, vsrc, 1,
"N", n, -alpha);
5771 for(i=0; i<
n; i++, vdst+=stride_dst)
5779 for(i=0; i<
n; i++, vdst++)
5786 vmul(vdst, 1, N, alpha);
5797 for(i=0; i<
n; i++, vdst+=stride_dst)
5808 for(i=0; i<
n; i++, vdst++)
5818 vmul(vdst, 1, N, alpha);
5829 double ax = alpha.
x, ay = alpha.
y;
5830 for(i=0; i<
n; i++, vdst+=stride_dst)
5832 double dstx = vdst->x, dsty = vdst->y;
5833 vdst->x = ax*dstx-ay*dsty;
5834 vdst->y = ax*dsty+ay*dstx;
5842 double ax = alpha.
x, ay = alpha.
y;
5843 for(i=0; i<
n; i++, vdst++)
5845 double dstx = vdst->
x, dsty = vdst->
y;
5846 vdst->
x = ax*dstx-ay*dsty;
5847 vdst->
y = ax*dsty+ay*dstx;
5854 vmul(vdst, 1, N, alpha);
5875 throw alglib::ap_error(
"ALGLIB: setlength() error, p_vec==NULL (array was not correctly initialized)");
5877 throw alglib::ap_error(
"ALGLIB: setlength() error, p_vec!=&vec (attempt to resize frozen array)");
5919 if( rhs.
p_vec!=NULL )
5931 std::vector<const char*> svec;
5937 allocate_own((
ae_int_t)(svec.size()), datatype);
5938 for(i=0; i<svec.size(); i++)
5949 p_vec->ptr.p_complex[
i].x = t.
x;
5950 p_vec->ptr.p_complex[
i].y = t.
y;
5966 if( p_vec==&vec || p_vec==NULL )
5972 if( rhs.
p_vec!=NULL )
5986 if( rhs.
p_vec==NULL )
5987 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (sizes do not match)");
5989 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (types do not match)");
5991 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (sizes do not match)");
6029 return p_vec->ptr.p_bool[
i];
6034 return p_vec->ptr.p_bool[
i];
6039 return p_vec->ptr.p_bool[
i];
6044 return p_vec->ptr.p_bool[
i];
6051 for(i=0; i<iLen; i++)
6052 p_vec->ptr.p_bool[i] = pContent[i];
6057 return p_vec->ptr.p_bool;
6062 return p_vec->ptr.p_bool;
6105 return p_vec->ptr.p_int[
i];
6110 return p_vec->ptr.p_int[
i];
6115 return p_vec->ptr.p_int[
i];
6120 return p_vec->ptr.p_int[
i];
6127 for(i=0; i<iLen; i++)
6128 p_vec->ptr.p_int[i] = pContent[i];
6133 return p_vec->ptr.p_int;
6138 return p_vec->ptr.p_int;
6181 return p_vec->ptr.p_double[
i];
6186 return p_vec->ptr.p_double[
i];
6191 return p_vec->ptr.p_double[
i];
6196 return p_vec->ptr.p_double[
i];
6203 for(i=0; i<iLen; i++)
6204 p_vec->ptr.p_double[i] = pContent[i];
6209 return p_vec->ptr.p_double;
6214 return p_vec->ptr.p_double;
6279 for(i=0; i<iLen; i++)
6281 p_vec->ptr.p_complex[
i].x = pContent[
i].
x;
6282 p_vec->ptr.p_complex[
i].y = pContent[
i].
y;
6322 if( rhs.
p_mat!=NULL )
6334 std::vector< std::vector<const char*> > smat;
6340 if( smat.size()!=0 )
6342 allocate_own((
ae_int_t)(smat.size()), (
ae_int_t)(smat[0].size()), datatype);
6343 for(i=0; i<smat.size(); i++)
6344 for(j=0; j<smat[0].size(); j++)
6355 p_mat->ptr.pp_complex[
i][
j].x = t.
x;
6356 p_mat->ptr.pp_complex[
i][
j].y = t.
y;
6361 allocate_own(0, 0, datatype);
6375 if( p_mat==&mat || p_mat==NULL )
6381 if( rhs.
p_mat!=NULL )
6396 if( rhs.
p_mat==NULL )
6397 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (sizes do not match)");
6399 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (types do not match)");
6401 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (sizes do not match)");
6403 throw alglib::ap_error(
"ALGLIB: incorrect assignment to array (sizes do not match)");
6404 for(i=0; i<p_mat->rows; i++)
6412 throw alglib::ap_error(
"ALGLIB: setlength() error, p_mat==NULL (array was not correctly initialized)");
6414 throw alglib::ap_error(
"ALGLIB: setlength() error, p_mat!=&mat (attempt to resize frozen array)");
6435 return rows()==0 || cols()==0;
6442 return p_mat->stride;
6500 return p_mat->ptr.pp_bool[
i][
j];
6505 return p_mat->ptr.pp_bool[
i][
j];
6510 return p_mat->ptr.pp_bool[
i];
6515 return p_mat->ptr.pp_bool[
i];
6521 setlength(irows, icols);
6522 for(i=0; i<irows; i++)
6523 for(j=0; j<icols; j++)
6524 p_mat->ptr.pp_bool[i][j] = pContent[i*icols+j];
6534 for(i=0; i<rows(); i++)
6571 return p_mat->ptr.pp_int[
i][
j];
6576 return p_mat->ptr.pp_int[
i][
j];
6581 return p_mat->ptr.pp_int[
i];
6586 return p_mat->ptr.pp_int[
i];
6592 setlength(irows, icols);
6593 for(i=0; i<irows; i++)
6594 for(j=0; j<icols; j++)
6595 p_mat->ptr.pp_int[i][j] = pContent[i*icols+j];
6605 for(i=0; i<rows(); i++)
6642 return p_mat->ptr.pp_double[
i][
j];
6647 return p_mat->ptr.pp_double[
i][
j];
6652 return p_mat->ptr.pp_double[
i];
6657 return p_mat->ptr.pp_double[
i];
6663 setlength(irows, icols);
6664 for(i=0; i<irows; i++)
6665 for(j=0; j<icols; j++)
6666 p_mat->ptr.pp_double[i][j] = pContent[i*icols+j];
6676 for(i=0; i<rows(); i++)
6734 setlength(irows, icols);
6735 for(i=0; i<irows; i++)
6736 for(j=0; j<icols; j++)
6738 p_mat->ptr.pp_complex[
i][
j].x = pContent[i*icols+
j].
x;
6739 p_mat->ptr.pp_complex[
i][
j].y = pContent[i*icols+
j].
y;
6750 for(i=0; i<rows(); i++)
6769 r = _alglib_env_state.
v_nan;
6801 if(s1==NULL && s2!=NULL)
6803 if(s1!=NULL && s2==NULL)
6805 if(s1==NULL && s2==NULL)
6818 return c2==0 ? 0 : -1;
6820 return c1==0 ? 0 : +1;
6839 for(i=0,r0=r; i<=
n; i++,s++)
6860 p_vec->push_back(src);
6867 if( src[1]==0 || !match_head_only)
6873 p_vec->push_back(src+1);
6888 if( strcmp(src,
"[[]]")==0 )
6899 p_mat->push_back(std::vector<const char*>());
6901 if( p_mat->back().size()==0 || p_mat->back().size()!=(*p_mat)[0].size() )
6903 src = strchr(src,
']');
6928 memset(buf, 0,
sizeof(buf));
6929 strncpy(buf, s, strlen(p));
6932 if( s[strlen(p)]==0 || strchr(delim,s[strlen(p)])==NULL )
6939 memset(buf, 0,
sizeof(buf));
6940 strncpy(buf, s, strlen(p));
6943 if( s[strlen(p)]==0 || strchr(delim,s[strlen(p)])==NULL )
6966 if( *s==
'-' || *s==
'+' )
6968 if( *s==0 || strchr(
"1234567890",*s)==NULL)
6970 while( *s!=0 && strchr(
"1234567890",*s)!=NULL )
6972 if( *s==0 || strchr(delim,*s)==NULL )
6979 if( ae_val!=long_val )
6999 if( *s==
'-' || *s==
'+' )
7001 isign = *s==
'-' ? -1 : +1;
7004 memset(buf, 0,
sizeof(buf));
7012 if( *s!=0 && strchr(
"1234567890",*s)!=NULL )
7015 while( *s!=0 && strchr(
"1234567890",*s)!=NULL )
7020 if( *s!=0 && strchr(
"1234567890",*s)!=NULL )
7023 while( *s!=0 && strchr(
"1234567890",*s)!=NULL )
7028 if( *s==
'e' || *s==
'E' )
7031 if( *s==
'-' || *s==
'+' )
7033 if( *s==0 || strchr(
"1234567890",*s)==NULL )
7035 while( *s!=0 && strchr(
"1234567890",*s)!=NULL )
7038 if( *s==0 || strchr(delim,*s)==NULL )
7045 if( *new_s-p>=(
int)
sizeof(buf) )
7047 strncpy(buf, p, (
size_t)(*new_s-p));
7050 t = strchr(buf,
'.');
7052 *t = *loc->decimal_point;
7053 *result = atof(buf);
7062 if( *s==0 || strchr(delim,*s)==NULL )
7103 if( *s==0 || strchr(delim,*s)==NULL )
7114 if( strchr(delim,*s)!=NULL )
7119 if( strchr(
"+-",*s)!=NULL )
7141 result += ptr[
i] ?
"true" :
"false";
7155 if( sprintf(buf, i==0 ?
"%ld" :
",%ld",
long(ptr[i]))>=(
int)
sizeof(buf) )
7156 throw ap_error(
"arraytostring(): buffer overflow");
7170 int dps = _dps>=0 ? _dps : -_dps;
7172 if( sprintf(mask1,
"%%.%d%s", dps, _dps>=0 ?
"f" :
"e")>=(
int)
sizeof(mask1) )
7173 throw ap_error(
"arraytostring(): buffer overflow");
7174 if( sprintf(mask2,
",%s", mask1)>=(
int)
sizeof(mask2) )
7175 throw ap_error(
"arraytostring(): buffer overflow");
7181 if( sprintf(buf, i==0 ? mask1 : mask2,
double(ptr[i]))>=(
int)
sizeof(buf) )
7182 throw ap_error(
"arraytostring(): buffer overflow");
7185 strcpy(buf, i==0 ?
"NAN" :
",NAN");
7187 strcpy(buf, i==0 ?
"+INF" :
",+INF");
7189 strcpy(buf, i==0 ?
"-INF" :
",-INF");
7218 if( x<0 )
return -1;
7225 return alglib_impl::ae_debugrng()/2147483563.0;
7229 double mx = (double)(RAND_MAX)+1.0;
7230 volatile double tmp0 = i2/mx;
7231 volatile double tmp1 = i1+tmp0;
7246 {
return int(
floor(x+0.5)); }
7249 {
return int(x>0 ?
floor(x) : ceil(x)); }
7252 {
return int(
floor(x)); }
7255 {
return int(ceil(x)); }
7258 {
return 3.14159265358979323846; }
7265 return m1>m2 ? m1 : m2;
7270 return m1>m2 ? m2 : m1;
7275 return m1>m2 ? m1 : m2;
7280 return m1>m2 ? m2 : m1;
7286 volatile double x =
v1;
7287 volatile double y = v2;
7294 return !
fp_eq(v1,v2);
7300 volatile double x =
v1;
7301 volatile double y = v2;
7308 volatile double x =
v1;
7309 volatile double y = v2;
7316 volatile double x =
v1;
7317 volatile double y = v2;
7324 volatile double x =
v1;
7325 volatile double y = v2;
7785 #define alglib_simd_alignment 16 7787 #define alglib_r_block 32 7788 #define alglib_half_r_block 16 7789 #define alglib_twice_r_block 64 7791 #define alglib_c_block 24 7792 #define alglib_half_c_block 12 7793 #define alglib_twice_c_block 48 7813 const double *pa0, *pa1, *pb;
7820 double v0 = 0,
v1 = 0;
7843 y[0] = beta*y[0]+alpha*
v0;
7844 y[stride] = beta*y[stride]+alpha*
v1;
7885 if( alpha==0.0 || n==0 )
7911 if( m==32 && n==32 )
7921 const double *pa0, *pa1, *pb;
7929 ntrail2 = (n-8*n8)/2;
7932 double v0 = 0,
v1 = 0;
7972 for(k=0; k<ntrail2; k++)
7997 y[0] = beta*y[0]+alpha*
v0;
7998 y[stride] = beta*y[stride]+alpha*
v1;
8003 y[stride] = alpha*
v1;
8033 v0 += pa0[0]*pb[0]+pa0[1]*pb[1];
8048 y[0] = beta*y[0]+alpha*
v0;
8089 #if defined(AE_HAS_SSE2_INTRINSICS) 8093 ae_int_t mb3, mtail, nhead, nb8, nb2, ntail;
8094 const double *pa0, *pa1, *pa2, *pb;
8095 __m128d
v0,
v1, v2, va0, va1, va2, vx, vtmp;
8096 double buf3[3], buf6[6];
8106 if( alpha==0.0 || n==0 )
8148 nb2 = (n-nhead-8*nb8)/2;
8149 ntail = n-nhead-8*nb8-2*nb2;
8150 for(i=0; i<mb3; i++)
8152 double row0, row1, row2;
8163 vx = _mm_load_sd(pb);
8164 v0 = _mm_load_sd(pa0);
8165 v1 = _mm_load_sd(pa1);
8166 v2 = _mm_load_sd(pa2);
8168 v0 = _mm_mul_sd(v0,vx);
8169 v1 = _mm_mul_sd(v1,vx);
8170 v2 = _mm_mul_sd(v2,vx);
8179 v0 = _mm_setzero_pd();
8180 v1 = _mm_setzero_pd();
8181 v2 = _mm_setzero_pd();
8183 for(k=0; k<nb8; k++)
8189 vx = _mm_load_pd(pb);
8190 va0 = _mm_load_pd(pa0);
8191 va1 = _mm_load_pd(pa1);
8192 va0 = _mm_mul_pd(va0,vx);
8193 va2 = _mm_load_pd(pa2);
8194 v0 = _mm_add_pd(va0,v0);
8195 va1 = _mm_mul_pd(va1,vx);
8196 va0 = _mm_load_pd(pa0+2);
8197 v1 = _mm_add_pd(va1,v1);
8198 va2 = _mm_mul_pd(va2,vx);
8199 va1 = _mm_load_pd(pa1+2);
8200 v2 = _mm_add_pd(va2,v2);
8201 vx = _mm_load_pd(pb+2);
8202 va0 = _mm_mul_pd(va0,vx);
8203 va2 = _mm_load_pd(pa2+2);
8204 v0 = _mm_add_pd(va0,v0);
8205 va1 = _mm_mul_pd(va1,vx);
8206 va0 = _mm_load_pd(pa0+4);
8207 v1 = _mm_add_pd(va1,v1);
8208 va2 = _mm_mul_pd(va2,vx);
8209 va1 = _mm_load_pd(pa1+4);
8210 v2 = _mm_add_pd(va2,v2);
8211 vx = _mm_load_pd(pb+4);
8212 va0 = _mm_mul_pd(va0,vx);
8213 va2 = _mm_load_pd(pa2+4);
8214 v0 = _mm_add_pd(va0,v0);
8215 va1 = _mm_mul_pd(va1,vx);
8216 va0 = _mm_load_pd(pa0+6);
8217 v1 = _mm_add_pd(va1,v1);
8218 va2 = _mm_mul_pd(va2,vx);
8219 va1 = _mm_load_pd(pa1+6);
8220 v2 = _mm_add_pd(va2,v2);
8221 vx = _mm_load_pd(pb+6);
8222 va0 = _mm_mul_pd(va0,vx);
8223 v0 = _mm_add_pd(va0,v0);
8224 va2 = _mm_load_pd(pa2+6);
8225 va1 = _mm_mul_pd(va1,vx);
8226 v1 = _mm_add_pd(va1,v1);
8227 va2 = _mm_mul_pd(va2,vx);
8228 v2 = _mm_add_pd(va2,v2);
8291 for(k=0; k<nb2; k++)
8293 vx = _mm_load_pd(pb);
8294 va0 = _mm_load_pd(pa0);
8295 va1 = _mm_load_pd(pa1);
8296 va2 = _mm_load_pd(pa2);
8298 va0 = _mm_mul_pd(va0,vx);
8299 v0 = _mm_add_pd(va0,v0);
8300 va1 = _mm_mul_pd(va1,vx);
8301 v1 = _mm_add_pd(va1,v1);
8302 va2 = _mm_mul_pd(va2,vx);
8303 v2 = _mm_add_pd(va2,v2);
8310 for(k=0; k<ntail; k++)
8312 vx = _mm_load1_pd(pb);
8313 va0 = _mm_load1_pd(pa0);
8314 va1 = _mm_load1_pd(pa1);
8315 va2 = _mm_load1_pd(pa2);
8317 va0 = _mm_mul_sd(va0,vx);
8318 v0 = _mm_add_sd(v0,va0);
8319 va1 = _mm_mul_sd(va1,vx);
8320 v1 = _mm_add_sd(v1,va1);
8321 va2 = _mm_mul_sd(va2,vx);
8322 v2 = _mm_add_sd(v2,va2);
8324 vtmp = _mm_add_pd(_mm_unpacklo_pd(v0,v1),_mm_unpackhi_pd(v0,v1));
8325 _mm_storel_pd(&row0, vtmp);
8326 _mm_storeh_pd(&row1, vtmp);
8327 v2 = _mm_add_sd(_mm_shuffle_pd(v2,v2,1),v2);
8328 _mm_storel_pd(&row2, v2);
8331 y[0] = beta*y[0]+alpha*row0;
8332 y[stride] = beta*y[stride]+alpha*row1;
8333 y[2*stride] = beta*y[2*stride]+alpha*row2;
8338 y[stride] = alpha*row1;
8339 y[2*stride] = alpha*row2;
8343 for(i=0; i<mtail; i++)
8352 row0 += pb[0]*pa0[0]+pb[1]*pa0[1];
8357 row0 += pb[0]*pa0[0];
8359 y[0] = beta*y[0]+alpha*row0;
8394 const double *pa, *parow, *pb;
8399 double v0 = 0,
v1 = 0;
8414 double tx = (beta.
x*cy->
x-beta.
y*cy->
y)+(alpha.
x*v0-alpha.
y*
v1);
8415 double ty = (beta.
x*cy->
y+beta.
y*cy->
x)+(alpha.
x*
v1+alpha.
y*v0);
8422 double tx = (beta.
x*dy[0]-beta.
y*dy[1])+(alpha.
x*v0-alpha.
y*
v1);
8423 double ty = (beta.
x*dy[1]+beta.
y*dy[0])+(alpha.
x*
v1+alpha.
y*v0);
8467 #if defined(AE_HAS_SSE2_INTRINSICS) 8471 const double *pa0, *pa1, *parow, *pb;
8472 __m128d vbeta, vbetax, vbetay;
8473 __m128d valpha, valphax, valphay;
8482 vbeta = _mm_loadh_pd(_mm_load_sd(&beta.
x),&beta.
y);
8483 vbetax = _mm_unpacklo_pd(vbeta,vbeta);
8484 vbetay = _mm_unpackhi_pd(vbeta,vbeta);
8485 valpha = _mm_loadh_pd(_mm_load_sd(&alpha.
x),&alpha.
y);
8486 valphax = _mm_unpacklo_pd(valpha,valpha);
8487 valphay = _mm_unpackhi_pd(valpha,valpha);
8490 double v0 = 0,
v1 = 0, v2 = 0, v3 = 0;
8492 __m128d vx, vy, vt0, vt1, vt2, vt3, vt4, vt5, vrx, vry, vtx, vty, vbeta;
8496 vx = _mm_setzero_pd();
8497 vy = _mm_setzero_pd();
8500 vt0 = _mm_load1_pd(pb);
8501 vt1 = _mm_load1_pd(pb+1);
8502 vt2 = _mm_load_pd(pa0);
8503 vt3 = _mm_load_pd(pa1);
8504 vt5 = _mm_unpacklo_pd(vt2,vt3);
8505 vt4 = _mm_unpackhi_pd(vt2,vt3);
8509 vt2 = _mm_mul_pd(vt2,vt0);
8510 vx = _mm_add_pd(vx,vt2);
8511 vt3 = _mm_mul_pd(vt3,vt1);
8512 vx = _mm_sub_pd(vx,vt3);
8513 vt4 = _mm_mul_pd(vt4,vt0);
8514 vy = _mm_add_pd(vy,vt4);
8515 vt5 = _mm_mul_pd(vt5,vt1);
8516 vy = _mm_add_pd(vy,vt5);
8522 if( beta.
x==0.0 && beta.
y==0.0 )
8524 vrx = _mm_setzero_pd();
8525 vry = _mm_setzero_pd();
8529 vtx = _mm_loadh_pd(_mm_load_sd(dy+0),dy+2*stride+0);
8530 vty = _mm_loadh_pd(_mm_load_sd(dy+1),dy+2*stride+1);
8531 vrx = _mm_sub_pd(_mm_mul_pd(vbetax,vtx),_mm_mul_pd(vbetay,vty));
8532 vry = _mm_add_pd(_mm_mul_pd(vbetax,vty),_mm_mul_pd(vbetay,vtx));
8534 vtx = _mm_sub_pd(_mm_mul_pd(valphax,vx),_mm_mul_pd(valphay,vy));
8535 vty = _mm_add_pd(_mm_mul_pd(valphax,vy),_mm_mul_pd(valphay,vx));
8536 vrx = _mm_add_pd(vrx,vtx);
8537 vry = _mm_add_pd(vry,vty);
8538 _mm_storel_pd(dy+0, vrx);
8539 _mm_storeh_pd(dy+2*stride+0, vrx);
8540 _mm_storel_pd(dy+1, vry);
8541 _mm_storeh_pd(dy+2*stride+1, vry);
8547 double v0 = 0,
v1 = 0, v2 = 0, v3 = 0;
8561 if( beta.
x==0.0 && beta.
y==0.0 )
8568 tx = beta.
x*dy[0]-beta.
y*dy[1];
8569 ty = beta.
x*dy[1]+beta.
y*dy[0];
8571 tx += alpha.
x*v0-alpha.
y*
v1;
8572 ty += alpha.
x*
v1+alpha.
y*
v0;
8589 for(i=0; i<
n; i++,p++)
8594 for(i=0; i<
n; i++,p+=stride)
8607 for(i=0; i<
n; i++,p++)
8615 for(i=0; i<
n; i++,p+=stride)
8630 if( stridea==1 && strideb==1 )
8633 for(i=n2; i!=0; i--, a+=2, b+=2)
8643 for(i=0; i<
n; i++,a+=stridea,b+=strideb)
8663 if( conj[0]==
'N' || conj[0]==
'n' )
8665 for(i=0; i<
n; i++,a+=stridea,b+=2*strideb)
8673 for(i=0; i<
n; i++,a+=stridea,b+=2*strideb)
8695 if( conj[0]==
'N' || conj[0]==
'n' )
8697 for(i=0; i<
n; i++,a+=2*stridea,b+=2*strideb)
8705 for(i=0; i<
n; i++,a+=2*stridea,b+=2*strideb)
8743 for(j=0,pdst=b; j<n2; j++,pdst+=2,psrc+=2)
8755 for(i=0,psrc=a; i<
m; i++,a+=stride,b+=1,psrc=
a)
8799 #if defined(AE_HAS_SSE2_INTRINSICS) 8803 const double *psrc0, *psrc1;
8812 for(j=0; j<nb8; j++)
8815 v0 = _mm_loadu_pd(psrc0);
8816 _mm_store_pd(pdst, v0);
8817 v1 = _mm_loadu_pd(psrc0+2);
8818 _mm_store_pd(pdst+2, v1);
8819 v1 = _mm_loadu_pd(psrc0+4);
8820 _mm_store_pd(pdst+4, v1);
8821 v1 = _mm_loadu_pd(psrc0+6);
8822 _mm_store_pd(pdst+6, v1);
8826 for(j=0; j<ntail; j++)
8832 const double *arow0, *arow1;
8833 double *bcol0, *bcol1, *pdst0, *pdst1;
8845 for(i=0; i<mb2; i++)
8851 for(j=0; j<nb4; j++)
8853 __m128d
v0,
v1, v2, v3;
8854 v0 = _mm_loadu_pd(psrc0);
8855 v1 = _mm_loadu_pd(psrc1);
8856 v2 = _mm_loadu_pd(psrc0+2);
8857 v3 = _mm_loadu_pd(psrc1+2);
8858 _mm_store_pd(pdst0, _mm_unpacklo_pd(v0,v1));
8868 for(j=0; j<ntail; j++)
8870 pdst0[0] = psrc0[0];
8871 pdst1[0] = psrc1[0];
8888 pdst0[0] = psrc0[0];
8894 pdst0[0] = psrc0[0];
8930 for(j=0,pdst=b; j<n2; j++,pdst+=2,psrc+=2)
8942 for(i=0,psrc=a; i<
m; i++,a++,b+=stride,psrc=
a)
8987 for(j=0,pdst=b; j<
n; j++,pdst+=2,psrc++)
8995 for(i=0,psrc=a; i<
m; i++,a+=stride,b+=2,psrc=
a)
9004 for(i=0,psrc=a; i<
m; i++,a+=stride,b+=2,psrc=
a)
9014 for(j=0,pdst=b; j<
n; j++,pdst+=2,psrc++)
9054 for(j=0,pdst=b; j<
n; j++,pdst++,psrc+=2)
9062 for(i=0,psrc=a; i<
m; i++,a+=2,b+=stride,psrc=
a)
9071 for(i=0,psrc=a; i<
m; i++,a+=2,b+=stride,psrc=
a)
9081 for(j=0,pdst=b; j<
n; j++,pdst++,psrc+=2)
9122 #ifdef AE_HAS_SSE2_INTRINSICS 9125 rmv = &_ialglib_rmv_sse2;
9126 mcopyblock = &_ialglib_mcopyblock_sse2;
9134 mcopyblock(k, n, _b, 1, _b_stride, b);
9136 mcopyblock(n, k, _b, 0, _b_stride, b);
9145 const double *arow = _a;
9151 rmv(n, k, b, abuf, crow, 1, alpha, beta);
9158 const double *acol = _a;
9164 rmv(n, k, b, abuf, crow, 1, alpha, beta);
9207 #ifdef AE_HAS_SSE2_INTRINSICS 9210 cmv = &_ialglib_cmv_sse2;
9217 brows = optypeb==0 ?
k :
n;
9218 bcols = optypeb==0 ?
n :
k;
9239 else if( optypea==1 )
9249 if( beta.
x==0 && beta.
y==0 )
9251 cmv(n, k, b, abuf, crow, NULL, 1, alpha, beta);
9291 #ifdef AE_HAS_SSE2_INTRINSICS 9294 cmv = &_ialglib_cmv_sse2;
9330 cmv(m, i, xbuf, tmpbuf, NULL, xbuf+2*i,
alglib_c_block, alpha, beta);
9347 cmv(m, n-1-i, xbuf+2*(i+1), tmpbuf, NULL, xbuf+2*i,
alglib_c_block, alpha, beta);
9389 #ifdef AE_HAS_SSE2_INTRINSICS 9392 rmv = &_ialglib_rmv_sse2;
9393 mcopyblock = &_ialglib_mcopyblock_sse2;
9400 mcopyblock(n, n, _a, optype, _a_stride, abuf);
9401 mcopyblock(m, n, _x, 0, _x_stride, xbuf);
9417 double beta = 1.0/(*pdiag);
9418 double alpha = -
beta;
9428 double beta = 1.0/(*pdiag);
9429 double alpha = -
beta;
9431 rmv(m, n-1-i, xbuf+i+1, tmpbuf+i+1, xbuf+i,
alglib_r_block, alpha, beta);
9455 double *pdiag, *arow;
9472 #ifdef AE_HAS_SSE2_INTRINSICS 9475 cmv = &_ialglib_cmv_sse2;
9512 cmv(n, m-1-i, xbuf+2*(i+1), tmpbuf, NULL, xbuf+2*i,
alglib_c_block, alpha, beta);
9528 cmv(n, i, xbuf, tmpbuf, NULL, xbuf+2*i,
alglib_c_block, alpha, beta);
9552 double *pdiag, *arow;
9570 #ifdef AE_HAS_SSE2_INTRINSICS 9573 rmv = &_ialglib_rmv_sse2;
9574 mcopyblock = &_ialglib_mcopyblock_sse2;
9582 mcopyblock(m, m, _a, optype, _a_stride, abuf);
9583 mcopyblock(m, n, _x, 1, _x_stride, xbuf);
9599 double beta = 1.0/(*pdiag);
9600 double alpha = -
beta;
9602 rmv(n, m-1-i, xbuf+i+1, tmpbuf+i+1, xbuf+i,
alglib_r_block, alpha, beta);
9609 double beta = 1.0/(*pdiag);
9610 double alpha = -
beta;
9637 double *arow, *crow;
9690 _ialglib_cmv(n-i, k, arow, tmpbuf, NULL, crow+2*i, 1, c_alpha, c_beta);
9698 _ialglib_cmv(i+1, k, abuf, tmpbuf, NULL, crow, 1, c_alpha, c_beta);
9728 double *arow, *crow;
9773 _ialglib_rmv(n-i, k, arow, arow, crow+i, 1, alpha, beta);
9780 _ialglib_rmv(i+1, k, abuf, arow, crow, 1, alpha, beta);
9813 for(i=0; i<
m; i++, arow+=_a_stride, pu++)
9818 for(j=0,pv=vtmp, dst=arow; j<n2; j++, dst+=2, pv+=2)
9820 double ux = pu[0].
x;
9821 double uy = pu[0].
y;
9822 double v0x = pv[0].
x;
9823 double v0y = pv[0].
y;
9824 double v1x = pv[1].
x;
9825 double v1y = pv[1].
y;
9826 dst[0].x += ux*v0x-uy*v0y;
9827 dst[0].y += ux*v0y+uy*v0x;
9828 dst[1].x += ux*v1x-uy*v1y;
9829 dst[1].y += ux*v1y+uy*v1x;
9837 double ux = pu[0].
x;
9838 double uy = pu[0].
y;
9839 double vx = pv[0].
x;
9840 double vy = pv[0].
y;
9841 dst[0].x += ux*vx-uy*vy;
9842 dst[0].y += ux*vy+uy*vx;
9859 double *arow0, *arow1, *pu, *pv, *vtmp, *dst0, *dst1;
9870 arow1 = arow0+stride;
9873 for(i=0; i<m2; i++,arow0+=stride2,arow1+=stride2,pu+=2)
9878 for(j=0,pv=vtmp, dst0=arow0, dst1=arow1; j<n2; j++, dst0+=2, dst1+=2, pv+=2)
9880 dst0[0] += pu[0]*pv[0];
9881 dst0[1] += pu[0]*pv[1];
9882 dst1[0] += pu[1]*pv[0];
9883 dst1[1] += pu[1]*pv[1];
9891 dst0[0] += pu[0]*pv[0];
9892 dst1[0] += pu[1]*pv[0];
9904 for(j=0,pv=vtmp, dst0=arow0; j<n2; j++, dst0+=2, pv+=2)
9906 dst0[0] += pu[0]*pv[0];
9907 dst0[1] += pu[0]*pv[1];
9914 dst0[0] += pu[0]*pv[0];
9940 return _ialglib_rmatrixgemm(m, n, k, alpha, _a->
ptr.
pp_double[ia]+ja, _a->
stride, optypea, _b->
ptr.
pp_double[ib]+jb, _b->
stride, optypeb, beta, _c->
ptr.
pp_double[ic]+jc, _c->
stride);
9960 return _ialglib_cmatrixgemm(m, n, k, alpha, _a->
ptr.
pp_complex[ia]+ja, _a->
stride, optypea, _b->
ptr.
pp_complex[ib]+jb, _b->
stride, optypeb, beta, _c->
ptr.
pp_complex[ic]+jc, _c->
stride);
10110 col0 += src_stride;
10120 stride2 = src_stride*2;
10121 for(j=0; j<n2; j++)
10125 dst[2] = col0[src_stride];
10126 dst[3] = col1[src_stride];
10158 #if defined(AE_HAS_SSE2_INTRINSICS) 10159 void _ialglib_pack_n2_sse2(
10177 col0 += src_stride;
10186 if( src_stride==1 )
10190 for(j=0; j<n2; j++)
10192 v0 = _mm_loadu_pd(col0);
10194 v1 = _mm_loadu_pd(col1);
10196 _mm_store_pd(dst, _mm_unpacklo_pd(v0,v1));
10197 _mm_store_pd(dst+2,_mm_unpackhi_pd(v0,v1));
10215 stride2 = 2*src_stride;
10216 for(j=0; j<n2; j++)
10218 v0 = _mm_loadu_pd(col0);
10219 v1 = _mm_loadu_pd(col0+src_stride);
10220 _mm_store_pd(dst, v0);
10221 _mm_store_pd(dst+2,v1);
10237 stride2 = src_stride*2;
10238 for(j=0; j<n2; j++)
10242 dst[2] = col0[src_stride];
10243 dst[3] = col1[src_stride];
10278 double v00, v01, v10, v11;
10293 if( store_mode==0 )
10299 r[stride+0] = alpha*v10;
10300 r[stride+1] = alpha*v11;
10304 r[0] = beta*r[0] + alpha*v00;
10305 r[1] = beta*r[1] + alpha*v01;
10306 r[stride+0] = beta*r[stride+0] + alpha*v10;
10307 r[stride+1] = beta*r[stride+1] + alpha*v11;
10311 if( store_mode==1 )
10320 r[0] = beta*r[0] + alpha*v00;
10321 r[1] = beta*r[1] + alpha*v01;
10325 if( store_mode==2 )
10330 r[stride+0] = alpha*v10;
10334 r[0] = beta*r[0] + alpha*v00;
10335 r[stride+0] = beta*r[stride+0] + alpha*v10;
10339 if( store_mode==3 )
10347 r[0] = beta*r[0] + alpha*v00;
10385 #if defined(AE_HAS_SSE2_INTRINSICS) 10386 void _ialglib_mm22_sse2(
double alpha,
const double *a,
const double *b,
ae_int_t k,
double beta,
double *r,
ae_int_t stride,
ae_int_t store_mode)
10397 __m128d va, vb, vd, ve, vt, vt0, vt1, r0,
r1, valpha, vbeta;
10404 vd = _mm_setzero_pd();
10405 ve = _mm_setzero_pd();
10406 for(t=0; t<k2; t++)
10408 vb = _mm_load_pd(b);
10409 va = _mm_load_pd(a);
10411 vb = _mm_mul_pd(va,vb);
10412 vt = _mm_shuffle_pd(vt, vt, 1);
10413 vd = _mm_add_pd(vb,vd);
10414 vt = _mm_mul_pd(va,vt);
10415 vb = _mm_load_pd(b+2);
10416 ve = _mm_add_pd(vt,ve);
10417 va = _mm_load_pd(a+2);
10419 vb = _mm_mul_pd(va,vb);
10420 vt = _mm_shuffle_pd(vt, vt, 1);
10421 vd = _mm_add_pd(vb,vd);
10422 vt = _mm_mul_pd(va,vt);
10423 ve = _mm_add_pd(vt,ve);
10429 va = _mm_load_pd(a);
10430 vb = _mm_load_pd(b);
10431 vt = _mm_shuffle_pd(vb, vb, 1);
10432 vd = _mm_add_pd(_mm_mul_pd(va,vb),vd);
10433 ve = _mm_add_pd(_mm_mul_pd(va,vt),ve);
10439 valpha = _mm_load1_pd(&alpha);
10440 r0 = _mm_mul_pd(_mm_unpacklo_pd(vd,ve),valpha);
10441 r1 = _mm_mul_pd(_mm_unpackhi_pd(ve,vd),valpha);
10446 if( store_mode==0 )
10450 _mm_storeu_pd(r,r0);
10451 _mm_storeu_pd(r+stride,r1);
10455 vbeta = _mm_load1_pd(&beta);
10456 _mm_storeu_pd(r,_mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r),vbeta),r0));
10457 _mm_storeu_pd(r+stride,_mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r+stride),vbeta),r1));
10461 if( store_mode==1 )
10464 _mm_storeu_pd(r,r0);
10466 _mm_storeu_pd(r,_mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r),_mm_load1_pd(&beta)),r0));
10469 if( store_mode==2 )
10472 _mm_storeu_pd(buf,r0);
10473 _mm_storeu_pd(buf+2,r1);
10477 r[stride+0] = buf[2];
10481 r[0] = beta*r[0] + buf[0];
10482 r[stride+0] = beta*r[stride+0] + buf[2];
10486 if( store_mode==3 )
10489 _mm_storeu_pd(buf,r0);
10493 r[0] = beta*r[0] + buf[0];
10556 #if defined(AE_HAS_SSE2_INTRINSICS) 10557 void _ialglib_mm22x2_sse2(
double alpha,
const double *a,
const double *b0,
const double *b1,
ae_int_t k,
double beta,
double *r,
ae_int_t stride)
10573 __m128d
v0,
v1, v2, v3, va0, va1, vb0, vb1;
10574 __m128d r00, r01, r10, r11, valpha, vbeta;
10578 v0 = _mm_setzero_pd();
10579 v1 = _mm_setzero_pd();
10580 v2 = _mm_setzero_pd();
10581 v3 = _mm_setzero_pd();
10584 va0 = _mm_load_pd(a);
10585 vb0 = _mm_load_pd(b0);
10586 va1 = _mm_load_pd(a);
10588 vb0 = _mm_mul_pd(va0,vb0);
10589 vb1 = _mm_load_pd(b0);
10590 v0 = _mm_add_pd(v0,vb0);
10591 vb1 = _mm_mul_pd(va1,vb1);
10592 vb0 = _mm_load_pd(b1);
10593 v1 = _mm_add_pd(v1,vb1);
10595 vb0 = _mm_mul_pd(va0,vb0);
10596 vb1 = _mm_load_pd(b1);
10597 v2 = _mm_add_pd(v2,vb0);
10598 vb1 = _mm_mul_pd(va1,vb1);
10599 v3 = _mm_add_pd(v3,vb1);
10619 valpha = _mm_load1_pd(&alpha);
10620 v1 = _mm_shuffle_pd(v1, v1, 1);
10621 v3 = _mm_shuffle_pd(v3, v3, 1);
10622 r00 = _mm_mul_pd(_mm_unpacklo_pd(v0,v1),valpha);
10623 r10 = _mm_mul_pd(_mm_unpackhi_pd(v1,v0),valpha);
10624 r01 = _mm_mul_pd(_mm_unpacklo_pd(v2,v3),valpha);
10625 r11 = _mm_mul_pd(_mm_unpackhi_pd(v3,v2),valpha);
10632 _mm_storeu_pd(r,r00);
10633 _mm_storeu_pd(r+2,r01);
10634 _mm_storeu_pd(r+stride,r10);
10635 _mm_storeu_pd(r+stride+2,r11);
10639 vbeta = _mm_load1_pd(&beta);
10640 _mm_storeu_pd(r, _mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r),vbeta),r00));
10641 _mm_storeu_pd(r+2, _mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r+2),vbeta),r01));
10642 _mm_storeu_pd(r+stride, _mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r+stride),vbeta),r10));
10643 _mm_storeu_pd(r+stride+2, _mm_add_pd(_mm_mul_pd(_mm_loadu_pd(r+stride+2),vbeta),r11));
virtual ~complex_2d_array()
void ae_shared_pool_reset(ae_shared_pool *pool, ae_state *state)
ae_bool _ialglib_i_cmatrixrighttrsmf(ae_int_t m, ae_int_t n, ae_matrix *a, ae_int_t i1, ae_int_t j1, ae_bool isupper, ae_bool isunit, ae_int_t optype, ae_matrix *x, ae_int_t i2, ae_int_t j2)
const boolean_1d_array & operator=(const boolean_1d_array &rhs)
void ae_vector_init_from_x(ae_vector *dst, x_vector *src, ae_state *state, ae_bool make_automatic)
const alglib::complex operator-(const alglib::complex &lhs)
void ae_v_cmove(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n)
void _ialglib_vcopy_dcomplex(ae_int_t n, const double *a, ae_int_t stridea, double *b, ae_int_t strideb, const char *conj)
void *volatile next_entry
virtual ~boolean_2d_array()
ae_bool ae_fp_greater_eq(double v1, double v2)
void setcontent(ae_int_t irows, ae_int_t icols, const bool *pContent)
const alglib::complex & operator()(ae_int_t i, ae_int_t j) const
bool fp_isneginf(double x)
void setnworkers(alglib::ae_int_t nworkers)
void ae_serializer_init(ae_serializer *serializer)
void create(const ae_matrix_wrapper &rhs)
const bool operator==(const alglib::complex &lhs, const alglib::complex &rhs)
double ae_c_abs(ae_complex z, ae_state *state)
void ae_v_moved(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n, double alpha)
bool fp_less(double v1, double v2)
void ae_x_set_matrix(x_matrix *dst, ae_matrix *src, ae_state *state)
const double & operator()(ae_int_t i, ae_int_t j) const
const ae_int_t & operator()(ae_int_t i) const
alglib::complex conj(const alglib::complex &z)
double ae_sin(double x, ae_state *state)
bool _parse_real_delim(const char *s, const char *delim, double *result, const char **new_s)
ae_bool ae_shared_pool_init(void *_dst, ae_state *state, ae_bool make_automatic)
double minreal(double m1, double m2)
void ae_serializer_serialize_bool(ae_serializer *serializer, ae_bool v, ae_state *state)
ae_int_t ae_serializer_get_alloc_size(ae_serializer *serializer)
__host__ __device__ float2 floor(const float2 v)
void setcontent(ae_int_t iLen, const bool *pContent)
const alglib::complex & operator[](ae_int_t i) const
ae_bool _ialglib_rmatrixlefttrsm(ae_int_t m, ae_int_t n, double *_a, ae_int_t _a_stride, ae_bool isupper, ae_bool isunit, ae_int_t optype, double *_x, ae_int_t _x_stride)
ae_bool ae_is_symmetric(ae_matrix *a)
bool fp_greater(double v1, double v2)
void ae_shared_pool_first_recycled(ae_shared_pool *pool, ae_smart_ptr *pptr, ae_state *state)
void ae_v_muld(double *vdst, ae_int_t stride_dst, ae_int_t n, double alpha)
ae_int_t ae_misalignment(const void *ptr, size_t alignment)
void _ialglib_vzero_complex(ae_int_t n, ae_complex *p, ae_int_t stride)
ae_bool ae_c_neq(ae_complex lhs, ae_complex rhs)
#define AE_SER_ENTRIES_PER_ROW
void ae_shared_pool_retrieve(ae_shared_pool *pool, ae_smart_ptr *pptr, ae_state *state)
double ae_fabs(double x, ae_state *state)
#define AE_SER_ENTRY_LENGTH
void ae_shared_pool_clear(void *_dst)
double ae_tan(double x, ae_state *state)
ae_int_t getstride() const
ae_int_t ae_str2int(const char *buf, ae_state *state, const char **pasttheend)
bool fp_eq(double v1, double v2)
complex & operator+=(const double &v)
double ae_pow(double x, double y, ae_state *state)
void ae_int2str(ae_int_t v, char *buf, ae_state *state)
void * ae_malloc(size_t size, ae_state *state)
std::string tostring(int dps) const
void ae_db_free(ae_dyn_block *block)
double beta(const double a, const double b)
#define alglib_simd_alignment
void _ialglib_mcopyblock(ae_int_t m, ae_int_t n, const double *a, ae_int_t op, ae_int_t stride, double *b)
ae_bool parse_bool_delim(const char *s, const char *delim)
void sqrt(Image< double > &op)
bool fp_less_eq(double v1, double v2)
union alglib_impl::ae_matrix::@12 ptr
void _ialglib_mcopyblock_complex(ae_int_t m, ae_int_t n, const ae_complex *a, ae_int_t op, ae_int_t stride, double *b)
ae_bool ae_isposinf(double x, ae_state *state)
void ae_frame_make(ae_state *state, ae_frame *tmp)
#define AE_LOCK_ALIGNMENT
const bool operator!=(const alglib::complex &lhs, const alglib::complex &rhs)
ae_complex ae_c_d_sub(double lhs, ae_complex rhs)
complex & operator-=(const double &v)
const ae_int_t endianness
ae_shared_pool_entry *volatile recycled_objects
void x_vector_clear(x_vector *dst)
int maxint(int m1, int m2)
alglib_impl::ae_matrix * p_mat
const alglib::complex operator/(const alglib::complex &lhs, const alglib::complex &rhs)
ae_error_type volatile last_error
ae_bool x_force_symmetric(x_matrix *a)
std::string tostring(int dps) const
void _ialglib_cmv(ae_int_t m, ae_int_t n, const double *a, const double *x, ae_complex *cy, double *dy, ae_int_t stride, ae_complex alpha, ae_complex beta)
static void make_assertion(bool bClause)
ae_bool ae_c_eq_d(ae_complex lhs, double rhs)
ae_complex ae_c_conj(ae_complex lhs, ae_state *state)
void setcontent(ae_int_t iLen, const ae_int_t *pContent)
void setcontent(ae_int_t iLen, const alglib::complex *pContent)
ae_bool ae_db_realloc(ae_dyn_block *block, ae_int_t size, ae_state *state)
const ae_matrix_wrapper & operator=(const ae_matrix_wrapper &rhs)
void(* deallocator)(void *)
ae_complex ae_complex_from_d(double v)
ae_int_t ae_sign(double x, ae_state *state)
void ae_double2str(double v, char *buf, ae_state *state)
std::string tostring() const
void vmul(double *vdst, ae_int_t stride_dst, ae_int_t n, double alpha)
void ae_db_swap(ae_dyn_block *block1, ae_dyn_block *block2)
ae_bool ae_force_hermitian(ae_matrix *a)
alglib::complex parse_complex_delim(const char *s, const char *delim)
void ae_swap_vectors(ae_vector *vec1, ae_vector *vec2)
ae_bool _ialglib_cmatrixgemm(ae_int_t m, ae_int_t n, ae_int_t k, ae_complex alpha, ae_complex *_a, ae_int_t _a_stride, ae_int_t optypea, ae_complex *_b, ae_int_t _b_stride, ae_int_t optypeb, ae_complex beta, ae_complex *_c, ae_int_t _c_stride)
ae_bool ae_isnan_stateless(double x, ae_int_t endianness)
ae_bool ae_isneginf_stateless(double x, ae_int_t endianness)
ae_bool _ialglib_i_rmatrixgemmf(ae_int_t m, ae_int_t n, ae_int_t k, double alpha, ae_matrix *_a, ae_int_t ia, ae_int_t ja, ae_int_t optypea, ae_matrix *_b, ae_int_t ib, ae_int_t jb, ae_int_t optypeb, double beta, ae_matrix *_c, ae_int_t ic, ae_int_t jc)
void ae_v_csubd(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n, double alpha)
void ae_shared_pool_recycle(ae_shared_pool *pool, ae_smart_ptr *pptr, ae_state *state)
ae_complex ae_c_div_d(ae_complex lhs, double rhs)
int minint(int m1, int m2)
void ae_serializer_stop(ae_serializer *serializer)
double parse_real_delim(const char *s, const char *delim)
#define alglib_twice_c_block
ae_bool ae_c_neq_d(ae_complex lhs, double rhs)
void ae_matrix_update_row_pointers(ae_matrix *dst, void *storage)
ae_bool _ialglib_rmatrixgemm(ae_int_t m, ae_int_t n, ae_int_t k, double alpha, double *_a, ae_int_t _a_stride, ae_int_t optypea, double *_b, ae_int_t _b_stride, ae_int_t optypeb, double beta, double *_c, ae_int_t _c_stride)
void ae_state_clear(ae_state *state)
char ae_sixbits2char(ae_int_t v)
ae_bool ae_isposinf_stateless(double x, ae_int_t endianness)
const alglib_impl::ae_matrix * c_ptr() const
ae_bool ae_fp_eq(double v1, double v2)
void ae_smart_ptr_assign(ae_smart_ptr *dst, void *new_ptr, ae_bool is_owner, ae_bool is_dynamic, void(*destroy)(void *))
void ae_v_cmulc(ae_complex *vdst, ae_int_t stride_dst, ae_int_t n, ae_complex alpha)
void vsub(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
void allocate_own(ae_int_t rows, ae_int_t cols, alglib_impl::ae_datatype datatype)
const double * operator[](ae_int_t i) const
ae_bool ae_db_malloc(ae_dyn_block *block, ae_int_t size, ae_state *state, ae_bool make_automatic)
complex & operator=(const double &v)
double ae_cos(double x, ae_state *state)
ae_bool ae_isneginf(double x, ae_state *state)
ae_bool ae_matrix_init_copy(ae_matrix *dst, ae_matrix *src, ae_state *state, ae_bool make_automatic)
ae_bool ae_matrix_init(ae_matrix *dst, ae_int_t rows, ae_int_t cols, ae_datatype datatype, ae_state *state, ae_bool make_automatic)
void _ialglib_pack_n2(double *col0, double *col1, ae_int_t n, ae_int_t src_stride, double *dst)
void attach_to(alglib_impl::ae_vector *ptr)
void * ae_align(void *ptr, size_t alignment)
void ae_matrix_destroy(ae_matrix *dst)
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
void * aligned_malloc(size_t size, size_t alignment)
void ae_v_add(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
ae_bool _ialglib_rmatrixrank1(ae_int_t m, ae_int_t n, double *_a, ae_int_t _a_stride, double *_u, double *_v)
ae_complex ae_c_sub_d(ae_complex lhs, double rhs)
ae_bool x_is_hermitian(x_matrix *a)
ae_int_t ae_char2sixbits(char c)
void ae_serializer_clear(ae_serializer *serializer)
void ae_db_attach(ae_dyn_block *block, ae_state *state)
ae_bool _ialglib_cmatrixsyrk(ae_int_t n, ae_int_t k, double alpha, ae_complex *_a, ae_int_t _a_stride, ae_int_t optypea, double beta, ae_complex *_c, ae_int_t _c_stride, ae_bool isupper)
const integer_1d_array & operator=(const integer_1d_array &rhs)
alglib::complex * getcontent()
void ae_serializer_sstart_str(ae_serializer *serializer, char *buf)
void ae_smart_ptr_release(ae_smart_ptr *dst)
alglib::complex csqr(const alglib::complex &z)
double ae_asin(double x, ae_state *state)
void setcontent(ae_int_t irows, ae_int_t icols, const alglib::complex *pContent)
void ae_serializer_serialize_int(ae_serializer *serializer, ae_int_t v, ae_state *state)
#define AE_SM_TO_CPPSTRING
#define alglib_twice_r_block
ae_int_t ae_randominteger(ae_int_t maxv, ae_state *state)
void _rcommstate_destroy(rcommstate *p)
virtual ~integer_2d_array()
alglib_impl::ae_vector * p_vec
void(* thread_exception_handler)(void *)
bool fp_isfinite(double x)
void(* destroy)(void *ptr)
ae_int_t ae_v_len(ae_int_t a, ae_int_t b)
void ae_vector_destroy(ae_vector *dst)
ae_bool _rcommstate_init(rcommstate *p, ae_state *_state, ae_bool make_automatic)
void setlength(ae_int_t iLen)
virtual ~integer_1d_array()
struct ae_dyn_block *volatile p_next
virtual ~ae_vector_wrapper()
ae_int_t my_stricmp(const char *s1, const char *s2)
void ae_shared_pool_set_seed(ae_shared_pool *dst, void *seed_object, ae_int_t size_of_object, ae_bool(*init)(void *dst, ae_state *state, ae_bool make_automatic), ae_bool(*init_copy)(void *dst, void *src, ae_state *state, ae_bool make_automatic), void(*destroy)(void *ptr), ae_state *state)
void log(Image< double > &op)
const complex_1d_array & operator=(const complex_1d_array &rhs)
ae_complex ae_c_sqr(ae_complex lhs, ae_state *state)
void ae_v_csub(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n)
void ae_free_lock(ae_lock *lock)
ae_bool(* init)(void *dst, ae_state *state, ae_bool make_automatic)
void vmove(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
ae_bool _rcommstate_init_copy(rcommstate *dst, rcommstate *src, ae_state *_state, ae_bool make_automatic)
void ae_v_move(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
void ae_swap_matrices(ae_matrix *mat1, ae_matrix *mat2)
void setcontent(ae_int_t irows, ae_int_t icols, const ae_int_t *pContent)
ae_complex ae_c_div(ae_complex lhs, ae_complex rhs)
void str_vector_create(const char *src, bool match_head_only, std::vector< const char *> *p_vec)
ae_bool _ialglib_i_cmatrixgemmf(ae_int_t m, ae_int_t n, ae_int_t k, ae_complex alpha, ae_matrix *_a, ae_int_t ia, ae_int_t ja, ae_int_t optypea, ae_matrix *_b, ae_int_t ib, ae_int_t jb, ae_int_t optypeb, ae_complex beta, ae_matrix *_c, ae_int_t ic, ae_int_t jc)
ae_bool ae_isinf(double x, ae_state *state)
ae_complex ae_c_add(ae_complex lhs, ae_complex rhs)
void ae_vector_clear(ae_vector *dst)
void(* ae_deallocator)(void *)
void ae_v_csubc(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n, ae_complex alpha)
ae_bool ae_force_symmetric(ae_matrix *a)
ae_bool ae_isinf_stateless(double x, ae_int_t endianness)
ae_bool ae_fp_less(double v1, double v2)
void _ialglib_mv_32(const double *a, const double *x, double *y, ae_int_t stride, double alpha, double beta)
const ae_bool * operator[](ae_int_t i) const
std::string tostring() const
ae_bool ae_shared_pool_is_initialized(void *_dst)
void ae_break(ae_state *state, ae_error_type error_type, const char *msg)
void ae_spin_wait(ae_int_t cnt)
ae_int_t ae_iceil(double x, ae_state *state)
std::string arraytostring(const alglib::complex *ptr, ae_int_t n, int dps)
void ae_serializer_unserialize_int(ae_serializer *serializer, ae_int_t *v, ae_state *state)
double ae_randomreal(ae_state *state)
std::string tostring() const
ae_int_t ae_sizeof(ae_datatype datatype)
ae_bool ae_smart_ptr_init(ae_smart_ptr *dst, void **subscriber, ae_state *state, ae_bool make_automatic)
std::string tostring(int dps) const
const double machineepsilon
ae_complex ae_c_add_d(ae_complex lhs, double rhs)
void ae_v_caddc(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n, ae_complex alpha)
void ae_release_lock(ae_lock *lock)
ae_bool ae_shared_pool_init_copy(void *_dst, void *_src, ae_state *state, ae_bool make_automatic)
void ae_threebytes2foursixbits(const unsigned char *src, ae_int_t *dst)
ae_complex ae_c_sub(ae_complex lhs, ae_complex rhs)
ae_bool ae_fp_neq(double v1, double v2)
ae_bool ae_isnan(double x, ae_state *state)
void ae_v_cmoved(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n, double alpha)
void vmoveneg(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
const alglib::complex * operator[](ae_int_t i) const
ae_bool x_force_hermitian(x_matrix *a)
const double & operator()(ae_int_t i) const
void ae_shared_pool_next_recycled(ae_shared_pool *pool, ae_smart_ptr *pptr, ae_state *state)
__host__ __device__ float length(float2 v)
void ae_v_cadd(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n)
std::string tostring() const
const double minrealnumber
void ae_touch_ptr(void *p)
void ae_acquire_lock(ae_lock *lock)
virtual ~ae_matrix_wrapper()
double ae_maxreal(double m1, double m2, ae_state *state)
ae_complex ae_v_cdotproduct(const ae_complex *v0, ae_int_t stride0, const char *conj0, const ae_complex *v1, ae_int_t stride1, const char *conj1, ae_int_t n)
void _ialglib_rmv(ae_int_t m, ae_int_t n, const double *a, const double *x, double *y, ae_int_t stride, double alpha, double beta)
void ae_x_attach_to_vector(x_vector *dst, ae_vector *src)
virtual ~complex_1d_array()
void ae_bool2str(ae_bool v, char *buf, ae_state *state)
ae_bool ae_vector_set_length(ae_vector *dst, ae_int_t newsize, ae_state *state)
alglib_impl::ae_complex * c_ptr()
void ae_v_sub(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
complex & operator/=(const double &v)
bool fp_neq(double v1, double v2)
const ae_bool & operator()(ae_int_t i) const
void _ialglib_vcopy_complex(ae_int_t n, const ae_complex *a, ae_int_t stridea, double *b, ae_int_t strideb, const char *conj)
ae_bool _ialglib_cmatrixrighttrsm(ae_int_t m, ae_int_t n, ae_complex *_a, ae_int_t _a_stride, ae_bool isupper, ae_bool isunit, ae_int_t optype, ae_complex *_x, ae_int_t _x_stride)
ae_bool _ialglib_i_cmatrixlefttrsmf(ae_int_t m, ae_int_t n, ae_matrix *a, ae_int_t i1, ae_int_t j1, ae_bool isupper, ae_bool isunit, ae_int_t optype, ae_matrix *x, ae_int_t i2, ae_int_t j2)
void _ialglib_mcopyunblock(ae_int_t m, ae_int_t n, const double *a, ae_int_t op, double *b, ae_int_t stride)
double ae_log(double x, ae_state *state)
void ae_serializer_serialize_double(ae_serializer *serializer, double v, ae_state *state)
void _ialglib_vzero(ae_int_t n, double *p, ae_int_t stride)
const ae_bool & operator[](ae_int_t i) const
std::string arraytostring(const bool *ptr, ae_int_t n)
const alglib_impl::ae_vector * c_ptr() const
ae_bool _ialglib_cmatrixrank1(ae_int_t m, ae_int_t n, ae_complex *_a, ae_int_t _a_stride, ae_complex *_u, ae_complex *_v)
void ae_smart_ptr_clear(void *_dst)
double ae_minreal(double m1, double m2, ae_state *state)
ae_bool _ialglib_i_rmatrixrank1f(ae_int_t m, ae_int_t n, ae_matrix *a, ae_int_t ia, ae_int_t ja, ae_vector *u, ae_int_t uoffs, ae_vector *v, ae_int_t voffs)
ae_complex ae_c_d_div(double lhs, ae_complex rhs)
void attach_to(alglib_impl::ae_matrix *ptr)
ae_bool ae_c_eq(ae_complex lhs, ae_complex rhs)
double ae_str2double(const char *buf, ae_state *state, const char **pasttheend)
bool fp_greater_eq(double v1, double v2)
const ae_int_t * operator[](ae_int_t i) const
ae_bool _ialglib_rmatrixrighttrsm(ae_int_t m, ae_int_t n, double *_a, ae_int_t _a_stride, ae_bool isupper, ae_bool isunit, ae_int_t optype, double *_x, ae_int_t _x_stride)
ae_bool _ialglib_i_rmatrixlefttrsmf(ae_int_t m, ae_int_t n, ae_matrix *a, ae_int_t i1, ae_int_t j1, ae_bool isupper, ae_bool isunit, ae_int_t optype, ae_matrix *x, ae_int_t i2, ae_int_t j2)
void _ialglib_vcopy(ae_int_t n, const double *a, ae_int_t stridea, double *b, ae_int_t strideb)
double ae_acos(double x, ae_state *state)
void ae_serializer_ustart_str(ae_serializer *serializer, const char *buf)
double ae_sinh(double x, ae_state *state)
ae_bool _ialglib_i_rmatrixsyrkf(ae_int_t n, ae_int_t k, double alpha, ae_matrix *a, ae_int_t ia, ae_int_t ja, ae_int_t optypea, double beta, ae_matrix *c, ae_int_t ic, ae_int_t jc, ae_bool isupper)
ae_int_t ae_ifloor(double x, ae_state *state)
ae_int_t ae_iabs(ae_int_t x, ae_state *state)
virtual ~boolean_1d_array()
ae_shared_pool_entry *volatile recycled_entries
double abscomplex(const alglib::complex &z)
const alglib::complex operator+(const alglib::complex &lhs)
void ae_state_init(ae_state *state)
void ae_shared_pool_destroy(void *_dst)
void ae_matrix_init_from_x(ae_matrix *dst, x_matrix *src, ae_state *state, ae_bool make_automatic)
#define AE_SM_FROM_STRING
#define AE_CRITICAL_ASSERT(x)
ae_bool _ialglib_cmatrixlefttrsm(ae_int_t m, ae_int_t n, ae_complex *_a, ae_int_t _a_stride, ae_bool isupper, ae_bool isunit, ae_int_t optype, ae_complex *_x, ae_int_t _x_stride)
double ae_sqrt(double x, ae_state *state)
void ae_assert(ae_bool cond, const char *msg, ae_state *state)
union alglib_impl::ae_vector::@11 ptr
signed long long ae_int64_t
const ae_int_t & operator()(ae_int_t i, ae_int_t j) const
ae_bool _ialglib_i_cmatrixrank1f(ae_int_t m, ae_int_t n, ae_matrix *a, ae_int_t ia, ae_int_t ja, ae_vector *u, ae_int_t uoffs, ae_vector *v, ae_int_t voffs)
const ae_int_t & operator[](ae_int_t i) const
void ae_v_moveneg(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
void ae_v_cmoveneg(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n)
ae_bool ae_isfinite_stateless(double x, ae_int_t endianness)
const double & operator[](ae_int_t i) const
void ae_serializer_alloc_start(ae_serializer *serializer)
const char *volatile error_msg
const double maxrealnumber
T align(T number, uint32_t alignment)
ae_bool x_is_symmetric(x_matrix *a)
ae_bool _ialglib_rmatrixsyrk(ae_int_t n, ae_int_t k, double alpha, double *_a, ae_int_t _a_stride, ae_int_t optypea, double beta, double *_c, ae_int_t _c_stride, ae_bool isupper)
double vdotproduct(const double *v0, ae_int_t stride0, const double *v1, ae_int_t stride1, ae_int_t n)
double ae_atan(double x, ae_state *state)
complex & operator*=(const double &v)
ae_bool _ialglib_i_cmatrixsyrkf(ae_int_t n, ae_int_t k, double alpha, ae_matrix *a, ae_int_t ia, ae_int_t ja, ae_int_t optypea, double beta, ae_matrix *c, ae_int_t ic, ae_int_t jc, ae_bool isupper)
double ae_cosh(double x, ae_state *state)
ae_bool ae_str2bool(const char *buf, ae_state *state, const char **pasttheend)
double ae_exp(double x, ae_state *state)
void ae_x_attach_to_matrix(x_matrix *dst, ae_matrix *src)
double ae_tanh(double x, ae_state *state)
void ae_v_caddd(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n, double alpha)
void assign(const ae_vector_wrapper &rhs)
void assign(const ae_matrix_wrapper &rhs)
std::string tostring(int dps) const
ae_complex ae_c_mul(ae_complex lhs, ae_complex rhs)
void *volatile seed_object
char * filter_spaces(const char *s)
void vadd(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
ae_dyn_block *volatile p_top_block
void _rcommstate_clear(rcommstate *p)
void ae_v_subd(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n, double alpha)
ae_bool ae_vector_init(ae_vector *dst, ae_int_t size, ae_datatype datatype, ae_state *state, ae_bool make_automatic)
double maxreal(double m1, double m2)
ae_int_t ae_maxint(ae_int_t m1, ae_int_t m2, ae_state *state)
ae_complex ae_c_mul_d(ae_complex lhs, double rhs)
void aligned_free(void *block)
ae_bool ae_isfinite(double x, ae_state *state)
void ae_serializer_unserialize_bool(ae_serializer *serializer, ae_bool *v, ae_state *state)
double ae_sqr(double x, ae_state *state)
void setcontent(ae_int_t irows, ae_int_t icols, const double *pContent)
#define AE_LOCK_TESTS_BEFORE_YIELD
void ae_serializer_alloc_entry(ae_serializer *serializer)
void ae_serializer_unserialize_double(ae_serializer *serializer, double *v, ae_state *state)
void ae_init_lock(ae_lock *lock)
const alglib::complex & operator()(ae_int_t i) const
ae_complex ae_c_neg(ae_complex lhs)
void _ialglib_mm22x2(double alpha, const double *a, const double *b0, const double *b1, ae_int_t k, double beta, double *r, ae_int_t stride)
const real_1d_array & operator=(const real_1d_array &rhs)
void ae_v_addd(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n, double alpha)
ae_bool ae_vector_init_copy(ae_vector *dst, ae_vector *src, ae_state *state, ae_bool make_automatic)
void ae_v_cmuld(ae_complex *vdst, ae_int_t stride_dst, ae_int_t n, double alpha)
ae_bool ae_is_hermitian(ae_matrix *a)
ae_bool ae_fp_less_eq(double v1, double v2)
ae_int_t ae_round(double x, ae_state *state)
ae_int_t ae_get_endianness()
void _ialglib_mm22(double alpha, const double *a, const double *b, ae_int_t k, double beta, double *r, ae_int_t stride, ae_int_t store_mode)
alglib_impl::ae_int_t ae_int_t
void allocate_own(ae_int_t size, alglib_impl::ae_datatype datatype)
ae_shared_pool_entry *volatile enumeration_counter
void ae_frame_leave(ae_state *state)
void ae_matrix_clear(ae_matrix *dst)
ae_bool(* init_copy)(void *dst, void *src, ae_state *state, ae_bool make_automatic)
ae_int_t vlen(ae_int_t n1, ae_int_t n2)
void setlength(ae_int_t rows, ae_int_t cols)
void ae_shared_pool_clear_recycled(ae_shared_pool *pool, ae_state *state)
ae_bool ae_fp_greater(double v1, double v2)
void ae_smart_ptr_destroy(void *_dst)
std::string tostring(int dps) const
ae_bool ae_matrix_set_length(ae_matrix *dst, ae_int_t rows, ae_int_t cols, ae_state *state)
void ae_x_set_vector(x_vector *dst, ae_vector *src, ae_state *state)
void setcontent(ae_int_t iLen, const double *pContent)
ae_bool _ialglib_i_rmatrixrighttrsmf(ae_int_t m, ae_int_t n, ae_matrix *a, ae_int_t i1, ae_int_t j1, ae_bool isupper, ae_bool isunit, ae_int_t optype, ae_matrix *x, ae_int_t i2, ae_int_t j2)
ae_int_t ae_minint(ae_int_t m1, ae_int_t m2, ae_state *state)
void str_matrix_create(const char *src, std::vector< std::vector< const char *> > *p_mat)
ae_int_t ae_trunc(double x, ae_state *state)
void ae_foursixbits2threebytes(const ae_int_t *src, unsigned char *dst)
const ae_bool & operator()(ae_int_t i, ae_int_t j) const
const alglib::complex operator*(const alglib::complex &lhs, const alglib::complex &rhs)
double ae_atan2(double y, double x, ae_state *state)
double ae_v_dotproduct(const double *v0, ae_int_t stride0, const double *v1, ae_int_t stride1, ae_int_t n)
ae_int_t randominteger(ae_int_t maxv)
void create(const ae_vector_wrapper &rhs)
bool fp_isposinf(double x)
void _ialglib_mcopyunblock_complex(ae_int_t m, ae_int_t n, const double *a, ae_int_t op, ae_complex *b, ae_int_t stride)
void ae_v_cmovec(ae_complex *vdst, ae_int_t stride_dst, const ae_complex *vsrc, ae_int_t stride_src, const char *conj_src, ae_int_t n, ae_complex alpha)
ae_int_t parse_int_delim(const char *s, const char *delim)