<commit_before>#ifndef HALIDE_PYTHON_BINDINGS_add_binary_operators_H
#define HALIDE_PYTHON_BINDINGS_add_binary_operators_H

#include <boost/python/operators.hpp>
#include <boost/python/self.hpp>

// Note that we deliberately produce different semantics for division in Python3:
// to match Halide C++ division semantics, a signed-integer division is always
// a floordiv rather than a truediv.
template <typename A, typename B>
auto floordiv(A a, B b) -> decltype(a / b) {
    static_assert(std::is_same<decltype(a / b), Halide::Expr>::value,
                  "We expect all operator// overloads to produce Halide::Expr");
    Halide::Expr e = a / b;
    if (e.type().is_float()) {
        e = Halide::floor(e);
    }
    return e;
}

template <typename T, typename PythonClass>
void add_binary_operators_with(PythonClass &class_instance) {
    using namespace boost::python;<commit_msg>Add missing #include<commit_after>#ifndef HALIDE_PYTHON_BINDINGS_add_binary_operators_H
#define HALIDE_PYTHON_BINDINGS_add_binary_operators_H

#include <boost/python/operators.hpp>
#include <boost/python/self.hpp>

#include "Halide.h"

// Note that we deliberately produce different semantics for division in Python3:
// to match Halide C++ division semantics, a signed-integer division is always
// a floordiv rather than a truediv.
template <typename A, typename B>
auto floordiv(A a, B b) -> decltype(a / b) {
    static_assert(std::is_same<decltype(a / b), Halide::Expr>::value,
                  "We expect all operator// overloads to produce Halide::Expr");
    Halide::Expr e = a / b;
    if (e.type().is_float()) {
        e = Halide::floor(e);
    }
    return e;
}

template <typename T, typename PythonClass>
void add_binary_operators_with(PythonClass &class_instance) {
    using namespace boost::python;
{'fraction_non_alphanumeric': 0.10920177383592018, 'fraction_numerical': 0.0011086474501108647, 'mean_word_length': 4.262390670553936, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '4725789', 'n_tokens_mistral': 592, 'n_tokens_neox': 574, 'n_words': 163}