Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
Classes | Namespaces | Macros | Functions
infrastructure.hpp File Reference
#include <cmath>
#include <cstdarg>
#include <cstdint>
#include <libff/common/utils.hpp>
#include <sstream>
#include <string>
Include dependency graph for infrastructure.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gadgetlib2::ErrorHandling
 

Namespaces

 gadgetlib2
 

Macros

#define sprintf_s   snprintf
 
#define DISALLOW_CONSTRUCTION(TypeName)   TypeName();
 
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
 
#define __noreturn
 
#define GADGETLIB_FATAL(msg)
 
#define GADGETLIB_ASSERT(predicate, msg)
 

Functions

::std::string gadgetlib2::GADGETLIB2_FMT (const char *format,...)
 
long gadgetlib2::safeConvert (const int64_t num)
 
double gadgetlib2::Log2 (double n)
 
unsigned int gadgetlib2::Log2ceil (uint64_t i)
 
bool gadgetlib2::IsPower2 (const long x)
 Returns true iff x is a power of 2. More...
 
int64_t gadgetlib2::POW2 (int exponent)
 
int64_t gadgetlib2::CEIL (double a)
 

Detailed Description

Common functionality needed by many components.

Author
This file is part of libsnark, developed by SCIPR Lab and contributors (see AUTHORS).

Definition in file infrastructure.hpp.

Macro Definition Documentation

◆ __noreturn

#define __noreturn

Definition at line 69 of file infrastructure.hpp.

◆ DISALLOW_CONSTRUCTION

#define DISALLOW_CONSTRUCTION (   TypeName)    TypeName();

Definition at line 36 of file infrastructure.hpp.

◆ DISALLOW_COPY_AND_ASSIGN

#define DISALLOW_COPY_AND_ASSIGN (   TypeName)
Value:
TypeName(const TypeName &); \
void operator=(const TypeName &)

Definition at line 40 of file infrastructure.hpp.

◆ GADGETLIB_ASSERT

#define GADGETLIB_ASSERT (   predicate,
  msg 
)
Value:
if (!(bool(predicate))) \
GADGETLIB_FATAL(msg);

Definition at line 94 of file infrastructure.hpp.

◆ GADGETLIB_FATAL

#define GADGETLIB_FATAL (   msg)
Value:
do { \
::std::stringstream msgStream; \
msgStream << msg << " (In file " << __FILE__ << " line " << __LINE__ \
<< ".)"; \
ErrorHandling::fatalError(msgStream.str()); \
} while (0)

Definition at line 85 of file infrastructure.hpp.

◆ sprintf_s

#define sprintf_s   snprintf

Definition at line 22 of file infrastructure.hpp.