search for: kvec

Displaying 20 results from an estimated 86 matches for "kvec".

Did you mean: bvec
2011 Aug 26
3
How to vectorize a function to handle two vectors
...nction(u){Re(exp(-1i*u*k)*phi(u - 1i/2, t)/(u^2 + 1/4))}; res <- 1 - exp(k/2)/pi*integrate(integrand,lower=0,upper=Inf)$value; return(res); } subHeston <- c(0.6067,-0.7571,0.2928,0.0707,0.0654); kV <- c(0.9,1,1.2,1.3) tV <- c(0.1,0.4,0.5, 1) HestonCallVec <- function(phi, kVec, t) { sapply(kVec, function(k){Price_call(phi, k, t)}) } HestonCallVec(phiHeston(subHeston), kV, 1) subHeston <- c(0.6067,-0.7571,0.2928,0.0707,0.0654); kV <- c(0.9,1,1.2,1.3) tV <- c(0.1,0.4,0.5, 1) HestonCallVec2 <- function(phi, kVec, tVec) { sapply(tVec, function(t){HestonCallVec(...
2010 Jan 24
3
Display of results
Dear R-helpers, I have been trying to carry out some variance ratio tests such as Lo-MacKinlay test and Chow-Denning test. However, When I write the function LM <- Lo.Mac(y,kvec) or any other functions I don’t get the results displayed. The only sign I get is < I don’t understand what’s wrong (is it the package, misspecification of the function, Vista). I am really stuck in and I would be grateful for any hints that may help me get the results displayed. Many thanks...
2011 Aug 17
2
An example of very slow computation
...) } getpred<-function(theta, t){ k<-exp(theta[1:3]) sigma<-exp(theta[4]) A<-rbind( c(-k[1], k[2]), c( k[1], -(k[2]+k[3])) ) x0<-c(0,100) sol<-function(tt)100-sum(expm(A*tt)%*%x0) pred<-sapply(t,sol) } Mpred <- function(theta) { # WARNING: assumes t global kvec<-exp(theta[1:3]) k1<-kvec[1] k2<-kvec[2] k3<-kvec[3] # MIN problem terbuthylazene disappearance z<-k1+k2+k3 y<-z*z-4*k1*k3 l1<-0.5*(-z+sqrt(y)) l2<-0.5*(-z-sqrt(y)) val<-100*(1-((k1+k2+l2)*exp(l2*t)-(k1+k2+l1)*exp(l1*t))/(l2-l1)) } # val should be a...
2008 Feb 26
2
Patch to add debugfs interface to o2net
This is a forward port for net_proc.c from 1.2.
2019 May 14
2
[PATCH v2 7/8] vsock/virtio: increase RX buffer size to 64 KiB
...worth it. > Of course, if we leave the datapaths separated, I'd like to do that later. > > What do you think? For the driver it self, it should not be hard. But I think you mean the issue of e.g virtio_vsock_pkt itself which doesn't support sg. For short time, maybe we can use kvec instead. Thanks > > Thanks, > Stefano
2019 May 14
2
[PATCH v2 7/8] vsock/virtio: increase RX buffer size to 64 KiB
...worth it. > Of course, if we leave the datapaths separated, I'd like to do that later. > > What do you think? For the driver it self, it should not be hard. But I think you mean the issue of e.g virtio_vsock_pkt itself which doesn't support sg. For short time, maybe we can use kvec instead. Thanks > > Thanks, > Stefano
2009 Jun 11
1
[PATCH 1/1] ocfs2/net: Use wait_event() in o2net_send_message_vec()
..., 5 deletions(-) diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 9fbe849..334f231 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -974,7 +974,7 @@ static int o2net_tx_can_proceed(struct o2net_node *nn, int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, size_t caller_veclen, u8 target_node, int *status) { - int ret, error = 0; + int ret; struct o2net_msg *msg = NULL; size_t veclen, caller_bytes = 0; struct kvec *vec = NULL; @@ -1015,10 +1015,7 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec,...
2019 May 15
1
[PATCH v2 7/8] vsock/virtio: increase RX buffer size to 64 KiB
...aths separated, I'd like to do that later. >>> >>> What do you think? >> >> For the driver it self, it should not be hard. But I think you mean the >> issue of e.g virtio_vsock_pkt itself which doesn't support sg. For short >> time, maybe we can use kvec instead. > I'll try to use kvec in the virtio_vsock_pkt. > > Since this struct is shared also with the host driver (vhost-vsock), > I hope the changes could be limited, otherwise we can remove the last 2 > patches of the series for now, leaving the RX buffer size to 4KB. Yes an...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
..._vsock/virtio_transport_common.c | 59 ++++++++++++++---- >> 4 files changed, 166 insertions(+), 35 deletions(-) > > > This was supposed to be a guest patch, why is vhost changed here? > In mergeable rx buff cases, it need to scatter big packets into several buffers, so I add kvec variable in struct virtio_vsock_pkt, at the same time, in order to keep tx and rx consistency, I use kvec to replace variable buf, because vhost use the variable pkt->buf, so this patch caused vhost is changed. >> diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c >> index d...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
..._vsock/virtio_transport_common.c | 59 ++++++++++++++---- >> 4 files changed, 166 insertions(+), 35 deletions(-) > > > This was supposed to be a guest patch, why is vhost changed here? > In mergeable rx buff cases, it need to scatter big packets into several buffers, so I add kvec variable in struct virtio_vsock_pkt, at the same time, in order to keep tx and rx consistency, I use kvec to replace variable buf, because vhost use the variable pkt->buf, so this patch caused vhost is changed. >> diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c >> index d...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...nclude <linux/virtio.h> +#include <linux/virtio_test.h> +#include <linux/virtio_ring.h> + +static u32 viotest_major = VIOTEST_MAJOR; +static struct class *viotest_class; +static LIST_HEAD(viotest_list); +static spinlock_t viotest_list_lock = SPIN_LOCK_UNLOCKED; + +static void free_kvec(struct kvec *kiov, u32 index) +{ + u32 i; + + for (i = 0; i < index; i++) + kfree(kiov[i].iov_base); + + kfree(kiov); +} + +/* + * This function copies a userspace iovec * array into a kernel kvec * array + */ +static int copy_iovec_from_user(struct kvec **kiov, struct iovec __user *uiov, +...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...nclude <linux/virtio.h> +#include <linux/virtio_test.h> +#include <linux/virtio_ring.h> + +static u32 viotest_major = VIOTEST_MAJOR; +static struct class *viotest_class; +static LIST_HEAD(viotest_list); +static spinlock_t viotest_list_lock = SPIN_LOCK_UNLOCKED; + +static void free_kvec(struct kvec *kiov, u32 index) +{ + u32 i; + + for (i = 0; i < index; i++) + kfree(kiov[i].iov_base); + + kfree(kiov); +} + +/* + * This function copies a userspace iovec * array into a kernel kvec * array + */ +static int copy_iovec_from_user(struct kvec **kiov, struct iovec __user *uiov, +...
2008 Oct 01
1
maximum likelihood with constraints in R
Hi R-experts, There is lots of information about maximum likelihood estimation in R. However, I didn't came across anything about maximum likelihood with constraints. For example, estimation of parameters k(1) to k(20) with maximum likelihood, where sum(k(i)) = 0. Is there any standard function in R that can do this, or is this something that I should set up myself? Greetings, Church
2017 Feb 01
15
[PATCH 00/14] hyperv: vmbus related patches
This is a rebase/resend of earlier patches. I skipped the pure cosmetic patches for now. Mostly this is consolidation earlier changes, removing dead code etc. The important part is the change for allowing a vmbus channel to get callback directly in interrupt mode; this is necessary for NAPI support. Stephen Hemminger (14): vmbus: use kernel bitops for traversing interrupt mask vmbus: drop
2017 Feb 01
15
[PATCH 00/14] hyperv: vmbus related patches
This is a rebase/resend of earlier patches. I skipped the pure cosmetic patches for now. Mostly this is consolidation earlier changes, removing dead code etc. The important part is the change for allowing a vmbus channel to get callback directly in interrupt mode; this is necessary for NAPI support. Stephen Hemminger (14): vmbus: use kernel bitops for traversing interrupt mask vmbus: drop
2019 May 14
0
[PATCH v2 7/8] vsock/virtio: increase RX buffer size to 64 KiB
...eave the datapaths separated, I'd like to do that later. > > > > What do you think? > > > For the driver it self, it should not be hard. But I think you mean the > issue of e.g virtio_vsock_pkt itself which doesn't support sg. For short > time, maybe we can use kvec instead. I'll try to use kvec in the virtio_vsock_pkt. Since this struct is shared also with the host driver (vhost-vsock), I hope the changes could be limited, otherwise we can remove the last 2 patches of the series for now, leaving the RX buffer size to 4KB. Thanks, Stefano
2018 Dec 13
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...+++++++++++++---- > >> 4 files changed, 166 insertions(+), 35 deletions(-) > > > > > > This was supposed to be a guest patch, why is vhost changed here? > > > > In mergeable rx buff cases, it need to scatter big packets into several > buffers, so I add kvec variable in struct virtio_vsock_pkt, at the same > time, in order to keep tx and rx consistency, I use kvec to replace > variable buf, because vhost use the variable pkt->buf, so this patch > caused vhost is changed. You'd want to split these patches imho. > >> diff --git...
2018 Nov 07
1
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...ct virtio_vsock_mrg_rxbuf mrg_rxbuf[VIRTIO_VSOCK_MAX_MRG_BUF_NUM]; >>>> }; >>> It's better to use iov here I think, and drop buf completely. >>> >>> And this is better to be done in an independent patch. >>> >> You're right, I can use kvec instead of customized structure, >> in addition, I don't understand about drop buf completely and >> an independent patch. > > > I mean there a void *buf in struct virtio_vsock_pkt. You can drop it and switch to use iov(iter) or other data structure that supports sg. >...
2018 Nov 06
2
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...bool mergeable; >> + struct virtio_vsock_mrg_rxbuf mrg_rxbuf[VIRTIO_VSOCK_MAX_MRG_BUF_NUM]; >> }; > > > It's better to use iov here I think, and drop buf completely. > > And this is better to be done in an independent patch. > You're right, I can use kvec instead of customized structure, in addition, I don't understand about drop buf completely and an independent patch. Thanks. > >> >> struct virtio_vsock_pkt_info { >> diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c >> index 2040a9...
2018 Nov 06
2
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...bool mergeable; >> + struct virtio_vsock_mrg_rxbuf mrg_rxbuf[VIRTIO_VSOCK_MAX_MRG_BUF_NUM]; >> }; > > > It's better to use iov here I think, and drop buf completely. > > And this is better to be done in an independent patch. > You're right, I can use kvec instead of customized structure, in addition, I don't understand about drop buf completely and an independent patch. Thanks. > >> >> struct virtio_vsock_pkt_info { >> diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c >> index 2040a9...