Classes | Defines | Functions

oct-inttypes.cc File Reference

#include "lo-error.h"
#include "oct-inttypes.h"
Include dependency graph for oct-inttypes.cc:

Go to the source code of this file.

Classes

class  rev_op< xop >

Defines

#define DECLARE_OCTAVE_INT_TYPENAME(TYPE, TYPENAME)
#define DEFINE_REVERTED_OPERATOR(OP1, OP2)
#define DOUBLE_INT_BINOP_DECL(OP, SUFFIX)
#define INSTANTIATE_INT64_DOUBLE_CMP_OP(OP)
#define INSTANTIATE_INT64_DOUBLE_CMP_OP0(OP, T1, T2)
#define INSTANTIATE_INTTYPE(T)
#define INT_DOUBLE_BINOP_DECL(OP, SUFFIX)

Functions

static double dbleget (bool sign, uint32_t mtis, int exp)
static void dblesplit (double x, bool &sign, uint64_t &mtis, int &exp)
 DEFINE_REVERTED_OPERATOR (gt, lt)
 DEFINE_REVERTED_OPERATOR (ge, le)
 DEFINE_REVERTED_OPERATOR (lt, gt)
 DEFINE_REVERTED_OPERATOR (le, ge)
 DOUBLE_INT_BINOP_DECL (+, int64)
 DOUBLE_INT_BINOP_DECL (-, uint64)
 DOUBLE_INT_BINOP_DECL (+, uint64)
 DOUBLE_INT_BINOP_DECL (-, int64)
INT_DOUBLE_BINOP_DECL uint64 if (y >=0 &&y< octave_uint64::max()&&y==xround(y))
else if (y==0.5)
 INSTANTIATE_INT64_DOUBLE_CMP_OP (le)
 INSTANTIATE_INT64_DOUBLE_CMP_OP (gt)
 INSTANTIATE_INT64_DOUBLE_CMP_OP (ge)
 INSTANTIATE_INT64_DOUBLE_CMP_OP (eq)
 INSTANTIATE_INT64_DOUBLE_CMP_OP (ne)
 INSTANTIATE_INTTYPE (int16_t)
 INSTANTIATE_INTTYPE (int32_t)
 INSTANTIATE_INTTYPE (uint16_t)
 INSTANTIATE_INTTYPE (uint32_t)
 INSTANTIATE_INTTYPE (int8_t)
 INSTANTIATE_INTTYPE (int64_t)
 INSTANTIATE_INTTYPE (uint8_t)
 INSTANTIATE_INTTYPE (uint64_t)
 INT_DOUBLE_BINOP_DECL (+, uint64)
 INT_DOUBLE_BINOP_DECL (-, uint64)
 INT_DOUBLE_BINOP_DECL (-, int64)
 INT_DOUBLE_BINOP_DECL (+, int64)
template<class T >
octave_int< T > pow (const octave_int< T > &a, const double &b)
template<class T >
octave_int< T > pow (const float &a, const octave_int< T > &b)
template<class T >
octave_int< T > pow (const octave_int< T > &a, const octave_int< T > &b)
template<class T >
octave_int< T > pow (const octave_int< T > &a, const float &b)
template<class T >
octave_int< T > pow (const double &a, const octave_int< T > &b)
template<class T >
octave_int< T > powf (const float &a, const octave_int< T > &b)
template<class T >
octave_int< T > powf (const octave_int< T > &a, const float &b)
static void umul128 (uint64_t x, uint64_t y, uint32_t w[4])

Define Documentation

#define DECLARE_OCTAVE_INT_TYPENAME (   TYPE,
  TYPENAME 
)
Value:
template <> \
  OCTAVE_API const char * \
  octave_int<TYPE>::type_name () { return TYPENAME; }

Definition at line 39 of file oct-inttypes.cc.

#define DEFINE_REVERTED_OPERATOR (   OP1,
  OP2 
)
Value:
template <> \
  class rev_op<octave_int_cmp_op::OP1> \
  { \
  public: \
    typedef octave_int_cmp_op::OP2 op; \
  }

Definition at line 111 of file oct-inttypes.cc.

#define DOUBLE_INT_BINOP_DECL (   OP,
  SUFFIX 
)
Value:
template <> \
  OCTAVE_API octave_ ## SUFFIX \
  operator OP (const double& x, const octave_ ## SUFFIX & y)

Definition at line 268 of file oct-inttypes.cc.

#define INSTANTIATE_INT64_DOUBLE_CMP_OP (   OP  ) 
Value:
INSTANTIATE_INT64_DOUBLE_CMP_OP0(OP, double, int64_t); \
  INSTANTIATE_INT64_DOUBLE_CMP_OP0(OP, double, uint64_t); \
  INSTANTIATE_INT64_DOUBLE_CMP_OP0(OP, int64_t, double); \
  INSTANTIATE_INT64_DOUBLE_CMP_OP0(OP, uint64_t, double)
#define INSTANTIATE_INT64_DOUBLE_CMP_OP0 (   OP,
  T1,
  T2 
)
Value:
template OCTAVE_API bool \
  octave_int_cmp_op::emulate_mop<octave_int_cmp_op::OP> (T1 x, T2 y)
#define INSTANTIATE_INTTYPE (   T  ) 
Value:
template class OCTAVE_API octave_int<T>; \
  template OCTAVE_API octave_int<T> pow (const octave_int<T>&, const octave_int<T>&); \
  template OCTAVE_API octave_int<T> pow (const double&, const octave_int<T>&); \
  template OCTAVE_API octave_int<T> pow (const octave_int<T>&, const double&); \
  template OCTAVE_API octave_int<T> pow (const float&, const octave_int<T>&);  \
  template OCTAVE_API octave_int<T> pow (const octave_int<T>&, const float&);  \
  template OCTAVE_API octave_int<T> powf (const float&, const octave_int<T>&); \
  template OCTAVE_API octave_int<T> powf (const octave_int<T>&, const float&); \
  template OCTAVE_API octave_int<T> \
  bitshift (const octave_int<T>&, int, const octave_int<T>&); \

Definition at line 610 of file oct-inttypes.cc.

#define INT_DOUBLE_BINOP_DECL (   OP,
  SUFFIX 
)
Value:
template <> \
  OCTAVE_API octave_ ## SUFFIX \
  operator OP (const octave_ ## SUFFIX & x, const double& y)

Definition at line 263 of file oct-inttypes.cc.


Function Documentation

static double dbleget ( bool  sign,
uint32_t  mtis,
int  exp 
) [static]

Definition at line 389 of file oct-inttypes.cc.

static void dblesplit ( double  x,
bool sign,
uint64_t &  mtis,
int exp 
) [static]

Definition at line 379 of file oct-inttypes.cc.

DEFINE_REVERTED_OPERATOR ( gt  ,
lt   
)
DEFINE_REVERTED_OPERATOR ( ge  ,
le   
)
DEFINE_REVERTED_OPERATOR ( lt  ,
gt   
)
DEFINE_REVERTED_OPERATOR ( le  ,
ge   
)
DOUBLE_INT_BINOP_DECL ( ,
int64   
)

Definition at line 300 of file oct-inttypes.cc.

DOUBLE_INT_BINOP_DECL ( ,
uint64   
)

Definition at line 310 of file oct-inttypes.cc.

References octave_int< T >::max(), and pow().

DOUBLE_INT_BINOP_DECL ( ,
uint64   
)

Definition at line 278 of file oct-inttypes.cc.

DOUBLE_INT_BINOP_DECL ( ,
int64   
)

Definition at line 335 of file oct-inttypes.cc.

References max(), min(), and pow().

else if (  ) 

Definition at line 406 of file oct-inttypes.cc.

Referenced by load_path::do_files().

else if ( = = 0.5  ) 

Definition at line 402 of file oct-inttypes.cc.

INSTANTIATE_INT64_DOUBLE_CMP_OP ( le   ) 
INSTANTIATE_INT64_DOUBLE_CMP_OP ( gt   ) 
INSTANTIATE_INT64_DOUBLE_CMP_OP ( ge   ) 
INSTANTIATE_INT64_DOUBLE_CMP_OP ( eq   ) 
INSTANTIATE_INT64_DOUBLE_CMP_OP ( ne   ) 
INSTANTIATE_INTTYPE ( int16_t   ) 
INSTANTIATE_INTTYPE ( int32_t   ) 
INSTANTIATE_INTTYPE ( uint16_t   ) 
INSTANTIATE_INTTYPE ( uint32_t   ) 
INSTANTIATE_INTTYPE ( int8_t   ) 
INSTANTIATE_INTTYPE ( int64_t   ) 
INSTANTIATE_INTTYPE ( uint8_t   ) 
INSTANTIATE_INTTYPE ( uint64_t   ) 
INT_DOUBLE_BINOP_DECL ( ,
uint64   
)

Definition at line 273 of file oct-inttypes.cc.

INT_DOUBLE_BINOP_DECL ( ,
uint64   
)

Definition at line 305 of file oct-inttypes.cc.

INT_DOUBLE_BINOP_DECL ( ,
int64   
)

Definition at line 330 of file oct-inttypes.cc.

INT_DOUBLE_BINOP_DECL ( ,
int64   
)

Definition at line 281 of file oct-inttypes.cc.

References octave_int< T >::max().

template<class T >
octave_int<T> pow ( const octave_int< T > &  a,
const double b 
)

Definition at line 572 of file oct-inttypes.cc.

References octave_int< T >::double_value(), pow(), and xround().

template<class T >
octave_int<T> pow ( const float a,
const octave_int< T > &  b 
)

Definition at line 581 of file oct-inttypes.cc.

References octave_int< T >::float_value(), and pow().

template<class T >
octave_int<T> pow ( const octave_int< T > &  a,
const octave_int< T > &  b 
)
template<class T >
octave_int<T> pow ( const octave_int< T > &  a,
const float b 
)

Definition at line 586 of file oct-inttypes.cc.

References octave_int< T >::double_value(), pow(), and xround().

template<class T >
octave_int<T> pow ( const double a,
const octave_int< T > &  b 
)

Definition at line 567 of file oct-inttypes.cc.

References octave_int< T >::double_value(), and pow().

template<class T >
octave_int<T> powf ( const float a,
const octave_int< T > &  b 
)

Definition at line 598 of file oct-inttypes.cc.

References octave_int< T >::float_value(), and pow().

Referenced by DEFUN().

template<class T >
octave_int<T> powf ( const octave_int< T > &  a,
const float b 
)

Definition at line 603 of file oct-inttypes.cc.

References octave_int< T >::double_value(), pow(), and xround().

static void umul128 ( uint64_t  x,
uint64_t  y,
uint32_t  w[4] 
) [static]

Definition at line 361 of file oct-inttypes.cc.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines