Skip to content

Commit

Permalink
upd zpc
Browse files Browse the repository at this point in the history
  • Loading branch information
littlemine committed Aug 23, 2024
1 parent ce6a1b2 commit 4936feb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion projects/CUDA/test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ struct ZSCULinkTest : INode {
{
zs::VdbGrid<3, float, zs::index_sequence<3, 4, 5>> ag;
using TT = RM_CVREF_T(ag);
fmt::print("adaptive grid type: {}\n", zs::get_var_type_str(ag));
fmt::print("adaptive grid type: {}\n",
zs::get_var_type_str(ag).asChars());
// fmt::print("tile bits: {}\n", zs::get_type_str<TT::tile_bits_type>());
// fmt::print("hierarchy bits: {}\n",
// zs::get_type_str<TT::hierarchy_bits_type>());
Expand Down
2 changes: 1 addition & 1 deletion projects/CUDA/utils/Primitives.cu
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct ZSParticlePerlinNoise : INode {
auto &tv = zspars->getParticles();

if (!tv.hasProperty(tag))
throw std::runtime_error(fmt::format("Attribute [{}] doesn't exist!", tag));
throw std::runtime_error(fmt::format("Attribute [{}] doesn't exist!", tag.asChars()));
const int nchns = tv.getPropertySize(tag);

auto pol = zs::cuda_exec();
Expand Down
6 changes: 3 additions & 3 deletions projects/CUDA/utils/TopoUtils.cu
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ void update_surface_cell_normals(zs::CudaExecutionPolicy &pol, ZenoParticles::pa
constexpr auto space = execspace_e::cuda;

if (!verts.hasProperty(xTag))
throw std::runtime_error(fmt::format("missing property [{}] for vertex positions.", xTag));
throw std::runtime_error(fmt::format("missing property [{}] for vertex positions.", xTag.asChars()));
if (!tris.hasProperty("inds"))
throw std::runtime_error("missing property [inds] for surface triangles.");
if (!lines.hasProperty("fe_inds") || !lines.hasProperty("inds"))
throw std::runtime_error("missing property [fe_inds]/[inds] for surface edges.");
if (!tris.hasProperty(triNrmTag))
throw std::runtime_error(fmt::format("missing property [{}] for surface triangles.", triNrmTag));
throw std::runtime_error(fmt::format("missing property [{}] for surface triangles.", triNrmTag.asChars()));
if (!lines.hasProperty(biNrmTag))
throw std::runtime_error(fmt::format("missing property [{}] for surface edges.", biNrmTag));
throw std::runtime_error(fmt::format("missing property [{}] for surface edges.", biNrmTag.asChars()));

pol(range(tris.size()), [verts = proxy<space>(verts), xOffset = verts.getPropertyOffset(xTag), vOffset = vOffset,
tris = proxy<space>({}, tris), triNrmTag] ZS_LAMBDA(int ti) mutable {
Expand Down

0 comments on commit 4936feb

Please sign in to comment.