Exemplo n.º 1
0
    bool AveragingBinarizationAutoTest(const Func2 & f1, const Func2 & f2)
    {
        bool result = true;

        for(SimdCompareType type = SimdCompareEqual; type <= SimdCompareLesserOrEqual && result; type = SimdCompareType(type + 1))
        {
            result = result && AveragingBinarizationAutoTest(ARGS2(W, H, type, f1, f2));
            result = result && AveragingBinarizationAutoTest(ARGS2(W + O, H - O, type, f1, f2));
            result = result && AveragingBinarizationAutoTest(ARGS2(W - O, H + O, type, f1, f2));
        }

        return result;
    }
Exemplo n.º 2
0
int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file file, off_t offset,
    uv_fs_cb cb) {
  char* path = NULL;
  WRAP_EIO(UV_FS_FTRUNCATE, eio_ftruncate, ftruncate, ARGS2(file, offset))
}
Exemplo n.º 3
0
int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file file, int mode,
    uv_fs_cb cb) {
  char* path = NULL;
  WRAP_EIO(UV_FS_FCHMOD, eio_fchmod, fchmod, ARGS2(file, mode))
}
Exemplo n.º 4
0
        write(file, buf, length) :
        pwrite(file, buf, length, offset);

    if (req->result < 0) {
      uv_err_new(loop, errno);
      return -1;
    }
  }

  return 0;
}


int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode,
    uv_fs_cb cb) {
  WRAP_EIO(UV_FS_MKDIR, eio_mkdir, mkdir, ARGS2(path, mode))
}


int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
  WRAP_EIO(UV_FS_RMDIR, eio_rmdir, rmdir, ARGS1(path))
}


int uv_fs_readdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags,
    uv_fs_cb cb) {
  int r;
  struct dirent* entry;
  size_t size = 0;
  size_t d_namlen = 0;