mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 13:49:16 +02:00
Merge remote-tracking branch 'origin/master' into cargs2-dev
This commit is contained in:
commit
eca1956400
5 changed files with 13 additions and 22 deletions
|
@ -1,6 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 0.27 - TBD
|
## 0.28 - TBD
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
|
||||||
|
- Arthur Maciel replaced high resolution code in the runtime to use `clock_gettime` instead of `gettimeofday`.
|
||||||
|
|
||||||
|
## 0.27 - March 5, 2021
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ MAINTAINER justin.ethier@gmail.com
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
ENV CYCLONE_VERSION v0.26
|
ENV CYCLONE_VERSION v0.27
|
||||||
RUN apt update -y
|
RUN apt update -y
|
||||||
RUN apt install -y build-essential git rsync texinfo libtommath-dev libck-dev make gcc
|
RUN apt install -y build-essential git rsync texinfo libtommath-dev libck-dev make gcc
|
||||||
|
|
||||||
|
|
|
@ -96,12 +96,12 @@ void Cyc_check_bounds(void *data, const char *label, int len, int index)
|
||||||
|
|
||||||
#ifdef CYC_HIGH_RES_TIMERS
|
#ifdef CYC_HIGH_RES_TIMERS
|
||||||
/* High resolution timers */
|
/* High resolution timers */
|
||||||
#include <sys/time.h>
|
#include <time.h>
|
||||||
long long hrt_get_current()
|
long long hrt_get_current()
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timespec now;
|
||||||
gettimeofday(&tv, NULL); /* TODO: longer-term consider using clock_gettime instead */
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
long long jiffy = (tv.tv_sec)*1000000LL + tv.tv_usec;
|
long long jiffy = (now.tv_sec)*1000000LL + now.tv_nsec/1000; // nano->microseconds
|
||||||
return jiffy;
|
return jiffy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
memloc
|
memloc
|
||||||
)
|
)
|
||||||
(begin
|
(begin
|
||||||
(define *version-number* "0.26")
|
(define *version-number* "0.28")
|
||||||
(define *version-name* "")
|
(define *version-name* "")
|
||||||
(define *version* (string-append *version-number* " " *version-name* ""))
|
(define *version* (string-append *version-number* " " *version-name* ""))
|
||||||
|
|
||||||
|
|
|
@ -26,21 +26,6 @@
|
||||||
make_double(box, 0.0);
|
make_double(box, 0.0);
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
long long jiffy = (now.tv_sec)*1000000LL + now.tv_nsec/1000; // nano->microseconds
|
long long jiffy = (now.tv_sec)*1000000LL + now.tv_nsec/1000; // nano->microseconds
|
||||||
/* Future consideration:
|
|
||||||
mp_int bn_tmp, bn_tmp2, bn_tmp3;
|
|
||||||
mp_init(&bn_tmp);
|
|
||||||
mp_init(&bn_tmp2);
|
|
||||||
mp_init(&bn_tmp3);
|
|
||||||
Cyc_int2bignum(tv.tv_sec, &bn_tmp);
|
|
||||||
Cyc_int2bignum(1000000LL, &bn_tmp2);
|
|
||||||
Cyc_int2bignum(tv.tv_usec, &bn_tmp3);
|
|
||||||
alloc_bignum(data, box);
|
|
||||||
mp_mul(&bn_tmp, &bn_tmp2, &bn_tmp);
|
|
||||||
mp_add(&bn_tmp, &bn_tmp3, &bignum_value(box));
|
|
||||||
mp_clear(&bn_tmp);
|
|
||||||
mp_clear(&bn_tmp2);
|
|
||||||
mp_clear(&bn_tmp3);
|
|
||||||
*/
|
|
||||||
double_value(&box) = jiffy;
|
double_value(&box) = jiffy;
|
||||||
return_closcall1(data, k, &box); ")
|
return_closcall1(data, k, &box); ")
|
||||||
(define-c jiffies-per-second
|
(define-c jiffies-per-second
|
||||||
|
|
Loading…
Add table
Reference in a new issue