<commit_before>#ifndef ADDR_HH
#define ADDR_HH

constexpr
reg_t *operator"" _phys(unsigned long long addr) {
    return (reg_t *) addr;
}

constexpr
reg_t *operator"" _bus(unsigned long long addr) {
    /*
     * The spec defines peripherals in terms of bus addresses when we want
     * physical addresses
     */
    return (reg_t *) (addr - 0x7E000000 + 0x20000000);
}

/**
 * Convert a byte count into a word count.
 */
constexpr
auto words(size_t bytes) -> size_t {
    return bytes / sizeof(word_t);
}

/**
 * Convert a word count into a byte count.
 */
constexpr
auto bytes(size_t words) -> const size_t {
    return words * sizeof(word_t);
}

#endif /* ADDR_HH */

<commit_msg>Removed redundant const qualifier.<commit_after>#ifndef ADDR_HH
#define ADDR_HH

constexpr
reg_t *operator"" _phys(unsigned long long addr) {
    return (reg_t *) addr;
}

constexpr
reg_t *operator"" _bus(unsigned long long addr) {
    /*
     * The spec defines peripherals in terms of bus addresses when we want
     * physical addresses
     */
    return (reg_t *) (addr - 0x7E000000 + 0x20000000);
}

/**
 * Convert a byte count into a word count.
 */
constexpr
auto words(size_t bytes) -> size_t {
    return bytes / sizeof(word_t);
}

/**
 * Convert a word count into a byte count.
 */
constexpr
auto bytes(size_t words) -> size_t {
    return words * sizeof(word_t);
}

#endif /* ADDR_HH */


{'fraction_non_alphanumeric': 0.11046931407942238, 'fraction_numerical': 0.02454873646209386, 'mean_word_length': 3.225609756097561, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '854975', 'n_tokens_mistral': 491, 'n_tokens_neox': 461, 'n_words': 152}