Displaying 4 results from an estimated 4 matches for "n_elem".
Did you mean:
_elem
2011 Apr 15
1
[Rcpp-devel] Find number of elements less than some number: Elegant/fastsolution needed
...for yy
for (int i=0; i < nxx; i++) {
while ((j < nyy) && ( xx(i) > yy(j) ) ) {
j++;
}
xx_(i) = j;
}
return (xx_);
'
src1 = '
NumericVector xx_(clone(x)), yy_(clone(y));
// assumes x & y are already sorted
arma::vec xx(xx_), yy(yy_);
int nxx = xx.n_elem;
int nyy = yy.n_elem;
int j = 0; //gt index for yy
for (int i=0; i < nxx; i++) {
while ((j < nyy) && ( xx(i) > yy(j) ) ) {
j++;
}
xx_(i) = j;
}
return (xx_);
'
src2 = '
NumericVector xx_(x), yy_(y); //kinda scary
int nxx = xx_.size();
int nyy = yy_.s...
2012 Sep 19
1
[PATCH 1/1] lua: Cleaned up the dmi table structure in Lua.c32 and added all missing DMI subtables
...shstring(L, "bios.release_date");
- lua_pushstring(L, dmi.bios.release_date);
- lua_settable(L,-3);
- lua_pushstring(L, "bios.bios_revision");
- lua_pushstring(L, dmi.bios.bios_revision);
- lua_settable(L,-3);
+void get_bool_table(lua_State *L, const char *str_table[], int n_elem,
+ bool *bool_table)
+{
+ int i;
+ for (i = 0; i < n_elem; i++) {
+ if (!str_table[i] || !*str_table[i]) /* aviod NULL/empty string */
+ continue;
+
+ lua_pushstring(L, str_table[i]);
+ lua_pushboolean(L, bool_table[i]);
+ lua_settable(L,-3);
+ }
+}...
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with
updates coming from blktap2.5.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
2013 Jul 15
6
[PATCH 0 of 6 RESEND v2] blktap3/sring: shared ring between tapdisk and the front-end
This patch series introduces the shared ring used by the front-end to pass
request descriptors to tapdisk, as well as responses from tapdisk to the
front-end. Requests from this ring end up in tapdisk''s standard request queue.
When the tapback daemon detects that the front-end tries to connect to the
back-end, it spawns a tapdisk and tells it to connect to the shared ring. The
shared