Index: src/libcfa/gmp
===================================================================
--- src/libcfa/gmp	(revision 53a6c2a24c63e4878fd4222e11fef110ba3ee85a)
+++ src/libcfa/gmp	(revision f1bcd00439bda4142200e24be677e3de062abbd0)
@@ -1,10 +1,10 @@
-// 
+//
 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
 //
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// gmp -- 
-// 
+//
+// gmp --
+//
 // Author           : Peter A. Buhr
 // Created On       : Tue Apr 19 08:43:43 2016
@@ -12,5 +12,5 @@
 // Last Modified On : Fri Jul  7 09:33:20 2017
 // Update Count     : 15
-// 
+//
 
 // https://gmplib.org/gmp-man-6.1.1.pdf
@@ -24,27 +24,27 @@
 
 // constructor
-static inline void ?{}( Int * this ) { mpz_init( this->mpz ); }
-static inline void ?{}( Int * this, Int init ) { mpz_init_set( this->mpz, init.mpz ); }
-static inline void ?{}( Int * this, zero_t ) { mpz_init_set_si( this->mpz, 0 ); }
-static inline void ?{}( Int * this, one_t ) { mpz_init_set_si( this->mpz, 1 ); }
-static inline void ?{}( Int * this, signed long int init ) { mpz_init_set_si( this->mpz, init ); }
-static inline void ?{}( Int * this, unsigned long int init ) { mpz_init_set_ui( this->mpz, init ); }
-static inline void ?{}( Int * this, const char * val ) { if ( mpz_init_set_str( this->mpz, val, 0 ) ) abort(); }
-static inline void ^?{}( Int * this ) { mpz_clear( this->mpz ); }
+static inline void ?{}( Int & this ) { mpz_init( this.mpz ); }
+static inline void ?{}( Int & this, Int init ) { mpz_init_set( this.mpz, init.mpz ); }
+static inline void ?{}( Int & this, zero_t ) { mpz_init_set_si( this.mpz, 0 ); }
+static inline void ?{}( Int & this, one_t ) { mpz_init_set_si( this.mpz, 1 ); }
+static inline void ?{}( Int & this, signed long int init ) { mpz_init_set_si( this.mpz, init ); }
+static inline void ?{}( Int & this, unsigned long int init ) { mpz_init_set_ui( this.mpz, init ); }
+static inline void ?{}( Int & this, const char * val ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
+static inline void ^?{}( Int & this ) { mpz_clear( this.mpz ); }
 
 // assignment
-static inline Int ?=?( Int * lhs, Int rhs ) { mpz_set( lhs->mpz, rhs.mpz ); return *lhs; }
-static inline Int ?=?( Int * lhs, long int rhs ) { mpz_set_si( lhs->mpz, rhs ); return *lhs; }
-static inline Int ?=?( Int * lhs, unsigned long int rhs ) { mpz_set_ui( lhs->mpz, rhs ); return *lhs; }
-static inline Int ?=?( Int * lhs, const char * rhs ) { if ( mpz_set_str( lhs->mpz, rhs, 0 ) ) { printf( "invalid string conversion\n" ); abort(); } return *lhs; }
-
-static inline char ?=?( char * lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
-static inline short int ?=?( short int * lhs, Int rhs ) { short int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
-static inline int ?=?( int * lhs, Int rhs ) { int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
-static inline long int ?=?( long int * lhs, Int rhs ) { long int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
-static inline unsigned char ?=?( unsigned char * lhs, Int rhs ) { unsigned char val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
-static inline unsigned short int ?=?( unsigned short int * lhs, Int rhs ) { unsigned short int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
-static inline unsigned int ?=?( unsigned int * lhs, Int rhs ) { unsigned int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
-static inline unsigned long int ?=?( unsigned long int * lhs, Int rhs ) { unsigned long int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
+static inline Int ?=?( Int & lhs, Int rhs ) { mpz_set( lhs.mpz, rhs.mpz ); return lhs; }
+static inline Int ?=?( Int & lhs, long int rhs ) { mpz_set_si( lhs.mpz, rhs ); return lhs; }
+static inline Int ?=?( Int & lhs, unsigned long int rhs ) { mpz_set_ui( lhs.mpz, rhs ); return lhs; }
+static inline Int ?=?( Int & lhs, const char * rhs ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { printf( "invalid string conversion\n" ); abort(); } return lhs; }
+
+static inline char ?=?( char & lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
+static inline short int ?=?( short int & lhs, Int rhs ) { short int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
+static inline int ?=?( int & lhs, Int rhs ) { int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
+static inline long int ?=?( long int & lhs, Int rhs ) { long int val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
+static inline unsigned char ?=?( unsigned char & lhs, Int rhs ) { unsigned char val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
+static inline unsigned short int ?=?( unsigned short int & lhs, Int rhs ) { unsigned short int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
+static inline unsigned int ?=?( unsigned int & lhs, Int rhs ) { unsigned int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
+static inline unsigned long int ?=?( unsigned long int & lhs, Int rhs ) { unsigned long int val = mpz_get_ui( rhs.mpz ); lhs = val; return lhs; }
 
 // conversions
@@ -99,5 +99,5 @@
 static inline Int ?&?( Int oper1, unsigned long int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_and( conjunction.mpz, oper1.mpz, temp.mpz ); return conjunction; }
 static inline Int ?&?( unsigned long int oper1, Int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_and( conjunction.mpz, temp.mpz, oper2.mpz ); return conjunction; }
-static inline Int ?&=?( Int * lhs, Int rhs ) { return *lhs = *lhs & rhs; }
+static inline Int ?&=?( Int & lhs, Int rhs ) { return lhs = lhs & rhs; }
 
 static inline Int ?|?( Int oper1, Int oper2 ) { Int disjunction; mpz_ior( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
@@ -106,5 +106,5 @@
 static inline Int ?|?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
 static inline Int ?|?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
-static inline Int ?|=?( Int * lhs, Int rhs ) { return *lhs = *lhs | rhs; }
+static inline Int ?|=?( Int & lhs, Int rhs ) { return lhs = lhs | rhs; }
 
 static inline Int ?^?( Int oper1, Int oper2 ) { Int disjunction; mpz_xor( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
@@ -113,5 +113,5 @@
 static inline Int ?^?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
 static inline Int ?^?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
-static inline Int ?^=?( Int * lhs, Int rhs ) { return *lhs = *lhs ^ rhs; }
+static inline Int ?^=?( Int & lhs, Int rhs ) { return lhs = lhs ^ rhs; }
 
 static inline Int ?+?( Int addend1, Int addend2 ) { Int sum; mpz_add( sum.mpz, addend1.mpz, addend2.mpz ); return sum; }
@@ -120,9 +120,9 @@
 static inline Int ?+?( Int addend1, unsigned long int addend2 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
 static inline Int ?+?( unsigned long int addend2, Int addend1 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
-static inline Int ?+=?( Int * lhs, Int rhs ) { return *lhs = *lhs + rhs; }
-static inline Int ?+=?( Int * lhs, long int rhs ) { return *lhs = *lhs + rhs; }
-static inline Int ?+=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs + rhs; }
-static inline Int ++?( Int * lhs ) { return *lhs += 1; }
-static inline Int ?++( Int * lhs ) { Int ret = *lhs; *lhs += 1; return ret; }
+static inline Int ?+=?( Int & lhs, Int rhs ) { return lhs = lhs + rhs; }
+static inline Int ?+=?( Int & lhs, long int rhs ) { return lhs = lhs + rhs; }
+static inline Int ?+=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs + rhs; }
+static inline Int ++?( Int & lhs ) { return lhs += 1; }
+static inline Int ?++( Int & lhs ) { Int ret = lhs; lhs += 1; return ret; }
 
 static inline Int ?-?( Int minuend, Int subtrahend ) { Int diff; mpz_sub( diff.mpz, minuend.mpz, subtrahend.mpz ); return diff; }
@@ -131,9 +131,9 @@
 static inline Int ?-?( Int minuend, unsigned long int subtrahend ) { Int diff; mpz_sub_ui( diff.mpz, minuend.mpz, subtrahend ); return diff; }
 static inline Int ?-?( unsigned long int minuend, Int subtrahend ) { Int diff; mpz_ui_sub( diff.mpz, minuend, subtrahend.mpz ); return diff; }
-static inline Int ?-=?( Int * lhs, Int rhs ) { return *lhs = *lhs - rhs; }
-static inline Int ?-=?( Int * lhs, long int rhs ) { return *lhs = *lhs - rhs; }
-static inline Int ?-=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs - rhs; }
-static inline Int --?( Int * lhs ) { return *lhs -= 1; }
-static inline Int ?--( Int * lhs ) { Int ret = *lhs; *lhs -= 1; return ret; }
+static inline Int ?-=?( Int & lhs, Int rhs ) { return lhs = lhs - rhs; }
+static inline Int ?-=?( Int & lhs, long int rhs ) { return lhs = lhs - rhs; }
+static inline Int ?-=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs - rhs; }
+static inline Int --?( Int & lhs ) { return lhs -= 1; }
+static inline Int ?--( Int & lhs ) { Int ret = lhs; lhs -= 1; return ret; }
 
 static inline Int ?*?( Int multiplicator, Int multiplicand ) { Int product; mpz_mul( product.mpz, multiplicator.mpz, multiplicand.mpz ); return product; }
@@ -142,7 +142,7 @@
 static inline Int ?*?( Int multiplicator, unsigned long int multiplicand ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
 static inline Int ?*?( unsigned long int multiplicand, Int multiplicator ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
-static inline Int ?*=?( Int * lhs, Int rhs ) { return *lhs = *lhs * rhs; }
-static inline Int ?*=?( Int * lhs, long int rhs ) { return *lhs = *lhs * rhs; }
-static inline Int ?*=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs * rhs; }
+static inline Int ?*=?( Int & lhs, Int rhs ) { return lhs = lhs * rhs; }
+static inline Int ?*=?( Int & lhs, long int rhs ) { return lhs = lhs * rhs; }
+static inline Int ?*=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs * rhs; }
 
 // some code for operators "/" and "%" taken from g++ gmpxx.h
@@ -187,7 +187,7 @@
 	return quotient;
 } // ?/?
-static inline Int ?/=?( Int * lhs, Int rhs ) { return *lhs = *lhs / rhs; }
-static inline Int ?/=?( Int * lhs, long int rhs ) { return *lhs = *lhs / rhs; }
-static inline Int ?/=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs / rhs; }
+static inline Int ?/=?( Int & lhs, Int rhs ) { return lhs = lhs / rhs; }
+static inline Int ?/=?( Int & lhs, long int rhs ) { return lhs = lhs / rhs; }
+static inline Int ?/=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs / rhs; }
 
 static inline [ Int, Int ] div( Int dividend, Int divisor ) { Int quotient, remainder; mpz_fdiv_qr( quotient.mpz, remainder.mpz, dividend.mpz, divisor.mpz ); return [ quotient, remainder ]; }
@@ -228,12 +228,12 @@
 	return remainder;
 } // ?%?
-static inline Int ?%=?( Int * lhs, Int rhs ) { return *lhs = *lhs % rhs; }
-static inline Int ?%=?( Int * lhs, long int rhs ) { return *lhs = *lhs % rhs; }
-static inline Int ?%=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs % rhs; }
+static inline Int ?%=?( Int & lhs, Int rhs ) { return lhs = lhs % rhs; }
+static inline Int ?%=?( Int & lhs, long int rhs ) { return lhs = lhs % rhs; }
+static inline Int ?%=?( Int & lhs, unsigned long int rhs ) { return lhs = lhs % rhs; }
 
 static inline Int ?<<?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_mul_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
-static inline Int ?<<=?( Int * lhs, mp_bitcnt_t shift ) { return *lhs = *lhs << shift; }
+static inline Int ?<<=?( Int & lhs, mp_bitcnt_t shift ) { return lhs = lhs << shift; }
 static inline Int ?>>?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_fdiv_q_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
-static inline Int ?>>=?( Int * lhs, mp_bitcnt_t shift ) { return *lhs = *lhs >> shift; }
+static inline Int ?>>=?( Int & lhs, mp_bitcnt_t shift ) { return lhs = lhs >> shift; }
 
 // number functions
