-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcutil.h
23 lines (18 loc) · 819 Bytes
/
lcutil.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* lcutil.h: This file is part of the mixbench GPU micro-benchmark suite.
*
* Contact: Elias Konstantinidis <[email protected]>
**/
#ifndef _CUTIL_H_
#define _CUTIL_H_
#include <stdio.h>
#include "hip/hip_runtime.h"
#define HIP_SAFE_CALL( call) { \
hipError_t err = call; \
if( hipSuccess != err) { \
fprintf(stderr, "HIP error in file '%s' in line %i : %s.\n", \
__FILE__, __LINE__, hipGetErrorString( err) ); \
exit(EXIT_FAILURE); \
} }
#define FRACTION_CEILING(numerator, denominator) ((numerator+denominator-1)/(denominator))
#endif