Make UEFI boot-platform build again
[haiku.git] / headers / private / graphics / radeon / utils.h
blob0175534b74f8c3db24517a41041b6aaea6ad7b67
1 /*
2 Copyright (c) 2002/03, Thomas Kurschel
5 Part of Radeon accelerant
7 Utility functions
8 */
10 #ifndef _UTILS_H
11 #define _UTILS_H
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
18 extern int radeon_log2( uint32 x );
20 static inline int RoundDiv( int num, int den )
22 return (num + (den / 2)) / den;
25 static inline int32 RoundDiv64( int64 num, int32 den )
27 return (num + (den / 2)) / den;
30 static inline int ceilShiftDiv( int num, int shift )
32 return (num + (1 << shift) - 1) >> shift;
35 static inline int ceilDiv( int num, int den )
37 return (num + den - 1) / den;
40 // macros for fixed-point calculation
41 #define FIX_SHIFT 32
42 #define FIX_SCALE (1LL << FIX_SHIFT)
44 #ifdef __cplusplus
46 #endif
48 #endif