warp.tile_query_valid#

warp.tile_query_valid(query: BvhQueryTiled) bool#
  • Kernel

Return whether there are remaining results in a thread-block parallel BVH query.

This function returns True when the query has more results to process, and False when the query is fully exhausted. The value is uniform across all threads in the block.

This can be used as a loop condition instead of tile_max():

query = wp.tile_bvh_query_aabb(bvh_id, lower, upper)
while wp.tile_query_valid(query):
    result_tile = wp.tile_bvh_query_next(query)
    result_idx = wp.untile(result_tile)
    if result_idx >= 0:
        ...
Parameters:

query – The thread-block BVH query object

Returns:

True if more results are available, False if exhausted

warp.tile_query_valid(query: MeshQueryAABBTiled) bool
  • Kernel

Return whether there are remaining results in a thread-block parallel mesh AABB query.

This function returns True when the query has more results to process, and False when the query is fully exhausted. The value is uniform across all threads in the block.

This can be used as a loop condition instead of tile_max():

query = wp.tile_mesh_query_aabb(mesh_id, lower, upper)
while wp.tile_query_valid(query):
    result_tile = wp.tile_mesh_query_aabb_next(query)
    result_idx = wp.untile(result_tile)
    if result_idx >= 0:
        ...
Parameters:

query – The thread-block mesh query object

Returns:

True if more results are available, False if exhausted