Plus.ai42 open jobs

Software Engineer, Runtime & C++ Middleware

Systems, C++ and performancePosted over 2 months agofrom Plus.ai's own hiring page

Work type
HybridSan Francisco Bay Area
Experience
Not stated
Pay
$120k–200k a year
Posted
Over 2 months agoOpen over a year
Before you apply: make your resume fit this job

Skills it mentions

Add your skills to see which ones you have.

Interview questions for this job6 with answers below, on C++ and Linux

About the job

You will develop and optimize the core infrastructure that facilitates reliable, low-latency execution of on-vehicle robotics software. Your mission extends beyond building a rock-solid foundation for autonomous driving — you will also equip engineers with the tools needed to analyze system behavior, identify performance bottlenecks, and enhance robustness.   In this role, you will contribute to existing frameworks, libraries, and tools while also designing and implementing new components across various mission-critical domains.

Responsibilities:

  • Design and optimize low-latency interprocess communication and data flow monitoring.
  • Develop high-performance event logging and structured telemetry.
  • Implement safety-enhanced memory allocators and efficient memory provisioning policies.
  • Build lock-free data structures and algorithms to support real-time system requirements.
  • Work on network communication and coherency protocols.
  • Develop on-the-fly component health monitoring and rapid response mechanisms for critical events.
  • Manage on-vehicle configurations and system state validation.
  • Optimize low-level OS interactions and fine-tune system performance.
  • Ensure that your work is performed in accordance with the company’s Quality Management System (QMS) requirements and contribute to continuous improvement efforts.
  • Ensure team compliance with QMS, monitor quality, and drive process improvements.

Required Skills:

  • BS in Computer Science, Electrical Engineering, or related field.
  • Solid hands-on coding experience using C++14(or later)
  • Strong understanding of Linux development tools, including build systems, compilers, debuggers, and performance analyzers.
  • Excellent written and verbal communication skills.
  • Proactive problem-solving mindset: ability to identify, propose, and implement solutions.

Preferred Skills:

  • Experience in writing, debugging, and profiling multithreaded C++ applications.
  • Familiarity with robotics-related libraries such as ROS.
  • Knowledge of real-time OS, database internals, network programming, GPGPU, or robotics.

Salary Range:

  • $120,000 - $200,000 a year
Our compensations (cash and equity) are determined based on the position, your location, qualifications, and experience.

Interested?Software Engineer, Runtime & C++ Middleware at Plus.ai

Apply on company site (opens in a new tab)

The job ad ends here

Interview questions for this job6 with answers, on C++ and Linux

Interview questions for this job

For the skills the ad mentions: C++ and Linux.

370 questions
  • What is The Rule of Three?C++

    Introduction

    C++ treats variables of user-defined types with value semantics. This means that objects are implicitly copied in various contexts, and we should understand what "copying an object" actually means.

    Let us consider a simple example:

    class person
    {
        std::string name;
        int age;
    public:
        person(const std::string& name, int age) : name(name), age(age)
        {
        }
    };
    int main()
    {
        person a("Bjarne Stroustrup", 60);
        person b(a);   // What happens here?
        b = a;         // And here?
    }
    

    (If you are puzzled by the name(name), age(age) part, this is called a member initializer list.)

    Special member functions

    What does it mean to copy a person object? The main function shows two distinct copying scenarios. The initialization person b(a); is performed by the copy constructor. Its job is to construct a fresh object based on the state of an existing object. The assignment b = a is performed by the copy assignment operator. Its job is generally a little more complicated because the target object is already in some valid state that needs to be dealt with.

    Since we declared neither the copy constructor nor the assignment operator (nor the destructor) ourselves, these are implicitly defined for us. Quote from the standard:

    The [...] copy constructor and copy assignment operator, [...] and destructor are special member functions. [ Note: The implementation will implicitly declare these member functions for some class types when the program does not explicitly declare them. The implementation will implicitly define them if they are used. [...] end note ] [n3126.pdf section 12 §1]

    By default, copying an object means copying its members:

    The implicitly-defined copy constructor for a non-union class X performs a memberwise copy of its subobjects. [n3126.pdf section 12.8 §16]

    The implicitly-defined copy assignment operator for a non-union class X performs memberwise copy assignment of its subobjects. [n3126.pdf section 12.8 §30]

    Implicit definitions

    The implicitly-defined special member functions for person look like this:

    // 1. copy constructor
    person(const person& that) : name(that.name), age(that.age)
    {
    }
    // 2. copy assignment operator
    person& operator=(const person& that)
    {
        name = that.name;
        age = that.age;
        return *this;
    }
    // 3. destructor
    ~person()
    {
    }
    

    Memberwise copying is exactly what we want in this case: name and age are copied, so we get a self-contained, independent person object. The implicitly-defined destructor is always empty. This is also fine in this case since we did not acquire any resources in the constructor. The members' destructors are implicitly called after the person destructor is finished:

    After executing the body of the destructor and destroying any automatic objects allocated within the body, a destructor for class X calls the destructors for X's direct [...] members [n3126.pdf 12.4 §6]

    Managing resources

    So when should we declare those special member functions explicitly? When our class manages a resource, that is, when an object of the class is responsible for that resource. That usually means the resource is acquired in the constructor (or passed into the constructor) and released in the destructor.

    Let us go back in time to pre-standard C++. There was no such thing as std::string, and programmers were in love with pointers. The person class might have looked like this:

    Read the rest at the sourceFrom Stack Overflow: asked by fredoverflow, answered by fredoverflow (CC BY-SA 4.0)

  • What is grep command? How to match multiple strings in the same line?LinuxBasic

    The grep utilities are a family of Unix tools, including egrep and fgrep.

    grep searches file patterns. If you are looking for a specific pattern in the output of another command, grep highlights the relevant lines. Use this grep command for searching log files, specific processes, and more.

    For match multiple strings:

    grep -E "string1|string2" filename
    

    or

    grep -e "string1" -e "string2" filename
    

    Useful resources:

    From Test your Sysadmin Skills (MIT)

  • When should static_cast, dynamic_cast, const_cast, and reinterpret_cast be used?C++

    static_cast

    static_cast is the first cast you should attempt to use. It does things like implicit conversions between types (such as int to float, or pointer to void*), and it can also call explicit conversion functions (or implicit ones). In many cases, explicitly stating static_cast isn't necessary, but it's important to note that the T(something) syntax is equivalent to (T)something and should be avoided (more on that later). A T(something, something_else) is safe, however, and guaranteed to call the constructor.

    static_cast can also cast through inheritance hierarchies. It is unnecessary when casting upwards (towards a base class), but when casting downwards it can be used as long as it doesn't cast through virtual inheritance. It does not do checking, however, and it is undefined behavior to static_cast down a hierarchy to a type that isn't actually the type of the object.

    const_cast

    const_cast can be used to remove or add const to a variable; no other C++ cast is capable of removing it (not even reinterpret_cast). It is important to note that modifying a formerly const value is only undefined if the original variable is const; if you use it to take the const off a reference to something that wasn't declared with const, it is safe. This can be useful when overloading member functions based on const, for instance. It can also be used to add const to an object, such as to call a member function overload.

    const_cast also works similarly on volatile, though that's less common.

    dynamic_cast

    dynamic_cast is exclusively used for handling polymorphism. You can cast a pointer or reference to any polymorphic type to any other class type (a polymorphic type has at least one virtual function, declared or inherited). You can use it for more than just casting downwards – you can cast sideways or even up another chain. The dynamic_cast will seek out the desired object and return it if possible. If it can't, it will return nullptr in the case of a pointer, or throw std::bad_cast in the case of a reference.

    dynamic_cast has some limitations, though. It doesn't work if there are multiple objects of the same type in the inheritance hierarchy (the so-called 'dreaded diamond') and you aren't using virtual inheritance. It also can only go through public inheritance - it will always fail to travel through protected or private inheritance. This is rarely an issue, however, as such forms of inheritance are rare.

    reinterpret_cast

    reinterpret_cast is the most dangerous cast, and should be used very sparingly. It turns one type directly into another — such as casting the value from one pointer to another, or storing a pointer in an int, or all sorts of other nasty things. Largely, the only guarantee you get with reinterpret_cast is that normally if you cast the result back to the original type, you will get the exact same value (but not if the intermediate type is smaller than the original type). There are a number of conversions that reinterpret_cast cannot do, too. It's often abused for particularly weird conversions and bit manipulations, like turning a raw data stream into actual data, or storing data in the low bits of a pointer to aligned data. For those cases, see std::bit_cast.

    C-Style Cast and Function-Style Cast

    C-style cast and function-style cast are casts using (type)object or type(object), respectively, and are functionally equivalent. They are defined as the first of the following which succeeds:

    • const_cast
    • static_cast (though ignoring access restrictions)
    • static_cast (see above), then const_cast
    • reinterpret_cast
    • reinterpret_cast, then const_cast

    Read the rest at the sourceFrom Stack Overflow: asked by James Eichele, answered by coppro (CC BY-SA 4.0)

  • Every command fails with command not found. How to trace the source of the error and resolve it?LinuxBasic

    It looks that at one point or another are overwriting the default PATH environment variable. The type of errors you have, indicates that PATH does not contain e.g. /bin, where the commands (including bash) reside.

    One way to begin debugging your bash script or command would be to start a subshell with the -x option:

    bash --login -x
    

    This will show you every command, and its arguments, which is executed when starting that shell.

    Also very helpful is show PATH variable values:

    echo $PATH
    

    If you run this:

    PATH=/bin:/sbin:/usr/bin:/usr/sbin
    

    most commands should start working - and then you can edit ~/.bash_profile instead of ~/.bashrc and fix whatever is resetting PATH there. Default PATH variable values for root and other users is in /etc/profile file.

    Useful resource:

    From Test your Sysadmin Skills (MIT)

  • Why are elementwise additions much faster in separate loops than in a combined loop?C++

    Upon further analysis of this, I believe this is (at least partially) caused by the data alignment of the four-pointers. This will cause some level of cache bank/way conflicts.

    If I've guessed correctly on how you are allocating your arrays, they are likely to be aligned to the page line.

    This means that all your accesses in each loop will fall on the same cache way. However, Intel processors have had 8-way L1 cache associativity for a while. But in reality, the performance isn't completely uniform. Accessing 4-ways is still slower than say 2-ways.

    EDIT: It does in fact look like you are allocating all the arrays separately. Usually when such large allocations are requested, the allocator will request fresh pages from the OS. Therefore, there is a high chance that large allocations will appear at the same offset from a page-boundary.

    Here's the test code:

    int main(){
        const int n = 100000;
    #ifdef ALLOCATE_SEPERATE
        double *a1 = (double*)malloc(n * sizeof(double));
        double *b1 = (double*)malloc(n * sizeof(double));
        double *c1 = (double*)malloc(n * sizeof(double));
        double *d1 = (double*)malloc(n * sizeof(double));
    #else
        double *a1 = (double*)malloc(n * sizeof(double) * 4);
        double *b1 = a1 + n;
        double *c1 = b1 + n;
        double *d1 = c1 + n;
    #endif
        //  Zero the data to prevent any chance of denormals.
        memset(a1,0,n * sizeof(double));
        memset(b1,0,n * sizeof(double));
        memset(c1,0,n * sizeof(double));
        memset(d1,0,n * sizeof(double));
        //  Print the addresses
        cout << a1 << endl;
        cout << b1 << endl;
        cout << c1 << endl;
        cout << d1 << endl;
        clock_t start = clock();
        int c = 0;
        while (c++ < 10000){
    #if ONE_LOOP
            for(int j=0;j<n;j++){
                a1[j] += b1[j];
                c1[j] += d1[j];
            }
    #else
            for(int j=0;j<n;j++){
                a1[j] += b1[j];
            }
            for(int j=0;j<n;j++){
                c1[j] += d1[j];
            }
    #endif
        }
        clock_t end = clock();
        cout << "seconds = " << (double)(end - start) / CLOCKS_PER_SEC << endl;
        system("pause");
        return 0;
    }
    

    Benchmark Results:

    EDIT: Results on an actual Core 2 architecture machine:

    2 x Intel Xeon X5482 Harpertown @ 3.2 GHz:

    #define ALLOCATE_SEPERATE
    #define ONE_LOOP
    00600020
    006D0020
    007A0020
    00870020
    seconds = 6.206
    #define ALLOCATE_SEPERATE
    //#define ONE_LOOP
    005E0020
    006B0020
    00780020
    00850020
    seconds = 2.116
    //#define ALLOCATE_SEPERATE
    #define ONE_LOOP
    00570020
    00633520
    006F6A20
    007B9F20
    seconds = 1.894
    //#define ALLOCATE_SEPERATE
    //#define ONE_LOOP
    008C0020
    00983520
    00A46A20
    00B09F20
    seconds = 1.993
    

    Observations:

    • 6.206 seconds with one loop and 2.116 seconds with two loops. This reproduces the OP's results exactly.

    • In the first two tests, the arrays are allocated separately. You'll notice that they all have the same alignment relative to the page.

    • In the second two tests, the arrays are packed together to break that alignment. Here you'll notice both loops are faster. Furthermore, the second (double) loop is now the slower one as you would normally expect.

    As @Stephen Cannon points out in the comments, there is a very likely possibility that this alignment causes false aliasing in the load/store units or the cache. I Googled around for this and found that Intel actually has a hardware counter for partial address aliasing stalls:

    http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/~amplifierxe/pmw_dp/events/partial_address_alias.html

    5 Regions - Explanations

    Region 1:

    This one is easy. The dataset is so small that the performance is dominated by overhead like looping and branching.

    Region 2:

    Read the rest at the sourceFrom Stack Overflow: asked by Johannes Gerer, answered by Mysticial (CC BY-SA 4.0)

  • Why do you want to work for us?Behavioural

    Employers want to see that you have a genuine interest in working for them by asking questions like:

    • what do you know about our company?
    • why do you think you're a good fit for our company?
    • why do you want to work for us?

    To prepare for questions about the employer, you need to research the company. You should look at their website and 'about us' pages to find out more about their products, services and values.

    Show what you've learned about the company throughout the interview.

    From National Careers Service: interview advice (Open Government Licence v3.0)

Similar jobs

More like this: C++ and systems jobs in San Francisco Bay Area (50), Jobs in San Francisco Bay Area (9,193) and C++ and systems jobs in the USA (107)