Skip to content

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
Signed-off-by: szc321 <[email protected]>
  • Loading branch information
szc321 committed Jun 1, 2023
1 parent 7800618 commit c20ff12
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ void ShmemRecvPort::QueueRecv() {
while (!done_.load()) {
bool ret = false;
if (this->recv_queue_->AvailableCount() > 0) {
bool not_empty = recv_queue_->Probe();
ret = shm_->Load([this, &not_empty](void* data){
ret = shm_->Load([this](void* data){
MetaDataPtr metadata_res = std::make_shared<MetaData>();
MetaDataPtrFromPointer(metadata_res, data,
nbytes_ - sizeof(MetaData));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <string>
#include <list>
#include <memory>
#include <functional>

namespace message_infrastructure {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#include <vector>
#include <tuple>
#include <utility>
#include <mutex> // NOLINT
#include <condition_variable> // NOLINT

namespace message_infrastructure {

Expand Down Expand Up @@ -77,7 +75,6 @@ class RecvPortProxy : public PortProxy {
py::object Peek();
std::string Name();
size_t Size();
void SetObserver(std::function<void()> obs);

private:
py::object MDataToObject_(MetaDataPtr metadata);
Expand Down
3 changes: 2 additions & 1 deletion src/lava/magma/runtime/message_infrastructure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def load_library():
AbstractTransferPort, # noqa # nosec
support_grpc_channel,
support_fastdds_channel,
support_cyclonedds_channel)
support_cyclonedds_channel,
CPPSelector)

ChannelQueueSize = 1
SyncChannelBytes = 128
Expand Down
5 changes: 1 addition & 4 deletions src/lava/magma/runtime/message_infrastructure/ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# See: https://spdx.org/licenses/

from lava.magma.runtime.message_infrastructure import ChannelQueueSize
from lava.magma.runtime.message_infrastructure import ChannelQueueSize, CPPSelector
from lava.magma.runtime.message_infrastructure.MessageInfrastructurePywrapper \
import Channel as CppChannel
from lava.magma.runtime.message_infrastructure.MessageInfrastructurePywrapper \
Expand All @@ -18,9 +18,6 @@
import numpy as np
import typing as ty
import warnings
from lava.magma.runtime.message_infrastructure.MessageInfrastructurePywrapper \
import CPPSelector


class Selector(CPPSelector):
def __init__(self):
Expand Down

0 comments on commit c20ff12

Please sign in to comment.