Skip to content

Commit

Permalink
Merge branch 'viewcleanup' into 'master'
Browse files Browse the repository at this point in the history
View Clean Up

See merge request StanfordLegion/legion!1553
  • Loading branch information
rainmakereuab committed Nov 25, 2024
2 parents 455dfee + b512ccd commit a97cfa5
Show file tree
Hide file tree
Showing 15 changed files with 2,447 additions and 4,956 deletions.
1 change: 0 additions & 1 deletion runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ list(APPEND LEGION_SRC
legion.h
legion/bitmask.h
legion/garbage_collection.h legion/garbage_collection.cc
legion/index_space_value.h legion/index_space_value.cc
legion/legion_allocation.h
legion/legion_analysis.h legion/legion_analysis.cc
legion/legion_c.h legion/legion_c.cc
Expand Down
75 changes: 0 additions & 75 deletions runtime/legion/index_space_value.cc

This file was deleted.

52 changes: 0 additions & 52 deletions runtime/legion/index_space_value.h

This file was deleted.

68 changes: 8 additions & 60 deletions runtime/legion/legion_analysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "legion/legion_analysis.h"
#include "legion/legion_context.h"
#include "legion/legion_replication.h"
#include "legion/index_space_value.h"

namespace Legion {
namespace Internal {
Expand Down Expand Up @@ -67,8 +66,9 @@ namespace Legion {

//--------------------------------------------------------------------------
PhysicalUser::PhysicalUser(const RegionUsage &u, IndexSpaceExpression *e,
UniqueID id, unsigned x, bool cpy, bool cov)
: usage(u), expr(e), op_id(id), index(x), copy_user(cpy), covers(cov)
ApEvent term, UniqueID id, unsigned x, bool cpy, bool cov)
: usage(u), expr(e), term_event(term), op_id(id), index(x),
copy_user(cpy), covers(cov)
//--------------------------------------------------------------------------
{
#ifdef DEBUG_LEGION
Expand All @@ -77,16 +77,6 @@ namespace Legion {
expr->add_base_expression_reference(PHYSICAL_USER_REF);
}

//--------------------------------------------------------------------------
PhysicalUser::PhysicalUser(const PhysicalUser &rhs)
: usage(rhs.usage), expr(rhs.expr), op_id(rhs.op_id), index(rhs.index),
copy_user(rhs.copy_user), covers(rhs.covers)
//--------------------------------------------------------------------------
{
// should never be called
assert(false);
}

//--------------------------------------------------------------------------
PhysicalUser::~PhysicalUser(void)
//--------------------------------------------------------------------------
Expand All @@ -98,49 +88,6 @@ namespace Legion {
delete expr;
}

//--------------------------------------------------------------------------
PhysicalUser& PhysicalUser::operator=(const PhysicalUser &rhs)
//--------------------------------------------------------------------------
{
// should never be called
assert(false);
return *this;
}

//--------------------------------------------------------------------------
void PhysicalUser::pack_user(Serializer &rez,
const AddressSpaceID target) const
//--------------------------------------------------------------------------
{
RezCheck z(rez);
rez.serialize(usage);
expr->pack_expression(rez, target);
rez.serialize(op_id);
rez.serialize(index);
rez.serialize<bool>(copy_user);
rez.serialize<bool>(covers);
}

//--------------------------------------------------------------------------
/*static*/ PhysicalUser* PhysicalUser::unpack_user(Deserializer &derez,
RegionTreeForest *forest, const AddressSpaceID source)
//--------------------------------------------------------------------------
{
DerezCheck z(derez);
RegionUsage usage;
derez.deserialize(usage);
IndexSpaceExpression *expr =
IndexSpaceExpression::unpack_expression(derez, forest, source);
UniqueID op_id;
derez.deserialize(op_id);
unsigned index;
derez.deserialize(index);
bool copy_user, covers;
derez.deserialize<bool>(copy_user);
derez.deserialize<bool>(covers);
return new PhysicalUser(usage, expr, op_id, index, copy_user, covers);
}

/////////////////////////////////////////////////////////////
// VersionInfo
/////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -7568,16 +7515,17 @@ namespace Legion {
deferral_events, applied_events, already_deferred);
else if (!set->set_expr->is_empty())
{
IndexSpaceValue expr = IndexSpaceValue(set->set_expr) & analysis_expr;
if (expr.is_empty())
IndexSpaceExpression *expr = runtime->forest->intersect_index_spaces(
set->set_expr, analysis_expr);
if (expr->is_empty())
return;
// Check to see this expression covers the equivalence set
// If it does then we can use original set expression
if (expr.get_volume() == set->set_expr->get_volume())
if (expr->get_volume() == set->set_expr->get_volume())
set->analyze(*this, set->set_expr, true/*covers*/, mask,
deferral_events, applied_events, already_deferred);
else
set->analyze(*this, *expr, false/*covers*/, mask,
set->analyze(*this, expr, false/*covers*/, mask,
deferral_events, applied_events, already_deferred);
}
else
Expand Down
11 changes: 4 additions & 7 deletions runtime/legion/legion_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -818,18 +818,15 @@ namespace Legion {
static const AllocationType alloc_type = PHYSICAL_USER_ALLOC;
public:
PhysicalUser(const RegionUsage &u, IndexSpaceExpression *expr,
UniqueID op_id, unsigned index, bool copy, bool covers);
PhysicalUser(const PhysicalUser &rhs);
ApEvent term, UniqueID op_id, unsigned index, bool copy, bool covers);
PhysicalUser(const PhysicalUser &rhs) = delete;
~PhysicalUser(void);
public:
PhysicalUser& operator=(const PhysicalUser &rhs);
public:
void pack_user(Serializer &rez, const AddressSpaceID target) const;
static PhysicalUser* unpack_user(Deserializer &derez,
RegionTreeForest *forest, const AddressSpaceID source);
PhysicalUser& operator=(const PhysicalUser &rhs) = delete;
public:
const RegionUsage usage;
IndexSpaceExpression *const expr;
const ApEvent term_event;
const UniqueID op_id;
const unsigned index; // region requirement index
const bool copy_user; // is this from a copy or an operation
Expand Down
2 changes: 2 additions & 0 deletions runtime/legion/legion_instances.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ namespace Legion {
void compute_copy_offsets(const FieldMask &copy_mask,
std::vector<CopySrcDstField> &fields);
public:
inline bool is_unbound(void) const
{ return (kind.load() == UNBOUND_INSTANCE_KIND); }
inline void add_base_valid_ref(ReferenceSource source, int cnt = 1);
inline void add_nested_valid_ref(DistributedID source, int cnt = 1);
inline bool acquire_instance(ReferenceSource source);
Expand Down
7 changes: 1 addition & 6 deletions runtime/legion/legion_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,6 @@ namespace Legion {
SEND_VIEW_ADD_COPY_USER,
SEND_VIEW_FIND_LAST_USERS_REQUEST,
SEND_VIEW_FIND_LAST_USERS_RESPONSE,
SEND_VIEW_REPLICATION_REQUEST,
SEND_VIEW_REPLICATION_RESPONSE,
SEND_VIEW_REPLICATION_REMOVAL,
SEND_MANAGER_REQUEST,
SEND_FUTURE_RESULT,
SEND_FUTURE_RESULT_SIZE,
Expand Down Expand Up @@ -1225,9 +1222,6 @@ namespace Legion {
"Send View Add Copy User", \
"Send View Find Last Users Request", \
"Send View Find Last Users Response", \
"Send View Replication Request", \
"Send View Replication Response", \
"Send View Replication Removal", \
"Send Manager Request", \
"Send Future Result", \
"Send Future Result Size", \
Expand Down Expand Up @@ -2223,6 +2217,7 @@ namespace Legion {
class LogicalView; // base class for instance and reduction
class InstanceKey;
class InstanceView;
class ExprView;
class CollectableView; // pure virtual class
class IndividualView;
class CollectiveView;
Expand Down
Loading

0 comments on commit a97cfa5

Please sign in to comment.