Code:
#define dMULTIPLYOP0_331(A,op,B,C) \
do { \
(A)[0] op dDOT((B),(C)); \
(A)[1] op dDOT((B+4),(C)); \
(A)[2] op dDOT((B+8),(C)); \
} while(0)
DECL dMULTIPLY0_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_331(A,=,B,C); }
DECL dMULTIPLYADD0_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_331(A,+=,B,C); }
The dMULTIPLYOP0_331 can't be translated to Pascal because it's an "expression builder". The "op" parameter means an operator and the result is an expression that should be compilled. I mean, when C compiles
Code:
DECL dMULTIPLY0_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_331(A,=,B,C); }
the preprocessor returns:
Code:
extern pascal void dMULTIPLY0_331 (int *A, const int *B, const int *C)
{
do {
(A)[0] = dDOT((B),(C));
(A)[1] = dDOT((B+4),(C));
(A)[2] = dDOT((B+8),(C));
} while(0)
}
AFAIK it's not possible to do it in Pascal. You must "unroll" those macros by hand to translate it to Pascal.
Bookmarks