aboutsummaryrefslogtreecommitdiff
path: root/test cases/cuda
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com>2019-11-18 15:21:37 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-11-18 22:21:36 +0200
commit83b4e981c4dd8b8ea521a6150a34636d10a67211 (patch)
tree3ac84e307e6a2589073a7542a0d7127738f09576 /test cases/cuda
parent0435691e83fb7172e2a9635d2eb32d5521089916 (diff)
downloadmeson-83b4e981c4dd8b8ea521a6150a34636d10a67211.zip
meson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.gz
meson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.bz2
Use strict function prototypes
Diffstat (limited to 'test cases/cuda')
-rw-r--r--test cases/cuda/10 cuda dependency/c/prog.c2
-rw-r--r--test cases/cuda/10 cuda dependency/cpp/prog.cc4
-rw-r--r--test cases/cuda/10 cuda dependency/modules/prog.cc6
-rw-r--r--test cases/cuda/10 cuda dependency/version_reqs/prog.cc4
-rw-r--r--test cases/cuda/12 cuda dependency (mixed)/prog.cpp6
5 files changed, 11 insertions, 11 deletions
diff --git a/test cases/cuda/10 cuda dependency/c/prog.c b/test cases/cuda/10 cuda dependency/c/prog.c
index 9d279a9..e2429a6 100644
--- a/test cases/cuda/10 cuda dependency/c/prog.c
+++ b/test cases/cuda/10 cuda dependency/c/prog.c
@@ -7,7 +7,7 @@ int cuda_devices() {
return result;
}
-int main() {
+int main(void) {
int n = cuda_devices();
if (n == 0) {
printf("No CUDA hardware found. Exiting.\n");
diff --git a/test cases/cuda/10 cuda dependency/cpp/prog.cc b/test cases/cuda/10 cuda dependency/cpp/prog.cc
index 728debc..4832afa 100644
--- a/test cases/cuda/10 cuda dependency/cpp/prog.cc
+++ b/test cases/cuda/10 cuda dependency/cpp/prog.cc
@@ -1,13 +1,13 @@
#include <cuda_runtime.h>
#include <iostream>
-int cuda_devices() {
+int cuda_devices(void) {
int result = 0;
cudaGetDeviceCount(&result);
return result;
}
-int main() {
+int main(void) {
int n = cuda_devices();
if (n == 0) {
std::cout << "No CUDA hardware found. Exiting.\n";
diff --git a/test cases/cuda/10 cuda dependency/modules/prog.cc b/test cases/cuda/10 cuda dependency/modules/prog.cc
index 7c52b3f..b4af4d4 100644
--- a/test cases/cuda/10 cuda dependency/modules/prog.cc
+++ b/test cases/cuda/10 cuda dependency/modules/prog.cc
@@ -2,13 +2,13 @@
#include <cublas_v2.h>
#include <iostream>
-int cuda_devices() {
+int cuda_devices(void) {
int result = 0;
cudaGetDeviceCount(&result);
return result;
}
-int main() {
+int main(void) {
int n = cuda_devices();
if (n == 0) {
std::cout << "No CUDA hardware found. Exiting.\n";
@@ -24,7 +24,7 @@ int main() {
}
std::cout << "Initialized cuBLAS\n";
- if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) {
+ if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) {
std::cout << "cuBLAS de-initialization failed. Exiting.\n";
return -1;
}
diff --git a/test cases/cuda/10 cuda dependency/version_reqs/prog.cc b/test cases/cuda/10 cuda dependency/version_reqs/prog.cc
index e3adabf..5668830 100644
--- a/test cases/cuda/10 cuda dependency/version_reqs/prog.cc
+++ b/test cases/cuda/10 cuda dependency/version_reqs/prog.cc
@@ -1,13 +1,13 @@
#include <cuda_runtime.h>
#include <iostream>
-int cuda_devices() {
+int cuda_devices(void) {
int result = 0;
cudaGetDeviceCount(&result);
return result;
}
-int main() {
+int main(void) {
std::cout << "Compiled against CUDA version: " << CUDART_VERSION << "\n";
int runtime_version = 0;
cudaError_t r = cudaRuntimeGetVersion(&runtime_version);
diff --git a/test cases/cuda/12 cuda dependency (mixed)/prog.cpp b/test cases/cuda/12 cuda dependency (mixed)/prog.cpp
index daf9102..85e5148 100644
--- a/test cases/cuda/12 cuda dependency (mixed)/prog.cpp
+++ b/test cases/cuda/12 cuda dependency (mixed)/prog.cpp
@@ -4,13 +4,13 @@
void do_cuda_stuff();
-int cuda_devices() {
+int cuda_devices(void) {
int result = 0;
cudaGetDeviceCount(&result);
return result;
}
-int main() {
+int main(void) {
int n = cuda_devices();
if (n == 0) {
std::cout << "No CUDA hardware found. Exiting.\n";
@@ -28,7 +28,7 @@ int main() {
}
std::cout << "Initialized cuBLAS\n";
- if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) {
+ if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) {
std::cout << "cuBLAS de-initialization failed. Exiting.\n";
return -1;
}