From e1afc53b51d24afcfd8b8aab15e4ba5d99b4a772 Mon Sep 17 00:00:00 2001 From: Aaron Barnes <42706182+barnes88@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:33:16 -0600 Subject: Auto clang format (#74) * add automated clang formatter * Automated clang-format * use /bin/bash and add print * use default checkout ref * Format only after tests are success * Run CI on merge group --------- Co-authored-by: barnes88 Co-authored-by: JRPAN <25518778+JRPan@users.noreply.github.com> --- libcuda/cuda_runtime_api.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libcuda') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 5866b36..b64c3d9 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -133,16 +133,16 @@ #if (CUDART_VERSION < 8000) #include "__cudaFatFormat.h" #endif -#include "gpgpu_context.h" -#include "cuda_api_object.h" -#include "../src/gpgpu-sim/gpu-sim.h" -#include "../src/cuda-sim/ptx_loader.h" +#include "../src/abstract_hardware_model.h" #include "../src/cuda-sim/cuda-sim.h" #include "../src/cuda-sim/ptx_ir.h" +#include "../src/cuda-sim/ptx_loader.h" #include "../src/cuda-sim/ptx_parser.h" +#include "../src/gpgpu-sim/gpu-sim.h" #include "../src/gpgpusim_entrypoint.h" #include "../src/stream_manager.h" -#include "../src/abstract_hardware_model.h" +#include "cuda_api_object.h" +#include "gpgpu_context.h" #include #include @@ -464,7 +464,7 @@ static int get_app_cuda_version() { " | grep libcudart.so | sed 's/.*libcudart.so.\\(.*\\) =>.*/\\1/' > " + fname; int res = system(app_cuda_version_command.c_str()); - if(res == -1){ + if (res == -1) { printf("Error - Cannot detect the app's CUDA version.\n"); exit(1); } @@ -3239,8 +3239,8 @@ char *readfile(const std::string filename) { // allocate and copy the entire ptx char *ret = (char *)malloc((filesize + 1) * sizeof(char)); int num = fread(ret, 1, filesize, fp); - if(num == 0){ - std::cout << "ERROR: Could not read data from file %s\n" + if (num == 0) { + std::cout << "ERROR: Could not read data from file %s\n" << filename << std::endl; assert(0); } -- cgit v1.3