Skip to content

Commit 397fa45

Browse files
committed
Add clang format
1 parent 50668f5 commit 397fa45

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BasedOnStyle: Microsoft
2+
AccessModifierOffset: '0'
3+
AlignAfterOpenBracket: Align
4+
ColumnLimit: 80

Plugin/SampleBasic/.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BasedOnStyle: Microsoft
2+
AccessModifierOffset: '0'
3+
AlignAfterOpenBracket: Align
4+
ColumnLimit: 80

Plugin/SampleBasic/src/main.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <vector_functions.h>
33
#include "math_constants.h"
44

5-
#define PI 3.1415926f
65

76
__global__ void writeTex(cudaSurfaceObject_t surf, int width, int height, float time) {
87
const unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;
@@ -16,7 +15,9 @@ __global__ void writeTex(cudaSurfaceObject_t surf, int width, int height, float
1615
c.z = 0;
1716
c.w = 255;
1817

19-
surf2Dwrite(c, surf, 4 * x, y);
18+
float4 t = make_float4( c.x / 255.0f, c.y / 255.0f, c.z / 255.0f, c.w / 255.0f );
19+
20+
surf2Dwrite(t, surf, sizeof(float4) * x, y);
2021
}
2122
}
2223

0 commit comments

Comments
 (0)