-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add templates, numba uncache * make it non craching * fix unreported comment-bug in required socket mode * correct comment * parse only if socketline is correct
- Loading branch information
Showing
5 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
>in verts v # | ||
>in faces s # no computation until both input sockets are connected | ||
out _verts v | ||
out _faces s | ||
""" | ||
|
||
from sverchok.utils.decorators_compilation import njit, numba_uncache | ||
|
||
# if other numba features are needed | ||
# from sverchok.dependencies import numba | ||
|
||
# there are two ways to clear sverchok's njit cache | ||
# 1. numba_uncache(your_function_name) | ||
# 2. rename the function, into something that does not yet exist in the cache | ||
|
||
# this will compile, the first time it's run, then subsequent | ||
# calls to your_function are from the cached compilation. | ||
|
||
#@njit(cache=True) | ||
def your_function(vlist, flist): | ||
return nvlist, nflist | ||
|
||
|
||
for vlist, flist in zip(verts, faces): | ||
v, f = your_function(vlist, flist) | ||
_verts.append(v) | ||
_faces.append(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters