summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/SeparateCompilation
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CudaOnly/SeparateCompilation')
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file1.cu2
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file2.cu14
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file3.cu11
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file4.cu10
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file5.cu10
-rw-r--r--Tests/CudaOnly/SeparateCompilation/main.cu2
6 files changed, 19 insertions, 30 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/file1.cu b/Tests/CudaOnly/SeparateCompilation/file1.cu
index a2e8bf3..1ce63bf 100644
--- a/Tests/CudaOnly/SeparateCompilation/file1.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file1.cu
@@ -5,6 +5,6 @@ result_type __device__ file1_func(int x)
{
result_type r;
r.input = x;
- r.sum = x*x;
+ r.sum = x * x;
return r;
}
diff --git a/Tests/CudaOnly/SeparateCompilation/file2.cu b/Tests/CudaOnly/SeparateCompilation/file2.cu
index 6b8b06b..74f3558 100644
--- a/Tests/CudaOnly/SeparateCompilation/file2.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file2.cu
@@ -5,16 +5,12 @@ result_type __device__ file1_func(int x);
result_type_dynamic __device__ file2_func(int x)
{
- if(x!=42)
- {
+ if (x != 42) {
const result_type r = file1_func(x);
- const result_type_dynamic rd { r.input, r.sum, true };
+ const result_type_dynamic rd{ r.input, r.sum, true };
return rd;
- }
- else
- {
- const result_type_dynamic rd { x, x*x*x, false };
+ } else {
+ const result_type_dynamic rd{ x, x * x * x, false };
return rd;
- }
-
+ }
}
diff --git a/Tests/CudaOnly/SeparateCompilation/file3.cu b/Tests/CudaOnly/SeparateCompilation/file3.cu
index 670a18b..155b513 100644
--- a/Tests/CudaOnly/SeparateCompilation/file3.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file3.cu
@@ -6,13 +6,10 @@
result_type __device__ file1_func(int x);
result_type_dynamic __device__ file2_func(int x);
-
-static
-__global__
-void file3_kernel(result_type& r, int x)
+static __global__ void file3_kernel(result_type& r, int x)
{
- //call static_func which is a method that is defined in the
- //static library that is always out of date
+ // call static_func which is a method that is defined in the
+ // static library that is always out of date
r = file1_func(x);
result_type_dynamic rd = file2_func(x);
}
@@ -20,6 +17,6 @@ void file3_kernel(result_type& r, int x)
result_type file3_launch_kernel(int x)
{
result_type r;
- file3_kernel <<<1,1>>> (r,x);
+ file3_kernel<<<1, 1>>>(r, x);
return r;
}
diff --git a/Tests/CudaOnly/SeparateCompilation/file4.cu b/Tests/CudaOnly/SeparateCompilation/file4.cu
index 86ef623..2e3e01e 100644
--- a/Tests/CudaOnly/SeparateCompilation/file4.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file4.cu
@@ -7,12 +7,10 @@
result_type __device__ file1_func(int x);
result_type_dynamic __device__ file2_func(int x);
-static
-__global__
-void file4_kernel(result_type& r, int x)
+static __global__ void file4_kernel(result_type& r, int x)
{
- //call static_func which is a method that is defined in the
- //static library that is always out of date
+ // call static_func which is a method that is defined in the
+ // static library that is always out of date
r = file1_func(x);
result_type_dynamic rd = file2_func(x);
}
@@ -20,6 +18,6 @@ void file4_kernel(result_type& r, int x)
int file4_launch_kernel(int x)
{
result_type r;
- file4_kernel <<<1,1>>> (r,x);
+ file4_kernel<<<1, 1>>>(r, x);
return r.sum;
}
diff --git a/Tests/CudaOnly/SeparateCompilation/file5.cu b/Tests/CudaOnly/SeparateCompilation/file5.cu
index 6fdb32a..fee8e9e 100644
--- a/Tests/CudaOnly/SeparateCompilation/file5.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file5.cu
@@ -7,12 +7,10 @@
result_type __device__ file1_func(int x);
result_type_dynamic __device__ file2_func(int x);
-static
-__global__
-void file5_kernel(result_type& r, int x)
+static __global__ void file5_kernel(result_type& r, int x)
{
- //call static_func which is a method that is defined in the
- //static library that is always out of date
+ // call static_func which is a method that is defined in the
+ // static library that is always out of date
r = file1_func(x);
result_type_dynamic rd = file2_func(x);
}
@@ -20,6 +18,6 @@ void file5_kernel(result_type& r, int x)
int file5_launch_kernel(int x)
{
result_type r;
- file5_kernel <<<1,1>>> (r,x);
+ file5_kernel<<<1, 1>>>(r, x);
return r.sum;
}
diff --git a/Tests/CudaOnly/SeparateCompilation/main.cu b/Tests/CudaOnly/SeparateCompilation/main.cu
index 5c8e150..03e0921 100644
--- a/Tests/CudaOnly/SeparateCompilation/main.cu
+++ b/Tests/CudaOnly/SeparateCompilation/main.cu
@@ -7,7 +7,7 @@
int file4_launch_kernel(int x);
int file5_launch_kernel(int x);
-int main(int argc, char **argv)
+int main(int argc, char** argv)
{
file4_launch_kernel(42);
file5_launch_kernel(42);