Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
bb4e871e
Unverified
Commit
bb4e871e
authored
Oct 11, 2023
by
Michał Gallus
Committed by
GitHub
Oct 10, 2023
Browse files
Windows: Fix instruction_ref iterator issues in debug builds (#2061)
parent
e5cd8b6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
src/include/migraphx/instruction_ref.hpp
src/include/migraphx/instruction_ref.hpp
+31
-1
No files found.
src/include/migraphx/instruction_ref.hpp
View file @
bb4e871e
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2015-202
2
Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2015-202
3
Advanced Micro Devices, Inc. All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* of this software and associated documentation files (the "Software"), to deal
...
@@ -27,12 +27,42 @@
...
@@ -27,12 +27,42 @@
#include <list>
#include <list>
#include <functional>
#include <functional>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
#include <migraphx/requires.hpp>
namespace
migraphx
{
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
instruction
;
struct
instruction
;
#if defined(_WIN32) && !defined(NDEBUG)
struct
instruction_ref
:
std
::
list
<
instruction
>::
iterator
{
using
instruction_iter
=
std
::
list
<
instruction
>::
iterator
;
using
instruction_const_iter
=
std
::
list
<
instruction
>::
const_iterator
;
instruction_ref
()
=
default
;
instruction_ref
(
const
instruction_iter
&
other
)
:
instruction_iter
(
other
)
{}
template
<
class
T
,
class
U
,
MIGRAPHX_REQUIRES
(
std
::
is_same
<
T
,
instruction_ref
>{}
or
std
::
is_same
<
U
,
instruction_ref
>
{})
>
friend
bool
operator
==
(
const
T
&
x
,
const
U
&
y
)
{
return
x
.
_Unwrapped
().
_Ptr
==
y
.
_Unwrapped
().
_Ptr
;
}
template
<
class
T
,
class
U
,
MIGRAPHX_REQUIRES
(
std
::
is_same
<
T
,
instruction_ref
>{}
or
std
::
is_same
<
U
,
instruction_ref
>
{})
>
friend
bool
operator
!=
(
const
T
&
x
,
const
U
&
y
)
{
return
!
(
x
==
y
);
}
};
#else
using
instruction_ref
=
std
::
list
<
instruction
>::
iterator
;
using
instruction_ref
=
std
::
list
<
instruction
>::
iterator
;
#endif
MIGRAPHX_EXPORT
migraphx
::
instruction
*
as_address
(
const
instruction_ref
&
ins
)
noexcept
;
MIGRAPHX_EXPORT
migraphx
::
instruction
*
as_address
(
const
instruction_ref
&
ins
)
noexcept
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment