Re: 100k X 100k data processing summary
- From: Richard <rgrdev@xxxxxxxxx>
- Date: Mon, 26 Nov 2007 00:34:35 +0100
Barry Schwarz <schwarzb@xxxxxxxxx> writes:
On Sun, 25 Nov 2007 05:28:00 +0800, "a" <a@xxxxx> wrote:
By previous replies, it seems that the following method somehow solves the
problem up to 1000 * 1000 2D data, but when I try 10k * 10k, the
segmentation fault problem appears again.
Richard Tobin told me there is a system limit that can be changed. But I
don't know which file is to be changed.
I have modified again and again and hope to find out a solution that can
handle 100k * 100k data.
float** array_to_matrix(float* m, int rows, int cols) {
int i,j;
float** r;
r = (float**)calloc(rows,sizeof(float*));
The cast is worse than useless. It can actually have a negative
impact on your development process
How? Certainly during debugging it makes perfect sense to zero a new
block if for nothing else than examining the memory. In the real world
that is.
You are aware that calloc sets the allocated area to all bits zero and
this need not be suitable for pointers.
I need this explaining once again.
ptr = (float*) *fltPointer++;
If its all bit 0s then surely assignment of 0 will cast to the "real
null for that pointer type".
Or would you actually advocate writing your own loop applying a "null"
for float * to the memory block?
.
- Follow-Ups:
- Re: 100k X 100k data processing summary
- From: Barry Schwarz
- Re: 100k X 100k data processing summary
- From: santosh
- Re: 100k X 100k data processing summary
- References:
- 100k X 100k data processing summary
- From: a
- Re: 100k X 100k data processing summary
- From: Barry Schwarz
- 100k X 100k data processing summary
- Prev by Date: Re: 100k X 100k data processing summary
- Next by Date: Re: Keith Thompson's messages dont come through
- Previous by thread: Re: 100k X 100k data processing summary
- Next by thread: Re: 100k X 100k data processing summary
- Index(es):
Relevant Pages
|