[polly] r278143 - Fix spacing around variable initializations and for-loops. NFC.
Mandeep Singh Grang via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 10:49:24 PDT 2016
Author: mgrang
Date: Tue Aug 9 12:49:24 2016
New Revision: 278143
URL: http://llvm.org/viewvc/llvm-project?rev=278143&view=rev
Log:
Fix spacing around variable initializations and for-loops. NFC.
Reviewers: grosser, _jdoerfert, zinob
Projects: #polly
Differential Revision: https://reviews.llvm.org/D23285
Modified:
polly/trunk/lib/JSON/json_writer.cpp
polly/trunk/www/experiments/matmul/matmul.c
Modified: polly/trunk/lib/JSON/json_writer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/JSON/json_writer.cpp?rev=278143&r1=278142&r2=278143&view=diff
==============================================================================
--- polly/trunk/lib/JSON/json_writer.cpp (original)
+++ polly/trunk/lib/JSON/json_writer.cpp Tue Aug 9 12:49:24 2016
@@ -120,7 +120,7 @@ std::string valueToQuotedString( const c
std::string result;
result.reserve(maxsize); // to avoid lots of mallocs
result += "\"";
- for (const char* c=value; *c != 0; ++c)
+ for (const char* c = value; *c != 0; ++c)
{
switch(*c)
{
Modified: polly/trunk/www/experiments/matmul/matmul.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/www/experiments/matmul/matmul.c?rev=278143&r1=278142&r2=278143&view=diff
==============================================================================
--- polly/trunk/www/experiments/matmul/matmul.c (original)
+++ polly/trunk/www/experiments/matmul/matmul.c Tue Aug 9 12:49:24 2016
@@ -9,8 +9,8 @@ void init_array()
{
int i, j;
- for (i=0; i<N; i++) {
- for (j=0; j<N; j++) {
+ for (i = 0; i < N; i++) {
+ for (j = 0; j < N; j++) {
A[i][j] = (1+(i*j)%1024)/2.0;
B[i][j] = (1+(i*j)%1024)/2.0;
}
@@ -21,8 +21,8 @@ void print_array()
{
int i, j;
- for (i=0; i<N; i++) {
- for (j=0; j<N; j++) {
+ for (i = 0; i < N; i++) {
+ for (j = 0; j < N; j++) {
fprintf(stdout, "%lf ", C[i][j]);
if (j%80 == 79) fprintf(stdout, "\n");
}
@@ -37,10 +37,10 @@ int main()
init_array();
- for(i=0; i<N; i++) {
- for(j=0; j<N; j++) {
+ for (i = 0; i < N; i++) {
+ for (j = 0; j < N; j++) {
C[i][j] = 0;
- for(k=0; k<N; k++)
+ for (k = 0; k < N; k++)
C[i][j] = C[i][j] + A[i][k] * B[k][j];
}
}
More information about the llvm-commits
mailing list