search for: bvec

Displaying 20 results from an estimated 164 matches for "bvec".

2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <koverstreet at google.com> Cc: Jens Axb...
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <koverstreet at google.com> Cc: Jens Axb...
2013 Jun 09
0
[PATCH 06/26] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <koverstreet at google.com> Cc: Jens Axb...
2013 Jun 09
0
[PATCH 06/26] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <koverstreet at google.com> Cc: Jens Axb...
2013 Jun 09
0
[PATCH 06/26] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <koverstreet at google.com> Cc: Jens Axb...
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
More prep work for immutable biovecs - with immutable bvecs drivers won't be able to use the biovec directly, they'll need to use helpers that take into account bio->bi_iter.bi_bvec_done. This updates callers for the new usage without changing the implementation yet. Signed-off-by: Kent Overstreet <kmo at daterainc.com> Cc: Jens Axboe &l...
2023 Jan 30
1
[PATCH 01/23] block: factor out a bvec_set_page helper
Add a helper to initialize a bvec based of a page pointer. This will help removing various open code bvec initializations. Signed-off-by: Christoph Hellwig <hch at lst.de> --- block/bio-integrity.c | 7 +------ block/bio.c | 12 ++---------- include/linux/bvec.h | 15 +++++++++++++++ 3 files changed, 18 inserti...
2007 Sep 03
2
The quadprog package
...ant it to do. The weights aren't all positive and the \mu isn't reached. What's wrong with my code? Require(quadprog) Dmat<-diag(1,7,7) # muss als quadratische Matrix eingegeben werden Dmat dvec<-matrix(0,7,1) # muss als Spaltenvektor eingegeben werden dvec mu<-0 # (in Mio. €) bvec<-c(1,mu,matrix(0,7,1)) # muss als Spaltenvektor eingegeben werden bvec mu_r<-c(19.7,33.0,0.0,49.7, 82.5, 39.0,11.8) Amat<-matrix(c(matrix(1,1,7),7*mu_r,diag(1,7,7)),9,7,byrow=T) # muss als Matrix angegeben werden, wie sie wirklich ist Amat meq<-2 loesung<-solve.QP(Dmat,dvec,Amat=t(...
2003 Jun 02
1
Help with factorized argument in solve.QP
...matrix R^(-1), such that the Hessian of the objective function is t(R) %*% R. I modified the example in the helpfile slightly to test this out: R = matrix(rnorm(9),3,3) R.inv = solve(R) Dmat = t(R) %*% R dvec = c(0,5,0) Amat = matrix(c(-4,-3,0,2,1,0,0,-2,1),3,3) bvec = c(-8,2,0) x1 = solve.QP(Dmat=Dmat, dvec=dvec, Amat=Amat, bvec=bvec, factorized=FALSE) x2 = solve.QP(Dmat=R.inv, dvec=dvec, Amat=Amat, bvec=bvec, factorized=TRUE) print(x1$solution) print(x2$solution) I would have expected that x1$solution and x2$solution were the same (or num...
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
...drivers/vhost/vringh.c index 0ba3ef809e48..72c88519329a 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -1094,10 +1094,18 @@ EXPORT_SYMBOL(vringh_need_notify_kern); #if IS_REACHABLE(CONFIG_VHOST_IOTLB) +struct iotlb_vec { + union { + struct iovec *iovec; + struct bio_vec *bvec; + } iov; + size_t count; + bool is_iovec; +}; + static int iotlb_translate(const struct vringh *vrh, u64 addr, u64 len, u64 *translated, - struct bio_vec iov[], - int iov_size, u32 perm) + struct iotlb_vec *ivec, u32 perm) { struct vhost_iotlb_map *map; struct vhost_iot...
2010 Feb 19
1
Quadprog help
...-10,0,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,0,-5,0, 0,0,0,0,-1,0,0,-1,0,0,-1,0,0,0,-8,0,0,0,0, 0,-1,0,0,-1,0,0,-1,0,0,0,-10,0,0,1,1,1,0,0, 0,0,0,0,0,0,0,0,-20,0,0,0,0,1,1,1,0,0,0,0,0, 0,0,0,-10,0,0,0,0,0,0,1,1,1),15,15) bvec <-c(0,-2,-2,-2,0,-1,-2,-1,0,-200,-100,-160,-50,-50,-50) solve.QP(Dmat,dvec,Amat,bvec=bvec) Nonetheless I get the message: "Error en solve.QP(Dmat, dvec, Amat, bvec = bvec) : matrix D in quadratic function is not positive definite!". I think it has to do with the fact that in t...
2005 Jan 13
1
how to use solve.QP
...w <= 1=bUp Cov <- var(S) mu <- apply(S, 2, mean) mu.target <- 0.1 #subject to cLo <= A <= cUp and bLo=0 <= b <= 1=bUp A <- rbind(1,mu) cLo <- c(1, mu.target) cUp <- c(1, Inf) bLo <- rep(0, n) bUp <- rep(1, n) #I convert [cLo <= A <= cUp] to Amat >= bvec and [bLo=0 <= w #<=1=bUp] to Amat <- rbind(-1, 1, -mu, mu) dim(bLo) <- c(n,1) dim(bUp) <- c(n,1) bvec <- rbind(-1, 1, mu.target, Inf, bLo, -bUp) zMat <- matrix(rep(0,2*n*n),ncol=n, nrow=n*2) zMat[,1] <- c(rep(1,n), rep(-1,n)) Amat <- t(rbind(Amat, zMat)) #So I set Dmat=C...