Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for divRoundUp (0.1 sec)

  1. src/runtime/stubs.go

    }
    
    // alignDown rounds n down to a multiple of a. a must be a power of 2.
    //
    //go:nosplit
    func alignDown(n, a uintptr) uintptr {
    	return n &^ (a - 1)
    }
    
    // divRoundUp returns ceil(n / a).
    func divRoundUp(n, a uintptr) uintptr {
    	// a is generally a power of two. This will get inlined and
    	// the compiler will optimize the division.
    	return (n + a - 1) / a
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 20.2K bytes
    - Viewed (0)
Back to top