Skip to content

Commit 3aa2ae9

Browse files
authored
Merge pull request #169 from emankov/master
[HIPIFY] Formatting
2 parents ae930ec + 64ec1c8 commit 3aa2ae9

25 files changed

+51
-73
lines changed

src/CUDA2HIP.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Maps CUDA header names to HIP header names
26-
const std::map <llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP{
26+
const std::map <llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP {
2727
// CUDA includes
2828
{"cuda.h", {"hip/hip_runtime.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}},
2929
{"cuda_runtime.h", {"hip/hip_runtime.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}},
@@ -82,11 +82,10 @@ const std::map <llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP{
8282
{"caffe2/core/common_cudnn.h", {"caffe2/core/hip/common_miopen.h", "", CONV_INCLUDE, API_CAFFE2}},
8383
};
8484

85-
const std::map<llvm::StringRef, hipCounter>& CUDA_RENAMES_MAP() {
85+
const std::map<llvm::StringRef, hipCounter> &CUDA_RENAMES_MAP() {
8686
static std::map<llvm::StringRef, hipCounter> ret;
87-
if (!ret.empty()) {
87+
if (!ret.empty())
8888
return ret;
89-
}
9089
// First run, so compute the union map.
9190
ret.insert(CUDA_DRIVER_TYPE_NAME_MAP.begin(), CUDA_DRIVER_TYPE_NAME_MAP.end());
9291
ret.insert(CUDA_DRIVER_FUNCTION_MAP.begin(), CUDA_DRIVER_FUNCTION_MAP.end());

src/CUDA2HIP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ extern const std::map<llvm::StringRef, hipCounter> CUDA_CUB_TYPE_NAME_MAP;
7878
* looking in the lookup table for the type of element they are processing, however, saving
7979
* a great deal of time.
8080
*/
81-
const std::map<llvm::StringRef, hipCounter>& CUDA_RENAMES_MAP();
81+
const std::map<llvm::StringRef, hipCounter> &CUDA_RENAMES_MAP();

src/CUDA2HIP_BLAS_API_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Map of all functions
26-
const std::map<llvm::StringRef, hipCounter> CUDA_BLAS_FUNCTION_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_BLAS_FUNCTION_MAP {
2727

2828
// Blas management functions
2929
{"cublasInit", {"hipblasInit", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}},

src/CUDA2HIP_BLAS_API_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Map of all functions
26-
const std::map<llvm::StringRef, hipCounter> CUDA_BLAS_TYPE_NAME_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_BLAS_TYPE_NAME_MAP {
2727
// Blas defines
2828
{"CUBLAS_VER_MAJOR", {"HIPBLAS_VER_MAJOR", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}},
2929
{"CUBLAS_VER_MINOR", {"HIPBLAS_VER_MINOR", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}},

src/CUDA2HIP_CAFFE2_API_functions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Maps the names of CUDA SPARSE API functions to the corresponding HIP functions
26-
const std::map<llvm::StringRef, hipCounter> CUDA_CAFFE2_FUNCTION_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_CAFFE2_FUNCTION_MAP {
2727
{"cuda_stream", {"hip_stream", "", CONV_LIB_FUNC, API_CAFFE2}},
28-
};
28+
};

src/CUDA2HIP_CAFFE2_API_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Map of all types
26-
const std::map<llvm::StringRef, hipCounter> CUDA_CAFFE2_TYPE_NAME_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_CAFFE2_TYPE_NAME_MAP {
2727

2828
// 5. Defines
2929
{"REGISTER_CUDA_OPERATOR", {"REGISTER_HIP_OPERATOR", "", CONV_DEFINE, API_CAFFE2}},

src/CUDA2HIP_CUB_API_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Maps the names of CUDA CUB API types to the corresponding HIP types
26-
const std::map<llvm::StringRef, hipCounter> CUDA_CUB_TYPE_NAME_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_CUB_TYPE_NAME_MAP {
2727
{"cub", {"hipcub", "", CONV_TYPE, API_CUB}},
2828
};

src/CUDA2HIP_Complex_API_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Maps the names of CUDA Complex API functions to the corresponding HIP functions
26-
const std::map<llvm::StringRef, hipCounter> CUDA_COMPLEX_FUNCTION_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_COMPLEX_FUNCTION_MAP {
2727
{"cuCrealf", {"hipCrealf", "", CONV_COMPLEX, API_COMPLEX}},
2828
{"cuCimagf", {"hipCimagf", "", CONV_COMPLEX, API_COMPLEX}},
2929
{"make_cuFloatComplex", {"make_hipFloatComplex", "", CONV_COMPLEX, API_COMPLEX}},

src/CUDA2HIP_Complex_API_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Maps the names of CUDA Complex API types to the corresponding HIP types
26-
const std::map<llvm::StringRef, hipCounter> CUDA_COMPLEX_TYPE_NAME_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_COMPLEX_TYPE_NAME_MAP {
2727
{"cuFloatComplex", {"hipFloatComplex", "", CONV_TYPE, API_COMPLEX}},
2828
{"cuDoubleComplex", {"hipDoubleComplex", "", CONV_TYPE, API_COMPLEX}},
2929
{"cuComplex", {"hipComplex", "", CONV_TYPE, API_COMPLEX}},

src/CUDA2HIP_DNN_API_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
#include "CUDA2HIP.h"
2424

2525
// Map of all functions
26-
const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
26+
const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP {
2727

2828
{"cudnnGetVersion", {"hipdnnGetVersion", "", CONV_LIB_FUNC, API_DNN}},
2929
{"cudnnGetCudartVersion", {"hipdnnGetCudartVersion", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},

0 commit comments

Comments
 (0)