| 580 | } |
| 581 | |
| 582 | void |
| 583 | KTest::getBufferSizeExpr(Variable *buffer, std::string& size) |
| 584 | { |
| 585 | ArrayVariableInterface *hostPtr = (ArrayVariableInterface*)(buffer->hostPtr()); |
| 586 | if (hostPtr->isMatrix()) { |
| 587 | MatrixVariable *ptrVar = (MatrixVariable*)hostPtr; |
| 588 | if (masterStep_->matrixSize(ptrVar).empty()) { |
| 589 | size += "sizeof("; |
| 590 | size += ptrVar->type(); |
| 591 | size += ")"; |
| 592 | } |
| 593 | else { |
| 594 | size = "("; |
| 595 | size += masterStep_->matrixSize(ptrVar); |
| 596 | size += ") * sizeof(*"; |
| 597 | size += ptrVar->name(); |
| 598 | size += ")"; |
| 599 | } |
| 600 | } |
| 601 | else { |
| 602 | VectorVariable *ptrVar = (VectorVariable*)buffer->hostPtr(); |
| 603 | size = "("; |
| 604 | size += masterStep_->vectorSize(ptrVar); |
| 605 | size += ") * sizeof(*"; |
| 606 | size += ptrVar->name(); |
| 607 | size += ")"; |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | void |
| 612 | KTest::allocateWriteBuffers(std::stringstream& ss) |
nothing calls this directly
no test coverage detected