Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
/* Copyright (C) 2013 The PARI group.12This file is part of the PARI/GP package.34PARI/GP is free software; you can redistribute it and/or modify it under the5terms of the GNU General Public License as published by the Free Software6Foundation; either version 2 of the License, or (at your option) any later7version. It is distributed in the hope that it will be useful, but WITHOUT8ANY WARRANTY WHATSOEVER.910Check the License for details. You should have received a copy of it, along11with the package; see the file 'COPYING'. If not, write to the Free Software12Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */13#include "pari.h"14#include "paripriv.h"15#include "mt.h"1617void mt_sigint_block(void) { }18void mt_sigint_unblock(void) { }19void mt_err_recover(long er) { mtsingle_err_recover(er); }20void pari_mt_close(void) { }21void mt_queue_reset(void) { }22void mt_broadcast(GEN code) {(void) code;}2324void25mt_sigint(void) {}2627int28mt_is_parallel(void)29{30return 0;31}3233int34mt_is_thread(void)35{36return mtsingle_is_thread();37}3839long40mt_nbthreads(void)41{42return 1;43}4445void46mt_export_add(const char *str, GEN val)47{48if (mtsingle_is_thread())49pari_err(e_MISC,"export not allowed during parallel sections");50export_add(str, val);51}5253void54mt_export_del(const char *str)55{56if (mtsingle_is_thread())57pari_err(e_MISC,"unexport not allowed during parallel sections");58export_del(str);59}6061void62pari_mt_init(void)63{64pari_mt_nbthreads = 1;65}6667void68mt_queue_start_lim(struct pari_mt *pt, GEN worker, long lim)69{70(void) lim;71mtsingle_queue_start(pt, worker);72}737475