summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ba9c41)
raw | patch | inline | side by side (parent: 9ba9c41)
author | Yuan Zhao <yuanzhao@ti.com> | |
Mon, 6 May 2019 18:55:31 +0000 (13:55 -0500) | ||
committer | Yuan Zhao <yuanzhao@ti.com> | |
Mon, 10 Jun 2019 19:56:13 +0000 (14:56 -0500) |
- Search whole array instead of first k entries, where k is
the number of available compute units, because array is
now indexed by physical core id (used to be logical core id).
- MCT-1195
the number of available compute units, because array is
now indexed by physical core id (used to be logical core id).
- MCT-1195
host/src/core/dsp/tal/mbox_impl_msgq.cpp | patch | blob | history |
index 92c207db93e80c9f3730c71aa75dd2071ac962df..278d1b76d0ac9c97993d56ffd59d92d9efecaa7c 100644 (file)
/* Open the DSP message queues (outbound messages to DSPs) */
assert(p_device->dspCores() <= Ocl_MaxNumDspMsgQueues);
+ for (int i = 0; i < Ocl_MaxNumDspMsgQueues; i++)
+ dspQue[i] = (MessageQ_QueueId) MessageQ_INVALIDMESSAGEQ;
int n_opened_dspQues = 0;
for(int i : compute_units)
if (p_device && id != nullptr)
{
MessageQ_QueueId dspQueId = MessageQ_getReplyQueue(msg);
- auto it = std::find(dspQue, dspQue + p_device->dspCores(), dspQueId);
- uint32_t core = std::distance(dspQue, it);
- *id = core;
+ for (int i = 0; i < Ocl_MaxNumDspMsgQueues; i++)
+ {
+ if (dspQue[i] != dspQueId) continue;
+ *id = i;
+ break;
+ }
}
if (status == MessageQ_E_UNBLOCKED)