Introduction
In this chapter we will explain how to create engine, define and allocate memory. What is and how to use: tensor, layout, input_layout and data.
#include <../api/CPP/cldnn_defs.h>
#include <../api/CPP/engine.hpp>
#include <../api/CPP/memory.hpp>
#include <../api/CPP/tensor.hpp>
#include <../api/CPP/input_layout.hpp>
#include <../api/CPP/data.hpp>
#include <iostream>
{
std::cout << std::endl << "-- Chapter 1 --" << std::endl;
const bool profiling = true;
4,
1,
32,
32);
tensor tensor2(spatial(32, 32), batch(4), feature(1));
tensor tensor3(spatial(32, 32), batch(4));
std::cout << "Is tensor1 == tensor2 == tensor3?:" <<
(((tensor1 == tensor2) && (tensor2 == tensor3)) ? "yes" : "no") << std::endl;
std::cout << "print tensor:" << tensor1 << std::endl;
}