Questions tagged [contiguous]
145 questions
0
votes
1 answer
With MPI are user-defined datatypes useless when there is a contiguous array?
In my program I send to the other processors some rows of a Matrix, I'm coding in C and I know that C is row-major.
The matrix is allocated as 1d array.
matrixInArrayB = malloc(height * width * sizeof(int));
matrixB = malloc(height *…
0
votes
1 answer
Creating a contiguous array in Cython and passing it to C++
EDIT: This question is resolved. In working out the small example below, everything works as expected. I have left it in case anyone finds it helpful. Obviously, my problem is stemming from elsewhere.
I am using Cython to write a Python interface…

batconjurer
- 101
- 4
0
votes
2 answers
MySQL - Group By Contigous Blocks
I am struggling to make a GROUP BY contiguous blocks, I've used the following two for references:
- GROUP BY for continuous rows in SQL
- How can I do a contiguous group by in MySQL?
-…

Kerry Jones
- 21,806
- 12
- 62
- 89
0
votes
1 answer
MPI convention for index of rows and columns
I am using MPI for solving PDE. For this, I breakdown the 2D domain into different cells (size of each of these cells is "xcell,ycell" with xcell = size_x_domain/(number of X subdomains) and ycell = size_y_domain/(number of Y subdomains).
So, I am…
user1773603
0
votes
1 answer
Implementation of a multidimensional array contiguously allocated in memory
I want to have the ability to define a general multidimensional array on heap in c++ and I'd like to assign a contiguous memory to the array for fast accessing the elements, (rather than jagged vector of vectors). Here is my implementation
#include…

Arash
- 141
- 10
0
votes
1 answer
Making a memoryview C-contiguous Fortran-contiguous
I am using C-contiguous memoryviews in my Python code and I would like to use dgemm which needs Fortran-contiguous memoryviews.
I would like to use the function PyMemoryView_GetContiguous found here but I don't know how to access it.
Does someone…

14thibea
- 5
- 2
0
votes
2 answers
column_stack returns non cotiguous array
I am having a problem in my code with non contiguous arrays.
In particular I get the following warning message:
C:\Program Files\Anaconda2\lib\site-packages\skimage\util\shape.py:247: RuntimeWarning: Cannot provide views on a non-contiguous input…

gabboshow
- 5,359
- 12
- 48
- 98
0
votes
1 answer
Memory continuity and search tree
I'm trying to build a search tree on top of my results. Some kind of k-ary tree with n leafs at the end. I'm looking for a C++ solution and experimenting with std::vector but can't get it done as I need memory consistency. It could be done by nested…

user1587451
- 978
- 3
- 15
- 30
0
votes
1 answer
Grouping Contiguous Rows in two Columns
I have a table in which there are two rows From_ID and To_ID. I need rows grouped on based of having same Work_ID and the grouping should start from From_ID and should take its To_ID and look for the row having From_ID as To_ID of that row. These…

Hemant Sisodia
- 488
- 6
- 23
0
votes
1 answer
The maximum Value Contiguous Subsequence algorithm
The input to this problem is an array A[1...n] of real numbers. Your need to find out what the highest value is that can be obtained by summing up all numbers of a contiguous subsequence A[i],A[i+1],...A[j] of A. If A does not contain negative…

soapzi
- 11
- 1
0
votes
2 answers
Solution to external fragmentation- Non-contigous allocation
As far as my understanding goes, a program is allocated contiguous address spaces in the virtual memory. The address space contains the heap, the stack, the data and text section, and some free space.
But actually, the these sections are not…

Prashant Pandey
- 4,332
- 3
- 26
- 44
0
votes
1 answer
OpenGL - Allocating data to a list in C and using it in glBufferData doesn't work correctly
I have a problem when pushing back data to a list and then using this list in OpenGL glBufferData.
I have a simple OpenGL scene, where I draw 3 sprites using 3 different spritebatches. It works when I allocate memory for the vertices beforehand and…

lefti
- 268
- 4
- 13
0
votes
1 answer
Excel VBA Non-Contiguous Array User Defined Function Fix
I have a user defined function as seen below that allows me to combine two non-adjacent columns into a contiguous array.
Function MakeContig(ParamArray av() As Variant) As Variant
Dim avOut() As Variant
Dim i As Long
Dim j As…

Shawn
- 25
- 2
0
votes
6 answers
Dynamically creating a contiguous 5D array?
I am working with a very large 5D array that I need to read into contiguous memory (another 5D array). I cannot place the array on the stack because it is too large and creates seg faults. What I've done is to create a 5D array dynamically with…

LTClipp
- 526
- 1
- 4
- 14
0
votes
2 answers
Allocating contiguous memory for a 3D array in C
I need to allocate contiguous space for a 3D array. (EDIT:) I GUESS I SHOULD HAVE MADE THIS CLEAR IN THE FIRST PLACE but in the actual production code, I will not know the dimensions of the array until run time. I provided them as constants in my…

bob.sacamento
- 6,283
- 10
- 56
- 115