packages feed

cao-0.1.1: backend_lib/C_generic/CAO_globalOp.h

/*  CAO Compiler
    Copyright (C) 2014 Cryptography and Information Security Group, HASLab - INESC TEC and Universidade do Minho

    This program 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.

    This program 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
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#ifndef CAO_GLOBALOP_H
#define CAO_GLOBALOP_H

#include "CAO_globals.h"

#include "CAO_rint.h"
#include "CAO_bool.h"
#include "CAO_int.h"
#include "CAO_ubits.h"
#include "CAO_sbits.h"
#include "CAO_mod.h"
#include "CAO_modpol.h"

#include "CAO_struct.h"
#include "CAO_vector.h"
#include "CAO_matrix.h"

#ifdef __cplusplus

#include <iostream>
#include <cstring>
#include <cstdlib>

extern "C" {
#endif

	CAO_RES CAO_global_decl(CAO_REF *, const char *, void *[]);
	CAO_RES _CAO_global_decl(CAO_REF *, const char *, void *[], int *);

	CAO_RES CAO_global_assign(CAO_REF, CAO_REF, char);
	CAO_RES CAO_global_const_init(CAO_REF, void *, char);

	CAO_RES CAO_global_init(CAO_REF, void *[], char);
	CAO_RES _CAO_global_init(CAO_REF, void *[], int *, char);

	CAO_RES CAO_global_clone(CAO_REF *, CAO_REF, char);
	CAO_RES CAO_global_dispose(CAO_REF, char);

	CAO_RES CAO_global_ref(CAO_REF *, CAO_REF, char, CAO_rint *, int);

	#define CAO_global_equal(a,b,c,d) a = _CAO_global_equal(b,c,d)
	CAO_bool _CAO_global_equal (CAO_REF, CAO_REF, char);

	CAO_RES CAO_global_addTo(CAO_REF, CAO_REF, char);
	CAO_RES CAO_global_subTo(CAO_REF, CAO_REF, char);
	CAO_RES CAO_global_sym(CAO_REF, CAO_REF, char);
	CAO_RES CAO_global_mul(CAO_REF, CAO_REF, CAO_REF, char);
	CAO_RES CAO_global_assign_zero(CAO_REF, char);
	CAO_RES CAO_global_assign_one(CAO_REF, char);

	CAO_RES CAO_global_dump(CAO_REF, char);
	CAO_RES CAO_global_cast(CAO_REF, char, CAO_REF, char);

#ifdef __cplusplus
}
#endif

#endif