예제 #1
0
파일: Parameter.cpp 프로젝트: DoDNet/Halide
void Parameter::check_defined() const {
    user_assert(defined()) << "Parameter is undefined\n";
}
예제 #2
0
파일: Parameter.cpp 프로젝트: DoDNet/Halide
void Parameter::check_is_buffer() const {
    check_defined();
    user_assert(contents.ptr->is_buffer) << "Parameter " << name() << " is not a Buffer\n";
}
예제 #3
0
void Parameter::check_dim_ok(int dim) const {
    user_assert(dim >= 0 && dim < dimensions())
            << "Dimension " << dim << " is not in the range [0, " << dimensions() - 1 << "]\n";
}
예제 #4
0
파일: Image.cpp 프로젝트: HalideStar/Halide
void ImageBase::set_min(int m0, int m1, int m2, int m3) {
    user_assert(defined()) << "set_min of undefined Image\n";
    buffer.set_min(m0, m1, m2, m3);
    // Move the origin
    prepare_for_direct_pixel_access();
}
예제 #5
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::top() const {
    user_assert(dimensions() > 1) << "Can't ask for the top of a zero- or one-dimensional image\n";
    return min(1);
}
예제 #6
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::bottom() const {
    user_assert(dimensions() > 1) << "Can't ask for the bottom of a zero- or one-dimensional image\n";
    return Internal::Add::make(min(1), Internal::Sub::make(extent(1), 1));
}
예제 #7
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::right() const {
    user_assert(dimensions() > 0) << "Can't ask for the right of a zero-dimensional image\n";
    return Internal::Add::make(min(0), Internal::Sub::make(extent(0), 1));
}
예제 #8
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::left() const {
    user_assert(dimensions() > 0) << "Can't ask for the left of a zero-dimensional image\n";
    return min(0);
}
예제 #9
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::channels() const {
    user_assert(dimensions() > 2) << "Can't ask for the channels of an image with fewer than three dimensions\n";
    return extent(2);
}
예제 #10
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::height() const {
    user_assert(dimensions() > 1) << "Can't ask for the height of a zero or one-dimensional image\n";
    return extent(1);
}
예제 #11
0
파일: Param.cpp 프로젝트: AheadIO/Halide
Expr OutputImageParam::width() const {
    user_assert(dimensions() > 0) << "Can't ask for the width of a zero-dimensional image\n";
    return extent(0);
}