From 14c854543b1a3cf344a371a5b45595657f95786b Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Tue, 26 Oct 2021 13:22:32 -0400 Subject: add deadlines and costs --- all_pairs/source/gsm_dec/add.h | 55 ------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 all_pairs/source/gsm_dec/add.h (limited to 'all_pairs/source/gsm_dec/add.h') diff --git a/all_pairs/source/gsm_dec/add.h b/all_pairs/source/gsm_dec/add.h deleted file mode 100644 index ffe79b7..0000000 --- a/all_pairs/source/gsm_dec/add.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef GSM_DEC_ADD_H -#define GSM_DEC_ADD_H - -#define GSM_MULT_R(a, b) /* word a, word b, !(a == b == MIN_WORD) */ \ - (SASR( ((longword)(a) * (longword)(b) + 16384), 15 )) - -# define GSM_MULT(a,b) /* word a, word b, !(a == b == MIN_WORD) */ \ - (SASR( ((longword)(a) * (longword)(b)), 15 )) - -# define GSM_L_MULT(a, b) /* word a, word b */ \ - (((longword)(a) * (longword)(b)) << 1) - -# define GSM_L_ADD(a, b) \ - ( (a) < 0 ? ( (b) >= 0 ? (a) + (b) \ - : (utmp = (ulongword)-((a) + 1) + (ulongword)-((b) + 1)) \ - >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)utmp-2 ) \ - : ((b) <= 0 ? (a) + (b) \ - : (utmp = (ulongword)(a) + (ulongword)(b)) >= MAX_LONGWORD \ - ? MAX_LONGWORD : utmp)) - -/* - # define GSM_ADD(a, b) \ - ((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD \ - ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp) -*/ -/* Nonportable, but faster: */ - -#define GSM_ADD(a, b) \ - ((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \ - MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp) - -# define GSM_SUB(a, b) \ - ((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \ - ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp) - -# define GSM_ABS(a) ((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a)) - -#define saturate(x) \ - ((x) < MIN_WORD ? MIN_WORD : (x) > MAX_WORD ? MAX_WORD: (x)) - -/* Use these if necessary: - - # define GSM_MULT_R(a, b) gsm_mult_r(a, b) - # define GSM_MULT(a, b) gsm_mult(a, b) - # define GSM_L_MULT(a, b) gsm_L_mult(a, b) - - # define GSM_L_ADD(a, b) gsm_L_add(a, b) - # define GSM_ADD(a, b) gsm_add(a, b) - # define GSM_SUB(a, b) gsm_sub(a, b) - - # define GSM_ABS(a) gsm_abs(a) - -*/ - -#endif /* GSM_DEC_ADD_H */ -- cgit v1.2.2