MAGMA  2.3.0
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages

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

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

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