item_type must be trivially copyable in parallel #45

Open
Mortal opened this Issue Feb 4, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@Mortal
Collaborator

Mortal commented Feb 4, 2013

Currently, we implicitly require, but do not check, that item_type in parallel is trivially copyable. This check should be explicit, or the code should be extended to allow non-trivially copyable types.

@ghost ghost assigned Mortal Feb 4, 2013

@Mortal

This comment has been minimized.

Show comment
Hide comment
@Mortal

Mortal Feb 12, 2013

Collaborator

Looking into this now it does not seem that we bit-copy the parallel buffers over - at least I cannot find a failing case. @antialize do you remember where this is a problem?

Collaborator

Mortal commented Feb 12, 2013

Looking into this now it does not seem that we bit-copy the parallel buffers over - at least I cannot find a failing case. @antialize do you remember where this is a problem?

@antialize

This comment has been minimized.

Show comment
Hide comment
@antialize

antialize Feb 12, 2013

Collaborator

If you use the ppp branch, and include terrastream/pipe/chunk
Then create a pipe like this
generate_points() | chunk(1024*1024) | parallel(process(), false, 4, 1 ) | unchunk() | consume_points()

Here generate_points, process and consume_points are imaginary classes created by you.
You possibly modify the project example by replacing
parallel(whatever_i_do_now(), false)
with
chunk(1024_1024) | parallel( unchunk() | whatever_i_do_now() | chunk(1024_1024), false, 4, 1) | unchunk()

/Jakob

Collaborator

antialize commented Feb 12, 2013

If you use the ppp branch, and include terrastream/pipe/chunk
Then create a pipe like this
generate_points() | chunk(1024*1024) | parallel(process(), false, 4, 1 ) | unchunk() | consume_points()

Here generate_points, process and consume_points are imaginary classes created by you.
You possibly modify the project example by replacing
parallel(whatever_i_do_now(), false)
with
chunk(1024_1024) | parallel( unchunk() | whatever_i_do_now() | chunk(1024_1024), false, 4, 1) | unchunk()

/Jakob

@antialize antialize closed this Feb 12, 2013

@antialize antialize reopened this Feb 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment