Skip to content

Commit

Permalink
add C API
Browse files Browse the repository at this point in the history
  • Loading branch information
deukhyun-cha committed Apr 3, 2024
1 parent 0a11fe2 commit 9a1114c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/occa/c/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ occaStreamTag occaTagStream();

void occaWaitForTag(occaStreamTag tag);

void occaStreamWaitForTag(occaStream stream, occaStreamTag tag);

double occaTimeBetweenTags(occaStreamTag startTag,
occaStreamTag endTag);

Expand Down
4 changes: 4 additions & 0 deletions src/c/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ void occaWaitForTag(occaStreamTag tag) {
occa::waitFor(occa::c::streamTag(tag));
}

void occaStreamWaitForTag(occaStream stream, occaStreamTag tag) {
occa::streamWait(occa::c::stream(stream), occa::c::streamTag(tag));

Check warning on line 79 in src/c/base.cpp

View check run for this annotation

Codecov / codecov/patch

src/c/base.cpp#L78-L79

Added lines #L78 - L79 were not covered by tests
}

double occaTimeBetweenTags(occaStreamTag startTag,
occaStreamTag endTag) {
return occa::timeBetween(occa::c::streamTag(startTag),
Expand Down

0 comments on commit 9a1114c

Please sign in to comment.