Skip to content

Commit 6e270f9

Browse files
authored
add support for RETURN_BY_STACK semantics, e.g. clang
1 parent 200296b commit 6e270f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

benchmark/zdot.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ int main(int argc, char *argv[]){
170170
y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
171171
}
172172
gettimeofday( &start, (struct timezone *)0);
173-
173+
#ifdef RETURN_BY_STACK
174+
DOT (&result , &m, x, &inc_x, y, &inc_y );
175+
#else
174176
result = DOT (&m, x, &inc_x, y, &inc_y );
175-
177+
#endif
176178
gettimeofday( &stop, (struct timezone *)0);
177179

178180
time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;

0 commit comments

Comments
 (0)