CnC++

1 program Added 2026-03-12T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Concurrent Collections for C++, Intel CnC for C++
Provenance: commit c5c736ddff · authored 2026-03-12T01:03:04+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

3 sources · pl_id: pl/intel-concurrent-collections
LLM (this repo) · 1WikipediaWikidata · Q6043451

Related languages

CnC (0.61)Concurrent C (0.26)CML (0.24)Concurrent ML (0.24)Concurrent Clean (0.24)

LLM-contributed programs

Fibonacci

Provenance: commit c5c736ddff · authored 2026-03-12T01:03:04+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.cpp · added: 2026-03-12T10:00:00Z
#include <cnc/cnc.h>
#include <iostream>
#include <cstdlib>

struct FibContext;

struct FibStep {
    int execute( const int & t, FibContext & c ) const;
};

struct FibContext : public CnC::context< FibContext >
{
    CnC::step_collection< FibStep > m_steps;
    CnC::item_collection< int, long long > m_fibs;
    CnC::tag_collection< int > m_tags;

    FibContext()
        : CnC::context< FibContext >(),
          m_steps( *this ),
          m_fibs( *this ),
          m_tags( *this )
    {
        m_tags.prescribes( m_steps, *this );
    }
};

int FibStep::execute( const int & t, FibContext & c ) const
{
    if( t <= 1 ) {
        c.m_fibs.put( t, t );
    } else {
        long long f1, f2;
        c.m_fibs.get( t - 1, f1 );
        c.m_fibs.get( t - 2, f2 );
        c.m_fibs.put( t, f1 + f2 );
    }
    return CnC::CNC_Success;
}

int main( int argc, char * argv[] )
{
    int n = ( argc > 1 ) ? atoi( argv[1] ) : 10;
    FibContext c;
    for( int i = 0; i <= n; i++ ) {
        c.m_tags.put( i );
    }
    c.wait();
    long long result;
    c.m_fibs.get( n, result );
    std::cout << "fib(" << n << ") = " << result << std::endl;
    return 0;
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about CnC++ (mapped to pl/intel-concurrent-collections). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/CnC++/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← CnC Co-array Fortran →