add support for RETURN_BY_STACK semantics, e.g. clang
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Fri, 29 May 2020 11:29:10 +0000 (13:29 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 11:29:10 +0000 (13:29 +0200)
benchmark/zdot.c

index ed9d4d2..136135c 100644 (file)
@@ -170,9 +170,11 @@ int main(int argc, char *argv[]){
                        y[i] = ((FLOAT) rand() / (FLOAT) RAND_MAX) - 0.5;
        }
        gettimeofday( &start, (struct timezone *)0);
-
+#ifdef RETURN_BY_STACK
+       DOT (&result , &m, x, &inc_x, y, &inc_y );
+#else
        result = DOT (&m, x, &inc_x, y, &inc_y );
-
+#endif
        gettimeofday( &stop, (struct timezone *)0);
 
        time1 = (double)(stop.tv_sec - start.tv_sec) + (double)((stop.tv_usec - start.tv_usec)) * 1.e-6;