Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7018933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:06:59+00:00 2026-05-27T23:06:59+00:00

I am interested in implementing particle codes on GPU’s using CUDA for some fluid

  • 0

I am interested in implementing particle codes on GPU’s using CUDA for some fluid simulation purposes.

My particle will need to have information like position, mass, momentum, position and some other physical parameters. In all my simulation will have N particles N>=10^5

My question is what is the most efficient way to represent data for these particles?

Do I represent the physical quantities over several arrays like mass[N] , momentum[N], positionx[N]
…. or do I create a

struct particle 
{

mass M;

pressure p;
.
.

}

and then create an array out of these structs. Please advise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:06:59+00:00Added an answer on May 27, 2026 at 11:06 pm

    Using separate arrays is preferred to using an array of structures. Using contiguous memory for each quantity allows for memory coalescing, whereas reading an arbitrary sized structure does not. Some quantities which are normally read as a tuple (say positions or velocity components) are probably best stored using one of the GPU intrinsic vector types (float2, float4) and read in a single memory transaction. This will maximise memory throughput.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am interested in implementing some particle techniques for fluid simulation on GPU's using
I'm interested in implementing a Forth system, just so I can get some experience
I'm interested in implementing Backbone.js for some of the more repetitive in-page CRUD structures
I'm interested in implementing PRG in my website for some forms I've created. At
I am interested in implementing a sort of event driven dispatch queue using MPI
Please recommend some material about implementing Object-Oriented Databases for dynamic languages (interested in Ruby).
I'm interested in implementing autocomplete in Python. For example, as the user types in
I'm currently poking around with a new archive format and was interested in implementing
I'm interested in learning some (ideally) database agnostic ways of selecting the n th
We are currently interested in implementing CMMI level 2 for our development processes. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.