Split Buffer::assert_can_convert_from() into two methods.
Split Buffer::assert_can_convert_from() into two methods.

The logic in assert_can_convert_from() is useful, and desirable to
avoid repeating outside this class; however, it’s only reliable if
assert() is not disabled at compile time, and I’d like to use it in a
context (Generator stubs) where that might be the case.

Therefore: split the main logic into Buffer::can_convert_from(),
allowing a caller to detect-and-fail as it sees fit (e.g., using
Halide’s internal_assert or user_assert).

psuriana/Halide,psuriana/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide