- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm pretty new to HPC, SSE technlogy etc so forgive me easy question.
I'm developing an application for a fast simulation in magnetism. I use very large array(implemented as vector from stl) to store index of every atom. My array is 1D so when i need xyz coordinates of a certain atom I need to calculate it(i know the dimensions of a "cube"). Functions responisble for that are main issiue in my program performance.
It's sth like this(for 2D model), index is an input:
(*ptrDANE_2D).y = index * (*ptrD2);
(*ptrDANE_2D).x = index & (*ptrD3);
Can you give me any suggetions what I can do with that? Should I use SSE? Or maybe there is some HPC lib with such functions?
Thank you in advance.
I use Visual Studio 2005 compiler for C++ coding and my target platform is Pentium4 HT.
I'm pretty new to HPC, SSE technlogy etc so forgive me easy question.
I'm developing an application for a fast simulation in magnetism. I use very large array(implemented as vector from stl) to store index of every atom. My array is 1D so when i need xyz coordinates of a certain atom I need to calculate it(i know the dimensions of a "cube"). Functions responisble for that are main issiue in my program performance.
It's sth like this(for 2D model), index is an input:
(*ptrDANE_2D).y = index * (*ptrD2);
(*ptrDANE_2D).x = index & (*ptrD3);
Can you give me any suggetions what I can do with that? Should I use SSE? Or maybe there is some HPC lib with such functions?
Thank you in advance.
I use Visual Studio 2005 compiler for C++ coding and my target platform is Pentium4 HT.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
There are so many different ways to achieve good performance of large 1D arrays, so my advise is just one of many, many possible solutions. About one year agowe investigated the various options for efficient arrays in C/C++, and we found that the efficiency obtained was depentent on compiler and compiler version, for exampleSTL arrays may be more efficient with later versions of the compiler. The workaround to this is to use ordinary C-arraysin the most timeconsuming parts of your code. Compile using -xN -O2 or -xN -O3to obtain good SSE2 code.
Hope this works,
Lars Petter Endresen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for your answer. I'm pretty sure that I use most efficient tools and compiler flag I can. My question was more about what to do with calculation algorithm. I believe it's a common problem in 3D models or even 3D graphics. Thanks to VTune I know that this function needs improvment.
Thank you for your answer. I'm pretty sure that I use most efficient tools and compiler flag I can. My question was more about what to do with calculation algorithm. I believe it's a common problem in 3D models or even 3D graphics. Thanks to VTune I know that this function needs improvment.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page