MAGMA 2.9.0
Matrix Algebra for GPU and Multicore Architectures
Loading...
Searching...
No Matches

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