Displaying 20 results from an estimated 22 matches for "ret_val".
2004 Mar 17
1
best methods for strings and structures?
...file_out_format;
double fixed_plot_radius;
double min_prism_dbh;
double baf;
unsigned long max_sample_size;
unsigned long use_precip_in_hg;
};
with an internal function and I'm building the return object using the
following code:
PROTECT( ret_val = allocVector( VECSXP, 13 ) );
SET_STRING_ELT( ret_val, 0, mkChar( cfg_rec.coeffs_filename) );
SET_STRING_ELT( ret_val, 1, mkChar( cfg_rec.species_filename) );
SET_VECTOR_ELT( ret_val, 2, ScalarInteger( cfg_rec.use_random_error ) );
SET_VECTOR_ELT( ret_val, 3, ScalarInteger( cfg_rec.ran...
2012 Mar 06
2
Calling FORTRAN function from R issue?
Hello,
I am trying to call the BLAS Level1 function zdotc from R via
a .C call like this:
#include "R.h"
#include "R_ext/BLAS.h"
void testzdotc() {
Rcomplex zx[3], zy[3], ret_val;
zx[0].r = 1.0; zx[0].i = 0.0;
zx[1].r = 2.0; zx[0].i = 0.0;
zx[2].r = 3.0; zx[0].i = 0.0;
zy[0].r = 1.0; zy[0].i = 0.0;
zy[1].r = 2.0; zy[0].i = 0.0;
zy[2].r = 3.0; zy[0].i = 0.0;
int n=3, incx=1, incy=1;
F77_CALL(zdotc)(&ret_val, &n, zx, &incx, zy, &...
2004 Feb 18
0
return a list of vectors from C?
...ous */
/* and return a list of the values rather than just the */
/* optimal values. It should return the optimization info as */
/* well as the residual values from the flikam function */
SEXP testfunc2(
SEXP *pq,
SEXP *obs )
{
int i;
double *pq_vect;
double *obs_vect;
SEXP ret_val;
PROTECT( pq = coerceVector( pq, REALSXP ) );
PROTECT( obs = coerceVector( obs, REALSXP ) );
pq_vect = REAL( pq );
obs_vect = REAL( obs );
/* call my functions for the results */
/* generate the output list */
PROTECT( ret_val = allocVector( VECSXP, NPQ ) );
for( i = 0...
2004 Feb 18
0
return a list of vectors from C?
...ous */
/* and return a list of the values rather than just the */
/* optimal values. It should return the optimization info as */
/* well as the residual values from the flikam function */
SEXP testfunc2(
SEXP *pq,
SEXP *obs )
{
int i;
double *pq_vect;
double *obs_vect;
SEXP ret_val;
PROTECT( pq = coerceVector( pq, REALSXP ) );
PROTECT( obs = coerceVector( obs, REALSXP ) );
pq_vect = REAL( pq );
obs_vect = REAL( obs );
/* call my functions for the results */
/* generate the output list */
PROTECT( ret_val = allocVector( VECSXP, NPQ ) );
for( i = 0...
2006 Aug 16
4
Overwrite form helper methods and call old ones in new ones?
...abel => "Subject" %>
...should produce exactly the same output as the HTML above.
Now I don''t really know how to call the old text_field method to produce
the input tag from within my new method:
application_helper.rb:
def text_field(object_name, method, options = {})
ret_val = "<div class=\"text_field\">\n"
ret_val += text_field object_name, method, options # Don''t become
recursive, just call the now overwritten method!
ret_val += "</div>\n"
end
Thanks for help. :-)
Joshua
--
Posted via http://www.ruby-forum.co...
2008 Dec 25
0
[PATCH 2/4] dom0 linux: Add "guestdev=" boot parameter.
...Failed to allocate memory.\n");
+ return NULL;
+}
+
+/* Make guestdev from path strings */
+static int pci_make_guestdev(char *path_str)
+{
+ char hid[HID_LEN + 1], uid[UID_LEN + 1];
+ char *sp, *ep;
+ struct guestdev *gdev, *gdev_org;
+ struct guestdev_node *node, *node_tmp;
+ int dev, func, ret_val;
+
+ ret_val = 0;
+ gdev = gdev_org = NULL;
+ sp = path_str;
+ /* Look for end of hid:uid''-'' */
+ ep = strchr(sp, ''-'');
+ /* Only hid, uid. (No dev, func) */
+ if (!ep)
+ goto format_err_end;
+
+ memset(hid, 0 ,sizeof(hid));
+ memset(uid, 0, sizeof(uid));
+ if (...
2008 Aug 25
2
to catch exception from update_attribute
Hi
begin
ActiveRecord::Base.transaction do
pb_status_history = ProblemStatusHistory.new
pb_status_history.problem_id = @problem.id
pb_status_history.problem_status_id =
@problem.problem_status_id
pb_status_history.save!
ret_val=@problem.update_attribute("problem_status_id",''ab'')
if ret_val==false
raise ActiveRecord::ActiveRecordError
end
end # end of transaction
rescue
puts ''error is ''+$!
end
What I was trying to do a...
2007 Jun 28
0
[1092] trunk/wxruby2/swig/classes/App.i: Pass correctly typed Events into filter_event, if defined (bug 10797);
...amp;nbsp     VALUE rb_event = Data_Wrap_Struct(event_klass, 0, 0, 0);
+        DATA_PTR(rb_event) = &event;
+
+        VALUE rb_ret_val = rb_funcall(rb_self, filter_event_sym, 1, rb_event);
+        if ( ! FIXNUM_P(rb_ret_val) )
+         { rb_raise(rb_eTypeError, "filter_event must return an intege...
2018 Feb 12
3
FreeBSD Core dump: PAM authentication with Kerberos credentials (GSSAPI_MIT)
...src/lib/libc/string/strlen.c:100
#1 0x0000000012130022 in strdup (str=0x0) at
/usr/src/lib/libc/string/strdup.c:46
#2 0x0000000011b65e9d in krb5_appdefault_string (context=0x10777000,
appname=0x106f0018 "imap", realm=0x0, option=0x13b1f403 "ticket_lifetime",
default_value=0x0, ret_value=0x7fffffffe088)
at appdefault.c:165
#3 0x0000000013af4a80 in krb5_appdefault_time (context=0x0,
appname=0xffffffffaaca6003 <error: Cannot access memory at address
0xffffffffaaca6003>,
realm=0x50 <error: Cannot access memory at address 0x50>, option=0x0,
def_val=0, ret_val=0x7...
2018 Feb 12
0
FreeBSD Core dump: PAM authentication with Kerberos credentials (GSSAPI_MIT)
...n.c:100
> #1 0x0000000012130022 in strdup (str=0x0) at
> /usr/src/lib/libc/string/strdup.c:46
> #2 0x0000000011b65e9d in krb5_appdefault_string (context=0x10777000,
> appname=0x106f0018 "imap", realm=0x0, option=0x13b1f403 "ticket_lifetime",
> default_value=0x0, ret_value=0x7fffffffe088)
> at appdefault.c:165
> #3 0x0000000013af4a80 in krb5_appdefault_time (context=0x0,
> appname=0xffffffffaaca6003 <error: Cannot access memory at address
> 0xffffffffaaca6003>,
> realm=0x50 <error: Cannot access memory at address 0x50>, option=0x...
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com>
This series fixes some bugs and switches the elflink branch to be
entirely ELF modules. It applies on top of,
http://syslinux.zytor.com/archives/2011-April/016369.html
The deletions in the diff stat below are mainly from deleting
com32/elflink/modules (finally!). Now there should be no duplicate
code because we don't need COM32 and
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not
allocating RBP to any virtual register, the instances of RBP in function
foo are in the machine code when my register allocator starts.)
Function foo calls function bar. Register RBP is not saved across the
call, though it is live after the call. Function bar includes a virtual
register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...)",
"%+",
"int yyFlexLexer::yy_get_next_buffer()",
"%*",
" {",
" register char *dest = yy_current_buffer->yy_ch_buf;",
" register char *source = yytext_ptr;",
" register int number_to_move, i;",
" int ret_val;",
"",
" if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )",
" YY_FATAL_ERROR(",
" \"fatal flex scanner internal error--end of buffer missed\" );",
"",
" if ( yy_current_buffer->yy_fill_...
2019 Sep 11
6
[PATCH 0/4] HMM tests and minor fixes
These changes are based on Jason's latest hmm branch.
Patch 1 was previously posted here [1] but was dropped from the orginal
series. Hopefully, the tests will reduce concerns about edge conditions.
I'm sure more tests could be usefully added but I thought this was a good
starting point.
[1] https://lore.kernel.org/linux-mm/20190726005650.2566-6-rcampbell at nvidia.com/
Ralph Campbell
2020 Jan 13
9
[PATCH v6 0/6] mm/hmm/test: add self tests for HMM
This series adds new functions to the mmu interval notifier API to
allow device drivers with MMUs to dynamically mirror a process' page
tables based on device faults and invalidation callbacks. The Nouveau
driver is updated to use the extended API and a set of stand alone self
tests is added to help validate and maintain correctness.
The patches are based on linux-5.5.0-rc6 and are for
2019 Nov 12
20
[PATCH hmm v3 00/14] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com>
8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1,
scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where
they only use invalidate_range_start/end and immediately check the
invalidating range against some driver data structure to tell if the
driver is interested. Half of them use an interval_tree, the others
2011 Jun 02
48
[PATCH 0/9] libxl: disk configuration handling
This is v3 of my disk series. What were previously patches 01-06 have
been applied. These are the tested and updated remainder, addressing
the previous comments.
1 Preparatory work.
2-4 The new parser and its documentation.
5-6 Replace old parsers with calls to the new one.
7-8 Two features, one of them essential.
9 Basic test suite for disk string parsing, as adhoc script.
2019 Oct 28
32
[PATCH v2 00/15] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com>
8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1,
scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where
they only use invalidate_range_start/end and immediately check the
invalidating range against some driver data structure to tell if the
driver is interested. Half of them use an interval_tree, the others
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...dle, "_PS3", NULL, NULL);
if (ACPI_FAILURE(status)) {
- warn("%s: _PS3 failed\n", __func__);
+ pr_warn("%s: _PS3 failed\n", __func__);
retval = -1;
goto err_exit;
} else
@@ -718,8 +720,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func)
ret_val = acpi_bus_add(&device, pdevice, func->handle,
ACPI_BUS_TYPE_DEVICE);
if (ret_val) {
- dbg("error adding bus, %x\n",
- -ret_val);
+ dbg("error adding bus, %x\n", -ret_val);
goto acpiphp_bus_add_out;
}
ret_val = acpi_bus_start(device);
@@ -746,7 +747,7 @@ s...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...dle, "_PS3", NULL, NULL);
if (ACPI_FAILURE(status)) {
- warn("%s: _PS3 failed\n", __func__);
+ pr_warn("%s: _PS3 failed\n", __func__);
retval = -1;
goto err_exit;
} else
@@ -718,8 +720,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func)
ret_val = acpi_bus_add(&device, pdevice, func->handle,
ACPI_BUS_TYPE_DEVICE);
if (ret_val) {
- dbg("error adding bus, %x\n",
- -ret_val);
+ dbg("error adding bus, %x\n", -ret_val);
goto acpiphp_bus_add_out;
}
ret_val = acpi_bus_start(device);
@@ -746,7 +747,7 @@ s...