PureOne's picture
Release YEORIN-X v4 reproducible research and engineering package
871e4fa verified
Raw History Blame Contribute Delete
567 Bytes
#include "lease.hpp"
#ifdef _WIN32
#define API extern "C" __declspec(dllexport)
#else
#define API extern "C"
#endif
API int yeorin4_query(const double *p,double*out){
if(!p||!out)return -99;
yeorin4::Lease l; l.source=1;l.published=p[0];l.expires=p[1];l.a=p[2];l.energy=p[3];l.maximum=p[4];l.residual=p[5];
yeorin4::Query q;q.source=1;q.now=p[6];q.drift=p[7];q.nativeOffset=p[8];q.pixelCap=p[9];q.alphaCap=p[10];q.pathCharge=p[11];q.implementationError=p[12];
auto d=yeorin4::revalidate(l,q);out[0]=d.alpha;out[1]=d.lower;out[2]=d.nativeCharge;return d.status;
}