Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
excit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argo
excit
Commits
11c8aed3
Commit
11c8aed3
authored
Nov 09, 2018
by
Brice Videau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added API for user provided iterators.
parent
94c83320
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
src/excit.c
src/excit.c
+19
-1
src/excit.h
src/excit.h
+2
-0
No files found.
src/excit.c
View file @
11c8aed3
...
@@ -1538,6 +1538,21 @@ error:
...
@@ -1538,6 +1538,21 @@ error:
return
NULL
;
return
NULL
;
}
}
excit_t
excit_alloc_user
(
const
struct
excit_func_table_s
*
functions
)
{
excit_t
it
;
it
=
malloc
(
sizeof
(
const
struct
excit_s
));
if
(
!
it
)
return
NULL
;
ALLOC_EXCIT
(
it
,
(
*
functions
));
it
->
type
=
EXCIT_USER
;
return
it
;
error:
free
(
it
);
return
NULL
;
}
excit_t
excit_dup
(
excit_t
it
)
excit_t
excit_dup
(
excit_t
it
)
{
{
excit_t
result
=
NULL
;
excit_t
result
=
NULL
;
...
@@ -1559,10 +1574,13 @@ error:
...
@@ -1559,10 +1574,13 @@ error:
void
excit_free
(
excit_t
it
)
void
excit_free
(
excit_t
it
)
{
{
if
(
!
it
||
!
it
->
functions
)
if
(
!
it
)
return
;
return
;
if
(
!
it
->
functions
)
goto
error
;
if
(
it
->
functions
->
free
)
if
(
it
->
functions
->
free
)
it
->
functions
->
free
(
it
);
it
->
functions
->
free
(
it
);
error:
free
(
it
);
free
(
it
);
}
}
...
...
src/excit.h
View file @
11c8aed3
...
@@ -8,6 +8,7 @@ enum excit_type_e {
...
@@ -8,6 +8,7 @@ enum excit_type_e {
EXCIT_HILBERT2D
,
EXCIT_HILBERT2D
,
EXCIT_PRODUCT
,
EXCIT_PRODUCT
,
EXCIT_SLICE
,
EXCIT_SLICE
,
EXCIT_USER
,
EXCIT_TYPE_MAX
EXCIT_TYPE_MAX
};
};
...
@@ -45,6 +46,7 @@ struct excit_func_table_s {
...
@@ -45,6 +46,7 @@ struct excit_func_table_s {
};
};
excit_t
excit_alloc
(
enum
excit_type_e
type
);
excit_t
excit_alloc
(
enum
excit_type_e
type
);
excit_t
excit_alloc_user
(
const
struct
excit_func_table_s
*
functions
);
excit_t
excit_dup
(
const
excit_t
it
);
excit_t
excit_dup
(
const
excit_t
it
);
void
excit_free
(
excit_t
it
);
void
excit_free
(
excit_t
it
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment