Skip to content
Snippets Groups Projects
Commit 2270f4c8 authored by Jammer, Tim's avatar Jammer, Tim
Browse files

fix invalidBuf case when recv and send buffer are split

parent e138f1d2
No related branches found
No related tags found
1 merge request!5more work on infrastructure III
...@@ -56,6 +56,13 @@ class InvalidBufErrorP2P(ErrorGenerator): ...@@ -56,6 +56,13 @@ class InvalidBufErrorP2P(ErrorGenerator):
tm = get_send_recv_template(send_func, recv_func) tm = get_send_recv_template(send_func, recv_func)
if buf_to_use == CorrectParameterFactory().buf_var_name: if buf_to_use == CorrectParameterFactory().buf_var_name:
if tm.get_block("alloc").has_operation(kind='all', index=1) and check_receive:
name = tm.get_block("alloc").get_operation(kind='all', index=1).get_name()
type = tm.get_block("alloc").get_operation(kind='all', index=1).get_type()
tm.get_block("alloc").replace_operation(
CorrectParameterFactory.dtype[0] + "* " + name + ";", kind='all', index=1)
else:
tm.get_block("alloc").replace_operation( tm.get_block("alloc").replace_operation(
CorrectParameterFactory.dtype[0] + "* " + CorrectParameterFactory.buf_var_name + ";") CorrectParameterFactory.dtype[0] + "* " + CorrectParameterFactory.buf_var_name + ";")
# without allocation: usage is undefined behaviour # without allocation: usage is undefined behaviour
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment