search for: bm

Displaying 20 results from an estimated 407 matches for "bm".

Did you mean: ibm
2000 May 02
0
patch for .samba-2.0.7/source/lib/bitmap.c
...find_bitmap_one( uint32 bitmaps ); + + /**************************************************************************** allocate a bitmap of the specified size ****************************************************************************/ struct bitmap *bitmap_allocate(int n) { - struct bitmap *bm; + size_t structsize, bitmapsize; + struct bitmap *bm; - bm = (struct bitmap *)malloc(sizeof(*bm)); + structsize = ( sizeof(*bm) + BITMAP_ALIGN - 1 )&( ~( BITMAP_ALIGN - 1)); + bitmapsize = ( sizeof( bm->b[0] ) * ( n + UINT32_BITS-1 )/ UINT32_BITS ); - if (!bm) return NULL...
2005 Apr 18
2
Construction of a large sparse matrix
...in a simulation. Below is the latex form of the matrix if anyone wants to see the pattern I am trying to create. The core of my problem seems to localize to the last line of the following portion of code. n<-sample.size*4 k<-n/4 vl.mat <- as.matrix.csr(0, n, n) block <- 1:k #each submatrix size for(i in 1:3) vl.mat[i *k + block, i*k + block] <- LE When the variable LE is 0, the matrix is easily created. For example, when sample.size = 10,000 this matrix was created on my machine in about 1 second. Here is the object size. > object.size(vl.mat) [1] 160692 However, when L...
2018 Dec 02
2
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
This is exactly the same as v1: https://www.redhat.com/archives/libguestfs/2018-December/msg00004.html except that it now frees the bitmap on unload (which the old code did not - there was always a memory leak). Rich.
2018 Dec 03
1
Re: [PATCH nbdkit v2] common: Move shared bitmap code to a common library.
...all .c, to make patches a little easier to follow logically (what gets built, what interfaces does it need, and how is it implemented). 'git config diff.orderFile /path/to/file'; see qemu's scripts/git.orderfile for an example. > + > +int > +bitmap_resize (struct bitmap *bm, uint64_t new_size) > +{ > + uint8_t *new_bitmap; > + const size_t old_bm_size = bm->size; > + uint64_t new_bm_size_u64; > + size_t new_bm_size; > + > + new_bm_size_u64 = DIV_ROUND_UP (new_size, bm->blksize * 8 / bm->bpb); Can the computation of bm->blksize *...
2012 Jan 30
4
replacing characters in matrix. substitute, delayedAssign, huh?
A user question today has me stumped. Can you advise me, please? User wants a matrix that has some numbers, some variables, possibly even some function names. So that has to be a character matrix. Consider: > BM <- matrix("0.1", 5, 5) Use data.entry(BM) or similar to set some to more abstract values. > BM[3,1] <- "a" > BM[4,2] <- "b" > BM[5,2] <- "b" > BM[5,3] <- "d" > BM var1 var2 var3 var4 var5 [1,] "0.1"...
2008 Feb 05
1
windows printer config management
Hello, I sent this request to my local linux user group: <http://lists.luv.asn.au/wws/arc/luv-talk/2008-02/msg00000.html> Unfortunately it looks like nobody is able to answer, so I will try here: Does anybody know of any sane solution for (globally) managing the configuration of printers on a large number of Windows computers? My current solution is 1. create samba server with printer
2018 Dec 03
3
[PATCH nbdkit v3] common: Move shared bitmap code to a common library.
v2: https://www.redhat.com/archives/libguestfs/2018-December/msg00039.html v2 -> v3: - Fix all the issues raised in Eric's review. - Precompute some numbers to make the calculations easier. - Calculations now use bitshifts and masks in preference to division and modulo. - Clear existing bits before setting (which fixes a bug in the cache filter). Rich.
2018 Dec 03
0
[PATCH nbdkit v3] common: Move shared bitmap code to a common library.
...8 + 2 1 4 + 4 2 2 + 8 3 1 + */ + unsigned bitshift, ibpb; + + uint8_t *bitmap; /* The bitmap. */ + size_t size; /* Size of bitmap in bytes. */ +}; + +static inline void +bitmap_init (struct bitmap *bm, unsigned blksize, unsigned bpb) +{ + assert (is_power_of_2 (blksize)); + bm->blksize = blksize; + + /* bpb can be 1, 2, 4 or 8 only. */ + bm->bpb = bpb; + bm->ibpb = 8/bpb; + switch (bpb) { + case 1: bm->bitshift = 0; break; + case 2: bm->bitshift = 1; break; + case 4: bm-&...
2018 Dec 02
0
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
...+ * SUCH DAMAGE. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdint.h> + +#include <nbdkit-plugin.h> + +#include "bitmap.h" +#include "rounding.h" + +int +bitmap_resize (struct bitmap *bm, uint64_t new_size) +{ + uint8_t *new_bitmap; + const size_t old_bm_size = bm->size; + uint64_t new_bm_size_u64; + size_t new_bm_size; + + new_bm_size_u64 = DIV_ROUND_UP (new_size, bm->blksize * 8 / bm->bpb); + if (new_bm_size_u64 > SIZE_MAX) { + nbdkit_error ("bitmap too...
2018 Dec 01
2
[PATCH nbdkit] common: Move shared bitmap code to a common library.
I have some patches I'm working on to fix the cache filter. However this is a prelude. It should be simply pure refactoring. All tests pass still. Rich.
2005 Jun 22
1
legend
...rea grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Just execute my lines below and you know want I mean. Or pass by at http://de.wikipedia.org/wiki/Bild:GBM.png to see the picture online. Thomas bm <- function(n=500, from=0, to=1) { x=seq(from=from,to=to,length=n) BM<-c(0,cumsum(rnorm(n-1,mean=0,sd=sqrt(to/n)))) cbind(x,BM) } gbm <- function(bm,S0=1,sigma=0.1,mu=1) { gbm=S0 for (t in 2:length(bm[,1])) { gbm[t]=S0*exp((mu-sigma...
2018 Dec 01
0
[PATCH nbdkit] common: Move shared bitmap code to a common library.
...+ * SUCH DAMAGE. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdint.h> + +#include <nbdkit-plugin.h> + +#include "bitmap.h" +#include "rounding.h" + +int +bitmap_resize (struct bitmap *bm, uint64_t new_size) +{ + uint8_t *new_bitmap; + const size_t old_bm_size = bm->size; + uint64_t new_bm_size_u64; + size_t new_bm_size; + + new_bm_size_u64 = DIV_ROUND_UP (new_size, bm->blksize * 8 / bm->bpb); + if (new_bm_size_u64 > SIZE_MAX) { + nbdkit_error ("bitmap too...
2019 Jan 01
0
[PATCH nbdkit v2 1/4] common/bitmap: Add bitmap_next function and tests.
...efile.am | 12 +++ common/include/Makefile.am | 1 + 8 files changed, 279 insertions(+) diff --git a/common/bitmap/bitmap.h b/common/bitmap/bitmap.h index f943933..80fd5e4 100644 --- a/common/bitmap/bitmap.h +++ b/common/bitmap/bitmap.h @@ -165,4 +165,10 @@ bitmap_set (const struct bitmap *bm, uint64_t offset, unsigned v) #define bitmap_for(bm, /* uint64_t */ blknum) \ for ((blknum) = 0; (blknum) < (bm)->size * (bm)->ibpb; ++(blknum)) +/* Find the next non-zero block in the bitmap, starting at ?blk?. + * Returns -1 if the bitmap is all zeroes fro...
2019 Jan 01
0
[PATCH nbdkit v2 3/4] cache: Implement LRU structure.
...lters/cache/blk.c +++ b/filters/cache/blk.c @@ -53,6 +53,7 @@ #include "cache.h" #include "blk.h" +#include "lru.h" /* The cache. */ static int fd = -1; @@ -80,6 +81,8 @@ blk_init (void) size_t len; char *template; + lru_init (); + bitmap_init (&bm, BLKSIZE, 2 /* bits per block */); tmpdir = getenv ("TMPDIR"); @@ -115,6 +118,8 @@ blk_free (void) close (fd); bitmap_free (&bm); + + lru_free (); } int @@ -128,6 +133,9 @@ blk_set_size (uint64_t new_size) return -1; } + if (lru_set_size (new_size) == -1...
2019 Jan 03
0
[PATCH nbdkit v4 1/2] cache: Implement LRU structure.
...lters/cache/blk.c +++ b/filters/cache/blk.c @@ -53,6 +53,7 @@ #include "cache.h" #include "blk.h" +#include "lru.h" /* The cache. */ static int fd = -1; @@ -80,6 +81,8 @@ blk_init (void) size_t len; char *template; + lru_init (); + bitmap_init (&bm, BLKSIZE, 2 /* bits per block */); tmpdir = getenv ("TMPDIR"); @@ -115,6 +118,8 @@ blk_free (void) close (fd); bitmap_free (&bm); + + lru_free (); } int @@ -128,6 +133,9 @@ blk_set_size (uint64_t new_size) return -1; } + if (lru_set_size (new_size) == -1...
2012 Jul 30
1
te( ) interactions and AIC model selection with GAM
Hello R users, I'm working with a time-series of several years and to analyze it, I?m using GAM smoothers from the package mgcv. I?m constructing models where zooplankton biomass (bm) is the dependent variable and the continuous explanatory variables are: -time in Julian days (t), to creat a long-term linear trend -Julian days of the year (t_year) to create an annual cycle - Mean temperature of Winter (temp_W), Temperature of September (temp_sept) or Chla. Questions: 1) To int...
2003 Jul 29
2
4.8 installer failure with intel ICH4 ata controller
I'm trying to install 4.8 from cdrom. I get to the kernel config menu, select the first option, install without configuring a kernel, and the boot process hangs accessing the cdrom. ad0 (the hard drive) is recognized fine. The cdrom does: acd0: MODE_SENSE_BIG command timeout - resetting ata1: resetting devices .. done over and over. Finally I get to the screen "Probing devices, please
2019 Jan 03
4
[PATCH nbdkit v4 0/2] cache: Implement cache-max-size and method of
v3 was broken by a bad rebase, so let's forget about that one. Compared to v2: - Patch 1 is the same except for a minor comment change. - Patch 2 splits the reclaim code into a separate file (filters/cache/reclaim.c) - Addressed Eric's comments from his review of v2. - Retested on Linux and FreeBSD.
2019 Jan 01
7
[PATCH nbdkit v2 0/4] cache: Implement cache-max-size etc.
These are essentially identical to what was previously posted as patches 6/9 through 9/9 here: https://www.redhat.com/archives/libguestfs/2018-December/msg00145.html except that it has been rebased onto the current git master and retested thoroughly. Rich.
2019 Jan 03
1
Re: [PATCH nbdkit v2 3/4] cache: Implement LRU structure.
...include "bitmap.h" > + > +#include "cache.h" > +#include "blk.h" > +#include "lru.h" > + > +#define MAX(a, b) ((a) > (b) ? (a) : (b)) > + > +/* LRU bitmaps. These bitmaps implement a simple, fast LRU structure. > + * > + * bm[0] bm[1] blocks not in either bitmap > + * ┌─────────┬──────────────────┬─────────────────────────────┐ > + * │ │ │ │ > + * └─────────┴──────────────────┴─────────────────────────────┘ > + * ↑ c1 bits set &...