Dev #2

Merged
alardner merged 10 commits from dev into main 2026-07-13 23:04:40 -07:00
4 changed files with 15 additions and 7 deletions
Showing only changes of commit aa9d6bc044 - Show all commits
+8
View File
@@ -9,3 +9,11 @@ cmake assumes icpx and the [Intel OneAPI](https://www.intel.com/content/www/us/e
You'll need these even if you don't compile with cmake until SYCL gets native LLVM support. You'll need these even if you don't compile with cmake until SYCL gets native LLVM support.
polypartiCL is licensed with the 3-clause BSD license. polypartiCL is licensed with the 3-clause BSD license.
## Todo
- Rewrite & optimize simulation code, store all points/velocites in one array and submit once
- Consider modelling each particle and all its relevant data points individually
- Submit each relevant data point by pointer offset, size of struct is irrelevant as long as it is constant, only necessary data will be submitted to kernel
- Add linear beams
- Add environment objects / multiple rooms per screen
- Add timed events
+3 -3
View File
@@ -2,6 +2,6 @@ Center Delay
count velocity x y theta_i theta_f color start end decayrate count velocity x y theta_i theta_f color start end decayrate
=================================================== ===================================================
s s
18000 79 0.5 0.5 0 360 cyan 1 0 0 16000 79 0.5 0.5 0 360 cyan 1 0 0
18000 79 0.5 0.5 0 360 magenta 2.075 0 0 16000 79 0.5 0.5 0 360 magenta 2.075 0 0
18000 79 0.5 0.5 0 360 yellow 4.931 0 0 16000 79 0.5 0.5 0 360 yellow 4.931 0 0
+4 -2
View File
@@ -19,13 +19,14 @@ int main(int argc, char* argv[]) {
float rotSpeed = -0.11f; float rotSpeed = -0.11f;
float rotAngle = 0.0f; float rotAngle = 0.0f;
float d_interval_pct = 0.00001f; float d_interval_pct = 0.00001f;
float stopAngle = 0.0f;
bool rotate = false; bool rotate = false;
bool drawLines = true; bool drawLines = true;
bool drawFPS = false; bool drawFPS = false;
bool useShader = true; bool useShader = true;
bool paused = false; bool paused = false;
bool gentleTurn = false; //bool gentleTurn = false;
bool turning = false; //bool turning = false;
// bool counterclockwise = false; // bool counterclockwise = false;
// //
@@ -51,6 +52,7 @@ int main(int argc, char* argv[]) {
for (const auto& item : sim.getCorners()) { for (const auto& item : sim.getCorners()) {
lines.push_back({item[0], item[1]}); lines.push_back({item[0], item[1]});
} }
raylib::Window window(screenWidth, screenHeight, "polypartiCL"); raylib::Window window(screenWidth, screenHeight, "polypartiCL");
//raylib::Button::key R(KEY_R); //raylib::Button::key R(KEY_R);
-2
View File
@@ -179,7 +179,6 @@ struct Polyparti::ParticleField::ColCode {
}); });
q.wait(); q.wait();
q.submit([&](handler& h) { h.memcpy(v_ptr, &velocities[0], len * 2 * sizeof(float)); } ); q.submit([&](handler& h) { h.memcpy(v_ptr, &velocities[0], len * 2 * sizeof(float)); } );
q.wait();
q.submit([&](handler& h) { h.memcpy(t_ptr, &t, sizeof(float)); } ); q.submit([&](handler& h) { h.memcpy(t_ptr, &t, sizeof(float)); } );
q.wait(); q.wait();
@@ -190,7 +189,6 @@ struct Polyparti::ParticleField::ColCode {
q.wait(); q.wait();
q.submit([&](handler& h) { h.memcpy(&positions[0], p_ptr, len * 2 * sizeof(float)); }); q.submit([&](handler& h) { h.memcpy(&positions[0], p_ptr, len * 2 * sizeof(float)); });
q.wait();
q.submit([&](handler& h) { h.memcpy(&velocities[0], v_ptr, len * 2 * sizeof(float)); }); q.submit([&](handler& h) { h.memcpy(&velocities[0], v_ptr, len * 2 * sizeof(float)); });
q.wait(); q.wait();