2D arrays: are all elements in a 2d array guarenteed to be contiguous?

P

Paul

See topic;

Context:
Passing arrays around in a MPI system(Message Passing Interface-
Parallel Program crap)

Thanks much!
-Paul
 
J

Jack Klein

See topic;

Don't do that. There are some newsreaders still in wide use that do
not show the subject line while displaying bodies.
Context:
Passing arrays around in a MPI system(Message Passing Interface-
Parallel Program crap)

The context is immaterial.
Thanks much!
-Paul

In any case, the answer is no, there is no such guarantee, because
there is no such thing as a two (or higher) dimensional array in C++.
There are arrays of arrays, but the behavior is not defined for
accessing them as a single contiguous array with a type other than
unsigned char.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top