Loading...
Searching...
No Matches
ceil(x/y) and ceil(x/y)*y
Dense LA » MAGMA BLAS and Auxiliary » Math functions (sqrt, etc.), O(1) work

## Functions

__host__ static __device__ magma_int_t | magma_ceildiv (magma_int_t x, magma_int_t y)
| For integers x >= 0, y > 0, returns ceil( x/y ).
__host__ static __device__ magma_int_t | magma_roundup (magma_int_t x, magma_int_t y)
| For integers x >= 0, y > 0, returns x rounded up to multiple of y.

## Detailed Description

## Function Documentation

## magma_ceildiv()

__host__ static __device__ magma_int_t magma_ceildiv | ( | magma_int_t | x,
|  | magma_int_t | y )

inline static

For integers x >= 0, y > 0, returns ceil( x/y ).

For x == 0, this is 0.

## magma_roundup()

__host__ static __device__ magma_int_t magma_roundup | ( | magma_int_t | x,
|  | magma_int_t | y )

inline static

For integers x >= 0, y > 0, returns x rounded up to multiple of y.

That is, ceil(x/y)*y. For x == 0, this is 0. This implementation does not assume y is a power of 2.