mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
util/macros: Move DIV_ROUND_UP to util/macros.h
Move DIV_ROUND_UP to a shared location accessible everywhere Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
parent
405c7d7511
commit
64880d073a
3 changed files with 3 additions and 6 deletions
|
|
@ -35,8 +35,6 @@
|
|||
#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
|
||||
#endif
|
||||
|
||||
#define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y))
|
||||
|
||||
#define max_t(type, x, y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
#include "util/macros.h"
|
||||
#include "util/u_math.h"
|
||||
#include "imports.h"
|
||||
|
||||
|
|
@ -800,10 +801,6 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y)
|
|||
}
|
||||
|
||||
|
||||
/** Compute ceiling of integer quotient of A divided by B. */
|
||||
#define DIV_ROUND_UP( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
|
||||
|
||||
|
||||
/** casts to silence warnings with some compilers */
|
||||
#define ENUM_TO_INT(E) ((GLint)(E))
|
||||
#define ENUM_TO_FLOAT(E) ((GLfloat)(GLint)(E))
|
||||
|
|
|
|||
|
|
@ -182,5 +182,7 @@ do { \
|
|||
#define UNUSED
|
||||
#endif
|
||||
|
||||
/** Compute ceiling of integer quotient of A divided by B. */
|
||||
#define DIV_ROUND_UP( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
|
||||
|
||||
#endif /* UTIL_MACROS_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue