[polly] r262917 - Also clang-format *.c run-time library files
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 23:34:58 PST 2016
Author: grosser
Date: Tue Mar 8 01:34:58 2016
New Revision: 262917
URL: http://llvm.org/viewvc/llvm-project?rev=262917&view=rev
Log:
Also clang-format *.c run-time library files
Modified:
polly/trunk/CMakeLists.txt
polly/trunk/tools/GPURuntime/GPUJIT.c
Modified: polly/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/CMakeLists.txt?rev=262917&r1=262916&r2=262917&view=diff
==============================================================================
--- polly/trunk/CMakeLists.txt (original)
+++ polly/trunk/CMakeLists.txt Tue Mar 8 01:34:58 2016
@@ -165,12 +165,13 @@ configure_file( ${CMAKE_CURRENT_SOURCE_D
${POLLY_BINARY_DIR}/include/polly/Config/config.h )
# Add target to check formatting of polly files
-file( GLOB_RECURSE files *.h *.cpp)
+file( GLOB_RECURSE files *.h *.cpp *.c)
+file( GLOB_RECURSE wwwfiles www/*)
file( GLOB_RECURSE jsonfiles lib/JSON/*.h lib/JSON/*.cpp)
file( GLOB_RECURSE islfiles lib/External/isl/*.h lib/External/isl/*.c
lib/External/isl/include/isl/*.h lib/External/isl/imath/*.h
lib/External/isl/imath/*.c)
-list( REMOVE_ITEM files ${jsonfiles} ${islfiles})
+list( REMOVE_ITEM files ${jsonfiles} ${islfiles} ${wwwfiles})
set(check_format_depends)
set(update_format_depends)
Modified: polly/trunk/tools/GPURuntime/GPUJIT.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.c?rev=262917&r1=262916&r2=262917&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.c (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.c Tue Mar 8 01:34:58 2016
@@ -53,8 +53,8 @@ static CuMemAllocFcnTy *CuMemAllocFcnPtr
typedef CUresult CUDAAPI CuFuncSetBlockShapeFcnTy(CUfunction, int, int, int);
static CuFuncSetBlockShapeFcnTy *CuFuncSetBlockShapeFcnPtr;
-typedef CUresult CUDAAPI
-CuParamSetvFcnTy(CUfunction, int, void *, unsigned int);
+typedef CUresult CUDAAPI CuParamSetvFcnTy(CUfunction, int, void *,
+ unsigned int);
static CuParamSetvFcnTy *CuParamSetvFcnPtr;
typedef CUresult CUDAAPI CuParamSetSizeFcnTy(CUfunction, unsigned int);
@@ -90,12 +90,13 @@ static CuCtxCreateFcnTy *CuCtxCreateFcnP
typedef CUresult CUDAAPI CuDeviceGetFcnTy(CUdevice *, int);
static CuDeviceGetFcnTy *CuDeviceGetFcnPtr;
-typedef CUresult CUDAAPI CuModuleLoadDataExFcnTy(
- CUmodule *, const void *, unsigned int, CUjit_option *, void **);
+typedef CUresult CUDAAPI CuModuleLoadDataExFcnTy(CUmodule *, const void *,
+ unsigned int, CUjit_option *,
+ void **);
static CuModuleLoadDataExFcnTy *CuModuleLoadDataExFcnPtr;
-typedef CUresult CUDAAPI
-CuModuleGetFunctionFcnTy(CUfunction *, CUmodule, const char *);
+typedef CUresult CUDAAPI CuModuleGetFunctionFcnTy(CUfunction *, CUmodule,
+ const char *);
static CuModuleGetFunctionFcnTy *CuModuleGetFunctionFcnPtr;
typedef CUresult CUDAAPI CuDeviceComputeCapabilityFcnTy(int *, int *, CUdevice);
@@ -114,8 +115,8 @@ static CudaEventRecordFcnTy *CudaEventRe
typedef cudaError_t CUDARTAPI CudaEventSynchronizeFcnTy(cudaEvent_t);
static CudaEventSynchronizeFcnTy *CudaEventSynchronizeFcnPtr;
-typedef cudaError_t CUDARTAPI
-CudaEventElapsedTimeFcnTy(float *, cudaEvent_t, cudaEvent_t);
+typedef cudaError_t CUDARTAPI CudaEventElapsedTimeFcnTy(float *, cudaEvent_t,
+ cudaEvent_t);
static CudaEventElapsedTimeFcnTy *CudaEventElapsedTimeFcnPtr;
typedef cudaError_t CUDARTAPI CudaEventDestroyFcnTy(cudaEvent_t);
@@ -292,7 +293,7 @@ void polly_getPTXModule(void *PTXBuffer,
}
if (CuModuleLoadDataExFcnPtr(&((*Module)->Cuda), PTXBuffer, 0, 0, 0) !=
- CUDA_SUCCESS) {
+ CUDA_SUCCESS) {
fprintf(stdout, "Loading ptx assembly text failed.\n");
exit(-1);
}
@@ -308,7 +309,7 @@ void polly_getPTXKernelEntry(const char
/* Locate the kernel entry point. */
if (CuModuleGetFunctionFcnPtr(&((*Kernel)->Cuda), Module->Cuda, KernelName) !=
- CUDA_SUCCESS) {
+ CUDA_SUCCESS) {
fprintf(stdout, "Loading kernel function failed.\n");
exit(-1);
}
@@ -348,8 +349,9 @@ void polly_stopTimerByCudaEvent(PollyGPU
free(Stop);
}
-void polly_allocateMemoryForHostAndDevice(
- void **HostData, PollyGPUDevicePtr **DevData, int MemSize) {
+void polly_allocateMemoryForHostAndDevice(void **HostData,
+ PollyGPUDevicePtr **DevData,
+ int MemSize) {
if ((*HostData = (int *)malloc(MemSize)) == 0) {
fprintf(stdout, "Could not allocate host memory.\n");
exit(-1);
@@ -398,9 +400,10 @@ void polly_launchKernel(PollyGPUFunction
fprintf(stdout, "CUDA kernel launched.\n");
}
-void polly_cleanupGPGPUResources(
- void *HostData, PollyGPUDevicePtr *DevData, PollyGPUModule *Module,
- PollyGPUContext *Context, PollyGPUFunction *Kernel) {
+void polly_cleanupGPGPUResources(void *HostData, PollyGPUDevicePtr *DevData,
+ PollyGPUModule *Module,
+ PollyGPUContext *Context,
+ PollyGPUFunction *Kernel) {
if (HostData) {
free(HostData);
HostData = 0;
More information about the llvm-commits
mailing list