Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing C++ code from the C header file kv.h #355

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
6 changes: 3 additions & 3 deletions visa/iga/IGALibrary/api/kv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class KernelViewImpl {

kv_t *kv_create(iga_gen_t gen_platf, const void *bytes, size_t bytes_len,
iga_status_t *status, char *errbuf, size_t errbuf_cap,
SWSB_ENCODE_MODE swsbMode) {
uint32_t swsbMode) {
if (errbuf && errbuf_cap > 0)
*errbuf = 0;

Expand All @@ -107,7 +107,7 @@ kv_t *kv_create(iga_gen_t gen_platf, const void *bytes, size_t bytes_len,
KernelViewImpl *kvImpl = nullptr;
try {
kvImpl =
new (std::nothrow) KernelViewImpl(*model, bytes, bytes_len, swsbMode);
new (std::nothrow) KernelViewImpl(*model, bytes, bytes_len, static_cast<iga::SWSB_ENCODE_MODE>(swsbMode));
if (!kvImpl) {
if (errbuf) {
iga::copyOutString(errbuf, errbuf_cap, nullptr, "failed to allocate");
Expand Down Expand Up @@ -1159,4 +1159,4 @@ int32_t kv_get_syncfc(const kv_t *kv, int32_t pc) {

// for send, get_message_sfid to support decoding SFID from exDesc
return static_cast<int32_t>(inst->getSyncFc());
}
}
Loading
Loading