Skip to content

Commit 767f2a3

Browse files
committed
Fixed clang build error
error: embedding a #pragma directive within macro arguments is not supported
1 parent 0fc3d3f commit 767f2a3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/library/blas/trtri/diag_dtrtri_lower_128_16.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ __local double Bs[BLOCK_SIZE*BLOCK_SIZE]; \n
6262
__local double workspace[BLOCK_SIZE]; \n // workspace used to store the current working column
6363

6464
// load A
65-
#pragma unroll\n
65+
_Pragma("unroll")\n
6666
for (i = 0; i < BLOCK_SIZE; i++)\n
6767
{ \n
6868
if (tx >= i && gx < na)\n
@@ -138,7 +138,7 @@ for (i = BLOCK_SIZE - 2; i >= 0; i--) {\n
138138

139139
txw = (tx - i - 1); \n
140140

141-
#pragma unroll\n
141+
_Pragma("unroll")\n
142142
for (j = 0; j < BLOCK_SIZE - i - 1; j++)\n
143143
Ystx += switcher*(*(Bw + j*BLOCK_SIZE + txw)*x[j]); \n
144144

@@ -163,7 +163,7 @@ for (i = BLOCK_SIZE - 2; i >= 0; i--) {\n
163163
}\n
164164

165165
// write back A
166-
#pragma unroll\n
166+
_Pragma("unroll")\n
167167
for (i = 0; i < BLOCK_SIZE; i++)\n
168168
*(d_dinvA + i*NB + tx) = Bs[i*BLOCK_SIZE + tx]; \n
169169
}\n

src/library/blas/trtri/diag_dtrtri_upper_128_16.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ uint na)\n
5959
__local double workspace[BLOCK_SIZE]; \n // workspace used to store the current working column
6060

6161
// load A
62-
#pragma unroll \n
62+
_Pragma("unroll")\n
6363
for( i=0; i < BLOCK_SIZE; i++ )\n
6464
{\n
6565
if(tx <= i && i+bx*BLOCK_SIZE < na )\n
@@ -111,7 +111,7 @@ uint na)\n
111111
workspace[tx] = *(Bs+i*BLOCK_SIZE+tx);\n
112112
y = Bs+i*BLOCK_SIZE;\n
113113

114-
#pragma unroll\n
114+
_Pragma("unroll")\n
115115
//for( j=tx; j < i; j++ )
116116
for( j=0; j < i; j++ )\n
117117
{\n
@@ -139,7 +139,7 @@ uint na)\n
139139
}\n
140140

141141
// write back A
142-
#pragma unroll\n
142+
_Pragma("unroll")\n
143143
for( i=0; i < BLOCK_SIZE; i++ )\n
144144
{\n
145145
*(d_dinvA+i*NB+tx) = Bs[i*BLOCK_SIZE+tx];\n

src/library/blas/trtri/diag_dtrtri_upper_192_12.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ __local double Bs[BLOCK_SIZE*BLOCK_SIZE]; \n
5959
__local double workspace[BLOCK_SIZE];\n // workspace used to store the current working column
6060

6161
// load A \n
62-
#pragma unroll\n
62+
_Pragma("unroll")\n
6363
for (i = 0; i < BLOCK_SIZE; i++)\n
6464
{ \n
6565
if (tx <= i && i + bx*BLOCK_SIZE < na)\n
@@ -112,7 +112,7 @@ for (i = 0; i < BLOCK_SIZE; i++) {\n
112112
workspace[tx] = *(Bs + i*BLOCK_SIZE + tx); \n
113113
y = Bs + i*BLOCK_SIZE; \n
114114

115-
#pragma unroll\n
115+
_Pragma("unroll")\n
116116
//for( j=tx; j < i; j++ )
117117
for (j = 0; j < i; j++)\n
118118
Ystx += switcher * (*(Bs + j*BLOCK_SIZE + tx)*workspace[j]); \n
@@ -138,7 +138,7 @@ for (i = 0; i < BLOCK_SIZE; i++) {\n
138138
}\n
139139

140140
// write back A
141-
#pragma unroll\n
141+
_Pragma("unroll")\n
142142
for (i = 0; i < BLOCK_SIZE; i++)\n
143143
*(d_dinvA + i*NB + tx) = Bs[i*BLOCK_SIZE + tx]; \n
144144

0 commit comments

Comments
 (0)