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
39a95e60
Commit
39a95e60
authored
Aug 11, 2023
by
Michal Gallus
Browse files
Fix instruction_ref problems on Windows debug builds
parent
6dfdf24a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
src/include/migraphx/instruction_ref.hpp
src/include/migraphx/instruction_ref.hpp
+34
-1
No files found.
src/include/migraphx/instruction_ref.hpp
View file @
39a95e60
/*
/*
* 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
...
@@ -32,7 +32,40 @@ namespace migraphx {
...
@@ -32,7 +32,40 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
instruction
;
struct
instruction
;
#if defined(_WIN32) && !defined(NDEBUG)
class
instruction_ref
:
public
std
::
list
<
instruction
>::
iterator
{
public:
instruction_ref
()
=
default
;
instruction_ref
(
const
std
::
list
<
instruction
>::
iterator
&
other
)
{
_Ptr
=
other
.
_Ptr
;
_Adopt
(
other
.
_Getcont
());
}
bool
operator
==
(
const
instruction_ref
&
other
)
const
{
return
this
->
_Unwrapped
().
_Ptr
==
other
.
_Unwrapped
().
_Ptr
;
}
bool
operator
==
(
const
std
::
list
<
instruction
>::
iterator
&
other
)
const
{
return
this
->
_Unwrapped
().
_Ptr
==
other
.
_Unwrapped
().
_Ptr
;
}
bool
operator
==
(
const
std
::
list
<
instruction
>::
const_iterator
&
other
)
const
{
return
this
->
_Unwrapped
().
_Ptr
==
other
.
_Unwrapped
().
_Ptr
;
}
bool
operator
!=
(
const
instruction_ref
&
other
)
const
{
return
!
(
*
this
==
other
);
}
};
#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