Skip to content

Commit

Permalink
secp minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahdhn committed Dec 25, 2024
1 parent e05473c commit e96728b
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions apps/SECPriority/secp_rxmesh.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
// queue.
PriorityQueueT priority_queue(rx.get_num_edges());
to_collapse->reset(false, DEVICE);
rx.prepare_launch_box(
rx.update_launch_box(
{Op::EV},
launch_box,
(void*)compute_edge_priorities<float, blockThreads>,
Expand Down Expand Up @@ -126,12 +126,17 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,

timers.stop("PriorityQueue");

{
to_collapse->move(DEVICE, HOST);
rx.get_polyscope_mesh()->addEdgeScalarQuantity("ToCollapse",
*to_collapse);
polyscope::show();
}
//{
// to_collapse->move(DEVICE, HOST);
//
// rx.update_polyscope();
// auto ps_mesh = rx.get_polyscope_mesh();
// ps_mesh->updateVertexPositions(*coords);
//
// rx.get_polyscope_mesh()->addEdgeScalarQuantity("ToCollapse",
// *to_collapse);
// polyscope::show();
//}


// loop over the mesh, and try to collapse
Expand Down Expand Up @@ -175,19 +180,23 @@ inline void secp_rxmesh(rxmesh::RXMeshDynamic& rx,
timers.start("Cleanup");
rx.cleanup();
timers.stop("Cleanup");
}

{
rx.update_polyscope();

auto ps_mesh = rx.get_polyscope_mesh();
ps_mesh->updateVertexPositions(*coords);
ps_mesh->setEnabled(false);

rx.render_vertex_patch();
rx.render_edge_patch();
rx.render_face_patch();
polyscope::show();
{
//rx.update_host();
//coords->move(DEVICE, HOST);
//EXPECT_TRUE(rx.validate());

// rx.update_polyscope();
//
// auto ps_mesh = rx.get_polyscope_mesh();
// ps_mesh->updateVertexPositions(*coords);
// ps_mesh->setEnabled(false);
//
// rx.render_vertex_patch();
// rx.render_edge_patch();
// rx.render_face_patch();
// polyscope::show();
}
}
}
timers.stop("Total");
Expand Down

0 comments on commit e96728b

Please sign in to comment.