Compare commits
2 Commits
70dbf1a649
...
f2c7c0d882
| Author | SHA1 | Date | |
|---|---|---|---|
| f2c7c0d882 | |||
| c0a0d101eb |
@@ -0,0 +1,8 @@
|
|||||||
|
Center Delay
|
||||||
|
count velocity x y theta_i theta_f color start end decayrate
|
||||||
|
===================================================
|
||||||
|
s
|
||||||
|
20000 70 0.5 0.5 0 360 red 1 0 0
|
||||||
|
20000 70 0.5 0.5 0 360 green 3.30769 0 0
|
||||||
|
20000 70 0.5 0.5 0 360 blue 5.61538 0 0
|
||||||
|
20000 70 0.5 0.5 0 360 white 7.92308 0 0
|
||||||
+4
-1
@@ -2,4 +2,7 @@ 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
|
||||||
100000 79 0.5 0.5 0 360 cyan 1 0 0
|
10000 40 0.5 0.5 0 360 orange 1 0 0
|
||||||
|
10000 40 0.5 0.5 0 360 cyan 3.30769 0 0
|
||||||
|
10000 40 0.5 0.5 0 360 violet 5.61538 0 0
|
||||||
|
10000 40 0.5 0.5 0 360 green 7.92308 0 0
|
||||||
|
|||||||
+7
-9
@@ -1,11 +1,9 @@
|
|||||||
Big Hexagon (fixed 1080)
|
Big Diamond (relative)
|
||||||
x y
|
x y
|
||||||
==================
|
==================
|
||||||
f
|
r
|
||||||
960.0 1.303
|
0.5 0.0
|
||||||
1426.525 270.652
|
0.78125 0.5
|
||||||
1426.525 809.348
|
0.5 1.0
|
||||||
960.0 1078.697
|
0.21875 0.5
|
||||||
493.475 809.348
|
0.5 0.0
|
||||||
493.475 270.652
|
|
||||||
960.0 1.303
|
|
||||||
|
|||||||
+6
-6
@@ -30,9 +30,9 @@ struct Polyparti::ParticleField::ColCode {
|
|||||||
|
|
||||||
//Pointers to malloc on GPU VRAM for calculations. malloc_shared pointers are entry/exit
|
//Pointers to malloc on GPU VRAM for calculations. malloc_shared pointers are entry/exit
|
||||||
//point for data in CPU RAM
|
//point for data in CPU RAM
|
||||||
float *v_ptr = malloc_shared<float>(2 * len_points, q);
|
float *v_ptr = malloc_device<float>(2 * len_points, q);
|
||||||
float *d_ptr = malloc_shared<float>(2 * len_points, q);
|
float *d_ptr = malloc_device<float>(2 * len_points, q);
|
||||||
float *c_ptr = malloc_shared<float>(2 * len_points, q);
|
float *c_ptr = malloc_device<float>(2 * len_points, q);
|
||||||
float *ray_ptr = malloc_device<float>(2 * len_points, q);
|
float *ray_ptr = malloc_device<float>(2 * len_points, q);
|
||||||
float *det_ptr = malloc_device<float>(len_points, q);
|
float *det_ptr = malloc_device<float>(len_points, q);
|
||||||
float *bestA_ptr = malloc_device<float>(2 * len_points, q);
|
float *bestA_ptr = malloc_device<float>(2 * len_points, q);
|
||||||
@@ -170,9 +170,9 @@ struct Polyparti::ParticleField::ColCode {
|
|||||||
void moveParticles() {
|
void moveParticles() {
|
||||||
queue& q = q_shared();
|
queue& q = q_shared();
|
||||||
int len = positions.size();
|
int len = positions.size();
|
||||||
float *v_ptr = malloc_shared<float>(2 * len, q);
|
float *v_ptr = malloc_device<float>(2 * len, q);
|
||||||
float *p_ptr = malloc_shared<float>(2 * len, q);
|
float *p_ptr = malloc_device<float>(2 * len, q);
|
||||||
float *t_ptr = malloc_shared<float>(1, q);
|
float *t_ptr = malloc_device<float>(1, q);
|
||||||
|
|
||||||
q.submit([&](handler& h) {
|
q.submit([&](handler& h) {
|
||||||
h.memcpy(p_ptr, &positions[0], len * 2 * sizeof(float));
|
h.memcpy(p_ptr, &positions[0], len * 2 * sizeof(float));
|
||||||
|
|||||||
Reference in New Issue
Block a user