aboutsummaryrefslogtreecommitdiffstats
path: root/PyPI/MLRsearch
AgeCommit message (Expand)AuthorFilesLines
2020-03-02Update PyPI metadata for MLRsearch 0.3.0Vratko Polak2-22/+23
2018-08-22CSIT-1222: Edit MLRsearch readme for 0.2.0 releaseVratko Polak1-2/+9
2018-08-22CSIT-1222: Do two doublings in external MLRsearchVratko Polak1-1/+1
2018-07-12CSIT-1186: Consume MLRsearch in agreed upon wayVratko Polak8-806/+1
2018-06-20Revert "CSIT-986: Use MLRsearch from pip"Peter Mikus1-1/+1
2018-06-18CSIT-986: Use MLRsearch from pipVratko Polak1-1/+1
2018-06-18CSIT-986: Implement proposed MDR improvementsVratko Polak13-0/+1206
n">__volatile__ ( // serialize "xorl %%eax,%%eax \n cpuid" ::: "%rax", "%rbx", "%rcx", "%rdx"); /* We cannot use "=A", since this would use %rax on x86_64 and return only the lower 32bits of the TSC */ __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); *t = (uint64_t)hi << 32 | lo; } static inline uint32_t platform_time_get_highres_tick_32() { uint64_t t; platform_time_get_highres_tick_64(&t); return ((uint32_t)t); } static inline hr_time_t os_get_hr_freq(void){ return (3000000000ULL); } static inline hr_time_t os_get_hr_tick_64(void) { hr_time_t res; platform_time_get_highres_tick_64(&res); return (res); } static inline uint32_t os_get_hr_tick_32(void) { return (platform_time_get_highres_tick_32()); } #endif #else hr_time_t os_get_hr_tick_64(void); hr_time_32_t os_get_hr_tick_32(void); hr_time_t os_get_hr_freq(void); #endif /* convert delta time */ static inline hr_time_t ptime_convert_dsec_hr(dsec_t dsec){ return((hr_time_t)(dsec*(double)os_get_hr_freq()) ); } /* convert delta time */ static inline dsec_t ptime_convert_hr_dsec(hr_time_t hrt){ return ((dsec_t)((double)hrt/(double)os_get_hr_freq() )); } extern hr_time_t start_time; static inline void time_init(){ start_time=os_get_hr_tick_64(); } /* should be fixed , need to move to high rez tick */ static inline dsec_t now_sec(void){ hr_time_t d=os_get_hr_tick_64() - start_time; return ( ptime_convert_hr_dsec(d) ); } static inline void delay(int msec){ if (msec == 0) {//user that requested that probebly wanted the minimal delay //but because of scaling problem he have got 0 so we will give the min delay //printf("\n\n\nERROR-Task delay ticks == 0 found in task %s task id = %d\n\n\n\n", // SANB_TaskName(SANB_TaskIdSelf()), SANB_TaskIdSelf()); msec =1; } struct timespec time1, remain; // 2 sec max delay time1.tv_sec=msec/1000; time1.tv_nsec=(msec - (time1.tv_sec*1000))*1000000; nanosleep(&time1,&remain); } #endif