コード例 #1
0
ファイル: show.hpp プロジェクト: diegofps/wup
    virtual void
    onFinish()
    {
        if (_noPrint)
            return;

        if (_eachStep)
            return;

#ifdef __ANDROID_API__
        const int numRows = _bundle.numRows();
        const int numCols = _bundle.numCols();
        std::stringstream ss;

        LOGD("%s : %d", _label.c_str(), _onlySample);
        for (int i=0;i<numRows; ++i) {
            ss.clear();
            for (int j=0;j<numCols; ++j)
                ss << _bundle(i, j) << ", ";
            LOGD("%d: %s", i, ss.str().c_str());
        }
#else
        print(_label, " : ", _onlySample);
        print(_bundle);
#endif
        _bundle.clear();
    }
コード例 #2
0
ファイル: bundle.hpp プロジェクト: diegofps/wup
    BundleView(Bundle<T> & bundle, const uint i1, const uint j1, const uint i2, const uint j2) :
        data(&bundle(i1, j1)),
        cols(j2-j1),
        rows(i2-i1),
        stride(bundle.numCols())
    {
#ifndef WUP_UNSAFE
        if (i1 < 0 || j1 < 0 || i2 > bundle.numRows() || j2 > bundle.numCols() || i2 <= i1 || j2 <= j1)
            throw WUPException("Out of bounds");
#endif
    }