Skip to content

Commit

Permalink
Compilation is now deterministic.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Dec 19, 2024
1 parent 87c523c commit 5ad5720
Show file tree
Hide file tree
Showing 236 changed files with 48,522 additions and 41,301 deletions.
8 changes: 4 additions & 4 deletions architecture/faust/dsp/faust-dynamic-engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ extern "C" {

#ifndef CTree_DEFINED
#ifdef _MSC_VER
typedef void CTreeBase;
typedef void CTree;
#else
typedef struct {} CTreeBase;
typedef struct {} CTree;
#endif
#endif

typedef CTreeBase* Box;
typedef CTreeBase* Signal;
typedef CTree* Box;
typedef CTree* Signal;

/**
* @brief Opaque structure representing a DSP object.
Expand Down
8 changes: 4 additions & 4 deletions architecture/faust/dsp/libfaust-box-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@

#ifdef _MSC_VER
#define CTree_DEFINED
typedef void CTreeBase;
typedef void CTree;
#else
#define CTree_DEFINED
typedef struct {} CTreeBase;
typedef struct {} CTree;
#endif

typedef CTreeBase* Signal;
typedef CTreeBase* Box;
typedef CTree* Signal;
typedef CTree* Box;

enum SType { kSInt, kSReal };

Expand Down
10 changes: 5 additions & 5 deletions architecture/faust/dsp/libfaust-box.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
/**
* Opaque types.
*/
class LIBFAUST_API CTreeBase;
typedef std::vector<CTreeBase*> tvec;
class LIBFAUST_API CTree;
typedef std::vector<CTree*> tvec;

typedef CTreeBase* Signal;
typedef CTreeBase* Box;
typedef CTreeBase* Tree;
typedef CTree* Signal;
typedef CTree* Box;
typedef CTree* Tree;

typedef Tree (*prim0)();
typedef Tree (*prim1)(Tree x);
Expand Down
8 changes: 4 additions & 4 deletions architecture/faust/dsp/libfaust-signal-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
*/

#ifdef _MSC_VER
typedef void CTreeBase;
typedef void CTree;
#else
typedef struct {} CTreeBase;
typedef struct {} CTree;
#endif

typedef CTreeBase* Signal;
typedef CTreeBase* Box;
typedef CTree* Signal;
typedef CTree* Box;

enum SType { kSInt, kSReal };

Expand Down
10 changes: 5 additions & 5 deletions architecture/faust/dsp/libfaust-signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
/**
* Opaque types.
*/
class LIBFAUST_API CTreeBase;
typedef std::vector<CTreeBase*> tvec;
class LIBFAUST_API CTree;
typedef std::vector<CTree*> tvec;

typedef CTreeBase* Signal;
typedef CTreeBase* Box;
typedef CTreeBase* Tree;
typedef CTree* Signal;
typedef CTree* Box;
typedef CTree* Tree;

typedef Tree (*prim0)();
typedef Tree (*prim1)(Tree x);
Expand Down
4 changes: 2 additions & 2 deletions build/lint.query
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Check for a pointer comparison between CTreeBase* / Symbol*
# Check for a pointer comparison between CTree* / Symbol*

let hasTargetComparisonNoBind binaryOperator(
hasAnyOperatorName("<", ">", "<=", ">="),
hasEitherOperand(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(hasDeclaration(namedDecl(hasAnyName("CTreeBase", "Symbol"))))).bind("pointer-type"))))
hasEitherOperand(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(hasDeclaration(namedDecl(hasAnyName("CTree", "Symbol"))))).bind("pointer-type"))))
)

# Or a function call to a function in the STL which has one of those pointer comparisons
Expand Down
19 changes: 11 additions & 8 deletions compiler/DirectedGraph/DirectedGraph.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
// to represent the time dependency between computations.
//===========================================================

template <typename N>
template <typename N, typename Comparator = std::less<N>>
class digraph {
using TWeights = std::set<int>;
using TDestinations = std::map<N, TWeights>;
using TDestinations = std::map<N, TWeights, Comparator>;

static inline const TWeights gEmptyWeights;

Expand All @@ -38,8 +38,8 @@ class digraph {
// have integer values attached.
class internalgraph {
private:
std::set<N> fNodes; // {n1,n2,...}
std::map<N, TDestinations> fConnections; // {(ni -{d1,d2,...}-> nj),...}
std::set<N, Comparator> fNodes; // {n1,n2,...}
std::map<N, TDestinations, Comparator> fConnections; // {(ni -{d1,d2,...}-> nj),...}

public:
#if 0
Expand Down Expand Up @@ -70,10 +70,13 @@ class digraph {
//----------------------------------------------------------------------

// returns the set of nodes of the graph
[[nodiscard]] const std::set<N>& nodes() const { return fNodes; }
[[nodiscard]] const std::set<N, Comparator>& nodes() const { return fNodes; }

// returns the set of nodes of the graph
[[nodiscard]] const std::map<N, TDestinations>& connections() const { return fConnections; }
[[nodiscard]] const std::map<N, TDestinations, Comparator>& connections() const
{
return fConnections;
}

// Returns the destinations of node n in the graph
[[nodiscard]] const TDestinations& destinations(const N& n) const
Expand Down Expand Up @@ -205,10 +208,10 @@ class digraph {
//--------------------------------------------------------------------------

// returns the set of nodes of the graph
[[nodiscard]] const std::set<N>& nodes() const { return fContent->nodes(); }
[[nodiscard]] const std::set<N, Comparator>& nodes() const { return fContent->nodes(); }

// returns the set of nodes of the graph
[[nodiscard]] const std::map<N, TDestinations>& connections() const
[[nodiscard]] const std::map<N, TDestinations, Comparator>& connections() const
{
return fContent->connections();
}
Expand Down
Loading

0 comments on commit 5ad5720

Please sign in to comment.