Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPP-API] Fix cpp api doc #18671

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/include/ray/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ WaitResult<T> Wait(const std::vector<ray::ObjectRef<T>> &objects, int num_object
int timeout_ms);

/// Create a `TaskCaller` for calling remote function.
/// It is used for normal task, such as ray::Task(Plus1, 1), ray::Task(Plus, 1, 2).
/// It is used for normal task, such as ray::Task(Plus1).Remote(1),
/// ray::Task(Plus).Remote(1, 2).
/// \param[in] func The function to be remote executed.
/// \param[in] args The function arguments passed by a value or ObjectRef.
/// \return TaskCaller.
template <typename F>
ray::internal::TaskCaller<F> Task(F func);
Expand Down
6 changes: 3 additions & 3 deletions doc/source/actors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Creating an actor
return new Counter();
}

RAY_REMOTE(&Counter::Increment, &Counter::GetCounter,
RAY_REMOTE(&Counter::Increment, &Counter::GetCounter,
&Counter::Reset, CreateCounter);

// Create an actor with a factory method.
Expand Down Expand Up @@ -488,7 +488,7 @@ If we instantiate an actor, we can pass the handle around to various tasks.

// Start some tasks that use the actor.
for (int i = 0; i < 3; i++) {
ray::Task(Foo, counter).Remote();
ray::Task(Foo).Remote(counter);
}

// Print the counter value.
Expand Down Expand Up @@ -572,7 +572,7 @@ exist. See :ref:`actor-lifetimes` for more details.

.. note::

Named actors are only accessible in the same namespace.
Named actors are only accessible in the same namespace.

.. code-block:: python

Expand Down
6 changes: 3 additions & 3 deletions doc/source/walkthrough.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Ray enables arbitrary functions to be executed asynchronously. These asynchronou
.. group-tab:: C++

.. code:: c++

// A regular C++ function.
int MyFunction() {
return 1;
Expand Down Expand Up @@ -239,7 +239,7 @@ Passing object refs to remote functions
assert(*obj_ref1.Get() == 1);

// You can pass an object ref as an argument to another Ray remote function.
auto obj_ref2 = ray::Task(FunctionWithAnArgument, obj_ref1).Remote();
auto obj_ref2 = ray::Task(FunctionWithAnArgument).Remote(obj_ref1);
assert(*obj_ref2.Get() == 2);

Note the following behaviors:
Expand Down Expand Up @@ -523,7 +523,7 @@ works as follows.
WaitResult<Integer> waitResult = Ray.wait(objectRefs, /*num_returns=*/0, /*timeoutMs=*/1000);
System.out.println(waitResult.getReady()); // List of ready objects.
System.out.println(waitResult.getUnready()); // list of unready objects.

.. code-tab:: c++

ray::WaitResult<int> wait_result = ray::Wait(object_refs, /*num_objects=*/0, /*timeout_ms=*/1000);
Expand Down