MAGMA 2.7.2
Matrix Algebra for GPU and Multicore Architectures

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 ). More...
 
__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. More...
 

Detailed Description

Function Documentation

◆ magma_ceildiv()

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

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 
)
inlinestatic

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.