Skip to content
Open
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
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
EXTRA_ARGS :=
EXTRA_ARGS :=

#########
# BUILD #
#########
.PHONY: requirements develop build build-debug build-conda install
.PHONY: requirements develop build build-debug build-conda build-conda-debug install

ASAN :=
UBSAN :=
Expand All @@ -26,6 +26,9 @@ build-debug: ## build the library ( DEBUG ) - May need a make clean when switch
build-conda: ## build the library in Conda
CSP_ENABLE_ASAN=$(ASAN) CSP_ENABLE_UBSAN=$(UBSAN) python setup.py build build_ext --csp-no-vcpkg --inplace

build-conda-debug: ## build the library in Conda ( DEBUG )
CSP_ENABLE_ASAN=$(ASAN) CSP_ENABLE_UBSAN=$(UBSAN) DEBUG=1 python setup.py build build_ext --csp-no-vcpkg --inplace

install: ## install library
python -m pip install .

Expand Down
3 changes: 3 additions & 0 deletions ci/scripts/requirements.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/env python
import os


def deps():
import toml

c = toml.load("pyproject.toml")
requires = c["build-system"]["requires"]
develop = c["project"]["optional-dependencies"]["develop"]
return requires + develop


def main():
ret = os.system("python -m pip install --prefer-binary toml")
if ret != 0:
Expand Down
1 change: 1 addition & 0 deletions conda/dev-environment-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- cyrus-sasl
- deprecated
- docutils<0.22.1
- numba-cfunc-compiler>=0.1.3
- exprtk
- flex
- graphviz
Expand Down
1 change: 1 addition & 0 deletions conda/dev-environment-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- cyrus-sasl
- deprecated
- docutils<0.22.1
- numba-cfunc-compiler>=0.1.3
- exprtk
# - flex # not available on windows
- graphviz
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/CppNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CppNode : public csp::Node
if( nodedef.outputs.size() > OutputId::maxOutputs() )
CSP_THROW( ValueError, "number of outputs exceeds limit of " << OutputId::maxOutputs() << " on node " << name() );

return csp::NodeDef{ INOUT_ID_TYPE( nodedef.inputs.size() ), INOUT_ID_TYPE( nodedef.outputs.size() ) };
return csp::NodeDef{ nodedef.inputs.size(), nodedef.outputs.size() };
}

void validateNodeDef() const
Expand Down
12 changes: 10 additions & 2 deletions cpp/csp/engine/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ class InputAdapter;

struct NodeDef
{
NodeDef( INOUT_ID_TYPE numIn, INOUT_ID_TYPE numOut ) : numInputs( numIn ), numOutputs( numOut )
{}
NodeDef( size_t numIn, size_t numOut )
{
if( numIn > InputId::maxId() )
CSP_THROW( ValueError, "number of inputs exceeds limit of " << InputId::maxId() );
if( numOut > OutputId::maxId() )
CSP_THROW( ValueError, "number of outputs exceeds limit of " << OutputId::maxId() );

numInputs = static_cast<INOUT_ID_TYPE>( numIn );
numOutputs = static_cast<INOUT_ID_TYPE>( numOut );
}

INOUT_ID_TYPE numInputs;
INOUT_ID_TYPE numOutputs;
Expand Down
Loading
Loading