[test-suite] r312499 - [test-suite] Fix local inline functions in miniGMG
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 4 13:37:02 PDT 2017
Author: hfinkel
Date: Mon Sep 4 13:37:02 2017
New Revision: 312499
URL: http://llvm.org/viewvc/llvm-project?rev=312499&view=rev
Log:
[test-suite] Fix local inline functions in miniGMG
These inline functions need to be static inline (in C, this is necessary in
case the functions are not actually inlined).
This was picked up as a build failure:
http://green.lab.llvm.org/green/job/Compiler_Verifiers/9863/
Modified:
test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG/solver.c
Modified: test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG/solver.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG/solver.c?rev=312499&r1=312498&r2=312499&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG/solver.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG/solver.c Mon Sep 4 13:37:02 2017
@@ -32,13 +32,13 @@
// z[r] = alpha*A[r][c]*x[c]+beta*y[r] // [row][col]
// z[r] = alpha*A[r][c]*x[c]+beta*y[r] // [row][col]
#define __gemv(z,alpha,A,x,beta,y,rows,cols) {int r,c;double sum;for(r=0;r<(rows);r++){sum=0.0;for(c=0;c<(cols);c++){sum+=(A)[r][c]*(x)[c];}(z)[r]=(alpha)*sum+(beta)*(y)[r];}}
-inline void __axpy(double * z, double alpha, double * x, double beta, double * y, int n){ // z[n] = alpha*x[n]+beta*y[n]
+static inline void __axpy(double * z, double alpha, double * x, double beta, double * y, int n){ // z[n] = alpha*x[n]+beta*y[n]
int nn;
for(nn=0;nn<n;nn++){
z[nn] = alpha*x[nn] + beta*y[nn];
}
}
-inline double __dot(double * x, double * y, int n){ // x[n].y[n]
+static inline double __dot(double * x, double * y, int n){ // x[n].y[n]
int nn;
double sum = 0.0;
for(nn=0;nn<n;nn++){
@@ -46,7 +46,7 @@ inline double __dot(double * x, double *
}
return(sum);
}
-inline void __zero(double * z, int n){ // z[n] = 0.0
+static inline void __zero(double * z, int n){ // z[n] = 0.0
int nn;
for(nn=0;nn<n;nn++){
z[nn] = 0.0;
More information about the llvm-commits
mailing list