From 0f1e1ee4e39f77df3118d0b814621f69cf1525f2 Mon Sep 17 00:00:00 2001 From: Alex Lardner Date: Wed, 19 Aug 2026 00:51:05 -0700 Subject: [PATCH] I don't know what I've done --- README.md | 2 +- src/polypartiCL. | 0 src/polypartiCL.cpp | 24 ++++++++++++++++-------- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 src/polypartiCL. diff --git a/README.md b/README.md index 4c9d5db..4a0ba01 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You'll need these even if you don't compile with cmake until SYCL gets native LL All simulation code uses single-precision floating point arithmetic to ensure compatability with (integrated) graphics packages that do not support 64-bit floating point. -polypartiCL is licensed with the 3-clause BSD license. +polypartiCL is licensed with the 3-clause BSD license. Initial development of GLSL shaders (./shaders/*.fs) was assisted by generative AI (Claude Sonnet). ## Todo - Reduce corner escaping diff --git a/src/polypartiCL. b/src/polypartiCL. new file mode 100644 index 0000000..e69de29 diff --git a/src/polypartiCL.cpp b/src/polypartiCL.cpp index ad4cff8..c0650c7 100644 --- a/src/polypartiCL.cpp +++ b/src/polypartiCL.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -12,11 +13,15 @@ using namespace sycl; struct Polyparti::ParticleField::ColCode { std::vector positions, velocities; - float t, lifeTime = 0, startTime = 0; - int count, decay = 0, originCounter = 0; - int color[4]; + std::vector lifeTime, startTime; + int count; + std::vector decay, originCounter; + std::vector > color; + //int color[4]; //float decay = 1.0f; - bool dies = false, dead = false; + //bool dies = false, dead = false; + std::vector dies, dead; + float t; // allocate only one queue so we don't reinitialize every step of the calculation static queue& q_shared() { @@ -197,6 +202,9 @@ struct Polyparti::ParticleField::ColCode { free(v_ptr, q); free(t_ptr, q); } + void updateSpecs() { + + } }; @@ -224,7 +232,7 @@ void Polyparti::ParticleField::deleteParticle(int index) { } void Polyparti::ParticleField::updateField(std::vector verticies, double time) { - if(colcode->t > 0) { + /*if(colcode->t > 0) { ++colcode->originCounter; } else if (colcode->t < 0) { --colcode->originCounter; @@ -236,12 +244,12 @@ void Polyparti::ParticleField::updateField(std::vector verticies, doub if (colcode->color[3] <= 0) { colcode->dead = true; } - } + }*/ - if(colcode->originCounter >= 0) { + //if(colcode->originCounter >= 0) { colcode->checkCollisions(verticies); colcode->moveParticles(); - } + //} } const std::vector& Polyparti::ParticleField::getPositions() const {