Beispiel #1
0
Node_ptr Array<T>::getNode() const {
    if (node->isBuffer()) {
        BufferNode<T> *bufNode = reinterpret_cast<BufferNode<T> *>(node.get());
        unsigned bytes         = this->getDataDims().elements() * sizeof(T);
        bufNode->setData(data, bytes, getOffset(), dims().get(),
                         strides().get(), isLinear());
    }
    return node;
}
Beispiel #2
0
 Node_ptr Array<T>::getNode()
 {
     if (node->isBuffer()) {
         unsigned bytes = this->getDataDims().elements() * sizeof(T);
         BufferNode<T> *bufNode = reinterpret_cast<BufferNode<T> *>(node.get());
         Param<T> param = *this;
         bufNode->setData(param, data, bytes, isLinear());
     }
     return node;
 }