Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include"hipDeviceUtil.h"
|
||||
#include "hipDeviceUtil.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
int pi;
|
||||
int attr = 0;
|
||||
// hipDeviceAttribute_t attr = hipDeviceAttributeMaxThreadsPerBlock;
|
||||
// hipDeviceAttribute_t attr = hipDeviceAttributeMaxThreadsPerBlock;
|
||||
HIP_CHECK(hipDeviceGetAttribute(NULL, hipDeviceAttribute_t(attr), 0), hipDeviceGetAttribute);
|
||||
HIP_CHECK(hipDeviceGetAttribute(&pi, hipDeviceAttribute_t(attr), 0), hipDeviceGetAttribute);
|
||||
attr = -1;
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
#define HIPDEVICEUTIL_H
|
||||
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include<iostream>
|
||||
#include <iostream>
|
||||
|
||||
#define HIP_CHECK(status, func) \
|
||||
std::cout<<#func<<" returned "<<hipGetErrorString(status)<<" in "<<__func__<<" at "<<__LINE__<<" in file "<<__FILE__<<std::endl;
|
||||
#define HIP_CHECK(status, func) \
|
||||
std::cout << #func << " returned " << hipGetErrorString(status) << " in " << __func__ \
|
||||
<< " at " << __LINE__ << " in file " << __FILE__ << std::endl;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include"hipDeviceUtil.h"
|
||||
#include "hipDeviceUtil.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
int device;
|
||||
HIP_CHECK(hipGetDevice(NULL), hipGetDevice);
|
||||
HIP_CHECK(hipGetDevice(&device), hipGetDevice);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include"hipDeviceUtil.h"
|
||||
#include "hipDeviceUtil.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
int deviceCnt;
|
||||
HIP_CHECK(hipGetDeviceCount(&deviceCnt), hipGetDeviceCount);
|
||||
HIP_CHECK(hipGetDeviceCount(0), hipGetDeviceCount);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include"hipDeviceUtil.h"
|
||||
#include "hipDeviceUtil.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, 0), hipGetDeviceProperties);
|
||||
HIP_CHECK(hipGetDeviceProperties(NULL, 0), hipGetDeviceProperties);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include"hipDeviceUtil.h"
|
||||
#include "hipDeviceUtil.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
HIP_CHECK(hipSetDevice(0), hipSetDevice);
|
||||
HIP_CHECK(hipSetDevice(1026), hipSetDevice);
|
||||
HIP_CHECK(hipSetDevice(-1), hipSetDevice);
|
||||
|
||||
Reference in New Issue
Block a user