¡@

Home 

c++ Programming Glossary: xlength

Flattening a 3D array in c++ for use with MPI

http://stackoverflow.com/questions/16288944/flattening-a-3d-array-in-c-for-use-with-mpi

I think I can get the array 1 dimensional just by using i xlength j xlength ylength k but then I have trouble using equations.. can get the array 1 dimensional just by using i xlength j xlength ylength k but then I have trouble using equations that reference.. the big array. You allocate one big flat chunk of size xlength ylength zlength to hold the actual data and then create an index..

how do I allocate one block of memory with new?

http://stackoverflow.com/questions/16555862/how-do-i-allocate-one-block-of-memory-with-new

n This code causes a segmentation fault phi new double xlength phi 0 new double xlength ylength phi 0 0 new double xlength.. segmentation fault phi new double xlength phi 0 new double xlength ylength phi 0 0 new double xlength ylength tlength for int i.. phi 0 new double xlength ylength phi 0 0 new double xlength ylength tlength for int i 0 i xlength i for int j 0 j ylength..