Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Dimension
22
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 14th Jul 2010 18:57
I need to initialize an array that is larger than (1000, 1000, 1000) is there any way to do this such as using a plugin?
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Jul 2010 19:17
Do you really need 1 billion elements? It would probably be easier to keep any data you need in a file and use IanM's Matrix 1 Utilities to load/save the database as needed rather than loading it all at once in memory.

http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Jul 2010 19:42
Quote: "I need to initialize an array that is larger than (1000, 1000, 1000)"

No you don't.

If that's an integer array, that's just under 8GB of data - not possible at all on a 32 bit windows system.

Emulating that using a file will certainly cause any user of your program to delete it almost immediately.

Basically, think about the problem again - a straight 3D array of this size is almost certainly not the solution.

Dimension
22
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 15th Jul 2010 06:44
I do have a 64-bit operating system. An any case I think the user "Grog Grueslayer" is correct in using the hard disk as an array. And I am pretty sure this is the only way solve this problem as the problem is very complex. I also have an idea to create my own array this large. Since it only needs to be a boolean array I can probably create a file to store the values and I think it would only be about 1GB.
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 15th Jul 2010 08:03
You speak about a problem but you don`t specify what is it Are we supposed to be sidekicks?And i`m 99% sure that even 64-bit operating system can`t handle this.Maybe if you search in the basement for the boxes where you put the old super computer you build with the help of the famous book "101 ways to make super computer from spare parts in the garage"...the machine can do it pretty much with finger snap

Don`t offend but there is nobody in the forum that proved me he truly needs 3 or more dimensional array.Never happend!Possibly never will.And one more thing is that only you may think that your problem is very complex because you lack skills to find solution, but it can be no bother for someone experienced.

In that flow of thoughts, there could be something multidimensional arrays can be handy.For example what if you wanted to make genealogical tree of all people in China Your PC probably is gonna make suicide if you do that...Amen!

The real problem there is to find name list of all Ching Chang Chong brothers in China...lol almost immpossible.Easiest way is just to make Name and Generation Generator.I guarantie that you are gonna have 1% accuracy with randoms

I`m really in a mood now, excuse me for my jokes.Just can`t hold myself.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Jul 2010 10:20
Quote: "An any case I think the user "Grog Grueslayer" is correct in using the hard disk as an array. "


Even though you like my idea IanM is no fool and his advice should be listened to 100% of the time. It really would help if you tell us what it's for. We may be able to tell you better solutions to your large array problem.


@luskos:

Quote: "Don`t offend but there is nobody in the forum that proved me he truly needs 3 or more dimensional array.Never happend!Possibly never will."


I make 3 dimensional arrays all the time.



Dimension
22
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 15th Jul 2010 11:56
Nothing is actually complex, everything is actually simple. In order to solve a problem perhaps all you need is a formula. That being said adding a formula doesn't require any thought at all.
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Jul 2010 13:56
@Dimension
If you think you need an array that large... You're doing it wrong.

[b]
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 15th Jul 2010 15:45
For something that large, you would not want to use arrays. Even 1/100th that size you would want to use memblocks. But even memblocks would push the memory envelope of even the newest computers to the edge of crashing.

The fastest code is the code never written.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Jul 2010 15:59 Edited at: 15th Jul 2010 16:01
Quote: "Nothing is actually complex, everything is actually simple. In order to solve a problem perhaps all you need is a formula. That being said adding a formula doesn't require any thought at all."

I disagree with everything except "In order to solve a problem perhaps all you need is a formula."

If nothing is complex then why are you posting this problem?

Adding a formula requires no thought?

...

Sounds like you don't want to share any actual details to me. I've made a fool of myself plenty of times on these forums and I hope I'm man enough to admit when I'm wrong but quoting 'management course' philosophy doesn't give any insight into the problem you're having and doesn't help people with the same problem in the future.

How about telling folk what you're trying to do or telling them how you solved it?

EDIT: Sorry for the rant... I have a problem with arrays today and just wasted too long on this thread!

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Jul 2010 16:06
Quote: "I do have a 64-bit operating system."

Your OS doesn't even come into it when you are running a a 32 bit process. You are still limited to 2GB less the space needed for everything else (programs, DLLs, program data etc).

Now we know that you only need boolean flags, then with 1000x1000x1000 boolean flags, you can reduce the size to around 120MB if using a memblock ... but seriously, that's still a lot of space to use.

Alfa x
20
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 15th Jul 2010 18:04
I think the same.

Can you explain your problem better, so the help that comes can be more clear.

If not, people will start talking forever about what needs to be done
when you dont really need that.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Jul 2010 19:28
Dimension, you've asked this question back in 2007 for an array 500x500x500:

http://forum.thegamecreators.com/?m=forum_view&t=104043&b=1

Here we are 3 years later and your problem is just worse. If you want it resolved we have to know more information to help you. Or do you want to wait another 3 years for a solution?

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Jul 2010 00:56
My guess is he'll never answer any of us like the previous post...

Nice to see IanM's answer to this hasn't changed much in three years! I like constants like IanM

Login to post a reply

Server time is: 2026-07-25 07:54:05
Your offset time is: 2026-07-25 07:54:05