Displaying 7 results from an estimated 7 matches for "fn_ptr".
Did you mean:
f_ptr
2012 Oct 23
3
[LLVMdev] Lifetime of ExecutionEngine?
Given:
typedef MyClass* (*jit_fn_ptr_type)();
MyClass* set_fn( llvm::Function *fn ) {
// create an ExecutionEngine 'exec' ...
jit_fn_ptr_type fn_ptr = (jit_fn_ptr_type)exec->getPointerToFunction( fn );
return fn_ptr();
}
After I call getPointerToFunction() to obtain the pointer to the JIT'd function and fun...
2012 Oct 26
0
[LLVMdev] Lifetime of ExecutionEngine?
...to happen.
-Andy
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Paul J. Lucas
Sent: Tuesday, October 23, 2012 11:31 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Lifetime of ExecutionEngine?
Given:
typedef MyClass* (*jit_fn_ptr_type)();
MyClass* set_fn( llvm::Function *fn ) {
// create an ExecutionEngine 'exec' ...
jit_fn_ptr_type fn_ptr = (jit_fn_ptr_type)exec->getPointerToFunction( fn );
return fn_ptr();
}
After I call getPointerToFunction() to obtain the pointer to the JIT'd function and fun...
2011 Feb 06
5
Help with integrating R and c/c++
Hi,
I have been using R for close to two years now and have grown quite
comfortable with the language. I am presently trying to implement an
optimization routine in R (Newton Rhapson). I have some R functions that
calculate the gradient and hessian (pre requisite matrices) fairly
efficiently. Now, I have to call this function iteratively until some
convergance criterion is reached. I think the
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...truct ioevent ioevent;
+ int err;
+
+ vmmio->ioeventfds[vq] = (struct virtio_mmio_ioevent_param) {
+ .vdev = vdev,
+ .vq = vq,
+ };
+
+ ioevent = (struct ioevent) {
+ .io_addr = vmmio->addr + VIRTIO_MMIO_QUEUE_NOTIFY,
+ .io_len = sizeof(u32),
+ .fn = virtio_mmio_ioevent_callback,
+ .fn_ptr = &vmmio->ioeventfds[vq],
+ .datamatch = vq,
+ .fn_kvm = kvm,
+ .fd = eventfd(0, 0),
+ };
+
+ err = ioeventfd__add_event(&ioevent, false);
+ if (err)
+ return err;
+
+ if (vdev->ops->notify_vq_eventfd)
+ vdev->ops->notify_vq_eventfd(kvm, vmmio->dev, vq, ioevent.fd)...
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...truct ioevent ioevent;
+ int err;
+
+ vmmio->ioeventfds[vq] = (struct virtio_mmio_ioevent_param) {
+ .vdev = vdev,
+ .vq = vq,
+ };
+
+ ioevent = (struct ioevent) {
+ .io_addr = vmmio->addr + VIRTIO_MMIO_QUEUE_NOTIFY,
+ .io_len = sizeof(u32),
+ .fn = virtio_mmio_ioevent_callback,
+ .fn_ptr = &vmmio->ioeventfds[vq],
+ .datamatch = vq,
+ .fn_kvm = kvm,
+ .fd = eventfd(0, 0),
+ };
+
+ err = ioeventfd__add_event(&ioevent, false);
+ if (err)
+ return err;
+
+ if (vdev->ops->notify_vq_eventfd)
+ vdev->ops->notify_vq_eventfd(kvm, vmmio->dev, vq, ioevent.fd)...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
...+{
+ struct ioevent ioevent;
+ struct virtio_pci_modern *vpci = vdev->virtio;
+ int i, r, flags = 0;
+ int fds[2];
+
+ vpci->ioeventfds[vq] = (struct virtio_pci_ioevent_param) {
+ .vdev = vdev,
+ .vq = vq,
+ };
+
+ ioevent = (struct ioevent) {
+ .fn = virtio_pcim__ioevent_callback,
+ .fn_ptr = &vpci->ioeventfds[vq],
+ .datamatch = vq,
+ .fn_kvm = kvm,
+ };
+
+ /*
+ * Vhost will poll the eventfd in host kernel side, otherwise we
+ * need to poll in userspace.
+ */
+ if (!vdev->use_vhost)
+ flags |= IOEVENTFD_FLAG_USER_POLL;
+
+ /* ioport */
+ ioevent.io_addr = vpci->...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
...+{
+ struct ioevent ioevent;
+ struct virtio_pci_modern *vpci = vdev->virtio;
+ int i, r, flags = 0;
+ int fds[2];
+
+ vpci->ioeventfds[vq] = (struct virtio_pci_ioevent_param) {
+ .vdev = vdev,
+ .vq = vq,
+ };
+
+ ioevent = (struct ioevent) {
+ .fn = virtio_pcim__ioevent_callback,
+ .fn_ptr = &vpci->ioeventfds[vq],
+ .datamatch = vq,
+ .fn_kvm = kvm,
+ };
+
+ /*
+ * Vhost will poll the eventfd in host kernel side, otherwise we
+ * need to poll in userspace.
+ */
+ if (!vdev->use_vhost)
+ flags |= IOEVENTFD_FLAG_USER_POLL;
+
+ /* ioport */
+ ioevent.io_addr = vpci->...