Skip to content

Commit

Permalink
add more requires
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Feb 4, 2025
1 parent 9b788b9 commit ffb3a0d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/luisa/xir/function.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class LC_XIR_API Function : public IntrusiveForwardNode<Function, DerivedGlobalV
using FunctionList = IntrusiveForwardList<Function>;

template<typename Derived, DerivedFunctionTag tag, typename Base = Function>
requires std::derived_from<Base, Function>
class DerivedFunction : public Base {
public:
using derived_function_type = Derived;
Expand Down
1 change: 1 addition & 0 deletions include/luisa/xir/instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ class LC_XIR_API ConditionalBranchTerminatorInstruction : public TerminatorInstr
};

template<typename Derived, DerivedInstructionTag tag, typename Base = Instruction>
requires std::derived_from<Base, Instruction>
class DerivedInstruction : public Base {
public:
using derived_instruction_type = Derived;
Expand Down
1 change: 1 addition & 0 deletions include/luisa/xir/metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class LC_XIR_API Metadata : public IntrusiveForwardNode<Metadata> {
};

template<typename Derived, DerivedMetadataTag tag, typename Base = Metadata>
requires std::derived_from<Base, Metadata>
class LC_XIR_API DerivedMetadata : public Base {
public:
using derived_metadata_type = Derived;
Expand Down
1 change: 1 addition & 0 deletions include/luisa/xir/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class DerivedGlobalValue : public DerivedValue<Derived, tag, Base>,
explicit DerivedGlobalValue(Module *module, Args &&...args) noexcept
: DerivedValue<Derived, tag, Base>{std::forward<Args>(args)...},
GlobalValueModuleMixin{module} {}
[[nodiscard]] bool is_global() const noexcept final { return true; }
[[nodiscard]] Pool *pool() noexcept final { return _pool_from_parent_module(); }
};

Expand Down
1 change: 0 additions & 1 deletion src/xir/basic_block.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <luisa/core/logging.h>
#include <luisa/xir/function.h>
#include <luisa/xir/basic_block.h>

namespace luisa::compute::xir {
Expand Down

0 comments on commit ffb3a0d

Please sign in to comment.