qubfast.h.html |
mathcode2html
|
Source file: qubfast.h
|
Converted: Fri Jan 8 2016 at 13:12:41
|
This documentation file will
not reflect any later changes in the source file.
|
$$\phantom{******** If you see this on the webpage then the
browser could not locate *********}$$
$$\phantom{******** jsMath/easy/load.js or the variable root
is set wrong in this file *********}$$
$$\newcommand{\vector}[1]{\left[\begin{array}{c} #1 \end{array}\right]}$$
$$\newenvironment{matrix}{\left[\begin{array}{cccccccccc}} {\end{array}\right]}$$
$$\newcommand{\A}{{\cal A}}$$
$$\newcommand{\W}{{\cal W}}$$
/* Copyright 2008-2014 Research Foundation State University of New York */
/* This file is part of QUB Express. */
/* QUB Express is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* QUB Express is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* You should have received a copy of the GNU General Public License, */
/* named LICENSE.txt, in the QUB Express program directory. If not, see */
/* <http://www.gnu.org/licenses/>. */
#ifndef QUBFAST_H
#define QUBFAST_H
/*
|
This module contains various functions written in C/C++.
Up
|
*/
//
// If QUBFAST_EXPORTS is defined, the decorator QUBFAST_API exports a symbol.
// Otherwise, QUBFAST_API imports the symbol.
// This works across MS Visual Studio and gcc.
//
/*
*/
#if defined(_WIN32)
#define QUBFAST_DLLEXPORT __declspec(dllexport)
#define QUBFAST_DLLIMPORT __declspec(dllimport)
#define QUBFAST_TMPLEXP
#define QUBFAST_TMPLIMP
#else
#define QUBFAST_DLLEXPORT
#define QUBFAST_DLLIMPORT
#define QUBFAST_TMPLEXP
#define QUBFAST_TMPLIMP
#define __stdcall
#define __cdecl
#endif
#ifdef EMSCRIPTEN
#define QUBFAST_API EMSCRIPTEN_KEEPALIVE
#define QUBFAST_API_CLASS
#include <emscripten.h>
#else
#if !defined(QUBFAST_EXPORTS)
#define QUBFAST_API QUBFAST_DLLIMPORT
#define QUBFAST_TEMPLATE QUBFAST_TMPLIMP
#else
#define QUBFAST_API QUBFAST_DLLEXPORT
#define QUBFAST_TEMPLATE QUBFAST_TMPLEXP
#endif
#define QUBFAST_API_CLASS QUBFAST_API
#endif
#ifdef __GNUC__
#define QUBFAST_VAR_NOT_USED __attribute__ ((unused))
#else
#define QUBFAST_VAR_NOT_USED
#endif
#include "callbk_reportfun.h"
#ifdef EMSCRIPTEN
#include "callbk_reportstream.h"
extern callbk_reportstream console;
#else
#define console cerr
#endif
int QUBFAST_API consoleLog(const char *msg, void *data);
// complete in [0..1]
// returns nonzero to signal stop
typedef int (*StatusCallback)(void *obj, double complete);
template<class T>
T squared(T x) {
return (x*x);
}
#endif