Legion Runtime
Loading...
Searching...
No Matches
logging_wrapper.h
Go to the documentation of this file.
1/* Copyright 2026 Stanford University, NVIDIA Corporation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef __LOGGING_WRAPPER_H__
17#define __LOGGING_WRAPPER_H__
18
25
26namespace Legion {
27namespace Mapping {
28
56// TODO:
57// - Include other mapping calls.
58// - Provide some control over the level of detail.
60 public:
61 LoggingWrapper(Mapper* mapper, Logger* logger = NULL);
62 virtual ~LoggingWrapper();
63#ifndef NO_LEGION_CONTROL_REPLICATION
64 private:
65 template<typename OPERATION>
66 void select_sharding_functor_impl(const MapperContext ctx,
67 const OPERATION& op,
68 const SelectShardingFunctorInput& input,
70 public:
71 void replicate_task(MapperContext ctx,
72 const Task& task,
73 const ReplicateTaskInput& input,
74 ReplicateTaskOutput& output) override;
75 using ForwardingMapper::select_sharding_functor;
76 void select_sharding_functor(const MapperContext ctx,
77 const Task& task,
78 const SelectShardingFunctorInput& input,
79 SelectShardingFunctorOutput& output) override;
80 void select_sharding_functor(const MapperContext ctx,
81 const Copy& copy,
82 const SelectShardingFunctorInput& input,
83 SelectShardingFunctorOutput& output) override;
84#endif // NO_LEGION_CONTROL_REPLICATION
85 public:
86 const char* get_mapper_name(void) const override;
87 void select_task_options(const MapperContext ctx,
88 const Task& task,
89 TaskOptions& output) override;
90 void slice_task(const MapperContext ctx,
91 const Task& task,
92 const SliceTaskInput& input,
93 SliceTaskOutput& output) override;
94 void map_task(const MapperContext ctx,
95 const Task& task,
96 const MapTaskInput& input,
97 MapTaskOutput& output) override;
98 void select_task_sources(const MapperContext ctx,
99 const Task& task,
100 const SelectTaskSrcInput& input,
101 SelectTaskSrcOutput& output) override;
102 void map_inline(const MapperContext ctx,
103 const InlineMapping& inline_op,
104 const MapInlineInput& input,
105 MapInlineOutput& output) override;
106 void select_inline_sources(const MapperContext ctx,
107 const InlineMapping& inline_op,
108 const SelectInlineSrcInput& input,
109 SelectInlineSrcOutput& output) override;
110 void map_copy(const MapperContext ctx,
111 const Copy& copy,
112 const MapCopyInput& input,
113 MapCopyOutput& output) override;
114 void select_copy_sources(const MapperContext ctx,
115 const Copy& copy,
116 const SelectCopySrcInput& input,
117 SelectCopySrcOutput& output) override;
118 private:
119 Logger* logger;
120 std::string name;
121};
122
123}; // namespace Mapping
124}; // namespace Legion
125
126#endif // __LOGGING_WRAPPER_H___
Definition mapping.h:185
Definition mapping.h:216
Definition forwarding_mapper.h:35
Definition logging_wrapper.h:59
void select_sharding_functor(const MapperContext ctx, const Copy &copy, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
const char * get_mapper_name(void) const override
Definition mapping.h:642
Definition mapping.h:112
Definition accessors.h:29
Definition mapping.h:1403
Definition mapping.h:783