Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shumbo committed Dec 2, 2024
1 parent 5ac0739 commit 497d18e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chorus_book/src/header.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# extern crate chorus_lib;
# use chorus_lib::core::{ChoreoOp, Choreography, ChoreographyLocation, Projector, Located, MultiplyLocated, Superposition, Runner, LocationSet, Serialize, Deserialize};
# use chorus_lib::core::{ChoreoOp, Choreography, ChoreographyLocation, Projector, Located, MultiplyLocated, Runner, LocationSet, Serialize, Deserialize};
# use chorus_lib::transport::local::{LocalTransport, LocalTransportChannelBuilder};
# #[derive(ChoreographyLocation)]
# struct Alice;
Expand Down
12 changes: 8 additions & 4 deletions chorus_lib/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,12 @@ pub trait ChoreoOp<ChoreoLS: LocationSet> {
Sender: Member<ChoreoLS, Index1>,
D: Subset<ChoreoLS, Index2>;

/// TODO: documentation
/// Obtains a normal value from a value located at all locations in the census
fn naked<S: LocationSet, V, Index>(&self, data: MultiplyLocated<V, S>) -> V
where
ChoreoLS: Subset<S, Index>;

/// TODO: documentation
/// Wraps a value into a located value at the current census
fn unnaked<V>(&self, data: V) -> MultiplyLocated<V, ChoreoLS>;

/// Calls a choreography.
Expand Down Expand Up @@ -547,7 +547,9 @@ pub trait FanOutChoreography<V> {
type L: LocationSet;
/// Locations looping over
type QS: LocationSet;
/// TODO: documentation
/// The body of the choreography defined in terms of the operators provided by `ChoreoOp`
///
/// `Q` is the location that the loop variable and is guaranteed to be a member of `L` and `QS`.
fn run<Q: ChoreographyLocation, QSSubsetL, QMemberL, QMemberQS>(
&self,
op: &impl ChoreoOp<Self::L>,
Expand All @@ -566,7 +568,9 @@ pub trait FanInChoreography<V> {
type QS: LocationSet;
/// Recipient locations
type RS: LocationSet;
/// run a choreography
/// The body of the choreography defined in terms of the operators provided by `ChoreoOp`
///
/// `Q` is the location that the loop variable and is guaranteed to be a member of `L` and `QS`.
fn run<Q: ChoreographyLocation, QSSubsetL, RSSubsetL, QMemberL, QMemberQS>(
&self,
op: &impl ChoreoOp<Self::L>,
Expand Down

0 comments on commit 497d18e

Please sign in to comment.