blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 3
264
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
85
| license_type
stringclasses 2
values | repo_name
stringlengths 5
140
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 905
values | visit_date
timestamp[us]date 2015-08-09 11:21:18
2023-09-06 10:45:07
| revision_date
timestamp[us]date 1997-09-14 05:04:47
2023-09-17 19:19:19
| committer_date
timestamp[us]date 1997-09-14 05:04:47
2023-09-06 06:22:19
| github_id
int64 3.89k
681M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us]date 2012-06-07 00:51:45
2023-09-14 21:58:39
⌀ | gha_created_at
timestamp[us]date 2008-03-27 23:40:48
2023-08-21 23:17:38
⌀ | gha_language
stringclasses 141
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
10.4M
| extension
stringclasses 115
values | content
stringlengths 3
10.4M
| authors
listlengths 1
1
| author_id
stringlengths 0
158
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46547f325edc21c17383cc0488af7b50d040b150
|
0fb79168b6fdb593d5f7f9219b0527697b5eb519
|
/Libary_Manager/Books_Container.h
|
022d5ed8ad5c436864941fb9462cd89147112acb
|
[] |
no_license
|
maxagi/Library_Manager
|
f3e64739300c7312116940ef1c05a24cf4cc8626
|
0574229aad0174f8d340f1424cd4f2719bf6c856
|
refs/heads/master
| 2016-09-06T16:43:24.141364
| 2014-06-30T06:53:10
| 2014-06-30T06:53:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,051
|
h
|
#ifndef BOOKS_CONTAINER_H
#define BOOKS_CONTAINER_H
#include<list>
#include<string>
#include<map>
#include"book.h"
class Books_Container{
public:
~Books_Container(){/*should be empty!!*/ }
Books_Container(){}
//return true if added , false if not (book with same isbn exists)
bool addBook(Book book);
//return true if and only if the book was erased
bool removeBook(Book book){ return books.erase(book.getISBN()) == 1; }
Book*const findByISBN(const unsigned long isbn);
const Book*const findByISBN(const unsigned long isbn)const;
std::list<Book*const > findByTitle(const std::string title);
std::list<const Book*const >findByTitle(const std::string title)const;
std::list<Book*const > findByAuthor(const std::string author);
std::list<const Book*const >findByAuthor(const std::string author)const;
std::list<const Book*const >getAllBooks()const;
private:
Books_Container(const Books_Container & other);
Books_Container & operator=(const Books_Container & other);
std::map<unsigned long, Book> books;
};
#endif
|
[
"maxagi.tau@gmail.com"
] |
maxagi.tau@gmail.com
|
a77abc183a4958cefb81b9e5a48b8c4b8f7aef27
|
03394fd8a56392653a92ae2e648a50feada90c7c
|
/src/log_switcher.hpp
|
9dced1e3e0e5369af7856360ef90d448e0e5e8c7
|
[] |
no_license
|
cpreh/sgetris
|
31f85ea5ba2ed59ef5b1ff93e5f052c5eb7e38c7
|
757b255e6853ec2bc099a28074ccb22ad69191b7
|
refs/heads/master
| 2021-05-29T05:13:12.616518
| 2011-12-11T12:42:41
| 2011-12-11T12:42:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 827
|
hpp
|
#ifndef SGETRIS_LOG_SWITCHER_HPP_HPP_INCLUDED
#define SGETRIS_LOG_SWITCHER_HPP_HPP_INCLUDED
#include <fcppt/noncopyable.hpp>
#include <fcppt/string.hpp>
#include <fcppt/function/object.hpp>
#include <fcppt/log/context_fwd.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
namespace sgetris
{
class log_switcher
{
FCPPT_NONCOPYABLE(log_switcher)
public:
typedef
boost::program_options::options_description &
options_callback_fn();
typedef
fcppt::function::object<options_callback_fn>
options_callback;
explicit
log_switcher(
options_callback const &,
fcppt::string const &prefix,
fcppt::log::context &);
void
apply(
boost::program_options::variables_map &);
private:
fcppt::string const prefix_;
fcppt::log::context &context_;
};
}
#endif
|
[
"pmidden@gmx.net"
] |
pmidden@gmx.net
|
06484dd8ed21fc87eaf2951c3bc53a4403a5dbcf
|
f8099ea4321e13161dbde47adfe8e8f205a67d51
|
/trunk/android/games/PPMM_ZhaoCha/src/jni/WiEngine/include/transitions/wyLeftPushInTransition.h
|
c786e45fb14a283c8cf1897b223ad18e873d3111
|
[] |
no_license
|
yingql/yingql
|
2a968bae8b5e697fc3dbd603f90c4a3b22d952a7
|
ce805254da659f96a3ca79541b08ad6d04378ba3
|
refs/heads/master
| 2020-04-09T08:32:36.293058
| 2011-10-22T15:14:19
| 2011-10-22T15:14:19
| 2,626,277
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,840
|
h
|
/*
* Copyright (c) 2010 WiYun Inc.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef __wyLeftPushInTransition_h__
#define __wyLeftPushInTransition_h__
#include "wyTransitionScene.h"
/**
* @class wyLeftPushInTransition
*
* 新的场景从左边进入,同时把旧场景往右推
*/
class wyLeftPushInTransition : public wyTransitionScene {
protected:
/// @see wyTransitionScene::initScenes
virtual void initScenes();
/// @see wyTransitionScene::getInAction
virtual wyIntervalAction* getInAction();
/// @see wyTransitionScene::getOutAction
virtual wyIntervalAction* getOutAction();
public:
/**
* 静态构造函数
*
* @param duration 场景切换的时间
* @param inScene 准备载入的\link wyScene wyScene对象指针\endlink. 如果不为NULL, 则
* 载出场景自动设置为当前场景. 如果为NULL, 则载入场景和载出场景都不设置. 需要在之后再
* 自行设置. 一般如果是想在popScene的时候, 需要把这个参数设置为NULL, 这样\link wyDirector wyDirector\endlink
* 会自动设置载入和载出场景.
*/
static wyLeftPushInTransition* make(float duration, wyScene* inScene);
/**
* 构造函数
*
* @param duration 场景切换的时间
* @param inScene 准备载入的\link wyScene wyScene对象指针\endlink. 如果不为NULL, 则
* 载出场景自动设置为当前场景. 如果为NULL, 则载入场景和载出场景都不设置. 需要在之后再
* 自行设置. 一般如果是想在popScene的时候, 需要把这个参数设置为NULL, 这样\link wyDirector wyDirector\endlink
* 会自动设置载入和载出场景.
*/
wyLeftPushInTransition(float duration, wyScene* inScene);
/**
* 析构函数
*/
virtual ~wyLeftPushInTransition();
};
#endif // __wyLeftPushInTransition_h__
|
[
"yingql.cn@qq.com"
] |
yingql.cn@qq.com
|
bec4a968a8eb16098124af44caa1d81e5d9ef391
|
b942ec72c63eed4450571ab6f2620cba7a15b0e9
|
/Week 2/Final Project/template.cpp
|
90acc553d8775a410db49bdac7f0b18ea9a83880
|
[
"MIT"
] |
permissive
|
klaribot/csci175r-intro-to-cpp
|
6647ed825a586a5b2df3e47746478642130bf957
|
0c86f5ce3c6437b23c4dfb9bf3f00e792a85703e
|
refs/heads/master
| 2020-12-21T21:23:01.614545
| 2020-03-09T17:01:44
| 2020-03-09T17:01:44
| 236,565,800
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 109
|
cpp
|
//Booksellers Final Project - Week 1 - Justin Reed
#include <iostream>
using namespace std;
int main()
{
}
|
[
"crystaltheandroid@gmail.com"
] |
crystaltheandroid@gmail.com
|
865010423ff6318fd81a156e58915de64bcd843a
|
48d5dbf4475448f5df6955f418d7c42468d2a165
|
/SDK/SoT_BP_LockedEquipmentChest_Desc_parameters.hpp
|
ffb203b88da018c4ae49bc30b7107557c44612cb
|
[] |
no_license
|
Outshynd/SoT-SDK-1
|
80140ba84fe9f2cdfd9a402b868099df4e8b8619
|
8c827fd86a5a51f3d4b8ee34d1608aef5ac4bcc4
|
refs/heads/master
| 2022-11-21T04:35:29.362290
| 2020-07-10T14:50:55
| 2020-07-10T14:50:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 383
|
hpp
|
#pragma once
// Sea of Thieves (1.4.16) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_LockedEquipmentChest_Desc_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
[
"53855178+Shat-sky@users.noreply.github.com"
] |
53855178+Shat-sky@users.noreply.github.com
|
e36cf4950a2aca89c9ab8646b580090e430dd05f
|
32cd4b6f985fd567d663c0d8c1fe74a1f893f69c
|
/main.cpp
|
ad73ec72f9b9eecb986aa949c23c541f14fa7a90
|
[] |
no_license
|
slouffka/sfml-simple-particles
|
887112725a705886b3cb60105811ab97c21d338f
|
5d94d5000be0e77a82a8601e9c88ef688ec9f1ac
|
refs/heads/master
| 2021-06-28T03:37:42.648693
| 2016-11-27T08:11:51
| 2016-11-27T08:11:51
| 33,951,676
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,486
|
cpp
|
#include <SFML/Graphics.hpp>
#include <random>
namespace
{
std::default_random_engine createRandomEngine()
{
auto seed = static_cast<unsigned long>(std::time(nullptr));
return std::default_random_engine(seed);
}
auto RandomEngine = createRandomEngine();
}
int randomInt(int exclusiveMax)
{
std::uniform_int_distribution<> distr(0, exclusiveMax - 1);
return distr(RandomEngine);
}
class ParticleSystem : public sf::Drawable, public sf::Transformable
{
public:
ParticleSystem(unsigned int count)
: mParticles(count)
, mVertices(sf::Points, count)
, mLifetime(sf::seconds(3))
, mPosition(0, 0)
{
}
void setPosition(sf::Vector2f position)
{
mPosition = position;
}
void update(sf::Time elapsed)
{
for (std::size_t i = 0; i < mParticles.size(); ++i)
{
Particle& p = mParticles[i];
p.lifetime -= elapsed;
if (p.lifetime <= sf::Time::Zero)
resetParticle(i);
mVertices[i].position += p.velocity * elapsed.asSeconds();
float ratio = p.lifetime.asSeconds() / mLifetime.asSeconds();
mVertices[i].color.a = static_cast<sf::Uint8>(ratio * 255);
}
}
private:
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const
{
states.transform *= getTransform();
states.texture = NULL;
target.draw(mVertices, states);
}
private:
struct Particle
{
sf::Vector2f velocity;
sf::Time lifetime;
};
void resetParticle(std::size_t index)
{
float angle = (std::rand() % 360) * 3.14f / 180.f;
float speed = (std::rand() % 50) + 50.f;
mParticles[index].velocity = sf::Vector2f(std::cos(angle) * speed, std::sin(angle) * speed);
mParticles[index].lifetime = sf::milliseconds((std::rand() % 2000) + 1000);
// color
sf::Color newColor(randomInt(255), randomInt(255), randomInt(255));
mVertices[index].color = newColor;
// position
mVertices[index].position = mPosition;
}
private:
std::vector<Particle> mParticles;
sf::VertexArray mVertices;
sf::Time mLifetime;
sf::Vector2f mPosition;
};
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "Particles", sf::Style::Close);
ParticleSystem particles(10000);
sf::Clock clock;
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
// handle window events
if (event.type == sf::Event::Closed)
{
window.close();
}
// handle keys pressed
if (event.type == sf::Event::KeyPressed)
{
if (event.key.code == sf::Keyboard::Escape) {
window.close();
}
}
}
sf::Vector2i mouse = sf::Mouse::getPosition(window);
particles.setPosition(window.mapPixelToCoords(mouse));
sf::Time elapsed = clock.restart();
particles.update(elapsed);
window.clear();
window.draw(particles);
window.display();
}
return 0;
}
|
[
"slouffka@gmail.com"
] |
slouffka@gmail.com
|
c2c9b681bae2b155882a9f790468f4df15390eb8
|
30150c1a4a99608aab496570e172bdce4c53449e
|
/059_function_overloading_examples2.cpp
|
3f78f7713a1faba072a5b040b6fcbdbcc1782e2e
|
[] |
no_license
|
gergokutu/cplusplus-tutorials
|
88334ba9b1aa8108109796d69ab5e8dd94da62c6
|
11e9c15f6c4e06b8e97ce77a732aec460d0251eb
|
refs/heads/master
| 2020-09-04T17:46:03.954635
| 2020-01-14T11:44:15
| 2020-01-14T11:44:15
| 219,837,606
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 720
|
cpp
|
#include <iostream>
// struct is a custom datatype
struct Rectangle
{
double length;
double width;
}; // do not forget the ; from here!
double area(double length, double width)
{
return length * width;
}
// 2nd overload
double area(double length)
{
return length * length;
}
// 3rd overload
// take a Rectangle which name is rectangle
double area(Rectangle rectangle)
{
return rectangle.length * rectangle.width;
}
int main()
{
// create a rectangle
Rectangle rectangle;
rectangle.length = 10;
rectangle.width = 20;
std::cout << area(rectangle.length, rectangle.width) << std::endl;
std::cout << area(rectangle.length) << std::endl;
std::cout << area(rectangle) << std::endl;
return 0;
}
|
[
"gergo.kutu@gmail.com"
] |
gergo.kutu@gmail.com
|
9c0e661f8ec11c032bdaf2f4dc74aef4b3fd0a2c
|
007a38491cfa1e43ea49879db3677929e58ed5c0
|
/src/depthTest.cpp
|
7bdf8034dab64bd256aa75611d8119f3be41b54c
|
[] |
no_license
|
H2O-2/learnopengl
|
76f3461307a616b9da66970c0e65fb19c76ed2b7
|
447c438aa4684f022ec532f7fbbebf0aef665a30
|
refs/heads/master
| 2020-03-31T11:27:24.325937
| 2019-03-25T01:04:59
| 2019-03-26T01:04:59
| 152,177,374
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 11,507
|
cpp
|
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "model.h"
#include "shader_s.h"
#include "camera.h"
#include "fileSystem.h"
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void mouse_callback(GLFWwindow* window, double xpos, double ypos);
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
void processInput(GLFWwindow *window);
unsigned int loadTexture(const char *path);
// settings
const unsigned int SCR_WIDTH = 1280;
const unsigned int SCR_HEIGHT = 720;
// camera
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
float lastX = (float)SCR_WIDTH / 2.0;
float lastY = (float)SCR_HEIGHT / 2.0;
bool firstMouse = true;
// timing
float deltaTime = 0.0f;
float lastFrame = 0.0f;
int main()
{
// glfw: initialize and configure
// ------------------------------
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // uncomment this statement to fix compilation on OS X
// glfw window creation
// --------------------
GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwSetCursorPosCallback(window, mouse_callback);
glfwSetScrollCallback(window, scroll_callback);
// tell GLFW to capture our mouse
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
// glad: load all OpenGL function pointers
// ---------------------------------------
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
std::cout << "Failed to initialize GLAD" << std::endl;
return -1;
}
// configure global opengl state
// -----------------------------
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS); // always pass the depth test (same effect as glDisable(GL_DEPTH_TEST))
// build and compile shaders
// -------------------------
Shader shader("../src/depthTest.vs", "../src/depthTest.fs");
// set up vertex data (and buffer(s)) and configure vertex attributes
// ------------------------------------------------------------------
float cubeVertices[] = {
// positions // texture Coords
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f, -0.5f, -0.5f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
0.5f, -0.5f, 0.5f, 1.0f, 0.0f,
0.5f, 0.5f, 0.5f, 1.0f, 1.0f,
0.5f, 0.5f, 0.5f, 1.0f, 1.0f,
-0.5f, 0.5f, 0.5f, 0.0f, 1.0f,
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
-0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
-0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 1.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 1.0f,
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
-0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
0.5f, -0.5f, -0.5f, 0.0f, 1.0f,
0.5f, -0.5f, -0.5f, 0.0f, 1.0f,
0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 1.0f,
0.5f, -0.5f, -0.5f, 1.0f, 1.0f,
0.5f, -0.5f, 0.5f, 1.0f, 0.0f,
0.5f, -0.5f, 0.5f, 1.0f, 0.0f,
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 1.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f,
0.5f, 0.5f, -0.5f, 1.0f, 1.0f,
0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
0.5f, 0.5f, 0.5f, 1.0f, 0.0f,
-0.5f, 0.5f, 0.5f, 0.0f, 0.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f
};
float planeVertices[] = {
// positions // texture Coords (note we set these higher than 1 (together with GL_REPEAT as texture wrapping mode). this will cause the floor texture to repeat)
5.0f, -0.5f, 5.0f, 2.0f, 0.0f,
-5.0f, -0.5f, 5.0f, 0.0f, 0.0f,
-5.0f, -0.5f, -5.0f, 0.0f, 2.0f,
5.0f, -0.5f, 5.0f, 2.0f, 0.0f,
-5.0f, -0.5f, -5.0f, 0.0f, 2.0f,
5.0f, -0.5f, -5.0f, 2.0f, 2.0f
};
// cube VAO
unsigned int cubeVAO, cubeVBO;
glGenVertexArrays(1, &cubeVAO);
glGenBuffers(1, &cubeVBO);
glBindVertexArray(cubeVAO);
glBindBuffer(GL_ARRAY_BUFFER, cubeVBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(cubeVertices), &cubeVertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3 * sizeof(float)));
glBindVertexArray(0);
// plane VAO
unsigned int planeVAO, planeVBO;
glGenVertexArrays(1, &planeVAO);
glGenBuffers(1, &planeVBO);
glBindVertexArray(planeVAO);
glBindBuffer(GL_ARRAY_BUFFER, planeVBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(planeVertices), &planeVertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3 * sizeof(float)));
glBindVertexArray(0);
// load textures
// -------------
unsigned int cubeTexture = loadTexture(FileSystem::getPath("src/marble.jpg").c_str());
unsigned int floorTexture = loadTexture(FileSystem::getPath("src/metal.png").c_str());
// shader configuration
// --------------------
shader.use();
shader.setInt("texture1", 0);
// render loop
// -----------
while(!glfwWindowShouldClose(window))
{
// per-frame time logic
// --------------------
float currentFrame = glfwGetTime();
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
// input
// -----
processInput(window);
// render
// ------
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
shader.use();
glm::mat4 model;
glm::mat4 view = camera.GetViewMatrix();
glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
shader.setMat4("view", view);
shader.setMat4("projection", projection);
// cubes
glBindVertexArray(cubeVAO);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, cubeTexture);
model = glm::translate(model, glm::vec3(-1.0f, 0.0f, -1.0f));
shader.setMat4("model", model);
glDrawArrays(GL_TRIANGLES, 0, 36);
model = glm::mat4();
model = glm::translate(model, glm::vec3(2.0f, 0.0f, 0.0f));
shader.setMat4("model", model);
glDrawArrays(GL_TRIANGLES, 0, 36);
// floor
glBindVertexArray(planeVAO);
glBindTexture(GL_TEXTURE_2D, floorTexture);
shader.setMat4("model", glm::mat4());
glDrawArrays(GL_TRIANGLES, 0, 6);
glBindVertexArray(0);
// glfw: swap buffers and poll IO events (keys pressed/released, mouse moved etc.)
// -------------------------------------------------------------------------------
glfwSwapBuffers(window);
glfwPollEvents();
}
// optional: de-allocate all resources once they've outlived their purpose:
// ------------------------------------------------------------------------
glDeleteVertexArrays(1, &cubeVAO);
glDeleteVertexArrays(1, &planeVAO);
glDeleteBuffers(1, &cubeVBO);
glDeleteBuffers(1, &planeVBO);
glfwTerminate();
return 0;
}
// process all input: query GLFW whether relevant keys are pressed/released this frame and react accordingly
// ---------------------------------------------------------------------------------------------------------
void processInput(GLFWwindow *window)
{
if (glfwGetKey(window, GLFW_KEY_Q) == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS)
camera.ProcessKeyboard(FORWARD, deltaTime);
if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS)
camera.ProcessKeyboard(BACKWARD, deltaTime);
if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS)
camera.ProcessKeyboard(LEFT, deltaTime);
if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS)
camera.ProcessKeyboard(RIGHT, deltaTime);
}
// glfw: whenever the window size changed (by OS or user resize) this callback function executes
// ---------------------------------------------------------------------------------------------
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
// make sure the viewport matches the new window dimensions; note that width and
// height will be significantly larger than specified on retina displays.
glViewport(0, 0, width, height);
}
// glfw: whenever the mouse moves, this callback is called
// -------------------------------------------------------
void mouse_callback(GLFWwindow* window, double xpos, double ypos)
{
if (firstMouse)
{
lastX = xpos;
lastY = ypos;
firstMouse = false;
}
float xoffset = xpos - lastX;
float yoffset = lastY - ypos; // reversed since y-coordinates go from bottom to top
lastX = xpos;
lastY = ypos;
camera.ProcessMouseMovement(xoffset, yoffset);
}
// glfw: whenever the mouse scroll wheel scrolls, this callback is called
// ----------------------------------------------------------------------
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(yoffset);
}
// utility function for loading a 2D texture from file
// ---------------------------------------------------
unsigned int loadTexture(char const *path)
{
unsigned int textureID;
glGenTextures(1, &textureID);
int width, height, nrComponents;
unsigned char *data = stbi_load(path, &width, &height, &nrComponents, 0);
if (data)
{
GLenum format;
if (nrComponents == 1)
format = GL_RED;
else if (nrComponents == 3)
format = GL_RGB;
else if (nrComponents == 4)
format = GL_RGBA;
glBindTexture(GL_TEXTURE_2D, textureID);
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
stbi_image_free(data);
}
else
{
std::cout << "Texture failed to load at path: " << path << std::endl;
stbi_image_free(data);
}
return textureID;
}
|
[
"h2o-2@qq.com"
] |
h2o-2@qq.com
|
20f3bd32690f8e80994161ea3bb8f361ce4642dc
|
505185125fdf54088ca33d05f7e0880b6d0dcace
|
/extern/Halide/osx/share/Halide/tutorial/lesson_12_using_the_gpu.cpp
|
c4574a34bbfeb6573b24fa3f1784c0d619a8290f
|
[
"MIT"
] |
permissive
|
HiDoYa/webassembly-video-filters
|
6e1450249ac7c6212cb8402e094510192b1b81fa
|
70bcaaaeb94a763988975aa8e1582ed10c2f2c39
|
refs/heads/main
| 2023-05-14T02:32:30.759446
| 2021-06-03T20:39:55
| 2021-06-03T20:39:55
| 329,477,435
| 8
| 0
|
MIT
| 2021-06-03T20:31:26
| 2021-01-14T01:40:19
|
JavaScript
|
UTF-8
|
C++
| false
| false
| 11,420
|
cpp
|
// Halide tutorial lesson 12: Using the GPU
// This lesson demonstrates how to use Halide to run code on a GPU using OpenCL.
// On linux, you can compile and run it like so:
// g++ lesson_12*.cpp -g -std=c++11 -I <path/to/Halide.h> -I <path/to/tools/halide_image_io.h> -L <path/to/libHalide.so> -lHalide `libpng-config --cflags --ldflags` -ljpeg -lpthread -ldl -o lesson_12
// LD_LIBRARY_PATH=<path/to/libHalide.so> ./lesson_12
// On os x:
// g++ lesson_12*.cpp -g -std=c++11 -I <path/to/Halide.h> -I <path/to/tools/halide_image_io.h> -L <path/to/libHalide.so> -lHalide `libpng-config --cflags --ldflags` -ljpeg -o lesson_12
// DYLD_LIBRARY_PATH=<path/to/libHalide.dylib> ./lesson_12
// If you have the entire Halide source tree, you can also build it by
// running:
// make tutorial_lesson_12_using_the_gpu
// in a shell with the current directory at the top of the halide
// source tree.
#include <stdio.h>
#include "Halide.h"
// Include a clock to do performance testing.
#include "clock.h"
// Include some support code for loading pngs.
#include "halide_image_io.h"
using namespace Halide;
using namespace Halide::Tools;
Target find_gpu_target();
// Define some Vars to use.
Var x, y, c, i, ii, xo, yo, xi, yi;
// We're going to want to schedule a pipeline in several ways, so we
// define the pipeline in a class so that we can recreate it several
// times with different schedules.
class MyPipeline {
public:
Func lut, padded, padded16, sharpen, curved;
Buffer<uint8_t> input;
MyPipeline(Buffer<uint8_t> in)
: input(in) {
// For this lesson, we'll use a two-stage pipeline that sharpens
// and then applies a look-up-table (LUT).
// First we'll define the LUT. It will be a gamma curve.
lut(i) = cast<uint8_t>(clamp(pow(i / 255.0f, 1.2f) * 255.0f, 0, 255));
// Augment the input with a boundary condition.
padded(x, y, c) = input(clamp(x, 0, input.width() - 1),
clamp(y, 0, input.height() - 1), c);
// Cast it to 16-bit to do the math.
padded16(x, y, c) = cast<uint16_t>(padded(x, y, c));
// Next we sharpen it with a five-tap filter.
sharpen(x, y, c) = (padded16(x, y, c) * 2 -
(padded16(x - 1, y, c) +
padded16(x, y - 1, c) +
padded16(x + 1, y, c) +
padded16(x, y + 1, c)) /
4);
// Then apply the LUT.
curved(x, y, c) = lut(sharpen(x, y, c));
}
// Now we define methods that give our pipeline several different
// schedules.
void schedule_for_cpu() {
// Compute the look-up-table ahead of time.
lut.compute_root();
// Compute color channels innermost. Promise that there will
// be three of them and unroll across them.
curved.reorder(c, x, y)
.bound(c, 0, 3)
.unroll(c);
// Look-up-tables don't vectorize well, so just parallelize
// curved in slices of 16 scanlines.
Var yo, yi;
curved.split(y, yo, yi, 16)
.parallel(yo);
// Compute sharpen as needed per scanline of curved.
sharpen.compute_at(curved, yi);
// Vectorize the sharpen. It's 16-bit so we'll vectorize it 8-wide.
sharpen.vectorize(x, 8);
// Compute the padded input as needed per scanline of curved,
// reusing previous values computed within the same strip of
// 16 scanlines.
padded.store_at(curved, yo)
.compute_at(curved, yi);
// Also vectorize the padding. It's 8-bit, so we'll vectorize
// 16-wide.
padded.vectorize(x, 16);
// JIT-compile the pipeline for the CPU.
Target target = get_host_target();
curved.compile_jit(target);
}
// Now a schedule that uses CUDA or OpenCL.
bool schedule_for_gpu() {
Target target = find_gpu_target();
if (!target.has_gpu_feature()) {
return false;
}
// If you want to see all of the OpenCL, Metal, CUDA or D3D 12 API
// calls done by the pipeline, you can also enable the Debug flag.
// This is helpful for figuring out which stages are slow, or when
// CPU -> GPU copies happen. It hurts performance though, so we'll
// leave it commented out.
//target.set_feature(Target::Debug);
// We make the decision about whether to use the GPU for each
// Func independently. If you have one Func computed on the
// CPU, and the next computed on the GPU, Halide will do the
// copy-to-gpu under the hood. For this pipeline, there's no
// reason to use the CPU for any of the stages. Halide will
// copy the input image to the GPU the first time we run the
// pipeline, and leave it there to reuse on subsequent runs.
// As before, we'll compute the LUT once at the start of the
// pipeline.
lut.compute_root();
// Let's compute the look-up-table using the GPU in 16-wide
// one-dimensional thread blocks. First we split the index
// into blocks of size 16:
Var block, thread;
lut.split(i, block, thread, 16);
// Then we tell cuda that our Vars 'block' and 'thread'
// correspond to CUDA's notions of blocks and threads, or
// OpenCL's notions of thread groups and threads.
lut.gpu_blocks(block)
.gpu_threads(thread);
// This is a very common scheduling pattern on the GPU, so
// there's a shorthand for it:
// lut.gpu_tile(i, block, thread, 16);
// Func::gpu_tile behaves the same as Func::tile, except that
// it also specifies that the tile coordinates correspond to
// GPU blocks, and the coordinates within each tile correspond
// to GPU threads.
// Compute color channels innermost. Promise that there will
// be three of them and unroll across them.
curved.reorder(c, x, y)
.bound(c, 0, 3)
.unroll(c);
// Compute curved in 2D 8x8 tiles using the GPU.
curved.gpu_tile(x, y, xo, yo, xi, yi, 8, 8);
// This is equivalent to:
// curved.tile(x, y, xo, yo, xi, yi, 8, 8)
// .gpu_blocks(xo, yo)
// .gpu_threads(xi, yi);
// We'll leave sharpen as inlined into curved.
// Compute the padded input as needed per GPU block, storing
// the intermediate result in shared memory. In the schedule
// above xo corresponds to GPU blocks.
padded.compute_at(curved, xo);
// Use the GPU threads for the x and y coordinates of the
// padded input.
padded.gpu_threads(x, y);
// JIT-compile the pipeline for the GPU. CUDA, OpenCL, or
// Metal are not enabled by default. We have to construct a
// Target object, enable one of them, and then pass that
// target object to compile_jit. Otherwise your CPU will very
// slowly pretend it's a GPU, and use one thread per output
// pixel.
printf("Target: %s\n", target.to_string().c_str());
curved.compile_jit(target);
return true;
}
void test_performance() {
// Test the performance of the scheduled MyPipeline.
Buffer<uint8_t> output(input.width(), input.height(), input.channels());
// Run the filter once to initialize any GPU runtime state.
curved.realize(output);
// Now take the best of 3 runs for timing.
double best_time = 0.0;
for (int i = 0; i < 3; i++) {
double t1 = current_time();
// Run the filter 100 times.
for (int j = 0; j < 100; j++) {
curved.realize(output);
}
// Force any GPU code to finish by copying the buffer back to the CPU.
output.copy_to_host();
double t2 = current_time();
double elapsed = (t2 - t1) / 100;
if (i == 0 || elapsed < best_time) {
best_time = elapsed;
}
}
printf("%1.4f milliseconds\n", best_time);
}
void test_correctness(Buffer<uint8_t> reference_output) {
Buffer<uint8_t> output =
curved.realize({input.width(), input.height(), input.channels()});
// Check against the reference output.
for (int c = 0; c < input.channels(); c++) {
for (int y = 0; y < input.height(); y++) {
for (int x = 0; x < input.width(); x++) {
if (output(x, y, c) != reference_output(x, y, c)) {
printf("Mismatch between output (%d) and "
"reference output (%d) at %d, %d, %d\n",
output(x, y, c),
reference_output(x, y, c),
x, y, c);
exit(-1);
}
}
}
}
}
};
int main(int argc, char **argv) {
// Load an input image.
Buffer<uint8_t> input = load_image("images/rgb.png");
// Allocated an image that will store the correct output
Buffer<uint8_t> reference_output(input.width(), input.height(), input.channels());
printf("Running pipeline on CPU:\n");
MyPipeline p1(input);
p1.schedule_for_cpu();
p1.curved.realize(reference_output);
printf("Running pipeline on GPU:\n");
MyPipeline p2(input);
bool has_gpu_target = p2.schedule_for_gpu();
if (has_gpu_target) {
printf("Testing GPU correctness:\n");
p2.test_correctness(reference_output);
} else {
printf("No GPU target available on the host\n");
}
printf("Testing performance on CPU:\n");
p1.test_performance();
if (has_gpu_target) {
printf("Testing performance on GPU:\n");
p2.test_performance();
}
return 0;
}
// A helper function to check if OpenCL, Metal or D3D12 is present on the host machine.
Target find_gpu_target() {
// Start with a target suitable for the machine you're running this on.
Target target = get_host_target();
std::vector<Target::Feature> features_to_try;
if (target.os == Target::Windows) {
// Try D3D12 first; if that fails, try OpenCL.
if (sizeof(void*) == 8) {
// D3D12Compute support is only available on 64-bit systems at present.
features_to_try.push_back(Target::D3D12Compute);
}
features_to_try.push_back(Target::OpenCL);
} else if (target.os == Target::OSX) {
// OS X doesn't update its OpenCL drivers, so they tend to be broken.
// CUDA would also be a fine choice on machines with NVidia GPUs.
features_to_try.push_back(Target::Metal);
} else {
features_to_try.push_back(Target::OpenCL);
}
// Uncomment the following lines to also try CUDA:
// features_to_try.push_back(Target::CUDA);
for (Target::Feature f : features_to_try) {
Target new_target = target.with_feature(f);
if (host_supports_target_device(new_target)) {
return new_target;
}
}
printf("Requested GPU(s) are not supported. (Do you have the proper hardware and/or driver installed?)\n");
return target;
}
|
[
"hiroyagojo@gmail.com"
] |
hiroyagojo@gmail.com
|
4b6b2252684ff22c4269900d7c84df855344d1c9
|
8a964d9fdb6e7b1f99ce44b7a38ae9615f8399c3
|
/codebase/apps/radar/src/Dsr2CP2Mom/Dsr2CP2Mom.cc
|
ee063dbc598742654b6429467e0708ef7bab33ac
|
[
"BSD-3-Clause"
] |
permissive
|
zhaopingsun/lrose-core
|
93edd9b354ba2db08a52c45a6d9fcd561525403e
|
98461699e9cfb8b3547a7143491a0cf42671c66f
|
refs/heads/master
| 2021-10-09T22:21:54.872633
| 2019-01-04T06:18:51
| 2019-01-04T06:18:51
| 110,906,414
| 0
| 0
| null | 2017-11-16T01:20:12
| 2017-11-16T01:20:12
| null |
UTF-8
|
C++
| false
| false
| 16,763
|
cc
|
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Boulder, Colorado, USA
// ** BSD licence applies - redistribution and use in source and binary
// ** forms, with or without modification, are permitted provided that
// ** the following conditions are met:
// ** 1) If the software is modified to produce derivative works,
// ** such modified software should be clearly marked, so as not
// ** to confuse it with the version available from UCAR.
// ** 2) Redistributions of source code must retain the above copyright
// ** notice, this list of conditions and the following disclaimer.
// ** 3) Redistributions in binary form must reproduce the above copyright
// ** notice, this list of conditions and the following disclaimer in the
// ** documentation and/or other materials provided with the distribution.
// ** 4) Neither the name of UCAR nor the names of its contributors,
// ** if any, may be used to endorse or promote products derived from
// ** this software without specific prior written permission.
// ** DISCLAIMER: THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS
// ** OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
// ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
////////////////////////////////////////////////////////////////////////
// Dsr2CP2Mom.cc
//
// Dsr2CP2Mom object
// Some methods are in transform.cc and geom.cc
//
// Mike Dixon, RAP, NCAR, P.O.Box 3000, Boulder, CO, 80307-3000, USA
//
// Oct 2007
//
///////////////////////////////////////////////////////////////////////
//
// Dsr2CP2Mom reads an input radar FMQ, and
// writes CP2Moments UDP data
//
///////////////////////////////////////////////////////////////////////
#include <toolsa/pmu.h>
#include <toolsa/utim.h>
#include <toolsa/uusleep.h>
#include <toolsa/ucopyright.h>
#include <toolsa/MemBuf.hh>
#include <toolsa/DateTime.hh>
#include <toolsa/TaArray.hh>
#include <cmath>
#include "Dsr2CP2Mom.hh"
using namespace std;
// Constructor
Dsr2CP2Mom::Dsr2CP2Mom(int argc, char **argv)
{
isOK = true;
_pProductSocket = NULL;
_xContents = 0;
_sContents = 0;
_prevSbandAz = 0.0;
_sbandAz = 0.0;
_xbandAz = 0.0;
_clockWise = false;
_xbandAvail = true;
// set programe name
_progName = "Dsr2CP2Mom";
ucopyright((char *) _progName.c_str());
// get command line args
if (_args.parse(argc, argv, _progName)) {
cerr << "ERROR: " << _progName << endl;
cerr << "Problem with command line args" << endl;
isOK = false;
return;
}
// get TDRP params
_paramsPath = (char *) "unknown";
if (_params.loadFromArgs(argc, argv, _args.override.list,
&_paramsPath)) {
cerr << "ERROR: " << _progName << endl;
cerr << "Problem with TDRP parameters" << endl;
isOK = false;
}
// Instantiate and initialize the DsRadar queues
// Block on SBAND, not on XBAND
DsFmq::openPosition startPos = DsFmq::START;
if (_params.seek_to_end_of_input) {
startPos = DsFmq::END;
}
if (_sbandQueue.init(_params.sband_fmq_url, _progName.c_str(),
_params.debug,
DsFmq::BLOCKING_READ_ONLY, startPos)) {
cerr << "ERROR - Dsr2CP2Mom::_run" << endl;
cerr << " Cannot init radar queue: " << _params.sband_fmq_url << endl;
isOK = false;
}
if (_xbandQueue.init(_params.xband_fmq_url, _progName.c_str(),
_params.debug,
DsFmq::BLOCKING_READ_ONLY, startPos)) {
cerr << "ERROR - Dsr2CP2Mom::_run" << endl;
cerr << " Cannot init radar queue: " << _params.xband_fmq_url << endl;
isOK = false;
}
// initialize the output UDP
if (_initUdpOutput()) {
isOK = false;
}
// init process mapper registration
PMU_auto_init((char *) _progName.c_str(),
_params.instance,
PROCMAP_REGISTER_INTERVAL);
}
/////////////////////////////////////////////////////////
// destructor
Dsr2CP2Mom::~Dsr2CP2Mom()
{
if (_pProductSocket) {
delete _pProductSocket;
}
// unregister process
PMU_auto_unregister();
}
//////////////////////////////////////////////////
// Run
int Dsr2CP2Mom::Run ()
{
// register with procmap
PMU_auto_register("Run");
while (true) {
_run();
if (_params.debug) {
cerr << "Dsr2CP2Mom::Run:" << endl;
cerr << " Trying to contact input server at url: "
<< _params.sband_fmq_url << endl;
}
umsleep(1000);
}
return 0;
}
//////////////////////////////////////////////////
// _run
int Dsr2CP2Mom::_run ()
{
// register with procmap
PMU_auto_register("Run");
// read xband message up front,
// so that there is definitely one available
if (_readMsg(_xbandQueue, _xbandMsg, _xContents) == 0) {
_xbandAvail = true;
}
if (_params.debug) {
cerr << "-->> Xband data is available" << endl;
}
// read beams from the queue
_nBeamsRead = 0;
while (true) {
// read S band
if (_readSband() == 0) {
// read an X band
_readXband();
// synchronize the queues
_syncQueues(false);
// If we have radar and field params, and beam data,
// process this beam
if ((_sContents & DsRadarMsg::RADAR_BEAM) && _sbandMsg.allParamsSet()) {
if (_params.debug) {
_printBeamInfo(_sbandMsg, "SBAND");
_printBeamInfo(_xbandMsg, "XBAND");
}
// compute az error
double deltaSbandAz = _sbandAz - _prevSbandAz;
if (deltaSbandAz > 180) {
deltaSbandAz -= 360;
} else if (deltaSbandAz < -180) {
deltaSbandAz += 360;
}
double sign = -1;
_clockWise = false;
if (deltaSbandAz >= 0) {
_clockWise = true;
sign = 1;
}
_prevSbandAz = _sbandAz;
double azError = (_xbandAz - _sbandAz) * sign;
if (_params.debug) {
cerr << "----> clockwise, azError: "
<< _clockWise << ", " << azError << endl;
}
_processSbandBeam();
_processXbandBeam();
_nBeamsRead++;
} // if (_sContents ...
} // if (_readMsg()
} // while (true)
return 0;
}
////////////////////////////////////////////////////////////////////
// _readMsg()
//
// Read a message from the queue, setting the flags about beam_data
// and _endOfVolume appropriately.
//
int Dsr2CP2Mom::_readMsg(DsRadarQueue &radarQueue,
DsRadarMsg &radarMsg,
int &contents)
{
PMU_auto_register("Reading radar queue");
if (radarQueue.getDsMsg(radarMsg, &contents)) {
return -1;
}
return 0;
}
////////////////////////////////////////////////////////////////
// process S-band beam
int Dsr2CP2Mom::_processSbandBeam()
{
const DsRadarParams &radarParams = _sbandMsg.getRadarParams();
const vector<DsFieldParams*> &fieldParamsArray = _sbandMsg.getFieldParams();
const DsRadarBeam &radarBeam = _sbandMsg.getRadarBeam();
if (_params.debug) {
DateTime btime(radarBeam.dataTime);
cerr << "Beam time, volnum, az, el: "
<< DateTime::strm(radarBeam.dataTime) << ", "
<< radarBeam.volumeNum << ", "
<< radarBeam.azimuth << ", "
<< radarBeam.elevation << endl;
}
// loop through requested output fields
int iret = 0;
for (int ii = 0; ii < _params.sband_output_fields_n; ii++) {
int fieldId = _params._sband_output_fields[ii].field_id;
string dsrname = _params._sband_output_fields[ii].dsr_name;
double missingVal = _params._sband_output_fields[ii].missing_val;
for (int jj = 0; jj < (int) fieldParamsArray.size(); jj++) {
const DsFieldParams &fieldParams = *(fieldParamsArray[jj]);
if (dsrname == fieldParams.name) {
if (_processField(dsrname, jj, fieldId,
radarParams, fieldParams,
radarBeam, missingVal)) {
iret = -1;
}
}
} // jj
} // ii
return iret;
}
////////////////////////////////////////////////////////////////
// process S-band beam
int Dsr2CP2Mom::_processXbandBeam()
{
const DsRadarParams &radarParams = _xbandMsg.getRadarParams();
const vector<DsFieldParams*> &fieldParamsArray = _xbandMsg.getFieldParams();
const DsRadarBeam &radarBeam = _xbandMsg.getRadarBeam();
if (_params.debug) {
DateTime btime(radarBeam.dataTime);
cerr << "Beam time, volnum, az, el: "
<< DateTime::strm(radarBeam.dataTime) << ", "
<< radarBeam.volumeNum << ", "
<< radarBeam.azimuth << ", "
<< radarBeam.elevation << endl;
}
// loop through requested output fields
int iret = 0;
for (int ii = 0; ii < _params.xband_output_fields_n; ii++) {
int fieldId = _params._xband_output_fields[ii].field_id;
string dsrname = _params._xband_output_fields[ii].dsr_name;
double missingVal = _params._xband_output_fields[ii].missing_val;
for (int jj = 0; jj < (int) fieldParamsArray.size(); jj++) {
const DsFieldParams &fieldParams = *(fieldParamsArray[jj]);
if (dsrname == fieldParams.name) {
if (_processField(dsrname, jj, fieldId,
radarParams, fieldParams,
radarBeam, missingVal)) {
iret = -1;
}
}
} // jj
} // ii
return iret;
}
///////////////////////
// process this field
int Dsr2CP2Mom::_processField(const string &fieldName,
int dsrFieldNum,
int cp2FieldId,
const DsRadarParams &radarParams,
const DsFieldParams &fieldParams,
const DsRadarBeam &radarBeam,
double missingVal)
{
// set header
CP2Net::CP2ProductHeader header;
header.prodType = (CP2Net::PRODUCT_TYPES) cp2FieldId;
header.beamNum = _nBeamsRead;
header.gates = radarParams.numGates;
header.az = radarBeam.azimuth;
header.el = radarBeam.elevation;
header.gateWidthKm = radarParams.gateSpacing;
if (_params.debug >= Params::DEBUG_VERBOSE) {
cerr << "Sending field name, dsrNum, cp2Id, beamNum, el, az, gateSpacing: "
<< fieldName << ", "
<< dsrFieldNum << ", "
<< cp2FieldId << ", "
<< header.beamNum << ", "
<< header.el << ", "
<< header.az << ", "
<< header.gateWidthKm << endl;
}
// unpack data
TaArray<double> _data;
double *data = (double *) _data.alloc(radarParams.numGates);
if(fieldParams.byteWidth == 1) {
ui08 *dd = (ui08 *) radarBeam.getData() + dsrFieldNum;
ui08 missing = (ui08) fieldParams.missingDataValue;
double scale = fieldParams.scale;
double bias = fieldParams.bias;
for (int ii = 0; ii < radarParams.numGates;
ii++, dd += radarParams.numFields) {
if (*dd == missing) {
data[ii] = missingVal;
} else {
data[ii] = *dd * scale + bias;
}
}
} else if (fieldParams.byteWidth == 2) {
ui16 *dd = (ui16 *) radarBeam.getData() + dsrFieldNum;
ui16 missing = (ui16) fieldParams.missingDataValue;
double scale = fieldParams.scale;
double bias = fieldParams.bias;
for (int ii = 0; ii < radarParams.numGates;
ii++, dd += radarParams.numFields) {
if (*dd == missing) {
data[ii] = missingVal;
} else {
data[ii] = *dd * scale + bias;
}
}
} else if (fieldParams.byteWidth == 4) {
fl32 *dd = (fl32 *) radarBeam.getData() + dsrFieldNum;
fl32 missing = (fl32) fieldParams.missingDataValue;
for (int ii = 0; ii < radarParams.numGates;
ii++, dd += radarParams.numFields) {
if (*dd == missing) {
data[ii] = missingVal;
} else {
data[ii] = *dd;
}
}
} else {
cerr << "ERROR - invalid byte width: " << fieldParams.byteWidth << endl;
return -1;
}
// copy header and data to membuf
MemBuf outBuf;
outBuf.add(&header, sizeof(header));
outBuf.add(data, radarParams.numGates * sizeof(double));
// send the buffer
int bytesSent = 0;
int ntries = 0;
while (ntries < 10) {
bytesSent =
_pProductSocket->writeDatagram((const char*)outBuf.getPtr(),
outBuf.getLen());
if(bytesSent == outBuf.getLen()) {
return 0;
}
umsleep(100);
ntries++;
}
cerr << "ERROR - packet sending failed" << endl;
return -1;
}
////////////////////////////////////////////////////////////////////
// initialize the UDP output
int Dsr2CP2Mom::_initUdpOutput()
{
// create the UDP socket
_pProductSocket = new CP2UdpSocket(_params.udp_network,
_params.udp_port,
true,
_udpBufferSize, 0,
_params.debug >= Params::DEBUG_NORM);
if (!_pProductSocket->ok()) {
cerr << "ERROR - Dsr2CP2Mom::_initUdp" << endl;
cerr << "Cannot open socket: network, port: "
<< _params.udp_network << ", "
<< _params.udp_port << endl;
delete _pProductSocket;
_pProductSocket = NULL;
return -1;
}
return 0;
}
////////////////////////////////////////////////////////////////////
// send a field
void Dsr2CP2Mom::_sendField(CP2Net::CP2ProductHeader& header,
std::vector<double>& data,
CP2Net::CP2Packet& packet,
bool forceSend)
{
int incr = data.size()*sizeof(data[0]) + sizeof(header);
// if this packet will get too large by adding new data,
// go ahead and send it
if (packet.packetSize()+incr > _soMaxMsgSize) {
int bytesSent = 0;
while (bytesSent != packet.packetSize()) {
bytesSent =
_pProductSocket->writeDatagram((const char*)packet.packetData(),
packet.packetSize());
if(bytesSent != packet.packetSize())
umsleep(1000);
}
packet.clear();
}
packet.addProduct(header, data.size(), &data[0]);
if (forceSend) {
int bytesSent = 0;
while (bytesSent != packet.packetSize()) {
bytesSent =
_pProductSocket->writeDatagram((const char*)packet.packetData(),
packet.packetSize());
if(bytesSent != packet.packetSize())
umsleep(1000);
}
packet.clear();
}
}
////////////////////////////////////////////////////////////////
// print beam info
void Dsr2CP2Mom::_printBeamInfo(const DsRadarMsg &radarMsg,
const string &label)
{
const DsRadarBeam &radarBeam = radarMsg.getRadarBeam();
DateTime btime(radarBeam.dataTime);
cerr << "Beam label, time, volnum, az, el: "
<< label << ", "
<< DateTime::strm(radarBeam.dataTime) << ", "
<< radarBeam.volumeNum << ", "
<< radarBeam.azimuth << ", "
<< radarBeam.elevation << endl;
}
////////////////////////////////////////////////////////////////
// read S band
// Sband is primary - always read
// returns 0 on success, -1 on failure
int Dsr2CP2Mom::_readSband()
{
if (_readMsg(_sbandQueue, _sbandMsg, _sContents)) {
return -1;
}
_sbandAz = _getAz(_sbandMsg);
return 0;
}
////////////////////////////////////////////////////////////////
// read X band
// Xband is secondary - do not read if ahead
// returns 0 on success, -1 on failure
int Dsr2CP2Mom::_readXband()
{
double sTime = _getTimeDbl(_sbandMsg);
double xTime = _getTimeDbl(_xbandMsg);
if (xTime > sTime) {
return 0;
}
if (_readMsg(_xbandQueue, _xbandMsg, _xContents)) {
return -1;
}
_xbandAz = _getAz(_xbandMsg);
return 0;
}
////////////////////////////////////////////////////////////////
// get azimuth, elevation, time
double Dsr2CP2Mom::_getAz(const DsRadarMsg &radarMsg)
{
return radarMsg.getRadarBeam().azimuth;
}
double Dsr2CP2Mom::_getEl(const DsRadarMsg &radarMsg)
{
return radarMsg.getRadarBeam().elevation;
}
time_t Dsr2CP2Mom::_getTime(const DsRadarMsg &radarMsg)
{
return radarMsg.getRadarBeam().dataTime;
}
// full time including partial secs
double Dsr2CP2Mom::_getTimeDbl(const DsRadarMsg &radarMsg)
{
double dtime = radarMsg.getRadarBeam().dataTime;
double nanoSecs = radarMsg.getRadarBeam().nanoSecs;
dtime += nanoSecs / 1.0e9;
return dtime;
}
//////////////////////
// sync the two queues
void Dsr2CP2Mom::_syncQueues(bool allowSbandRead)
{
// first get times the same
while (true) {
double sTime = _getTimeDbl(_sbandMsg);
double xTime = _getTimeDbl(_xbandMsg);
double diff = sTime - xTime;
if (fabs(diff) < 0.1) {
break;
}
if (sTime < xTime) {
if (allowSbandRead) {
// s lags, read an S beam
_readSband();
if (_params.debug >= Params::DEBUG_VERBOSE) {
cerr << "_syncQueues: S band catching up" << endl;
}
} else {
return;
}
} else if (xTime < sTime) {
// x lags, read an X beam
_readXband();
if (_params.debug >= Params::DEBUG_VERBOSE) {
cerr << "_syncQueues: X band catching up" << endl;
}
}
}
}
|
[
"dixon@ucar.edu"
] |
dixon@ucar.edu
|
a9fa7725e2ecef4bfd5067ff63383633f70b1a74
|
e0447f70242942ac8942121c48c88522568cc2d2
|
/exact/vertex.cpp
|
35170f062414a6cb704e147acf4ab49e3ad05b3c
|
[] |
no_license
|
gustavowl/vertex-cover
|
c41cf83af589073d10f028ddd6105d218037a74f
|
b6b5fd62b2749288e99e73aab5a5f0bd6f9f2021
|
refs/heads/master
| 2021-08-19T11:01:26.778474
| 2017-11-26T01:34:23
| 2017-11-26T01:34:23
| 104,305,064
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,034
|
cpp
|
#include "edge.h"
#include "vertex.h"
#include <cstddef>
Vertex::Vertex() {
*this = Vertex(true, false, 0);
}
Vertex::Vertex(bool free, bool covered, int degree) {
this->free = free;
this->covered = covered;
this->degree = degree;
}
void Vertex::addEdge(Edge* e) {
if (e->isVertexAttached(this)) {
edges.push_back(e);
degree++;
}
}
void Vertex::removeEdge(Edge* e) {
for (int i = 0; i < degree; i++) {
if (edges[i] == e) {
edges.erase(edges.begin() + i);
degree--;
}
}
}
void Vertex::setFree() {
free = true;
covered = false;
}
void Vertex::setCovered() {
free = false;
covered = true;
}
void Vertex::setUncovered() {
free = false;
covered = false;
}
bool Vertex::isFree() {
return free;
}
bool Vertex::isCovered() {
return !free && covered;
}
bool Vertex::isUncovered() {
return !free && !covered;
}
bool Vertex::hasUncoveredNeighbour() {
Vertex* v;
for (int i = 0; i < degree; i++) {
v = edges[i]->getNeighbourOf(this);
if (v->isUncovered()) {
return true;
}
}
return false;
}
|
[
"gustavoalvesbezerra@gmail.com"
] |
gustavoalvesbezerra@gmail.com
|
80dfa7945684d51886a148de51600cade22970b5
|
e1aa704cc37ac585d6cc28c28af5ca6f5fcec718
|
/libcassandra/cassandra_factory.cc
|
fdf33613e718e4bab386d514cc31a693b9907f0c
|
[
"BSD-3-Clause"
] |
permissive
|
leonhong/libcassandra
|
8b62661661ab872f114804d9a328c195f7da33a7
|
9656334eb2425c67a1fc898a18e77897e02b3316
|
refs/heads/master
| 2020-12-25T02:39:00.660056
| 2010-09-04T05:25:27
| 2010-09-04T05:25:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,785
|
cc
|
/*
* LibCassandra
* Copyright (C) 2010 Padraig O'Sullivan
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
* the COPYING file in the parent directory for full text.
*/
#include <string>
#include <set>
#include <sstream>
#include <protocol/TBinaryProtocol.h>
#include <transport/TSocket.h>
#include <transport/TTransportUtils.h>
#include "libgenthrift/Cassandra.h"
#include "libcassandra/cassandra.h"
#include "libcassandra/cassandra_factory.h"
using namespace libcassandra;
using namespace std;
using namespace apache::thrift;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
using namespace org::apache::cassandra;
using namespace boost;
CassandraFactory::CassandraFactory(const string &server_list)
:
url(server_list),
host(),
port(0)
{
/* get the host name from the server list string */
string::size_type pos= server_list.find_first_of(':');
host= server_list.substr(0, pos);
/* get the port from the server list string */
string tmp_port= server_list.substr(pos + 1);
/* convert to integer */
istringstream int_stream(tmp_port);
int_stream >> port;
}
CassandraFactory::CassandraFactory(const string &in_host, int in_port)
:
url(),
host(in_host),
port(in_port)
{
url.append(host);
url.append(":");
ostringstream port_str;
port_str << port;
url.append(port_str.str());
}
CassandraFactory::~CassandraFactory() {}
tr1::shared_ptr<Cassandra> CassandraFactory::create()
{
/* Default is Buffered Transport */
return create(false);
}
tr1::shared_ptr<Cassandra> CassandraFactory::create(bool framed_transport)
{
CassandraClient *thrift_client= createThriftClient(host, port, framed_transport);
tr1::shared_ptr<Cassandra> ret(new Cassandra(thrift_client, host, port));
return ret;
}
CassandraClient *CassandraFactory::createThriftClient(const string &in_host,
int in_port,
bool framed_transport)
{
boost::shared_ptr<TTransport> socket(new TSocket(in_host, in_port));
boost::shared_ptr<TTransport> transport;
if (framed_transport)
{
transport= boost::shared_ptr<TTransport>(new TFramedTransport(socket));
}
else
{
transport= boost::shared_ptr<TTransport>(new TBufferedTransport(socket));
}
boost::shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
CassandraClient *client= new(std::nothrow) CassandraClient(protocol);
transport->open(); /* throws an exception */
return client;
}
const string &CassandraFactory::getURL() const
{
return url;
}
const string &CassandraFactory::getHost() const
{
return host;
}
int CassandraFactory::getPort() const
{
return port;
}
|
[
"osullivan.padraig@gmail.com"
] |
osullivan.padraig@gmail.com
|
b3367f19fe345b414f589f65f3b0ebeb54c0c543
|
d4648c15a5745c175c347b428403ecc66853c091
|
/Swirls/stdafx.cpp
|
17a94a0b8c4f42a7f8bbf84534817edc20c9a9bc
|
[] |
no_license
|
SecondReality/Swirls
|
c1c15daab5f7596280289886ceb63545f659036d
|
b829beb6ff4d033187aaac770c3af23c922a4d1f
|
refs/heads/master
| 2021-01-23T08:04:30.144874
| 2013-02-16T03:38:57
| 2013-02-16T03:38:57
| 8,230,892
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 285
|
cpp
|
// stdafx.cpp : source file that includes just the standard includes
// Swirls.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
[
"smr@secondreality.co.uk"
] |
smr@secondreality.co.uk
|
0dd32f48a4110ee84d7381cd0591634a994154ad
|
2461c5b88dbbd49459383c0c8a1ca8c710798f09
|
/tcpServer/WinIOCPServer/stdafx.cpp
|
3f6d49e08541b7671154f0b85b6edd89ebe45876
|
[] |
no_license
|
hongnet/c-c-
|
7bd5d87e084c254582b7a1623e793cbda4fd6d72
|
6fc7c3bafaf7b414a7ec4199d451298df7e27b9d
|
refs/heads/master
| 2023-04-13T14:30:41.710493
| 2023-04-11T09:05:10
| 2023-04-11T09:05:10
| 153,915,166
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 292
|
cpp
|
// stdafx.cpp : source file that includes just the standard includes
// WinIOCPServer.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
[
"44320879+hongnet@users.noreply.github.com"
] |
44320879+hongnet@users.noreply.github.com
|
024e92d4bf62f0d8417dd5b5f6cd5c9a93e45856
|
fcc6edba604125eaa8075063d22ed2676e5fbe8a
|
/src/nodes/node.cpp
|
89d5de5f709e9db64e109bd3514934e89125795c
|
[] |
no_license
|
andriyDev/sheep-engine
|
2f00ed73dc31c48554df7693ede9b539ce3c96b0
|
7b4417ca2041862352d899e0f055de511f0f5900
|
refs/heads/main
| 2023-07-02T14:23:49.306334
| 2021-08-01T21:56:57
| 2021-08-01T21:56:57
| 373,393,580
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,160
|
cpp
|
#include "nodes/node.h"
#include <glog/logging.h>
#include <stdio.h>
#include "nodes/utility.h"
#include "world.h"
void Node::AttachNode(const std::shared_ptr<Node>& child, int index) {
CHECK(child.get() && !child->GetParent().get());
child->world = GetWorld();
child->parent = this->shared_from_this();
if (index < 0) {
index += children.size() + 1;
CHECK(index >= 0);
} else {
CHECK(index < children.size());
}
children.insert(children.begin() + index, child);
for (const std::shared_ptr<Node>& node : CollectPreOrderNodes(child)) {
node->NotifyOfAncestorAttachment(this->shared_from_this(), child);
}
const std::shared_ptr<World> world = GetWorld();
if (world) {
world->PropagateNodeAttachment(child);
}
}
void Node::DetachNode(const std::shared_ptr<Node>& child) {
CHECK(child.get() && child->GetParent().get() == this);
for (const std::shared_ptr<Node>& node : CollectPreOrderNodes(child)) {
node->NotifyOfAncestorDetachment(this->shared_from_this(), child);
}
const std::shared_ptr<World> world = GetWorld();
if (world) {
world->PropagateNodeAttachment(child);
}
child->world = std::shared_ptr<World>();
child->parent = std::shared_ptr<Node>();
const auto node_it = std::find(children.begin(), children.end(), child);
children.erase(node_it);
}
void Node::AttachTo(const std::shared_ptr<Node>& parent, int index) {
const std::shared_ptr<Node> old_parent = GetParent();
if (old_parent) {
old_parent->DetachNode(this->shared_from_this());
}
if (parent) {
parent->AttachNode(this->shared_from_this(), index);
}
}
std::vector<std::shared_ptr<Node>> Node::GetAncestry() const {
std::vector<std::shared_ptr<Node>> ancestors;
std::shared_ptr<Node> current_node = this->GetParent();
while (current_node) {
ancestors.push_back(current_node);
current_node = current_node->GetParent();
}
return ancestors;
}
std::shared_ptr<World> Node::GetWorld() const { return world.lock(); }
std::shared_ptr<Node> Node::GetParent() const { return parent.lock(); }
const std::vector<std::shared_ptr<Node>>& Node::GetChildren() const {
return children;
}
|
[
"andriydzikh@gmail.com"
] |
andriydzikh@gmail.com
|
cf99a6429f313a7c745fe8954d1335dee4380e9c
|
ada91d3a7c44324c18e5a9ae1e8fe5d166d2bee5
|
/BlackJack/Card.cpp
|
26c43036a69cdb87b136c03f09d1790c38fe424a
|
[] |
no_license
|
Thaon/blackjack
|
93b3371ef5b89539a2007d485bc0f2154f552519
|
af976b922c59d6c3efd4be8fa79fb9a9c0b7316e
|
refs/heads/master
| 2020-04-05T23:26:55.537475
| 2015-09-28T10:00:39
| 2015-09-28T10:00:39
| 42,930,194
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 528
|
cpp
|
#include "stdafx.h"
#include "Card.h"
Card::Card()
{
m_name = "default";
m_value = 0;
m_alternateValue = -1;
}
Card::Card(const std::string name, short int value) :
m_name(name),
m_value(value),
m_alternateValue(-1)
{
}
Card::Card(const std::string name, short int value, short int alternateValue) :
m_name(name),
m_value(value),
m_alternateValue(alternateValue)
{
}
//getters
std::string Card::Name() const { return m_name; }
int Card::Value() { return m_value; }
int Card::AlternateValue() { return m_alternateValue; }
|
[
"gabriele.maddaloni@gmail.com"
] |
gabriele.maddaloni@gmail.com
|
c3d2ad683294701e04de9351c8ffeff30bb1bad8
|
7c99f5334dbaa45e86b2a814a4d640c40b1dc7dd
|
/COW/resources/cpp/ai/src/ApiConnector.hpp
|
5b8c99cf07325b0b5f245f90909fb08956723c2b
|
[] |
no_license
|
aurelien-defossez/cod-open-world
|
9e7e88fbc0358ad8bf552de6205f704b3d6745ad
|
0b6ba9d1f7c4c760767d450d1169402189a6e003
|
refs/heads/master
| 2021-01-19T05:26:15.636726
| 2012-05-02T16:55:23
| 2012-05-02T16:55:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 880
|
hpp
|
#ifndef __API_CONNECTOR_H__
#define __API_CONNECTOR_H__
#include "Variant.hpp"
#include <string>
// -------------------------------------------------------------------------
// Callback function types
// -------------------------------------------------------------------------
typedef int makeReturnCallCallback(int, int,
Variant, Variant, Variant, Variant, Variant, Variant, Variant, Variant);
// -------------------------------------------------------------------------
// Commander class
// -------------------------------------------------------------------------
class ApiConnector {
protected:
makeReturnCallCallback *makeCall;
public:
ApiConnector();
void registerCallbacks(makeReturnCallCallback makeCall);
virtual std::string decode(int code) = 0;
protected:
Variant callGameFunction(int function, int nbParameters,
Variant parameters[]);
};
#endif
|
[
"devnull@localhost"
] |
devnull@localhost
|
60ff319f91ba4263922f9f5eed764839b4231845
|
a3c25f35626392cd1dd490e5ace63b2c81e70bdd
|
/Model/lab4_queue'/queue/base.h
|
a65cef1f2747aa1bbfcf2b6361c6b14b8653de34
|
[] |
no_license
|
reijo1337/7sem
|
64aa6a48286e232a3e2ce9a216855e7fecf10b4b
|
410067bb0a1348c4e4ddecd31771784d4f36ac1d
|
refs/heads/master
| 2021-09-01T19:08:16.002316
| 2017-12-28T10:37:13
| 2017-12-28T10:37:13
| 104,502,702
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 477
|
h
|
#ifndef BASE_H
#define BASE_H
#include <QObject>
class BaseGenerator : public QObject
{
Q_OBJECT
signals:
void sendReques();
public:
virtual double nextGenerationPeriod() = 0;
void emitRequest() {
emit sendReques();
}
};
class BaseReceiver : public QObject
{
Q_OBJECT
public slots:
virtual void receiveRequest() = 0;
public:
virtual double nextProcessingPeriod() = 0;
virtual void Process(double part) = 0;
};
#endif // BASE_H
|
[
"tantsevov@gmail.com"
] |
tantsevov@gmail.com
|
df021722eaf3c6f97ae36609e9ae680e30291cae
|
000a3f14cbc5c257805334b6635bc0a693d72b14
|
/DebugTools/USBDebug/Serial.h
|
c27e8c1be2361bf1b3dbd4a7033c1504ba9b3124
|
[] |
no_license
|
felixpelletier/RobocupSSL_LL
|
257de54f3d037ef74dc3c05e80de887b970e0ed5
|
6e292776bbd85e60547044bde3fb5e253f9ea136
|
refs/heads/develop
| 2021-01-17T18:24:05.068283
| 2016-07-20T23:53:23
| 2016-07-20T23:53:23
| 56,727,989
| 0
| 0
| null | 2016-04-20T23:41:14
| 2016-04-20T23:41:13
| null |
UTF-8
|
C++
| false
| false
| 1,566
|
h
|
#ifndef SERIALCLASS_H_INCLUDED
#define SERIALCLASS_H_INCLUDED
#define ARDUINO_WAIT_TIME 1000
#ifdef __linux__
#include <boost/asio.hpp>
using namespace::boost::asio;
#endif
#ifdef __WIN32__
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
class Serial
{
private:
//Serial comm handler
#ifdef __WIN32__
HANDLE hSerial;
//Get various information about the connection
COMSTAT status;
//Keep track of last error
DWORD errors;
#endif
#ifdef __linux__
boost::asio::io_service mIO;
boost::asio::serial_port mSerial;
#endif
//Connection status
bool connected;
public:
//Initialize Serial communication with the given COM port
Serial(const char *portName);
//Close the connection
//NOTA: for some reason you can't connect again before exiting
//the program and running it again
~Serial();
//Read data in a buffer, if nbChar is greater than the
//maximum number of bytes available, it will return only the
//bytes available. The function return -1 when nothing could
//be read, the number of bytes actually read.
int ReadData(char *pBuffer, unsigned int pNbChar);
//Writes data from a buffer through the Serial connection
//return true on success.
void gg(char *f1);
bool WriteData(char *pBuffer, unsigned int pNbChar);
//Check if we are actually connected
bool IsConnected();
};
#endif // SERIALCLASS_H_INCLUDED
|
[
"mathieugaron1991@hotmail.com"
] |
mathieugaron1991@hotmail.com
|
055093f9da11b9f155eb468cacfcd899600bfb72
|
a571bd93cda2c160381457f5ddda44bf6f8d0966
|
/DGP/SoundManager.cpp
|
8ccb1eccc3d50b3ed503f2e9463b5ceadd9f4a6b
|
[] |
no_license
|
Zieroc/SDL_TextBasedGame
|
a705fbf6b673d192684a54c5e54f057015592f43
|
a0a537452a6e6ec4761a4e3f6daa4237785ee2c1
|
refs/heads/master
| 2021-01-19T17:42:45.539670
| 2014-04-07T22:55:05
| 2014-04-07T22:55:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 976
|
cpp
|
#include "SoundManager.h"
SoundManager::SoundManager()
{
}
SoundManager::~SoundManager()
{
}
std::shared_ptr<SoundManager> SoundManager::Create(std::shared_ptr<ContentManager> contentMan)
{
std::shared_ptr<SoundManager> pRet(new SoundManager);
pRet->m_p_ContentManager = contentMan;
return pRet;
}
void SoundManager::PlayMusic(string name)
{
Mix_PlayMusic(m_p_ContentManager->GetMusic(name), -1);
}
void SoundManager::FadeInMusic(string name, int ms)
{
Mix_FadeInMusic(m_p_ContentManager->GetMusic(name), -1, ms);
}
void SoundManager::FadeOutMusic(int ms)
{
Mix_FadeOutMusic(ms);
}
void SoundManager::PlaySoundEffect(string name)
{
Mix_PlayChannel(-1, m_p_ContentManager->GetSoundEffect(name), 0);
}
void SoundManager::PauseMusic()
{
if(!Mix_PausedMusic())
{
Mix_PauseMusic();
}
}
void SoundManager::ResumeMusic()
{
if(Mix_PausedMusic())
{
Mix_ResumeMusic();
}
}
void SoundManager::StopMusic()
{
if(Mix_PlayingMusic())
{
Mix_HaltMusic();
}
}
|
[
"ChristyCarroll1@gmail.com"
] |
ChristyCarroll1@gmail.com
|
ac19e53985625884d11912a8e60034f5bcd0fefa
|
76d3d47501ff2ba4318ed166ebc27d7e09150b92
|
/src/util/pair.h
|
533c91ed771c7e006a3d28fbb588a431b0e8c9a4
|
[] |
no_license
|
robinei/spacegame
|
04b7812f580da16e9c6a6bf3ce3ccef999003125
|
4f43e08cc3953f5828d633d0f369e52dcd357fbb
|
refs/heads/master
| 2021-01-19T00:25:57.359113
| 2016-11-09T23:42:17
| 2019-01-28T18:42:20
| 73,034,606
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 239
|
h
|
template <typename A, typename B>
struct Pair {
A first;
B second;
Pair() {}
Pair(A a, B b) : first(a), second(b) {}
};
template <typename A, typename B>
Pair<A, B> make_pair(A a, B b) {
return Pair<A, B>(a, b);
}
|
[
"robinei@gmail.com"
] |
robinei@gmail.com
|
9c5106a5503e5fb70569a76dfdb1545535487501
|
e5b0a41047edd32e52419db9ff965d71005b198b
|
/qt/test/countrywindow.cpp
|
5ba50cd528cd83d9be6e5f2d76d14b0a2bcb027d
|
[] |
no_license
|
timazarenok/labs
|
525402fc55418901396be813fa2e5c3f41ffa449
|
67f0842047865134e9042110dc1ece1080c25522
|
refs/heads/master
| 2020-03-30T08:06:17.784999
| 2019-05-20T15:11:47
| 2019-05-20T15:11:47
| 150,989,705
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 240
|
cpp
|
#include "countrywindow.h"
#include "ui_countrywindow.h"
CountryWindow::CountryWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::CountryWindow)
{
ui->setupUi(this);
}
CountryWindow::~CountryWindow()
{
delete ui;
}
|
[
"timofey.zarenok@gmail.com"
] |
timofey.zarenok@gmail.com
|
246cce8e36168dfcc8ec1e20ff2c59892d826a8a
|
68947aa53a591ffb802a9c62adc2b72a43aab98e
|
/usaco/2_1_hamming_codes.cc
|
f05d368a7053203629ae5a42f9db1954c4c6690b
|
[] |
no_license
|
disylh/Norwegian-Wood
|
219be85447ae4b4d9988eabf4c08c43a32187e6a
|
c73794ab83d5228bd772a7b73a5cd1dfe83d9d81
|
refs/heads/master
| 2016-08-03T18:08:33.460623
| 2015-07-30T04:07:56
| 2015-07-30T04:07:56
| 33,709,396
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,575
|
cc
|
/*
ID: disylh2
PROG: hamming
LANG: C++11
*/
#include <climits>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cstring>
using namespace std;
template <typename T, typename TT>
ostream &operator<<(ostream &s, pair<T, TT> t) {
return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream &operator<<(ostream &s, vector<T> t) {
for (int i = 0; i < t.size(); ++i) s << t[i] << " ";
return s;
}
int hamming_dist(int a, int b) {
a ^= b;
int ret = 0;
while (a) {
++ret;
a &= a - 1;
}
return ret;
}
bool dfs(int n, int d, vector<bool> &m, int curr) {
int bm = m.size();
bool good = true;
for (int i = 0; i < curr; ++i) {
if (m[i] && hamming_dist(i, curr) < d) {
good = false;
}
}
if (!good) return false;
m[curr] = true;
--n;
if (n == 0) return true;
for (int i = curr + 1; i < bm; ++i) {
if (dfs(n, d, m, i)) {
return true;
}
}
return false;
}
void solve(int n, int b, int d, ofstream &fout) {
int bm = (1 << (b + 1)) - 1;
vector<bool> m(bm + 1, false);
dfs(n, d, m, 0);
for (int i = 0, c = 0; i <= bm; ++i) {
if (!m[i]) continue;
if (c % 10 == 0) fout << i;
else if (c % 10 == 9 || c == n - 1) fout << " " << i << endl;
else fout << " " << i;
++c;
}
}
int main() {
ofstream fout ("hamming.out");
ifstream fin ("hamming.in");
int n, b, d;
fin >> n >> b >> d;
fin.close();
solve(n, b, d, fout);
fout.close();
return 0;
}
|
[
"disylh@gmail.com"
] |
disylh@gmail.com
|
8426901bd6bef8606daf0a3be284a4332bea5305
|
3e56e79a73e26699d93b4473fdb22bdd61d16701
|
/src/test/univalue_tests.cpp
|
bb7baf5d893941a76a744c1d864d452d14871268
|
[
"MIT"
] |
permissive
|
NewCapital/FIX-Core
|
a7cc5f3c72139b6355b62fc9f5cb13d1ae503abc
|
62cfa630e40e126782d8662b250c87cd99288507
|
refs/heads/master
| 2022-09-21T16:27:42.191621
| 2022-09-18T12:44:10
| 2022-09-18T12:44:10
| 189,651,748
| 5
| 9
|
MIT
| 2020-06-16T21:28:34
| 2019-05-31T20:02:08
|
C++
|
UTF-8
|
C++
| false
| false
| 8,945
|
cpp
|
// Copyright 2014 BitPay, Inc.
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2019 The FIX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <stdint.h>
#include <vector>
#include <string>
#include <map>
#include <univalue.h>
#include <boost/test/unit_test.hpp>
using namespace std;
BOOST_AUTO_TEST_SUITE(univalue_tests)
BOOST_AUTO_TEST_CASE(univalue_constructor)
{
UniValue v1;
BOOST_CHECK(v1.isNull());
UniValue v2(UniValue::VSTR);
BOOST_CHECK(v2.isStr());
UniValue v3(UniValue::VSTR, "foo");
BOOST_CHECK(v3.isStr());
BOOST_CHECK_EQUAL(v3.getValStr(), "foo");
UniValue numTest;
BOOST_CHECK(numTest.setNumStr("82"));
BOOST_CHECK(numTest.isNum());
BOOST_CHECK_EQUAL(numTest.getValStr(), "82");
uint64_t vu64 = 82;
UniValue v4(vu64);
BOOST_CHECK(v4.isNum());
BOOST_CHECK_EQUAL(v4.getValStr(), "82");
int64_t vi64 = -82;
UniValue v5(vi64);
BOOST_CHECK(v5.isNum());
BOOST_CHECK_EQUAL(v5.getValStr(), "-82");
int vi = -688;
UniValue v6(vi);
BOOST_CHECK(v6.isNum());
BOOST_CHECK_EQUAL(v6.getValStr(), "-688");
double vd = -7.21;
UniValue v7(vd);
BOOST_CHECK(v7.isNum());
BOOST_CHECK_EQUAL(v7.getValStr(), "-7.21");
string vs("yawn");
UniValue v8(vs);
BOOST_CHECK(v8.isStr());
BOOST_CHECK_EQUAL(v8.getValStr(), "yawn");
const char *vcs = "zappa";
UniValue v9(vcs);
BOOST_CHECK(v9.isStr());
BOOST_CHECK_EQUAL(v9.getValStr(), "zappa");
}
BOOST_AUTO_TEST_CASE(univalue_typecheck)
{
UniValue v1;
BOOST_CHECK(v1.setNumStr("1"));
BOOST_CHECK(v1.isNum());
BOOST_CHECK_THROW(v1.get_bool(), runtime_error);
UniValue v2;
BOOST_CHECK(v2.setBool(true));
BOOST_CHECK_EQUAL(v2.get_bool(), true);
BOOST_CHECK_THROW(v2.get_int(), runtime_error);
UniValue v3;
BOOST_CHECK(v3.setNumStr("32482348723847471234"));
BOOST_CHECK_THROW(v3.get_int64(), runtime_error);
BOOST_CHECK(v3.setNumStr("1000"));
BOOST_CHECK_EQUAL(v3.get_int64(), 1000);
UniValue v4;
BOOST_CHECK(v4.setNumStr("2147483648"));
BOOST_CHECK_EQUAL(v4.get_int64(), 2147483648);
BOOST_CHECK_THROW(v4.get_int(), runtime_error);
BOOST_CHECK(v4.setNumStr("1000"));
BOOST_CHECK_EQUAL(v4.get_int(), 1000);
BOOST_CHECK_THROW(v4.get_str(), runtime_error);
BOOST_CHECK_EQUAL(v4.get_real(), 1000);
BOOST_CHECK_THROW(v4.get_array(), runtime_error);
BOOST_CHECK_THROW(v4.getKeys(), runtime_error);
BOOST_CHECK_THROW(v4.getValues(), runtime_error);
BOOST_CHECK_THROW(v4.get_obj(), runtime_error);
UniValue v5;
BOOST_CHECK(v5.read("[true, 10]"));
BOOST_CHECK_NO_THROW(v5.get_array());
std::vector<UniValue> vals = v5.getValues();
BOOST_CHECK_THROW(vals[0].get_int(), runtime_error);
BOOST_CHECK_EQUAL(vals[0].get_bool(), true);
BOOST_CHECK_EQUAL(vals[1].get_int(), 10);
BOOST_CHECK_THROW(vals[1].get_bool(), runtime_error);
}
BOOST_AUTO_TEST_CASE(univalue_set)
{
UniValue v(UniValue::VSTR, "foo");
v.clear();
BOOST_CHECK(v.isNull());
BOOST_CHECK_EQUAL(v.getValStr(), "");
BOOST_CHECK(v.setObject());
BOOST_CHECK(v.isObject());
BOOST_CHECK_EQUAL(v.size(), 0);
BOOST_CHECK_EQUAL(v.getType(), UniValue::VOBJ);
BOOST_CHECK(v.empty());
BOOST_CHECK(v.setArray());
BOOST_CHECK(v.isArray());
BOOST_CHECK_EQUAL(v.size(), 0);
BOOST_CHECK(v.setStr("zum"));
BOOST_CHECK(v.isStr());
BOOST_CHECK_EQUAL(v.getValStr(), "zum");
BOOST_CHECK(v.setFloat(-1.01));
BOOST_CHECK(v.isNum());
BOOST_CHECK_EQUAL(v.getValStr(), "-1.01");
BOOST_CHECK(v.setInt((int)1023));
BOOST_CHECK(v.isNum());
BOOST_CHECK_EQUAL(v.getValStr(), "1023");
BOOST_CHECK(v.setInt((int64_t)-1023LL));
BOOST_CHECK(v.isNum());
BOOST_CHECK_EQUAL(v.getValStr(), "-1023");
BOOST_CHECK(v.setInt((uint64_t)1023ULL));
BOOST_CHECK(v.isNum());
BOOST_CHECK_EQUAL(v.getValStr(), "1023");
BOOST_CHECK(v.setNumStr("-688"));
BOOST_CHECK(v.isNum());
BOOST_CHECK_EQUAL(v.getValStr(), "-688");
BOOST_CHECK(v.setBool(false));
BOOST_CHECK_EQUAL(v.isBool(), true);
BOOST_CHECK_EQUAL(v.isTrue(), false);
BOOST_CHECK_EQUAL(v.isFalse(), true);
BOOST_CHECK_EQUAL(v.getBool(), false);
BOOST_CHECK(v.setBool(true));
BOOST_CHECK_EQUAL(v.isBool(), true);
BOOST_CHECK_EQUAL(v.isTrue(), true);
BOOST_CHECK_EQUAL(v.isFalse(), false);
BOOST_CHECK_EQUAL(v.getBool(), true);
BOOST_CHECK(!v.setNumStr("zombocom"));
BOOST_CHECK(v.setNull());
BOOST_CHECK(v.isNull());
}
BOOST_AUTO_TEST_CASE(univalue_array)
{
UniValue arr(UniValue::VARR);
UniValue v((int64_t)1023LL);
BOOST_CHECK(arr.push_back(v));
string vStr("zippy");
BOOST_CHECK(arr.push_back(vStr));
const char *s = "pippy";
BOOST_CHECK(arr.push_back(s));
vector<UniValue> vec;
v.setStr("boing");
vec.push_back(v);
v.setStr("going");
vec.push_back(v);
BOOST_CHECK(arr.push_backV(vec));
BOOST_CHECK_EQUAL(arr.empty(), false);
BOOST_CHECK_EQUAL(arr.size(), 5);
BOOST_CHECK_EQUAL(arr[0].getValStr(), "1023");
BOOST_CHECK_EQUAL(arr[1].getValStr(), "zippy");
BOOST_CHECK_EQUAL(arr[2].getValStr(), "pippy");
BOOST_CHECK_EQUAL(arr[3].getValStr(), "boing");
BOOST_CHECK_EQUAL(arr[4].getValStr(), "going");
BOOST_CHECK_EQUAL(arr[999].getValStr(), "");
arr.clear();
BOOST_CHECK(arr.empty());
BOOST_CHECK_EQUAL(arr.size(), 0);
}
BOOST_AUTO_TEST_CASE(univalue_object)
{
UniValue obj(UniValue::VOBJ);
string strKey, strVal;
UniValue v;
strKey = "age";
v.setInt(100);
BOOST_CHECK(obj.pushKV(strKey, v));
strKey = "first";
strVal = "John";
BOOST_CHECK(obj.pushKV(strKey, strVal));
strKey = "last";
const char *cVal = "Smith";
BOOST_CHECK(obj.pushKV(strKey, cVal));
strKey = "distance";
BOOST_CHECK(obj.pushKV(strKey, (int64_t) 25));
strKey = "time";
BOOST_CHECK(obj.pushKV(strKey, (uint64_t) 3600));
strKey = "calories";
BOOST_CHECK(obj.pushKV(strKey, (int) 12));
strKey = "temperature";
BOOST_CHECK(obj.pushKV(strKey, (double) 90.012));
UniValue obj2(UniValue::VOBJ);
BOOST_CHECK(obj2.pushKV("cat1", 9000));
BOOST_CHECK(obj2.pushKV("cat2", 12345));
BOOST_CHECK(obj.pushKVs(obj2));
BOOST_CHECK_EQUAL(obj.empty(), false);
BOOST_CHECK_EQUAL(obj.size(), 9);
BOOST_CHECK_EQUAL(obj["age"].getValStr(), "100");
BOOST_CHECK_EQUAL(obj["first"].getValStr(), "John");
BOOST_CHECK_EQUAL(obj["last"].getValStr(), "Smith");
BOOST_CHECK_EQUAL(obj["distance"].getValStr(), "25");
BOOST_CHECK_EQUAL(obj["time"].getValStr(), "3600");
BOOST_CHECK_EQUAL(obj["calories"].getValStr(), "12");
BOOST_CHECK_EQUAL(obj["temperature"].getValStr(), "90.012");
BOOST_CHECK_EQUAL(obj["cat1"].getValStr(), "9000");
BOOST_CHECK_EQUAL(obj["cat2"].getValStr(), "12345");
BOOST_CHECK_EQUAL(obj["nyuknyuknyuk"].getValStr(), "");
BOOST_CHECK(obj.exists("age"));
BOOST_CHECK(obj.exists("first"));
BOOST_CHECK(obj.exists("last"));
BOOST_CHECK(obj.exists("distance"));
BOOST_CHECK(obj.exists("time"));
BOOST_CHECK(obj.exists("calories"));
BOOST_CHECK(obj.exists("temperature"));
BOOST_CHECK(obj.exists("cat1"));
BOOST_CHECK(obj.exists("cat2"));
BOOST_CHECK(!obj.exists("nyuknyuknyuk"));
map<string, UniValue::VType> objTypes;
objTypes["age"] = UniValue::VNUM;
objTypes["first"] = UniValue::VSTR;
objTypes["last"] = UniValue::VSTR;
objTypes["distance"] = UniValue::VNUM;
objTypes["time"] = UniValue::VNUM;
objTypes["calories"] = UniValue::VNUM;
objTypes["temperature"] = UniValue::VNUM;
objTypes["cat1"] = UniValue::VNUM;
objTypes["cat2"] = UniValue::VNUM;
BOOST_CHECK(obj.checkObject(objTypes));
objTypes["cat2"] = UniValue::VSTR;
BOOST_CHECK(!obj.checkObject(objTypes));
obj.clear();
BOOST_CHECK(obj.empty());
BOOST_CHECK_EQUAL(obj.size(), 0);
}
static const char *json1 =
"[1.10000000,{\"key1\":\"str\",\"key2\":800,\"key3\":{\"name\":\"martian\"}}]";
BOOST_AUTO_TEST_CASE(univalue_readwrite)
{
UniValue v;
BOOST_CHECK(v.read(json1));
string strJson1(json1);
BOOST_CHECK(v.read(strJson1));
BOOST_CHECK(v.isArray());
BOOST_CHECK_EQUAL(v.size(), 2);
BOOST_CHECK_EQUAL(v[0].getValStr(), "1.10000000");
UniValue obj = v[1];
BOOST_CHECK(obj.isObject());
BOOST_CHECK_EQUAL(obj.size(), 3);
BOOST_CHECK(obj["key1"].isStr());
BOOST_CHECK_EQUAL(obj["key1"].getValStr(), "str");
BOOST_CHECK(obj["key2"].isNum());
BOOST_CHECK_EQUAL(obj["key2"].getValStr(), "800");
BOOST_CHECK(obj["key3"].isObject());
BOOST_CHECK_EQUAL(strJson1, v.write());
}
BOOST_AUTO_TEST_SUITE_END()
|
[
"yurykk@gmail.com"
] |
yurykk@gmail.com
|
2da7f153be6d1c73134827b69bf2a4724eb11ca1
|
98e8c9a09db9d06237d6ca3f42dc4cd47bc03f72
|
/4_trees_and_graphs/4_4_create_linked_list_nodes_at_each_depth/create_linked_list_nodes_at_each_depth.cc
|
48dc3b676a66dec54006ae43cc8a52da4fbfe873
|
[] |
no_license
|
phad/ctci
|
de5b5f8338fd110b7dc2b92be0f6eac84080e7d5
|
08ab4396a3215bba7dffaee5726d5c9aa22bd448
|
refs/heads/master
| 2021-01-23T12:18:13.193728
| 2013-10-22T12:50:25
| 2013-10-22T12:50:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,772
|
cc
|
#include <iostream>
#include <sstream>
#include <vector>
#include "../tree.h"
using namespace std;
struct ListElement {
const Node* node;
ListElement* next;
ListElement(const Node* n) : node(n), next(NULL) {}
};
void add(const Node* val, ListElement*& head, ListElement*& prev) {
ListElement* elem = new ListElement(val);
if (!head) {
head = elem;
}
if (prev) {
prev->next = elem;
}
prev = elem;
}
vector<ListElement*> bfsTreeAsLists(const BST& bst) {
vector<ListElement*> result;
// Seed with root
result.push_back( new ListElement(&bst.root()) );
bool done = false;
ListElement* prevLevel = result.back();
while(!done) {
ListElement* head = NULL;
ListElement* prev = NULL;
while(prevLevel) {
ListElement* elem = NULL;
if (prevLevel->node->left_) {
add(prevLevel->node->left_, head, prev);
}
if (prevLevel->node->right_) {
add(prevLevel->node->right_, head, prev);
}
prevLevel = prevLevel->next;
}
if (head) {
result.push_back(head);
prevLevel = head;
} else {
done = true;
}
}
return result;
}
int main(int argc, char** argv) {
BST* tree = new BST;
int vals[] = {4, 2, 1, 3, 6, 5, 7};
for (int idx = 0; idx < sizeof(vals)/sizeof(int); ++idx) {
ostringstream oss;
oss << vals[idx];
tree->put(oss.str(), vals[idx]);
}
cout << *tree << endl;
vector<ListElement*> lists = bfsTreeAsLists(*tree);
for (vector<ListElement*>::iterator it = lists.begin(); it != lists.end(); ++it) {
ListElement* head = *it;
while(head) {
cout << head->node->value_ << ",";
ListElement* next = head->next;
delete head;
head = next;
}
cout << endl;
}
delete tree;
return 0;
}
|
[
"paul@songkick.com"
] |
paul@songkick.com
|
98091cd07fad6b9668357b33827546e2a2d59ed6
|
b26412d3f25029ff7e13d286491d1794120e03de
|
/BattleTank/Source/BattleTank/Public/TankTurret.h
|
abbfca1dabb5b17b214a5a6e7165add05653d5c1
|
[] |
no_license
|
UnrealLectures/Tanks
|
2995264c070a5fbaf5d91a37c4348917cb79110b
|
2f3dbdd9e4193aa57518ad7fccd98e64527812c4
|
refs/heads/master
| 2023-01-05T07:53:09.632147
| 2020-11-04T16:53:54
| 2020-11-04T16:53:54
| 261,862,926
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 473
|
h
|
// Copyright Jeff Brown 2020.
#pragma once
#include "CoreMinimal.h"
#include "Components/StaticMeshComponent.h"
#include "TankTurret.generated.h"
UCLASS(meta = (BlueprintSpawnableComponent))
class BATTLETANK_API UTankTurret : public UStaticMeshComponent
{
GENERATED_BODY()
public:
// -1 is max downward speed +1 is max upward speed
void Rotate(float RelativeSpeed);
private:
UPROPERTY(EditDefaultsOnly, Category = "Setup")
float MaxDegreesPerSecond = 25;
};
|
[
"jeffjjbrown@gmail.com"
] |
jeffjjbrown@gmail.com
|
71582aeaaf4a11145869d373401da8096434fd39
|
c6b1c6d11d54bb594ae3df391456a6c4af3014d2
|
/Inc/WAFPubMFCdll/UltimateGrid/ugsidehd.h
|
30190735fb14aaaab0356801178c5127155f7256
|
[] |
no_license
|
Grayun/wjtPub
|
95bebaee6d538b1b581bfafbe09692bd0cc9636c
|
f7486dfee8959b2e370afd9f94b449908714b018
|
refs/heads/master
| 2021-06-24T14:49:27.896622
| 2017-08-20T23:58:28
| 2017-08-20T23:58:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,485
|
h
|
/*************************************************************************
Class Declaration : CUGSideHdg
**************************************************************************
Source file : ugsidehd.cpp
Header file : ugsidehd.h
// This software along with its related components, documentation and files ("The Libraries")
// is ?1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is
// governed by a software license agreement ("Agreement"). Copies of the Agreement are
// available at The Code Project (www.codeproject.com), as part of the package you downloaded
// to obtain this file, or directly from our office. For a copy of the license governing
// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900.
Purpose
The side heading (CUGSideHdg) object/window
is responsible to draw cells and handle
user's actions on the rows heading.
Keay features:
- This class provides ability to resize
rows height with the mouse.
- as well as the width of the entire
side heading and columns it contains
- mouse and keyboard messages are forwarded
to the CUGCtrl class as notifications.
OnSH_...
*************************************************************************/
#ifndef _ugsidehd_H_
#define _ugsidehd_H_
class UG_CLASS_DECL CUGSideHdg : public CWnd
{
// Construction
public:
CUGSideHdg();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CUGSideHdg)
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CUGSideHdg();
// Generated message map functions
protected:
//{{AFX_MSG(CUGSideHdg)
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg LRESULT OnHelpHitTest(WPARAM wParam, LPARAM lParam);
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
BOOL ToolTipNeedText( UINT id, NMHDR* pTTTStruct, LRESULT* pResult );
virtual INT_PTR OnToolHitTest( CPoint point, TOOLINFO *pTI ) const;
protected:
friend CUGCtrl;
CUGCtrl * m_ctrl;
CUGGridInfo * m_GI; //pointer to the grid information
CUGCell m_cell; //general purpose cell class
CUGDrawHint m_drawHint; //cell drawing hints
long m_bottomRow; //the row drawn at the bottom
int m_isSizing; //sizing flag
int m_canSize; //sizing flag
int m_colOrRowSizing; // 0 - col 1- row
long m_sizingColRow; // column or row number being sized
int m_sizingStartSize; // original col/row width/height
int m_sizingStartPos; // original starting mouse position
int m_sizingStartWidth;//original side heading total width
int m_sizingNumRowsDown; //number of rows from top when size started
RECT m_focusRect; //focus rect for column sizing option
int GetCellRect(int *col,long *row,RECT *rect);
int GetCellRect(int col,long row,RECT *rect);
int GetCellFromPoint(CPoint *point,int *col,long *row,RECT *rect);
void DrawCellsIntern(CDC *dc);
public:
int GetSHColWidth(int col);
//internal functions
void Update();
void Moved();
};
#endif // _ugsidehd_H_
|
[
"wangjiantaoafei@163.com"
] |
wangjiantaoafei@163.com
|
77033727c9fd72150f6952f34012829080cf2ca8
|
a1df310fb8e5881d91dde899c0edcedfbedfc487
|
/lecture1-3/chat_pkg/src/listener.cpp
|
66bfae024760a4071065a8611826b67642a000cb
|
[
"MIT"
] |
permissive
|
JerryRain/ros_tutorial
|
7757bf14fe01a2ef6beadc0bc3dc79ad04f79eb3
|
9e404ba804948164b63515aa829dd55ea16a0ea3
|
refs/heads/master
| 2022-11-16T12:08:08.808824
| 2020-07-03T05:31:14
| 2020-07-03T05:31:14
| 276,798,401
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 525
|
cpp
|
#include "ros/ros.h"
#include "std_msgs/String.h"
// Topic messages callback
void chatterCallback(const std_msgs::String::ConstPtr& msg)
{
ROS_INFO("I heard: [%s]", msg->data.c_str());
}
int main(int argc, char **argv)
{
// Initiate a new ROS node named "listener"
ros::init(argc, argv, "listener");
ros::NodeHandle node;
// Subscribe to a given topic
ros::Subscriber sub = node.subscribe("chatter", 1000, chatterCallback);
// Enter a loop, pumping callbacks
ros::spin();
return 0;
}
|
[
"1617124526@qq.com"
] |
1617124526@qq.com
|
4c5cf9d8522acac292ffa78f1f08d648d58cb487
|
8d5fe26b90cf4115cb6ba1c702502b507cf4f40b
|
/iPrintableDocumentDeal/MsOffice/Excel2010/CSheetViews.h
|
3491ff243bb65f0ad56595ac90709ecbac93e544
|
[] |
no_license
|
radtek/vs2015PackPrj
|
c6c6ec475014172c1dfffab98dd03bd7e257b273
|
605b49fab23cb3c4a427d48080ffa5e0807d79a7
|
refs/heads/master
| 2022-04-03T19:50:37.865876
| 2020-01-16T10:09:37
| 2020-01-16T10:09:37
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 1,705
|
h
|
// 从类型库向导中用“添加类”创建的计算机生成的 IDispatch 包装类
#import "C:\\Program Files (x86)\\Microsoft Office\\Office14\\EXCEL.EXE" no_namespace
// CSheetViews 包装类
class CSheetViews : public COleDispatchDriver
{
public:
CSheetViews(){} // 调用 COleDispatchDriver 默认构造函数
CSheetViews(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CSheetViews(const CSheetViews& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// 属性
public:
// 操作
public:
// SheetViews 方法
public:
LPDISPATCH get_Application()
{
LPDISPATCH result;
InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
long get_Creator()
{
long result;
InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH get_Parent()
{
LPDISPATCH result;
InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
long get_Count()
{
long result;
InvokeHelper(0x76, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPUNKNOWN _NewEnum()
{
LPUNKNOWN result;
InvokeHelper(0xfffffffc, DISPATCH_METHOD, VT_UNKNOWN, (void*)&result, NULL);
return result;
}
LPDISPATCH get_Item(VARIANT& Index)
{
LPDISPATCH result;
static BYTE parms[] = VTS_VARIANT ;
InvokeHelper(0xaa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, &Index);
return result;
}
LPDISPATCH get__Default(VARIANT& Index)
{
LPDISPATCH result;
static BYTE parms[] = VTS_VARIANT ;
InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms, &Index);
return result;
}
// SheetViews 属性
public:
};
|
[
"1007482035@qq.com"
] |
1007482035@qq.com
|
ef85686107876cc2fc3ef0b9f48724b4173aeb8d
|
8706300115e7723816105361f1a6d11a1fb9706a
|
/PAT_1/HYDRA/include/hwallcalibrater.h
|
467595ced58a3828460f7725f71ae6f972b93021
|
[] |
no_license
|
HADES-Cracovia/pp-3.5GeV
|
99b97281f68c68f3c39761643f00c0f6b3585d52
|
ccdad2e7f22430973fb45b5214744cdb6965ab68
|
refs/heads/master
| 2021-12-29T03:54:08.231975
| 2021-12-16T15:50:04
| 2021-12-16T15:50:04
| 142,860,456
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 951
|
h
|
//*-- AUTHOR Bjoern Spruck
//*-- created : 24.03.06
// Modified for Wall by M.Golubeva 01.11.2006
#ifndef HWALLCALIBRATER_H
#define HWALLCALIBRATER_H
#include "hreconstructor.h"
#include "hlocation.h"
class HCategory;
class HIterator;
class HWallCalPar;
class HWallCalibrater : public HReconstructor {
protected:
HCategory *rawCat; //! pointer to the raw data
HCategory *calCat; //! pointer to the cal data
HIterator *iter; //! iterator on raw data.
HLocation loc; //! location for new cal object
HWallCalPar* pWallCalPar; //! calibration parameters
public:
HWallCalibrater(void);
HWallCalibrater(const Text_t* name,const Text_t* title);
~HWallCalibrater(void);
Bool_t init(void);
Bool_t finalize(void) { return kTRUE; }
Int_t execute(void);
public:
ClassDef(HWallCalibrater,0) // Calibrater raw->cal for WALL data
};
#endif /* !HWALLCALIBRATER_H */
|
[
"k.nowakowski@doctoral.uj.edu.pl"
] |
k.nowakowski@doctoral.uj.edu.pl
|
b8bf10c603208d015ad336a43bc20f1744d203a4
|
8c35f33b5438cee71cd78c1c4db85e6b00cdbd60
|
/Overlay/FOverlay.cpp
|
cbfa70cd6587268b1f151de6af99e0598d29d21d
|
[
"Unlicense"
] |
permissive
|
HeroofHell/FRust-cheat
|
099273b5ec4525350de98ba7609e48284b1ae531
|
db5fdb0afd28d9e9712d2ebdfa0543088da87b0c
|
refs/heads/master
| 2020-11-30T22:19:15.396542
| 2019-12-09T22:10:35
| 2019-12-09T22:10:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,296
|
cpp
|
#include "FOverlay.h"
static HWND win;
/*
Window functions
*/
auto FOverlay::window_set_style() -> void {
int i = 0;
i = (int)GetWindowLong(win, -20);
SetWindowLongPtr(win, -20, (LONG_PTR)(i | 0x20));
}
auto FOverlay::window_set_transparency()-> void {
MARGINS margin;
UINT opacity_flag, color_key_flag, color_key = 0;
UINT opacity = 0;
margin.cyBottomHeight = -1;
margin.cxLeftWidth = -1;
margin.cxRightWidth = -1;
margin.cyTopHeight = -1;
DwmExtendFrameIntoClientArea(win, &margin);
opacity_flag = 0x02;
color_key_flag = 0x01;
color_key = 0x000000;
opacity = 0xFF;
SetLayeredWindowAttributes(win, color_key, opacity, opacity_flag);
}
auto FOverlay::window_set_top_most()-> void {
SetWindowPos(win, HWND_TOPMOST, 0, 0, 0, 0, 0x0002 | 0x0001);
}
auto FOverlay::retrieve_window()->HWND {
return win;
}
// Hijacking method down here.
auto FOverlay::window_init()->BOOL {
win = FindWindow("CEF-OSC-WIDGET", "NVIDIA GeForce Overlay");
if (!win)
return FALSE;
FOverlay::window_set_style();
FOverlay::window_set_transparency();
FOverlay::window_set_top_most();
ShowWindow(win, SW_SHOW);
return TRUE;
}
/*
Overlay functions
*/
ID2D1Factory* d2d_factory;
ID2D1HwndRenderTarget* tar;
IDWriteFactory* write_factory;
ID2D1SolidColorBrush* brush;
ID2D1SolidColorBrush* red_brush;
IDWriteTextFormat* format;
auto FOverlay::d2d_shutdown() ->void {
// Release
tar->Release();
write_factory->Release();
brush->Release();
d2d_factory->Release();
}
auto FOverlay::init_d2d()-> BOOL {
HRESULT ret;
RECT rc;
// Initialize D2D here
ret = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &d2d_factory);
if (FAILED(ret))
return FALSE;
ret = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), (IUnknown * *)(&write_factory));
if (FAILED(ret))
return FALSE;
write_factory->CreateTextFormat(L"Consolas", NULL, DWRITE_FONT_WEIGHT_REGULAR, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL,
13.0,
L"en-us",
&format);
GetClientRect(FOverlay::retrieve_window(), &rc);
ret = d2d_factory->CreateHwndRenderTarget(D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT, D2D1::PixelFormat(DXGI_FORMAT_UNKNOWN, D2D1_ALPHA_MODE_PREMULTIPLIED)), D2D1::HwndRenderTargetProperties(FOverlay::retrieve_window(), D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top)), &tar);
if (FAILED(ret))
return FALSE;
tar->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::White), &brush);
tar->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::Red), &red_brush);
return TRUE;
}
auto FOverlay::begin_scene()-> void {
tar->BeginDraw();
}
auto FOverlay::end_scene()-> void {
tar->EndDraw();
}
auto FOverlay::clear_scene()-> void {
tar->Clear();
}
auto FOverlay::draw_text(int x, int y, const char* str, ...)-> void {
char buf[4096];
int len = 0;
wchar_t b[256];
// if (!draw) // no need for it.
// return;
va_list arg_list;
va_start(arg_list, str);
vsnprintf(buf, sizeof(buf), str, arg_list);
va_end(arg_list);
len = strlen(buf);
mbstowcs(b, buf, len);
tar->DrawText(b, len, format, D2D1::RectF(x, y, 1920, 1080), brush, D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE_NATURAL);
}
auto FOverlay::clear_screen()-> void {
FOverlay::begin_scene();
FOverlay::clear_scene();
FOverlay::end_scene();
}
|
[
"tonytheone0@gmail.com"
] |
tonytheone0@gmail.com
|
be98ea7382301661953abc09419c7c3589cdad8f
|
52cbf6068b0005d64172460ff7082e4c71f89e5e
|
/c++/231_power_of_two.cpp
|
d31fd96dd0800aa433b29e2f5f2cdffab75d668d
|
[] |
no_license
|
hatlonely/leetcode-2018
|
d2efe08b86871735b1c48697adb9347501df7c08
|
57217059f04898cb41b76682e94f401ee4839d05
|
refs/heads/master
| 2021-12-09T02:03:38.983512
| 2021-10-31T03:52:23
| 2021-10-31T03:52:23
| 144,447,729
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 461
|
cpp
|
#include <gtest/gtest.h>
#include <iostream>
#include <numeric>
class Solution {
public:
bool isPowerOfTwo(int n) {
if (n == 0 || n == std::numeric_limits<int>::min()) {
return false;
}
return (n & n - 1) == 0;
}
};
int main(int argc, char* argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
TEST(test, case1) {
Solution solution;
EXPECT_TRUE(solution.isPowerOfTwo(32));
}
|
[
"hatlonely@gmail.com"
] |
hatlonely@gmail.com
|
b79a0e09c3c34ff64a4c32269dcffc6ff5c55696
|
e5a44dc0bb4c9eba9b73147d12d237120d2368f1
|
/HomeAssignment/2DCarGameAssignment/BuildiOS/Classes/Native/Assembly-CSharp.cpp
|
c93c3e01a8304c67f635023fce420e6c14689d7b
|
[] |
no_license
|
BeliBvana/DamjanVelichkovski_SWD4.2B_Assignment
|
7a2bd9ec3e072ba63d0310edaad97537e9256dfb
|
a56cf3874967c27c4535e4df9b20313d3168cba3
|
refs/heads/main
| 2023-02-25T16:32:00.241507
| 2021-01-20T20:02:46
| 2021-01-20T20:02:46
| 322,110,603
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 306,728
|
cpp
|
#include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
template <typename T1>
struct VirtActionInvoker1
{
typedef void (*Action)(void*, T1, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
((Action)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R>
struct InterfaceFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct InterfaceActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
// BackgroundScroller
struct BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01;
// System.Reflection.Binder
struct Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30;
// DamageDealer
struct DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6;
// Explosion
struct Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED;
// UnityEngine.UI.FontData
struct FontData_t0F1E9B3ED8136CD40782AC9A6AFB69CAD127C738;
// GameSession
struct GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9;
// System.Collections.IDictionary
struct IDictionary_t99871C56B8EC2452AC5C4CF3831695E617B89D3A;
// Level
struct Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93;
// System.Reflection.MemberFilter
struct MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81;
// MusicPlayer
struct MusicPlayer_tED49C79A2679189A904E6BC22CD55275F67D4D7D;
// Obstracle
struct Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F;
// ObstraclePathing
struct ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA;
// ObstracleSpawner
struct ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C;
// Player
struct Player_t5689617909B48F7640EA0892D85C92C13CC22C6F;
// UnityEngine.UI.RectMask2D
struct RectMask2D_tD909811991B341D752E4C978C89EFB80FA7A2B15;
// System.Runtime.Serialization.SafeSerializationManager
struct SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F;
// Shredder
struct Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8;
// UnityEngine.UI.VertexHelper
struct VertexHelper_tDE8B67D3B076061C4F8DF325B0D63ED2E5367E55;
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5;
// WaveConfig
struct WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1;
// healthDisplay
struct healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960;
// scoreDisplay
struct scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE;
// UnityEngine.AudioClip/PCMReaderCallback
struct PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B;
// UnityEngine.AudioClip/PCMSetPositionCallback
struct PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C;
// UnityEngine.Camera/CameraCallback
struct CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D;
// Level/<WaitAndLoad2>d__7
struct U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043;
// Level/<WaitAndLoad>d__6
struct U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835;
// UnityEngine.UI.MaskableGraphic/CullStateChangedEvent
struct CullStateChangedEvent_t9B69755DEBEF041C3CC15C3604610BDD72856BD4;
// ObstracleSpawner/<SpawnAllEnemiesInWave>d__4
struct U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D;
// ObstracleSpawner/<SpawnAllWaves>d__5
struct U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8;
// ObstracleSpawner/<Start>d__3
struct U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5;
// System.Collections.Generic.List`1<WaveConfig>
struct List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0;
// System.Collections.Generic.List`1<System.Object>
struct List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5;
// System.Collections.Generic.List`1<UnityEngine.Transform>
struct List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0;
// UnityEngine.UI.CoroutineTween.TweenRunner`1<UnityEngine.UI.CoroutineTween.ColorTween>
struct TweenRunner_1_tD84B9953874682FCC36990AF2C54D748293908F3;
// UnityEngine.AudioClip
struct AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE;
// UnityEngine.Camera
struct Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C;
// UnityEngine.Canvas
struct Canvas_t2B7E56B7BDC287962E092755372E214ACB6393EA;
// UnityEngine.CanvasRenderer
struct CanvasRenderer_tCF8ABE659F7C3A6ED0D99A988D0BDFB651310F0E;
// System.Char[]
struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34;
// UnityEngine.Collider2D
struct Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722;
// UnityEngine.Component
struct Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684;
// UnityEngine.Coroutine
struct Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7;
// UnityEngine.GameObject
struct GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319;
// GameSession[]
struct GameSessionU5BU5D_t61574D5AF894B8E93C237EA134E0CF350A34619D;
// System.Collections.IEnumerator
struct IEnumerator_t5956F3AFB7ECF1117E3BC5890E7FC7B7F7A04105;
// System.IntPtr[]
struct IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6;
// UnityEngine.Material
struct Material_t8927C00353A72755313F046D0CE85178AE8218EE;
// UnityEngine.Mesh
struct Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6;
// UnityEngine.MonoBehaviour
struct MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A;
// System.NotSupportedException
struct NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339;
// UnityEngine.Object
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A;
// System.Object[]
struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE;
// UnityEngine.Object[]
struct ObjectU5BU5D_t1256A8B00BB71C7F582BF08257BE4F826FF64873;
// UnityEngine.RectTransform
struct RectTransform_t8A6A306FB29A6C8C22010CF9040E319753571072;
// UnityEngine.Renderer
struct Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C;
// UnityEngine.Rigidbody2D
struct Rigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5;
// UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A;
// System.Diagnostics.StackTrace[]
struct StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971;
// System.String
struct String_t;
// UnityEngine.UI.Text
struct Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1;
// UnityEngine.TextGenerator
struct TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70;
// UnityEngine.Texture2D
struct Texture2D_t9B604D0D8E28032123641A7E7338FA872E2698BF;
// UnityEngine.Transform
struct Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1;
// UnityEngine.Transform[]
struct TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D;
// System.Type
struct Type_t;
// System.Type[]
struct TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755;
// UnityEngine.UIVertex[]
struct UIVertexU5BU5D_tE3D523C48DFEBC775876720DE2539A79FB7E5E5A;
// UnityEngine.Events.UnityAction
struct UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099;
// UnityEngine.Vector2[]
struct Vector2U5BU5D_tE0F58A2D6D8592B5EC37D9CDEF09103A02E5D7FA;
// UnityEngine.Vector3[]
struct Vector3U5BU5D_t5FB88EAA33E46838BDC2ABDAEA3E8727491CB9E4;
// UnityEngine.WaitForSeconds
struct WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013;
// WaveConfig[]
struct WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A;
IL2CPP_EXTERN_C RuntimeClass* IDisposable_t099785737FC6A1E3699919A94109383715A8D807_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* IEnumerator_t5956F3AFB7ECF1117E3BC5890E7FC7B7F7A04105_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* Mathf_t4D4AC358D24F6DDC32EC291DDE1DF2C3B752A194_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* SceneManager_tEC9D10ECC0377F8AE5AEEB5A789FFD24364440FA_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C RuntimeClass* WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C String_t* _stringLiteral575921BEB984F47FD5D4CD8DC79BD8243E7B01E3;
IL2CPP_EXTERN_C String_t* _stringLiteral6CD71A63A3B8D6DA177D23E4BF96515CD9256887;
IL2CPP_EXTERN_C String_t* _stringLiteral7F8C014BD4810CC276D0F9F81A1E759C7B098B1E;
IL2CPP_EXTERN_C String_t* _stringLiteralC62B61BC27E509D700023566A09D2AE606BE85A7;
IL2CPP_EXTERN_C String_t* _stringLiteralD29F73EF431FE7BD012138938D3ED217C6A38C17;
IL2CPP_EXTERN_C const RuntimeMethod* Component_GetComponent_TisRenderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C_m436E5B0F17DDEF3CC61F77DEA82B1A92668AF019_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* Component_GetComponent_TisText_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_m2D99AC2081683F963C56EC738451EC0B59B5D137_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* GameObject_GetComponent_TisDamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6_m2C32305EC1E55E718D9BB7321AF27D4231F0664E_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* GameObject_GetComponent_TisExplosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED_m9137649A5BC5D0B72F5766AC2FA647E1D3ABCB78_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* GameObject_GetComponent_TisObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA_mDF330179D9470FCD12B729511DD9EEF8FB18D09C_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* GameObject_GetComponent_TisRigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5_mE749A8DAAB8733CB623A476DC361B88581AF3E40_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* List_1_Add_m7AB707ADE023585729593334A399B3FF485A7982_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* List_1__ctor_mF1D464BA700E6389AEA8AF2F197270F387D9A41F_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* List_1_get_Count_m4972DA385A5D70F06D60432A661E720635EDFEC3_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* List_1_get_Count_m82AF14687C6FA2B1572D859A551E3ADBCBADC3C0_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* List_1_get_Item_mAF23B53788FF4378EB454334302BACF73C67E9AE_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* Object_FindObjectOfType_TisLevel_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93_m715012CCED83C1A1A1AD32A3A09C651792748CD8_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* Object_FindObjectOfType_TisPlayer_t5689617909B48F7640EA0892D85C92C13CC22C6F_m3CAE7179B3FA6FD24CA1F0D12C0043AE34660491_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* Object_FindObjectsOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mB78770BA28598B62C52F073A37CA89FB7FEB94A7_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_IEnumerator_Reset_m3F6ECFC5F94D367E7F0F529EC9C0D9D0E1FBDAE7_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* U3CSpawnAllWavesU3Ed__5_System_Collections_IEnumerator_Reset_m6868A829F5913A2A74C3A131AA21736AE7964950_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* U3CStartU3Ed__3_System_Collections_IEnumerator_Reset_m75E5BBF0FA5110D6DBA8719269E91913F70F8839_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* U3CWaitAndLoad2U3Ed__7_System_Collections_IEnumerator_Reset_m6CB8B5D7A65103393CF8B9D4F0771FBD25FC85D4_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* U3CWaitAndLoadU3Ed__6_System_Collections_IEnumerator_Reset_m16128E71D6312F17A12727D3A2837F7E4D543986_RuntimeMethod_var;
IL2CPP_EXTERN_C const uint32_t BackgroundScroller_Start_mE4167530D769FE00F53556574705AE761E4D6544_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t BackgroundScroller_Update_m4DA04F8EB8FE8ED936C1EAA93EFCB904AA8AA457_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t DamageDealer_Hit_m25098E8BE8713BACB0B71CBCA7638785E013FD2C_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Explosion_ObstracleExplosion_m1650B0A466630C2AA8B7725B217877784151A6B3_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t GameSession_ResetGame_m5AAA74149896637E8655D08CFC4F8FA11F92A152_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t GameSession_SetUpSingleton_m3EBBFD4F49CBAE3FF13F8EE16DF19D53DB43DAA8_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Level_LoadGame_m37B99D4AF36E778ADFCD54326003A392941A32CB_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Level_LoadStartMenu_m1FA3148093140D616278E650D0801420CD5CA9F8_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Level_WaitAndLoad2_mCB8256F7180B8A3D99CBF370866F464BE7A018B6_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Level_WaitAndLoad_m247CF14285F9A3D2A571824CC832485FA1970CCE_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t MusicPlayer_SetUpSingleton_m19A6DE140ED2A0F7B4E06592123C60FC8CCAA60B_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t ObstraclePathing_EnemyMove_m51F6E92DB61E771DB178CE2A23A9CCE8D8999AD7_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t ObstraclePathing_Start_m36AF4E0068F4D8D9CBD079C3B764A200398C6B6C_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t ObstracleSpawner_SpawnAllEnemiesInWave_m8F08495B145475CB6C37803D36A5F1F97310F363_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t ObstracleSpawner_SpawnAllWaves_mF9CF231D029E12A8C0291ED781A58FCA853A2CFE_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t ObstracleSpawner_Start_m4445BD625451105E7CC9D672832B76D3450BDD0B_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Obstracle_ObstacleFire_m7068067A06DAAFF23C302C2E492DDBA7DDC2007B_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Player_Die_m16A200929DBDF9FF88C8191A26327C2CCCC80C19_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Player_Move_mBA49290713053DFE90D02C9B5E38353A71C1E0C8_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Player_OnTriggerEnter2D_mAF357F7244427CB9EADB81B5A6C4F0AF481641D0_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Player_Start_mBD692B64AAC791B93A589E7D3596F36787EAF021_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t Shredder_OnTriggerEnter2D_m8DC73A33305BB3E2FA7ECE4E020A125D5250F2C3_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CSpawnAllEnemiesInWaveU3Ed__4_MoveNext_m374873FB51B0365A671B31E82F7F291455816BEA_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_IEnumerator_Reset_m3F6ECFC5F94D367E7F0F529EC9C0D9D0E1FBDAE7_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CSpawnAllWavesU3Ed__5_MoveNext_m1595EACE9B209188F8FD7ED17EB6DB46719F0C07_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CSpawnAllWavesU3Ed__5_System_Collections_IEnumerator_Reset_m6868A829F5913A2A74C3A131AA21736AE7964950_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CStartU3Ed__3_System_Collections_IEnumerator_Reset_m75E5BBF0FA5110D6DBA8719269E91913F70F8839_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CWaitAndLoad2U3Ed__7_MoveNext_mB135C23E21556E16D40B17A44D8C29ED4840D8CF_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CWaitAndLoad2U3Ed__7_System_Collections_IEnumerator_Reset_m6CB8B5D7A65103393CF8B9D4F0771FBD25FC85D4_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CWaitAndLoadU3Ed__6_MoveNext_m48F672219B01E55CE2859CCC0A8EC0A0527ACC37_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t U3CWaitAndLoadU3Ed__6_System_Collections_IEnumerator_Reset_m16128E71D6312F17A12727D3A2837F7E4D543986_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t WaveConfig_GetWaypoints_m967B53EF4FA329D74809A4A70DD91090E5599D70_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t healthDisplay_Start_m5848A894852C8B3822BD45BF8A6488BCB8EF5AD1_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t scoreDisplay_Start_mEF7A692CE11E2AC4B418A54AADC77FD343D59373_MetadataUsageId;
IL2CPP_EXTERN_C const uint32_t scoreDisplay_Update_mD341F73B26D90D5587CF69605868578D5AE7EC31_MetadataUsageId;
struct Exception_t_marshaled_com;
struct Exception_t_marshaled_pinvoke;
struct GameSessionU5BU5D_t61574D5AF894B8E93C237EA134E0CF350A34619D;
struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE;
struct ObjectU5BU5D_t1256A8B00BB71C7F582BF08257BE4F826FF64873;
IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <Module>
struct U3CModuleU3E_tFDCAFCBB4B3431CFF2DC4D3E03FBFDF54EFF7E9A
{
public:
public:
};
// System.Object
// Level_<WaitAndLoad2>d__7
struct U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 : public RuntimeObject
{
public:
// System.Int32 Level_<WaitAndLoad2>d__7::<>1__state
int32_t ___U3CU3E1__state_0;
// System.Object Level_<WaitAndLoad2>d__7::<>2__current
RuntimeObject * ___U3CU3E2__current_1;
// Level Level_<WaitAndLoad2>d__7::<>4__this
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * ___U3CU3E4__this_2;
public:
inline static int32_t get_offset_of_U3CU3E1__state_0() { return static_cast<int32_t>(offsetof(U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043, ___U3CU3E1__state_0)); }
inline int32_t get_U3CU3E1__state_0() const { return ___U3CU3E1__state_0; }
inline int32_t* get_address_of_U3CU3E1__state_0() { return &___U3CU3E1__state_0; }
inline void set_U3CU3E1__state_0(int32_t value)
{
___U3CU3E1__state_0 = value;
}
inline static int32_t get_offset_of_U3CU3E2__current_1() { return static_cast<int32_t>(offsetof(U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043, ___U3CU3E2__current_1)); }
inline RuntimeObject * get_U3CU3E2__current_1() const { return ___U3CU3E2__current_1; }
inline RuntimeObject ** get_address_of_U3CU3E2__current_1() { return &___U3CU3E2__current_1; }
inline void set_U3CU3E2__current_1(RuntimeObject * value)
{
___U3CU3E2__current_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E2__current_1), (void*)value);
}
inline static int32_t get_offset_of_U3CU3E4__this_2() { return static_cast<int32_t>(offsetof(U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043, ___U3CU3E4__this_2)); }
inline Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * get_U3CU3E4__this_2() const { return ___U3CU3E4__this_2; }
inline Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 ** get_address_of_U3CU3E4__this_2() { return &___U3CU3E4__this_2; }
inline void set_U3CU3E4__this_2(Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * value)
{
___U3CU3E4__this_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E4__this_2), (void*)value);
}
};
// Level_<WaitAndLoad>d__6
struct U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 : public RuntimeObject
{
public:
// System.Int32 Level_<WaitAndLoad>d__6::<>1__state
int32_t ___U3CU3E1__state_0;
// System.Object Level_<WaitAndLoad>d__6::<>2__current
RuntimeObject * ___U3CU3E2__current_1;
// Level Level_<WaitAndLoad>d__6::<>4__this
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * ___U3CU3E4__this_2;
public:
inline static int32_t get_offset_of_U3CU3E1__state_0() { return static_cast<int32_t>(offsetof(U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835, ___U3CU3E1__state_0)); }
inline int32_t get_U3CU3E1__state_0() const { return ___U3CU3E1__state_0; }
inline int32_t* get_address_of_U3CU3E1__state_0() { return &___U3CU3E1__state_0; }
inline void set_U3CU3E1__state_0(int32_t value)
{
___U3CU3E1__state_0 = value;
}
inline static int32_t get_offset_of_U3CU3E2__current_1() { return static_cast<int32_t>(offsetof(U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835, ___U3CU3E2__current_1)); }
inline RuntimeObject * get_U3CU3E2__current_1() const { return ___U3CU3E2__current_1; }
inline RuntimeObject ** get_address_of_U3CU3E2__current_1() { return &___U3CU3E2__current_1; }
inline void set_U3CU3E2__current_1(RuntimeObject * value)
{
___U3CU3E2__current_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E2__current_1), (void*)value);
}
inline static int32_t get_offset_of_U3CU3E4__this_2() { return static_cast<int32_t>(offsetof(U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835, ___U3CU3E4__this_2)); }
inline Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * get_U3CU3E4__this_2() const { return ___U3CU3E4__this_2; }
inline Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 ** get_address_of_U3CU3E4__this_2() { return &___U3CU3E4__this_2; }
inline void set_U3CU3E4__this_2(Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * value)
{
___U3CU3E4__this_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E4__this_2), (void*)value);
}
};
// ObstracleSpawner_<SpawnAllEnemiesInWave>d__4
struct U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D : public RuntimeObject
{
public:
// System.Int32 ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::<>1__state
int32_t ___U3CU3E1__state_0;
// System.Object ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::<>2__current
RuntimeObject * ___U3CU3E2__current_1;
// WaveConfig ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::waveConfig
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfig_2;
// System.Int32 ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::<enemyCount>5__2
int32_t ___U3CenemyCountU3E5__2_3;
public:
inline static int32_t get_offset_of_U3CU3E1__state_0() { return static_cast<int32_t>(offsetof(U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D, ___U3CU3E1__state_0)); }
inline int32_t get_U3CU3E1__state_0() const { return ___U3CU3E1__state_0; }
inline int32_t* get_address_of_U3CU3E1__state_0() { return &___U3CU3E1__state_0; }
inline void set_U3CU3E1__state_0(int32_t value)
{
___U3CU3E1__state_0 = value;
}
inline static int32_t get_offset_of_U3CU3E2__current_1() { return static_cast<int32_t>(offsetof(U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D, ___U3CU3E2__current_1)); }
inline RuntimeObject * get_U3CU3E2__current_1() const { return ___U3CU3E2__current_1; }
inline RuntimeObject ** get_address_of_U3CU3E2__current_1() { return &___U3CU3E2__current_1; }
inline void set_U3CU3E2__current_1(RuntimeObject * value)
{
___U3CU3E2__current_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E2__current_1), (void*)value);
}
inline static int32_t get_offset_of_waveConfig_2() { return static_cast<int32_t>(offsetof(U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D, ___waveConfig_2)); }
inline WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * get_waveConfig_2() const { return ___waveConfig_2; }
inline WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 ** get_address_of_waveConfig_2() { return &___waveConfig_2; }
inline void set_waveConfig_2(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * value)
{
___waveConfig_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___waveConfig_2), (void*)value);
}
inline static int32_t get_offset_of_U3CenemyCountU3E5__2_3() { return static_cast<int32_t>(offsetof(U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D, ___U3CenemyCountU3E5__2_3)); }
inline int32_t get_U3CenemyCountU3E5__2_3() const { return ___U3CenemyCountU3E5__2_3; }
inline int32_t* get_address_of_U3CenemyCountU3E5__2_3() { return &___U3CenemyCountU3E5__2_3; }
inline void set_U3CenemyCountU3E5__2_3(int32_t value)
{
___U3CenemyCountU3E5__2_3 = value;
}
};
// ObstracleSpawner_<SpawnAllWaves>d__5
struct U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 : public RuntimeObject
{
public:
// System.Int32 ObstracleSpawner_<SpawnAllWaves>d__5::<>1__state
int32_t ___U3CU3E1__state_0;
// System.Object ObstracleSpawner_<SpawnAllWaves>d__5::<>2__current
RuntimeObject * ___U3CU3E2__current_1;
// ObstracleSpawner ObstracleSpawner_<SpawnAllWaves>d__5::<>4__this
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * ___U3CU3E4__this_2;
// System.Int32 ObstracleSpawner_<SpawnAllWaves>d__5::<waveIndex>5__2
int32_t ___U3CwaveIndexU3E5__2_3;
public:
inline static int32_t get_offset_of_U3CU3E1__state_0() { return static_cast<int32_t>(offsetof(U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8, ___U3CU3E1__state_0)); }
inline int32_t get_U3CU3E1__state_0() const { return ___U3CU3E1__state_0; }
inline int32_t* get_address_of_U3CU3E1__state_0() { return &___U3CU3E1__state_0; }
inline void set_U3CU3E1__state_0(int32_t value)
{
___U3CU3E1__state_0 = value;
}
inline static int32_t get_offset_of_U3CU3E2__current_1() { return static_cast<int32_t>(offsetof(U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8, ___U3CU3E2__current_1)); }
inline RuntimeObject * get_U3CU3E2__current_1() const { return ___U3CU3E2__current_1; }
inline RuntimeObject ** get_address_of_U3CU3E2__current_1() { return &___U3CU3E2__current_1; }
inline void set_U3CU3E2__current_1(RuntimeObject * value)
{
___U3CU3E2__current_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E2__current_1), (void*)value);
}
inline static int32_t get_offset_of_U3CU3E4__this_2() { return static_cast<int32_t>(offsetof(U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8, ___U3CU3E4__this_2)); }
inline ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * get_U3CU3E4__this_2() const { return ___U3CU3E4__this_2; }
inline ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C ** get_address_of_U3CU3E4__this_2() { return &___U3CU3E4__this_2; }
inline void set_U3CU3E4__this_2(ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * value)
{
___U3CU3E4__this_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E4__this_2), (void*)value);
}
inline static int32_t get_offset_of_U3CwaveIndexU3E5__2_3() { return static_cast<int32_t>(offsetof(U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8, ___U3CwaveIndexU3E5__2_3)); }
inline int32_t get_U3CwaveIndexU3E5__2_3() const { return ___U3CwaveIndexU3E5__2_3; }
inline int32_t* get_address_of_U3CwaveIndexU3E5__2_3() { return &___U3CwaveIndexU3E5__2_3; }
inline void set_U3CwaveIndexU3E5__2_3(int32_t value)
{
___U3CwaveIndexU3E5__2_3 = value;
}
};
// ObstracleSpawner_<Start>d__3
struct U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 : public RuntimeObject
{
public:
// System.Int32 ObstracleSpawner_<Start>d__3::<>1__state
int32_t ___U3CU3E1__state_0;
// System.Object ObstracleSpawner_<Start>d__3::<>2__current
RuntimeObject * ___U3CU3E2__current_1;
// ObstracleSpawner ObstracleSpawner_<Start>d__3::<>4__this
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * ___U3CU3E4__this_2;
public:
inline static int32_t get_offset_of_U3CU3E1__state_0() { return static_cast<int32_t>(offsetof(U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5, ___U3CU3E1__state_0)); }
inline int32_t get_U3CU3E1__state_0() const { return ___U3CU3E1__state_0; }
inline int32_t* get_address_of_U3CU3E1__state_0() { return &___U3CU3E1__state_0; }
inline void set_U3CU3E1__state_0(int32_t value)
{
___U3CU3E1__state_0 = value;
}
inline static int32_t get_offset_of_U3CU3E2__current_1() { return static_cast<int32_t>(offsetof(U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5, ___U3CU3E2__current_1)); }
inline RuntimeObject * get_U3CU3E2__current_1() const { return ___U3CU3E2__current_1; }
inline RuntimeObject ** get_address_of_U3CU3E2__current_1() { return &___U3CU3E2__current_1; }
inline void set_U3CU3E2__current_1(RuntimeObject * value)
{
___U3CU3E2__current_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E2__current_1), (void*)value);
}
inline static int32_t get_offset_of_U3CU3E4__this_2() { return static_cast<int32_t>(offsetof(U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5, ___U3CU3E4__this_2)); }
inline ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * get_U3CU3E4__this_2() const { return ___U3CU3E4__this_2; }
inline ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C ** get_address_of_U3CU3E4__this_2() { return &___U3CU3E4__this_2; }
inline void set_U3CU3E4__this_2(ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * value)
{
___U3CU3E4__this_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CU3E4__this_2), (void*)value);
}
};
struct Il2CppArrayBounds;
// System.Array
// System.Collections.Generic.List`1<System.Object>
struct List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5, ____items_1)); }
inline ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* get__items_1() const { return ____items_1; }
inline ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5_StaticFields, ____emptyArray_5)); }
inline ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* get__emptyArray_5() const { return ____emptyArray_5; }
inline ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Transform>
struct List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0, ____items_1)); }
inline TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D* get__items_1() const { return ____items_1; }
inline TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0_StaticFields, ____emptyArray_5)); }
inline TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D* get__emptyArray_5() const { return ____emptyArray_5; }
inline TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(TransformU5BU5D_t7821C0520CC567C0A069329C01AE9C058C7E3F1D* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<WaveConfig>
struct List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0, ____items_1)); }
inline WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A* get__items_1() const { return ____items_1; }
inline WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0_StaticFields, ____emptyArray_5)); }
inline WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A* get__emptyArray_5() const { return ____emptyArray_5; }
inline WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(WaveConfigU5BU5D_t2260DDBA3EC12C63EF50DB4329690266FB363F8A* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Reflection.MemberInfo
struct MemberInfo_t : public RuntimeObject
{
public:
public:
};
// System.String
struct String_t : public RuntimeObject
{
public:
// System.Int32 System.String::m_stringLength
int32_t ___m_stringLength_0;
// System.Char System.String::m_firstChar
Il2CppChar ___m_firstChar_1;
public:
inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); }
inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; }
inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; }
inline void set_m_stringLength_0(int32_t value)
{
___m_stringLength_0 = value;
}
inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); }
inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; }
inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; }
inline void set_m_firstChar_1(Il2CppChar value)
{
___m_firstChar_1 = value;
}
};
struct String_t_StaticFields
{
public:
// System.String System.String::Empty
String_t* ___Empty_5;
public:
inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); }
inline String_t* get_Empty_5() const { return ___Empty_5; }
inline String_t** get_address_of_Empty_5() { return &___Empty_5; }
inline void set_Empty_5(String_t* value)
{
___Empty_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Empty_5), (void*)value);
}
};
// System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject
{
public:
public:
};
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com
{
};
// UnityEngine.YieldInstruction
struct YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF : public RuntimeObject
{
public:
public:
};
// Native definition for P/Invoke marshalling of UnityEngine.YieldInstruction
struct YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshaled_pinvoke
{
};
// Native definition for COM marshalling of UnityEngine.YieldInstruction
struct YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshaled_com
{
};
// System.Boolean
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37
{
public:
// System.Boolean System.Boolean::m_value
bool ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___m_value_0)); }
inline bool get_m_value_0() const { return ___m_value_0; }
inline bool* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(bool value)
{
___m_value_0 = value;
}
};
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields
{
public:
// System.String System.Boolean::TrueString
String_t* ___TrueString_5;
// System.String System.Boolean::FalseString
String_t* ___FalseString_6;
public:
inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___TrueString_5)); }
inline String_t* get_TrueString_5() const { return ___TrueString_5; }
inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; }
inline void set_TrueString_5(String_t* value)
{
___TrueString_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___TrueString_5), (void*)value);
}
inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___FalseString_6)); }
inline String_t* get_FalseString_6() const { return ___FalseString_6; }
inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; }
inline void set_FalseString_6(String_t* value)
{
___FalseString_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FalseString_6), (void*)value);
}
};
// System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA : public ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52
{
public:
public:
};
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields
{
public:
// System.Char[] System.Enum::enumSeperatorCharArray
CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* ___enumSeperatorCharArray_0;
public:
inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields, ___enumSeperatorCharArray_0)); }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; }
inline void set_enumSeperatorCharArray_0(CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* value)
{
___enumSeperatorCharArray_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_com
{
};
// System.Int32
struct Int32_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046
{
public:
// System.Int32 System.Int32::m_value
int32_t ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046, ___m_value_0)); }
inline int32_t get_m_value_0() const { return ___m_value_0; }
inline int32_t* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(int32_t value)
{
___m_value_0 = value;
}
};
// System.IntPtr
struct IntPtr_t
{
public:
// System.Void* System.IntPtr::m_value
void* ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
inline void* get_m_value_0() const { return ___m_value_0; }
inline void** get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(void* value)
{
___m_value_0 = value;
}
};
struct IntPtr_t_StaticFields
{
public:
// System.IntPtr System.IntPtr::Zero
intptr_t ___Zero_1;
public:
inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
inline intptr_t get_Zero_1() const { return ___Zero_1; }
inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
inline void set_Zero_1(intptr_t value)
{
___Zero_1 = value;
}
};
// System.Single
struct Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E
{
public:
// System.Single System.Single::m_value
float ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E, ___m_value_0)); }
inline float get_m_value_0() const { return ___m_value_0; }
inline float* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(float value)
{
___m_value_0 = value;
}
};
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5
{
public:
union
{
struct
{
};
uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1];
};
public:
};
// UnityEngine.Color
struct Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659
{
public:
// System.Single UnityEngine.Color::r
float ___r_0;
// System.Single UnityEngine.Color::g
float ___g_1;
// System.Single UnityEngine.Color::b
float ___b_2;
// System.Single UnityEngine.Color::a
float ___a_3;
public:
inline static int32_t get_offset_of_r_0() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___r_0)); }
inline float get_r_0() const { return ___r_0; }
inline float* get_address_of_r_0() { return &___r_0; }
inline void set_r_0(float value)
{
___r_0 = value;
}
inline static int32_t get_offset_of_g_1() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___g_1)); }
inline float get_g_1() const { return ___g_1; }
inline float* get_address_of_g_1() { return &___g_1; }
inline void set_g_1(float value)
{
___g_1 = value;
}
inline static int32_t get_offset_of_b_2() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___b_2)); }
inline float get_b_2() const { return ___b_2; }
inline float* get_address_of_b_2() { return &___b_2; }
inline void set_b_2(float value)
{
___b_2 = value;
}
inline static int32_t get_offset_of_a_3() { return static_cast<int32_t>(offsetof(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659, ___a_3)); }
inline float get_a_3() const { return ___a_3; }
inline float* get_address_of_a_3() { return &___a_3; }
inline void set_a_3(float value)
{
___a_3 = value;
}
};
// UnityEngine.Quaternion
struct Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4
{
public:
// System.Single UnityEngine.Quaternion::x
float ___x_0;
// System.Single UnityEngine.Quaternion::y
float ___y_1;
// System.Single UnityEngine.Quaternion::z
float ___z_2;
// System.Single UnityEngine.Quaternion::w
float ___w_3;
public:
inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___x_0)); }
inline float get_x_0() const { return ___x_0; }
inline float* get_address_of_x_0() { return &___x_0; }
inline void set_x_0(float value)
{
___x_0 = value;
}
inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___y_1)); }
inline float get_y_1() const { return ___y_1; }
inline float* get_address_of_y_1() { return &___y_1; }
inline void set_y_1(float value)
{
___y_1 = value;
}
inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___z_2)); }
inline float get_z_2() const { return ___z_2; }
inline float* get_address_of_z_2() { return &___z_2; }
inline void set_z_2(float value)
{
___z_2 = value;
}
inline static int32_t get_offset_of_w_3() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4, ___w_3)); }
inline float get_w_3() const { return ___w_3; }
inline float* get_address_of_w_3() { return &___w_3; }
inline void set_w_3(float value)
{
___w_3 = value;
}
};
struct Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_StaticFields
{
public:
// UnityEngine.Quaternion UnityEngine.Quaternion::identityQuaternion
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___identityQuaternion_4;
public:
inline static int32_t get_offset_of_identityQuaternion_4() { return static_cast<int32_t>(offsetof(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_StaticFields, ___identityQuaternion_4)); }
inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 get_identityQuaternion_4() const { return ___identityQuaternion_4; }
inline Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 * get_address_of_identityQuaternion_4() { return &___identityQuaternion_4; }
inline void set_identityQuaternion_4(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 value)
{
___identityQuaternion_4 = value;
}
};
// UnityEngine.Vector2
struct Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9
{
public:
// System.Single UnityEngine.Vector2::x
float ___x_0;
// System.Single UnityEngine.Vector2::y
float ___y_1;
public:
inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9, ___x_0)); }
inline float get_x_0() const { return ___x_0; }
inline float* get_address_of_x_0() { return &___x_0; }
inline void set_x_0(float value)
{
___x_0 = value;
}
inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9, ___y_1)); }
inline float get_y_1() const { return ___y_1; }
inline float* get_address_of_y_1() { return &___y_1; }
inline void set_y_1(float value)
{
___y_1 = value;
}
};
struct Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields
{
public:
// UnityEngine.Vector2 UnityEngine.Vector2::zeroVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___zeroVector_2;
// UnityEngine.Vector2 UnityEngine.Vector2::oneVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___oneVector_3;
// UnityEngine.Vector2 UnityEngine.Vector2::upVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___upVector_4;
// UnityEngine.Vector2 UnityEngine.Vector2::downVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___downVector_5;
// UnityEngine.Vector2 UnityEngine.Vector2::leftVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___leftVector_6;
// UnityEngine.Vector2 UnityEngine.Vector2::rightVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___rightVector_7;
// UnityEngine.Vector2 UnityEngine.Vector2::positiveInfinityVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___positiveInfinityVector_8;
// UnityEngine.Vector2 UnityEngine.Vector2::negativeInfinityVector
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___negativeInfinityVector_9;
public:
inline static int32_t get_offset_of_zeroVector_2() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___zeroVector_2)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_zeroVector_2() const { return ___zeroVector_2; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_zeroVector_2() { return &___zeroVector_2; }
inline void set_zeroVector_2(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___zeroVector_2 = value;
}
inline static int32_t get_offset_of_oneVector_3() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___oneVector_3)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_oneVector_3() const { return ___oneVector_3; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_oneVector_3() { return &___oneVector_3; }
inline void set_oneVector_3(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___oneVector_3 = value;
}
inline static int32_t get_offset_of_upVector_4() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___upVector_4)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_upVector_4() const { return ___upVector_4; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_upVector_4() { return &___upVector_4; }
inline void set_upVector_4(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___upVector_4 = value;
}
inline static int32_t get_offset_of_downVector_5() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___downVector_5)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_downVector_5() const { return ___downVector_5; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_downVector_5() { return &___downVector_5; }
inline void set_downVector_5(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___downVector_5 = value;
}
inline static int32_t get_offset_of_leftVector_6() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___leftVector_6)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_leftVector_6() const { return ___leftVector_6; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_leftVector_6() { return &___leftVector_6; }
inline void set_leftVector_6(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___leftVector_6 = value;
}
inline static int32_t get_offset_of_rightVector_7() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___rightVector_7)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_rightVector_7() const { return ___rightVector_7; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_rightVector_7() { return &___rightVector_7; }
inline void set_rightVector_7(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___rightVector_7 = value;
}
inline static int32_t get_offset_of_positiveInfinityVector_8() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___positiveInfinityVector_8)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_positiveInfinityVector_8() const { return ___positiveInfinityVector_8; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_positiveInfinityVector_8() { return &___positiveInfinityVector_8; }
inline void set_positiveInfinityVector_8(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___positiveInfinityVector_8 = value;
}
inline static int32_t get_offset_of_negativeInfinityVector_9() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___negativeInfinityVector_9)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_negativeInfinityVector_9() const { return ___negativeInfinityVector_9; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_negativeInfinityVector_9() { return &___negativeInfinityVector_9; }
inline void set_negativeInfinityVector_9(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___negativeInfinityVector_9 = value;
}
};
// UnityEngine.Vector3
struct Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E
{
public:
// System.Single UnityEngine.Vector3::x
float ___x_2;
// System.Single UnityEngine.Vector3::y
float ___y_3;
// System.Single UnityEngine.Vector3::z
float ___z_4;
public:
inline static int32_t get_offset_of_x_2() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___x_2)); }
inline float get_x_2() const { return ___x_2; }
inline float* get_address_of_x_2() { return &___x_2; }
inline void set_x_2(float value)
{
___x_2 = value;
}
inline static int32_t get_offset_of_y_3() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___y_3)); }
inline float get_y_3() const { return ___y_3; }
inline float* get_address_of_y_3() { return &___y_3; }
inline void set_y_3(float value)
{
___y_3 = value;
}
inline static int32_t get_offset_of_z_4() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___z_4)); }
inline float get_z_4() const { return ___z_4; }
inline float* get_address_of_z_4() { return &___z_4; }
inline void set_z_4(float value)
{
___z_4 = value;
}
};
struct Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields
{
public:
// UnityEngine.Vector3 UnityEngine.Vector3::zeroVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___zeroVector_5;
// UnityEngine.Vector3 UnityEngine.Vector3::oneVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___oneVector_6;
// UnityEngine.Vector3 UnityEngine.Vector3::upVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___upVector_7;
// UnityEngine.Vector3 UnityEngine.Vector3::downVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___downVector_8;
// UnityEngine.Vector3 UnityEngine.Vector3::leftVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___leftVector_9;
// UnityEngine.Vector3 UnityEngine.Vector3::rightVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___rightVector_10;
// UnityEngine.Vector3 UnityEngine.Vector3::forwardVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___forwardVector_11;
// UnityEngine.Vector3 UnityEngine.Vector3::backVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___backVector_12;
// UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___positiveInfinityVector_13;
// UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___negativeInfinityVector_14;
public:
inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___zeroVector_5)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_zeroVector_5() const { return ___zeroVector_5; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_zeroVector_5() { return &___zeroVector_5; }
inline void set_zeroVector_5(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___zeroVector_5 = value;
}
inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___oneVector_6)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_oneVector_6() const { return ___oneVector_6; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_oneVector_6() { return &___oneVector_6; }
inline void set_oneVector_6(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___oneVector_6 = value;
}
inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___upVector_7)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_upVector_7() const { return ___upVector_7; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_upVector_7() { return &___upVector_7; }
inline void set_upVector_7(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___upVector_7 = value;
}
inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___downVector_8)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_downVector_8() const { return ___downVector_8; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_downVector_8() { return &___downVector_8; }
inline void set_downVector_8(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___downVector_8 = value;
}
inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___leftVector_9)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_leftVector_9() const { return ___leftVector_9; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_leftVector_9() { return &___leftVector_9; }
inline void set_leftVector_9(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___leftVector_9 = value;
}
inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___rightVector_10)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_rightVector_10() const { return ___rightVector_10; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_rightVector_10() { return &___rightVector_10; }
inline void set_rightVector_10(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___rightVector_10 = value;
}
inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___forwardVector_11)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_forwardVector_11() const { return ___forwardVector_11; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_forwardVector_11() { return &___forwardVector_11; }
inline void set_forwardVector_11(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___forwardVector_11 = value;
}
inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___backVector_12)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_backVector_12() const { return ___backVector_12; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_backVector_12() { return &___backVector_12; }
inline void set_backVector_12(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___backVector_12 = value;
}
inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___positiveInfinityVector_13)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; }
inline void set_positiveInfinityVector_13(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___positiveInfinityVector_13 = value;
}
inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___negativeInfinityVector_14)); }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; }
inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; }
inline void set_negativeInfinityVector_14(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value)
{
___negativeInfinityVector_14 = value;
}
};
// UnityEngine.Vector4
struct Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7
{
public:
// System.Single UnityEngine.Vector4::x
float ___x_1;
// System.Single UnityEngine.Vector4::y
float ___y_2;
// System.Single UnityEngine.Vector4::z
float ___z_3;
// System.Single UnityEngine.Vector4::w
float ___w_4;
public:
inline static int32_t get_offset_of_x_1() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7, ___x_1)); }
inline float get_x_1() const { return ___x_1; }
inline float* get_address_of_x_1() { return &___x_1; }
inline void set_x_1(float value)
{
___x_1 = value;
}
inline static int32_t get_offset_of_y_2() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7, ___y_2)); }
inline float get_y_2() const { return ___y_2; }
inline float* get_address_of_y_2() { return &___y_2; }
inline void set_y_2(float value)
{
___y_2 = value;
}
inline static int32_t get_offset_of_z_3() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7, ___z_3)); }
inline float get_z_3() const { return ___z_3; }
inline float* get_address_of_z_3() { return &___z_3; }
inline void set_z_3(float value)
{
___z_3 = value;
}
inline static int32_t get_offset_of_w_4() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7, ___w_4)); }
inline float get_w_4() const { return ___w_4; }
inline float* get_address_of_w_4() { return &___w_4; }
inline void set_w_4(float value)
{
___w_4 = value;
}
};
struct Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7_StaticFields
{
public:
// UnityEngine.Vector4 UnityEngine.Vector4::zeroVector
Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 ___zeroVector_5;
// UnityEngine.Vector4 UnityEngine.Vector4::oneVector
Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 ___oneVector_6;
// UnityEngine.Vector4 UnityEngine.Vector4::positiveInfinityVector
Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 ___positiveInfinityVector_7;
// UnityEngine.Vector4 UnityEngine.Vector4::negativeInfinityVector
Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 ___negativeInfinityVector_8;
public:
inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7_StaticFields, ___zeroVector_5)); }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 get_zeroVector_5() const { return ___zeroVector_5; }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 * get_address_of_zeroVector_5() { return &___zeroVector_5; }
inline void set_zeroVector_5(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 value)
{
___zeroVector_5 = value;
}
inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7_StaticFields, ___oneVector_6)); }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 get_oneVector_6() const { return ___oneVector_6; }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 * get_address_of_oneVector_6() { return &___oneVector_6; }
inline void set_oneVector_6(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 value)
{
___oneVector_6 = value;
}
inline static int32_t get_offset_of_positiveInfinityVector_7() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7_StaticFields, ___positiveInfinityVector_7)); }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 get_positiveInfinityVector_7() const { return ___positiveInfinityVector_7; }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 * get_address_of_positiveInfinityVector_7() { return &___positiveInfinityVector_7; }
inline void set_positiveInfinityVector_7(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 value)
{
___positiveInfinityVector_7 = value;
}
inline static int32_t get_offset_of_negativeInfinityVector_8() { return static_cast<int32_t>(offsetof(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7_StaticFields, ___negativeInfinityVector_8)); }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 get_negativeInfinityVector_8() const { return ___negativeInfinityVector_8; }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 * get_address_of_negativeInfinityVector_8() { return &___negativeInfinityVector_8; }
inline void set_negativeInfinityVector_8(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 value)
{
___negativeInfinityVector_8 = value;
}
};
// UnityEngine.WaitForSeconds
struct WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 : public YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF
{
public:
// System.Single UnityEngine.WaitForSeconds::m_Seconds
float ___m_Seconds_0;
public:
inline static int32_t get_offset_of_m_Seconds_0() { return static_cast<int32_t>(offsetof(WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013, ___m_Seconds_0)); }
inline float get_m_Seconds_0() const { return ___m_Seconds_0; }
inline float* get_address_of_m_Seconds_0() { return &___m_Seconds_0; }
inline void set_m_Seconds_0(float value)
{
___m_Seconds_0 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.WaitForSeconds
struct WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshaled_pinvoke : public YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshaled_pinvoke
{
float ___m_Seconds_0;
};
// Native definition for COM marshalling of UnityEngine.WaitForSeconds
struct WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshaled_com : public YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshaled_com
{
float ___m_Seconds_0;
};
// System.Exception
struct Exception_t : public RuntimeObject
{
public:
// System.String System.Exception::_className
String_t* ____className_1;
// System.String System.Exception::_message
String_t* ____message_2;
// System.Collections.IDictionary System.Exception::_data
RuntimeObject* ____data_3;
// System.Exception System.Exception::_innerException
Exception_t * ____innerException_4;
// System.String System.Exception::_helpURL
String_t* ____helpURL_5;
// System.Object System.Exception::_stackTrace
RuntimeObject * ____stackTrace_6;
// System.String System.Exception::_stackTraceString
String_t* ____stackTraceString_7;
// System.String System.Exception::_remoteStackTraceString
String_t* ____remoteStackTraceString_8;
// System.Int32 System.Exception::_remoteStackIndex
int32_t ____remoteStackIndex_9;
// System.Object System.Exception::_dynamicMethods
RuntimeObject * ____dynamicMethods_10;
// System.Int32 System.Exception::_HResult
int32_t ____HResult_11;
// System.String System.Exception::_source
String_t* ____source_12;
// System.Runtime.Serialization.SafeSerializationManager System.Exception::_safeSerializationManager
SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
// System.Diagnostics.StackTrace[] System.Exception::captured_traces
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
// System.IntPtr[] System.Exception::native_trace_ips
IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* ___native_trace_ips_15;
public:
inline static int32_t get_offset_of__className_1() { return static_cast<int32_t>(offsetof(Exception_t, ____className_1)); }
inline String_t* get__className_1() const { return ____className_1; }
inline String_t** get_address_of__className_1() { return &____className_1; }
inline void set__className_1(String_t* value)
{
____className_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____className_1), (void*)value);
}
inline static int32_t get_offset_of__message_2() { return static_cast<int32_t>(offsetof(Exception_t, ____message_2)); }
inline String_t* get__message_2() const { return ____message_2; }
inline String_t** get_address_of__message_2() { return &____message_2; }
inline void set__message_2(String_t* value)
{
____message_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&____message_2), (void*)value);
}
inline static int32_t get_offset_of__data_3() { return static_cast<int32_t>(offsetof(Exception_t, ____data_3)); }
inline RuntimeObject* get__data_3() const { return ____data_3; }
inline RuntimeObject** get_address_of__data_3() { return &____data_3; }
inline void set__data_3(RuntimeObject* value)
{
____data_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&____data_3), (void*)value);
}
inline static int32_t get_offset_of__innerException_4() { return static_cast<int32_t>(offsetof(Exception_t, ____innerException_4)); }
inline Exception_t * get__innerException_4() const { return ____innerException_4; }
inline Exception_t ** get_address_of__innerException_4() { return &____innerException_4; }
inline void set__innerException_4(Exception_t * value)
{
____innerException_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____innerException_4), (void*)value);
}
inline static int32_t get_offset_of__helpURL_5() { return static_cast<int32_t>(offsetof(Exception_t, ____helpURL_5)); }
inline String_t* get__helpURL_5() const { return ____helpURL_5; }
inline String_t** get_address_of__helpURL_5() { return &____helpURL_5; }
inline void set__helpURL_5(String_t* value)
{
____helpURL_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____helpURL_5), (void*)value);
}
inline static int32_t get_offset_of__stackTrace_6() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTrace_6)); }
inline RuntimeObject * get__stackTrace_6() const { return ____stackTrace_6; }
inline RuntimeObject ** get_address_of__stackTrace_6() { return &____stackTrace_6; }
inline void set__stackTrace_6(RuntimeObject * value)
{
____stackTrace_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&____stackTrace_6), (void*)value);
}
inline static int32_t get_offset_of__stackTraceString_7() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTraceString_7)); }
inline String_t* get__stackTraceString_7() const { return ____stackTraceString_7; }
inline String_t** get_address_of__stackTraceString_7() { return &____stackTraceString_7; }
inline void set__stackTraceString_7(String_t* value)
{
____stackTraceString_7 = value;
Il2CppCodeGenWriteBarrier((void**)(&____stackTraceString_7), (void*)value);
}
inline static int32_t get_offset_of__remoteStackTraceString_8() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_8)); }
inline String_t* get__remoteStackTraceString_8() const { return ____remoteStackTraceString_8; }
inline String_t** get_address_of__remoteStackTraceString_8() { return &____remoteStackTraceString_8; }
inline void set__remoteStackTraceString_8(String_t* value)
{
____remoteStackTraceString_8 = value;
Il2CppCodeGenWriteBarrier((void**)(&____remoteStackTraceString_8), (void*)value);
}
inline static int32_t get_offset_of__remoteStackIndex_9() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackIndex_9)); }
inline int32_t get__remoteStackIndex_9() const { return ____remoteStackIndex_9; }
inline int32_t* get_address_of__remoteStackIndex_9() { return &____remoteStackIndex_9; }
inline void set__remoteStackIndex_9(int32_t value)
{
____remoteStackIndex_9 = value;
}
inline static int32_t get_offset_of__dynamicMethods_10() { return static_cast<int32_t>(offsetof(Exception_t, ____dynamicMethods_10)); }
inline RuntimeObject * get__dynamicMethods_10() const { return ____dynamicMethods_10; }
inline RuntimeObject ** get_address_of__dynamicMethods_10() { return &____dynamicMethods_10; }
inline void set__dynamicMethods_10(RuntimeObject * value)
{
____dynamicMethods_10 = value;
Il2CppCodeGenWriteBarrier((void**)(&____dynamicMethods_10), (void*)value);
}
inline static int32_t get_offset_of__HResult_11() { return static_cast<int32_t>(offsetof(Exception_t, ____HResult_11)); }
inline int32_t get__HResult_11() const { return ____HResult_11; }
inline int32_t* get_address_of__HResult_11() { return &____HResult_11; }
inline void set__HResult_11(int32_t value)
{
____HResult_11 = value;
}
inline static int32_t get_offset_of__source_12() { return static_cast<int32_t>(offsetof(Exception_t, ____source_12)); }
inline String_t* get__source_12() const { return ____source_12; }
inline String_t** get_address_of__source_12() { return &____source_12; }
inline void set__source_12(String_t* value)
{
____source_12 = value;
Il2CppCodeGenWriteBarrier((void**)(&____source_12), (void*)value);
}
inline static int32_t get_offset_of__safeSerializationManager_13() { return static_cast<int32_t>(offsetof(Exception_t, ____safeSerializationManager_13)); }
inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; }
inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; }
inline void set__safeSerializationManager_13(SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * value)
{
____safeSerializationManager_13 = value;
Il2CppCodeGenWriteBarrier((void**)(&____safeSerializationManager_13), (void*)value);
}
inline static int32_t get_offset_of_captured_traces_14() { return static_cast<int32_t>(offsetof(Exception_t, ___captured_traces_14)); }
inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* get_captured_traces_14() const { return ___captured_traces_14; }
inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971** get_address_of_captured_traces_14() { return &___captured_traces_14; }
inline void set_captured_traces_14(StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* value)
{
___captured_traces_14 = value;
Il2CppCodeGenWriteBarrier((void**)(&___captured_traces_14), (void*)value);
}
inline static int32_t get_offset_of_native_trace_ips_15() { return static_cast<int32_t>(offsetof(Exception_t, ___native_trace_ips_15)); }
inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* get_native_trace_ips_15() const { return ___native_trace_ips_15; }
inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; }
inline void set_native_trace_ips_15(IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* value)
{
___native_trace_ips_15 = value;
Il2CppCodeGenWriteBarrier((void**)(&___native_trace_ips_15), (void*)value);
}
};
struct Exception_t_StaticFields
{
public:
// System.Object System.Exception::s_EDILock
RuntimeObject * ___s_EDILock_0;
public:
inline static int32_t get_offset_of_s_EDILock_0() { return static_cast<int32_t>(offsetof(Exception_t_StaticFields, ___s_EDILock_0)); }
inline RuntimeObject * get_s_EDILock_0() const { return ___s_EDILock_0; }
inline RuntimeObject ** get_address_of_s_EDILock_0() { return &___s_EDILock_0; }
inline void set_s_EDILock_0(RuntimeObject * value)
{
___s_EDILock_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_EDILock_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Exception
struct Exception_t_marshaled_pinvoke
{
char* ____className_1;
char* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_pinvoke* ____innerException_4;
char* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
char* ____stackTraceString_7;
char* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
char* ____source_12;
SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// Native definition for COM marshalling of System.Exception
struct Exception_t_marshaled_com
{
Il2CppChar* ____className_1;
Il2CppChar* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_com* ____innerException_4;
Il2CppChar* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
Il2CppChar* ____stackTraceString_7;
Il2CppChar* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
Il2CppChar* ____source_12;
SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// System.Reflection.BindingFlags
struct BindingFlags_tAAAB07D9AC588F0D55D844E51D7035E96DF94733
{
public:
// System.Int32 System.Reflection.BindingFlags::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(BindingFlags_tAAAB07D9AC588F0D55D844E51D7035E96DF94733, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// System.RuntimeTypeHandle
struct RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9
{
public:
// System.IntPtr System.RuntimeTypeHandle::value
intptr_t ___value_0;
public:
inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9, ___value_0)); }
inline intptr_t get_value_0() const { return ___value_0; }
inline intptr_t* get_address_of_value_0() { return &___value_0; }
inline void set_value_0(intptr_t value)
{
___value_0 = value;
}
};
// UnityEngine.Coroutine
struct Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7 : public YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF
{
public:
// System.IntPtr UnityEngine.Coroutine::m_Ptr
intptr_t ___m_Ptr_0;
public:
inline static int32_t get_offset_of_m_Ptr_0() { return static_cast<int32_t>(offsetof(Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7, ___m_Ptr_0)); }
inline intptr_t get_m_Ptr_0() const { return ___m_Ptr_0; }
inline intptr_t* get_address_of_m_Ptr_0() { return &___m_Ptr_0; }
inline void set_m_Ptr_0(intptr_t value)
{
___m_Ptr_0 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.Coroutine
struct Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshaled_pinvoke : public YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshaled_pinvoke
{
intptr_t ___m_Ptr_0;
};
// Native definition for COM marshalling of UnityEngine.Coroutine
struct Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshaled_com : public YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshaled_com
{
intptr_t ___m_Ptr_0;
};
// UnityEngine.Object
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A : public RuntimeObject
{
public:
// System.IntPtr UnityEngine.Object::m_CachedPtr
intptr_t ___m_CachedPtr_0;
public:
inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A, ___m_CachedPtr_0)); }
inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; }
inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; }
inline void set_m_CachedPtr_0(intptr_t value)
{
___m_CachedPtr_0 = value;
}
};
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_StaticFields
{
public:
// System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject
int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1;
public:
inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); }
inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; }
inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; }
inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value)
{
___OffsetOfInstanceIDInCPlusPlusObject_1 = value;
}
};
// Native definition for P/Invoke marshalling of UnityEngine.Object
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke
{
intptr_t ___m_CachedPtr_0;
};
// Native definition for COM marshalling of UnityEngine.Object
struct Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com
{
intptr_t ___m_CachedPtr_0;
};
// System.SystemException
struct SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62 : public Exception_t
{
public:
public:
};
// System.Type
struct Type_t : public MemberInfo_t
{
public:
// System.RuntimeTypeHandle System.Type::_impl
RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 ____impl_9;
public:
inline static int32_t get_offset_of__impl_9() { return static_cast<int32_t>(offsetof(Type_t, ____impl_9)); }
inline RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 get__impl_9() const { return ____impl_9; }
inline RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 * get_address_of__impl_9() { return &____impl_9; }
inline void set__impl_9(RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 value)
{
____impl_9 = value;
}
};
struct Type_t_StaticFields
{
public:
// System.Reflection.MemberFilter System.Type::FilterAttribute
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterAttribute_0;
// System.Reflection.MemberFilter System.Type::FilterName
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterName_1;
// System.Reflection.MemberFilter System.Type::FilterNameIgnoreCase
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterNameIgnoreCase_2;
// System.Object System.Type::Missing
RuntimeObject * ___Missing_3;
// System.Char System.Type::Delimiter
Il2CppChar ___Delimiter_4;
// System.Type[] System.Type::EmptyTypes
TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* ___EmptyTypes_5;
// System.Reflection.Binder System.Type::defaultBinder
Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * ___defaultBinder_6;
public:
inline static int32_t get_offset_of_FilterAttribute_0() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterAttribute_0)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterAttribute_0() const { return ___FilterAttribute_0; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterAttribute_0() { return &___FilterAttribute_0; }
inline void set_FilterAttribute_0(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterAttribute_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterAttribute_0), (void*)value);
}
inline static int32_t get_offset_of_FilterName_1() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterName_1)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterName_1() const { return ___FilterName_1; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterName_1() { return &___FilterName_1; }
inline void set_FilterName_1(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterName_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterName_1), (void*)value);
}
inline static int32_t get_offset_of_FilterNameIgnoreCase_2() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterNameIgnoreCase_2)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterNameIgnoreCase_2() const { return ___FilterNameIgnoreCase_2; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterNameIgnoreCase_2() { return &___FilterNameIgnoreCase_2; }
inline void set_FilterNameIgnoreCase_2(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterNameIgnoreCase_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterNameIgnoreCase_2), (void*)value);
}
inline static int32_t get_offset_of_Missing_3() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Missing_3)); }
inline RuntimeObject * get_Missing_3() const { return ___Missing_3; }
inline RuntimeObject ** get_address_of_Missing_3() { return &___Missing_3; }
inline void set_Missing_3(RuntimeObject * value)
{
___Missing_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Missing_3), (void*)value);
}
inline static int32_t get_offset_of_Delimiter_4() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Delimiter_4)); }
inline Il2CppChar get_Delimiter_4() const { return ___Delimiter_4; }
inline Il2CppChar* get_address_of_Delimiter_4() { return &___Delimiter_4; }
inline void set_Delimiter_4(Il2CppChar value)
{
___Delimiter_4 = value;
}
inline static int32_t get_offset_of_EmptyTypes_5() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___EmptyTypes_5)); }
inline TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* get_EmptyTypes_5() const { return ___EmptyTypes_5; }
inline TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755** get_address_of_EmptyTypes_5() { return &___EmptyTypes_5; }
inline void set_EmptyTypes_5(TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* value)
{
___EmptyTypes_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___EmptyTypes_5), (void*)value);
}
inline static int32_t get_offset_of_defaultBinder_6() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___defaultBinder_6)); }
inline Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * get_defaultBinder_6() const { return ___defaultBinder_6; }
inline Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 ** get_address_of_defaultBinder_6() { return &___defaultBinder_6; }
inline void set_defaultBinder_6(Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * value)
{
___defaultBinder_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___defaultBinder_6), (void*)value);
}
};
// UnityEngine.AudioClip
struct AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
// UnityEngine.AudioClip_PCMReaderCallback UnityEngine.AudioClip::m_PCMReaderCallback
PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B * ___m_PCMReaderCallback_4;
// UnityEngine.AudioClip_PCMSetPositionCallback UnityEngine.AudioClip::m_PCMSetPositionCallback
PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C * ___m_PCMSetPositionCallback_5;
public:
inline static int32_t get_offset_of_m_PCMReaderCallback_4() { return static_cast<int32_t>(offsetof(AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE, ___m_PCMReaderCallback_4)); }
inline PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B * get_m_PCMReaderCallback_4() const { return ___m_PCMReaderCallback_4; }
inline PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B ** get_address_of_m_PCMReaderCallback_4() { return &___m_PCMReaderCallback_4; }
inline void set_m_PCMReaderCallback_4(PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B * value)
{
___m_PCMReaderCallback_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_PCMReaderCallback_4), (void*)value);
}
inline static int32_t get_offset_of_m_PCMSetPositionCallback_5() { return static_cast<int32_t>(offsetof(AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE, ___m_PCMSetPositionCallback_5)); }
inline PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C * get_m_PCMSetPositionCallback_5() const { return ___m_PCMSetPositionCallback_5; }
inline PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C ** get_address_of_m_PCMSetPositionCallback_5() { return &___m_PCMSetPositionCallback_5; }
inline void set_m_PCMSetPositionCallback_5(PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C * value)
{
___m_PCMSetPositionCallback_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_PCMSetPositionCallback_5), (void*)value);
}
};
// UnityEngine.Component
struct Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// UnityEngine.GameObject
struct GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// UnityEngine.Material
struct Material_t8927C00353A72755313F046D0CE85178AE8218EE : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A
{
public:
public:
};
// Native definition for P/Invoke marshalling of UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_pinvoke : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_pinvoke
{
};
// Native definition for COM marshalling of UnityEngine.ScriptableObject
struct ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshaled_com : public Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshaled_com
{
};
// System.NotSupportedException
struct NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62
{
public:
public:
};
// UnityEngine.Behaviour
struct Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9 : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684
{
public:
public:
};
// UnityEngine.Renderer
struct Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684
{
public:
public:
};
// UnityEngine.Rigidbody2D
struct Rigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5 : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684
{
public:
public:
};
// UnityEngine.Transform
struct Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 : public Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684
{
public:
public:
};
// WaveConfig
struct WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 : public ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A
{
public:
// UnityEngine.GameObject WaveConfig::enemyPrefab
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___enemyPrefab_4;
// UnityEngine.GameObject WaveConfig::pathPrefab
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___pathPrefab_5;
// System.Single WaveConfig::timeBetweenSpawns
float ___timeBetweenSpawns_6;
// System.Single WaveConfig::spawnRandomFactor
float ___spawnRandomFactor_7;
// System.Int32 WaveConfig::numberOfEnemies
int32_t ___numberOfEnemies_8;
// System.Single WaveConfig::enemyMoveSpeed
float ___enemyMoveSpeed_9;
public:
inline static int32_t get_offset_of_enemyPrefab_4() { return static_cast<int32_t>(offsetof(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1, ___enemyPrefab_4)); }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_enemyPrefab_4() const { return ___enemyPrefab_4; }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_enemyPrefab_4() { return &___enemyPrefab_4; }
inline void set_enemyPrefab_4(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value)
{
___enemyPrefab_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___enemyPrefab_4), (void*)value);
}
inline static int32_t get_offset_of_pathPrefab_5() { return static_cast<int32_t>(offsetof(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1, ___pathPrefab_5)); }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_pathPrefab_5() const { return ___pathPrefab_5; }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_pathPrefab_5() { return &___pathPrefab_5; }
inline void set_pathPrefab_5(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value)
{
___pathPrefab_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___pathPrefab_5), (void*)value);
}
inline static int32_t get_offset_of_timeBetweenSpawns_6() { return static_cast<int32_t>(offsetof(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1, ___timeBetweenSpawns_6)); }
inline float get_timeBetweenSpawns_6() const { return ___timeBetweenSpawns_6; }
inline float* get_address_of_timeBetweenSpawns_6() { return &___timeBetweenSpawns_6; }
inline void set_timeBetweenSpawns_6(float value)
{
___timeBetweenSpawns_6 = value;
}
inline static int32_t get_offset_of_spawnRandomFactor_7() { return static_cast<int32_t>(offsetof(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1, ___spawnRandomFactor_7)); }
inline float get_spawnRandomFactor_7() const { return ___spawnRandomFactor_7; }
inline float* get_address_of_spawnRandomFactor_7() { return &___spawnRandomFactor_7; }
inline void set_spawnRandomFactor_7(float value)
{
___spawnRandomFactor_7 = value;
}
inline static int32_t get_offset_of_numberOfEnemies_8() { return static_cast<int32_t>(offsetof(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1, ___numberOfEnemies_8)); }
inline int32_t get_numberOfEnemies_8() const { return ___numberOfEnemies_8; }
inline int32_t* get_address_of_numberOfEnemies_8() { return &___numberOfEnemies_8; }
inline void set_numberOfEnemies_8(int32_t value)
{
___numberOfEnemies_8 = value;
}
inline static int32_t get_offset_of_enemyMoveSpeed_9() { return static_cast<int32_t>(offsetof(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1, ___enemyMoveSpeed_9)); }
inline float get_enemyMoveSpeed_9() const { return ___enemyMoveSpeed_9; }
inline float* get_address_of_enemyMoveSpeed_9() { return &___enemyMoveSpeed_9; }
inline void set_enemyMoveSpeed_9(float value)
{
___enemyMoveSpeed_9 = value;
}
};
// UnityEngine.Camera
struct Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C : public Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9
{
public:
public:
};
struct Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C_StaticFields
{
public:
// UnityEngine.Camera_CameraCallback UnityEngine.Camera::onPreCull
CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * ___onPreCull_4;
// UnityEngine.Camera_CameraCallback UnityEngine.Camera::onPreRender
CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * ___onPreRender_5;
// UnityEngine.Camera_CameraCallback UnityEngine.Camera::onPostRender
CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * ___onPostRender_6;
public:
inline static int32_t get_offset_of_onPreCull_4() { return static_cast<int32_t>(offsetof(Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C_StaticFields, ___onPreCull_4)); }
inline CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * get_onPreCull_4() const { return ___onPreCull_4; }
inline CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D ** get_address_of_onPreCull_4() { return &___onPreCull_4; }
inline void set_onPreCull_4(CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * value)
{
___onPreCull_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___onPreCull_4), (void*)value);
}
inline static int32_t get_offset_of_onPreRender_5() { return static_cast<int32_t>(offsetof(Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C_StaticFields, ___onPreRender_5)); }
inline CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * get_onPreRender_5() const { return ___onPreRender_5; }
inline CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D ** get_address_of_onPreRender_5() { return &___onPreRender_5; }
inline void set_onPreRender_5(CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * value)
{
___onPreRender_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___onPreRender_5), (void*)value);
}
inline static int32_t get_offset_of_onPostRender_6() { return static_cast<int32_t>(offsetof(Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C_StaticFields, ___onPostRender_6)); }
inline CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * get_onPostRender_6() const { return ___onPostRender_6; }
inline CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D ** get_address_of_onPostRender_6() { return &___onPostRender_6; }
inline void set_onPostRender_6(CameraCallback_tD9E7B69E561CE2EFDEEDB0E7F1406AC52247160D * value)
{
___onPostRender_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___onPostRender_6), (void*)value);
}
};
// UnityEngine.Collider2D
struct Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 : public Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9
{
public:
public:
};
// UnityEngine.MonoBehaviour
struct MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A : public Behaviour_t1A3DDDCF73B4627928FBFE02ED52B7251777DBD9
{
public:
public:
};
// BackgroundScroller
struct BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01 : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Single BackgroundScroller::backgroundScrollSpeed
float ___backgroundScrollSpeed_4;
// UnityEngine.Material BackgroundScroller::myMaterial
Material_t8927C00353A72755313F046D0CE85178AE8218EE * ___myMaterial_5;
// UnityEngine.Vector2 BackgroundScroller::offSet
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___offSet_6;
public:
inline static int32_t get_offset_of_backgroundScrollSpeed_4() { return static_cast<int32_t>(offsetof(BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01, ___backgroundScrollSpeed_4)); }
inline float get_backgroundScrollSpeed_4() const { return ___backgroundScrollSpeed_4; }
inline float* get_address_of_backgroundScrollSpeed_4() { return &___backgroundScrollSpeed_4; }
inline void set_backgroundScrollSpeed_4(float value)
{
___backgroundScrollSpeed_4 = value;
}
inline static int32_t get_offset_of_myMaterial_5() { return static_cast<int32_t>(offsetof(BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01, ___myMaterial_5)); }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE * get_myMaterial_5() const { return ___myMaterial_5; }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE ** get_address_of_myMaterial_5() { return &___myMaterial_5; }
inline void set_myMaterial_5(Material_t8927C00353A72755313F046D0CE85178AE8218EE * value)
{
___myMaterial_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___myMaterial_5), (void*)value);
}
inline static int32_t get_offset_of_offSet_6() { return static_cast<int32_t>(offsetof(BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01, ___offSet_6)); }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_offSet_6() const { return ___offSet_6; }
inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_offSet_6() { return &___offSet_6; }
inline void set_offSet_6(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value)
{
___offSet_6 = value;
}
};
// DamageDealer
struct DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Int32 DamageDealer::damage
int32_t ___damage_4;
public:
inline static int32_t get_offset_of_damage_4() { return static_cast<int32_t>(offsetof(DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6, ___damage_4)); }
inline int32_t get_damage_4() const { return ___damage_4; }
inline int32_t* get_address_of_damage_4() { return &___damage_4; }
inline void set_damage_4(int32_t value)
{
___damage_4 = value;
}
};
// Explosion
struct Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// UnityEngine.GameObject Explosion::deathVFX
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___deathVFX_4;
// System.Single Explosion::explosionDuration
float ___explosionDuration_5;
public:
inline static int32_t get_offset_of_deathVFX_4() { return static_cast<int32_t>(offsetof(Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED, ___deathVFX_4)); }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_deathVFX_4() const { return ___deathVFX_4; }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_deathVFX_4() { return &___deathVFX_4; }
inline void set_deathVFX_4(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value)
{
___deathVFX_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___deathVFX_4), (void*)value);
}
inline static int32_t get_offset_of_explosionDuration_5() { return static_cast<int32_t>(offsetof(Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED, ___explosionDuration_5)); }
inline float get_explosionDuration_5() const { return ___explosionDuration_5; }
inline float* get_address_of_explosionDuration_5() { return &___explosionDuration_5; }
inline void set_explosionDuration_5(float value)
{
___explosionDuration_5 = value;
}
};
// GameSession
struct GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Int32 GameSession::score
int32_t ___score_4;
public:
inline static int32_t get_offset_of_score_4() { return static_cast<int32_t>(offsetof(GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9, ___score_4)); }
inline int32_t get_score_4() const { return ___score_4; }
inline int32_t* get_address_of_score_4() { return &___score_4; }
inline void set_score_4(int32_t value)
{
___score_4 = value;
}
};
// Level
struct Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Single Level::delayInSeconds
float ___delayInSeconds_4;
public:
inline static int32_t get_offset_of_delayInSeconds_4() { return static_cast<int32_t>(offsetof(Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93, ___delayInSeconds_4)); }
inline float get_delayInSeconds_4() const { return ___delayInSeconds_4; }
inline float* get_address_of_delayInSeconds_4() { return &___delayInSeconds_4; }
inline void set_delayInSeconds_4(float value)
{
___delayInSeconds_4 = value;
}
};
// MusicPlayer
struct MusicPlayer_tED49C79A2679189A904E6BC22CD55275F67D4D7D : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
public:
};
// Obstracle
struct Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Single Obstracle::shotCounter
float ___shotCounter_4;
// System.Single Obstracle::minTimeBetweenShots
float ___minTimeBetweenShots_5;
// System.Single Obstracle::maxTimeBetweenShots
float ___maxTimeBetweenShots_6;
// UnityEngine.GameObject Obstracle::obstacleLaserPrefab
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___obstacleLaserPrefab_7;
// System.Single Obstracle::obstacleLaserSpeed
float ___obstacleLaserSpeed_8;
public:
inline static int32_t get_offset_of_shotCounter_4() { return static_cast<int32_t>(offsetof(Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F, ___shotCounter_4)); }
inline float get_shotCounter_4() const { return ___shotCounter_4; }
inline float* get_address_of_shotCounter_4() { return &___shotCounter_4; }
inline void set_shotCounter_4(float value)
{
___shotCounter_4 = value;
}
inline static int32_t get_offset_of_minTimeBetweenShots_5() { return static_cast<int32_t>(offsetof(Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F, ___minTimeBetweenShots_5)); }
inline float get_minTimeBetweenShots_5() const { return ___minTimeBetweenShots_5; }
inline float* get_address_of_minTimeBetweenShots_5() { return &___minTimeBetweenShots_5; }
inline void set_minTimeBetweenShots_5(float value)
{
___minTimeBetweenShots_5 = value;
}
inline static int32_t get_offset_of_maxTimeBetweenShots_6() { return static_cast<int32_t>(offsetof(Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F, ___maxTimeBetweenShots_6)); }
inline float get_maxTimeBetweenShots_6() const { return ___maxTimeBetweenShots_6; }
inline float* get_address_of_maxTimeBetweenShots_6() { return &___maxTimeBetweenShots_6; }
inline void set_maxTimeBetweenShots_6(float value)
{
___maxTimeBetweenShots_6 = value;
}
inline static int32_t get_offset_of_obstacleLaserPrefab_7() { return static_cast<int32_t>(offsetof(Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F, ___obstacleLaserPrefab_7)); }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_obstacleLaserPrefab_7() const { return ___obstacleLaserPrefab_7; }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_obstacleLaserPrefab_7() { return &___obstacleLaserPrefab_7; }
inline void set_obstacleLaserPrefab_7(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value)
{
___obstacleLaserPrefab_7 = value;
Il2CppCodeGenWriteBarrier((void**)(&___obstacleLaserPrefab_7), (void*)value);
}
inline static int32_t get_offset_of_obstacleLaserSpeed_8() { return static_cast<int32_t>(offsetof(Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F, ___obstacleLaserSpeed_8)); }
inline float get_obstacleLaserSpeed_8() const { return ___obstacleLaserSpeed_8; }
inline float* get_address_of_obstacleLaserSpeed_8() { return &___obstacleLaserSpeed_8; }
inline void set_obstacleLaserSpeed_8(float value)
{
___obstacleLaserSpeed_8 = value;
}
};
// ObstraclePathing
struct ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Collections.Generic.List`1<UnityEngine.Transform> ObstraclePathing::waypoints
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * ___waypoints_4;
// WaveConfig ObstraclePathing::waveConfig
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfig_5;
// System.Int32 ObstraclePathing::waypointIndex
int32_t ___waypointIndex_6;
public:
inline static int32_t get_offset_of_waypoints_4() { return static_cast<int32_t>(offsetof(ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA, ___waypoints_4)); }
inline List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * get_waypoints_4() const { return ___waypoints_4; }
inline List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 ** get_address_of_waypoints_4() { return &___waypoints_4; }
inline void set_waypoints_4(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * value)
{
___waypoints_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___waypoints_4), (void*)value);
}
inline static int32_t get_offset_of_waveConfig_5() { return static_cast<int32_t>(offsetof(ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA, ___waveConfig_5)); }
inline WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * get_waveConfig_5() const { return ___waveConfig_5; }
inline WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 ** get_address_of_waveConfig_5() { return &___waveConfig_5; }
inline void set_waveConfig_5(WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * value)
{
___waveConfig_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___waveConfig_5), (void*)value);
}
inline static int32_t get_offset_of_waypointIndex_6() { return static_cast<int32_t>(offsetof(ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA, ___waypointIndex_6)); }
inline int32_t get_waypointIndex_6() const { return ___waypointIndex_6; }
inline int32_t* get_address_of_waypointIndex_6() { return &___waypointIndex_6; }
inline void set_waypointIndex_6(int32_t value)
{
___waypointIndex_6 = value;
}
};
// ObstracleSpawner
struct ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Collections.Generic.List`1<WaveConfig> ObstracleSpawner::waveConfigs
List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * ___waveConfigs_4;
// System.Boolean ObstracleSpawner::looping
bool ___looping_5;
// System.Int32 ObstracleSpawner::startingWave
int32_t ___startingWave_6;
public:
inline static int32_t get_offset_of_waveConfigs_4() { return static_cast<int32_t>(offsetof(ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C, ___waveConfigs_4)); }
inline List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * get_waveConfigs_4() const { return ___waveConfigs_4; }
inline List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 ** get_address_of_waveConfigs_4() { return &___waveConfigs_4; }
inline void set_waveConfigs_4(List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * value)
{
___waveConfigs_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___waveConfigs_4), (void*)value);
}
inline static int32_t get_offset_of_looping_5() { return static_cast<int32_t>(offsetof(ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C, ___looping_5)); }
inline bool get_looping_5() const { return ___looping_5; }
inline bool* get_address_of_looping_5() { return &___looping_5; }
inline void set_looping_5(bool value)
{
___looping_5 = value;
}
inline static int32_t get_offset_of_startingWave_6() { return static_cast<int32_t>(offsetof(ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C, ___startingWave_6)); }
inline int32_t get_startingWave_6() const { return ___startingWave_6; }
inline int32_t* get_address_of_startingWave_6() { return &___startingWave_6; }
inline void set_startingWave_6(int32_t value)
{
___startingWave_6 = value;
}
};
// Player
struct Player_t5689617909B48F7640EA0892D85C92C13CC22C6F : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Single Player::xMin
float ___xMin_4;
// System.Single Player::xMax
float ___xMax_5;
// System.Single Player::padding
float ___padding_6;
// System.Single Player::moveSpeed
float ___moveSpeed_7;
// System.Int32 Player::health
int32_t ___health_8;
// UnityEngine.GameObject Player::deathVFX
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___deathVFX_9;
// System.Single Player::explosionDuration
float ___explosionDuration_10;
// UnityEngine.AudioClip Player::healthreduce
AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * ___healthreduce_11;
// System.Single Player::healthreducevolume
float ___healthreducevolume_12;
// GameSession Player::gameSession
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * ___gameSession_13;
// System.Int32 Player::total
int32_t ___total_14;
public:
inline static int32_t get_offset_of_xMin_4() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___xMin_4)); }
inline float get_xMin_4() const { return ___xMin_4; }
inline float* get_address_of_xMin_4() { return &___xMin_4; }
inline void set_xMin_4(float value)
{
___xMin_4 = value;
}
inline static int32_t get_offset_of_xMax_5() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___xMax_5)); }
inline float get_xMax_5() const { return ___xMax_5; }
inline float* get_address_of_xMax_5() { return &___xMax_5; }
inline void set_xMax_5(float value)
{
___xMax_5 = value;
}
inline static int32_t get_offset_of_padding_6() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___padding_6)); }
inline float get_padding_6() const { return ___padding_6; }
inline float* get_address_of_padding_6() { return &___padding_6; }
inline void set_padding_6(float value)
{
___padding_6 = value;
}
inline static int32_t get_offset_of_moveSpeed_7() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___moveSpeed_7)); }
inline float get_moveSpeed_7() const { return ___moveSpeed_7; }
inline float* get_address_of_moveSpeed_7() { return &___moveSpeed_7; }
inline void set_moveSpeed_7(float value)
{
___moveSpeed_7 = value;
}
inline static int32_t get_offset_of_health_8() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___health_8)); }
inline int32_t get_health_8() const { return ___health_8; }
inline int32_t* get_address_of_health_8() { return &___health_8; }
inline void set_health_8(int32_t value)
{
___health_8 = value;
}
inline static int32_t get_offset_of_deathVFX_9() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___deathVFX_9)); }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * get_deathVFX_9() const { return ___deathVFX_9; }
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 ** get_address_of_deathVFX_9() { return &___deathVFX_9; }
inline void set_deathVFX_9(GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * value)
{
___deathVFX_9 = value;
Il2CppCodeGenWriteBarrier((void**)(&___deathVFX_9), (void*)value);
}
inline static int32_t get_offset_of_explosionDuration_10() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___explosionDuration_10)); }
inline float get_explosionDuration_10() const { return ___explosionDuration_10; }
inline float* get_address_of_explosionDuration_10() { return &___explosionDuration_10; }
inline void set_explosionDuration_10(float value)
{
___explosionDuration_10 = value;
}
inline static int32_t get_offset_of_healthreduce_11() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___healthreduce_11)); }
inline AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * get_healthreduce_11() const { return ___healthreduce_11; }
inline AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE ** get_address_of_healthreduce_11() { return &___healthreduce_11; }
inline void set_healthreduce_11(AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * value)
{
___healthreduce_11 = value;
Il2CppCodeGenWriteBarrier((void**)(&___healthreduce_11), (void*)value);
}
inline static int32_t get_offset_of_healthreducevolume_12() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___healthreducevolume_12)); }
inline float get_healthreducevolume_12() const { return ___healthreducevolume_12; }
inline float* get_address_of_healthreducevolume_12() { return &___healthreducevolume_12; }
inline void set_healthreducevolume_12(float value)
{
___healthreducevolume_12 = value;
}
inline static int32_t get_offset_of_gameSession_13() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___gameSession_13)); }
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * get_gameSession_13() const { return ___gameSession_13; }
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 ** get_address_of_gameSession_13() { return &___gameSession_13; }
inline void set_gameSession_13(GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * value)
{
___gameSession_13 = value;
Il2CppCodeGenWriteBarrier((void**)(&___gameSession_13), (void*)value);
}
inline static int32_t get_offset_of_total_14() { return static_cast<int32_t>(offsetof(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F, ___total_14)); }
inline int32_t get_total_14() const { return ___total_14; }
inline int32_t* get_address_of_total_14() { return &___total_14; }
inline void set_total_14(int32_t value)
{
___total_14 = value;
}
};
// Shredder
struct Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8 : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// System.Int32 Shredder::scoreValue
int32_t ___scoreValue_4;
// UnityEngine.AudioClip Shredder::pointsgained
AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * ___pointsgained_5;
// System.Single Shredder::pointsgainedvolume
float ___pointsgainedvolume_6;
public:
inline static int32_t get_offset_of_scoreValue_4() { return static_cast<int32_t>(offsetof(Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8, ___scoreValue_4)); }
inline int32_t get_scoreValue_4() const { return ___scoreValue_4; }
inline int32_t* get_address_of_scoreValue_4() { return &___scoreValue_4; }
inline void set_scoreValue_4(int32_t value)
{
___scoreValue_4 = value;
}
inline static int32_t get_offset_of_pointsgained_5() { return static_cast<int32_t>(offsetof(Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8, ___pointsgained_5)); }
inline AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * get_pointsgained_5() const { return ___pointsgained_5; }
inline AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE ** get_address_of_pointsgained_5() { return &___pointsgained_5; }
inline void set_pointsgained_5(AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * value)
{
___pointsgained_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___pointsgained_5), (void*)value);
}
inline static int32_t get_offset_of_pointsgainedvolume_6() { return static_cast<int32_t>(offsetof(Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8, ___pointsgainedvolume_6)); }
inline float get_pointsgainedvolume_6() const { return ___pointsgainedvolume_6; }
inline float* get_address_of_pointsgainedvolume_6() { return &___pointsgainedvolume_6; }
inline void set_pointsgainedvolume_6(float value)
{
___pointsgainedvolume_6 = value;
}
};
// UnityEngine.EventSystems.UIBehaviour
struct UIBehaviour_tD1C6E2D542222546D68510ECE74036EFBC3C3B0E : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
public:
};
// healthDisplay
struct healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960 : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// UnityEngine.UI.Text healthDisplay::healthText
Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * ___healthText_4;
// Player healthDisplay::player
Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * ___player_5;
public:
inline static int32_t get_offset_of_healthText_4() { return static_cast<int32_t>(offsetof(healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960, ___healthText_4)); }
inline Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * get_healthText_4() const { return ___healthText_4; }
inline Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 ** get_address_of_healthText_4() { return &___healthText_4; }
inline void set_healthText_4(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * value)
{
___healthText_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___healthText_4), (void*)value);
}
inline static int32_t get_offset_of_player_5() { return static_cast<int32_t>(offsetof(healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960, ___player_5)); }
inline Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * get_player_5() const { return ___player_5; }
inline Player_t5689617909B48F7640EA0892D85C92C13CC22C6F ** get_address_of_player_5() { return &___player_5; }
inline void set_player_5(Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * value)
{
___player_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___player_5), (void*)value);
}
};
// scoreDisplay
struct scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE : public MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A
{
public:
// UnityEngine.UI.Text scoreDisplay::scoreText
Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * ___scoreText_4;
// GameSession scoreDisplay::gameSession
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * ___gameSession_5;
// System.Int32 scoreDisplay::total
int32_t ___total_6;
public:
inline static int32_t get_offset_of_scoreText_4() { return static_cast<int32_t>(offsetof(scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE, ___scoreText_4)); }
inline Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * get_scoreText_4() const { return ___scoreText_4; }
inline Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 ** get_address_of_scoreText_4() { return &___scoreText_4; }
inline void set_scoreText_4(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * value)
{
___scoreText_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___scoreText_4), (void*)value);
}
inline static int32_t get_offset_of_gameSession_5() { return static_cast<int32_t>(offsetof(scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE, ___gameSession_5)); }
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * get_gameSession_5() const { return ___gameSession_5; }
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 ** get_address_of_gameSession_5() { return &___gameSession_5; }
inline void set_gameSession_5(GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * value)
{
___gameSession_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___gameSession_5), (void*)value);
}
inline static int32_t get_offset_of_total_6() { return static_cast<int32_t>(offsetof(scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE, ___total_6)); }
inline int32_t get_total_6() const { return ___total_6; }
inline int32_t* get_address_of_total_6() { return &___total_6; }
inline void set_total_6(int32_t value)
{
___total_6 = value;
}
};
// UnityEngine.UI.Graphic
struct Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24 : public UIBehaviour_tD1C6E2D542222546D68510ECE74036EFBC3C3B0E
{
public:
// UnityEngine.Material UnityEngine.UI.Graphic::m_Material
Material_t8927C00353A72755313F046D0CE85178AE8218EE * ___m_Material_6;
// UnityEngine.Color UnityEngine.UI.Graphic::m_Color
Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 ___m_Color_7;
// System.Boolean UnityEngine.UI.Graphic::m_SkipLayoutUpdate
bool ___m_SkipLayoutUpdate_8;
// System.Boolean UnityEngine.UI.Graphic::m_SkipMaterialUpdate
bool ___m_SkipMaterialUpdate_9;
// System.Boolean UnityEngine.UI.Graphic::m_RaycastTarget
bool ___m_RaycastTarget_10;
// UnityEngine.Vector4 UnityEngine.UI.Graphic::m_RaycastPadding
Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 ___m_RaycastPadding_11;
// UnityEngine.RectTransform UnityEngine.UI.Graphic::m_RectTransform
RectTransform_t8A6A306FB29A6C8C22010CF9040E319753571072 * ___m_RectTransform_12;
// UnityEngine.CanvasRenderer UnityEngine.UI.Graphic::m_CanvasRenderer
CanvasRenderer_tCF8ABE659F7C3A6ED0D99A988D0BDFB651310F0E * ___m_CanvasRenderer_13;
// UnityEngine.Canvas UnityEngine.UI.Graphic::m_Canvas
Canvas_t2B7E56B7BDC287962E092755372E214ACB6393EA * ___m_Canvas_14;
// System.Boolean UnityEngine.UI.Graphic::m_VertsDirty
bool ___m_VertsDirty_15;
// System.Boolean UnityEngine.UI.Graphic::m_MaterialDirty
bool ___m_MaterialDirty_16;
// UnityEngine.Events.UnityAction UnityEngine.UI.Graphic::m_OnDirtyLayoutCallback
UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * ___m_OnDirtyLayoutCallback_17;
// UnityEngine.Events.UnityAction UnityEngine.UI.Graphic::m_OnDirtyVertsCallback
UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * ___m_OnDirtyVertsCallback_18;
// UnityEngine.Events.UnityAction UnityEngine.UI.Graphic::m_OnDirtyMaterialCallback
UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * ___m_OnDirtyMaterialCallback_19;
// UnityEngine.Mesh UnityEngine.UI.Graphic::m_CachedMesh
Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 * ___m_CachedMesh_22;
// UnityEngine.Vector2[] UnityEngine.UI.Graphic::m_CachedUvs
Vector2U5BU5D_tE0F58A2D6D8592B5EC37D9CDEF09103A02E5D7FA* ___m_CachedUvs_23;
// UnityEngine.UI.CoroutineTween.TweenRunner`1<UnityEngine.UI.CoroutineTween.ColorTween> UnityEngine.UI.Graphic::m_ColorTweenRunner
TweenRunner_1_tD84B9953874682FCC36990AF2C54D748293908F3 * ___m_ColorTweenRunner_24;
// System.Boolean UnityEngine.UI.Graphic::<useLegacyMeshGeneration>k__BackingField
bool ___U3CuseLegacyMeshGenerationU3Ek__BackingField_25;
public:
inline static int32_t get_offset_of_m_Material_6() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_Material_6)); }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE * get_m_Material_6() const { return ___m_Material_6; }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE ** get_address_of_m_Material_6() { return &___m_Material_6; }
inline void set_m_Material_6(Material_t8927C00353A72755313F046D0CE85178AE8218EE * value)
{
___m_Material_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_Material_6), (void*)value);
}
inline static int32_t get_offset_of_m_Color_7() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_Color_7)); }
inline Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 get_m_Color_7() const { return ___m_Color_7; }
inline Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 * get_address_of_m_Color_7() { return &___m_Color_7; }
inline void set_m_Color_7(Color_tF40DAF76C04FFECF3FE6024F85A294741C9CC659 value)
{
___m_Color_7 = value;
}
inline static int32_t get_offset_of_m_SkipLayoutUpdate_8() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_SkipLayoutUpdate_8)); }
inline bool get_m_SkipLayoutUpdate_8() const { return ___m_SkipLayoutUpdate_8; }
inline bool* get_address_of_m_SkipLayoutUpdate_8() { return &___m_SkipLayoutUpdate_8; }
inline void set_m_SkipLayoutUpdate_8(bool value)
{
___m_SkipLayoutUpdate_8 = value;
}
inline static int32_t get_offset_of_m_SkipMaterialUpdate_9() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_SkipMaterialUpdate_9)); }
inline bool get_m_SkipMaterialUpdate_9() const { return ___m_SkipMaterialUpdate_9; }
inline bool* get_address_of_m_SkipMaterialUpdate_9() { return &___m_SkipMaterialUpdate_9; }
inline void set_m_SkipMaterialUpdate_9(bool value)
{
___m_SkipMaterialUpdate_9 = value;
}
inline static int32_t get_offset_of_m_RaycastTarget_10() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_RaycastTarget_10)); }
inline bool get_m_RaycastTarget_10() const { return ___m_RaycastTarget_10; }
inline bool* get_address_of_m_RaycastTarget_10() { return &___m_RaycastTarget_10; }
inline void set_m_RaycastTarget_10(bool value)
{
___m_RaycastTarget_10 = value;
}
inline static int32_t get_offset_of_m_RaycastPadding_11() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_RaycastPadding_11)); }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 get_m_RaycastPadding_11() const { return ___m_RaycastPadding_11; }
inline Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 * get_address_of_m_RaycastPadding_11() { return &___m_RaycastPadding_11; }
inline void set_m_RaycastPadding_11(Vector4_tA56A37FC5661BCC89C3DDC24BE12BA5BCB6A02C7 value)
{
___m_RaycastPadding_11 = value;
}
inline static int32_t get_offset_of_m_RectTransform_12() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_RectTransform_12)); }
inline RectTransform_t8A6A306FB29A6C8C22010CF9040E319753571072 * get_m_RectTransform_12() const { return ___m_RectTransform_12; }
inline RectTransform_t8A6A306FB29A6C8C22010CF9040E319753571072 ** get_address_of_m_RectTransform_12() { return &___m_RectTransform_12; }
inline void set_m_RectTransform_12(RectTransform_t8A6A306FB29A6C8C22010CF9040E319753571072 * value)
{
___m_RectTransform_12 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_RectTransform_12), (void*)value);
}
inline static int32_t get_offset_of_m_CanvasRenderer_13() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_CanvasRenderer_13)); }
inline CanvasRenderer_tCF8ABE659F7C3A6ED0D99A988D0BDFB651310F0E * get_m_CanvasRenderer_13() const { return ___m_CanvasRenderer_13; }
inline CanvasRenderer_tCF8ABE659F7C3A6ED0D99A988D0BDFB651310F0E ** get_address_of_m_CanvasRenderer_13() { return &___m_CanvasRenderer_13; }
inline void set_m_CanvasRenderer_13(CanvasRenderer_tCF8ABE659F7C3A6ED0D99A988D0BDFB651310F0E * value)
{
___m_CanvasRenderer_13 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_CanvasRenderer_13), (void*)value);
}
inline static int32_t get_offset_of_m_Canvas_14() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_Canvas_14)); }
inline Canvas_t2B7E56B7BDC287962E092755372E214ACB6393EA * get_m_Canvas_14() const { return ___m_Canvas_14; }
inline Canvas_t2B7E56B7BDC287962E092755372E214ACB6393EA ** get_address_of_m_Canvas_14() { return &___m_Canvas_14; }
inline void set_m_Canvas_14(Canvas_t2B7E56B7BDC287962E092755372E214ACB6393EA * value)
{
___m_Canvas_14 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_Canvas_14), (void*)value);
}
inline static int32_t get_offset_of_m_VertsDirty_15() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_VertsDirty_15)); }
inline bool get_m_VertsDirty_15() const { return ___m_VertsDirty_15; }
inline bool* get_address_of_m_VertsDirty_15() { return &___m_VertsDirty_15; }
inline void set_m_VertsDirty_15(bool value)
{
___m_VertsDirty_15 = value;
}
inline static int32_t get_offset_of_m_MaterialDirty_16() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_MaterialDirty_16)); }
inline bool get_m_MaterialDirty_16() const { return ___m_MaterialDirty_16; }
inline bool* get_address_of_m_MaterialDirty_16() { return &___m_MaterialDirty_16; }
inline void set_m_MaterialDirty_16(bool value)
{
___m_MaterialDirty_16 = value;
}
inline static int32_t get_offset_of_m_OnDirtyLayoutCallback_17() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_OnDirtyLayoutCallback_17)); }
inline UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * get_m_OnDirtyLayoutCallback_17() const { return ___m_OnDirtyLayoutCallback_17; }
inline UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 ** get_address_of_m_OnDirtyLayoutCallback_17() { return &___m_OnDirtyLayoutCallback_17; }
inline void set_m_OnDirtyLayoutCallback_17(UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * value)
{
___m_OnDirtyLayoutCallback_17 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_OnDirtyLayoutCallback_17), (void*)value);
}
inline static int32_t get_offset_of_m_OnDirtyVertsCallback_18() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_OnDirtyVertsCallback_18)); }
inline UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * get_m_OnDirtyVertsCallback_18() const { return ___m_OnDirtyVertsCallback_18; }
inline UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 ** get_address_of_m_OnDirtyVertsCallback_18() { return &___m_OnDirtyVertsCallback_18; }
inline void set_m_OnDirtyVertsCallback_18(UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * value)
{
___m_OnDirtyVertsCallback_18 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_OnDirtyVertsCallback_18), (void*)value);
}
inline static int32_t get_offset_of_m_OnDirtyMaterialCallback_19() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_OnDirtyMaterialCallback_19)); }
inline UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * get_m_OnDirtyMaterialCallback_19() const { return ___m_OnDirtyMaterialCallback_19; }
inline UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 ** get_address_of_m_OnDirtyMaterialCallback_19() { return &___m_OnDirtyMaterialCallback_19; }
inline void set_m_OnDirtyMaterialCallback_19(UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099 * value)
{
___m_OnDirtyMaterialCallback_19 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_OnDirtyMaterialCallback_19), (void*)value);
}
inline static int32_t get_offset_of_m_CachedMesh_22() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_CachedMesh_22)); }
inline Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 * get_m_CachedMesh_22() const { return ___m_CachedMesh_22; }
inline Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 ** get_address_of_m_CachedMesh_22() { return &___m_CachedMesh_22; }
inline void set_m_CachedMesh_22(Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 * value)
{
___m_CachedMesh_22 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_CachedMesh_22), (void*)value);
}
inline static int32_t get_offset_of_m_CachedUvs_23() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_CachedUvs_23)); }
inline Vector2U5BU5D_tE0F58A2D6D8592B5EC37D9CDEF09103A02E5D7FA* get_m_CachedUvs_23() const { return ___m_CachedUvs_23; }
inline Vector2U5BU5D_tE0F58A2D6D8592B5EC37D9CDEF09103A02E5D7FA** get_address_of_m_CachedUvs_23() { return &___m_CachedUvs_23; }
inline void set_m_CachedUvs_23(Vector2U5BU5D_tE0F58A2D6D8592B5EC37D9CDEF09103A02E5D7FA* value)
{
___m_CachedUvs_23 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_CachedUvs_23), (void*)value);
}
inline static int32_t get_offset_of_m_ColorTweenRunner_24() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___m_ColorTweenRunner_24)); }
inline TweenRunner_1_tD84B9953874682FCC36990AF2C54D748293908F3 * get_m_ColorTweenRunner_24() const { return ___m_ColorTweenRunner_24; }
inline TweenRunner_1_tD84B9953874682FCC36990AF2C54D748293908F3 ** get_address_of_m_ColorTweenRunner_24() { return &___m_ColorTweenRunner_24; }
inline void set_m_ColorTweenRunner_24(TweenRunner_1_tD84B9953874682FCC36990AF2C54D748293908F3 * value)
{
___m_ColorTweenRunner_24 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_ColorTweenRunner_24), (void*)value);
}
inline static int32_t get_offset_of_U3CuseLegacyMeshGenerationU3Ek__BackingField_25() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24, ___U3CuseLegacyMeshGenerationU3Ek__BackingField_25)); }
inline bool get_U3CuseLegacyMeshGenerationU3Ek__BackingField_25() const { return ___U3CuseLegacyMeshGenerationU3Ek__BackingField_25; }
inline bool* get_address_of_U3CuseLegacyMeshGenerationU3Ek__BackingField_25() { return &___U3CuseLegacyMeshGenerationU3Ek__BackingField_25; }
inline void set_U3CuseLegacyMeshGenerationU3Ek__BackingField_25(bool value)
{
___U3CuseLegacyMeshGenerationU3Ek__BackingField_25 = value;
}
};
struct Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24_StaticFields
{
public:
// UnityEngine.Material UnityEngine.UI.Graphic::s_DefaultUI
Material_t8927C00353A72755313F046D0CE85178AE8218EE * ___s_DefaultUI_4;
// UnityEngine.Texture2D UnityEngine.UI.Graphic::s_WhiteTexture
Texture2D_t9B604D0D8E28032123641A7E7338FA872E2698BF * ___s_WhiteTexture_5;
// UnityEngine.Mesh UnityEngine.UI.Graphic::s_Mesh
Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 * ___s_Mesh_20;
// UnityEngine.UI.VertexHelper UnityEngine.UI.Graphic::s_VertexHelper
VertexHelper_tDE8B67D3B076061C4F8DF325B0D63ED2E5367E55 * ___s_VertexHelper_21;
public:
inline static int32_t get_offset_of_s_DefaultUI_4() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24_StaticFields, ___s_DefaultUI_4)); }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE * get_s_DefaultUI_4() const { return ___s_DefaultUI_4; }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE ** get_address_of_s_DefaultUI_4() { return &___s_DefaultUI_4; }
inline void set_s_DefaultUI_4(Material_t8927C00353A72755313F046D0CE85178AE8218EE * value)
{
___s_DefaultUI_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_DefaultUI_4), (void*)value);
}
inline static int32_t get_offset_of_s_WhiteTexture_5() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24_StaticFields, ___s_WhiteTexture_5)); }
inline Texture2D_t9B604D0D8E28032123641A7E7338FA872E2698BF * get_s_WhiteTexture_5() const { return ___s_WhiteTexture_5; }
inline Texture2D_t9B604D0D8E28032123641A7E7338FA872E2698BF ** get_address_of_s_WhiteTexture_5() { return &___s_WhiteTexture_5; }
inline void set_s_WhiteTexture_5(Texture2D_t9B604D0D8E28032123641A7E7338FA872E2698BF * value)
{
___s_WhiteTexture_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_WhiteTexture_5), (void*)value);
}
inline static int32_t get_offset_of_s_Mesh_20() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24_StaticFields, ___s_Mesh_20)); }
inline Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 * get_s_Mesh_20() const { return ___s_Mesh_20; }
inline Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 ** get_address_of_s_Mesh_20() { return &___s_Mesh_20; }
inline void set_s_Mesh_20(Mesh_t2F5992DBA650D5862B43D3823ACD997132A57DA6 * value)
{
___s_Mesh_20 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_Mesh_20), (void*)value);
}
inline static int32_t get_offset_of_s_VertexHelper_21() { return static_cast<int32_t>(offsetof(Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24_StaticFields, ___s_VertexHelper_21)); }
inline VertexHelper_tDE8B67D3B076061C4F8DF325B0D63ED2E5367E55 * get_s_VertexHelper_21() const { return ___s_VertexHelper_21; }
inline VertexHelper_tDE8B67D3B076061C4F8DF325B0D63ED2E5367E55 ** get_address_of_s_VertexHelper_21() { return &___s_VertexHelper_21; }
inline void set_s_VertexHelper_21(VertexHelper_tDE8B67D3B076061C4F8DF325B0D63ED2E5367E55 * value)
{
___s_VertexHelper_21 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_VertexHelper_21), (void*)value);
}
};
// UnityEngine.UI.MaskableGraphic
struct MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE : public Graphic_tF07D777035055CF93BA5F46F77ED5EDFEFF9AE24
{
public:
// System.Boolean UnityEngine.UI.MaskableGraphic::m_ShouldRecalculateStencil
bool ___m_ShouldRecalculateStencil_26;
// UnityEngine.Material UnityEngine.UI.MaskableGraphic::m_MaskMaterial
Material_t8927C00353A72755313F046D0CE85178AE8218EE * ___m_MaskMaterial_27;
// UnityEngine.UI.RectMask2D UnityEngine.UI.MaskableGraphic::m_ParentMask
RectMask2D_tD909811991B341D752E4C978C89EFB80FA7A2B15 * ___m_ParentMask_28;
// System.Boolean UnityEngine.UI.MaskableGraphic::m_Maskable
bool ___m_Maskable_29;
// System.Boolean UnityEngine.UI.MaskableGraphic::m_IsMaskingGraphic
bool ___m_IsMaskingGraphic_30;
// System.Boolean UnityEngine.UI.MaskableGraphic::m_IncludeForMasking
bool ___m_IncludeForMasking_31;
// UnityEngine.UI.MaskableGraphic_CullStateChangedEvent UnityEngine.UI.MaskableGraphic::m_OnCullStateChanged
CullStateChangedEvent_t9B69755DEBEF041C3CC15C3604610BDD72856BD4 * ___m_OnCullStateChanged_32;
// System.Boolean UnityEngine.UI.MaskableGraphic::m_ShouldRecalculate
bool ___m_ShouldRecalculate_33;
// System.Int32 UnityEngine.UI.MaskableGraphic::m_StencilValue
int32_t ___m_StencilValue_34;
// UnityEngine.Vector3[] UnityEngine.UI.MaskableGraphic::m_Corners
Vector3U5BU5D_t5FB88EAA33E46838BDC2ABDAEA3E8727491CB9E4* ___m_Corners_35;
public:
inline static int32_t get_offset_of_m_ShouldRecalculateStencil_26() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_ShouldRecalculateStencil_26)); }
inline bool get_m_ShouldRecalculateStencil_26() const { return ___m_ShouldRecalculateStencil_26; }
inline bool* get_address_of_m_ShouldRecalculateStencil_26() { return &___m_ShouldRecalculateStencil_26; }
inline void set_m_ShouldRecalculateStencil_26(bool value)
{
___m_ShouldRecalculateStencil_26 = value;
}
inline static int32_t get_offset_of_m_MaskMaterial_27() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_MaskMaterial_27)); }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE * get_m_MaskMaterial_27() const { return ___m_MaskMaterial_27; }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE ** get_address_of_m_MaskMaterial_27() { return &___m_MaskMaterial_27; }
inline void set_m_MaskMaterial_27(Material_t8927C00353A72755313F046D0CE85178AE8218EE * value)
{
___m_MaskMaterial_27 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_MaskMaterial_27), (void*)value);
}
inline static int32_t get_offset_of_m_ParentMask_28() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_ParentMask_28)); }
inline RectMask2D_tD909811991B341D752E4C978C89EFB80FA7A2B15 * get_m_ParentMask_28() const { return ___m_ParentMask_28; }
inline RectMask2D_tD909811991B341D752E4C978C89EFB80FA7A2B15 ** get_address_of_m_ParentMask_28() { return &___m_ParentMask_28; }
inline void set_m_ParentMask_28(RectMask2D_tD909811991B341D752E4C978C89EFB80FA7A2B15 * value)
{
___m_ParentMask_28 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_ParentMask_28), (void*)value);
}
inline static int32_t get_offset_of_m_Maskable_29() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_Maskable_29)); }
inline bool get_m_Maskable_29() const { return ___m_Maskable_29; }
inline bool* get_address_of_m_Maskable_29() { return &___m_Maskable_29; }
inline void set_m_Maskable_29(bool value)
{
___m_Maskable_29 = value;
}
inline static int32_t get_offset_of_m_IsMaskingGraphic_30() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_IsMaskingGraphic_30)); }
inline bool get_m_IsMaskingGraphic_30() const { return ___m_IsMaskingGraphic_30; }
inline bool* get_address_of_m_IsMaskingGraphic_30() { return &___m_IsMaskingGraphic_30; }
inline void set_m_IsMaskingGraphic_30(bool value)
{
___m_IsMaskingGraphic_30 = value;
}
inline static int32_t get_offset_of_m_IncludeForMasking_31() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_IncludeForMasking_31)); }
inline bool get_m_IncludeForMasking_31() const { return ___m_IncludeForMasking_31; }
inline bool* get_address_of_m_IncludeForMasking_31() { return &___m_IncludeForMasking_31; }
inline void set_m_IncludeForMasking_31(bool value)
{
___m_IncludeForMasking_31 = value;
}
inline static int32_t get_offset_of_m_OnCullStateChanged_32() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_OnCullStateChanged_32)); }
inline CullStateChangedEvent_t9B69755DEBEF041C3CC15C3604610BDD72856BD4 * get_m_OnCullStateChanged_32() const { return ___m_OnCullStateChanged_32; }
inline CullStateChangedEvent_t9B69755DEBEF041C3CC15C3604610BDD72856BD4 ** get_address_of_m_OnCullStateChanged_32() { return &___m_OnCullStateChanged_32; }
inline void set_m_OnCullStateChanged_32(CullStateChangedEvent_t9B69755DEBEF041C3CC15C3604610BDD72856BD4 * value)
{
___m_OnCullStateChanged_32 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_OnCullStateChanged_32), (void*)value);
}
inline static int32_t get_offset_of_m_ShouldRecalculate_33() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_ShouldRecalculate_33)); }
inline bool get_m_ShouldRecalculate_33() const { return ___m_ShouldRecalculate_33; }
inline bool* get_address_of_m_ShouldRecalculate_33() { return &___m_ShouldRecalculate_33; }
inline void set_m_ShouldRecalculate_33(bool value)
{
___m_ShouldRecalculate_33 = value;
}
inline static int32_t get_offset_of_m_StencilValue_34() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_StencilValue_34)); }
inline int32_t get_m_StencilValue_34() const { return ___m_StencilValue_34; }
inline int32_t* get_address_of_m_StencilValue_34() { return &___m_StencilValue_34; }
inline void set_m_StencilValue_34(int32_t value)
{
___m_StencilValue_34 = value;
}
inline static int32_t get_offset_of_m_Corners_35() { return static_cast<int32_t>(offsetof(MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE, ___m_Corners_35)); }
inline Vector3U5BU5D_t5FB88EAA33E46838BDC2ABDAEA3E8727491CB9E4* get_m_Corners_35() const { return ___m_Corners_35; }
inline Vector3U5BU5D_t5FB88EAA33E46838BDC2ABDAEA3E8727491CB9E4** get_address_of_m_Corners_35() { return &___m_Corners_35; }
inline void set_m_Corners_35(Vector3U5BU5D_t5FB88EAA33E46838BDC2ABDAEA3E8727491CB9E4* value)
{
___m_Corners_35 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_Corners_35), (void*)value);
}
};
// UnityEngine.UI.Text
struct Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 : public MaskableGraphic_t0DB59E37E3C8AD2F5A4FB7FB091630CB21370CCE
{
public:
// UnityEngine.UI.FontData UnityEngine.UI.Text::m_FontData
FontData_t0F1E9B3ED8136CD40782AC9A6AFB69CAD127C738 * ___m_FontData_36;
// System.String UnityEngine.UI.Text::m_Text
String_t* ___m_Text_37;
// UnityEngine.TextGenerator UnityEngine.UI.Text::m_TextCache
TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 * ___m_TextCache_38;
// UnityEngine.TextGenerator UnityEngine.UI.Text::m_TextCacheForLayout
TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 * ___m_TextCacheForLayout_39;
// System.Boolean UnityEngine.UI.Text::m_DisableFontTextureRebuiltCallback
bool ___m_DisableFontTextureRebuiltCallback_41;
// UnityEngine.UIVertex[] UnityEngine.UI.Text::m_TempVerts
UIVertexU5BU5D_tE3D523C48DFEBC775876720DE2539A79FB7E5E5A* ___m_TempVerts_42;
public:
inline static int32_t get_offset_of_m_FontData_36() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1, ___m_FontData_36)); }
inline FontData_t0F1E9B3ED8136CD40782AC9A6AFB69CAD127C738 * get_m_FontData_36() const { return ___m_FontData_36; }
inline FontData_t0F1E9B3ED8136CD40782AC9A6AFB69CAD127C738 ** get_address_of_m_FontData_36() { return &___m_FontData_36; }
inline void set_m_FontData_36(FontData_t0F1E9B3ED8136CD40782AC9A6AFB69CAD127C738 * value)
{
___m_FontData_36 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_FontData_36), (void*)value);
}
inline static int32_t get_offset_of_m_Text_37() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1, ___m_Text_37)); }
inline String_t* get_m_Text_37() const { return ___m_Text_37; }
inline String_t** get_address_of_m_Text_37() { return &___m_Text_37; }
inline void set_m_Text_37(String_t* value)
{
___m_Text_37 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_Text_37), (void*)value);
}
inline static int32_t get_offset_of_m_TextCache_38() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1, ___m_TextCache_38)); }
inline TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 * get_m_TextCache_38() const { return ___m_TextCache_38; }
inline TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 ** get_address_of_m_TextCache_38() { return &___m_TextCache_38; }
inline void set_m_TextCache_38(TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 * value)
{
___m_TextCache_38 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_TextCache_38), (void*)value);
}
inline static int32_t get_offset_of_m_TextCacheForLayout_39() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1, ___m_TextCacheForLayout_39)); }
inline TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 * get_m_TextCacheForLayout_39() const { return ___m_TextCacheForLayout_39; }
inline TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 ** get_address_of_m_TextCacheForLayout_39() { return &___m_TextCacheForLayout_39; }
inline void set_m_TextCacheForLayout_39(TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70 * value)
{
___m_TextCacheForLayout_39 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_TextCacheForLayout_39), (void*)value);
}
inline static int32_t get_offset_of_m_DisableFontTextureRebuiltCallback_41() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1, ___m_DisableFontTextureRebuiltCallback_41)); }
inline bool get_m_DisableFontTextureRebuiltCallback_41() const { return ___m_DisableFontTextureRebuiltCallback_41; }
inline bool* get_address_of_m_DisableFontTextureRebuiltCallback_41() { return &___m_DisableFontTextureRebuiltCallback_41; }
inline void set_m_DisableFontTextureRebuiltCallback_41(bool value)
{
___m_DisableFontTextureRebuiltCallback_41 = value;
}
inline static int32_t get_offset_of_m_TempVerts_42() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1, ___m_TempVerts_42)); }
inline UIVertexU5BU5D_tE3D523C48DFEBC775876720DE2539A79FB7E5E5A* get_m_TempVerts_42() const { return ___m_TempVerts_42; }
inline UIVertexU5BU5D_tE3D523C48DFEBC775876720DE2539A79FB7E5E5A** get_address_of_m_TempVerts_42() { return &___m_TempVerts_42; }
inline void set_m_TempVerts_42(UIVertexU5BU5D_tE3D523C48DFEBC775876720DE2539A79FB7E5E5A* value)
{
___m_TempVerts_42 = value;
Il2CppCodeGenWriteBarrier((void**)(&___m_TempVerts_42), (void*)value);
}
};
struct Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_StaticFields
{
public:
// UnityEngine.Material UnityEngine.UI.Text::s_DefaultText
Material_t8927C00353A72755313F046D0CE85178AE8218EE * ___s_DefaultText_40;
public:
inline static int32_t get_offset_of_s_DefaultText_40() { return static_cast<int32_t>(offsetof(Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_StaticFields, ___s_DefaultText_40)); }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE * get_s_DefaultText_40() const { return ___s_DefaultText_40; }
inline Material_t8927C00353A72755313F046D0CE85178AE8218EE ** get_address_of_s_DefaultText_40() { return &___s_DefaultText_40; }
inline void set_s_DefaultText_40(Material_t8927C00353A72755313F046D0CE85178AE8218EE * value)
{
___s_DefaultText_40 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_DefaultText_40), (void*)value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// GameSession[]
struct GameSessionU5BU5D_t61574D5AF894B8E93C237EA134E0CF350A34619D : public RuntimeArray
{
public:
ALIGN_FIELD (8) GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * m_Items[1];
public:
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// UnityEngine.Object[]
struct ObjectU5BU5D_t1256A8B00BB71C7F582BF08257BE4F826FF64873 : public RuntimeArray
{
public:
ALIGN_FIELD (8) Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * m_Items[1];
public:
inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline Object_tF2F3778131EFF286AF62B7B013A170F95A91571A ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Object[]
struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE : public RuntimeArray
{
public:
ALIGN_FIELD (8) RuntimeObject * m_Items[1];
public:
inline RuntimeObject * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline RuntimeObject ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, RuntimeObject * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline RuntimeObject * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline RuntimeObject ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, RuntimeObject * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// !!0 UnityEngine.Component::GetComponent<System.Object>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * Component_GetComponent_TisRuntimeObject_m69D9C576D6DD024C709E29EEADBC8041299A3AA7_gshared (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 * __this, const RuntimeMethod* method);
// !!0 UnityEngine.Object::Instantiate<System.Object>(!!0,UnityEngine.Vector3,UnityEngine.Quaternion)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * Object_Instantiate_TisRuntimeObject_mB05DEC51C29EF5BB8BD17D055E80217F11E571AA_gshared (RuntimeObject * ___original0, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position1, Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation2, const RuntimeMethod* method);
// !!0[] UnityEngine.Object::FindObjectsOfType<System.Object>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* Object_FindObjectsOfType_TisRuntimeObject_m0015B67D48097755F4D6B1D2614DA7ED5C899F18_gshared (const RuntimeMethod* method);
// !!0 UnityEngine.Object::FindObjectOfType<System.Object>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * Object_FindObjectOfType_TisRuntimeObject_m25AA6DB6AABFD5D66AFA1A8C0E91A7AF61429C37_gshared (const RuntimeMethod* method);
// !!0 UnityEngine.GameObject::GetComponent<System.Object>()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * GameObject_GetComponent_TisRuntimeObject_mCE43118393A796C759AC5D43257AB2330881767D_gshared (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, const RuntimeMethod* method);
// !0 System.Collections.Generic.List`1<System.Object>::get_Item(System.Int32)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR RuntimeObject * List_1_get_Item_mF00B574E58FB078BB753B05A3B86DD0A7A266B63_gshared_inline (List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 * __this, int32_t ___index0, const RuntimeMethod* method);
// System.Int32 System.Collections.Generic.List`1<System.Object>::get_Count()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t List_1_get_Count_m5D847939ABB9A78203B062CAFFE975792174D00F_gshared_inline (List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 * __this, const RuntimeMethod* method);
// System.Void System.Collections.Generic.List`1<System.Object>::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void List_1__ctor_m0F0E00088CF56FEACC9E32D8B7D91B93D91DAA3B_gshared (List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 * __this, const RuntimeMethod* method);
// System.Void System.Collections.Generic.List`1<System.Object>::Add(!0)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void List_1_Add_mE5B3CBB3A625606D9BC4337FEAAF1D66BCB6F96E_gshared (List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 * __this, RuntimeObject * ___item0, const RuntimeMethod* method);
// !!0 UnityEngine.Component::GetComponent<UnityEngine.Renderer>()
inline Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C * Component_GetComponent_TisRenderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C_m436E5B0F17DDEF3CC61F77DEA82B1A92668AF019 (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 * __this, const RuntimeMethod* method)
{
return (( Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C * (*) (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 *, const RuntimeMethod*))Component_GetComponent_TisRuntimeObject_m69D9C576D6DD024C709E29EEADBC8041299A3AA7_gshared)(__this, method);
}
// UnityEngine.Material UnityEngine.Renderer::get_material()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Material_t8927C00353A72755313F046D0CE85178AE8218EE * Renderer_get_material_mE6B01125502D08EE0D6DFE2EAEC064AD9BB31804 (Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C * __this, const RuntimeMethod* method);
// System.Void UnityEngine.Vector2::.ctor(System.Single,System.Single)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * __this, float ___x0, float ___y1, const RuntimeMethod* method);
// UnityEngine.Vector2 UnityEngine.Material::get_mainTextureOffset()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Material_get_mainTextureOffset_m515864AC74B322365689879CC668D001C41577D4 (Material_t8927C00353A72755313F046D0CE85178AE8218EE * __this, const RuntimeMethod* method);
// System.Single UnityEngine.Time::get_deltaTime()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Time_get_deltaTime_mCC15F147DA67F38C74CE408FB5D7FF4A87DA2290 (const RuntimeMethod* method);
// UnityEngine.Vector2 UnityEngine.Vector2::op_Multiply(UnityEngine.Vector2,System.Single)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_op_Multiply_mC7A7802352867555020A90205EBABA56EE5E36CB_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___a0, float ___d1, const RuntimeMethod* method);
// UnityEngine.Vector2 UnityEngine.Vector2::op_Addition(UnityEngine.Vector2,UnityEngine.Vector2)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_op_Addition_m5EACC2AEA80FEE29F380397CF1F4B11D04BE71CC_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___a0, Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___b1, const RuntimeMethod* method);
// System.Void UnityEngine.Material::set_mainTextureOffset(UnityEngine.Vector2)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Material_set_mainTextureOffset_m3045530900C547D17F181858EC245CC02CA5F3FE (Material_t8927C00353A72755313F046D0CE85178AE8218EE * __this, Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___value0, const RuntimeMethod* method);
// System.Void UnityEngine.MonoBehaviour::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED (MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A * __this, const RuntimeMethod* method);
// UnityEngine.GameObject UnityEngine.Component::get_gameObject()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 * __this, const RuntimeMethod* method);
// System.Void UnityEngine.Object::Destroy(UnityEngine.Object)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30 (Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * ___obj0, const RuntimeMethod* method);
// UnityEngine.Transform UnityEngine.Component::get_transform()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 * __this, const RuntimeMethod* method);
// UnityEngine.Vector3 UnityEngine.Transform::get_position()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341 (Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * __this, const RuntimeMethod* method);
// UnityEngine.Quaternion UnityEngine.Quaternion::get_identity()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 Quaternion_get_identity_mF2E565DBCE793A1AE6208056D42CA7C59D83A702 (const RuntimeMethod* method);
// !!0 UnityEngine.Object::Instantiate<UnityEngine.GameObject>(!!0,UnityEngine.Vector3,UnityEngine.Quaternion)
inline GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * ___original0, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position1, Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 ___rotation2, const RuntimeMethod* method)
{
return (( GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * (*) (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 *, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E , Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 , const RuntimeMethod*))Object_Instantiate_TisRuntimeObject_mB05DEC51C29EF5BB8BD17D055E80217F11E571AA_gshared)(___original0, ___position1, ___rotation2, method);
}
// System.Void UnityEngine.Object::Destroy(UnityEngine.Object,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object_Destroy_mAAAA103F4911E9FA18634BF9605C28559F5E2AC7 (Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * ___obj0, float ___t1, const RuntimeMethod* method);
// System.Void GameSession::SetUpSingleton()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_SetUpSingleton_m3EBBFD4F49CBAE3FF13F8EE16DF19D53DB43DAA8 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method);
// !!0[] UnityEngine.Object::FindObjectsOfType<GameSession>()
inline GameSessionU5BU5D_t61574D5AF894B8E93C237EA134E0CF350A34619D* Object_FindObjectsOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mB78770BA28598B62C52F073A37CA89FB7FEB94A7 (const RuntimeMethod* method)
{
return (( GameSessionU5BU5D_t61574D5AF894B8E93C237EA134E0CF350A34619D* (*) (const RuntimeMethod*))Object_FindObjectsOfType_TisRuntimeObject_m0015B67D48097755F4D6B1D2614DA7ED5C899F18_gshared)(method);
}
// System.Void UnityEngine.Object::DontDestroyOnLoad(UnityEngine.Object)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object_DontDestroyOnLoad_m03007A68ABBA4CCD8C27B944964983395E7640F9 (Object_tF2F3778131EFF286AF62B7B013A170F95A91571A * ___target0, const RuntimeMethod* method);
// System.Void UnityEngine.SceneManagement.SceneManager::LoadScene(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void SceneManager_LoadScene_m5550E6368A6D0E37DACEDA3C5E4BA331836BC3C5 (int32_t ___sceneBuildIndex0, const RuntimeMethod* method);
// System.Void UnityEngine.SceneManagement.SceneManager::LoadScene(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void SceneManager_LoadScene_m7DAF30213E99396ECBDB1BD40CC34CCF36902092 (String_t* ___sceneName0, const RuntimeMethod* method);
// !!0 UnityEngine.Object::FindObjectOfType<GameSession>()
inline GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF (const RuntimeMethod* method)
{
return (( GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * (*) (const RuntimeMethod*))Object_FindObjectOfType_TisRuntimeObject_m25AA6DB6AABFD5D66AFA1A8C0E91A7AF61429C37_gshared)(method);
}
// System.Void GameSession::ResetGame()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_ResetGame_m5AAA74149896637E8655D08CFC4F8FA11F92A152 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method);
// System.Collections.IEnumerator Level::WaitAndLoad()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* Level_WaitAndLoad_m247CF14285F9A3D2A571824CC832485FA1970CCE (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method);
// UnityEngine.Coroutine UnityEngine.MonoBehaviour::StartCoroutine(System.Collections.IEnumerator)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7 * MonoBehaviour_StartCoroutine_m3E33706D38B23CDD179E99BAD61E32303E9CC719 (MonoBehaviour_t37A501200D970A8257124B0EAE00A0FF3DDC354A * __this, RuntimeObject* ___routine0, const RuntimeMethod* method);
// System.Collections.IEnumerator Level::WaitAndLoad2()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* Level_WaitAndLoad2_mCB8256F7180B8A3D99CBF370866F464BE7A018B6 (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method);
// System.Void UnityEngine.Application::Quit()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Application_Quit_m8D720E5092786C2EE32310D85FE61C253D3B1F2A (const RuntimeMethod* method);
// System.Void Level/<WaitAndLoad>d__6::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoadU3Ed__6__ctor_m6E15D03F4F6813C63EF4EAD64F232DE49615D699 (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method);
// System.Void Level/<WaitAndLoad2>d__7::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoad2U3Ed__7__ctor_m07A2F6BB107CDBCB26AA5509F2B102C5B04BC2BB (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method);
// System.Void MusicPlayer::SetUpSingleton()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void MusicPlayer_SetUpSingleton_m19A6DE140ED2A0F7B4E06592123C60FC8CCAA60B (MusicPlayer_tED49C79A2679189A904E6BC22CD55275F67D4D7D * __this, const RuntimeMethod* method);
// System.Type System.Object::GetType()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Type_t * Object_GetType_m571FE8360C10B98C23AAF1F066D92C08CC94F45B (RuntimeObject * __this, const RuntimeMethod* method);
// UnityEngine.Object[] UnityEngine.Object::FindObjectsOfType(System.Type)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR ObjectU5BU5D_t1256A8B00BB71C7F582BF08257BE4F826FF64873* Object_FindObjectsOfType_m6E4A383F89274D0F316FDDA39745C59025A11B02 (Type_t * ___type0, const RuntimeMethod* method);
// System.Single UnityEngine.Random::Range(System.Single,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Random_Range_mC15372D42A9ABDCAC3DE82E114D60A40C9C311D2 (float ___min0, float ___max1, const RuntimeMethod* method);
// System.Void Obstracle::CountDownAndShoot()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle_CountDownAndShoot_mA5F907B15B92F2B5C523E3928AEF0D657FFE9840 (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method);
// System.Void Obstracle::ObstacleFire()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle_ObstacleFire_m7068067A06DAAFF23C302C2E492DDBA7DDC2007B (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method);
// !!0 UnityEngine.GameObject::GetComponent<UnityEngine.Rigidbody2D>()
inline Rigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5 * GameObject_GetComponent_TisRigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5_mE749A8DAAB8733CB623A476DC361B88581AF3E40 (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, const RuntimeMethod* method)
{
return (( Rigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5 * (*) (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 *, const RuntimeMethod*))GameObject_GetComponent_TisRuntimeObject_mCE43118393A796C759AC5D43257AB2330881767D_gshared)(__this, method);
}
// System.Void UnityEngine.Rigidbody2D::set_velocity(UnityEngine.Vector2)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Rigidbody2D_set_velocity_m56B745344E78C85462843AE623BF0A40764FC2DA (Rigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5 * __this, Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___value0, const RuntimeMethod* method);
// System.Collections.Generic.List`1<UnityEngine.Transform> WaveConfig::GetWaypoints()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * WaveConfig_GetWaypoints_m967B53EF4FA329D74809A4A70DD91090E5599D70 (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method);
// !0 System.Collections.Generic.List`1<UnityEngine.Transform>::get_Item(System.Int32)
inline Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_inline (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * __this, int32_t ___index0, const RuntimeMethod* method)
{
return (( Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * (*) (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 *, int32_t, const RuntimeMethod*))List_1_get_Item_mF00B574E58FB078BB753B05A3B86DD0A7A266B63_gshared_inline)(__this, ___index0, method);
}
// System.Void UnityEngine.Transform::set_position(UnityEngine.Vector3)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Transform_set_position_mB169E52D57EEAC1E3F22C5395968714E4F00AC91 (Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * __this, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___value0, const RuntimeMethod* method);
// System.Void ObstraclePathing::EnemyMove()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstraclePathing_EnemyMove_m51F6E92DB61E771DB178CE2A23A9CCE8D8999AD7 (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, const RuntimeMethod* method);
// System.Int32 System.Collections.Generic.List`1<UnityEngine.Transform>::get_Count()
inline int32_t List_1_get_Count_m82AF14687C6FA2B1572D859A551E3ADBCBADC3C0_inline (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * __this, const RuntimeMethod* method)
{
return (( int32_t (*) (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 *, const RuntimeMethod*))List_1_get_Count_m5D847939ABB9A78203B062CAFFE975792174D00F_gshared_inline)(__this, method);
}
// System.Single WaveConfig::GetEnemyMoveSpeed()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float WaveConfig_GetEnemyMoveSpeed_mD4BC5E513CEE4EA5E998627C083A25947386911D_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method);
// UnityEngine.Vector2 UnityEngine.Vector2::op_Implicit(UnityEngine.Vector3)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_op_Implicit_mE407CAF7446E342E059B00AA9EDB301AEC5B7B1A_inline (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___v0, const RuntimeMethod* method);
// UnityEngine.Vector2 UnityEngine.Vector2::MoveTowards(UnityEngine.Vector2,UnityEngine.Vector2,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_MoveTowards_m1EC393CAB6ACD04D7A7856F02169D22FD61CDB89 (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___current0, Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___target1, float ___maxDistanceDelta2, const RuntimeMethod* method);
// UnityEngine.Vector3 UnityEngine.Vector2::op_Implicit(UnityEngine.Vector2)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E Vector2_op_Implicit_m4FA146E613DBFE6C1C4B0E9B461D622E6F2FC294_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___v0, const RuntimeMethod* method);
// System.Boolean UnityEngine.Vector3::op_Equality(UnityEngine.Vector3,UnityEngine.Vector3)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Vector3_op_Equality_m8A98C7F38641110A2F90445EF8E98ECE14B08296 (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___lhs0, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___rhs1, const RuntimeMethod* method);
// System.Void ObstracleSpawner/<Start>d__3::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CStartU3Ed__3__ctor_mA020D6CA49B3E2DE0FEA8043D7B5905E4E0DCA8B (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method);
// System.Void ObstracleSpawner/<SpawnAllEnemiesInWave>d__4::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllEnemiesInWaveU3Ed__4__ctor_mDCE8CD81C03F2BA3331F0D59091A232DB1259245 (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method);
// System.Void ObstracleSpawner/<SpawnAllWaves>d__5::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllWavesU3Ed__5__ctor_m9B00522E9673F1638538E957D1A4E7DC6A23FD81 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method);
// System.Void Player::SetUpMoveBoundaries()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_SetUpMoveBoundaries_mACB7B8BB227FC2A4CA535674611703B02F8180A8 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method);
// System.Void Player::Move()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_Move_mBA49290713053DFE90D02C9B5E38353A71C1E0C8 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method);
// System.Single UnityEngine.Input::GetAxis(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Input_GetAxis_m939297DEB2ECF8D8D09AD66EB69979AAD2B62326 (String_t* ___axisName0, const RuntimeMethod* method);
// System.Single UnityEngine.Mathf::Clamp(System.Single,System.Single,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float Mathf_Clamp_m2416F3B785C8F135863E3D17E5B0CB4174797B87 (float ___value0, float ___min1, float ___max2, const RuntimeMethod* method);
// UnityEngine.Camera UnityEngine.Camera::get_main()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * Camera_get_main_mC337C621B91591CEF89504C97EF64D717C12871C (const RuntimeMethod* method);
// System.Void UnityEngine.Vector3::.ctor(System.Single,System.Single,System.Single)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method);
// UnityEngine.Vector3 UnityEngine.Camera::ViewportToWorldPoint(UnityEngine.Vector3)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E Camera_ViewportToWorldPoint_m1273EE3868551C6FF551ABA9A76DC7D66E883116 (Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * __this, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position0, const RuntimeMethod* method);
// !!0 UnityEngine.GameObject::GetComponent<DamageDealer>()
inline DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * GameObject_GetComponent_TisDamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6_m2C32305EC1E55E718D9BB7321AF27D4231F0664E (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, const RuntimeMethod* method)
{
return (( DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * (*) (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 *, const RuntimeMethod*))GameObject_GetComponent_TisRuntimeObject_mCE43118393A796C759AC5D43257AB2330881767D_gshared)(__this, method);
}
// !!0 UnityEngine.GameObject::GetComponent<Explosion>()
inline Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * GameObject_GetComponent_TisExplosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED_m9137649A5BC5D0B72F5766AC2FA647E1D3ABCB78 (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, const RuntimeMethod* method)
{
return (( Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * (*) (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 *, const RuntimeMethod*))GameObject_GetComponent_TisRuntimeObject_mCE43118393A796C759AC5D43257AB2330881767D_gshared)(__this, method);
}
// System.Boolean UnityEngine.GameObject::CompareTag(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool GameObject_CompareTag_mA692D8508984DBE4A2FEFD19E29CB1C9D5CDE001 (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, String_t* ___tag0, const RuntimeMethod* method);
// System.Void Player::ProcessHit(DamageDealer)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_ProcessHit_mCBFF65ACF52F604E30DA7B868C6D57597E5A46EA (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * ___damage0, const RuntimeMethod* method);
// System.Void Explosion::ObstracleExplosion()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Explosion_ObstracleExplosion_m1650B0A466630C2AA8B7725B217877784151A6B3 (Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * __this, const RuntimeMethod* method);
// System.Int32 DamageDealer::GetDamage()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t DamageDealer_GetDamage_mACE71A6C2E3690BD4B5573A247846EDDE0BF7C9A_inline (DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * __this, const RuntimeMethod* method);
// System.Void UnityEngine.AudioSource::PlayClipAtPoint(UnityEngine.AudioClip,UnityEngine.Vector3,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AudioSource_PlayClipAtPoint_m1DB4B29B9FBCF0832AB7855AD2B2B319322B61FC (AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * ___clip0, Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___position1, float ___volume2, const RuntimeMethod* method);
// System.Void DamageDealer::Hit()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void DamageDealer_Hit_m25098E8BE8713BACB0B71CBCA7638785E013FD2C (DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * __this, const RuntimeMethod* method);
// System.Int32 GameSession::GetScore()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t GameSession_GetScore_m261421177B31C07760F0942659EDCC341C24E7FD_inline (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method);
// System.Void Player::Die()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_Die_m16A200929DBDF9FF88C8191A26327C2CCCC80C19 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method);
// !!0 UnityEngine.Object::FindObjectOfType<Level>()
inline Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * Object_FindObjectOfType_TisLevel_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93_m715012CCED83C1A1A1AD32A3A09C651792748CD8 (const RuntimeMethod* method)
{
return (( Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * (*) (const RuntimeMethod*))Object_FindObjectOfType_TisRuntimeObject_m25AA6DB6AABFD5D66AFA1A8C0E91A7AF61429C37_gshared)(method);
}
// System.Void Level::LoadGameOver()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_LoadGameOver_mD8D2FF13AD824851031F3C9396CFF0467D1BD072 (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method);
// System.Void GameSession::AddToScore(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_AddToScore_m25B41713BA1B9089BD1E3E644D71951C6DBBEE14 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, int32_t ___scoreValue0, const RuntimeMethod* method);
// System.Void System.Collections.Generic.List`1<UnityEngine.Transform>::.ctor()
inline void List_1__ctor_mF1D464BA700E6389AEA8AF2F197270F387D9A41F (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * __this, const RuntimeMethod* method)
{
(( void (*) (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 *, const RuntimeMethod*))List_1__ctor_m0F0E00088CF56FEACC9E32D8B7D91B93D91DAA3B_gshared)(__this, method);
}
// UnityEngine.Transform UnityEngine.GameObject::get_transform()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * GameObject_get_transform_m16A80BB92B6C8C5AB696E447014D45EDF1E4DE34 (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, const RuntimeMethod* method);
// System.Collections.IEnumerator UnityEngine.Transform::GetEnumerator()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* Transform_GetEnumerator_mBA0E884A69F0AA05FCB69F4EE5F700177F75DD7E (Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * __this, const RuntimeMethod* method);
// System.Void System.Collections.Generic.List`1<UnityEngine.Transform>::Add(!0)
inline void List_1_Add_m7AB707ADE023585729593334A399B3FF485A7982 (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * __this, Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * ___item0, const RuntimeMethod* method)
{
(( void (*) (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 *, Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 *, const RuntimeMethod*))List_1_Add_mE5B3CBB3A625606D9BC4337FEAAF1D66BCB6F96E_gshared)(__this, ___item0, method);
}
// System.Void UnityEngine.ScriptableObject::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063 (ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A * __this, const RuntimeMethod* method);
// !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Text>()
inline Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * Component_GetComponent_TisText_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_m2D99AC2081683F963C56EC738451EC0B59B5D137 (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 * __this, const RuntimeMethod* method)
{
return (( Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * (*) (Component_t62FBC8D2420DA4BE9037AFE430740F6B3EECA684 *, const RuntimeMethod*))Component_GetComponent_TisRuntimeObject_m69D9C576D6DD024C709E29EEADBC8041299A3AA7_gshared)(__this, method);
}
// !!0 UnityEngine.Object::FindObjectOfType<Player>()
inline Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * Object_FindObjectOfType_TisPlayer_t5689617909B48F7640EA0892D85C92C13CC22C6F_m3CAE7179B3FA6FD24CA1F0D12C0043AE34660491 (const RuntimeMethod* method)
{
return (( Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * (*) (const RuntimeMethod*))Object_FindObjectOfType_TisRuntimeObject_m25AA6DB6AABFD5D66AFA1A8C0E91A7AF61429C37_gshared)(method);
}
// System.Int32 Player::GetHealth()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t Player_GetHealth_m258C63EDD1D293DA477E9D375D04AF88598B75E5_inline (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method);
// System.String System.Int32::ToString()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* Int32_ToString_m340C0A14D16799421EFDF8A81C8A16FA76D48411 (int32_t* __this, const RuntimeMethod* method);
// System.Void Level::LoadWinner()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_LoadWinner_m34C047B9B1C0C21C179302CB3D2713EAE3B8EB5A (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method);
// System.Void System.Object::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405 (RuntimeObject * __this, const RuntimeMethod* method);
// System.Void UnityEngine.WaitForSeconds::.ctor(System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void WaitForSeconds__ctor_mD298C4CB9532BBBDE172FC40F3397E30504038D4 (WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 * __this, float ___seconds0, const RuntimeMethod* method);
// System.Void System.NotSupportedException::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void NotSupportedException__ctor_m3EA81A5B209A87C3ADA47443F2AFFF735E5256EE (NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 * __this, const RuntimeMethod* method);
// UnityEngine.GameObject WaveConfig::GetEnemyPrefab()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * WaveConfig_GetEnemyPrefab_m3FA01EC667D1DAD66E4A898DD5E04998B41A76C3_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method);
// !!0 UnityEngine.GameObject::GetComponent<ObstraclePathing>()
inline ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * GameObject_GetComponent_TisObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA_mDF330179D9470FCD12B729511DD9EEF8FB18D09C (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * __this, const RuntimeMethod* method)
{
return (( ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * (*) (GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 *, const RuntimeMethod*))GameObject_GetComponent_TisRuntimeObject_mCE43118393A796C759AC5D43257AB2330881767D_gshared)(__this, method);
}
// System.Void ObstraclePathing::SetWaveConfig(WaveConfig)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void ObstraclePathing_SetWaveConfig_mBD057DAAF238FE5C55ECF163D562E245AFC0B0FB_inline (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfigToSet0, const RuntimeMethod* method);
// System.Single WaveConfig::GetTimeBetweenSpawns()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float WaveConfig_GetTimeBetweenSpawns_m19729DCB6B94BCC9D8E9FA275B7FA9E40C32E880_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method);
// System.Int32 WaveConfig::GetNumberOfEnemies()
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t WaveConfig_GetNumberOfEnemies_mACD21FB3F34347F81B93262A8B265AB1348A76D2_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method);
// !0 System.Collections.Generic.List`1<WaveConfig>::get_Item(System.Int32)
inline WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * List_1_get_Item_mAF23B53788FF4378EB454334302BACF73C67E9AE_inline (List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * __this, int32_t ___index0, const RuntimeMethod* method)
{
return (( WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * (*) (List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 *, int32_t, const RuntimeMethod*))List_1_get_Item_mF00B574E58FB078BB753B05A3B86DD0A7A266B63_gshared_inline)(__this, ___index0, method);
}
// System.Collections.IEnumerator ObstracleSpawner::SpawnAllEnemiesInWave(WaveConfig)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* ObstracleSpawner_SpawnAllEnemiesInWave_m8F08495B145475CB6C37803D36A5F1F97310F363 (ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * __this, WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfig0, const RuntimeMethod* method);
// System.Int32 System.Collections.Generic.List`1<WaveConfig>::get_Count()
inline int32_t List_1_get_Count_m4972DA385A5D70F06D60432A661E720635EDFEC3_inline (List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * __this, const RuntimeMethod* method)
{
return (( int32_t (*) (List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 *, const RuntimeMethod*))List_1_get_Count_m5D847939ABB9A78203B062CAFFE975792174D00F_gshared_inline)(__this, method);
}
// System.Collections.IEnumerator ObstracleSpawner::SpawnAllWaves()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* ObstracleSpawner_SpawnAllWaves_mF9CF231D029E12A8C0291ED781A58FCA853A2CFE (ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * __this, const RuntimeMethod* method);
// System.Void System.ThrowHelper::ThrowArgumentOutOfRangeException()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ThrowHelper_ThrowArgumentOutOfRangeException_m4841366ABC2B2AFA37C10900551D7E07522C0929 (const RuntimeMethod* method);
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void BackgroundScroller::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void BackgroundScroller_Start_mE4167530D769FE00F53556574705AE761E4D6544 (BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BackgroundScroller_Start_mE4167530D769FE00F53556574705AE761E4D6544_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// myMaterial = GetComponent<Renderer>().material; // Get the background material from the renderer component
Renderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C * L_0 = Component_GetComponent_TisRenderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C_m436E5B0F17DDEF3CC61F77DEA82B1A92668AF019(__this, /*hidden argument*/Component_GetComponent_TisRenderer_t58147AB5B00224FE1460FD47542DC0DA7EC9378C_m436E5B0F17DDEF3CC61F77DEA82B1A92668AF019_RuntimeMethod_var);
NullCheck(L_0);
Material_t8927C00353A72755313F046D0CE85178AE8218EE * L_1 = Renderer_get_material_mE6B01125502D08EE0D6DFE2EAEC064AD9BB31804(L_0, /*hidden argument*/NULL);
__this->set_myMaterial_5(L_1);
// offSet = new Vector2(0f, backgroundScrollSpeed); // To scroll in the y-axis at the speed
float L_2 = __this->get_backgroundScrollSpeed_4();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_3;
memset((&L_3), 0, sizeof(L_3));
Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline((&L_3), (0.0f), L_2, /*hidden argument*/NULL);
__this->set_offSet_6(L_3);
// }
return;
}
}
// System.Void BackgroundScroller::Update()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void BackgroundScroller_Update_m4DA04F8EB8FE8ED936C1EAA93EFCB904AA8AA457 (BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BackgroundScroller_Update_m4DA04F8EB8FE8ED936C1EAA93EFCB904AA8AA457_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// myMaterial.mainTextureOffset += offSet * Time.deltaTime; // Moving the myMaterial.mainTextureOffset by offSet every frame
Material_t8927C00353A72755313F046D0CE85178AE8218EE * L_0 = __this->get_myMaterial_5();
Material_t8927C00353A72755313F046D0CE85178AE8218EE * L_1 = L_0;
NullCheck(L_1);
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_2 = Material_get_mainTextureOffset_m515864AC74B322365689879CC668D001C41577D4(L_1, /*hidden argument*/NULL);
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_3 = __this->get_offSet_6();
float L_4 = Time_get_deltaTime_mCC15F147DA67F38C74CE408FB5D7FF4A87DA2290(/*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_il2cpp_TypeInfo_var);
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_5 = Vector2_op_Multiply_mC7A7802352867555020A90205EBABA56EE5E36CB_inline(L_3, L_4, /*hidden argument*/NULL);
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_6 = Vector2_op_Addition_m5EACC2AEA80FEE29F380397CF1F4B11D04BE71CC_inline(L_2, L_5, /*hidden argument*/NULL);
NullCheck(L_1);
Material_set_mainTextureOffset_m3045530900C547D17F181858EC245CC02CA5F3FE(L_1, L_6, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void BackgroundScroller::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void BackgroundScroller__ctor_m5694164FDC22FFE5A19A3538CC6A0BA7FE328933 (BackgroundScroller_t0A4783DD437DF3FDAF8B2C4B1EAE1074EC074D01 * __this, const RuntimeMethod* method)
{
{
// [SerializeField] float backgroundScrollSpeed = 0.02f; // The background scrolling speed
__this->set_backgroundScrollSpeed_4((0.0199999996f));
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int32 DamageDealer::GetDamage()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t DamageDealer_GetDamage_mACE71A6C2E3690BD4B5573A247846EDDE0BF7C9A (DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * __this, const RuntimeMethod* method)
{
{
// return damage; // Gets the damage
int32_t L_0 = __this->get_damage_4();
return L_0;
}
}
// System.Void DamageDealer::Hit()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void DamageDealer_Hit_m25098E8BE8713BACB0B71CBCA7638785E013FD2C (DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (DamageDealer_Hit_m25098E8BE8713BACB0B71CBCA7638785E013FD2C_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// Destroy(gameObject); // Destroys object
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_0, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void DamageDealer::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void DamageDealer__ctor_m089537C3DC7DE8C9FE32928F59784268ED3B3F2A (DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Explosion::ObstracleExplosion()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Explosion_ObstracleExplosion_m1650B0A466630C2AA8B7725B217877784151A6B3 (Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Explosion_ObstracleExplosion_m1650B0A466630C2AA8B7725B217877784151A6B3_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// GameObject explosion = Instantiate(deathVFX, transform.position, Quaternion.identity); // Creates an explosion particle
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = __this->get_deathVFX_4();
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_1 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_1);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_2 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_1, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_il2cpp_TypeInfo_var);
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 L_3 = Quaternion_get_identity_mF2E565DBCE793A1AE6208056D42CA7C59D83A702(/*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_4 = Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B(L_0, L_2, L_3, /*hidden argument*/Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B_RuntimeMethod_var);
// Destroy(explosion, 1f); // Destroys the explosion after 1 sec
Object_Destroy_mAAAA103F4911E9FA18634BF9605C28559F5E2AC7(L_4, (1.0f), /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Explosion::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Explosion__ctor_m1400515C43124E852380BB8283E15042AF0A5094 (Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void GameSession::Awake()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_Awake_m7DA48EED2DD2C071B858C834D8EE6F4BAD3890E6 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method)
{
{
// SetUpSingleton();
GameSession_SetUpSingleton_m3EBBFD4F49CBAE3FF13F8EE16DF19D53DB43DAA8(__this, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void GameSession::SetUpSingleton()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_SetUpSingleton_m3EBBFD4F49CBAE3FF13F8EE16DF19D53DB43DAA8 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (GameSession_SetUpSingleton_m3EBBFD4F49CBAE3FF13F8EE16DF19D53DB43DAA8_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// int numberGameSessions = FindObjectsOfType<GameSession>().Length;
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameSessionU5BU5D_t61574D5AF894B8E93C237EA134E0CF350A34619D* L_0 = Object_FindObjectsOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mB78770BA28598B62C52F073A37CA89FB7FEB94A7(/*hidden argument*/Object_FindObjectsOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mB78770BA28598B62C52F073A37CA89FB7FEB94A7_RuntimeMethod_var);
NullCheck(L_0);
// if (numberGameSessions > 1)
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray*)L_0)->max_length))))) <= ((int32_t)1)))
{
goto IL_0016;
}
}
{
// Destroy(gameObject);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_1 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_1, /*hidden argument*/NULL);
// }
return;
}
IL_0016:
{
// DontDestroyOnLoad(gameObject);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_2 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_DontDestroyOnLoad_m03007A68ABBA4CCD8C27B944964983395E7640F9(L_2, /*hidden argument*/NULL);
// }
return;
}
}
// System.Int32 GameSession::GetScore()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t GameSession_GetScore_m261421177B31C07760F0942659EDCC341C24E7FD (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method)
{
{
// return score; // Gets the score value
int32_t L_0 = __this->get_score_4();
return L_0;
}
}
// System.Void GameSession::AddToScore(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_AddToScore_m25B41713BA1B9089BD1E3E644D71951C6DBBEE14 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, int32_t ___scoreValue0, const RuntimeMethod* method)
{
{
// score += scoreValue; // Adds scoreValue to score
int32_t L_0 = __this->get_score_4();
int32_t L_1 = ___scoreValue0;
__this->set_score_4(((int32_t)il2cpp_codegen_add((int32_t)L_0, (int32_t)L_1)));
// }
return;
}
}
// System.Void GameSession::ResetGame()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession_ResetGame_m5AAA74149896637E8655D08CFC4F8FA11F92A152 (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (GameSession_ResetGame_m5AAA74149896637E8655D08CFC4F8FA11F92A152_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// Destroy(gameObject); // Destroys game object
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_0, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void GameSession::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void GameSession__ctor_m7A23EA1283AFD52547E4A98A8B368566F0F3DC9D (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Level::LoadStartMenu()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_LoadStartMenu_m1FA3148093140D616278E650D0801420CD5CA9F8 (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Level_LoadStartMenu_m1FA3148093140D616278E650D0801420CD5CA9F8_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// SceneManager.LoadScene(0); // Loads the project's first scene
IL2CPP_RUNTIME_CLASS_INIT(SceneManager_tEC9D10ECC0377F8AE5AEEB5A789FFD24364440FA_il2cpp_TypeInfo_var);
SceneManager_LoadScene_m5550E6368A6D0E37DACEDA3C5E4BA331836BC3C5(0, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Level::LoadGame()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_LoadGame_m37B99D4AF36E778ADFCD54326003A392941A32CB (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Level_LoadGame_m37B99D4AF36E778ADFCD54326003A392941A32CB_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// SceneManager.LoadScene("MainGame"); // Loads the scene with name MainGame
IL2CPP_RUNTIME_CLASS_INIT(SceneManager_tEC9D10ECC0377F8AE5AEEB5A789FFD24364440FA_il2cpp_TypeInfo_var);
SceneManager_LoadScene_m7DAF30213E99396ECBDB1BD40CC34CCF36902092(_stringLiteral575921BEB984F47FD5D4CD8DC79BD8243E7B01E3, /*hidden argument*/NULL);
// FindObjectOfType<GameSession>().ResetGame(); // Reset the game from the beginning
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_0 = Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF(/*hidden argument*/Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF_RuntimeMethod_var);
NullCheck(L_0);
GameSession_ResetGame_m5AAA74149896637E8655D08CFC4F8FA11F92A152(L_0, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Level::LoadGameOver()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_LoadGameOver_mD8D2FF13AD824851031F3C9396CFF0467D1BD072 (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
{
// StartCoroutine(WaitAndLoad()); // Starts the coroutine WaitAndLoad()
RuntimeObject* L_0 = Level_WaitAndLoad_m247CF14285F9A3D2A571824CC832485FA1970CCE(__this, /*hidden argument*/NULL);
MonoBehaviour_StartCoroutine_m3E33706D38B23CDD179E99BAD61E32303E9CC719(__this, L_0, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Level::LoadWinner()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_LoadWinner_m34C047B9B1C0C21C179302CB3D2713EAE3B8EB5A (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
{
// StartCoroutine(WaitAndLoad2()); // Starts the coroutine WaitAndLoad2()
RuntimeObject* L_0 = Level_WaitAndLoad2_mCB8256F7180B8A3D99CBF370866F464BE7A018B6(__this, /*hidden argument*/NULL);
MonoBehaviour_StartCoroutine_m3E33706D38B23CDD179E99BAD61E32303E9CC719(__this, L_0, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Level::QuitGame()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level_QuitGame_m49D8506FD999542FDAE47BA04B556B2332A53F5D (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
{
// Application.Quit(); // Quits the application
Application_Quit_m8D720E5092786C2EE32310D85FE61C253D3B1F2A(/*hidden argument*/NULL);
// }
return;
}
}
// System.Collections.IEnumerator Level::WaitAndLoad()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* Level_WaitAndLoad_m247CF14285F9A3D2A571824CC832485FA1970CCE (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Level_WaitAndLoad_m247CF14285F9A3D2A571824CC832485FA1970CCE_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * L_0 = (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 *)il2cpp_codegen_object_new(U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835_il2cpp_TypeInfo_var);
U3CWaitAndLoadU3Ed__6__ctor_m6E15D03F4F6813C63EF4EAD64F232DE49615D699(L_0, 0, /*hidden argument*/NULL);
U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * L_1 = L_0;
NullCheck(L_1);
L_1->set_U3CU3E4__this_2(__this);
return L_1;
}
}
// System.Collections.IEnumerator Level::WaitAndLoad2()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* Level_WaitAndLoad2_mCB8256F7180B8A3D99CBF370866F464BE7A018B6 (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Level_WaitAndLoad2_mCB8256F7180B8A3D99CBF370866F464BE7A018B6_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * L_0 = (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 *)il2cpp_codegen_object_new(U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043_il2cpp_TypeInfo_var);
U3CWaitAndLoad2U3Ed__7__ctor_m07A2F6BB107CDBCB26AA5509F2B102C5B04BC2BB(L_0, 0, /*hidden argument*/NULL);
U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * L_1 = L_0;
NullCheck(L_1);
L_1->set_U3CU3E4__this_2(__this);
return L_1;
}
}
// System.Void Level::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Level__ctor_mBBC9E192AD5FC6CC5FA5DFA55E8CA13E182C353A (Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * __this, const RuntimeMethod* method)
{
{
// [SerializeField] float delayInSeconds = 1f;
__this->set_delayInSeconds_4((1.0f));
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void MusicPlayer::Awake()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void MusicPlayer_Awake_mA60904394C1725C664514BD13BA55F8CEC17D6F0 (MusicPlayer_tED49C79A2679189A904E6BC22CD55275F67D4D7D * __this, const RuntimeMethod* method)
{
{
// SetUpSingleton();
MusicPlayer_SetUpSingleton_m19A6DE140ED2A0F7B4E06592123C60FC8CCAA60B(__this, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void MusicPlayer::SetUpSingleton()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void MusicPlayer_SetUpSingleton_m19A6DE140ED2A0F7B4E06592123C60FC8CCAA60B (MusicPlayer_tED49C79A2679189A904E6BC22CD55275F67D4D7D * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MusicPlayer_SetUpSingleton_m19A6DE140ED2A0F7B4E06592123C60FC8CCAA60B_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// if (FindObjectsOfType(GetType()).Length > 1)
Type_t * L_0 = Object_GetType_m571FE8360C10B98C23AAF1F066D92C08CC94F45B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
ObjectU5BU5D_t1256A8B00BB71C7F582BF08257BE4F826FF64873* L_1 = Object_FindObjectsOfType_m6E4A383F89274D0F316FDDA39745C59025A11B02(L_0, /*hidden argument*/NULL);
NullCheck(L_1);
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray*)L_1)->max_length))))) <= ((int32_t)1)))
{
goto IL_001c;
}
}
{
// Destroy(gameObject);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_2 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_2, /*hidden argument*/NULL);
// }
return;
}
IL_001c:
{
// DontDestroyOnLoad(gameObject); // Do not destroy the MusicPlayer gameObject when changing scenes
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_3 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_DontDestroyOnLoad_m03007A68ABBA4CCD8C27B944964983395E7640F9(L_3, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void MusicPlayer::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void MusicPlayer__ctor_mA83600A144210E8586F4618ED75C614BFE6450FC (MusicPlayer_tED49C79A2679189A904E6BC22CD55275F67D4D7D * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Obstracle::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle_Start_m1CA6443E9C06FEFC78BA0CC24F3BADC30863204A (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method)
{
{
// shotCounter = Random.Range(minTimeBetweenShots, maxTimeBetweenShots); // Generates a random number
float L_0 = __this->get_minTimeBetweenShots_5();
float L_1 = __this->get_maxTimeBetweenShots_6();
float L_2 = Random_Range_mC15372D42A9ABDCAC3DE82E114D60A40C9C311D2(L_0, L_1, /*hidden argument*/NULL);
__this->set_shotCounter_4(L_2);
// }
return;
}
}
// System.Void Obstracle::Update()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle_Update_m4084AB4EA3E41D8331DDBD529526E05441F6BB28 (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method)
{
{
// CountDownAndShoot();
Obstracle_CountDownAndShoot_mA5F907B15B92F2B5C523E3928AEF0D657FFE9840(__this, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Obstracle::CountDownAndShoot()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle_CountDownAndShoot_mA5F907B15B92F2B5C523E3928AEF0D657FFE9840 (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method)
{
{
// shotCounter -= Time.deltaTime; // Every frame reduce the amount of time of shotCounter
float L_0 = __this->get_shotCounter_4();
float L_1 = Time_get_deltaTime_mCC15F147DA67F38C74CE408FB5D7FF4A87DA2290(/*hidden argument*/NULL);
__this->set_shotCounter_4(((float)il2cpp_codegen_subtract((float)L_0, (float)L_1)));
// if (shotCounter <= 0f)
float L_2 = __this->get_shotCounter_4();
if ((!(((float)L_2) <= ((float)(0.0f)))))
{
goto IL_003c;
}
}
{
// ObstacleFire();
Obstracle_ObstacleFire_m7068067A06DAAFF23C302C2E492DDBA7DDC2007B(__this, /*hidden argument*/NULL);
// shotCounter = Random.Range(minTimeBetweenShots, maxTimeBetweenShots); // Reset shotCounter after every fire
float L_3 = __this->get_minTimeBetweenShots_5();
float L_4 = __this->get_maxTimeBetweenShots_6();
float L_5 = Random_Range_mC15372D42A9ABDCAC3DE82E114D60A40C9C311D2(L_3, L_4, /*hidden argument*/NULL);
__this->set_shotCounter_4(L_5);
}
IL_003c:
{
// }
return;
}
}
// System.Void Obstracle::ObstacleFire()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle_ObstacleFire_m7068067A06DAAFF23C302C2E492DDBA7DDC2007B (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Obstracle_ObstacleFire_m7068067A06DAAFF23C302C2E492DDBA7DDC2007B_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// GameObject enemyLaser = Instantiate(obstacleLaserPrefab, transform.position, Quaternion.identity);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = __this->get_obstacleLaserPrefab_7();
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_1 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_1);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_2 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_1, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_il2cpp_TypeInfo_var);
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 L_3 = Quaternion_get_identity_mF2E565DBCE793A1AE6208056D42CA7C59D83A702(/*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_4 = Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B(L_0, L_2, L_3, /*hidden argument*/Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B_RuntimeMethod_var);
// enemyLaser.GetComponent<Rigidbody2D>().velocity = new Vector2(0, -obstacleLaserSpeed); // Obstacle laser shoots downwards, hence -obstacleLaserSpeed
NullCheck(L_4);
Rigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5 * L_5 = GameObject_GetComponent_TisRigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5_mE749A8DAAB8733CB623A476DC361B88581AF3E40(L_4, /*hidden argument*/GameObject_GetComponent_TisRigidbody2D_tD23204FEE9CB4A36737043B97FD409DE05D5DCE5_mE749A8DAAB8733CB623A476DC361B88581AF3E40_RuntimeMethod_var);
float L_6 = __this->get_obstacleLaserSpeed_8();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_7;
memset((&L_7), 0, sizeof(L_7));
Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline((&L_7), (0.0f), ((-L_6)), /*hidden argument*/NULL);
NullCheck(L_5);
Rigidbody2D_set_velocity_m56B745344E78C85462843AE623BF0A40764FC2DA(L_5, L_7, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Obstracle::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Obstracle__ctor_m9119AD9B2DF41764B80DD9ECFE6AD076E31CB0A6 (Obstracle_t779CBF600A3B3C21B81A9F2EC26900F1505E054F * __this, const RuntimeMethod* method)
{
{
// [SerializeField] float minTimeBetweenShots = 0.2f;
__this->set_minTimeBetweenShots_5((0.200000003f));
// [SerializeField] float maxTimeBetweenShots = 2f;
__this->set_maxTimeBetweenShots_6((2.0f));
// [SerializeField] float obstacleLaserSpeed = 10f;
__this->set_obstacleLaserSpeed_8((10.0f));
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void ObstraclePathing::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstraclePathing_Start_m36AF4E0068F4D8D9CBD079C3B764A200398C6B6C (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ObstraclePathing_Start_m36AF4E0068F4D8D9CBD079C3B764A200398C6B6C_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// waypoints = waveConfig.GetWaypoints();
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_0 = __this->get_waveConfig_5();
NullCheck(L_0);
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_1 = WaveConfig_GetWaypoints_m967B53EF4FA329D74809A4A70DD91090E5599D70(L_0, /*hidden argument*/NULL);
__this->set_waypoints_4(L_1);
// transform.position = waypoints[waypointIndex].transform.position;
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_2 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_3 = __this->get_waypoints_4();
int32_t L_4 = __this->get_waypointIndex_6();
NullCheck(L_3);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_5 = List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_inline(L_3, L_4, /*hidden argument*/List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_RuntimeMethod_var);
NullCheck(L_5);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_6 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(L_5, /*hidden argument*/NULL);
NullCheck(L_6);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_7 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_6, /*hidden argument*/NULL);
NullCheck(L_2);
Transform_set_position_mB169E52D57EEAC1E3F22C5395968714E4F00AC91(L_2, L_7, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void ObstraclePathing::Update()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstraclePathing_Update_mD20E25AB05605A460206566BDB4FDF5826AAC580 (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, const RuntimeMethod* method)
{
{
// EnemyMove();
ObstraclePathing_EnemyMove_m51F6E92DB61E771DB178CE2A23A9CCE8D8999AD7(__this, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void ObstraclePathing::EnemyMove()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstraclePathing_EnemyMove_m51F6E92DB61E771DB178CE2A23A9CCE8D8999AD7 (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ObstraclePathing_EnemyMove_m51F6E92DB61E771DB178CE2A23A9CCE8D8999AD7_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E V_0;
memset((&V_0), 0, sizeof(V_0));
float V_1 = 0.0f;
{
// if (waypointIndex <= waypoints.Count - 1)
int32_t L_0 = __this->get_waypointIndex_6();
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_1 = __this->get_waypoints_4();
NullCheck(L_1);
int32_t L_2 = List_1_get_Count_m82AF14687C6FA2B1572D859A551E3ADBCBADC3C0_inline(L_1, /*hidden argument*/List_1_get_Count_m82AF14687C6FA2B1572D859A551E3ADBCBADC3C0_RuntimeMethod_var);
if ((((int32_t)L_0) > ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_2, (int32_t)1)))))
{
goto IL_009f;
}
}
{
// var targetPosition = waypoints[waypointIndex].transform.position;
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_3 = __this->get_waypoints_4();
int32_t L_4 = __this->get_waypointIndex_6();
NullCheck(L_3);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_5 = List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_inline(L_3, L_4, /*hidden argument*/List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_RuntimeMethod_var);
NullCheck(L_5);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_6 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(L_5, /*hidden argument*/NULL);
NullCheck(L_6);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_7 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_6, /*hidden argument*/NULL);
V_0 = L_7;
// targetPosition.z = 0f;
(&V_0)->set_z_4((0.0f));
// var movementThisFrame = waveConfig.GetEnemyMoveSpeed() * Time.deltaTime;
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_8 = __this->get_waveConfig_5();
NullCheck(L_8);
float L_9 = WaveConfig_GetEnemyMoveSpeed_mD4BC5E513CEE4EA5E998627C083A25947386911D_inline(L_8, /*hidden argument*/NULL);
float L_10 = Time_get_deltaTime_mCC15F147DA67F38C74CE408FB5D7FF4A87DA2290(/*hidden argument*/NULL);
V_1 = ((float)il2cpp_codegen_multiply((float)L_9, (float)L_10));
// transform.position = Vector2.MoveTowards(transform.position, targetPosition, movementThisFrame);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_11 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_12 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_12);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_13 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_12, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_il2cpp_TypeInfo_var);
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_14 = Vector2_op_Implicit_mE407CAF7446E342E059B00AA9EDB301AEC5B7B1A_inline(L_13, /*hidden argument*/NULL);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_15 = V_0;
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_16 = Vector2_op_Implicit_mE407CAF7446E342E059B00AA9EDB301AEC5B7B1A_inline(L_15, /*hidden argument*/NULL);
float L_17 = V_1;
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_18 = Vector2_MoveTowards_m1EC393CAB6ACD04D7A7856F02169D22FD61CDB89(L_14, L_16, L_17, /*hidden argument*/NULL);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_19 = Vector2_op_Implicit_m4FA146E613DBFE6C1C4B0E9B461D622E6F2FC294_inline(L_18, /*hidden argument*/NULL);
NullCheck(L_11);
Transform_set_position_mB169E52D57EEAC1E3F22C5395968714E4F00AC91(L_11, L_19, /*hidden argument*/NULL);
// if (transform.position == targetPosition)
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_20 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_20);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_21 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_20, /*hidden argument*/NULL);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_22 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_il2cpp_TypeInfo_var);
bool L_23 = Vector3_op_Equality_m8A98C7F38641110A2F90445EF8E98ECE14B08296(L_21, L_22, /*hidden argument*/NULL);
if (!L_23)
{
goto IL_009f;
}
}
{
// waypointIndex++;
int32_t L_24 = __this->get_waypointIndex_6();
__this->set_waypointIndex_6(((int32_t)il2cpp_codegen_add((int32_t)L_24, (int32_t)1)));
}
IL_009f:
{
// }
return;
}
}
// System.Void ObstraclePathing::SetWaveConfig(WaveConfig)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstraclePathing_SetWaveConfig_mBD057DAAF238FE5C55ECF163D562E245AFC0B0FB (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfigToSet0, const RuntimeMethod* method)
{
{
// waveConfig = waveConfigToSet;
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_0 = ___waveConfigToSet0;
__this->set_waveConfig_5(L_0);
// }
return;
}
}
// System.Void ObstraclePathing::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstraclePathing__ctor_m16B109440D76A2720597BCCD2E1927E76F63D3C2 (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Collections.IEnumerator ObstracleSpawner::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* ObstracleSpawner_Start_m4445BD625451105E7CC9D672832B76D3450BDD0B (ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ObstracleSpawner_Start_m4445BD625451105E7CC9D672832B76D3450BDD0B_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * L_0 = (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 *)il2cpp_codegen_object_new(U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5_il2cpp_TypeInfo_var);
U3CStartU3Ed__3__ctor_mA020D6CA49B3E2DE0FEA8043D7B5905E4E0DCA8B(L_0, 0, /*hidden argument*/NULL);
U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * L_1 = L_0;
NullCheck(L_1);
L_1->set_U3CU3E4__this_2(__this);
return L_1;
}
}
// System.Collections.IEnumerator ObstracleSpawner::SpawnAllEnemiesInWave(WaveConfig)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* ObstracleSpawner_SpawnAllEnemiesInWave_m8F08495B145475CB6C37803D36A5F1F97310F363 (ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * __this, WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfig0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ObstracleSpawner_SpawnAllEnemiesInWave_m8F08495B145475CB6C37803D36A5F1F97310F363_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * L_0 = (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D *)il2cpp_codegen_object_new(U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D_il2cpp_TypeInfo_var);
U3CSpawnAllEnemiesInWaveU3Ed__4__ctor_mDCE8CD81C03F2BA3331F0D59091A232DB1259245(L_0, 0, /*hidden argument*/NULL);
U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * L_1 = L_0;
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_2 = ___waveConfig0;
NullCheck(L_1);
L_1->set_waveConfig_2(L_2);
return L_1;
}
}
// System.Collections.IEnumerator ObstracleSpawner::SpawnAllWaves()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject* ObstracleSpawner_SpawnAllWaves_mF9CF231D029E12A8C0291ED781A58FCA853A2CFE (ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ObstracleSpawner_SpawnAllWaves_mF9CF231D029E12A8C0291ED781A58FCA853A2CFE_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * L_0 = (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 *)il2cpp_codegen_object_new(U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8_il2cpp_TypeInfo_var);
U3CSpawnAllWavesU3Ed__5__ctor_m9B00522E9673F1638538E957D1A4E7DC6A23FD81(L_0, 0, /*hidden argument*/NULL);
U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * L_1 = L_0;
NullCheck(L_1);
L_1->set_U3CU3E4__this_2(__this);
return L_1;
}
}
// System.Void ObstracleSpawner::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ObstracleSpawner__ctor_mA40BE0D79AB09E6E94FD254787628A161D5E7AFB (ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Player::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_Start_mBD692B64AAC791B93A589E7D3596F36787EAF021 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Player_Start_mBD692B64AAC791B93A589E7D3596F36787EAF021_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// SetUpMoveBoundaries();
Player_SetUpMoveBoundaries_mACB7B8BB227FC2A4CA535674611703B02F8180A8(__this, /*hidden argument*/NULL);
// gameSession = FindObjectOfType<GameSession>();
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_0 = Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF(/*hidden argument*/Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF_RuntimeMethod_var);
__this->set_gameSession_13(L_0);
// }
return;
}
}
// System.Void Player::Update()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_Update_mBA04F1D6FE3C18037EA95DFAEEAA9977BFD49CD3 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
{
// Move();
Player_Move_mBA49290713053DFE90D02C9B5E38353A71C1E0C8(__this, /*hidden argument*/NULL);
// }
return;
}
}
// System.Int32 Player::GetHealth()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t Player_GetHealth_m258C63EDD1D293DA477E9D375D04AF88598B75E5 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
{
// return health;
int32_t L_0 = __this->get_health_8();
return L_0;
}
}
// System.Void Player::Move()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_Move_mBA49290713053DFE90D02C9B5E38353A71C1E0C8 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Player_Move_mBA49290713053DFE90D02C9B5E38353A71C1E0C8_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
float V_0 = 0.0f;
float V_1 = 0.0f;
{
// var deltaX = Input.GetAxis("Horizontal") * Time.deltaTime * moveSpeed;
float L_0 = Input_GetAxis_m939297DEB2ECF8D8D09AD66EB69979AAD2B62326(_stringLiteral7F8C014BD4810CC276D0F9F81A1E759C7B098B1E, /*hidden argument*/NULL);
float L_1 = Time_get_deltaTime_mCC15F147DA67F38C74CE408FB5D7FF4A87DA2290(/*hidden argument*/NULL);
float L_2 = __this->get_moveSpeed_7();
V_0 = ((float)il2cpp_codegen_multiply((float)((float)il2cpp_codegen_multiply((float)L_0, (float)L_1)), (float)L_2));
// var newXPos = Mathf.Clamp(transform.position.x + deltaX, xMin, xMax);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_3 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_3);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_4 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_3, /*hidden argument*/NULL);
float L_5 = L_4.get_x_2();
float L_6 = V_0;
float L_7 = __this->get_xMin_4();
float L_8 = __this->get_xMax_5();
IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4D4AC358D24F6DDC32EC291DDE1DF2C3B752A194_il2cpp_TypeInfo_var);
float L_9 = Mathf_Clamp_m2416F3B785C8F135863E3D17E5B0CB4174797B87(((float)il2cpp_codegen_add((float)L_5, (float)L_6)), L_7, L_8, /*hidden argument*/NULL);
V_1 = L_9;
// transform.position = new Vector2(newXPos, transform.position.y);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_10 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
float L_11 = V_1;
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_12 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_12);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_13 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_12, /*hidden argument*/NULL);
float L_14 = L_13.get_y_3();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_15;
memset((&L_15), 0, sizeof(L_15));
Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline((&L_15), L_11, L_14, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_il2cpp_TypeInfo_var);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_16 = Vector2_op_Implicit_m4FA146E613DBFE6C1C4B0E9B461D622E6F2FC294_inline(L_15, /*hidden argument*/NULL);
NullCheck(L_10);
Transform_set_position_mB169E52D57EEAC1E3F22C5395968714E4F00AC91(L_10, L_16, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Player::SetUpMoveBoundaries()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_SetUpMoveBoundaries_mACB7B8BB227FC2A4CA535674611703B02F8180A8 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * V_0 = NULL;
{
// Camera gameCamera = Camera.main;
Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * L_0 = Camera_get_main_mC337C621B91591CEF89504C97EF64D717C12871C(/*hidden argument*/NULL);
V_0 = L_0;
// xMin = gameCamera.ViewportToWorldPoint(new Vector3(0, 0, 0)).x + padding;
Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * L_1 = V_0;
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_2;
memset((&L_2), 0, sizeof(L_2));
Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline((&L_2), (0.0f), (0.0f), (0.0f), /*hidden argument*/NULL);
NullCheck(L_1);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_3 = Camera_ViewportToWorldPoint_m1273EE3868551C6FF551ABA9A76DC7D66E883116(L_1, L_2, /*hidden argument*/NULL);
float L_4 = L_3.get_x_2();
float L_5 = __this->get_padding_6();
__this->set_xMin_4(((float)il2cpp_codegen_add((float)L_4, (float)L_5)));
// xMax = gameCamera.ViewportToWorldPoint(new Vector3(1, 0, 0)).x - padding;
Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * L_6 = V_0;
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_7;
memset((&L_7), 0, sizeof(L_7));
Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline((&L_7), (1.0f), (0.0f), (0.0f), /*hidden argument*/NULL);
NullCheck(L_6);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_8 = Camera_ViewportToWorldPoint_m1273EE3868551C6FF551ABA9A76DC7D66E883116(L_6, L_7, /*hidden argument*/NULL);
float L_9 = L_8.get_x_2();
float L_10 = __this->get_padding_6();
__this->set_xMax_5(((float)il2cpp_codegen_subtract((float)L_9, (float)L_10)));
// }
return;
}
}
// System.Void Player::OnTriggerEnter2D(UnityEngine.Collider2D)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_OnTriggerEnter2D_mAF357F7244427CB9EADB81B5A6C4F0AF481641D0 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * ___otherObject0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Player_OnTriggerEnter2D_mAF357F7244427CB9EADB81B5A6C4F0AF481641D0_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * V_0 = NULL;
Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * V_1 = NULL;
{
// DamageDealer damage = otherObject.gameObject.GetComponent<DamageDealer>();
Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * L_0 = ___otherObject0;
NullCheck(L_0);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_1 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(L_0, /*hidden argument*/NULL);
NullCheck(L_1);
DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * L_2 = GameObject_GetComponent_TisDamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6_m2C32305EC1E55E718D9BB7321AF27D4231F0664E(L_1, /*hidden argument*/GameObject_GetComponent_TisDamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6_m2C32305EC1E55E718D9BB7321AF27D4231F0664E_RuntimeMethod_var);
V_0 = L_2;
// Explosion explosion = otherObject.gameObject.GetComponent<Explosion>();
Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * L_3 = ___otherObject0;
NullCheck(L_3);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_4 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(L_3, /*hidden argument*/NULL);
NullCheck(L_4);
Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * L_5 = GameObject_GetComponent_TisExplosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED_m9137649A5BC5D0B72F5766AC2FA647E1D3ABCB78(L_4, /*hidden argument*/GameObject_GetComponent_TisExplosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED_m9137649A5BC5D0B72F5766AC2FA647E1D3ABCB78_RuntimeMethod_var);
V_1 = L_5;
// if (otherObject.gameObject.CompareTag("Obstracle")) // If there is no damage
Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * L_6 = ___otherObject0;
NullCheck(L_6);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_7 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(L_6, /*hidden argument*/NULL);
NullCheck(L_7);
bool L_8 = GameObject_CompareTag_mA692D8508984DBE4A2FEFD19E29CB1C9D5CDE001(L_7, _stringLiteral6CD71A63A3B8D6DA177D23E4BF96515CD9256887, /*hidden argument*/NULL);
if (!L_8)
{
goto IL_0038;
}
}
{
// ProcessHit(damage);
DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * L_9 = V_0;
Player_ProcessHit_mCBFF65ACF52F604E30DA7B868C6D57597E5A46EA(__this, L_9, /*hidden argument*/NULL);
// explosion.ObstracleExplosion();
Explosion_t03ACA9CD2F46E4913DC45A3EA50B165F4662DCED * L_10 = V_1;
NullCheck(L_10);
Explosion_ObstracleExplosion_m1650B0A466630C2AA8B7725B217877784151A6B3(L_10, /*hidden argument*/NULL);
// return;
return;
}
IL_0038:
{
// ProcessHit(damage);
DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * L_11 = V_0;
Player_ProcessHit_mCBFF65ACF52F604E30DA7B868C6D57597E5A46EA(__this, L_11, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Player::ProcessHit(DamageDealer)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_ProcessHit_mCBFF65ACF52F604E30DA7B868C6D57597E5A46EA (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * ___damage0, const RuntimeMethod* method)
{
{
// health -= damage.GetDamage();
int32_t L_0 = __this->get_health_8();
DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * L_1 = ___damage0;
NullCheck(L_1);
int32_t L_2 = DamageDealer_GetDamage_mACE71A6C2E3690BD4B5573A247846EDDE0BF7C9A_inline(L_1, /*hidden argument*/NULL);
__this->set_health_8(((int32_t)il2cpp_codegen_subtract((int32_t)L_0, (int32_t)L_2)));
// AudioSource.PlayClipAtPoint(healthreduce, Camera.main.transform.position, healthreducevolume);
AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * L_3 = __this->get_healthreduce_11();
Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * L_4 = Camera_get_main_mC337C621B91591CEF89504C97EF64D717C12871C(/*hidden argument*/NULL);
NullCheck(L_4);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_5 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(L_4, /*hidden argument*/NULL);
NullCheck(L_5);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_6 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_5, /*hidden argument*/NULL);
float L_7 = __this->get_healthreducevolume_12();
AudioSource_PlayClipAtPoint_m1DB4B29B9FBCF0832AB7855AD2B2B319322B61FC(L_3, L_6, L_7, /*hidden argument*/NULL);
// damage.Hit();
DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * L_8 = ___damage0;
NullCheck(L_8);
DamageDealer_Hit_m25098E8BE8713BACB0B71CBCA7638785E013FD2C(L_8, /*hidden argument*/NULL);
// if ((health <= 0) && (gameSession.GetScore() < total))
int32_t L_9 = __this->get_health_8();
if ((((int32_t)L_9) > ((int32_t)0)))
{
goto IL_0062;
}
}
{
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_10 = __this->get_gameSession_13();
NullCheck(L_10);
int32_t L_11 = GameSession_GetScore_m261421177B31C07760F0942659EDCC341C24E7FD_inline(L_10, /*hidden argument*/NULL);
int32_t L_12 = __this->get_total_14();
if ((((int32_t)L_11) >= ((int32_t)L_12)))
{
goto IL_0062;
}
}
{
// health = 0;
__this->set_health_8(0);
// Die();
Player_Die_m16A200929DBDF9FF88C8191A26327C2CCCC80C19(__this, /*hidden argument*/NULL);
}
IL_0062:
{
// }
return;
}
}
// System.Void Player::Die()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player_Die_m16A200929DBDF9FF88C8191A26327C2CCCC80C19 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Player_Die_m16A200929DBDF9FF88C8191A26327C2CCCC80C19_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// Destroy(gameObject);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_0, /*hidden argument*/NULL);
// GameObject explosion = Instantiate(deathVFX, transform.position, Quaternion.identity); // Creates the explosion particle
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_1 = __this->get_deathVFX_9();
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_2 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(__this, /*hidden argument*/NULL);
NullCheck(L_2);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_3 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_2, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_il2cpp_TypeInfo_var);
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 L_4 = Quaternion_get_identity_mF2E565DBCE793A1AE6208056D42CA7C59D83A702(/*hidden argument*/NULL);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_5 = Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B(L_1, L_3, L_4, /*hidden argument*/Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B_RuntimeMethod_var);
// Destroy(explosion, 1f); // After 1swc it destroys it
Object_Destroy_mAAAA103F4911E9FA18634BF9605C28559F5E2AC7(L_5, (1.0f), /*hidden argument*/NULL);
// FindObjectOfType<Level>().LoadGameOver(); // Find Level in Hierarchy and run LoadGameOver()
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * L_6 = Object_FindObjectOfType_TisLevel_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93_m715012CCED83C1A1A1AD32A3A09C651792748CD8(/*hidden argument*/Object_FindObjectOfType_TisLevel_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93_m715012CCED83C1A1A1AD32A3A09C651792748CD8_RuntimeMethod_var);
NullCheck(L_6);
Level_LoadGameOver_mD8D2FF13AD824851031F3C9396CFF0467D1BD072(L_6, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Player::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Player__ctor_mDE8EB5B351975D4E7E24DE341B8B49B8A29CC2B7 (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
{
// [SerializeField] float padding = 10f;
__this->set_padding_6((10.0f));
// [SerializeField] float moveSpeed = 10f;
__this->set_moveSpeed_7((10.0f));
// [SerializeField] int health = 50;
__this->set_health_8(((int32_t)50));
// [SerializeField] [Range(0, 1)] float healthreducevolume = 0.75f;
__this->set_healthreducevolume_12((0.75f));
// int total = 100;
__this->set_total_14(((int32_t)100));
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Shredder::OnTriggerEnter2D(UnityEngine.Collider2D)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Shredder_OnTriggerEnter2D_m8DC73A33305BB3E2FA7ECE4E020A125D5250F2C3 (Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8 * __this, Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * ___otherObject0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Shredder_OnTriggerEnter2D_m8DC73A33305BB3E2FA7ECE4E020A125D5250F2C3_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// if(otherObject.gameObject.CompareTag("Obstracle"))
Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * L_0 = ___otherObject0;
NullCheck(L_0);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_1 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(L_0, /*hidden argument*/NULL);
NullCheck(L_1);
bool L_2 = GameObject_CompareTag_mA692D8508984DBE4A2FEFD19E29CB1C9D5CDE001(L_1, _stringLiteral6CD71A63A3B8D6DA177D23E4BF96515CD9256887, /*hidden argument*/NULL);
if (!L_2)
{
goto IL_004e;
}
}
{
// Destroy(otherObject.gameObject); // Destroys game object
Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * L_3 = ___otherObject0;
NullCheck(L_3);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_4 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(L_3, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_4, /*hidden argument*/NULL);
// AudioSource.PlayClipAtPoint(pointsgained, Camera.main.transform.position, pointsgainedvolume);
AudioClip_t16D2E573E7CC1C5118D8EE0F0692D46866A1C0EE * L_5 = __this->get_pointsgained_5();
Camera_tC44E094BAB53AFC8A014C6F9CFCE11F4FC38006C * L_6 = Camera_get_main_mC337C621B91591CEF89504C97EF64D717C12871C(/*hidden argument*/NULL);
NullCheck(L_6);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_7 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(L_6, /*hidden argument*/NULL);
NullCheck(L_7);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_8 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_7, /*hidden argument*/NULL);
float L_9 = __this->get_pointsgainedvolume_6();
AudioSource_PlayClipAtPoint_m1DB4B29B9FBCF0832AB7855AD2B2B319322B61FC(L_5, L_8, L_9, /*hidden argument*/NULL);
// FindObjectOfType<GameSession>().AddToScore(scoreValue);
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_10 = Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF(/*hidden argument*/Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF_RuntimeMethod_var);
int32_t L_11 = __this->get_scoreValue_4();
NullCheck(L_10);
GameSession_AddToScore_m25B41713BA1B9089BD1E3E644D71951C6DBBEE14(L_10, L_11, /*hidden argument*/NULL);
// }
return;
}
IL_004e:
{
// Destroy(otherObject.gameObject);
Collider2D_tDDBF081328B83D21D0BA3B5036D77B32528BA722 * L_12 = ___otherObject0;
NullCheck(L_12);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_13 = Component_get_gameObject_m55DC35B149AFB9157582755383BA954655FE0C5B(L_12, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Object_Destroy_m3EEDB6ECD49A541EC826EA8E1C8B599F7AF67D30(L_13, /*hidden argument*/NULL);
// }
return;
}
}
// System.Void Shredder::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Shredder__ctor_m922786FE7078C6FBE75A0247FCE5375A1FFB1B7D (Shredder_tB4C8A49CC1640133CC5439A03E2236D77DC9DDD8 * __this, const RuntimeMethod* method)
{
{
// [SerializeField] int scoreValue = 5;
__this->set_scoreValue_4(5);
// [SerializeField] [Range(0, 1)] float pointsgainedvolume = 0.75f;
__this->set_pointsgainedvolume_6((0.75f));
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.GameObject WaveConfig::GetEnemyPrefab()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * WaveConfig_GetEnemyPrefab_m3FA01EC667D1DAD66E4A898DD5E04998B41A76C3 (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return enemyPrefab;
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = __this->get_enemyPrefab_4();
return L_0;
}
}
// System.Collections.Generic.List`1<UnityEngine.Transform> WaveConfig::GetWaypoints()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * WaveConfig_GetWaypoints_m967B53EF4FA329D74809A4A70DD91090E5599D70 (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (WaveConfig_GetWaypoints_m967B53EF4FA329D74809A4A70DD91090E5599D70_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * V_0 = NULL;
RuntimeObject* V_1 = NULL;
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * V_2 = NULL;
RuntimeObject* V_3 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
void* __leave_targets_storage = alloca(sizeof(int32_t) * 1);
il2cpp::utils::LeaveTargetStack __leave_targets(__leave_targets_storage);
NO_UNUSED_WARNING (__leave_targets);
{
// var waveWayPoints = new List<Transform>(); // Each wave can have different waypoints
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_0 = (List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 *)il2cpp_codegen_object_new(List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0_il2cpp_TypeInfo_var);
List_1__ctor_mF1D464BA700E6389AEA8AF2F197270F387D9A41F(L_0, /*hidden argument*/List_1__ctor_mF1D464BA700E6389AEA8AF2F197270F387D9A41F_RuntimeMethod_var);
V_0 = L_0;
// foreach (Transform child in pathPrefab.transform) // Go into Path prefab and for each child, add it to the List waveWaypoints
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_1 = __this->get_pathPrefab_5();
NullCheck(L_1);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_2 = GameObject_get_transform_m16A80BB92B6C8C5AB696E447014D45EDF1E4DE34(L_1, /*hidden argument*/NULL);
NullCheck(L_2);
RuntimeObject* L_3 = Transform_GetEnumerator_mBA0E884A69F0AA05FCB69F4EE5F700177F75DD7E(L_2, /*hidden argument*/NULL);
V_1 = L_3;
}
IL_0017:
try
{ // begin try (depth: 1)
{
goto IL_002c;
}
IL_0019:
{
// foreach (Transform child in pathPrefab.transform) // Go into Path prefab and for each child, add it to the List waveWaypoints
RuntimeObject* L_4 = V_1;
NullCheck(L_4);
RuntimeObject * L_5 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(1 /* System.Object System.Collections.IEnumerator::get_Current() */, IEnumerator_t5956F3AFB7ECF1117E3BC5890E7FC7B7F7A04105_il2cpp_TypeInfo_var, L_4);
V_2 = ((Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 *)CastclassClass((RuntimeObject*)L_5, Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1_il2cpp_TypeInfo_var));
// waveWayPoints.Add(child);
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_6 = V_0;
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_7 = V_2;
NullCheck(L_6);
List_1_Add_m7AB707ADE023585729593334A399B3FF485A7982(L_6, L_7, /*hidden argument*/List_1_Add_m7AB707ADE023585729593334A399B3FF485A7982_RuntimeMethod_var);
}
IL_002c:
{
// foreach (Transform child in pathPrefab.transform) // Go into Path prefab and for each child, add it to the List waveWaypoints
RuntimeObject* L_8 = V_1;
NullCheck(L_8);
bool L_9 = InterfaceFuncInvoker0< bool >::Invoke(0 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t5956F3AFB7ECF1117E3BC5890E7FC7B7F7A04105_il2cpp_TypeInfo_var, L_8);
if (L_9)
{
goto IL_0019;
}
}
IL_0034:
{
IL2CPP_LEAVE(0x47, FINALLY_0036);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_0036;
}
FINALLY_0036:
{ // begin finally (depth: 1)
{
RuntimeObject* L_10 = V_1;
V_3 = ((RuntimeObject*)IsInst((RuntimeObject*)L_10, IDisposable_t099785737FC6A1E3699919A94109383715A8D807_il2cpp_TypeInfo_var));
RuntimeObject* L_11 = V_3;
if (!L_11)
{
goto IL_0046;
}
}
IL_0040:
{
RuntimeObject* L_12 = V_3;
NullCheck(L_12);
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t099785737FC6A1E3699919A94109383715A8D807_il2cpp_TypeInfo_var, L_12);
}
IL_0046:
{
IL2CPP_END_FINALLY(54)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(54)
{
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
IL2CPP_JUMP_TBL(0x47, IL_0047)
}
IL_0047:
{
// return waveWayPoints;
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_13 = V_0;
return L_13;
}
}
// System.Single WaveConfig::GetTimeBetweenSpawns()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float WaveConfig_GetTimeBetweenSpawns_m19729DCB6B94BCC9D8E9FA275B7FA9E40C32E880 (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return timeBetweenSpawns;
float L_0 = __this->get_timeBetweenSpawns_6();
return L_0;
}
}
// System.Single WaveConfig::GetSpawnRandomFactor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float WaveConfig_GetSpawnRandomFactor_mF7DD2FAEAB9F18A76D4C6F266A3F157DCEBE1736 (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return spawnRandomFactor;
float L_0 = __this->get_spawnRandomFactor_7();
return L_0;
}
}
// System.Int32 WaveConfig::GetNumberOfEnemies()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t WaveConfig_GetNumberOfEnemies_mACD21FB3F34347F81B93262A8B265AB1348A76D2 (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return numberOfEnemies;
int32_t L_0 = __this->get_numberOfEnemies_8();
return L_0;
}
}
// System.Single WaveConfig::GetEnemyMoveSpeed()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float WaveConfig_GetEnemyMoveSpeed_mD4BC5E513CEE4EA5E998627C083A25947386911D (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return enemyMoveSpeed;
float L_0 = __this->get_enemyMoveSpeed_9();
return L_0;
}
}
// System.Void WaveConfig::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void WaveConfig__ctor_mD613D2BF33D5F186EBB6945C1BE31863064896EB (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// [SerializeField] float timeBetweenSpawns = 0.5f;
__this->set_timeBetweenSpawns_6((0.5f));
// [SerializeField] float spawnRandomFactor = 0.3f;
__this->set_spawnRandomFactor_7((0.300000012f));
// [SerializeField] int numberOfEnemies = 5;
__this->set_numberOfEnemies_8(5);
// [SerializeField] float enemyMoveSpeed = 2f;
__this->set_enemyMoveSpeed_9((2.0f));
ScriptableObject__ctor_m8DAE6CDCFA34E16F2543B02CC3669669FF203063(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void healthDisplay::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void healthDisplay_Start_m5848A894852C8B3822BD45BF8A6488BCB8EF5AD1 (healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (healthDisplay_Start_m5848A894852C8B3822BD45BF8A6488BCB8EF5AD1_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// healthText = GetComponent<Text>();
Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * L_0 = Component_GetComponent_TisText_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_m2D99AC2081683F963C56EC738451EC0B59B5D137(__this, /*hidden argument*/Component_GetComponent_TisText_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_m2D99AC2081683F963C56EC738451EC0B59B5D137_RuntimeMethod_var);
__this->set_healthText_4(L_0);
// player = FindObjectOfType<Player>();
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * L_1 = Object_FindObjectOfType_TisPlayer_t5689617909B48F7640EA0892D85C92C13CC22C6F_m3CAE7179B3FA6FD24CA1F0D12C0043AE34660491(/*hidden argument*/Object_FindObjectOfType_TisPlayer_t5689617909B48F7640EA0892D85C92C13CC22C6F_m3CAE7179B3FA6FD24CA1F0D12C0043AE34660491_RuntimeMethod_var);
__this->set_player_5(L_1);
// }
return;
}
}
// System.Void healthDisplay::Update()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void healthDisplay_Update_m9D28C94131CC972F2626EE3199438ADB2418D97E (healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
// healthText.text = player.GetHealth().ToString(); // Updates the player's health
Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * L_0 = __this->get_healthText_4();
Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * L_1 = __this->get_player_5();
NullCheck(L_1);
int32_t L_2 = Player_GetHealth_m258C63EDD1D293DA477E9D375D04AF88598B75E5_inline(L_1, /*hidden argument*/NULL);
V_0 = L_2;
String_t* L_3 = Int32_ToString_m340C0A14D16799421EFDF8A81C8A16FA76D48411((int32_t*)(&V_0), /*hidden argument*/NULL);
NullCheck(L_0);
VirtActionInvoker1< String_t* >::Invoke(75 /* System.Void UnityEngine.UI.Text::set_text(System.String) */, L_0, L_3);
// }
return;
}
}
// System.Void healthDisplay::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void healthDisplay__ctor_mE0EBF924B98D6530562FFFD3E59F23F70B40AC6A (healthDisplay_tCDBFAB73F006D779D3199E78028B81B0DA565960 * __this, const RuntimeMethod* method)
{
{
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void scoreDisplay::Start()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void scoreDisplay_Start_mEF7A692CE11E2AC4B418A54AADC77FD343D59373 (scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (scoreDisplay_Start_mEF7A692CE11E2AC4B418A54AADC77FD343D59373_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
// scoreText = GetComponent<Text>(); // Gets the score text
Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * L_0 = Component_GetComponent_TisText_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_m2D99AC2081683F963C56EC738451EC0B59B5D137(__this, /*hidden argument*/Component_GetComponent_TisText_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1_m2D99AC2081683F963C56EC738451EC0B59B5D137_RuntimeMethod_var);
__this->set_scoreText_4(L_0);
// gameSession = FindObjectOfType<GameSession>();
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_1 = Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF(/*hidden argument*/Object_FindObjectOfType_TisGameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9_mF6570188C76AA8664C062D7C5C72184B61133ACF_RuntimeMethod_var);
__this->set_gameSession_5(L_1);
// }
return;
}
}
// System.Void scoreDisplay::Update()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void scoreDisplay_Update_mD341F73B26D90D5587CF69605868578D5AE7EC31 (scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (scoreDisplay_Update_mD341F73B26D90D5587CF69605868578D5AE7EC31_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
// scoreText.text = gameSession.GetScore().ToString(); // Converts the acore to a String
Text_t6A2339DA6C05AE2646FC1A6C8FCC127391BE7FA1 * L_0 = __this->get_scoreText_4();
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_1 = __this->get_gameSession_5();
NullCheck(L_1);
int32_t L_2 = GameSession_GetScore_m261421177B31C07760F0942659EDCC341C24E7FD_inline(L_1, /*hidden argument*/NULL);
V_0 = L_2;
String_t* L_3 = Int32_ToString_m340C0A14D16799421EFDF8A81C8A16FA76D48411((int32_t*)(&V_0), /*hidden argument*/NULL);
NullCheck(L_0);
VirtActionInvoker1< String_t* >::Invoke(75 /* System.Void UnityEngine.UI.Text::set_text(System.String) */, L_0, L_3);
// if(gameSession.GetScore() > total)
GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * L_4 = __this->get_gameSession_5();
NullCheck(L_4);
int32_t L_5 = GameSession_GetScore_m261421177B31C07760F0942659EDCC341C24E7FD_inline(L_4, /*hidden argument*/NULL);
int32_t L_6 = __this->get_total_6();
if ((((int32_t)L_5) <= ((int32_t)L_6)))
{
goto IL_003b;
}
}
{
// FindObjectOfType<Level>().LoadWinner();
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * L_7 = Object_FindObjectOfType_TisLevel_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93_m715012CCED83C1A1A1AD32A3A09C651792748CD8(/*hidden argument*/Object_FindObjectOfType_TisLevel_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93_m715012CCED83C1A1A1AD32A3A09C651792748CD8_RuntimeMethod_var);
NullCheck(L_7);
Level_LoadWinner_m34C047B9B1C0C21C179302CB3D2713EAE3B8EB5A(L_7, /*hidden argument*/NULL);
}
IL_003b:
{
// }
return;
}
}
// System.Void scoreDisplay::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void scoreDisplay__ctor_m7F7F6C3F6C055F2EABE5BA8615AC046987CD8A58 (scoreDisplay_t1EE2CD41A5DE29D51778E4B961AD7532F750A0BE * __this, const RuntimeMethod* method)
{
{
// int total = 100;
__this->set_total_6(((int32_t)100));
MonoBehaviour__ctor_mC0995D847F6A95B1A553652636C38A2AA8B13BED(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Level_<WaitAndLoad2>d__7::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoad2U3Ed__7__ctor_m07A2F6BB107CDBCB26AA5509F2B102C5B04BC2BB (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method)
{
{
Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL);
int32_t L_0 = ___U3CU3E1__state0;
__this->set_U3CU3E1__state_0(L_0);
return;
}
}
// System.Void Level_<WaitAndLoad2>d__7::System.IDisposable.Dispose()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoad2U3Ed__7_System_IDisposable_Dispose_mE862E4BB51395F28F4D248DEDDCA9A3F5E6F74E8 (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, const RuntimeMethod* method)
{
{
return;
}
}
// System.Boolean Level_<WaitAndLoad2>d__7::MoveNext()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool U3CWaitAndLoad2U3Ed__7_MoveNext_mB135C23E21556E16D40B17A44D8C29ED4840D8CF (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CWaitAndLoad2U3Ed__7_MoveNext_mB135C23E21556E16D40B17A44D8C29ED4840D8CF_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * V_1 = NULL;
{
int32_t L_0 = __this->get_U3CU3E1__state_0();
V_0 = L_0;
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * L_1 = __this->get_U3CU3E4__this_2();
V_1 = L_1;
int32_t L_2 = V_0;
if (!L_2)
{
goto IL_0017;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)1)))
{
goto IL_0038;
}
}
{
return (bool)0;
}
IL_0017:
{
__this->set_U3CU3E1__state_0((-1));
// yield return new WaitForSeconds(delayInSeconds); // Does the delay
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * L_4 = V_1;
NullCheck(L_4);
float L_5 = L_4->get_delayInSeconds_4();
WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 * L_6 = (WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 *)il2cpp_codegen_object_new(WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_il2cpp_TypeInfo_var);
WaitForSeconds__ctor_mD298C4CB9532BBBDE172FC40F3397E30504038D4(L_6, L_5, /*hidden argument*/NULL);
__this->set_U3CU3E2__current_1(L_6);
__this->set_U3CU3E1__state_0(1);
return (bool)1;
}
IL_0038:
{
__this->set_U3CU3E1__state_0((-1));
// SceneManager.LoadScene("Winner"); // Loads the scene with name Winner
IL2CPP_RUNTIME_CLASS_INIT(SceneManager_tEC9D10ECC0377F8AE5AEEB5A789FFD24364440FA_il2cpp_TypeInfo_var);
SceneManager_LoadScene_m7DAF30213E99396ECBDB1BD40CC34CCF36902092(_stringLiteralD29F73EF431FE7BD012138938D3ED217C6A38C17, /*hidden argument*/NULL);
// }
return (bool)0;
}
}
// System.Object Level_<WaitAndLoad2>d__7::System.Collections.Generic.IEnumerator<System.Object>.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CWaitAndLoad2U3Ed__7_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_m84A7EA58905D54595FABE064ABAF141B6796B934 (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
// System.Void Level_<WaitAndLoad2>d__7::System.Collections.IEnumerator.Reset()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoad2U3Ed__7_System_Collections_IEnumerator_Reset_m6CB8B5D7A65103393CF8B9D4F0771FBD25FC85D4 (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CWaitAndLoad2U3Ed__7_System_Collections_IEnumerator_Reset_m6CB8B5D7A65103393CF8B9D4F0771FBD25FC85D4_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 * L_0 = (NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 *)il2cpp_codegen_object_new(NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m3EA81A5B209A87C3ADA47443F2AFFF735E5256EE(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, U3CWaitAndLoad2U3Ed__7_System_Collections_IEnumerator_Reset_m6CB8B5D7A65103393CF8B9D4F0771FBD25FC85D4_RuntimeMethod_var);
}
}
// System.Object Level_<WaitAndLoad2>d__7::System.Collections.IEnumerator.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CWaitAndLoad2U3Ed__7_System_Collections_IEnumerator_get_Current_m1621D40278EC05D43472387F4D502FDB7C383131 (U3CWaitAndLoad2U3Ed__7_t740C8C963AC0023472F6CE5E17C88B52C6F62043 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Level_<WaitAndLoad>d__6::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoadU3Ed__6__ctor_m6E15D03F4F6813C63EF4EAD64F232DE49615D699 (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method)
{
{
Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL);
int32_t L_0 = ___U3CU3E1__state0;
__this->set_U3CU3E1__state_0(L_0);
return;
}
}
// System.Void Level_<WaitAndLoad>d__6::System.IDisposable.Dispose()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoadU3Ed__6_System_IDisposable_Dispose_m9C807735AF274B72D40CC3740791839163987228 (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, const RuntimeMethod* method)
{
{
return;
}
}
// System.Boolean Level_<WaitAndLoad>d__6::MoveNext()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool U3CWaitAndLoadU3Ed__6_MoveNext_m48F672219B01E55CE2859CCC0A8EC0A0527ACC37 (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CWaitAndLoadU3Ed__6_MoveNext_m48F672219B01E55CE2859CCC0A8EC0A0527ACC37_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * V_1 = NULL;
{
int32_t L_0 = __this->get_U3CU3E1__state_0();
V_0 = L_0;
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * L_1 = __this->get_U3CU3E4__this_2();
V_1 = L_1;
int32_t L_2 = V_0;
if (!L_2)
{
goto IL_0017;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)1)))
{
goto IL_0038;
}
}
{
return (bool)0;
}
IL_0017:
{
__this->set_U3CU3E1__state_0((-1));
// yield return new WaitForSeconds(delayInSeconds); // Does the delay
Level_t1E16C72654E4E38D3256A23ED6EAEEC4D0687D93 * L_4 = V_1;
NullCheck(L_4);
float L_5 = L_4->get_delayInSeconds_4();
WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 * L_6 = (WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 *)il2cpp_codegen_object_new(WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_il2cpp_TypeInfo_var);
WaitForSeconds__ctor_mD298C4CB9532BBBDE172FC40F3397E30504038D4(L_6, L_5, /*hidden argument*/NULL);
__this->set_U3CU3E2__current_1(L_6);
__this->set_U3CU3E1__state_0(1);
return (bool)1;
}
IL_0038:
{
__this->set_U3CU3E1__state_0((-1));
// SceneManager.LoadScene("GameOver"); // Loads the scene with name GameOver
IL2CPP_RUNTIME_CLASS_INIT(SceneManager_tEC9D10ECC0377F8AE5AEEB5A789FFD24364440FA_il2cpp_TypeInfo_var);
SceneManager_LoadScene_m7DAF30213E99396ECBDB1BD40CC34CCF36902092(_stringLiteralC62B61BC27E509D700023566A09D2AE606BE85A7, /*hidden argument*/NULL);
// }
return (bool)0;
}
}
// System.Object Level_<WaitAndLoad>d__6::System.Collections.Generic.IEnumerator<System.Object>.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CWaitAndLoadU3Ed__6_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_m2F3EF63D74456BF6A83D3EF939C9D5B06A31BF55 (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
// System.Void Level_<WaitAndLoad>d__6::System.Collections.IEnumerator.Reset()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CWaitAndLoadU3Ed__6_System_Collections_IEnumerator_Reset_m16128E71D6312F17A12727D3A2837F7E4D543986 (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CWaitAndLoadU3Ed__6_System_Collections_IEnumerator_Reset_m16128E71D6312F17A12727D3A2837F7E4D543986_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 * L_0 = (NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 *)il2cpp_codegen_object_new(NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m3EA81A5B209A87C3ADA47443F2AFFF735E5256EE(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, U3CWaitAndLoadU3Ed__6_System_Collections_IEnumerator_Reset_m16128E71D6312F17A12727D3A2837F7E4D543986_RuntimeMethod_var);
}
}
// System.Object Level_<WaitAndLoad>d__6::System.Collections.IEnumerator.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CWaitAndLoadU3Ed__6_System_Collections_IEnumerator_get_Current_m4952987EA45A4B5C83EB2BE41E220FFEB72A1FFA (U3CWaitAndLoadU3Ed__6_t545C25749293D047A727C0A535F014345E0AF835 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllEnemiesInWaveU3Ed__4__ctor_mDCE8CD81C03F2BA3331F0D59091A232DB1259245 (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method)
{
{
Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL);
int32_t L_0 = ___U3CU3E1__state0;
__this->set_U3CU3E1__state_0(L_0);
return;
}
}
// System.Void ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::System.IDisposable.Dispose()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllEnemiesInWaveU3Ed__4_System_IDisposable_Dispose_m352DEA3BCA5DCC0A9D3CDE9200FD17FE562A7B71 (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, const RuntimeMethod* method)
{
{
return;
}
}
// System.Boolean ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::MoveNext()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool U3CSpawnAllEnemiesInWaveU3Ed__4_MoveNext_m374873FB51B0365A671B31E82F7F291455816BEA (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CSpawnAllEnemiesInWaveU3Ed__4_MoveNext_m374873FB51B0365A671B31E82F7F291455816BEA_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
{
int32_t L_0 = __this->get_U3CU3E1__state_0();
V_0 = L_0;
int32_t L_1 = V_0;
if (!L_1)
{
goto IL_0010;
}
}
{
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)1)))
{
goto IL_007f;
}
}
{
return (bool)0;
}
IL_0010:
{
__this->set_U3CU3E1__state_0((-1));
// for (int enemyCount = 0; enemyCount < waveConfig.GetNumberOfEnemies(); enemyCount++)
__this->set_U3CenemyCountU3E5__2_3(0);
goto IL_0096;
}
IL_0020:
{
// var newEnemy = Instantiate(
// waveConfig.GetEnemyPrefab(),
// waveConfig.GetWaypoints()[0].transform.position,
// Quaternion.identity);
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_3 = __this->get_waveConfig_2();
NullCheck(L_3);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_4 = WaveConfig_GetEnemyPrefab_m3FA01EC667D1DAD66E4A898DD5E04998B41A76C3_inline(L_3, /*hidden argument*/NULL);
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_5 = __this->get_waveConfig_2();
NullCheck(L_5);
List_1_t27D7842CA3FD659C9BE64845F118C2590EE2D2C0 * L_6 = WaveConfig_GetWaypoints_m967B53EF4FA329D74809A4A70DD91090E5599D70(L_5, /*hidden argument*/NULL);
NullCheck(L_6);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_7 = List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_inline(L_6, 0, /*hidden argument*/List_1_get_Item_m8B222F262DF0C4B49E12B4E87AB2162202744499_RuntimeMethod_var);
NullCheck(L_7);
Transform_tA8193BB29D4D2C7EC04918F3ED1816345186C3F1 * L_8 = Component_get_transform_mE8496EBC45BEB1BADB5F314960F1DF1C952FA11F(L_7, /*hidden argument*/NULL);
NullCheck(L_8);
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_9 = Transform_get_position_m40A8A9895568D56FFC687B57F30E8D53CB5EA341(L_8, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4_il2cpp_TypeInfo_var);
Quaternion_t6D28618CF65156D4A0AD747370DDFD0C514A31B4 L_10 = Quaternion_get_identity_mF2E565DBCE793A1AE6208056D42CA7C59D83A702(/*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_il2cpp_TypeInfo_var);
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_11 = Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B(L_4, L_9, L_10, /*hidden argument*/Object_Instantiate_TisGameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319_m81B599A0051F8F4543E5C73A11585E96E940943B_RuntimeMethod_var);
// newEnemy.GetComponent<ObstraclePathing>().SetWaveConfig(waveConfig);
NullCheck(L_11);
ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * L_12 = GameObject_GetComponent_TisObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA_mDF330179D9470FCD12B729511DD9EEF8FB18D09C(L_11, /*hidden argument*/GameObject_GetComponent_TisObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA_mDF330179D9470FCD12B729511DD9EEF8FB18D09C_RuntimeMethod_var);
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_13 = __this->get_waveConfig_2();
NullCheck(L_12);
ObstraclePathing_SetWaveConfig_mBD057DAAF238FE5C55ECF163D562E245AFC0B0FB_inline(L_12, L_13, /*hidden argument*/NULL);
// yield return new WaitForSeconds(waveConfig.GetTimeBetweenSpawns());
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_14 = __this->get_waveConfig_2();
NullCheck(L_14);
float L_15 = WaveConfig_GetTimeBetweenSpawns_m19729DCB6B94BCC9D8E9FA275B7FA9E40C32E880_inline(L_14, /*hidden argument*/NULL);
WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 * L_16 = (WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013 *)il2cpp_codegen_object_new(WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_il2cpp_TypeInfo_var);
WaitForSeconds__ctor_mD298C4CB9532BBBDE172FC40F3397E30504038D4(L_16, L_15, /*hidden argument*/NULL);
__this->set_U3CU3E2__current_1(L_16);
__this->set_U3CU3E1__state_0(1);
return (bool)1;
}
IL_007f:
{
__this->set_U3CU3E1__state_0((-1));
// for (int enemyCount = 0; enemyCount < waveConfig.GetNumberOfEnemies(); enemyCount++)
int32_t L_17 = __this->get_U3CenemyCountU3E5__2_3();
V_1 = L_17;
int32_t L_18 = V_1;
__this->set_U3CenemyCountU3E5__2_3(((int32_t)il2cpp_codegen_add((int32_t)L_18, (int32_t)1)));
}
IL_0096:
{
// for (int enemyCount = 0; enemyCount < waveConfig.GetNumberOfEnemies(); enemyCount++)
int32_t L_19 = __this->get_U3CenemyCountU3E5__2_3();
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_20 = __this->get_waveConfig_2();
NullCheck(L_20);
int32_t L_21 = WaveConfig_GetNumberOfEnemies_mACD21FB3F34347F81B93262A8B265AB1348A76D2_inline(L_20, /*hidden argument*/NULL);
if ((((int32_t)L_19) < ((int32_t)L_21)))
{
goto IL_0020;
}
}
{
// }
return (bool)0;
}
}
// System.Object ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::System.Collections.Generic.IEnumerator<System.Object>.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_mDA3A85172FD579B59D4CB12DBCDB31757BB9E616 (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
// System.Void ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::System.Collections.IEnumerator.Reset()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_IEnumerator_Reset_m3F6ECFC5F94D367E7F0F529EC9C0D9D0E1FBDAE7 (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_IEnumerator_Reset_m3F6ECFC5F94D367E7F0F529EC9C0D9D0E1FBDAE7_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 * L_0 = (NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 *)il2cpp_codegen_object_new(NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m3EA81A5B209A87C3ADA47443F2AFFF735E5256EE(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_IEnumerator_Reset_m3F6ECFC5F94D367E7F0F529EC9C0D9D0E1FBDAE7_RuntimeMethod_var);
}
}
// System.Object ObstracleSpawner_<SpawnAllEnemiesInWave>d__4::System.Collections.IEnumerator.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CSpawnAllEnemiesInWaveU3Ed__4_System_Collections_IEnumerator_get_Current_mBAC4ACBDC23F3C63622FFAC7515DAF867BA4AE28 (U3CSpawnAllEnemiesInWaveU3Ed__4_tF7B9F4A2104C2A77D525230B1D15CA637B5DB34D * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void ObstracleSpawner_<SpawnAllWaves>d__5::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllWavesU3Ed__5__ctor_m9B00522E9673F1638538E957D1A4E7DC6A23FD81 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method)
{
{
Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL);
int32_t L_0 = ___U3CU3E1__state0;
__this->set_U3CU3E1__state_0(L_0);
return;
}
}
// System.Void ObstracleSpawner_<SpawnAllWaves>d__5::System.IDisposable.Dispose()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllWavesU3Ed__5_System_IDisposable_Dispose_mA29C7F7407E75BA4AE1D39642A67790C51C5A459 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, const RuntimeMethod* method)
{
{
return;
}
}
// System.Boolean ObstracleSpawner_<SpawnAllWaves>d__5::MoveNext()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool U3CSpawnAllWavesU3Ed__5_MoveNext_m1595EACE9B209188F8FD7ED17EB6DB46719F0C07 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CSpawnAllWavesU3Ed__5_MoveNext_m1595EACE9B209188F8FD7ED17EB6DB46719F0C07_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * V_1 = NULL;
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * V_2 = NULL;
int32_t V_3 = 0;
{
int32_t L_0 = __this->get_U3CU3E1__state_0();
V_0 = L_0;
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_1 = __this->get_U3CU3E4__this_2();
V_1 = L_1;
int32_t L_2 = V_0;
if (!L_2)
{
goto IL_0017;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)1)))
{
goto IL_005a;
}
}
{
return (bool)0;
}
IL_0017:
{
__this->set_U3CU3E1__state_0((-1));
// for (int waveIndex = startingWave; waveIndex < waveConfigs.Count; waveIndex++)
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_4 = V_1;
NullCheck(L_4);
int32_t L_5 = L_4->get_startingWave_6();
__this->set_U3CwaveIndexU3E5__2_3(L_5);
goto IL_0071;
}
IL_002c:
{
// var currentWave = waveConfigs[waveIndex];
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_6 = V_1;
NullCheck(L_6);
List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * L_7 = L_6->get_waveConfigs_4();
int32_t L_8 = __this->get_U3CwaveIndexU3E5__2_3();
NullCheck(L_7);
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_9 = List_1_get_Item_mAF23B53788FF4378EB454334302BACF73C67E9AE_inline(L_7, L_8, /*hidden argument*/List_1_get_Item_mAF23B53788FF4378EB454334302BACF73C67E9AE_RuntimeMethod_var);
V_2 = L_9;
// yield return StartCoroutine(SpawnAllEnemiesInWave(currentWave));
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_10 = V_1;
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_11 = V_1;
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_12 = V_2;
NullCheck(L_11);
RuntimeObject* L_13 = ObstracleSpawner_SpawnAllEnemiesInWave_m8F08495B145475CB6C37803D36A5F1F97310F363(L_11, L_12, /*hidden argument*/NULL);
NullCheck(L_10);
Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7 * L_14 = MonoBehaviour_StartCoroutine_m3E33706D38B23CDD179E99BAD61E32303E9CC719(L_10, L_13, /*hidden argument*/NULL);
__this->set_U3CU3E2__current_1(L_14);
__this->set_U3CU3E1__state_0(1);
return (bool)1;
}
IL_005a:
{
__this->set_U3CU3E1__state_0((-1));
// for (int waveIndex = startingWave; waveIndex < waveConfigs.Count; waveIndex++)
int32_t L_15 = __this->get_U3CwaveIndexU3E5__2_3();
V_3 = L_15;
int32_t L_16 = V_3;
__this->set_U3CwaveIndexU3E5__2_3(((int32_t)il2cpp_codegen_add((int32_t)L_16, (int32_t)1)));
}
IL_0071:
{
// for (int waveIndex = startingWave; waveIndex < waveConfigs.Count; waveIndex++)
int32_t L_17 = __this->get_U3CwaveIndexU3E5__2_3();
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_18 = V_1;
NullCheck(L_18);
List_1_t4265154C889AB1BC8D3EF55779EB8329112955A0 * L_19 = L_18->get_waveConfigs_4();
NullCheck(L_19);
int32_t L_20 = List_1_get_Count_m4972DA385A5D70F06D60432A661E720635EDFEC3_inline(L_19, /*hidden argument*/List_1_get_Count_m4972DA385A5D70F06D60432A661E720635EDFEC3_RuntimeMethod_var);
if ((((int32_t)L_17) < ((int32_t)L_20)))
{
goto IL_002c;
}
}
{
// }
return (bool)0;
}
}
// System.Object ObstracleSpawner_<SpawnAllWaves>d__5::System.Collections.Generic.IEnumerator<System.Object>.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CSpawnAllWavesU3Ed__5_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_mB16C6E6FA0FBFCB139724BED1A38A5E7965F9FB8 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
// System.Void ObstracleSpawner_<SpawnAllWaves>d__5::System.Collections.IEnumerator.Reset()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CSpawnAllWavesU3Ed__5_System_Collections_IEnumerator_Reset_m6868A829F5913A2A74C3A131AA21736AE7964950 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CSpawnAllWavesU3Ed__5_System_Collections_IEnumerator_Reset_m6868A829F5913A2A74C3A131AA21736AE7964950_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 * L_0 = (NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 *)il2cpp_codegen_object_new(NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m3EA81A5B209A87C3ADA47443F2AFFF735E5256EE(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, U3CSpawnAllWavesU3Ed__5_System_Collections_IEnumerator_Reset_m6868A829F5913A2A74C3A131AA21736AE7964950_RuntimeMethod_var);
}
}
// System.Object ObstracleSpawner_<SpawnAllWaves>d__5::System.Collections.IEnumerator.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CSpawnAllWavesU3Ed__5_System_Collections_IEnumerator_get_Current_m09390DD70763808E23EDA3CE0697B839AA0622C3 (U3CSpawnAllWavesU3Ed__5_t0FAB3D0F9E6F6F8AAA3AEF7B1632A57D46785FF8 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void ObstracleSpawner_<Start>d__3::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CStartU3Ed__3__ctor_mA020D6CA49B3E2DE0FEA8043D7B5905E4E0DCA8B (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, int32_t ___U3CU3E1__state0, const RuntimeMethod* method)
{
{
Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL);
int32_t L_0 = ___U3CU3E1__state0;
__this->set_U3CU3E1__state_0(L_0);
return;
}
}
// System.Void ObstracleSpawner_<Start>d__3::System.IDisposable.Dispose()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CStartU3Ed__3_System_IDisposable_Dispose_mB2A0A33AA40EF2BB37C83016E4773077740B419A (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, const RuntimeMethod* method)
{
{
return;
}
}
// System.Boolean ObstracleSpawner_<Start>d__3::MoveNext()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool U3CStartU3Ed__3_MoveNext_m8BE77FDFCA857D409EE9C9DB5B5D78576779F6E6 (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * V_1 = NULL;
{
int32_t L_0 = __this->get_U3CU3E1__state_0();
V_0 = L_0;
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_1 = __this->get_U3CU3E4__this_2();
V_1 = L_1;
int32_t L_2 = V_0;
if (!L_2)
{
goto IL_0017;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)1)))
{
goto IL_0039;
}
}
{
return (bool)0;
}
IL_0017:
{
__this->set_U3CU3E1__state_0((-1));
}
IL_001e:
{
// yield return StartCoroutine(SpawnAllWaves()); // Start the coroutine that spawns all enemies in our currentWave
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_4 = V_1;
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_5 = V_1;
NullCheck(L_5);
RuntimeObject* L_6 = ObstracleSpawner_SpawnAllWaves_mF9CF231D029E12A8C0291ED781A58FCA853A2CFE(L_5, /*hidden argument*/NULL);
NullCheck(L_4);
Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7 * L_7 = MonoBehaviour_StartCoroutine_m3E33706D38B23CDD179E99BAD61E32303E9CC719(L_4, L_6, /*hidden argument*/NULL);
__this->set_U3CU3E2__current_1(L_7);
__this->set_U3CU3E1__state_0(1);
return (bool)1;
}
IL_0039:
{
__this->set_U3CU3E1__state_0((-1));
// while (looping); // When coroutine SpawnAllWaves finishes check if looping == true
ObstracleSpawner_t09FEAA675529B317291DE1C4C868672AE494DB0C * L_8 = V_1;
NullCheck(L_8);
bool L_9 = L_8->get_looping_5();
if (L_9)
{
goto IL_001e;
}
}
{
// }
return (bool)0;
}
}
// System.Object ObstracleSpawner_<Start>d__3::System.Collections.Generic.IEnumerator<System.Object>.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CStartU3Ed__3_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_mCFA1D0B3347C2FBCFEB2875329BA8AB6E32FA040 (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
// System.Void ObstracleSpawner_<Start>d__3::System.Collections.IEnumerator.Reset()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void U3CStartU3Ed__3_System_Collections_IEnumerator_Reset_m75E5BBF0FA5110D6DBA8719269E91913F70F8839 (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (U3CStartU3Ed__3_System_Collections_IEnumerator_Reset_m75E5BBF0FA5110D6DBA8719269E91913F70F8839_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 * L_0 = (NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 *)il2cpp_codegen_object_new(NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m3EA81A5B209A87C3ADA47443F2AFFF735E5256EE(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, U3CStartU3Ed__3_System_Collections_IEnumerator_Reset_m75E5BBF0FA5110D6DBA8719269E91913F70F8839_RuntimeMethod_var);
}
}
// System.Object ObstracleSpawner_<Start>d__3::System.Collections.IEnumerator.get_Current()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR RuntimeObject * U3CStartU3Ed__3_System_Collections_IEnumerator_get_Current_m177A33EC37E7E601516FE2A68626A9CC785C9FF7 (U3CStartU3Ed__3_tC7A20C48E0D6D9A4CF08AABAD407DD1680587EA5 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get_U3CU3E2__current_1();
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * __this, float ___x0, float ___y1, const RuntimeMethod* method)
{
{
float L_0 = ___x0;
__this->set_x_0(L_0);
float L_1 = ___y1;
__this->set_y_1(L_1);
return;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_op_Multiply_mC7A7802352867555020A90205EBABA56EE5E36CB_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___a0, float ___d1, const RuntimeMethod* method)
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 V_0;
memset((&V_0), 0, sizeof(V_0));
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_0 = ___a0;
float L_1 = L_0.get_x_0();
float L_2 = ___d1;
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_3 = ___a0;
float L_4 = L_3.get_y_1();
float L_5 = ___d1;
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_6;
memset((&L_6), 0, sizeof(L_6));
Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline((&L_6), ((float)il2cpp_codegen_multiply((float)L_1, (float)L_2)), ((float)il2cpp_codegen_multiply((float)L_4, (float)L_5)), /*hidden argument*/NULL);
V_0 = L_6;
goto IL_0019;
}
IL_0019:
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_7 = V_0;
return L_7;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_op_Addition_m5EACC2AEA80FEE29F380397CF1F4B11D04BE71CC_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___a0, Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___b1, const RuntimeMethod* method)
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 V_0;
memset((&V_0), 0, sizeof(V_0));
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_0 = ___a0;
float L_1 = L_0.get_x_0();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_2 = ___b1;
float L_3 = L_2.get_x_0();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_4 = ___a0;
float L_5 = L_4.get_y_1();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_6 = ___b1;
float L_7 = L_6.get_y_1();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_8;
memset((&L_8), 0, sizeof(L_8));
Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline((&L_8), ((float)il2cpp_codegen_add((float)L_1, (float)L_3)), ((float)il2cpp_codegen_add((float)L_5, (float)L_7)), /*hidden argument*/NULL);
V_0 = L_8;
goto IL_0023;
}
IL_0023:
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_9 = V_0;
return L_9;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float WaveConfig_GetEnemyMoveSpeed_mD4BC5E513CEE4EA5E998627C083A25947386911D_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return enemyMoveSpeed;
float L_0 = __this->get_enemyMoveSpeed_9();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 Vector2_op_Implicit_mE407CAF7446E342E059B00AA9EDB301AEC5B7B1A_inline (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___v0, const RuntimeMethod* method)
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 V_0;
memset((&V_0), 0, sizeof(V_0));
{
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_0 = ___v0;
float L_1 = L_0.get_x_2();
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_2 = ___v0;
float L_3 = L_2.get_y_3();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_4;
memset((&L_4), 0, sizeof(L_4));
Vector2__ctor_m9F1F2D5EB5D1FF7091BB527AC8A72CBB309D115E_inline((&L_4), L_1, L_3, /*hidden argument*/NULL);
V_0 = L_4;
goto IL_0015;
}
IL_0015:
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_5 = V_0;
return L_5;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E Vector2_op_Implicit_m4FA146E613DBFE6C1C4B0E9B461D622E6F2FC294_inline (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___v0, const RuntimeMethod* method)
{
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E V_0;
memset((&V_0), 0, sizeof(V_0));
{
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_0 = ___v0;
float L_1 = L_0.get_x_0();
Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_2 = ___v0;
float L_3 = L_2.get_y_1();
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_4;
memset((&L_4), 0, sizeof(L_4));
Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline((&L_4), L_1, L_3, (0.0f), /*hidden argument*/NULL);
V_0 = L_4;
goto IL_001a;
}
IL_001a:
{
Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_5 = V_0;
return L_5;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method)
{
{
float L_0 = ___x0;
__this->set_x_2(L_0);
float L_1 = ___y1;
__this->set_y_3(L_1);
float L_2 = ___z2;
__this->set_z_4(L_2);
return;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t DamageDealer_GetDamage_mACE71A6C2E3690BD4B5573A247846EDDE0BF7C9A_inline (DamageDealer_t5AB6A6C000BCD605B28AEAF6B8E46F4EF5ED78D6 * __this, const RuntimeMethod* method)
{
{
// return damage; // Gets the damage
int32_t L_0 = __this->get_damage_4();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t GameSession_GetScore_m261421177B31C07760F0942659EDCC341C24E7FD_inline (GameSession_t01C53B6EB975CC4025A3484995B36C45BBA800C9 * __this, const RuntimeMethod* method)
{
{
// return score; // Gets the score value
int32_t L_0 = __this->get_score_4();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t Player_GetHealth_m258C63EDD1D293DA477E9D375D04AF88598B75E5_inline (Player_t5689617909B48F7640EA0892D85C92C13CC22C6F * __this, const RuntimeMethod* method)
{
{
// return health;
int32_t L_0 = __this->get_health_8();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * WaveConfig_GetEnemyPrefab_m3FA01EC667D1DAD66E4A898DD5E04998B41A76C3_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return enemyPrefab;
GameObject_tC000A2E1A7CF1E10FD7BA08863287C072207C319 * L_0 = __this->get_enemyPrefab_4();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void ObstraclePathing_SetWaveConfig_mBD057DAAF238FE5C55ECF163D562E245AFC0B0FB_inline (ObstraclePathing_tB3CCDA2278F41F3573068887419D64ECF5EDFDCA * __this, WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * ___waveConfigToSet0, const RuntimeMethod* method)
{
{
// waveConfig = waveConfigToSet;
WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * L_0 = ___waveConfigToSet0;
__this->set_waveConfig_5(L_0);
// }
return;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float WaveConfig_GetTimeBetweenSpawns_m19729DCB6B94BCC9D8E9FA275B7FA9E40C32E880_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return timeBetweenSpawns;
float L_0 = __this->get_timeBetweenSpawns_6();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t WaveConfig_GetNumberOfEnemies_mACD21FB3F34347F81B93262A8B265AB1348A76D2_inline (WaveConfig_t4820CBD9DE990BD60B5EDBB787AE897A0A3B02E1 * __this, const RuntimeMethod* method)
{
{
// return numberOfEnemies;
int32_t L_0 = __this->get_numberOfEnemies_8();
return L_0;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR RuntimeObject * List_1_get_Item_mF00B574E58FB078BB753B05A3B86DD0A7A266B63_gshared_inline (List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 * __this, int32_t ___index0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___index0;
int32_t L_1 = (int32_t)__this->get__size_2();
if ((!(((uint32_t)L_0) >= ((uint32_t)L_1))))
{
goto IL_000e;
}
}
{
ThrowHelper_ThrowArgumentOutOfRangeException_m4841366ABC2B2AFA37C10900551D7E07522C0929(/*hidden argument*/NULL);
}
IL_000e:
{
ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_2 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)__this->get__items_1();
int32_t L_3 = ___index0;
RuntimeObject * L_4 = IL2CPP_ARRAY_UNSAFE_LOAD((ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)L_2, (int32_t)L_3);
return L_4;
}
}
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t List_1_get_Count_m5D847939ABB9A78203B062CAFFE975792174D00F_gshared_inline (List_1_t3F94120C77410A62EAE48421CF166B83AB95A2F5 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = (int32_t)__this->get__size_2();
return L_0;
}
}
|
[
"73161772+BeliBvana@users.noreply.github.com"
] |
73161772+BeliBvana@users.noreply.github.com
|
5ac6e66f89691ae17c8107ff789dab2009aa84ce
|
097007b435b1bf420a19ce33aabee32f0789f145
|
/atcoder/acl_practice/disjoint_set_union.cpp
|
1731f626babb75c107e648bc4ea1b17dc369df3d
|
[] |
no_license
|
Anshit01/Competitive-Programming
|
71f84a85dde49278f8c3318d00db70616d8ea470
|
13911ec7f622abc061fea1ccc1f35d34118641f7
|
refs/heads/master
| 2023-06-11T12:06:11.722865
| 2021-06-30T11:51:01
| 2021-06-30T11:51:01
| 266,321,296
| 5
| 2
| null | 2020-10-19T09:47:06
| 2020-05-23T11:21:40
|
C++
|
UTF-8
|
C++
| false
| false
| 2,669
|
cpp
|
/* *>>>>>Anshit_Bhardwaj<<<<<* */
#include <bits/stdc++.h>
#define int long long
#define f(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define inputArray(arr) f(i, 0, arr.size()) cin >> arr[i]
#define printArray(arr) f(i, 0, arr.size()) cout << arr[i] << ' '; cout << endl
#define endl '\n'
typedef long long ll;
const int mod = 1e9+7;
using namespace std;
struct dsu {
public:
dsu() : _n(0) {}
dsu(int n) : _n(n), parent_or_size(n, -1) {}
int merge(int a, int b) {
assert(0 <= a && a < _n);
assert(0 <= b && b < _n);
int x = leader(a), y = leader(b);
if (x == y) return x;
if (-parent_or_size[x] < -parent_or_size[y]) std::swap(x, y);
parent_or_size[x] += parent_or_size[y];
parent_or_size[y] = x;
return x;
}
bool same(int a, int b) {
assert(0 <= a && a < _n);
assert(0 <= b && b < _n);
return leader(a) == leader(b);
}
int leader(int a) {
assert(0 <= a && a < _n);
if (parent_or_size[a] < 0) return a;
return parent_or_size[a] = leader(parent_or_size[a]);
}
int size(int a) {
assert(0 <= a && a < _n);
return -parent_or_size[leader(a)];
}
std::vector<std::vector<int>> groups() {
std::vector<int> leader_buf(_n), group_size(_n);
for (int i = 0; i < _n; i++) {
leader_buf[i] = leader(i);
group_size[leader_buf[i]]++;
}
std::vector<std::vector<int>> result(_n);
for (int i = 0; i < _n; i++) {
result[i].reserve(group_size[i]);
}
for (int i = 0; i < _n; i++) {
result[leader_buf[i]].push_back(i);
}
result.erase(
std::remove_if(result.begin(), result.end(),
[&](const std::vector<int>& v) { return v.empty(); }),
result.end());
return result;
}
private:
int _n;
// root node: -1 * component size
// otherwise: parent
std::vector<int> parent_or_size;
};
void solve() {
int n;
cin >> n;
int q;
cin >> q;
dsu graph(n);
f(i, 0, q){
int op, u, v;
cin >> op >> u >> v;
if(op == 0){
graph.merge(u, v);
}else{
cout << (graph.same(u, v)? 1 : 0) << endl;
}
}
}
int32_t main(){
ios::sync_with_stdio(0);
cin.tie(0);
int T = 1;
// cin >> T;
while(T--){
solve();
// if(solve())
// cout << "YES" << endl;
// else
// cout << "NO" << endl;
}
return 0;
}
|
[
"bhardwaj.anshit1379@gmail.com"
] |
bhardwaj.anshit1379@gmail.com
|
0c6eb32d04df38017d97aa8e64f60a9a1c30d7e8
|
a087228e073569668de2989717c69016f1d1f528
|
/access_control_allow_methods.hpp
|
ba2d0dbe67efb174710f6c1956f4237096327d85
|
[
"MIT"
] |
permissive
|
ElesiqArt/buffer_handle_http_header
|
375bd5bebd21ae06b0cd9ac38ef91e09e1299d33
|
ffe8125f3a4bf8b528770bf8716695eb8a469582
|
refs/heads/master
| 2020-04-13T14:42:51.015334
| 2019-01-23T06:41:54
| 2019-01-23T06:41:54
| 163,270,174
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 720
|
hpp
|
#ifndef BUFFER_HANDLE_HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS_HPP
#define BUFFER_HANDLE_HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS_HPP
#include <buffer_handle_http_header/common.hpp> // bitset_field_t
#include <buffer_handle_http_header/type.hpp> // action config
namespace buffer_handle_http_header
{
template<config Config, class Method, bool IsLong = false>
struct access_control_allow_methods_t : public bitset_field_t<Config, align::left, ' ', Method, IsLong>
{
template<action Action>
char * handle(char * buffer, typename Method::value_type value);
};
};
#include <buffer_handle_http_header/access_control_allow_methods.hcp>
#endif/*BUFFER_HANDLE_HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS_HPP*/
|
[
"gregoire.scano@malloc.fr"
] |
gregoire.scano@malloc.fr
|
9daf999e8885094966987fb9f4f7a46fd0bfbcc0
|
a85361a350ac35929e8e28dede78c63f03320c1b
|
/wheel_balancing_robot (1).ino
|
078d633f751804fb29b7f0f415139f79d85a2131
|
[] |
no_license
|
chinmaytodankar/RoboconCRCE19
|
451a9dafebadcb7f0e47bc673385e2f289fb0225
|
50b2f57f801fdb2b893f5b94bed9881fa97fa200
|
refs/heads/master
| 2022-01-09T22:37:49.670104
| 2019-03-26T12:53:01
| 2019-03-26T12:53:01
| 137,025,249
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,377
|
ino
|
#include <PID_v1.h>
#include <LMotorController.h>
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
#define LOG_INPUT 0
#define MANUAL_TUNING 0
#define LOG_PID_CONSTANTS 0 //MANUAL_TUNING must be 1
#define MOVE_BACK_FORTH 0
#define MIN_ABS_SPEED 30
//MPU
MPU6050 mpu;
#define OUTPUT_READABLE_YAWPITCHROLL
// MPU control/status vars
#define INTERRUPT_PIN 2 // use pin 2 on Arduino Uno & most boards
#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6)
bool blinkState = false;
// MPU control/status vars
bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU
uint8_t devStatus; // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount; // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer
// orientation/motion vars
Quaternion q; // [w, x, y, z] quaternion container
VectorInt16 aa; // [x, y, z] accel sensor measurements
VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements
VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements
VectorFloat gravity; // [x, y, z] gravity vector
float euler[3]; // [psi, theta, phi] Euler angle container
float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector
// packet structure for InvenSense teapot demo
uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' };
//PID
#if MANUAL_TUNING
double kp , ki, kd;
double prevKp, prevKi, prevKd;
#endif
double originalSetpoint = 174.29;
double setpoint = originalSetpoint;
double movingAngleOffset = 0.3;
double input, output;
int moveState=0; //0 = balance; 1 = back; 2 = forth
#if MANUAL_TUNING
PID pid(&input, &output, &setpoint, 0, 0, 0, DIRECT);
#else
PID pid(&input, &output, &setpoint, 70, 240, 1.9, DIRECT);
#endif
//MOTOR CONTROLLER
int ENA = 3;
int IN1 = 4;
int IN2 = 8;
int IN3 = 5;
int IN4 = 7;
int ENB = 6;
LMotorController motorController(ENA, IN1, IN2, ENB, IN3, IN4, 0.6, 1);
//timers
long time1Hz = 0;
long time5Hz = 0;
// ================================================================
// === INTERRUPT DETECTION ROUTINE ===
// ================================================================
volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high
void dmpDataReady() {
mpuInterrupt = true;
}
void setup()
{
// join I2C bus (I2Cdev library doesn't do this automatically)
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
Fastwire::setup(400, true);
#endif
Serial.begin(115200);
while (!Serial); // wait for Leonardo enumeration, others continue immediately
// initialize device
Serial.println(F("Initializing I2C devices..."));
mpu.initialize();
pinMode(INTERRUPT_PIN, INPUT);
// verify connection
Serial.println(F("Testing device connections..."));
Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed"));
// wait for ready
Serial.println(F("\nSend any character to begin DMP programming and demo: "));
while (Serial.available() && Serial.read()); // empty buffer
while (!Serial.available()); // wait for data
while (Serial.available() && Serial.read()); // empty buffer again
// load and configure the DMP
Serial.println(F("Initializing DMP..."));
devStatus = mpu.dmpInitialize();
// supply your own gyro offsets here, scaled for min sensitivity
mpu.setXGyroOffset(220);
mpu.setYGyroOffset(76);
mpu.setZGyroOffset(-85);
mpu.setZAccelOffset(1788); // 1688 factory default for my test chip
// make sure it worked (returns 0 if so)
if (devStatus == 0)
{
// turn on the DMP, now that it's ready
Serial.println(F("Enabling DMP..."));
mpu.setDMPEnabled(true);
// enable Arduino interrupt detection
Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)..."));
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus();
// set our DMP Ready flag so the main loop() function knows it's okay to use it
Serial.println(F("DMP ready! Waiting for first interrupt..."));
dmpReady = true;
// get expected DMP packet size for later comparison
packetSize = mpu.dmpGetFIFOPacketSize();
//setup PID
pid.SetMode(AUTOMATIC);
pid.SetSampleTime(10);
pid.SetOutputLimits(-255, 255);
}
else
{
// ERROR!
// 1 = initial memory load failed
// 2 = DMP configuration updates failed
// (if it's going to break, usually the code will be 1)
Serial.print(F("DMP Initialization failed (code "));
Serial.print(devStatus);
Serial.println(F(")"));
}
// configure LED for output
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
// if programming failed, don't try to do anything
if (!dmpReady) return;
// wait for MPU interrupt or extra packet(s) available
while (!mpuInterrupt && fifoCount < packetSize)
{
//no mpu data - performing PID calculations and output to motors
pid.Compute();
motorController.move(output, MIN_ABS_SPEED);
unsigned long currentMillis = millis();
if (currentMillis - time1Hz >= 1000)
{
loopAt1Hz();
time1Hz = currentMillis;
}
if (currentMillis - time5Hz >= 5000)
{
loopAt5Hz();
time5Hz = currentMillis;
}
}
// reset interrupt flag and get INT_STATUS byte
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();
// get current FIFO count
fifoCount = mpu.getFIFOCount();
// check for overflow (this should never happen unless our code is too inefficient)
if ((mpuIntStatus & 0x10) || fifoCount == 1024)
{
// reset so we can continue cleanly
mpu.resetFIFO();
Serial.println(F("FIFO overflow!"));
// otherwise, check for DMP data ready interrupt (this should happen frequently)
}
else if (mpuIntStatus & 0x02)
{
// wait for correct available data length, should be a VERY short wait
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
// read a packet from FIFO
mpu.getFIFOBytes(fifoBuffer, packetSize);
// track FIFO count here in case there is > 1 packet available
// (this lets us immediately read more without waiting for an interrupt)
fifoCount -= packetSize;
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
#ifdef OUTPUT_READABLE_YAWPITCHROLL
// display Euler angles in degrees
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
Serial.print("ypr\t");
Serial.print(ypr[0] * 180/M_PI);
Serial.print("\t");
Serial.print(ypr[1] * 180/M_PI);
Serial.print("\t");
Serial.println(ypr[2] * 180/M_PI);
#endif
input = ypr[1] * 180/M_PI + 180;
}
}
void loopAt1Hz()
{
#if MANUAL_TUNING
setPIDTuningValues();
#endif
}
void loopAt5Hz()
{
#if MOVE_BACK_FORTH
moveBackForth();
#endif
}
//move back and forth
void moveBackForth()
{
moveState++;
if (moveState > 2) moveState = 0;
if (moveState == 0)
setpoint = originalSetpoint;
else if (moveState == 1)
setpoint = originalSetpoint - movingAngleOffset;
else
setpoint = originalSetpoint + movingAngleOffset;
}
//PID Tuning (3 potentiometers)
#if MANUAL_TUNING
void setPIDTuningValues()
{
readPIDTuningValues();
if (kp != prevKp || ki != prevKi || kd != prevKd)
{
#if LOG_PID_CONSTANTS
Serial.print(kp);Serial.print(", ");Serial.print(ki);Serial.print(", ");Serial.println(kd);
#endif
pid.SetTunings(kp, ki, kd);
prevKp = kp; prevKi = ki; prevKd = kd;
}
}
void readPIDTuningValues()
{
int potKp = analogRead(A0);
int potKi = analogRead(A1);
int potKd = analogRead(A2);
kp = map(potKp, 0, 1023, 0, 25000) / 100.0; //0 - 250
ki = map(potKi, 0, 1023, 0, 100000) / 100.0; //0 - 1000
kd = map(potKd, 0, 1023, 0, 500) / 100.0; //0 - 5
}
#endif
|
[
"vedantikarnik@gmail.com"
] |
vedantikarnik@gmail.com
|
e16581fc30ae36c999c49553c978bba6c6e2ac36
|
7b4a0a266f8488f2b2596d95e6f5c985c8f232b9
|
/algos_and_data_structures/algo/tree_traversal.cpp
|
4a9652d85adeeef59e7d5fde312b54f664cf0f93
|
[] |
no_license
|
shishirkumar1996/cp
|
811d8607d5f460fcec445db9af4853c550aee685
|
e89cb840e5b3fd91be4b9402a6fdcb20bb3466c6
|
refs/heads/master
| 2020-03-10T11:06:17.696405
| 2019-01-04T07:12:45
| 2019-01-04T07:12:45
| 129,348,767
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 726
|
cpp
|
#include<bits/stdc++.h>
#define lld long long int
#define faster ios_base::sync_with_stdio(false);
#define vi vector< int >
#define vii vector< vi >
#define NUM 100007
using namespace std;
int timer = 0;
vii graph(NUM);
vi in(NUM),out(NUM);
int dfs(int v,int p=-1){
in[v] = ++timer;
for(int i=0;i<graph[v].size();i++){
int child = graph[v][i];
if(child==p)continue;
dfs(child,v);
}
out[v] = ++timer;
}
int main(){
int n;
cin>>n;
for(int i=0;i<n-1;i++){
int a,b;
cin>>a>>b;
graph[a].push_back(b);graph[b].push_back(a);
}
int root = 0;//here 0 is taken as root;
dfs(0);
for(int i=0;i<n;i++)cout<<in[i]<<" "; cout<<endl;
for(int i=0;i<n;i++)cout<<out[i]<<" "; cout<<endl;
}
|
[
"shishirsharad@yahoo.com"
] |
shishirsharad@yahoo.com
|
018fd1fbe32f5917e34148fcbf76e91759dc426c
|
52dc9080af88c00222cc9b37aa08c35ff3cafe86
|
/0900/00/903c.cpp
|
c8ea81389bf208f484b7c4de0d67defc6557eb5d
|
[
"Unlicense"
] |
permissive
|
shivral/cf
|
1c1acde25fc6af775acaeeb6b5fe5aa9bbcfd4d2
|
d7be128c3a9adb014a231a399f1c5f19e1ab2a38
|
refs/heads/master
| 2023-03-20T01:29:25.559828
| 2021-03-05T08:30:30
| 2021-03-05T08:30:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 618
|
cpp
|
#include <iostream>
#include <map>
#include <vector>
template <typename T>
std::istream& operator >>(std::istream& input, std::vector<T>& v)
{
for (T& a : v)
input >> a;
return input;
}
void answer(unsigned v)
{
std::cout << v << '\n';
}
void solve(std::vector<unsigned>& a)
{
std::map<unsigned, unsigned> f;
for (const unsigned x : a)
++f[x];
unsigned k = 0;
for (const auto& x : f)
k = std::max(k, x.second);
answer(k);
}
int main()
{
size_t n;
std::cin >> n;
std::vector<unsigned> a(n);
std::cin >> a;
solve(a);
return 0;
}
|
[
"5691735+actium@users.noreply.github.com"
] |
5691735+actium@users.noreply.github.com
|
a17f720ef0d0d9d82711df094a4f6541424f151d
|
c65f87dcf50449415306349e9f97a6fa3c06346c
|
/binderDemo/src/DemoService.cpp
|
0175d35ffc7b83b422aee7aaf0edc869bfa037f8
|
[] |
no_license
|
vim1993/binder_demo
|
ac10a14b5989e918314cb126980f6fe2ef5b2e41
|
378aa365c0832608c3d11497114568f5923841a5
|
refs/heads/master
| 2020-03-27T21:32:17.263049
| 2019-03-19T08:37:16
| 2019-03-19T08:37:16
| 147,153,911
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 2,608
|
cpp
|
#include <stdio.h>
#include <unistd.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
#include <binder/IPCThreadState.h>
#include "IDemoDataCenter.h"
#include "IDemoInterface.h"
#define LOG_TAG "BINDERDEMO"
using namespace android;
IMPLEMENT_META_INTERFACE(DemoService, "com.orange.BinderDemoService");
void BnDemoService::sendEvent(unsigned int msgid, int extcode) {
if(m_notify.get() == 0) {
ALOGE("sendEvent failed, notify not init");
return;
}
Parcel data;
data.writeInt32(msgid);
data.writeInt32(extcode);
m_notify->transact(NOTIFY_TRANSATION, data, NULL);
ALOGE("send Event:%d,%d", msgid, extcode);
return;
}
void BnDemoService::setBinderNotify(sp < IBinder > & obj) {
m_notify = obj;
ALOGE("SET_NOTIFY_TRANSACTION %p", m_notify.get());
return;
}
void BnDemoService::setData(unsigned int data) {
m_data = data;
ALOGE("m_data:%d", m_data);
return;
}
status_t BnDemoService::onTransact(uint32_t code, const Parcel & data, Parcel * reply, uint32_t flags) {
switch(code) {
case SET_DATA_TRANSACTION: {
setData(data.readInt32());
sendEvent(1, 0);
}
break;
case GET_DATA_TRANSACTION: {
reply->writeInt32(getData());
sendEvent(2, 0);
}
break;
case SET_NOTIFY_TRANSACTION: {
sp < IBinder > binder = data.readStrongBinder();
setBinderNotify(binder);
sendEvent(3, 0);
}
break;
case GET_PROCINFO_TRANSACTION: {
procInfo * procinfo = getServiceInfo();
reply->writeInt32(procinfo->pid);
reply->writeCString(procinfo->procName);
reply->writeCString(procinfo->serviceName);
sendEvent(4, 0);
}
break;
default:
return BBinder::onTransact(code, data, reply, flags);
}
return 0;
}
int main(int argc, char * argv[]) {
sp<IServiceManager> sm = defaultServiceManager();
sm->addService(String16("BinderDemoService"), new BnDemoService());
ALOGE("start startThreadPool");
ProcessState::self()->startThreadPool();
ALOGE("start joinThreadPool");//startThreadPool开启线程用于接收数据并且加入线程池。
//阻塞当前线程,防止退出当前进程。
#if 0
IPCThreadState::self()->joinThreadPool();
#else
while(1) {
usleep(2000*1000);
}
#endif
return 0;
}
|
[
"vim1993@163.com"
] |
vim1993@163.com
|
5072a8ed70b3e1ebe51a710cb73ef9d3052119a6
|
44ab57520bb1a9b48045cb1ee9baee8816b44a5b
|
/EngineTesting/Code/System/SystemTesting/FileManagerSuite/File/DirectoryTesting.cpp
|
37ccf989eeb6a0d8c16e058b67d1e2eca5ecc736
|
[
"BSD-3-Clause"
] |
permissive
|
WuyangPeng/Engine
|
d5d81fd4ec18795679ce99552ab9809f3b205409
|
738fde5660449e87ccd4f4878f7bf2a443ae9f1f
|
refs/heads/master
| 2023-08-17T17:01:41.765963
| 2023-08-16T07:27:05
| 2023-08-16T07:27:05
| 246,266,843
| 10
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 1,687
|
cpp
|
/// Copyright (c) 2010-2022
/// Threading Core Render Engine
///
/// 作者:彭武阳,彭晔恩,彭晔泽
/// 联系作者:94458936@qq.com
///
/// 标准:std:c++20
/// 引擎测试版本:0.8.1.5 (2022/12/14 17:27)
#include "DirectoryTesting.h"
#include "System/FileManager/File.h"
#include "System/FileManager/Flags/FileFlags.h"
#include "CoreTools/Helper/AssertMacro.h"
#include "CoreTools/Helper/ClassInvariant/SystemClassInvariantMacro.h"
#include "CoreTools/UnitTestSuite/UnitTestDetail.h"
using namespace std::literals;
System::DirectoryTesting::DirectoryTesting(const OStreamShared& stream)
: ParentType{ stream }
{
SYSTEM_SELF_CLASS_IS_VALID_9;
}
CLASS_INVARIANT_PARENT_IS_VALID_DEFINE(System, DirectoryTesting)
void System::DirectoryTesting::DoRunUnitTest()
{
ASSERT_NOT_THROW_EXCEPTION_0(MainTest);
}
void System::DirectoryTesting::MainTest()
{
ASSERT_NOT_THROW_EXCEPTION_0(DirectoryTest);
}
void System::DirectoryTesting::DirectoryTest()
{
const auto rootDirectory = CreateSystemFile(SYSTEM_TEXT("Resource"s),
FileHandleDesiredAccess::Read,
FileHandleShareMode::ShareRead,
FileHandleCreationDisposition::OpenExisting,
FileHandleAttributes::Directory,
FileHandleOther::BackupSemantics,
FileHandleSecurity::Default);
ASSERT_NOT_THROW_EXCEPTION_1(IsFileHandleValidTest, rootDirectory);
ASSERT_NOT_THROW_EXCEPTION_1(CloseFile, rootDirectory);
}
|
[
"94458936@qq.com"
] |
94458936@qq.com
|
2dae822877d0532d0479c17b9f34ea83dededc21
|
ee60b09a4e6675cbf4c95bdfaf651024dc96fc8c
|
/JProject/Sample_FBX_Mesh_Depth_2/Sample.cpp
|
edaa460677de17df802bfcd2e658c5eda208d49d
|
[] |
no_license
|
JeongBongSeong/JProject
|
bda15e31e8e27f1efb703949c65d4d440e5f365b
|
2f44b0c444a893f0effd3760683a89151f7a11c7
|
refs/heads/master
| 2023-08-27T09:52:42.585052
| 2021-11-02T10:08:24
| 2021-11-02T10:08:24
| 421,306,343
| 0
| 0
| null | null | null | null |
UHC
|
C++
| false
| false
| 2,693
|
cpp
|
#define _CRT_SECURE_NO_WARNINGS
#include "Sample.h"
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
Sample game;
//윈도우 레지스터 등록
game.InitWindows(hInstance, nCmdShow, L"JGame");
game.Run();
return 0;
}
bool Sample::PreRender()
{
JCore::PreRender();
m_pImmediateContext->ClearDepthStencilView(
m_pDepthStencilView,
D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);
return true;
}
HRESULT Sample::CreateDepthStencilView()
{
HRESULT hr = S_OK;
DXGI_SWAP_CHAIN_DESC Desc;
m_pSwapChain->GetDesc(&Desc);
// 1)텍스처 생성 : 깊이,스텐실 값을 저장하는 버퍼용
ID3D11Texture2D* pTexture = nullptr;
D3D11_TEXTURE2D_DESC td;
td.Width = Desc.BufferDesc.Width;
td.Height = Desc.BufferDesc.Height;
td.MipLevels = 1;
td.ArraySize = 1;
td.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
td.Usage = D3D11_USAGE_DEFAULT;
td.BindFlags = D3D11_BIND_DEPTH_STENCIL;
td.CPUAccessFlags = 0;
td.MiscFlags = 0;
td.SampleDesc.Count = 1;
td.SampleDesc.Quality = 0;
hr = m_pd3dDevice->CreateTexture2D(&td, NULL, &pTexture);
if (FAILED(hr))
{
return hr;
}
D3D11_DEPTH_STENCIL_VIEW_DESC svd;
ZeroMemory(&svd, sizeof(D3D11_DEPTH_STENCIL_VIEW_DESC));
svd.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
svd.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
svd.Texture2D.MipSlice = 0;
hr = m_pd3dDevice->CreateDepthStencilView(pTexture, &svd,
&m_pDepthStencilView);
if (FAILED(hr))
{
return hr;
}
SAFE_RELEASE(pTexture);
m_pImmediateContext->OMSetRenderTargets(1,
&m_pRenderTargetView, m_pDepthStencilView);
return hr;
}
HRESULT Sample::CreateDepthStencilState()
{
HRESULT hr = S_OK;
D3D11_DEPTH_STENCIL_DESC sd;
ZeroMemory(&sd, sizeof(D3D11_DEPTH_STENCIL_DESC));
sd.DepthEnable = TRUE;
sd.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
sd.DepthFunc = D3D11_COMPARISON_LESS_EQUAL;
hr = m_pd3dDevice->CreateDepthStencilState(&sd, &m_pDsvState);
if (FAILED(hr))
{
return hr;
}
m_pImmediateContext->OMSetDepthStencilState(m_pDsvState, 0x01);
return hr;
}
bool Sample::Init()
{
CreateDepthStencilView();
CreateDepthStencilState();
m_FbxObj.LoadObject("../../data/object/ship.fbx");
//m_Texture.LoadTexture(L"../../data/wireframe.dds");
//m_FbxObj.LoadObject("../../data/box.fbx");
return true;
}
bool Sample::Frame()
{
return true;
}
bool Sample::Render()
{
m_FbxObj.SetMatrix(nullptr, &m_Camera.m_matView, &m_Camera.m_matProj);
m_FbxObj.Render(m_pImmediateContext);
return true;
}
bool Sample::Release()
{
m_FbxObj.Release();
//m_Texture.Release();
return true;
}
Sample::Sample()
{
}
Sample::~Sample()
{
}
|
[
"kgca38-2@KGCA385"
] |
kgca38-2@KGCA385
|
470fbaf6940866d48579ce472942a27a5d292db9
|
38745567688338fb089205833221a8e09d84161b
|
/include/api/rtc_event_log_output_file.h
|
e536dfc4599805c2ddda049a9cd504b6363feefe
|
[
"Apache-2.0"
] |
permissive
|
Cozdemir/spitfire
|
a076d41cf3cacd9dc7df5a164d74e2b1349cc95d
|
0d1713f5f7bd7d5803895a1cc48a97bf27bef9e1
|
refs/heads/master
| 2020-11-25T23:46:43.425549
| 2019-11-11T10:34:54
| 2019-11-11T10:34:54
| 228,893,177
| 0
| 0
|
Apache-2.0
| 2019-12-18T18:08:07
| 2019-12-18T17:49:28
| null |
UTF-8
|
C++
| false
| false
| 2,110
|
h
|
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_RTC_EVENT_LOG_OUTPUT_FILE_H_
#define API_RTC_EVENT_LOG_OUTPUT_FILE_H_
#include <stddef.h>
#include <stdio.h>
#include <string>
#include "api/rtc_event_log_output.h"
#include "rtc_base/platform_file.h" // Can't neatly forward PlatformFile.
#include "rtc_base/system/file_wrapper.h"
namespace webrtc {
class RtcEventLogOutputFile final : public RtcEventLogOutput {
public:
static const size_t kMaxReasonableFileSize; // Explanation at declaration.
// Unlimited/limited-size output file (by filename).
explicit RtcEventLogOutputFile(const std::string& file_name);
RtcEventLogOutputFile(const std::string& file_name, size_t max_size_bytes);
// Limited-size output file (by FILE*). This class takes ownership
// of the FILE*, and closes it on destruction.
RtcEventLogOutputFile(FILE* file, size_t max_size_bytes);
// TODO(bugs.webrtc.org/6463): Deprecated, delete together with the
// corresponding PeerConnection::StartRtcEventLog override.
RtcEventLogOutputFile(rtc::PlatformFile file, size_t max_size_bytes);
~RtcEventLogOutputFile() override = default;
bool IsActive() const override;
bool Write(const std::string& output) override;
private:
RtcEventLogOutputFile(FileWrapper file, size_t max_size_bytes);
// IsActive() can be called either from outside or from inside, but we don't
// want to incur the overhead of a virtual function call if called from inside
// some other function of this class.
inline bool IsActiveInternal() const;
// Maximum size, or zero for no limit.
const size_t max_size_bytes_;
size_t written_bytes_{0};
FileWrapper file_;
};
} // namespace webrtc
#endif // API_RTC_EVENT_LOG_OUTPUT_FILE_H_
|
[
"andrew@rainway.io"
] |
andrew@rainway.io
|
6c1b0e34bfe88899a8df4b7a76c837b9e8549410
|
39ac450698e68c44862fc8fdac9efc0ee9c6994d
|
/Week_01/id_31/LeetCode_242_31.cpp
|
1519220f2332b59d5c3627b7faec797b826fc359
|
[] |
no_license
|
algorithm003/algorithm
|
70d0f6a292c480e017e90ab5996772becbc7113c
|
06b1a12411c22c3f24fd58b24f17a923dca380d5
|
refs/heads/master
| 2022-02-02T11:59:01.917835
| 2019-06-26T14:33:22
| 2019-08-05T15:55:03
| 189,704,070
| 18
| 65
| null | 2019-08-05T04:35:13
| 2019-06-01T07:31:23
|
C++
|
UTF-8
|
C++
| false
| false
| 1,511
|
cpp
|
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <algorithm>
#include <iterator>
using namespace std;
/*
给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。
示例 1:
输入: s = "anagram", t = "nagaram"
输出: true
示例 2:
输入: s = "rat", t = "car"
输出: false
说明:
你可以假设字符串只包含小写字母。
*/
class Solution {
public:
static int cmp ( const void *a , const void *b )
{
return *(char *)a - *(char *)b;
}
bool isAnagram(string s, string t) {
if ( ( s.empty() ) && ( t.empty() ) )
return true;
if ( ( s.empty() ) && !( t.empty() ) )
return false;
if ( !( s.empty() ) && ( t.empty() ) )
return false;
const char *sch = s.data();
const char *tch = t.data();
int scount[26] = {0};
int tcount[26] = {0};
while(*sch)
{
scount[*sch -'a']++;
sch++;
}
while(*tch)
{
tcount[*tch -'a']++;
tch++;
}
for(int i=0;i<26;i++)
{
if (scount[i] != tcount[i])
{
return false;
}
}
return true;
}
};
int main(int argc,char *argv[])
{
Solution mytest;
bool test1 = mytest.isAnagram("anagram","nagaram");
bool test2 = mytest.isAnagram("rat","cat");
return 0;
}
|
[
"geniikid@163.com"
] |
geniikid@163.com
|
d2f2d15f2cf9227b088b6eb677a057ea3f06fc0e
|
627ef5edc919f12b8bbaf23f7d87bc806cb1dc5a
|
/CryingEngine/src/Engine/SoundEngine.cpp
|
3b7c0ef655cd35979fd1882e293b2c9d91a9a707
|
[] |
no_license
|
AlexSotoDev/CryingEngine
|
e95096241dfb458428fb4316229f44da025edf34
|
f88e7f4f9ec5b142457910f786e11b475ed48417
|
refs/heads/master
| 2020-05-02T11:05:08.688903
| 2019-04-13T01:49:01
| 2019-04-13T01:49:01
| 177,917,043
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,788
|
cpp
|
#include "SoundEngine.h"
#include "DebugOut.h"
SoundEngine* SoundEngine::self = NULL;
FMOD_RESULT SoundEngine::PrivateInitializeSystem(const int numChannels)
{
//FMOD::System** sys = nullptr;
FMOD::System_Create(&(Instance().soundSystem));
FMOD_RESULT res= Instance().soundSystem->init(numChannels, FMOD_INIT_NORMAL, 0);
//Adding it to my main channel group
Instance().soundSystem->getMasterChannelGroup(&(Instance().masterGroup));
if (res == FMOD_RESULT::FMOD_OK)
{
Instance().channelGroupMap["Master"] = Instance().masterGroup;
}
return res;
}
FMOD_RESULT SoundEngine::PrivateUpdate()
{
return Instance().soundSystem->update();
}
FMOD_RESULT SoundEngine::PrivateReleaseSystem()
{
auto it = Instance().soundMap.begin();
while (it != Instance().soundMap.end())
{
it->second->release();
it++;
}
Instance().soundMap.clear();
//Clear channel groups
Instance().channelGroupMap.clear();
return Instance().soundSystem->release();
}
FMOD_RESULT SoundEngine::PrivateCreateSound(std::string soundName, const char * pFilePath, soundMode mode)
{
Sound* pSound = nullptr;
FMOD_RESULT res = Instance().soundSystem->createSound(pFilePath, FMOD_MODE(mode), 0, &pSound);
if (res == FMOD_RESULT::FMOD_OK)
{
Instance().soundMap[soundName] = pSound;
}
return res;
}
Sound* SoundEngine::PrivateGetSound(std::string soundName)
{
return Instance().soundMap[soundName];
}
FMOD_RESULT SoundEngine::PrivatePlaySound(std::string soundName, std::string channelGroupName, Vect& position, float volume)
{
//Max channels playing is set by initialization
Channel* channel;
FMOD_RESULT res =Instance().soundSystem->playSound(soundMap[soundName], channelGroupMap[channelGroupName], 1, &channel);
FMOD_VECTOR fVect
{
position.X(),
position.Y(),
position.Z()
};
channel->set3DAttributes(&fVect, 0);
channel->setVolume(volume);
channel->setPaused(0);
return res;
}
FMOD_RESULT SoundEngine::PrivateCreateChannelGroup(std::string groupName)
{
//Creating the new channel group
FMOD::ChannelGroup* group;
FMOD_RESULT res = Instance().soundSystem->createChannelGroup(groupName.c_str(), &group);
//Parameters are the group we want to add to current group, whether we want to pass down the DSP properties (https://www.fmod.org/docs/content/generated/FMOD_ChannelControl_GetDSPClock.html) and address of var to receive ptr
Instance().masterGroup->addGroup(group, true, 0);
if (res == FMOD_RESULT::FMOD_OK)
{
Instance().channelGroupMap[groupName] = group;
}
return res;
}
FMOD_RESULT SoundEngine::PrivateErrorCheck(FMOD_RESULT res)
{
DebugMsg::out((char*)FMOD_ErrorString(res));
DebugMsg::out("\n");
return res;
}
FMOD_RESULT SoundEngine::PrivateStopAllSounds()
{
return Instance().channelGroupMap["Master"]->stop();
}
FMOD_RESULT SoundEngine::PrivateStopAllSoundsInChannelGroup(std::string channelGroupName)
{
return Instance().channelGroupMap[channelGroupName]->stop();
}
FMOD_RESULT SoundEngine::PrivatePauseAllSoundsInChannelGroup(std::string channelGroupName)
{
return Instance().channelGroupMap[channelGroupName]->setPaused(true);
}
FMOD_RESULT SoundEngine::PrivateUnPauseAllSoundsInChannelGroup(std::string channelGroupName)
{
return Instance().channelGroupMap[channelGroupName]->setPaused(false);
}
FMOD_RESULT SoundEngine::PrivatePauseAllSounds()
{
return Instance().masterGroup->setPaused(true);
}
FMOD_RESULT SoundEngine::PrivateUnPauseAllSounds()
{
return Instance().masterGroup->setPaused(false);
}
FMOD_RESULT SoundEngine::PrivateSetMasterVolume(const float vol)
{
return Instance().masterGroup->setVolume(vol);
}
FMOD_RESULT SoundEngine::PrivateSetChannelGroupVolume(std::string channelGroupName, float vol)
{
return Instance().channelGroupMap[channelGroupName]->setVolume(vol);
}
SoundEngine::~SoundEngine()
{
}
|
[
"alexsotodev@gmail.com"
] |
alexsotodev@gmail.com
|
628921723fe3c67cca699c747555e5bb672bb452
|
9a0b6a73b113965fd6fed1702f523981eb1f3d00
|
/sycl-info/impl_matchers.hpp
|
1699a05aa718d3c678e9643c681309cc1b610ad2
|
[
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0",
"Apache-2.0",
"MIT"
] |
permissive
|
codeplaysoftware/sycl-info
|
7725531b4d6676b1436af473c2ac49c007eb4410
|
b47d498ee2d6b77ec21972de5882e8e12efecd6c
|
refs/heads/master
| 2020-04-22T15:06:04.229869
| 2019-11-19T15:09:05
| 2019-11-26T14:33:33
| 170,466,659
| 11
| 2
|
Apache-2.0
| 2019-11-26T14:33:35
| 2019-02-13T08:06:03
|
C++
|
UTF-8
|
C++
| false
| false
| 11,993
|
hpp
|
////////////////////////////////////////////////////////////////////////////////
// impl-matchers.h
//
// Copyright (C) Codeplay Software Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
#ifndef IMPL_MATCHERS_H
#define IMPL_MATCHERS_H
#include <CL/opencl.h>
#include <iostream>
#include <nlohmann/json.hpp>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
// This macro expands to the boilerplate of all the comparison operators
// The operator< must be defined first by the programmer. Any other
// operators are defined relatively to the operator<
#define SYCL_INFO_IMPL_MATCHERS_DEFINE_COMPARISON_OPERATORS(type) \
friend inline bool operator>(const type& lhs, const type& rhs) { \
return rhs < lhs; \
} \
friend inline bool operator==(const type& lhs, const type& rhs) { \
return !(lhs < rhs) && !(rhs < lhs); \
} \
friend inline bool operator!=(const type& lhs, const type& rhs) { \
return !(lhs == rhs); \
} \
friend inline bool operator<=(const type& lhs, const type& rhs) { \
return !(rhs < lhs); \
} \
friend inline bool operator>=(const type& lhs, const type& rhs) { \
return !(lhs < rhs); \
}
namespace sycl_info {
struct using_target_matcher {
// The layout we want to model/print
//--------------------------------------
// Platform name: name
// Platform vendor: vendor
// device1:
// device_name: name
// device_vendor: vendor
// supported_drivers: 1.2, 1.3, etc
// device2:
// device_name: name
// device_vendor: vendor
// supported_drivers: 1.2, 1.3, etc
// ...
// ...
// deviceN:
// Platform Name: nameN
// ...
//--------------------------------------
/// @brief A device consists of a name, a vendor and
/// a vector of the supported drivers
///
struct device {
std::string name;
std::string vendor;
/// @brief This is necessarry as this struct will be stored in
/// an std::set. Marking this mutable is important, because
/// it allows us to modify this field without rebalancing
/// the tree. Essentially, this field is ignored in the
/// comparison function used by the data structure
///
mutable std::vector<std::string> drivers;
/// @brief The container of this is an std::set which requires
/// strict weak ordering
/// @see Strict weak ordering https://en.wikipedia.org/wiki/Weak_ordering
/// @see std::set container requirements
/// https://en.cppreference.com/w/cpp/container/set
///
friend inline bool operator<(const device& lhs, const device& rhs) {
return std::tie(lhs.name, lhs.vendor) < std::tie(rhs.name, rhs.vendor);
}
/// define the rest of the comparisson operators
SYCL_INFO_IMPL_MATCHERS_DEFINE_COMPARISON_OPERATORS(device)
};
/// @brief A platform consists of a name, a vendor and
/// a set of supported devices. Name and vendor,
///
struct platform {
std::string name;
std::string vendor;
/// @brief This is necessarry as this struct will be stored in
/// an std::set. Marking this mutable is important, because
/// it allows us to modify this field without rebalancing
/// the tree. Essentially, this field is ignored in the
/// comparison function used by the data structure
///
mutable std::set<device> devices;
/// @brief The container of this is an std::set which requires
/// strict weak ordering
/// @see Strict weak ordering https://en.wikipedia.org/wiki/Weak_ordering
/// @see std::set container requirements
/// https://en.cppreference.com/w/cpp/container/set
///
friend inline bool operator<(const platform& lhs, const platform& rhs) {
return std::tie(lhs.name, lhs.vendor) < std::tie(rhs.name, rhs.vendor);
}
/// define the rest of the comparisson operators
SYCL_INFO_IMPL_MATCHERS_DEFINE_COMPARISON_OPERATORS(platform);
};
/// The type that we print
using print_type = std::set<platform>;
/// @brief Helper function the converts a json file to the internal
/// representation print_type
/// @param syclinfo json
/// @return a print_type from the nlohmann::json
///
static print_type from_json(const nlohmann::json& syclImp);
/// @brief Finds the common platforms/devices between a sycl
/// implementation and the system's available platforms/devices
/// @param A syclinfo file, the current available hardware,
/// that is, the systems platforms and devices retrieved
/// with the target_selector
/// @return a print_type with the matched results
///
static print_type match(const nlohmann::json& syclImpJson,
const print_type& currentHardware);
};
/// @brief Helper function that converts a vector of platform ids and
/// and device ids into their respective string names
///
using_target_matcher::print_type to_print_type(
const std::vector<std::pair<cl_platform_id, cl_device_id>>& devices);
/// @brief Pretty print function for the --using command line option
/// @param A result of type print_type retrieved by the match()
/// function and an ostream to print to
///
void dump_picked_impl(const using_target_matcher::print_type& devices,
std::ostream& out) noexcept;
/// @brief Retrieves the implementation index for a given input string
/// @param The user input string and the available implementations
/// @return A pair of bool and int, representing whether an implementation was
/// found, and if so the index of that implemetnation
///
std::pair<bool, int> retrieve_index_for_impl(
const std::string& chosenImpl,
const std::vector<nlohmann::json>& impls) noexcept;
/// @brief Matches the --impl index with the available implementations
/// @param The --impl index, a vector of the syclinfo implementations
/// to match
///
using_target_matcher::print_type match_picked_impl(
const unsigned int index, const std::vector<nlohmann::json>& impls,
const bool displayAll);
/// @brief Picks a sycl-info implementation and displays it
/// @param The --using-target index, a vector of the syclinfo
/// implementations and an ostream to print to
///
void print_picked_impl(const unsigned int index,
const std::vector<nlohmann::json>& impls,
const bool displayAll, std::ostream& out);
/// @brief Structure for platform/device pair to represent the --config option
///
struct config {
std::string platform;
std::string device;
};
/// @brief Gets the config from an implementation and an index
/// @return The config specified by the index
///
config get_config(const unsigned int index,
const std::vector<nlohmann::json>& impls,
const std::pair<int, int> configIndex, const bool displayAll);
/// @brief prints the config
///
void print_config(const unsigned int index,
const std::vector<nlohmann::json>& impls,
const std::pair<int, int> configIndex,
const std::string& target, const bool displayAll,
std::ostream& out);
/// @brief Checks if the user specified option config_ is a valid index
/// @return True if config_ is a valid index, false otherwise
bool is_config_index_valid(const using_target_matcher::print_type& impls,
const std::pair<int, int> configIndex) noexcept;
/// @brief Structure for platform/device pair to represent the backend
/// information of a specified --impl
struct backend_info {
std::string backend;
std::string deviceFlags;
};
/// @brief Returns the backend specified by the option --target
/// @param An iterator to the syclinfo file and the value of --target option
///
backend_info get_backend_from_target(
nlohmann::json::const_iterator foundElement, const std::string& target);
/// @brief Returns the default backend for a target (first in the list by
/// default)
/// @param An iterator to the syclinfo file
///
backend_info get_default_backend(
const nlohmann::json::const_iterator foundElement);
/// @brief Helper function that matches an implementation file with the
/// --config. Optinally, it filters by --target.
/// @return The backend specified by config filtered by the optional target
///
backend_info match_config_with_impls(const config& conf,
const nlohmann::json& impl,
const std::string& target);
/// @brief Dumps the backend information specified by --config to a stream
//
void dump_config(const backend_info& info, std::ostream& out) noexcept;
/// @brief Enum that represents the name of a field in the json file.
///
enum class selections {
supported_configurations,
plat_name,
plat_vendor,
dev_name,
dev_flags,
dev_vendor,
supported_backend_targets,
backend,
supported_drivers
};
/// @brief Generic template that will be fully specialized for each value in
/// in the enum selections. The unspecialized base template is left undefined.
/// All in all, a field in the enum selections maps to a string value
/// representing the name of the respective field in the json file.
///
template <selections T>
struct select;
/// @brief Specialization for selections::supported_configurations
///
template <>
struct select<selections::supported_configurations> {
static constexpr const char* value = "supported_configurations";
};
/// @brief Specialization for selections::plat_name
///
template <>
struct select<selections::plat_name> {
static constexpr const char* value = "platform_name";
};
/// @brief Specialization for selections::plat_vendor
///
template <>
struct select<selections::plat_vendor> {
static constexpr const char* value = "platform_vendor";
};
/// @brief Specialization for selections::device_name
///
template <>
struct select<selections::dev_name> {
static constexpr const char* value = "device_name";
};
/// @brief Specialization for selections::device_flags
///
template <>
struct select<selections::dev_flags> {
static constexpr const char* value = "device_flags";
};
/// @brief Specialization for selections::device_vendor
///
template <>
struct select<selections::dev_vendor> {
static constexpr const char* value = "device_vendor";
};
/// @brief Specialization for selections::supported_backend_targets
///
template <>
struct select<selections::supported_backend_targets> {
static constexpr const char* value = "supported_backend_targets";
};
/// @brief Specialization for selections::backend_target
///
template <>
struct select<selections::backend> {
static constexpr const char* value = "backend_target";
};
/// @brief Specialization for selections::supported_drivers
///
template <>
struct select<selections::supported_drivers> {
static constexpr const char* value = "supported_drivers";
};
} // namespace sycl_info
#undef SYCL_INFO_IMPL_MATCHERS_DEFINE_COMPARISON_OPERATORS
#endif
|
[
"peter@codeplay.com"
] |
peter@codeplay.com
|
0ccff6ddd943050972140a28734d1813e55e086b
|
45e0fbd9a9dbcdd4fbe6aaa2fdb2aed296f81e33
|
/FindSecret/Classes/Native/mscorlib_System_Action_1_gen2745028645.h
|
43b17878ad55d80eeea6b298111a079057b15573
|
[
"MIT"
] |
permissive
|
GodIsWord/NewFindSecret
|
d4a5d2d810ee1f9d6b3bc91168895cc808bac817
|
4f98f316d29936380f9665d6a6d89962d9ee5478
|
refs/heads/master
| 2020-03-24T09:54:50.239014
| 2018-10-27T05:22:11
| 2018-10-27T05:22:11
| 142,641,511
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 870
|
h
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include "mscorlib_System_MulticastDelegate157516450.h"
#include "mscorlib_System_Void1185182177.h"
#include "UnityEngine_UnityEngine_MeshSubsetCombineUtility_M2572561050.h"
// System.IAsyncResult
struct IAsyncResult_t767004451;
// System.AsyncCallback
struct AsyncCallback_t3962456242;
// System.Object
struct Il2CppObject;
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Action`1<UnityEngine.MeshSubsetCombineUtility/MeshContainer>
struct Action_1_t2745028645 : public MulticastDelegate_t157516450
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
[
"zhangyide@9fbank.cc"
] |
zhangyide@9fbank.cc
|
1b3d827c841467bf11ba0396e5f09ed0d8f8964d
|
3ff1fe3888e34cd3576d91319bf0f08ca955940f
|
/dsgc/src/v20190723/model/DescribeDSPAAssessmentRisksRequest.cpp
|
5d3c3402ee0ccdefb7714e2175a7a9501b4e7dbb
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-cpp
|
9f5df8220eaaf72f7eaee07b2ede94f89313651f
|
42a76b812b81d1b52ec6a217fafc8faa135e06ca
|
refs/heads/master
| 2023-08-30T03:22:45.269556
| 2023-08-30T00:45:39
| 2023-08-30T00:45:39
| 188,991,963
| 55
| 37
|
Apache-2.0
| 2023-08-17T03:13:20
| 2019-05-28T08:56:08
|
C++
|
UTF-8
|
C++
| false
| false
| 4,734
|
cpp
|
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <tencentcloud/dsgc/v20190723/model/DescribeDSPAAssessmentRisksRequest.h>
#include <tencentcloud/core/utils/rapidjson/document.h>
#include <tencentcloud/core/utils/rapidjson/writer.h>
#include <tencentcloud/core/utils/rapidjson/stringbuffer.h>
using namespace TencentCloud::Dsgc::V20190723::Model;
using namespace std;
DescribeDSPAAssessmentRisksRequest::DescribeDSPAAssessmentRisksRequest() :
m_dspaIdHasBeenSet(false),
m_taskIdHasBeenSet(false),
m_offsetHasBeenSet(false),
m_limitHasBeenSet(false),
m_filtersHasBeenSet(false)
{
}
string DescribeDSPAAssessmentRisksRequest::ToJsonString() const
{
rapidjson::Document d;
d.SetObject();
rapidjson::Document::AllocatorType& allocator = d.GetAllocator();
if (m_dspaIdHasBeenSet)
{
rapidjson::Value iKey(rapidjson::kStringType);
string key = "DspaId";
iKey.SetString(key.c_str(), allocator);
d.AddMember(iKey, rapidjson::Value(m_dspaId.c_str(), allocator).Move(), allocator);
}
if (m_taskIdHasBeenSet)
{
rapidjson::Value iKey(rapidjson::kStringType);
string key = "TaskId";
iKey.SetString(key.c_str(), allocator);
d.AddMember(iKey, rapidjson::Value(m_taskId.c_str(), allocator).Move(), allocator);
}
if (m_offsetHasBeenSet)
{
rapidjson::Value iKey(rapidjson::kStringType);
string key = "Offset";
iKey.SetString(key.c_str(), allocator);
d.AddMember(iKey, m_offset, allocator);
}
if (m_limitHasBeenSet)
{
rapidjson::Value iKey(rapidjson::kStringType);
string key = "Limit";
iKey.SetString(key.c_str(), allocator);
d.AddMember(iKey, m_limit, allocator);
}
if (m_filtersHasBeenSet)
{
rapidjson::Value iKey(rapidjson::kStringType);
string key = "Filters";
iKey.SetString(key.c_str(), allocator);
d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator);
int i=0;
for (auto itr = m_filters.begin(); itr != m_filters.end(); ++itr, ++i)
{
d[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator);
(*itr).ToJsonObject(d[key.c_str()][i], allocator);
}
}
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
d.Accept(writer);
return buffer.GetString();
}
string DescribeDSPAAssessmentRisksRequest::GetDspaId() const
{
return m_dspaId;
}
void DescribeDSPAAssessmentRisksRequest::SetDspaId(const string& _dspaId)
{
m_dspaId = _dspaId;
m_dspaIdHasBeenSet = true;
}
bool DescribeDSPAAssessmentRisksRequest::DspaIdHasBeenSet() const
{
return m_dspaIdHasBeenSet;
}
string DescribeDSPAAssessmentRisksRequest::GetTaskId() const
{
return m_taskId;
}
void DescribeDSPAAssessmentRisksRequest::SetTaskId(const string& _taskId)
{
m_taskId = _taskId;
m_taskIdHasBeenSet = true;
}
bool DescribeDSPAAssessmentRisksRequest::TaskIdHasBeenSet() const
{
return m_taskIdHasBeenSet;
}
int64_t DescribeDSPAAssessmentRisksRequest::GetOffset() const
{
return m_offset;
}
void DescribeDSPAAssessmentRisksRequest::SetOffset(const int64_t& _offset)
{
m_offset = _offset;
m_offsetHasBeenSet = true;
}
bool DescribeDSPAAssessmentRisksRequest::OffsetHasBeenSet() const
{
return m_offsetHasBeenSet;
}
int64_t DescribeDSPAAssessmentRisksRequest::GetLimit() const
{
return m_limit;
}
void DescribeDSPAAssessmentRisksRequest::SetLimit(const int64_t& _limit)
{
m_limit = _limit;
m_limitHasBeenSet = true;
}
bool DescribeDSPAAssessmentRisksRequest::LimitHasBeenSet() const
{
return m_limitHasBeenSet;
}
vector<DspaAssessmentFilter> DescribeDSPAAssessmentRisksRequest::GetFilters() const
{
return m_filters;
}
void DescribeDSPAAssessmentRisksRequest::SetFilters(const vector<DspaAssessmentFilter>& _filters)
{
m_filters = _filters;
m_filtersHasBeenSet = true;
}
bool DescribeDSPAAssessmentRisksRequest::FiltersHasBeenSet() const
{
return m_filtersHasBeenSet;
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
1e327df6c61a82651f9fc0537bb93f1901c9918f
|
4e0bf944a7042505da0e4410848e9096996d8b2d
|
/src/executors/GPUTUPLE.h
|
69305128f00f9488f703a399b37942e49ae01c6c
|
[] |
no_license
|
yabuta/modifications
|
9ff13b4b776d638077799466bbef58a63f78c73b
|
560465c21cda6914b589325e28b753a04ca54320
|
refs/heads/master
| 2020-05-17T04:06:18.735345
| 2014-12-30T13:14:28
| 2014-12-30T13:14:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 605
|
h
|
#ifndef GPUTUPLE_H
#define GPUTUPLE_H
#include <GPUetc/common/GNValue.h>
namespace voltdb{
//1blockでのスレッド数の定義。
#define BLOCK_SIZE_X 256 //outer ,left
#define BLOCK_SIZE_Y 128 //inner ,right
#define PARTITION 64
#define RADIX 6
#define PART_C_NUM 16
#define SHARED_MAX PARTITION * PART_C_NUM
#define RIGHT_PER_TH 256
#define PART_STANDARD 1
#define JOIN_SHARED 256
typedef struct _TUPLE {
int key;
int val;
} TUPLE;
typedef struct _RESULT {
int lkey;
int rkey;
} RESULT;
typedef struct _COLUMNDATA{
GNValue gn;
int num;
} COLUMNDATA;
}
#endif
|
[
"yabuta@ertl.jp"
] |
yabuta@ertl.jp
|
f90fbf802ef3e64a69551c0af3117df7587e1572
|
8c607695c501407a7a914ea6286f66c9613ba038
|
/BREADTH-FIRST-SEARCH/rush.cpp
|
84b79d77b8221b4e0831c45dcad1687e97bdd2ab
|
[] |
no_license
|
andy3000/DATA-STRUCTURES
|
8e89ebf848b180bb5a925a6f2d9055b4e031d124
|
85e9d27651294e3765ad0e4260fc1c02869c6e4e
|
refs/heads/master
| 2021-01-02T09:02:09.671711
| 2015-03-27T23:59:14
| 2015-03-27T23:59:14
| 33,014,021
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 10,621
|
cpp
|
/**
* @file rush.cpp
* @author Amardeep Singh
* @brief This program sets up a game board with vehicles on it and solves
* the game of rush hour in the least amount of moves.
* @date February 26th 2014
*/
#include <iostream>
using namespace std;
struct Vehicle
{
int vehicleRow;
int vehicleCol;
int vehicleType;
char vehicleDirection;
};
void setBoard( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int numberOfVehicles );
bool moveVehicleForward( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int vehicleNumber );
bool moveVehicleBackward( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int vehicleNumber );
bool solveIt( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int numberOfVehicles, int numberOfMoves, int& bestMoves );
int main()
{
Vehicle vehiclesInGame[ 25 ];
int vehicleCount = 0;
int numberOfMoves = 0;
int bestMoves = 10;
int scenarioNumber = 1;
char gameBoard[ 6 ][ 6 ];
cin >> vehicleCount;
while( vehicleCount > 0 )
{
for( int i = 0; i < vehicleCount; i++ )
{
cin >> vehiclesInGame[ i ].vehicleType;
cin >> vehiclesInGame[ i ].vehicleDirection;
cin >> vehiclesInGame[ i ].vehicleRow;
cin >> vehiclesInGame[ i ].vehicleCol;
}
setBoard( gameBoard, vehiclesInGame, vehicleCount );
solveIt( gameBoard, vehiclesInGame, vehicleCount, numberOfMoves, bestMoves );
cout << "Scenario " << scenarioNumber << " requires " << bestMoves << " moves" << endl;
cin >> vehicleCount;
scenarioNumber++;
}
return 0;
}
/**
* This functions sets the game board up.
*
* This function sets up the game board with vehicles so the game will be
* ready for playing. The front of the vehicle is already set and it is
* used to mark the board with the appropriate amount of spaces taken up
* by the vehicle given its a car or a truck. Before the vehicles are
* place upon the board, the entire board is marked with an 'X' to represent
* a empty slot which contains no vehicle.
*
* @param gameBoard[][] The 2D char array to represent the game board.
* @param vehiclesInGame An array of vehicles containing all vehicles in current game.
* @param numberOfVehicles The number of vehicles in the current game.
*
* @pre The gameBoard is empty and uninitialized.
* @post The gameBoard contains all the vehicles and is marked with an 'X'
* for empty spaces and the number of the vehicle in the appropriate amount
* of spaces.
*/
void setBoard( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int numberOfVehicles )
{
for( int i = 0; i < 6; i++ )
{
for( int j = 0; j < 6; j++ )
{
gameBoard[ i ][ j ] = 'X';
}
}
for( int i = 0; i < numberOfVehicles; i++ )
{
gameBoard[ vehiclesInGame[ i ].vehicleRow ][ vehiclesInGame[ i ].vehicleCol ] = i + '0';
for( int j = 1; j < ( vehiclesInGame[ i ].vehicleType ); j++ )
{
if( vehiclesInGame[ i ].vehicleDirection == 'H' )
{
gameBoard[ vehiclesInGame[ i ].vehicleRow ][ vehiclesInGame[ i ].vehicleCol + j ] = i + '0';
}
else
{
gameBoard[ vehiclesInGame[ i ].vehicleRow + j ][ vehiclesInGame[ i ].vehicleCol ] = i + '0';
}
}
}
}
/**
* This function moves a vehicle forward.
*
* This function moves a vehicle forward on the game board. The vehicle
* checks a few different scenarios to see if it is actually possibel to
* move the vehicle forward before it actually does. The function
* checks the bounds to see if the vehicle is already not at the edge of
* the gameBoard. If the vehicle is at the edge then it returns false.
* Given the type of vehicle & it's orientation it checks to see if there
* is a 'X' in front of the vehicle. If there is an 'X' this means that
* there is an empty spot in front of the vehicle and it is okay for it
* to move forward. If there is any other symbol there it means that the
* car cannot move forward and it returns false. If the vehicle can move
* forward then the function moves the vehicle forward, marks the new
* location on the board and updates the row or column of the vehicle.
*
* @param gameBoard[][] The 2D char array to represent the game board.
* @param vehiclesInGame An array of vehicles containing all vehicles in current game.
* @param vehicleNumber This number represents the vehicle to be moved.
*
* @pre The vehicle is in it's current location
* @post If the vehicle can move forward the vehicle is moved forward
* and the gameBoard is updated with the new location of the vehicle.
*
* @return The function returns a bool of whether or not the vehicle was
* moved backward.
*/
bool moveVehicleForward( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int vehicleNumber )
{
int row, col, type;
char direction;
row = vehiclesInGame[ vehicleNumber ].vehicleRow;
col = vehiclesInGame[ vehicleNumber ].vehicleCol;
type = vehiclesInGame[ vehicleNumber ].vehicleType;
direction = vehiclesInGame[ vehicleNumber ].vehicleDirection;
if( ( direction == 'V' && row == 5 ) || ( direction == 'H' && col == 5 ) )
{
return false;
}
if( ( direction == 'V' && gameBoard[ row + type ][ col ] != 'X' ) ||
( direction == 'H' && gameBoard[ row ][ col + type ] != 'X' ) )
{
return false;
}
if( direction == 'H' )
{
gameBoard[ row ][ col + type ] = vehicleNumber + '0';
gameBoard[ row ][ col ] = 'X';
vehiclesInGame[ vehicleNumber ].vehicleCol = col + 1;
return true;
}
else
{
gameBoard[ row + type ][ col ] = vehicleNumber + '0';
gameBoard[ row ][ col ] = 'X';
vehiclesInGame[ vehicleNumber ].vehicleRow = row + 1;
return true;
}
return false;
}
/**
* This function moves a vehicle backward.
*
* This function moves a vehicle backward on the game board. The vehicle
* checks a few different scenarios to see if it is actually possible to
* move the vehicle backward before it actually does. The function
* checks the bounds to see if the vehicle is already not at the edge of
* the gameBoard. If the vehicle is at the edge then it returns false.
* Given the type of vehicle & it's orientation it checks to see if there
* is a 'X' behind of the vehicle. If there is an 'X' this means that
* there is an empty spot in front of the vehicle and it is okay for it
* to move backward. If there is any other symbol there it means that the
* car cannot move backward and it returns false. If the vehicle can move
* backward then the function moves the vehicle backward, marks the new
* location on the board and updates the row or column of the vehicle.
*
* @param gameBoard[][] The 2D char array to represent the game board.
* @param vehiclesInGame An array of vehicles containing all vehicles in current game.
* @param vehicleNumber This number represents the vehicle to be moved.
*
* @pre The vehicle is in it's current location
* @post If the vehicle can move backward the vehicle is moved backward
* and the gameBoard is updated with the new location of the vehicle.
*
* @return The function returns a bool of whether or not the vehicle was
* moved backward.
*/
bool moveVehicleBackward( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int vehicleNumber )
{
int row, col, type;
char direction;
row = vehiclesInGame[ vehicleNumber ].vehicleRow;
col = vehiclesInGame[ vehicleNumber ].vehicleCol;
type = vehiclesInGame[ vehicleNumber ].vehicleType;
direction = vehiclesInGame[ vehicleNumber ].vehicleDirection;
if( ( direction == 'V' && row == 0 ) || ( direction == 'H' && col == 0 ) )
{
return false;
}
if( ( direction == 'V' && gameBoard[ row - 1 ][ col ] != 'X' ) ||
( direction == 'H' && gameBoard[ row ][ col - 1 ] != 'X' ) )
{
return false;
}
if( direction == 'H' )
{
gameBoard[ row ][ col - 1 ] = vehicleNumber + '0';
gameBoard[ row ][ col + type - 1 ] = 'X';
vehiclesInGame[ vehicleNumber ].vehicleCol = col - 1;
return true;
}
else
{
gameBoard[ row - 1 ][ col ] = vehicleNumber + '0';
gameBoard[ row + type - 1 ][ col ] = 'X';
vehiclesInGame[ vehicleNumber ].vehicleRow = row - 1;
return true;
}
return false;
}
/**
* This funciton solves the rush hour game.
*
* This function moves the vehicles forward and backward until a solution
* ten moves or under has been reached. The function uses recursion to
* accomplish this task. The base case of the function includes two
* stopping conditions. The first stopping condtion is attained if the
* vehicle reaches the end of the board. The second stopping condition
* is if the numberOfMoves exceeds the bestMoves or the least amount of
* moves required to solve the game. If neither stopping condition applies
* then the funciton calls itself recursively. The function loops through
* all of the vehicles and checks to see if they can move forward or if
* they can move backward. If either is true then it calls the function
* again by with numberOfMoves incremented by one. Once the recursive call
* reaches an end it backtracks and moves the vehicle back to it's original
* location. The lowest number of moves it took to solve the game is recorded
* and the function returns if the game was solved or not.
*
* @param gameBoard[][] The 2D char array to represent the game board.
* @param vehiclesInGame An array of vehicles containing all vehicles in current game.
* @param numberOfVehicles The number of vehicles in the current game.
* @param numberOfMoves Records the number moves that have passed
* @param bestMoves records the lowest number of moves required to solve the game.
*
* @pre the board will be in its original state
* @post all possible solutions will have been found and the lowest number
* of moves required to solve the game will be records
*
* @return The function will return a bool stating wheter or not the game
* has been solved.
*
*/
bool solveIt( char gameBoard[ 6 ][ 6 ], Vehicle vehiclesInGame[], int numberOfVehicles, int numberOfMoves, int& bestMoves )
{
if( vehiclesInGame[ 0 ].vehicleCol == 4 )
{
bestMoves = numberOfMoves;
return true;
}
else if( numberOfMoves >= bestMoves )
{
return false;
}
else
{
for( int i = 0; i < numberOfVehicles; i++ )
{
if( moveVehicleForward( gameBoard, vehiclesInGame, i ) )
{
solveIt( gameBoard, vehiclesInGame, numberOfVehicles, numberOfMoves + 1, bestMoves );
moveVehicleBackward( gameBoard, vehiclesInGame, i );
}
if( moveVehicleBackward( gameBoard, vehiclesInGame, i ) )
{
solveIt( gameBoard, vehiclesInGame, numberOfVehicles, numberOfMoves + 1, bestMoves );
moveVehicleForward( gameBoard, vehiclesInGame, i );
}
}
}
return false;
}
|
[
"andysingh1990@sbcglobal.net"
] |
andysingh1990@sbcglobal.net
|
78fe283e122b178537d0390ddfd26b2e20f54bfe
|
ab3bb80ae05071812a37f59d731bdc44c93ed8fd
|
/BRE/source/RenderingLib/rendering/shaders/filters/PostProcessDrawer.cpp
|
398341f54ef8d330e6ba3aff6ed9a7b8cd6d7a6a
|
[] |
no_license
|
nbertoa/BRE11
|
270e01e4ba67ebd271efc6356b51eabc6201cc36
|
60aa4148b4ff81c52242a06753220a85fb9dfef7
|
refs/heads/master
| 2021-05-28T23:41:36.274885
| 2015-08-08T18:05:37
| 2015-08-08T18:05:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 820
|
cpp
|
#include "PostProcessDrawer.h"
#include <d3d11_1.h>
#include <DirectXMath.h>
#include <managers/ShaderResourcesManager.h>
#include <utils/Assert.h>
#include <rendering/GlobalResources.h>
using namespace DirectX;
namespace BRE {
PostProcessDrawer::PostProcessDrawer(ID3D11Device1& device)
: mFiltersVsData(device)
{
}
void PostProcessDrawer::Draw(ID3D11Device1& device, ID3D11DeviceContext1& context, ID3D11ShaderResourceView* postProcessSRV) {
mToneMappingPsData.TextureToFilterSRV() = postProcessSRV;
mToneMappingPsData.SamplerState() = GlobalResources::gInstance->MinMagMipPointSampler();
mFiltersVsData.PreDraw(device, context);
mToneMappingPsData.PreDraw(device, context);
mFiltersVsData.DrawIndexed(context);
mFiltersVsData.PostDraw(context);
mToneMappingPsData.PostDraw(context);
}
}
|
[
"nicolas.bertoa@outlook.com"
] |
nicolas.bertoa@outlook.com
|
b08a51a1126fcefc4cb1ad1f99ca2a5ae351601a
|
e5e6878c2942c55b5698d4fc0a5c565fa9d28516
|
/main.cpp
|
7f493ad86032587ce18e54ddc529021ad243a877
|
[] |
no_license
|
tsrivatsav/Power-Pong
|
483ee482688a9e9c3b326396537ea6b2155f3065
|
431c3796b18c53f1a6ad3762b10ffe0916025197
|
refs/heads/master
| 2023-07-22T04:02:46.422975
| 2021-09-07T06:24:35
| 2021-09-07T06:24:35
| 403,863,099
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,008
|
cpp
|
//Mode.hpp declares the "Mode::current" static member variable, which is used to decide where event-handling, updating, and drawing events go:
#include "Mode.hpp"
//The 'PongMode' mode plays the game:
#include "PongMode.hpp"
//GL.hpp will include a non-namespace-polluting set of opengl prototypes:
#include "GL.hpp"
//for screenshots:
#include "load_save_png.hpp"
//Includes for libSDL:
#include <SDL.h>
//...and for c++ standard library functions:
#include <chrono>
#include <iostream>
#include <stdexcept>
#include <memory>
#include <algorithm>
int main(int argc, char **argv) {
#ifdef _WIN32
//when compiled on windows, unhandled exceptions don't have their message printed, which can make debugging simple issues difficult.
try {
#endif
//------------ initialization ------------
//Initialize SDL library:
SDL_Init(SDL_INIT_VIDEO);
//Ask for an OpenGL context version 3.3, core profile, enable debug:
SDL_GL_ResetAttributes();
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
//create window:
SDL_Window *window = SDL_CreateWindow(
"Power-up Pong", //TODO: remember to set a title for your game!
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
640, 480, //TODO: modify window size if you'd like
SDL_WINDOW_OPENGL
| SDL_WINDOW_RESIZABLE //uncomment to allow resizing
| SDL_WINDOW_ALLOW_HIGHDPI //uncomment for full resolution on high-DPI screens
);
//prevent exceedingly tiny windows when resizing:
SDL_SetWindowMinimumSize(window, 100, 100);
if (!window) {
std::cerr << "Error creating SDL window: " << SDL_GetError() << std::endl;
return 1;
}
//Create OpenGL context:
SDL_GLContext context = SDL_GL_CreateContext(window);
if (!context) {
SDL_DestroyWindow(window);
std::cerr << "Error creating OpenGL context: " << SDL_GetError() << std::endl;
return 1;
}
//On windows, load OpenGL entrypoints: (does nothing on other platforms)
init_GL();
//Set VSYNC + Late Swap (prevents crazy FPS):
if (SDL_GL_SetSwapInterval(-1) != 0) {
std::cerr << "NOTE: couldn't set vsync + late swap tearing (" << SDL_GetError() << ")." << std::endl;
if (SDL_GL_SetSwapInterval(1) != 0) {
std::cerr << "NOTE: couldn't set vsync (" << SDL_GetError() << ")." << std::endl;
}
}
//Hide mouse cursor (note: showing can be useful for debugging):
//SDL_ShowCursor(SDL_DISABLE);
//------------ create game mode + make current --------------
Mode::set_current(std::make_shared< PongMode >());
//------------ main loop ------------
//this inline function will be called whenever the window is resized,
// and will update the window_size and drawable_size variables:
glm::uvec2 window_size; //size of window (layout pixels)
glm::uvec2 drawable_size; //size of drawable (physical pixels)
//On non-highDPI displays, window_size will always equal drawable_size.
auto on_resize = [&](){
int w,h;
SDL_GetWindowSize(window, &w, &h);
window_size = glm::uvec2(w, h);
SDL_GL_GetDrawableSize(window, &w, &h);
drawable_size = glm::uvec2(w, h);
glViewport(0, 0, drawable_size.x, drawable_size.y);
};
on_resize();
//This will loop until the current mode is set to null:
while (Mode::current) {
//every pass through the game loop creates one frame of output
// by performing three steps:
{ //(1) process any events that are pending
static SDL_Event evt;
while (SDL_PollEvent(&evt) == 1) {
//handle resizing:
if (evt.type == SDL_WINDOWEVENT && evt.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
on_resize();
}
//handle input:
if (Mode::current && Mode::current->handle_event(evt, window_size)) {
// mode handled it; great
} else if (evt.type == SDL_QUIT) {
Mode::set_current(nullptr);
break;
} else if (evt.type == SDL_KEYDOWN && evt.key.keysym.sym == SDLK_PRINTSCREEN) {
// --- screenshot key ---
std::string filename = "screenshot.png";
std::cout << "Saving screenshot to '" << filename << "'." << std::endl;
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
glReadBuffer(GL_FRONT);
int w,h;
SDL_GL_GetDrawableSize(window, &w, &h);
std::vector< glm::u8vec4 > data(w*h);
glReadPixels(0,0,w,h, GL_RGBA, GL_UNSIGNED_BYTE, data.data());
for (auto &px : data) {
px.a = 0xff;
}
save_png(filename, glm::uvec2(w,h), data.data(), LowerLeftOrigin);
}
}
if (!Mode::current) break;
}
{ //(2) call the current mode's "update" function to deal with elapsed time:
auto current_time = std::chrono::high_resolution_clock::now();
static auto previous_time = current_time;
float elapsed = std::chrono::duration< float >(current_time - previous_time).count();
previous_time = current_time;
//if frames are taking a very long time to process,
//lag to avoid spiral of death:
elapsed = std::min(0.1f, elapsed);
Mode::current->update(elapsed);
if (!Mode::current) break;
}
{ //(3) call the current mode's "draw" function to produce output:
Mode::current->draw(drawable_size);
}
//Wait until the recently-drawn frame is shown before doing it all again:
SDL_GL_SwapWindow(window);
}
//------------ teardown ------------
SDL_GL_DeleteContext(context);
context = 0;
SDL_DestroyWindow(window);
window = NULL;
return 0;
#ifdef _WIN32
} catch (std::exception const &e) {
std::cerr << "Unhandled exception:\n" << e.what() << std::endl;
return 1;
} catch (...) {
std::cerr << "Unhandled exception (unknown type)." << std::endl;
throw;
}
#endif
}
|
[
"tsrivatsav@berkeley.edu"
] |
tsrivatsav@berkeley.edu
|
4ef81ae74e80c72c49ca29157f2773f099c1fa45
|
7e1a18674cda0c60dbb96074b6e756e9b92e7261
|
/Bit Manipulations/PowerOf2.cpp
|
fa33de1b831030added87a00480aea4a49565edc
|
[] |
no_license
|
Viswonathan06/AlgoDS
|
8b69d4bb15ee8734c452102dd8c51a172b23931a
|
c14e0f3120d949c61a6096b96a9aaf9536bd68ca
|
refs/heads/main
| 2023-06-01T19:12:33.851486
| 2021-06-24T04:25:57
| 2021-06-24T04:25:57
| 357,293,657
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 425
|
cpp
|
#include<iostream>
#include<math.h>
bool PowerOfTwo( int n){
if( n==0 ){
return false;
}
return ( ceil(log2(n)== floor(log2(n))));
}
int main(){
if(PowerOfTwo(80)){
std::cout<<"yes\n";
}
else
{
std::cout<<"no\n";
}
if(PowerOfTwo(32)){
std::cout<<"yes\n";
}
else
{
std::cout<<"no\n";
}
}
|
[
"viswonathan0606@gmail.com"
] |
viswonathan0606@gmail.com
|
0162e7416b50c8a326b71ebae319805d4158ca8e
|
adfad536bb190561013448590ddadaf312094039
|
/plugins/MacAU/Console7Cascade/Console7Cascade.cpp
|
3d9abac1c43d5a73f22f5b057cb0009e2831ea35
|
[
"MIT"
] |
permissive
|
themucha/airwindows
|
ae7c1d5061f6e6b565c7be1b09cae21e5f601915
|
13bace268f2356e2a037e935c0845d91bfcb79a6
|
refs/heads/master
| 2022-02-21T08:46:53.021402
| 2022-01-30T18:30:35
| 2022-01-30T18:30:35
| 204,864,549
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
C++
| false
| false
| 14,840
|
cpp
|
/*
* File: Console7Cascade.cpp
*
* Version: 1.0
*
* Created: 12/10/20
*
* Copyright: Copyright © 2020 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*=============================================================================
Console7Cascade.cpp
=============================================================================*/
#include "Console7Cascade.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENT_ENTRY(Console7Cascade)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::Console7Cascade
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Console7Cascade::Console7Cascade(AudioUnit component)
: AUEffectBase(component)
{
CreateElements();
Globals()->UseIndexedParameters(kNumberOfParameters);
SetParameter(kParam_One, kDefaultValue_ParamOne );
#if AU_DEBUG_DISPATCHER
mDebugDispatcher = new AUDebugDispatcher (this);
#endif
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::GetParameterValueStrings
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult Console7Cascade::GetParameterValueStrings(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
CFArrayRef * outStrings)
{
return kAudioUnitErr_InvalidProperty;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::GetParameterInfo
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult Console7Cascade::GetParameterInfo(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
AudioUnitParameterInfo &outParameterInfo )
{
ComponentResult result = noErr;
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
| kAudioUnitParameterFlag_IsReadable;
if (inScope == kAudioUnitScope_Global) {
switch(inParameterID)
{
case kParam_One:
AUBase::FillInParameterName (outParameterInfo, kParameterOneName, false);
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
outParameterInfo.minValue = 0.0;
outParameterInfo.maxValue = 1.0;
outParameterInfo.defaultValue = kDefaultValue_ParamOne;
break;
default:
result = kAudioUnitErr_InvalidParameter;
break;
}
} else {
result = kAudioUnitErr_InvalidParameter;
}
return result;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::GetPropertyInfo
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult Console7Cascade::GetPropertyInfo (AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 & outDataSize,
Boolean & outWritable)
{
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::GetProperty
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult Console7Cascade::GetProperty( AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData )
{
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
}
// Console7Cascade::Initialize
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult Console7Cascade::Initialize()
{
ComponentResult result = AUEffectBase::Initialize();
if (result == noErr)
Reset(kAudioUnitScope_Global, 0);
return result;
}
#pragma mark ____Console7CascadeEffectKernel
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::Console7CascadeKernel::Reset()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void Console7Cascade::Console7CascadeKernel::Reset()
{
gainchase = -1.0;
chasespeed = 64.0;
for (int x = 0; x < 11; x++) {biquadA[x] = 0.0;biquadB[x] = 0.0;biquadC[x] = 0.0;biquadD[x] = 0.0;biquadE[x] = 0.0;}
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Console7Cascade::Console7CascadeKernel::Process
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void Console7Cascade::Console7CascadeKernel::Process( const Float32 *inSourceP,
Float32 *inDestP,
UInt32 inFramesToProcess,
UInt32 inNumChannels,
bool &ioSilence )
{
UInt32 nSampleFrames = inFramesToProcess;
const Float32 *sourceP = inSourceP;
Float32 *destP = inDestP;
long double inputgain = 1.0-(pow(1.0-GetParameter( kParam_One ),2));
//this happens to give us a boost factor where the track continues to get louder even
//as it saturates and loses a bit of peak energy. Console7Channel channels go to 12! (.272,etc)
//Neutral gain through the whole system with a full scale sine ia 0.772 on the gain knob
if (gainchase != inputgain) chasespeed *= 2.0;
if (chasespeed > inFramesToProcess) chasespeed = inFramesToProcess;
if (gainchase < 0.0) gainchase = inputgain;
biquadE[0] = biquadD[0] = biquadC[0] = biquadB[0] = biquadA[0] = 20000.0 / GetSampleRate();
biquadA[1] = 3.19622661; //tenth order Butterworth out of five biquads
biquadB[1] = 1.10134463; //the sharpness of the initial filter will produce more
biquadC[1] = 0.70710678; //edge on initial stages of clipping
biquadD[1] = 0.56116312;
biquadE[1] = 0.50623256;
double K = tan(M_PI * biquadA[0]); //lowpass
double norm = 1.0 / (1.0 + K / biquadA[1] + K * K);
biquadA[2] = K * K * norm;
biquadA[3] = 2.0 * biquadA[2];
biquadA[4] = biquadA[2];
biquadA[5] = 2.0 * (K * K - 1.0) * norm;
biquadA[6] = (1.0 - K / biquadA[1] + K * K) * norm;
K = tan(M_PI * biquadA[0]);
norm = 1.0 / (1.0 + K / biquadB[1] + K * K);
biquadB[2] = K * K * norm;
biquadB[3] = 2.0 * biquadB[2];
biquadB[4] = biquadB[2];
biquadB[5] = 2.0 * (K * K - 1.0) * norm;
biquadB[6] = (1.0 - K / biquadB[1] + K * K) * norm;
K = tan(M_PI * biquadC[0]);
norm = 1.0 / (1.0 + K / biquadC[1] + K * K);
biquadC[2] = K * K * norm;
biquadC[3] = 2.0 * biquadC[2];
biquadC[4] = biquadC[2];
biquadC[5] = 2.0 * (K * K - 1.0) * norm;
biquadC[6] = (1.0 - K / biquadC[1] + K * K) * norm;
K = tan(M_PI * biquadD[0]);
norm = 1.0 / (1.0 + K / biquadD[1] + K * K);
biquadD[2] = K * K * norm;
biquadD[3] = 2.0 * biquadD[2];
biquadD[4] = biquadD[2];
biquadD[5] = 2.0 * (K * K - 1.0) * norm;
biquadD[6] = (1.0 - K / biquadD[1] + K * K) * norm;
K = tan(M_PI * biquadE[0]);
norm = 1.0 / (1.0 + K / biquadE[1] + K * K);
biquadE[2] = K * K * norm;
biquadE[3] = 2.0 * biquadE[2];
biquadE[4] = biquadE[2];
biquadE[5] = 2.0 * (K * K - 1.0) * norm;
biquadE[6] = (1.0 - K / biquadE[1] + K * K) * norm;
while (nSampleFrames-- > 0) {
long double inputSample = *sourceP;
if (fabs(inputSample)<1.18e-23) inputSample = fpd * 1.18e-17;
long double tempSample = biquadA[2]*inputSample+biquadA[3]*biquadA[7]+biquadA[4]*biquadA[8]-biquadA[5]*biquadA[9]-biquadA[6]*biquadA[10];
biquadA[8] = biquadA[7]; biquadA[7] = inputSample; inputSample = tempSample;
biquadA[10] = biquadA[9]; biquadA[9] = inputSample; //DF1
chasespeed *= 0.9999; chasespeed -= 0.01; if (chasespeed < 64.0) chasespeed = 64.0;
//we have our chase speed compensated for recent fader activity
gainchase = (((gainchase*chasespeed)+inputgain)/(chasespeed+1.0));
//gainchase is chasing the target, as a simple multiply gain factor
Float64 cascade = gainchase + (gainchase*0.62);
if (1.0 != cascade) inputSample *= cascade;
if (inputSample > 1.097) inputSample = 1.097;
if (inputSample < -1.097) inputSample = -1.097;
inputSample = ((sin(inputSample*fabs(inputSample))/((fabs(inputSample) == 0.0) ?1:fabs(inputSample)))*0.8)+(sin(inputSample)*0.2);
//Console7Channel distortion stage, with a simpler form of the gain boost: no extra accentuation, because it's repeated 5x
tempSample = biquadB[2]*inputSample+biquadB[3]*biquadB[7]+biquadB[4]*biquadB[8]-biquadB[5]*biquadB[9]-biquadB[6]*biquadB[10];
biquadB[8] = biquadB[7]; biquadB[7] = inputSample; inputSample = tempSample;
biquadB[10] = biquadB[9]; biquadB[9] = inputSample; //DF1
if (1.0 != cascade) inputSample *= cascade;
if (inputSample > 1.097) inputSample = 1.097;
if (inputSample < -1.097) inputSample = -1.097;
inputSample = ((sin(inputSample*fabs(inputSample))/((fabs(inputSample) == 0.0) ?1:fabs(inputSample)))*0.8)+(sin(inputSample)*0.2);
//Console7Channel distortion stage, with a simpler form of the gain boost: no extra accentuation, because it's repeated 5x
tempSample = biquadC[2]*inputSample+biquadC[3]*biquadC[7]+biquadC[4]*biquadC[8]-biquadC[5]*biquadC[9]-biquadC[6]*biquadC[10];
biquadC[8] = biquadC[7]; biquadC[7] = inputSample; inputSample = tempSample;
biquadC[10] = biquadC[9]; biquadC[9] = inputSample; //DF1
if (1.0 != cascade) inputSample *= cascade;
if (inputSample > 1.097) inputSample = 1.097;
if (inputSample < -1.097) inputSample = -1.097;
inputSample = ((sin(inputSample*fabs(inputSample))/((fabs(inputSample) == 0.0) ?1:fabs(inputSample)))*0.8)+(sin(inputSample)*0.2);
//Console7Channel distortion stage, with a simpler form of the gain boost: no extra accentuation, because it's repeated 5x
tempSample = biquadD[2]*inputSample+biquadD[3]*biquadD[7]+biquadD[4]*biquadD[8]-biquadD[5]*biquadD[9]-biquadD[6]*biquadD[10];
biquadD[8] = biquadD[7]; biquadD[7] = inputSample; inputSample = tempSample;
biquadD[10] = biquadD[9]; biquadD[9] = inputSample; //DF1
if (1.0 != cascade) inputSample *= cascade;
if (inputSample > 1.097) inputSample = 1.097;
if (inputSample < -1.097) inputSample = -1.097;
inputSample = ((sin(inputSample*fabs(inputSample))/((fabs(inputSample) == 0.0) ?1:fabs(inputSample)))*0.8)+(sin(inputSample)*0.2);
//Console7Channel distortion stage, with a simpler form of the gain boost: no extra accentuation, because it's repeated 5x
tempSample = biquadE[2]*inputSample+biquadE[3]*biquadE[7]+biquadE[4]*biquadE[8]-biquadE[5]*biquadE[9]-biquadE[6]*biquadE[10];
biquadE[8] = biquadE[7]; biquadE[7] = inputSample; inputSample = tempSample;
biquadE[10] = biquadE[9]; biquadE[9] = inputSample; //DF1
if (1.0 != cascade) inputSample *= cascade;
if (inputSample > 1.097) inputSample = 1.097;
if (inputSample < -1.097) inputSample = -1.097;
inputSample = ((sin(inputSample*fabs(inputSample))/((fabs(inputSample) == 0.0) ?1:fabs(inputSample)))*0.8)+(sin(inputSample)*0.2);
//Console7Channel distortion stage, with a simpler form of the gain boost: no extra accentuation, because it's repeated 5x
if (cascade > 1.0) inputSample /= cascade;
//we re-amplify after the distortion relative to how much we cut back previously.
//begin 32 bit floating point dither
int expon; frexpf((float)inputSample, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSample += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
//end 32 bit floating point dither
*destP = inputSample;
sourceP += inNumChannels; destP += inNumChannels;
}
}
|
[
"jinx6568@sover.net"
] |
jinx6568@sover.net
|
98faa4b94aaecc7ae0a44042b1b509d88cc9037d
|
45b041d8d6beba5c437dbd94ecd0371d3f8d74d6
|
/cpp_module_03/ex03/ClapTrap.hpp
|
5b93fca70210cced43ee3009e3e47d59dd7da9d8
|
[] |
no_license
|
DimitriDaSilva/42_cpp_modules
|
a196a439a80c905fbc79b3dd3831d923d5961dd1
|
c904296bd1f11aefa8ca374e924a9701e3533e21
|
refs/heads/main
| 2023-08-26T02:13:54.709205
| 2021-11-04T09:21:20
| 2021-11-04T09:21:20
| 384,923,120
| 3
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,690
|
hpp
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ClapTrap.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dda-silv <dda-silv@student.42lisboa.c +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/07/24 09:43:21 by dda-silv #+# #+# */
/* Updated: 2021/07/24 15:11:03 by dda-silv ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CLAPTRAP_HPP
# define CLAPTRAP_HPP
# include <iostream>
# include <string>
# include <cmath>
class ClapTrap {
public:
/******************************************************************************/
/* CONSTRUCTORS & DESTRUCTORS */
/******************************************************************************/
/* Constructors */
// Default
ClapTrap(void);
// Type specific
ClapTrap(std::string const name);
// Copy
ClapTrap(ClapTrap const& other);
/* Destructors */
// Default
~ClapTrap(void);
/******************************************************************************/
/* OVERLOADING OPERATORS */
/******************************************************************************/
/* Assignement */
ClapTrap& operator=(ClapTrap const& other);
/******************************************************************************/
/* OTHER CLASS FUNCTIONS */
/******************************************************************************/
void attack(std::string const& target);
void takeDamange(unsigned int amount);
void beRepaired(unsigned int amount);
protected:
/******************************************************************************/
/* PRIVATE DATA */
/******************************************************************************/
std::string _name;
unsigned int _hp;
unsigned int _energy_pts;
unsigned int _attack_dmg;
};
#endif
|
[
"dimitri.gomes.da.silva@gmail.com"
] |
dimitri.gomes.da.silva@gmail.com
|
af7490b858ef9526bd7a4655be0fcfc80bf7dc02
|
43a2fbc77f5cea2487c05c7679a30e15db9a3a50
|
/Cpp/External (Offsets Only)/SDK/BP_UnsortedCommodity_Gemstones_Desc_functions.cpp
|
a9cdb11e1782d4d7f6d4da4a66b4a349844bdae1
|
[] |
no_license
|
zH4x/SoT-Insider-SDK
|
57e2e05ede34ca1fd90fc5904cf7a79f0259085c
|
6bff738a1b701c34656546e333b7e59c98c63ad7
|
refs/heads/main
| 2023-06-09T23:10:32.929216
| 2021-07-07T01:34:27
| 2021-07-07T01:34:27
| 383,638,719
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 605
|
cpp
|
// Name: SoT-Insider, Version: 1.102.2382.0
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------
void UBP_UnsortedCommodity_Gemstones_Desc_C::AfterRead()
{
UCommodityItemDesc::AfterRead();
}
void UBP_UnsortedCommodity_Gemstones_Desc_C::BeforeDelete()
{
UCommodityItemDesc::BeforeDelete();
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
[
"Massimo.linker@gmail.com"
] |
Massimo.linker@gmail.com
|
81400565583d73e2c9e35ee4259a6c6e1476b260
|
162b871457bfb55c4529d160cd0cdd3de3f643ae
|
/test_apps/mem_debug_curl/curl5-mk01.cc
|
efb1a3a64dddacf5230f9a92e5d230918c4b2711
|
[] |
no_license
|
mkogan1/ceph-utils
|
80dbcc5c2db692b905b9973983e12c80b755351d
|
2137e8ea0e5cc22be43c6f85af25cab041948d25
|
refs/heads/master
| 2021-06-02T08:59:17.123808
| 2020-09-14T08:10:57
| 2020-09-14T08:10:57
| 112,945,613
| 0
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 11,596
|
cc
|
// g++ -g3 -lcurl -lpthread -std=c++11 curl5-mk01.cc -o curl5-mk01
// time valgrind --tool=massif --time-unit=B --max-snapshots=200 ./curl5-mk01 -C ./server.crt -t 32 -m 8 4096 https://localhost:4433
// -m 1 == no reuse
// time valgrind --tool=massif --time-unit=B --max-snapshots=200 ./curl5-mk01 -C ./server.crt -t 32 -m 1 4096 https://localhost:4433
/*
building
rhel/centos nss:
yum install libcurl-devel
c++ -g -o curl5 curl5.cc -lcurl -lpthread -std=c++11
fedora nss:
dnf install libcurl-devel
c++ -g -o curl5 curl5.cc -lcurl -lpthread
ubuntu nss
as root,
apt-get install libcurl3-nss-dev
as self,
c++ -o curl5.nss -g curl5.cc -lcurl-nss -lpthread -std=c++11
ubuntu openssl
as root,
apt-get install libcurl4-openssl-dev
as self,
c++ -o curl5.ssl -g curl5.cc -lcurl -lpthread -std=c++11
ubuntu gnutls
as root,
apt-get install libcurl4-gnutls-dev
as self,
c++ -o curl5.gnutls -g curl5.cc -lcurl-gnutls -lpthread -std=c++11
*/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <atomic>
#include <vector>
#include <iostream>
#include <curl/curl.h>
#include <stdio.h>
#include <unistd.h>
const char *my_method = "GET";
const char *my_url;
const char *my_default_url = "https://acanthodes.eng.arb.redhat.com:35357/v3";
int multi_count;
int maxcount = 0;
int Vflag;
char *capath;
std::atomic_int easy_inits_made;
std::atomic_int reuses;
std::atomic_int reaps;
std::atomic_int carrier_allocs;
std::atomic_int carrier_frees;
pthread_mutex_t saved_mutex;
pthread_mutex_t time_mutex;
struct curl_carrier {
int uses;
struct timespec lastuse[1];
CURL *h;
};
std::vector<curl_carrier *>saved_curl;
std::string
format_timespec(struct timespec *tv)
{
char buf[512];
snprintf(buf, sizeof buf, "%ld.%09ld", tv->tv_sec, tv->tv_nsec);
return std::string(buf);
}
double timespec_to_float(struct timespec *tv)
{
double r;
r = tv->tv_nsec;
r /= 1000000000;
r += tv->tv_sec;
return r;
}
struct curl_carrier *
get_curl_handle()
{
struct curl_carrier *curl = 0;
CURL *h;
pthread_mutex_lock(&saved_mutex);
if (!saved_curl.empty()) {
curl = *saved_curl.begin();
saved_curl.erase(saved_curl.begin());
++reuses;
}
//pthread_mutex_unlock(&saved_mutex);
if (curl) {
} else if ((h = curl_easy_init())) {
++carrier_allocs;
curl = new curl_carrier;
curl->h = h;
curl->uses = 0;
++easy_inits_made;
printf("+"); fflush(stdout);
} else {
// curl = 0;
}
pthread_mutex_unlock(&saved_mutex);
return curl;
}
void
release_curl_handle_now(struct curl_carrier *curl)
{
curl_easy_cleanup(curl->h);
++carrier_frees;
delete curl;
}
void
release_curl_handle(struct curl_carrier *curl)
{
pthread_mutex_lock(&saved_mutex);
if (++curl->uses >= multi_count) {
release_curl_handle_now(curl);
} else {
//pthread_mutex_lock(&saved_mutex);
clock_gettime(CLOCK_MONOTONIC_RAW, curl->lastuse);
saved_curl.insert(saved_curl.begin(), 1, curl);
//pthread_mutex_unlock(&saved_mutex);
}
pthread_mutex_unlock(&saved_mutex);
}
int cleaner_shutdown;
pthread_t cleaner_id;
pthread_cond_t cleaner_cond;
#define MAXIDLE 5
void *curl_cleaner(void *h)
{
struct curl_carrier *curl;
struct timespec now[1];
if (pthread_mutex_lock(&saved_mutex) < 0) {
std::cerr << "lock failed " << errno << std::endl;
}
for (;;) {
timespec until[1];
if (cleaner_shutdown) {
if (saved_curl.empty())
break;
} else {
if (clock_gettime(CLOCK_REALTIME, now) < 0) {
std::cerr << "gettime failed " << errno << std::endl;
}
now->tv_sec += MAXIDLE;
if (pthread_cond_timedwait(&cleaner_cond, &saved_mutex, now) < 0) {
std::cerr << "cond timedwait failed " << errno << std::endl;
}
}
if (clock_gettime(CLOCK_MONOTONIC_RAW, now) < 0) {
std::cerr << "gettime failed " << errno << std::endl;
}
while (!saved_curl.empty()) {
auto cend = saved_curl.end();
--cend;
curl = *cend;
saved_curl.erase(cend);
if (!cleaner_shutdown && curl->lastuse->tv_sec
>= now->tv_sec + MAXIDLE)
break;
if (!cleaner_shutdown)
++reaps;
release_curl_handle_now(curl);
}
}
if (pthread_mutex_unlock(&saved_mutex) < 0) {
std::cerr << "unlock failed " << errno << std::endl;
}
}
void
init_curl_handles()
{
pthread_create(&cleaner_id, nullptr, curl_cleaner, nullptr);
}
void
flush_curl_handles()
{
struct curl_carrier *curl;
void *result;
cleaner_shutdown = 1;
pthread_cond_signal(&cleaner_cond);
if (pthread_join(cleaner_id, &result) < 0) {
std::cerr << "pthread_join failed: " << errno << std::endl;
return;
}
if (!saved_curl.empty()) {
std::cerr << "cleaner failed final cleanup" << std::endl;
}
saved_curl.shrink_to_fit();
}
struct receiver_arg {
int id;
pthread_t me;
};
uint
my_receive_http_data(char *in, uint size, uint num, void *h)
{
uint r;
struct receiver_arg *z = (struct receiver_arg *) h;
if (z->me != pthread_self())
{
std::cout << "oops: " << z->me << " != " << pthread_self() << std::endl;
return 0;
}
r = size * num;
#if 0
fprintf(stdout,"Received: ");
r = fwrite(in, 1, r, stdout);
#endif
return r;
}
void
timespec_diff(struct timespec *st, struct timespec *en)
{
if (en->tv_nsec < st->tv_nsec) {
en->tv_sec -= 1;
en->tv_nsec += 1000000000;
}
en->tv_sec -= st->tv_sec;
en->tv_nsec -= st->tv_nsec;
}
void
timespec_add(struct timespec *from, struct timespec *ac)
{
ac->tv_sec += from->tv_sec;
ac->tv_nsec += from->tv_nsec;
if (ac->tv_nsec >= 1000000000) {
ac->tv_sec += 1;
ac->tv_nsec -= 1000000000;
}
}
struct doit_stats {
struct timespec first, rest;
int first_count, rest_count;
};
int
doit(int id, struct doit_stats *ds)
{
struct curl_carrier *ca;
CURL *curl;
CURLcode rc;
char error_buf[CURL_ERROR_SIZE];
long http_status;
int r = 0;
struct receiver_arg recvarg[1];
recvarg->id = id;
recvarg->me = pthread_self();
struct timespec ts[2];
ca = get_curl_handle();
if (!ca)
return 1;
curl = ca->h;
printf("."); fflush(stdout);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, my_method);
curl_easy_setopt(curl, CURLOPT_URL, my_url);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buf);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)recvarg);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_receive_http_data);
if (Vflag) {
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
}
if (capath)
curl_easy_setopt(curl, CURLOPT_CAINFO, capath);
if (clock_gettime(CLOCK_MONOTONIC_RAW, ts) < 0) {
std::cerr << "gettime failed " << errno << std::endl;
}
rc = curl_easy_perform(curl);
if (clock_gettime(CLOCK_MONOTONIC_RAW, ts+1) < 0) {
std::cerr << "gettime failed " << errno << std::endl;
}
timespec_diff(ts, ts+1);
if (!ca->uses) {
timespec_add(ts+1, &ds->first);
++ds->first_count;
} else {
timespec_add(ts+1, &ds->rest);
++ds->rest_count;
}
if (rc != CURLE_OK) {
fprintf(stderr,"curl_easy_perform failed, %s\n",
curl_easy_strerror(rc));
r |= 2;
goto Done;
}
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status);
Done:
release_curl_handle(ca);
return r;
}
std::atomic_int req_made;
struct doit_stats doit_results[1];
int
process()
{
int r = 0;
int i;
struct doit_stats ds[1];
ds->first_count = ds->rest_count = 0;
ds->first.tv_sec = ds->first.tv_nsec = 0;
ds->rest.tv_sec = ds->rest.tv_nsec = 0;
for (;;) {
i = req_made++;
if (i >= maxcount) {
break;
}
r |= doit(i, ds);
if ((i+1) % 100 == 0) {
pthread_mutex_lock(&saved_mutex);
printf ("curl global cleanup - locaked\n");
sleep(1);
curl_global_cleanup();
curl_global_init(CURL_GLOBAL_DEFAULT);
pthread_mutex_unlock(&saved_mutex);
printf ("curl global cleanup - unlocked\n");
}
}
if (pthread_mutex_lock(&time_mutex) < 0) {
std::cerr << "lock failed " << errno << std::endl;
}
doit_results->first_count += ds->first_count;
doit_results->rest_count += ds->rest_count;
timespec_add(&ds->first, &doit_results->first);
timespec_add(&ds->rest, &doit_results->rest);
if (pthread_mutex_unlock(&time_mutex) < 0) {
std::cerr << "unlock failed " << errno << std::endl;
}
return r;
}
struct runner_arg {
int number;
int result;
};
void *
runner(void *_s)
{
struct runner_arg *a = (struct runner_arg *) _s;
a->result = process();
return a;
}
struct runner_arg *ra;
pthread_t *runner_id;
int runner_count;
void
setup_runners(int nt)
{
ra = new runner_arg[nt];
runner_id = new pthread_t[nt];
runner_count = nt;
}
void
start_runners()
{
int i;
for (i = 0; i < runner_count; ++i) {
ra[i].number = i;
pthread_create(runner_id + i, nullptr, runner, (void*)(ra + i));
}
}
int
wait_for_runners()
{
void *result;
struct runner_arg *a;
int i;
int r = 0;
for (i = 0; i < runner_count; ++i) {
if (pthread_join(runner_id[i], &result) < 0) {
std::cerr << "pthread_join failed: " << errno << std::endl;
continue;
}
a = (struct runner_arg *) result;
if (a->number != i) {
std::cerr << "runner id changed? " << a->number << " != " << i << std::endl;
continue;
}
r |= a->result;
}
return r;
}
void
release_runner_data()
{
delete[] ra;
delete[] runner_id;
ra = nullptr;
runner_id = nullptr;
}
int
main(int ac, char **av)
{
char *ap, *ep, *cp;
const char *msg;
int r;
int nt = 1;
while (--ac > 0) if (*(ap = *++av) == '-') while (*++ap) switch(*ap) {
// case 'v':
// ++vflag;
// break;
case '-':
break;
case 'C':
if (ac < 1) {
goto Usage;
}
--ac;
capath = *++av;
break;
case 't':
if (ac < 1) {
goto Usage;
}
--ac;
cp = *++av;
nt = strtoll(cp, &ep, 0);
if (cp == ep || *ep) {
fprintf(stderr,"Bad threadcount <%s>\n", cp);
goto Usage;
}
break;
case 'V':
++Vflag;
break;
case 'm':
if (ac < 1) {
goto Usage;
}
--ac;
cp = *++av;
multi_count = strtoll(cp, &ep, 0);
if (cp == ep || *ep) {
fprintf(stderr,"Bad multicount <%s>\n", cp);
goto Usage;
}
break;
default:
Usage:
fprintf(stderr,"Usage: curl5 [-t threads] [-m #m] #times url\n");
exit(1);
} else if (!maxcount) {
maxcount = strtoll(ap, &ep, 0);
if (!*ap) {
msg = "empty";
BadCount:
fprintf(stderr,"bad maxcount <%s>: %s?\n", ap, msg);
goto Usage;
}
if (!*ep)
;
else {
msg = "nondigits after number";
goto BadCount;
}
} else if (!my_url) {
my_url = ap;
} else {
fprintf(stderr,"extra arg?\n");
goto Usage;
}
if (maxcount <= 0) {
fprintf(stderr,"Missing maxcount\n");
goto Usage;
}
if (nt <= 0) {
fprintf(stderr,"Invalid threadcount (-t)\n");
goto Usage;
}
if (!my_url)
my_url = getenv("MY_URL");
if (!my_url)
my_url = my_default_url;
curl_global_init(CURL_GLOBAL_DEFAULT);
init_curl_handles();
setup_runners(nt);
start_runners();
r = wait_for_runners();
release_runner_data();
flush_curl_handles();
curl_global_cleanup();
std::cout << "curl_easy_init: " << easy_inits_made << std::endl;
std::cout << "reuse curl: " << reuses << std::endl;
std::cout << "timed-discard curl: " << reaps << std::endl;
std::cout << "first: count=" << doit_results->first_count << " time=" <<
format_timespec(&doit_results->first) <<
" time-per=" << timespec_to_float(&doit_results->first)/doit_results->first_count << std::endl;
std::cout << "rest: count=" << doit_results->rest_count << " time=" <<
format_timespec(&doit_results->rest) <<
" time-per=" << timespec_to_float(&doit_results->rest)/doit_results->rest_count << std::endl;
std::cout << "alloc curl: " << carrier_allocs << std::endl;
std::cout << "free curl: " << carrier_frees << std::endl;
exit(r);
}
|
[
"mkogan@redhat.com"
] |
mkogan@redhat.com
|
464e05b43c5e626d2f4fce4faadf16423b438c5e
|
b014d26d032ab0b0a75d2538846905049c4820ce
|
/Ejercicios/Ejercicio09-IF/condicionesif.cpp
|
2adde2ef6404fbe481a1b2ace061200d1537ad99
|
[
"MIT"
] |
permissive
|
farelrz14/cpp
|
27574f0055d3e9bc29f0d4a426056669d4479584
|
ee47789e2edf748e164b9d1e74e477e255cf4fa7
|
refs/heads/master
| 2022-11-30T19:16:10.690208
| 2020-08-18T02:55:52
| 2020-08-18T02:55:52
| 276,516,816
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 378
|
cpp
|
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int numeroSecreto = 7;
int numero = 0;
cout << "Ingrese un numero: ";
cin >> numero;
cout << endl;
if (numero == numeroSecreto){
cout << "Adivinaste el numero secreto: " << numero;
}else{
cout << "No adivinaste ";
}
return 0;
}
|
[
"farel_92@hotmail.com"
] |
farel_92@hotmail.com
|
dabc5641f779f760196bbba3853eb7ce99dafa64
|
15a2438ca61d7fe277fd6efe64fd8dca786d6341
|
/common/common_A258.h
|
cd2888e22c7269a6fc9e7e0755da1ad9c4b99609
|
[] |
no_license
|
LYW666biubiu/A258
|
e955433240fde2075db4f7ab14eecba69063aa1d
|
3aaccdde57dd6cdf917af548e55a27cc64bf0e54
|
refs/heads/master
| 2023-08-31T17:39:13.928781
| 2021-10-24T11:21:25
| 2021-10-24T11:21:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 704
|
h
|
#ifndef COMMON_A258_H
#define COMMON_A258_H
#define SZ_IPADDR (24)
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h> /* ftok() etc. */
#include <sys/msg.h> /* msgget() etc. */
#include <pthread.h>
#include <errno.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <unistd.h>
#include <sys/stat.h>
#include <singleton.h> // 线程安全的单例类实现
#define HDPATH "/version/hardware_info"
#define BUFF_SIZE_A258 1024
template<typename T>
std::string int2str(const T &dst_temp)
{
std::stringstream stream;
stream << dst_temp;
return stream.str();
}
bool readHdVersion(char *hd_version);
#endif // COMMON_H
|
[
"790316687@qq.com"
] |
790316687@qq.com
|
f5affa46ca15f16119ba61c7588d66ec5385f8df
|
af2b3c53b2c102485bbc9f2106844fbfeb792384
|
/source/converted_cpp/1001.cpp
|
9f96307dfebed20578e5e00765e12f14562e07df
|
[] |
no_license
|
utk39951/LightOJ-Scrapper
|
552f6a94e526c5ce55fc9354e94066b07fe272c5
|
5849ca7b032505ec2b6b472c12ecb25f83c5ce8b
|
refs/heads/master
| 2021-06-11T06:30:27.557177
| 2017-03-19T05:21:24
| 2017-03-19T05:21:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 271
|
cpp
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while (t--){
int n;
cin>>n;
if (n>10)
cout<<n-10<<" "<<10<<endl;
else
cout<<0<<" "<<n<<endl;
}
return 0;
}
|
[
"iit2014507@iiita.ac.in"
] |
iit2014507@iiita.ac.in
|
3e54cf44e2c9f065ce2429b4dde7b70ac09d1fa4
|
6f874ccb136d411c8ec7f4faf806a108ffc76837
|
/code/leixiaohua1020/simplestmediaplay/simplest_video_play_direct3d/simplest_video_play_direct3d.cpp
|
545b75ea804df245a9b5ecc6eaa7e5161353177f
|
[] |
no_license
|
JetAr/ZDoc
|
c0f97a8ad8fd1f6a40e687b886f6c25bb89b6435
|
e81a3adc354ec33345e9a3303f381dcb1b02c19d
|
refs/heads/master
| 2022-07-26T23:06:12.021611
| 2021-07-11T13:45:57
| 2021-07-11T13:45:57
| 33,112,803
| 8
| 8
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,981
|
cpp
|
/**
* 最简单的Direct3D播放视频的例子(Direct3D播放RGB/YUV)[Surface]
* Simplest Video Play Direct3D (Direct3D play RGB/YUV)[Surface]
*
* 雷霄骅 Lei Xiaohua
* leixiaohua1020@126.com
* 中国传媒大学/数字电视技术
* Communication University of China / Digital TV Technology
* http://blog.csdn.net/leixiaohua1020
*
* 本程序使用Direct3D播放RGB/YUV视频像素数据。使用D3D中的Surface渲染数据。
* 使用Surface渲染视频相对于另一种方法(使用Texture)来说,更加简单,适合
* 新手学习。
* 函数调用步骤如下:
*
* [初始化]
* Direct3DCreate9(): 获得IDirect3D9
* IDirect3D9->CreateDevice(): 通过IDirect3D9创建Device(设备)。
* IDirect3DDevice9->CreateOffscreenPlainSurface(): 通过Device创建一个Surface(离屏表面)。
*
* [循环渲染数据]
* IDirect3DSurface9->LockRect(): 锁定离屏表面。
* memcpy(): 填充数据
* IDirect3DSurface9->UnLockRect(): 解锁离屏表面。
* IDirect3DDevice9->BeginScene(): 开始绘制。
* IDirect3DDevice9->GetBackBuffer(): 获得后备缓冲。
* IDirect3DDevice9->StretchRect(): 拷贝Surface数据至后备缓冲。
* IDirect3DDevice9->EndScene(): 结束绘制。
* IDirect3DDevice9->Present(): 显示出来。
*
* This software play RGB/YUV raw video data using Direct3D. It uses Surface
* in D3D to render the pixel data. Compared to another method (use Texture),
* it is more simple and suitable for the beginner of Direct3D.
* The process is shown as follows:
*
* [Init]
* Direct3DCreate9(): Get IDirect3D9.
* IDirect3D9->CreateDevice(): Create a Device.
* IDirect3DDevice9->CreateOffscreenPlainSurface(): Create a Offscreen Surface.
*
* [Loop to Render data]
* IDirect3DSurface9->LockRect(): Lock the Offscreen Surface.
* memcpy(): Fill pixel data...
* IDirect3DSurface9->UnLockRect(): UnLock the Offscreen Surface.
* IDirect3DDevice9->BeginScene(): Begin drawing.
* IDirect3DDevice9->GetBackBuffer(): Get BackBuffer.
* IDirect3DDevice9->StretchRect(): Copy Surface data to BackBuffer.
* IDirect3DDevice9->EndScene(): End drawing.
* IDirect3DDevice9->Present(): Show on the screen.
*/
#include <stdio.h>
#include <tchar.h>
#include <d3d9.h>
CRITICAL_SECTION m_critial;
IDirect3D9 *m_pDirect3D9= NULL;
IDirect3DDevice9 *m_pDirect3DDevice= NULL;
IDirect3DSurface9 *m_pDirect3DSurfaceRender= NULL;
RECT m_rtViewport;
//set '1' to choose a type of file to play
//Read BGRA data
#define LOAD_BGRA 0
//Read YUV420P data
#define LOAD_YUV420P 1
//Width, Height
const int screen_w=500,screen_h=500;
const int pixel_w=320,pixel_h=180;
FILE *fp=NULL;
//Bit per Pixel
#if LOAD_BGRA
const int bpp=32;
#elif LOAD_YUV420P
const int bpp=12;
#endif
unsigned char buffer[pixel_w*pixel_h*bpp/8];
void Cleanup()
{
EnterCriticalSection(&m_critial);
if(m_pDirect3DSurfaceRender)
m_pDirect3DSurfaceRender->Release();
if(m_pDirect3DDevice)
m_pDirect3DDevice->Release();
if(m_pDirect3D9)
m_pDirect3D9->Release();
LeaveCriticalSection(&m_critial);
}
int InitD3D( HWND hwnd, unsigned long lWidth, unsigned long lHeight )
{
HRESULT lRet;
InitializeCriticalSection(&m_critial);
Cleanup();
m_pDirect3D9 = Direct3DCreate9( D3D_SDK_VERSION );
if( m_pDirect3D9 == NULL )
return -1;
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
GetClientRect(hwnd,&m_rtViewport);
lRet=m_pDirect3D9->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &m_pDirect3DDevice );
if(FAILED(lRet))
return -1;
#if LOAD_BGRA
lRet=m_pDirect3DDevice->CreateOffscreenPlainSurface(
lWidth,lHeight,
D3DFMT_X8R8G8B8,
D3DPOOL_DEFAULT,
&m_pDirect3DSurfaceRender,
NULL);
#elif LOAD_YUV420P
lRet=m_pDirect3DDevice->CreateOffscreenPlainSurface(
lWidth,lHeight,
(D3DFORMAT)MAKEFOURCC('Y', 'V', '1', '2'),
D3DPOOL_DEFAULT,
&m_pDirect3DSurfaceRender,
NULL);
#endif
if(FAILED(lRet))
return -1;
return 0;
}
bool Render()
{
HRESULT lRet;
//Read Data
//RGB
if (fread(buffer, 1, pixel_w*pixel_h*bpp/8, fp) != pixel_w*pixel_h*bpp/8)
{
// Loop
fseek(fp, 0, SEEK_SET);
fread(buffer, 1, pixel_w*pixel_h*bpp/8, fp);
}
if(m_pDirect3DSurfaceRender == NULL)
return -1;
D3DLOCKED_RECT d3d_rect;
lRet=m_pDirect3DSurfaceRender->LockRect(&d3d_rect,NULL,D3DLOCK_DONOTWAIT);
if(FAILED(lRet))
return -1;
byte *pSrc = buffer;
byte * pDest = (BYTE *)d3d_rect.pBits;
int stride = d3d_rect.Pitch;
unsigned long i = 0;
//Copy Data
#if LOAD_BGRA
int pixel_w_size=pixel_w*4;
for(i=0; i< pixel_h; i++)
{
memcpy( pDest, pSrc, pixel_w_size );
pDest += stride;
pSrc += pixel_w_size;
}
#elif LOAD_YUV420P
for(i = 0; i < pixel_h; i ++)
{
memcpy(pDest + i * stride,pSrc + i * pixel_w, pixel_w);
}
for(i = 0; i < pixel_h/2; i ++)
{
memcpy(pDest + stride * pixel_h + i * stride / 2,pSrc + pixel_w * pixel_h + pixel_w * pixel_h / 4 + i * pixel_w / 2, pixel_w / 2);
}
for(i = 0; i < pixel_h/2; i ++)
{
memcpy(pDest + stride * pixel_h + stride * pixel_h / 4 + i * stride / 2,pSrc + pixel_w * pixel_h + i * pixel_w / 2, pixel_w / 2);
}
#endif
lRet=m_pDirect3DSurfaceRender->UnlockRect();
if(FAILED(lRet))
return -1;
if (m_pDirect3DDevice == NULL)
return -1;
m_pDirect3DDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,0), 1.0f, 0 );
m_pDirect3DDevice->BeginScene();
IDirect3DSurface9 * pBackBuffer = NULL;
m_pDirect3DDevice->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO,&pBackBuffer);
m_pDirect3DDevice->StretchRect(m_pDirect3DSurfaceRender,NULL,pBackBuffer,&m_rtViewport,D3DTEXF_LINEAR);
m_pDirect3DDevice->EndScene();
m_pDirect3DDevice->Present( NULL, NULL, NULL, NULL );
pBackBuffer->Release();
return true;
}
LRESULT WINAPI MyWndProc(HWND hwnd, UINT msg, WPARAM wparma, LPARAM lparam)
{
switch(msg)
{
case WM_DESTROY:
Cleanup();
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, msg, wparma, lparam);
}
int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in LPSTR lpCmdLine, __in int nShowCmd )
{
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
wc.cbSize = sizeof(wc);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wc.lpfnWndProc = (WNDPROC)MyWndProc;
wc.lpszClassName = L"D3D";
wc.style = CS_HREDRAW | CS_VREDRAW;
RegisterClassEx(&wc);
HWND hwnd = NULL;
hwnd = CreateWindow(L"D3D", L"Simplest Video Play Direct3D (Surface)", WS_OVERLAPPEDWINDOW, 100, 100, screen_w, screen_h, NULL, NULL, hInstance, NULL);
if (hwnd==NULL)
{
return -1;
}
if(InitD3D( hwnd, pixel_w, pixel_h)==E_FAIL)
{
return -1;
}
ShowWindow(hwnd, nShowCmd);
UpdateWindow(hwnd);
#if LOAD_BGRA
fp=fopen("../test_bgra_320x180.rgb","rb+");
#elif LOAD_YUV420P
fp=fopen("../test_yuv420p_320x180.yuv","rb+");
#endif
if(fp==NULL)
{
printf("Cannot open this file.\n");
return -1;
}
MSG msg;
ZeroMemory(&msg, sizeof(msg));
while (msg.message != WM_QUIT)
{
//PeekMessage, not GetMessage
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
Sleep(40);
Render();
}
}
UnregisterClass(L"D3D", hInstance);
return 0;
}
|
[
"126.org@gmail.com"
] |
126.org@gmail.com
|
a90b87e847c42e32ee03eb4ad7a0339110373399
|
a937fccfc67969b88763f0f4fb532127647a1374
|
/Source/BuildingEscape/Message.cpp
|
3d1eb05955417d450302b30301f057c1fd48b377
|
[] |
no_license
|
CristinaRoibu/BuildingEscape
|
67df816dff39bd84c202b351e60b05f8da7a29d7
|
d49dce72cbca696214348853a8aaeecbde92a8c9
|
refs/heads/master
| 2021-01-21T16:31:24.574585
| 2017-05-20T14:01:01
| 2017-05-20T14:01:01
| 91,892,797
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 542
|
cpp
|
// Copyright Cristina Roibu 2017
#include "BuildingEscape.h"
#include "Message.h"
void AMessage::BeginPlay() {
Super::BeginPlay();
DisplayText();
}
void AMessage::DisplayText() {
GetTextRender()->SetText(Message1);
GetTextRender()->TextRenderColor = FColor::Black;
}
void AMessage::PressedY() { //the text renderer is a blueprint class and it detects the player input
UE_LOG(LogTemp, Error, TEXT("PRESED: Y !!!!!!!!!!!!!!!!!!!!!!!!!!"));
Message1 = "These violent delights have violent ends";
GetTextRender()->SetText(Message1);
}
|
[
"kristinna@hotmail.it"
] |
kristinna@hotmail.it
|
bc7e54243a4d52ecb4f63af6b6911bd303878186
|
62f219ef05fd6415be9bd4b931b394c853c0c7a8
|
/Calculator of ordinary fractions/Calculator-of-ordinary-fractions.cpp
|
5c934a54d0cb0b7345fa31b4520d3e68b9535dd5
|
[] |
no_license
|
AKulikov1207/Course-Fundamentals-of-Cpp-development-the-white-belt
|
f2ae3289e8bc2f60c25e639f748b82b12f15e54a
|
21c2791c7a329e7cefcc745a58dd2b65290ef695
|
refs/heads/master
| 2022-12-01T02:33:56.213964
| 2020-08-11T13:33:43
| 2020-08-11T13:33:43
| 286,514,984
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,725
|
cpp
|
#include <iostream>
#include <exception>
#include <fstream>
#include <map>
#include <set>
#include <vector>
#include <cmath>
using namespace std;
// представление рациональных чисел
class Rational {
public:
Rational() {
p = 0;
q = 1;
}
Rational(int numerator, int denominator) {
if (denominator < 0) {
if (numerator < 0) {
denominator = abs(denominator); // если дробь вида -p/-q, делаем её вида p/q
numerator = abs(numerator);
}
else {
denominator = abs(denominator); // если дробь вида p/-q, делаем её вида -p/q
numerator = numerator - 2 * numerator;
}
}
if (numerator == 0)
denominator = 1; // если числитель = 0, то знаменатель = 1 (по условию задачи)
int Gcd = nod(abs(numerator), abs(denominator)); // НОД(числитель, знаменатель)
p = numerator / Gcd;
q = denominator / Gcd;
if (q == 0) throw invalid_argument("denominator = 0"); // выброс исключения "знаменатель = 0"
}
int Numerator() const {
return p;
}
int Denominator() const {
return q;
}
private:
int p; // числитель
int q; // знаменатель (p/q)
// наибольший общий делитель
int nod(int x, int y) {
while (x > 0 && y > 0) {
if (x > y)
x %= y;
else
y %= x;
}
return x == 0 ? y : x;
}
};
// перегрузка логических операторов
bool operator==(const Rational& lhs, const Rational& rhs) {
return ((lhs.Numerator() == rhs.Numerator()) && (lhs.Denominator() == rhs.Denominator()));
}
bool operator<(const Rational& lhs, const Rational& rhs) {
return (lhs.Numerator() / (double)lhs.Denominator()) < (rhs.Numerator() / (double)rhs.Denominator());
}
bool operator>(const Rational& lhs, const Rational& rhs) {
return rhs < lhs;
}
// перегрузка арифметических операторов
Rational operator+(const Rational& lhs, const Rational& rhs) {
int p = (lhs.Numerator() * rhs.Denominator()) + (rhs.Numerator() * lhs.Denominator());
int q = lhs.Denominator() * rhs.Denominator();
return Rational(p, q);
}
Rational operator-(const Rational& lhs, const Rational& rhs) {
int p = (lhs.Numerator() * rhs.Denominator()) - (rhs.Numerator() * lhs.Denominator());
int q = lhs.Denominator() * rhs.Denominator();
return Rational(p, q);
}
Rational operator*(const Rational& lhs, const Rational& rhs) {
int p = (lhs.Numerator() * rhs.Numerator());
int q = (lhs.Denominator() * rhs.Denominator());
return Rational(p, q);
}
Rational operator/(const Rational& lhs, const Rational& rhs) {
int p = (lhs.Numerator() * rhs.Denominator());
int q = (lhs.Denominator() * rhs.Numerator());
if (q == 0) throw domain_error("division by zero");
return Rational(p, q);
}
// вывод рационального числа в нужном формате
ostream& operator<<(ostream& os, const Rational& rat) {
os << rat.Numerator() << "/" << rat.Denominator();
return os;
}
istream& operator>>(istream& is, Rational& rat) {
int p, q;
if (is >> p && is.ignore(1) && is >> q) {
rat = { p, q };
}
return is;
}
int main()
{
try
{
Rational a, b;
char op; // арифметичсекий оператор
cin >> a >> op >> b;
if (op == '+')
cout << a + b;
else if (op == '-')
cout << a - b;
else if (op == '*')
cout << a * b;
else
cout << a / b;
}
catch (const invalid_argument&) {
cout << "Invalid argument";
}
catch (const domain_error&) {
cout << "Division by zero";
}
return 0;
}
|
[
"kandrey1207@mail.ru"
] |
kandrey1207@mail.ru
|
6825cfa6da5e727aaa7cf41552fe78cf54b04125
|
ca1ad18dfba8610872a9a1f5031622f2f5d3a38b
|
/src/util.h
|
14397065072f9c341ea908bebd543f52d06eafbd
|
[
"MIT"
] |
permissive
|
zahidaliayub/TRAW
|
c0bb3376543b757be16d8f78e1f3ea38bbae566d
|
acb91f1fc198a417a0633152fac6200d65a972c3
|
refs/heads/master
| 2020-03-23T13:16:19.126955
| 2018-06-25T10:51:11
| 2018-06-25T10:51:11
| 141,609,257
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 15,638
|
h
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_UTIL_H
#define BITCOIN_UTIL_H
#ifndef WIN32
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#endif
#include "serialize.h"
#include "tinyformat.h"
#include <map>
#include <list>
#include <utility>
#include <vector>
#include <string>
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <stdint.h>
class uint256;
static const int64_t COIN = 100000000;
static const int64_t CENT = 1000000;
#define BEGIN(a) ((char*)&(a))
#define END(a) ((char*)&((&(a))[1]))
#define UBEGIN(a) ((unsigned char*)&(a))
#define UEND(a) ((unsigned char*)&((&(a))[1]))
#define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0]))
#define UVOIDBEGIN(a) ((void*)&(a))
#define CVOIDBEGIN(a) ((const void*)&(a))
#define UINTBEGIN(a) ((uint32_t*)&(a))
#define CUINTBEGIN(a) ((const uint32_t*)&(a))
// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
#define PAIRTYPE(t1, t2) std::pair<t1, t2>
// Align by increasing pointer, must have extra space at end of buffer
template <size_t nBytes, typename T>
T* alignup(T* p)
{
union
{
T* ptr;
size_t n;
} u;
u.ptr = p;
u.n = (u.n + (nBytes-1)) & ~(nBytes-1);
return u.ptr;
}
#ifdef WIN32
#define MSG_NOSIGNAL 0
#define MSG_DONTWAIT 0
#ifndef S_IRUSR
#define S_IRUSR 0400
#define S_IWUSR 0200
#endif
#else
#define MAX_PATH 1024
#endif
inline void MilliSleep(int64_t n)
{
#if BOOST_VERSION >= 105000
boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
#else
boost::this_thread::sleep(boost::posix_time::milliseconds(n));
#endif
}
extern std::map<std::string, std::string> mapArgs;
extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
extern bool fDebug;
extern bool fPrintToConsole;
extern bool fPrintToDebugLog;
extern bool fDaemon;
extern bool fServer;
extern bool fCommandLine;
extern std::string strMiscWarning;
extern bool fNoListen;
extern bool fLogTimestamps;
extern volatile bool fReopenDebugLog;
void RandAddSeed();
void RandAddSeedPerfmon();
/* Return true if log accepts specified category */
bool LogAcceptCategory(const char* category);
/* Send a string to the log output */
int LogPrintStr(const std::string &str);
#define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)
/* When we switch to C++11, this can be switched to variadic templates instead
* of this macro-based construction (see tinyformat.h).
*/
#define MAKE_ERROR_AND_LOG_FUNC(n) \
/* Print to debug.log if -debug=category switch is given OR category is NULL. */ \
template<TINYFORMAT_ARGTYPES(n)> \
static inline int LogPrint(const char* category, const char* format, TINYFORMAT_VARARGS(n)) \
{ \
if(!LogAcceptCategory(category)) return 0; \
return LogPrintStr(tfm::format(format, TINYFORMAT_PASSARGS(n))); \
} \
/* Log error and return false */ \
template<TINYFORMAT_ARGTYPES(n)> \
static inline bool error(const char* format, TINYFORMAT_VARARGS(n)) \
{ \
LogPrintStr("ERROR: " + tfm::format(format, TINYFORMAT_PASSARGS(n)) + "\n"); \
return false; \
}
TINYFORMAT_FOREACH_ARGNUM(MAKE_ERROR_AND_LOG_FUNC)
/* Zero-arg versions of logging and error, these are not covered by
* TINYFORMAT_FOREACH_ARGNUM
*/
static inline int LogPrint(const char* category, const char* format)
{
if(!LogAcceptCategory(category)) return 0;
return LogPrintStr(format);
}
static inline bool error(const char* format)
{
LogPrintStr(std::string("ERROR: ") + format + "\n");
return false;
}
void PrintException(std::exception* pex, const char* pszThread);
void PrintExceptionContinue(std::exception* pex, const char* pszThread);
void ParseString(const std::string& str, char c, std::vector<std::string>& v);
std::string FormatMoney(int64_t n, bool fPlus=false);
bool ParseMoney(const std::string& str, int64_t& nRet);
bool ParseMoney(const char* pszIn, int64_t& nRet);
std::string SanitizeString(const std::string& str);
std::vector<unsigned char> ParseHex(const char* psz);
std::vector<unsigned char> ParseHex(const std::string& str);
bool IsHex(const std::string& str);
std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid = NULL);
std::string DecodeBase64(const std::string& str);
std::string EncodeBase64(const unsigned char* pch, size_t len);
std::string EncodeBase64(const std::string& str);
std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid = NULL);
std::string DecodeBase32(const std::string& str);
std::string EncodeBase32(const unsigned char* pch, size_t len);
std::string EncodeBase32(const std::string& str);
void ParseParameters(int argc, const char*const argv[]);
bool WildcardMatch(const char* psz, const char* mask);
bool WildcardMatch(const std::string& str, const std::string& mask);
void FileCommit(FILE *fileout);
bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest);
boost::filesystem::path GetDefaultDataDir();
const boost::filesystem::path &GetDataDir(bool fNetSpecific = true);
boost::filesystem::path GetConfigFile();
boost::filesystem::path GetPidFile();
#ifndef WIN32
void CreatePidFile(const boost::filesystem::path &path, pid_t pid);
#endif
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
#ifdef WIN32
boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
#endif
void ShrinkDebugFile();
int GetRandInt(int nMax);
uint64_t GetRand(uint64_t nMax);
uint256 GetRandHash();
int64_t GetTime();
void SetMockTime(int64_t nMockTimeIn);
std::string FormatFullVersion();
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
void runCommand(std::string strCommand);
inline std::string i64tostr(int64_t n)
{
return strprintf("%d", n);
}
inline std::string itostr(int n)
{
return strprintf("%d", n);
}
inline int64_t atoi64(const char* psz)
{
#ifdef _MSC_VER
return _atoi64(psz);
#else
return strtoll(psz, NULL, 10);
#endif
}
inline int64_t atoi64(const std::string& str)
{
#ifdef _MSC_VER
return _atoi64(str.c_str());
#else
return strtoll(str.c_str(), NULL, 10);
#endif
}
inline int atoi(const std::string& str)
{
return atoi(str.c_str());
}
inline int roundint(double d)
{
return (int)(d > 0 ? d + 0.5 : d - 0.5);
}
inline int64_t roundint64(double d)
{
return (int64_t)(d > 0 ? d + 0.5 : d - 0.5);
}
inline int64_t abs64(int64_t n)
{
return (n >= 0 ? n : -n);
}
inline std::string leftTrim(std::string src, char chr)
{
std::string::size_type pos = src.find_first_not_of(chr, 0);
if(pos > 0)
src.erase(0, pos);
return src;
}
template<typename T>
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
{
std::string rv;
static const char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
rv.reserve((itend-itbegin)*3);
for(T it = itbegin; it < itend; ++it)
{
unsigned char val = (unsigned char)(*it);
if(fSpaces && it != itbegin)
rv.push_back(' ');
rv.push_back(hexmap[val>>4]);
rv.push_back(hexmap[val&15]);
}
return rv;
}
template<typename T>
inline std::string HexStr(const T& vch, bool fSpaces=false)
{
return HexStr(vch.begin(), vch.end(), fSpaces);
}
inline int64_t GetPerformanceCounter()
{
int64_t nCounter = 0;
#ifdef WIN32
QueryPerformanceCounter((LARGE_INTEGER*)&nCounter);
#else
timeval t;
gettimeofday(&t, NULL);
nCounter = (int64_t) t.tv_sec * 1000000 + t.tv_usec;
#endif
return nCounter;
}
inline int64_t GetTimeMillis()
{
return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
}
inline int64_t GetTimeMicros()
{
return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds();
}
std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
static const std::string strTimestampFormat = "%Y-%m-%d %H:%M:%S UTC";
inline std::string DateTimeStrFormat(int64_t nTime)
{
return DateTimeStrFormat(strTimestampFormat.c_str(), nTime);
}
template<typename T>
void skipspaces(T& it)
{
while (isspace(*it))
++it;
}
inline bool IsSwitchChar(char c)
{
#ifdef WIN32
return c == '-' || c == '/';
#else
return c == '-';
#endif
}
/**
* Return string argument or default value
*
* @param strArg Argument to get (e.g. "-foo")
* @param default (e.g. "1")
* @return command-line argument or default value
*/
std::string GetArg(const std::string& strArg, const std::string& strDefault);
/**
* Return integer argument or default value
*
* @param strArg Argument to get (e.g. "-foo")
* @param default (e.g. 1)
* @return command-line argument (0 if invalid number) or default value
*/
int64_t GetArg(const std::string& strArg, int64_t nDefault);
/**
* Return boolean argument or default value
*
* @param strArg Argument to get (e.g. "-foo")
* @param default (true or false)
* @return command-line argument or default value
*/
bool GetBoolArg(const std::string& strArg, bool fDefault);
/**
* Set an argument if it doesn't already have a value
*
* @param strArg Argument to set (e.g. "-foo")
* @param strValue Value (e.g. "1")
* @return true if argument gets set, false if it already had a value
*/
bool SoftSetArg(const std::string& strArg, const std::string& strValue);
/**
* Set a boolean argument if it doesn't already have a value
*
* @param strArg Argument to set (e.g. "-foo")
* @param fValue Value (e.g. false)
* @return true if argument gets set, false if it already had a value
*/
bool SoftSetBoolArg(const std::string& strArg, bool fValue);
/**
* MWC RNG of George Marsaglia
* This is intended to be fast. It has a period of 2^59.3, though the
* least significant 16 bits only have a period of about 2^30.1.
*
* @return random value
*/
extern uint32_t insecure_rand_Rz;
extern uint32_t insecure_rand_Rw;
static inline uint32_t insecure_rand(void)
{
insecure_rand_Rz=36969*(insecure_rand_Rz&65535)+(insecure_rand_Rz>>16);
insecure_rand_Rw=18000*(insecure_rand_Rw&65535)+(insecure_rand_Rw>>16);
return (insecure_rand_Rw<<16)+insecure_rand_Rz;
}
/**
* Seed insecure_rand using the random pool.
* @param Deterministic Use a determinstic seed
*/
void seed_insecure_rand(bool fDeterministic=false);
/**
* Timing-attack-resistant comparison.
* Takes time proportional to length
* of first argument.
*/
template <typename T>
bool TimingResistantEqual(const T& a, const T& b)
{
if (b.size() == 0) return a.size() == 0;
size_t accumulator = a.size() ^ b.size();
for (size_t i = 0; i < a.size(); i++)
accumulator |= a[i] ^ b[i%b.size()];
return accumulator == 0;
}
/** Median filter over a stream of values.
* Returns the median of the last N numbers
*/
template <typename T> class CMedianFilter
{
private:
std::vector<T> vValues;
std::vector<T> vSorted;
unsigned int nSize;
public:
CMedianFilter(unsigned int size, T initial_value):
nSize(size)
{
vValues.reserve(size);
vValues.push_back(initial_value);
vSorted = vValues;
}
void input(T value)
{
if(vValues.size() == nSize)
{
vValues.erase(vValues.begin());
}
vValues.push_back(value);
vSorted.resize(vValues.size());
std::copy(vValues.begin(), vValues.end(), vSorted.begin());
std::sort(vSorted.begin(), vSorted.end());
}
T median() const
{
int size = vSorted.size();
assert(size>0);
if(size & 1) // Odd number of elements
{
return vSorted[size/2];
}
else // Even number of elements
{
return (vSorted[size/2-1] + vSorted[size/2]) / 2;
}
}
int size() const
{
return vValues.size();
}
std::vector<T> sorted () const
{
return vSorted;
}
};
#ifdef WIN32
inline void SetThreadPriority(int nPriority)
{
SetThreadPriority(GetCurrentThread(), nPriority);
}
#else
#define THREAD_PRIORITY_LOWEST PRIO_MAX
#define THREAD_PRIORITY_BELOW_NORMAL 2
#define THREAD_PRIORITY_NORMAL 0
#define THREAD_PRIORITY_ABOVE_NORMAL 0
inline void SetThreadPriority(int nPriority)
{
// It's unclear if it's even possible to change thread priorities on Linux,
// but we really and truly need it for the generation threads.
#ifdef PRIO_THREAD
setpriority(PRIO_THREAD, 0, nPriority);
#else
setpriority(PRIO_PROCESS, 0, nPriority);
#endif
}
#endif
void RenameThread(const char* name);
inline uint32_t ByteReverse(uint32_t value)
{
value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
return (value<<16) | (value>>16);
}
// Standard wrapper for do-something-forever thread functions.
// "Forever" really means until the thread is interrupted.
// Use it like:
// new boost::thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 900000));
// or maybe:
// boost::function<void()> f = boost::bind(&FunctionWithArg, argument);
// threadGroup.create_thread(boost::bind(&LoopForever<boost::function<void()> >, "nothing", f, milliseconds));
template <typename Callable> void LoopForever(const char* name, Callable func, int64_t msecs)
{
std::string s = strprintf("traw-%s", name);
RenameThread(s.c_str());
LogPrintf("%s thread start\n", name);
try
{
while (1)
{
MilliSleep(msecs);
func();
}
}
catch (boost::thread_interrupted)
{
LogPrintf("%s thread stop\n", name);
throw;
}
catch (std::exception& e) {
PrintException(&e, name);
}
catch (...) {
PrintException(NULL, name);
}
}
// .. and a wrapper that just calls func once
template <typename Callable> void TraceThread(const char* name, Callable func)
{
std::string s = strprintf("traw-%s", name);
RenameThread(s.c_str());
try
{
LogPrintf("%s thread start\n", name);
func();
LogPrintf("%s thread exit\n", name);
}
catch (boost::thread_interrupted)
{
LogPrintf("%s thread interrupt\n", name);
throw;
}
catch (std::exception& e) {
PrintException(&e, name);
}
catch (...) {
PrintException(NULL, name);
}
}
#endif
|
[
"root@Razvoj-Rasa.localdomain"
] |
root@Razvoj-Rasa.localdomain
|
73949ca43fb3275bee013a63ac0efc2949728c5d
|
948f4e13af6b3014582909cc6d762606f2a43365
|
/testcases/juliet_test_suite/testcases/CWE401_Memory_Leak/s02/CWE401_Memory_Leak__new_wchar_t_02.cpp
|
a33bfcf1bb57a1ec61d4fe8e1ee1f8eb7b5b4696
|
[] |
no_license
|
junxzm1990/ASAN--
|
0056a341b8537142e10373c8417f27d7825ad89b
|
ca96e46422407a55bed4aa551a6ad28ec1eeef4e
|
refs/heads/master
| 2022-08-02T15:38:56.286555
| 2022-06-16T22:19:54
| 2022-06-16T22:19:54
| 408,238,453
| 74
| 13
| null | 2022-06-16T22:19:55
| 2021-09-19T21:14:59
| null |
UTF-8
|
C++
| false
| false
| 4,309
|
cpp
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE401_Memory_Leak__new_wchar_t_02.cpp
Label Definition File: CWE401_Memory_Leak__new.label.xml
Template File: sources-sinks-02.tmpl.cpp
*/
/*
* @description
* CWE: 401 Memory Leak
* BadSource: Allocate data using new
* GoodSource: Allocate data on the stack
* Sinks:
* GoodSink: call delete on data
* BadSink : no deallocation of data
* Flow Variant: 02 Control flow: if(1) and if(0)
*
* */
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
namespace CWE401_Memory_Leak__new_wchar_t_02
{
#ifndef OMITBAD
void bad()
{
wchar_t * data;
data = NULL;
if(1)
{
/* POTENTIAL FLAW: Allocate memory on the heap */
data = new wchar_t;
/* Initialize and make use of data */
*data = L'A';
printHexCharLine((char)*data);
}
if(1)
{
/* POTENTIAL FLAW: No deallocation */
; /* empty statement needed for some flow variants */
}
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodB2G1() - use badsource and goodsink by changing the second 1 to 0 */
static void goodB2G1()
{
wchar_t * data;
data = NULL;
if(1)
{
/* POTENTIAL FLAW: Allocate memory on the heap */
data = new wchar_t;
/* Initialize and make use of data */
*data = L'A';
printHexCharLine((char)*data);
}
if(0)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Deallocate memory */
delete data;
}
}
/* goodB2G2() - use badsource and goodsink by reversing the blocks in the second if */
static void goodB2G2()
{
wchar_t * data;
data = NULL;
if(1)
{
/* POTENTIAL FLAW: Allocate memory on the heap */
data = new wchar_t;
/* Initialize and make use of data */
*data = L'A';
printHexCharLine((char)*data);
}
if(1)
{
/* FIX: Deallocate memory */
delete data;
}
}
/* goodG2B1() - use goodsource and badsink by changing the first 1 to 0 */
static void goodG2B1()
{
wchar_t * data;
data = NULL;
if(0)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
printLine("Benign, fixed string");
}
else
{
/* FIX: Use memory allocated on the stack */
wchar_t dataGoodBuffer;
data = &dataGoodBuffer;
/* Initialize and make use of data */
*data = L'A';
printHexCharLine((char)*data);
}
if(1)
{
/* POTENTIAL FLAW: No deallocation */
; /* empty statement needed for some flow variants */
}
}
/* goodG2B2() - use goodsource and badsink by reversing the blocks in the first if */
static void goodG2B2()
{
wchar_t * data;
data = NULL;
if(1)
{
/* FIX: Use memory allocated on the stack */
wchar_t dataGoodBuffer;
data = &dataGoodBuffer;
/* Initialize and make use of data */
*data = L'A';
printHexCharLine((char)*data);
}
if(1)
{
/* POTENTIAL FLAW: No deallocation */
; /* empty statement needed for some flow variants */
}
}
void good()
{
goodB2G1();
goodB2G2();
goodG2B1();
goodG2B2();
}
#endif /* OMITGOOD */
} /* close namespace */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
using namespace CWE401_Memory_Leak__new_wchar_t_02; /* so that we can use good and bad easily */
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
|
[
"yzhang0701@gmail.com"
] |
yzhang0701@gmail.com
|
0c7722cef27c4fe978d6681e5694e0e07e4d6e31
|
26740c98f86257f71d7170d54f6f0f74400a043c
|
/Lab2/Lab2/main.cpp
|
0c230d852249493e33c085340d27f5f920757140
|
[] |
no_license
|
AlexandraRinja/LFTC
|
fee8d01ef27a16b817f2b417e705c98869bbde2f
|
299047c3d11d7c91cd72fd306e09234bff198791
|
refs/heads/master
| 2021-05-07T02:53:03.088789
| 2017-11-14T23:26:53
| 2017-11-14T23:26:53
| 110,710,237
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 171
|
cpp
|
#include <iostream>
#include "Automaton.h"
using namespace std;
int main()
{
Automaton* aut=new Automaton("in.txt");
cout<<aut->longestValidPrefix("89ll",'S');
}
|
[
"rinjaalexandra@gmail.com"
] |
rinjaalexandra@gmail.com
|
34d58e47d9032cd6ea89a7b44dbe1386cd48a1fe
|
9a3b9d80afd88e1fa9a24303877d6e130ce22702
|
/src/Providers/UNIXProviders/BasedOnView/UNIX_BasedOnView_FREEBSD.hxx
|
7cbe352cbfc2b42f3d9fc072ef79528f0aaaf6d6
|
[
"MIT"
] |
permissive
|
brunolauze/openpegasus-providers
|
3244b76d075bc66a77e4ed135893437a66dd769f
|
f24c56acab2c4c210a8d165bb499cd1b3a12f222
|
refs/heads/master
| 2020-04-17T04:27:14.970917
| 2015-01-04T22:08:09
| 2015-01-04T22:08:09
| 19,707,296
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,809
|
hxx
|
//%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor licenses this file to you under the OpenPegasus Open
// Source License; you may not use this file except in compliance with the
// License.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////
//
//%/////////////////////////////////////////////////////////////////////////
#ifdef PEGASUS_OS_FREEBSD
#ifndef __UNIX_BASEDONVIEW_PRIVATE_H
#define __UNIX_BASEDONVIEW_PRIVATE_H
#endif
#endif
|
[
"brunolauze@msn.com"
] |
brunolauze@msn.com
|
923e9d0b0c2e859dac1075f716feb2937959dce2
|
fe797a64766960ffd788906b61f3673955f18d20
|
/Problem6/main.cpp
|
e5bb30928b6ff0bed010eedab9d15f5a185345cc
|
[] |
no_license
|
bfdyoy/100EulerChallenge
|
d5cab260e7711c0c49369a2e0588c4a066d89586
|
4b8d392f839a5b4e47a2023d2576520dde76b56b
|
refs/heads/master
| 2020-12-07T06:22:39.590881
| 2020-01-21T09:11:09
| 2020-01-21T09:11:09
| 232,657,567
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 374
|
cpp
|
#include <iostream>
using namespace std;
#define MAX_NUMBER 100
int main()
{
int64_t sumSquares;
int64_t squareSum;
squareSum = ((MAX_NUMBER * (MAX_NUMBER + 1)) / 2) * ((MAX_NUMBER * (MAX_NUMBER + 1)) / 2);
sumSquares = ((MAX_NUMBER * (MAX_NUMBER + 1)) * (2 * MAX_NUMBER + 1)) / 6;
int64_t result;
result = squareSum - sumSquares;
cout << result;
return 0;
}
|
[
"danielbabiceanu@gmail.com"
] |
danielbabiceanu@gmail.com
|
acc506e86e92a55f10403e99d94f0e9bdf04d5a9
|
db1919a2ce78b4af9316f589a0a721ace6b69177
|
/src/back_end/m2dp_impl.hpp
|
02727912d7638ce4149c1740129bf6c3a624c5c9
|
[] |
no_license
|
eglrp/static_map
|
d60ba605892c55fdea1040e7da380d7a5e11e678
|
163967a88b65082f628a18db808f8b1bb04d3f9d
|
refs/heads/master
| 2020-04-07T04:45:22.765510
| 2018-11-16T05:29:09
| 2018-11-16T05:29:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,097
|
hpp
|
#pragma once
#include <cmath>
#include <algorithm>
namespace static_map{
namespace back_end{
template <typename PointType>
void M2dp<PointType>::preProcess(
const M2dp<PointType>::PointCloudSourcePtr& source )
{
// remove the shift and rotation
pcl::PCA<PointType> pca;
pca.setInputCloud( source );
Eigen::Matrix3f& vectors = pca.getEigenVectors();
Eigen::Vector4f& mean = pca.getMean();
mean_ << mean[0], mean[1], mean[2];
Eigen::Matrix4f transform;
transform.block(0,0,3,3) << vectors;
transform.block(0,3,4,1) << mean;
transform.block(3,0,1,3) << 0,0,0;
transform = transform.inverse().eval();
PointCloudSourcePtr tmp_inner_cloud( new PointCloudSource );
pcl::transformPointCloud( *source, *tmp_inner_cloud, transform );
for( auto& point: tmp_inner_cloud->points )
{
double d = getLength( point );
if( d <= max_distance_ )
inner_cloud_->push_back(point);
}
if( r_ < 1.e-6 )
{
PCL_ERROR("r is too small.\n");
return;
}
l_ = std::ceil(std::sqrt( max_distance_ / r_ ));
A_.resize( p_*q_, l_*t_);
std::cout << "max_distance_ = " << max_distance_ << " l_ = " << l_ << std::endl;
}
// template <typename PointType>
// Eigen::VectorXi M2dp<PointType>::singleViewProcess( double theta, double phi )
// {
// // normal
// Eigen::Vector3f m;
// m << std::cos(theta) * std::cos(phi), std::cos(theta) * std::sin(phi)
// , std::sin(theta);
//
// PointCloudSourcePtr projected_cloud( new PointCloudSource );
// pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients());
// coefficients->values.resize(4);
// coefficients->values[0] = m[0];
// coefficients->values[1] = m[1];
// coefficients->values[2] = m[2];
// coefficients->values[3] = 0.;
//
// // Create the filtering object
// pcl::ProjectInliers<PointType> proj;
// proj.setModelType( pcl::SACMODEL_PLANE );
// proj.setInputCloud( inner_cloud_ );
// proj.setModelCoefficients(coefficients);
// proj.filter(*projected_cloud);
//
// // create the polar PolarCoordinate
// PointCloudSourcePtr x_axis( new PointCloudSource );
// x_axis->push_back( PointType(10.,0.,0.) );
// PointCloudSourcePtr x_axis_projectory( new PointCloudSource );
// proj.setInputCloud( x_axis );
// proj.filter( *x_axis_projectory );
//
// std::function<PolarCoordinate(PointType&, PointType&)> cal_polar =
// [ this ](PointType& axis, PointType& target)
// {
// PolarCoordinate coord;
// coord.length = getLength(target);
// double cos_angle = (axis.x*target.x + axis.y*target.y + axis.z*target.z) /
// ( getLength(axis) * coord.length );
//
// // 防止计算精度造成的问题,定义域错误会造成算出的结果为 nan
// if( cos_angle > 1.0 )
// cos_angle = 1.0;
// else if ( cos_angle < -1. )
// cos_angle = -1.;
//
// coord.angle = std::acos( cos_angle );
// return coord;
// };
//
// Eigen::VectorXi row;
// PointType x_axis_point = x_axis_projectory->points[0];
// row.resize(l_*t_, 1);
// for( int i = 0; i < l_*t_; ++i )
// row[i] = 0;
// const double double_pi = M_PI * 2.;
// const double angle_step = double_pi / t_;
// std::cout << x_axis_point << std::endl;
// for( auto& point : projected_cloud->points )
// {
// PolarCoordinate coord = cal_polar(x_axis_point, point);
// if( coord.angle < 0. )
// coord.angle += double_pi;
//
// int32_t l_index = std::floor( std::sqrt( coord.length / r_ ) );
// // 防止计算精度造成的问题,对index进行最大值的限制,防止越界
// if( l_index > l_ - 1 )
// l_index = l_ - 1;
// int32_t t_index = std::floor( coord.angle / angle_step );
// if( t_index > t_ - 1 )
// t_index = t_ - 1;
// int32_t index = l_index*t_+t_index;
// // std::cout << l_*t_ << " " << index << " " << l_index << " " << t_index << " " << coord.angle << std::endl;
// row[index]++;
// }
//
// return row;
// }
} // namespace back_end
} // namespace static_map
|
[
"liuyongchuan@outlook.com"
] |
liuyongchuan@outlook.com
|
decb2cf1dd86f7e495dbea0421ff25da2df3565d
|
4304dc1eb73eba8b543272e77d7642b195161703
|
/main.cpp
|
dc0dd5c2c57e1e2ff3763550eee7ae80bcf9370f
|
[] |
no_license
|
DamDinhHiep/proj
|
7bd1c0fe0e13e0d80a0e16ff358fe99049edd44d
|
0d6755e12f589cef39da7f6b0d249e025f526536
|
refs/heads/master
| 2020-03-16T18:12:05.387162
| 2018-05-10T07:21:28
| 2018-05-10T07:21:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 922
|
cpp
|
#include <iostream>
#include <stdlib.h>
using namespace std;
#include "MaTran.h"
int main(int argc, char *argv[])
{
if (argc == 2)
{
int pass;
pass = atoi (argv[1]);
if (pass == 2)
{
int n, m;
cout << "Hello Nguyen Minh Hieu :)" << endl;
cout << "Chuong trinh nhan ma tran voi doi so." << endl;
cout << "Moi ban nhap kich co cua ma tran A[n][m]." << endl;
cout << "Moi ban nhap n : ";
cin >> n;
cout << "Moi ban nhap m : ";
cin >> m;
int A[n][m];
nhapMatran (&A[0][0], n, m);
nhanMatran (&A[0][0], pass, n, m);
cout << "Ma tran sau khi nhan voi doi so la : " << endl;
inMatran (&A[0][0], n, m);
}
}
else
{
cout << "Ban da nhap sai passwork !!!" << endl;
}
system ("pause");
return 0;
}
|
[
"="
] |
=
|
4109ac381f6bca15c92225da9dc0db0e97db054b
|
a2a36c771c513e2f202e2851e141c8d8493ee8f7
|
/cpp primer plus/chapterfiveteen/two/trycatch.h
|
4315d3136934c3ecef6ad69ee7b6cbeaea4fd3b3
|
[] |
no_license
|
XUqilian/Cproject
|
dcecc9c28e94fc7ab5a68d93bed944266578d429
|
fa73a0f05e21375a423a3d21540c7a118cef253b
|
refs/heads/master
| 2023-08-22T05:49:25.723540
| 2023-08-03T15:34:34
| 2023-08-03T15:34:34
| 237,756,845
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 448
|
h
|
#ifndef TRYCATCH_H
#define TRYCATCH_H
#include<iostream>
// #include<excption>
#include<stdexcept>
using std::cout;
using std::cin;
using std::endl;
using std::logic_error;
class erone : public logic_error
{
public:
erone(): logic_error("argment error: the parameters are opp0site numbers."){}
};
class ertwo : public logic_error
{
public:
ertwo(): logic_error("argment error: there are partmeters <= 0."){}
};
#endif
|
[
"57311647+XUqilian@users.noreply.github.com"
] |
57311647+XUqilian@users.noreply.github.com
|
a132b9fd4f56ac0dd3bcb77c17ebabca713aba07
|
5bc47dcf9ab0843b9d06bc25012bcb2f78874216
|
/1426D.cpp
|
fb8aee772285a9b9e2629b32551ff23e23df9d78
|
[] |
no_license
|
MijaTola/Codeforce
|
428f466248a4e9d42ac457aa971f681320dc5018
|
9e85803464ed192c6c643bd0f920f345503ac967
|
refs/heads/master
| 2021-01-10T16:27:12.479907
| 2020-10-14T15:00:14
| 2020-10-14T15:00:14
| 45,284,776
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 511
|
cpp
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<long long> v(n);
map<long long, int> mp;
for (int i = 0; i < n; ++i) {
cin >> v[i];
}
long long sum = 0;
int ans = 0;
mp[0]++;
for (int i = 0; i < n; ++i) {
sum += v[i];
if(mp[-sum]) {
ans++;
sum = v[i];
mp.clear();
mp[0]++;
}
mp[-sum]++;
}
cout << ans << "\n";
return 0;
}
|
[
"mijasupergamer@gmail.com"
] |
mijasupergamer@gmail.com
|
deb6cedcac0dd860ac882b9703997ebf20106fff
|
49eb0d08311529b1d2375429a9cbb5582d77fd2d
|
/src/wallet/db.h
|
fceaaa93dd87dbf77f3a66c3cb4ec93519bdc2cd
|
[
"MIT"
] |
permissive
|
mario1987/deimos
|
bcbaa7b4ed617a70c37047e6590264941b94a170
|
72cb8c33b5a6d4e09e4019602db7cea8c686d505
|
refs/heads/master
| 2020-03-19T23:11:08.313125
| 2018-06-11T23:06:30
| 2018-06-11T23:06:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,388
|
h
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The DeiMos Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DEIMOS_WALLET_DB_H
#define DEIMOS_WALLET_DB_H
#include "clientversion.h"
#include "serialize.h"
#include "streams.h"
#include "sync.h"
#include "version.h"
#include <map>
#include <string>
#include <vector>
#include <boost/filesystem/path.hpp>
#include <db_cxx.h>
static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100;
static const bool DEFAULT_WALLET_PRIVDB = true;
class CDBEnv
{
private:
bool fDbEnvInit;
bool fMockDb;
// Don't change into boost::filesystem::path, as that can result in
// shutdown problems/crashes caused by a static initialized internal pointer.
std::string strPath;
void EnvShutdown();
public:
mutable CCriticalSection cs_db;
DbEnv *dbenv;
std::map<std::string, int> mapFileUseCount;
std::map<std::string, Db*> mapDb;
CDBEnv();
~CDBEnv();
void Reset();
void MakeMock();
bool IsMock() { return fMockDb; }
/**
* Verify that database file strFile is OK. If it is not,
* call the callback to try to recover.
* This must be called BEFORE strFile is opened.
* Returns true if strFile is OK.
*/
enum VerifyResult { VERIFY_OK,
RECOVER_OK,
RECOVER_FAIL };
VerifyResult Verify(const std::string& strFile, bool (*recoverFunc)(CDBEnv& dbenv, const std::string& strFile));
/**
* Salvage data from a file that Verify says is bad.
* fAggressive sets the DB_AGGRESSIVE flag (see berkeley DB->verify() method documentation).
* Appends binary key/value pairs to vResult, returns true if successful.
* NOTE: reads the entire database into memory, so cannot be used
* for huge databases.
*/
typedef std::pair<std::vector<unsigned char>, std::vector<unsigned char> > KeyValPair;
bool Salvage(const std::string& strFile, bool fAggressive, std::vector<KeyValPair>& vResult);
bool Open(const boost::filesystem::path& path);
void Close();
void Flush(bool fShutdown);
void CheckpointLSN(const std::string& strFile);
void CloseDb(const std::string& strFile);
bool RemoveDb(const std::string& strFile);
DbTxn* TxnBegin(int flags = DB_TXN_WRITE_NOSYNC)
{
DbTxn* ptxn = NULL;
int ret = dbenv->txn_begin(NULL, &ptxn, flags);
if (!ptxn || ret != 0)
return NULL;
return ptxn;
}
};
extern CDBEnv bitdb;
/** RAII class that provides access to a Berkeley database */
class CDB
{
protected:
Db* pdb;
std::string strFile;
DbTxn* activeTxn;
bool fReadOnly;
bool fFlushOnClose;
explicit CDB(const std::string& strFilename, const char* pszMode = "r+", bool fFlushOnCloseIn=true);
~CDB() { Close(); }
public:
void Flush();
void Close();
private:
CDB(const CDB&);
void operator=(const CDB&);
protected:
template <typename K, typename T>
bool Read(const K& key, T& value)
{
if (!pdb)
return false;
// Key
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(ssKey.data(), ssKey.size());
// Read
Dbt datValue;
datValue.set_flags(DB_DBT_MALLOC);
int ret = pdb->get(activeTxn, &datKey, &datValue, 0);
memset(datKey.get_data(), 0, datKey.get_size());
if (datValue.get_data() == NULL)
return false;
// Unserialize value
try {
CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION);
ssValue >> value;
} catch (const std::exception&) {
return false;
}
// Clear and free memory
memset(datValue.get_data(), 0, datValue.get_size());
free(datValue.get_data());
return (ret == 0);
}
template <typename K, typename T>
bool Write(const K& key, const T& value, bool fOverwrite = true)
{
if (!pdb)
return false;
if (fReadOnly)
assert(!"Write called on database in read-only mode");
// Key
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(ssKey.data(), ssKey.size());
// Value
CDataStream ssValue(SER_DISK, CLIENT_VERSION);
ssValue.reserve(10000);
ssValue << value;
Dbt datValue(ssValue.data(), ssValue.size());
// Write
int ret = pdb->put(activeTxn, &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE));
// Clear memory in case it was a private key
memset(datKey.get_data(), 0, datKey.get_size());
memset(datValue.get_data(), 0, datValue.get_size());
return (ret == 0);
}
template <typename K>
bool Erase(const K& key)
{
if (!pdb)
return false;
if (fReadOnly)
assert(!"Erase called on database in read-only mode");
// Key
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(ssKey.data(), ssKey.size());
// Erase
int ret = pdb->del(activeTxn, &datKey, 0);
// Clear memory
memset(datKey.get_data(), 0, datKey.get_size());
return (ret == 0 || ret == DB_NOTFOUND);
}
template <typename K>
bool Exists(const K& key)
{
if (!pdb)
return false;
// Key
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
Dbt datKey(ssKey.data(), ssKey.size());
// Exists
int ret = pdb->exists(activeTxn, &datKey, 0);
// Clear memory
memset(datKey.get_data(), 0, datKey.get_size());
return (ret == 0);
}
Dbc* GetCursor()
{
if (!pdb)
return NULL;
Dbc* pcursor = NULL;
int ret = pdb->cursor(NULL, &pcursor, 0);
if (ret != 0)
return NULL;
return pcursor;
}
int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, bool setRange = false)
{
// Read at cursor
Dbt datKey;
unsigned int fFlags = DB_NEXT;
if (setRange) {
datKey.set_data(ssKey.data());
datKey.set_size(ssKey.size());
fFlags = DB_SET_RANGE;
}
Dbt datValue;
datKey.set_flags(DB_DBT_MALLOC);
datValue.set_flags(DB_DBT_MALLOC);
int ret = pcursor->get(&datKey, &datValue, fFlags);
if (ret != 0)
return ret;
else if (datKey.get_data() == NULL || datValue.get_data() == NULL)
return 99999;
// Convert to streams
ssKey.SetType(SER_DISK);
ssKey.clear();
ssKey.write((char*)datKey.get_data(), datKey.get_size());
ssValue.SetType(SER_DISK);
ssValue.clear();
ssValue.write((char*)datValue.get_data(), datValue.get_size());
// Clear and free memory
memset(datKey.get_data(), 0, datKey.get_size());
memset(datValue.get_data(), 0, datValue.get_size());
free(datKey.get_data());
free(datValue.get_data());
return 0;
}
public:
bool TxnBegin()
{
if (!pdb || activeTxn)
return false;
DbTxn* ptxn = bitdb.TxnBegin();
if (!ptxn)
return false;
activeTxn = ptxn;
return true;
}
bool TxnCommit()
{
if (!pdb || !activeTxn)
return false;
int ret = activeTxn->commit(0);
activeTxn = NULL;
return (ret == 0);
}
bool TxnAbort()
{
if (!pdb || !activeTxn)
return false;
int ret = activeTxn->abort();
activeTxn = NULL;
return (ret == 0);
}
bool ReadVersion(int& nVersion)
{
nVersion = 0;
return Read(std::string("version"), nVersion);
}
bool WriteVersion(int nVersion)
{
return Write(std::string("version"), nVersion);
}
bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL);
};
#endif // DEIMOS_WALLET_DB_H
|
[
"support@lipcoins.org"
] |
support@lipcoins.org
|
4ab6a8c80a4b32a7a8cd424f9ed769eb3edf26f9
|
0a9d32e059d5787f1bcb4f8d32771cc38bd20c99
|
/src/util.cpp
|
3d41913209b748d475bd70d8c400100c0aebbb2a
|
[
"MIT"
] |
permissive
|
LIMXTEC/LasVegasCoin2
|
114eb6005de7bf5d8cd8c2b4ce3e460980c0b2f9
|
31785c22a46924e2c7e1a6f3570750b335849e92
|
refs/heads/master
| 2021-09-11T19:58:41.683415
| 2018-04-11T20:50:45
| 2018-04-11T20:50:45
| 110,761,306
| 3
| 9
|
MIT
| 2018-04-11T20:50:46
| 2017-11-15T00:19:00
|
C++
|
UTF-8
|
C++
| false
| false
| 24,445
|
cpp
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2015-2017 The LasVegasCoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/lasvegascoin-config.h"
#endif
#include "util.h"
#include "allocators.h"
#include "chainparamsbase.h"
#include "random.h"
#include "serialize.h"
#include "sync.h"
#include "utilstrencodings.h"
#include "utiltime.h"
#include <stdarg.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/crypto.h> // for OPENSSL_cleanse()
#include <openssl/evp.h>
#ifndef WIN32
// for posix_fallocate
#ifdef __linux__
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#endif
#define _POSIX_C_SOURCE 200112L
#endif // __linux__
#include <algorithm>
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/stat.h>
#else
#ifdef _MSC_VER
#pragma warning(disable : 4786)
#pragma warning(disable : 4804)
#pragma warning(disable : 4805)
#pragma warning(disable : 4717)
#endif
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0501
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
#define _WIN32_IE 0x0501
#define WIN32_LEAN_AND_MEAN 1
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <io.h> /* for _commit */
#include <shlobj.h>
#endif
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp>
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/thread.hpp>
#include <openssl/conf.h>
#include <openssl/crypto.h>
#include <openssl/rand.h>
// Work around clang compilation problem in Boost 1.46:
// /usr/include/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup
// See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options
// http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION
namespace boost
{
namespace program_options
{
std::string to_internal(const std::string&);
}
} // namespace boost
using namespace std;
//VGS only features
bool fMasterNode = false;
string strMasterNodePrivKey = "";
string strMasterNodeAddr = "";
bool fLiteMode = false;
bool fEnableInstantX = true;
int nInstantXDepth = 5;
int nDarksendRounds = 2;
int nAnonymizeLasvegascoinAmount = 1000;
int nLiquidityProvider = 0;
/** Spork enforcement enabled time */
int64_t enforceMasternodePaymentsTime = 4085657524;
bool fSucessfullyLoaded = false;
bool fEnableDarksend = false;
/** All denominations used by Darksend */
std::vector<int64_t> DarKsendDenominations;
string strBudgetMode = "";
map<string, string> mapArgs;
map<string, vector<string> > mapMultiArgs;
bool fDebug = false;
bool fPrintToConsole = false;
bool fPrintToDebugLog = true;
bool fDaemon = false;
bool fServer = false;
string strMiscWarning;
bool fLogTimestamps = false;
bool fLogIPs = false;
volatile bool fReopenDebugLog = false;
/** Init OpenSSL library multithreading support */
static CCriticalSection** ppmutexOpenSSL;
void locking_callback(int mode, int i, const char* file, int line)
{
if (mode & CRYPTO_LOCK) {
ENTER_CRITICAL_SECTION(*ppmutexOpenSSL[i]);
} else {
LEAVE_CRITICAL_SECTION(*ppmutexOpenSSL[i]);
}
}
// Init
class CInit
{
public:
CInit()
{
// Init OpenSSL library multithreading support
ppmutexOpenSSL = (CCriticalSection**)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(CCriticalSection*));
for (int i = 0; i < CRYPTO_num_locks(); i++)
ppmutexOpenSSL[i] = new CCriticalSection();
CRYPTO_set_locking_callback(locking_callback);
// OpenSSL can optionally load a config file which lists optional loadable modules and engines.
// We don't use them so we don't require the config. However some of our libs may call functions
// which attempt to load the config file, possibly resulting in an exit() or crash if it is missing
// or corrupt. Explicitly tell OpenSSL not to try to load the file. The result for our libs will be
// that the config appears to have been loaded and there are no modules/engines available.
OPENSSL_no_config();
#ifdef WIN32
// Seed OpenSSL PRNG with current contents of the screen
RAND_screen();
#endif
// Seed OpenSSL PRNG with performance counter
RandAddSeed();
}
~CInit()
{
// Securely erase the memory used by the PRNG
RAND_cleanup();
// Shutdown OpenSSL library multithreading support
CRYPTO_set_locking_callback(NULL);
for (int i = 0; i < CRYPTO_num_locks(); i++)
delete ppmutexOpenSSL[i];
OPENSSL_free(ppmutexOpenSSL);
}
} instance_of_cinit;
/**
* LogPrintf() has been broken a couple of times now
* by well-meaning people adding mutexes in the most straightforward way.
* It breaks because it may be called by global destructors during shutdown.
* Since the order of destruction of static/global objects is undefined,
* defining a mutex as a global object doesn't work (the mutex gets
* destroyed, and then some later destructor calls OutputDebugStringF,
* maybe indirectly, and you get a core dump at shutdown trying to lock
* the mutex).
*/
static boost::once_flag debugPrintInitFlag = BOOST_ONCE_INIT;
/**
* We use boost::call_once() to make sure these are initialized
* in a thread-safe manner the first time called:
*/
static FILE* fileout = NULL;
static boost::mutex* mutexDebugLog = NULL;
static void DebugPrintInit()
{
assert(fileout == NULL);
assert(mutexDebugLog == NULL);
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
fileout = fopen(pathDebug.string().c_str(), "a");
if (fileout) setbuf(fileout, NULL); // unbuffered
mutexDebugLog = new boost::mutex();
}
bool LogAcceptCategory(const char* category)
{
if (category != NULL) {
if (!fDebug)
return false;
// Give each thread quick access to -debug settings.
// This helps prevent issues debugging global destructors,
// where mapMultiArgs might be deleted before another
// global destructor calls LogPrint()
static boost::thread_specific_ptr<set<string> > ptrCategory;
if (ptrCategory.get() == NULL) {
const vector<string>& categories = mapMultiArgs["-debug"];
ptrCategory.reset(new set<string>(categories.begin(), categories.end()));
// thread_specific_ptr automatically deletes the set when the thread ends.
// "lasvegascoin" is a composite category enabling all VGS-related debug output
if (ptrCategory->count(string("lasvegascoin"))) {
ptrCategory->insert(string("Darksend"));
ptrCategory->insert(string("Instantx"));
ptrCategory->insert(string("masternode"));
ptrCategory->insert(string("mnpayments"));
ptrCategory->insert(string("mnbudget"));
}
}
const set<string>& setCategories = *ptrCategory.get();
// if not debugging everything and not debugging specific category, LogPrint does nothing.
if (setCategories.count(string("")) == 0 &&
setCategories.count(string(category)) == 0)
return false;
}
return true;
}
int LogPrintStr(const std::string& str)
{
int ret = 0; // Returns total number of characters written
if (fPrintToConsole) {
// print to console
ret = fwrite(str.data(), 1, str.size(), stdout);
fflush(stdout);
} else if (fPrintToDebugLog && AreBaseParamsConfigured()) {
static bool fStartedNewLine = true;
boost::call_once(&DebugPrintInit, debugPrintInitFlag);
if (fileout == NULL)
return ret;
boost::mutex::scoped_lock scoped_lock(*mutexDebugLog);
// reopen the log file, if requested
if (fReopenDebugLog) {
fReopenDebugLog = false;
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
if (freopen(pathDebug.string().c_str(), "a", fileout) != NULL)
setbuf(fileout, NULL); // unbuffered
}
// Debug print useful for profiling
if (fLogTimestamps && fStartedNewLine)
ret += fprintf(fileout, "%s ", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()).c_str());
if (!str.empty() && str[str.size() - 1] == '\n')
fStartedNewLine = true;
else
fStartedNewLine = false;
ret = fwrite(str.data(), 1, str.size(), fileout);
}
return ret;
}
/** Interpret string as boolean, for argument parsing */
static bool InterpretBool(const std::string& strValue)
{
if (strValue.empty())
return true;
return (atoi(strValue) != 0);
}
/** Turn -noX into -X=0 */
static void InterpretNegativeSetting(std::string& strKey, std::string& strValue)
{
if (strKey.length()>3 && strKey[0]=='-' && strKey[1]=='n' && strKey[2]=='o') {
strKey = "-" + strKey.substr(3);
strValue = InterpretBool(strValue) ? "0" : "1";
}
}
void ParseParameters(int argc, const char* const argv[])
{
mapArgs.clear();
mapMultiArgs.clear();
for (int i = 1; i < argc; i++) {
std::string str(argv[i]);
std::string strValue;
size_t is_index = str.find('=');
if (is_index != std::string::npos) {
strValue = str.substr(is_index + 1);
str = str.substr(0, is_index);
}
#ifdef WIN32
boost::to_lower(str);
if (boost::algorithm::starts_with(str, "/"))
str = "-" + str.substr(1);
#endif
if (str[0] != '-')
break;
// Interpret --foo as -foo.
// If both --foo and -foo are set, the last takes effect.
if (str.length() > 1 && str[1] == '-')
str = str.substr(1);
InterpretNegativeSetting(str, strValue);
mapArgs[str] = strValue;
mapMultiArgs[str].push_back(strValue);
}
}
std::string GetArg(const std::string& strArg, const std::string& strDefault)
{
if (mapArgs.count(strArg))
return mapArgs[strArg];
return strDefault;
}
int64_t GetArg(const std::string& strArg, int64_t nDefault)
{
if (mapArgs.count(strArg))
return atoi64(mapArgs[strArg]);
return nDefault;
}
bool GetBoolArg(const std::string& strArg, bool fDefault)
{
if (mapArgs.count(strArg))
return InterpretBool(mapArgs[strArg]);
return fDefault;
}
bool SoftSetArg(const std::string& strArg, const std::string& strValue)
{
if (mapArgs.count(strArg))
return false;
mapArgs[strArg] = strValue;
return true;
}
bool SoftSetBoolArg(const std::string& strArg, bool fValue)
{
if (fValue)
return SoftSetArg(strArg, std::string("1"));
else
return SoftSetArg(strArg, std::string("0"));
}
static const int screenWidth = 79;
static const int optIndent = 2;
static const int msgIndent = 7;
std::string HelpMessageGroup(const std::string &message) {
return std::string(message) + std::string("\n\n");
}
std::string HelpMessageOpt(const std::string &option, const std::string &message) {
return std::string(optIndent,' ') + std::string(option) +
std::string("\n") + std::string(msgIndent,' ') +
FormatParagraph(message, screenWidth - msgIndent, msgIndent) +
std::string("\n\n");
}
static std::string FormatException(std::exception* pex, const char* pszThread)
{
#ifdef WIN32
char pszModule[MAX_PATH] = "";
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
#else
const char* pszModule = "lasvegascoin";
#endif
if (pex)
return strprintf(
"EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, pszThread);
else
return strprintf(
"UNKNOWN EXCEPTION \n%s in %s \n", pszModule, pszThread);
}
void PrintExceptionContinue(std::exception* pex, const char* pszThread)
{
std::string message = FormatException(pex, pszThread);
LogPrintf("\n\n************************\n%s\n", message);
fprintf(stderr, "\n\n************************\n%s\n", message.c_str());
strMiscWarning = message;
}
boost::filesystem::path GetDefaultDataDir()
{
namespace fs = boost::filesystem;
// Windows < Vista: C:\Documents and Settings\Username\Application Data\VGS
// Windows >= Vista: C:\Users\Username\AppData\Roaming\VGS
// Mac: ~/Library/Application Support/VGS
// Unix: ~/.lasvegascoin
#ifdef WIN32
// Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "LasvegascoinV2";
#else
fs::path pathRet;
char* pszHome = getenv("HOME");
if (pszHome == NULL || strlen(pszHome) == 0)
pathRet = fs::path("/");
else
pathRet = fs::path(pszHome);
#ifdef MAC_OSX
// Mac
pathRet /= "Library/Application Support";
TryCreateDirectory(pathRet);
return pathRet / "LasvegascoinV2";
#else
// Unix
return pathRet / ".lasvegascoinV2";
#endif
#endif
}
static boost::filesystem::path pathCached;
static boost::filesystem::path pathCachedNetSpecific;
static CCriticalSection csPathCached;
const boost::filesystem::path& GetDataDir(bool fNetSpecific)
{
namespace fs = boost::filesystem;
LOCK(csPathCached);
fs::path& path = fNetSpecific ? pathCachedNetSpecific : pathCached;
// This can be called during exceptions by LogPrintf(), so we cache the
// value so we don't have to do memory allocations after that.
if (!path.empty())
return path;
if (mapArgs.count("-datadir")) {
path = fs::system_complete(mapArgs["-datadir"]);
if (!fs::is_directory(path)) {
path = "";
return path;
}
} else {
path = GetDefaultDataDir();
}
if (fNetSpecific)
path /= BaseParams().DataDir();
fs::create_directories(path);
return path;
}
void ClearDatadirCache()
{
pathCached = boost::filesystem::path();
pathCachedNetSpecific = boost::filesystem::path();
}
boost::filesystem::path GetConfigFile()
{
boost::filesystem::path pathConfigFile(GetArg("-conf", "lasvegascoin.conf"));
if (!pathConfigFile.is_complete())
pathConfigFile = GetDataDir(false) / pathConfigFile;
return pathConfigFile;
}
boost::filesystem::path GetMasternodeConfigFile()
{
boost::filesystem::path pathConfigFile(GetArg("-mnconf", "masternode.conf"));
if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir() / pathConfigFile;
return pathConfigFile;
}
void ReadConfigFile(map<string, string>& mapSettingsRet,
map<string, vector<string> >& mapMultiSettingsRet)
{
boost::filesystem::ifstream streamConfig(GetConfigFile());
if (!streamConfig.good()) {
// Create empty lasvegascoin.conf if it does not exist
FILE* configFile = fopen(GetConfigFile().string().c_str(), "a");
if (configFile != NULL)
fclose(configFile);
return; // Nothing to read, so just return
}
set<string> setOptions;
setOptions.insert("*");
for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) {
// Don't overwrite existing settings so command line settings override lasvegascoin.conf
string strKey = string("-") + it->string_key;
string strValue = it->value[0];
InterpretNegativeSetting(strKey, strValue);
if (mapSettingsRet.count(strKey) == 0)
mapSettingsRet[strKey] = strValue;
mapMultiSettingsRet[strKey].push_back(strValue);
}
// If datadir is changed in .conf file:
ClearDatadirCache();
}
#ifndef WIN32
boost::filesystem::path GetPidFile()
{
boost::filesystem::path pathPidFile(GetArg("-pid", "lasvegascoind.pid"));
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
return pathPidFile;
}
void CreatePidFile(const boost::filesystem::path& path, pid_t pid)
{
FILE* file = fopen(path.string().c_str(), "w");
if (file) {
fprintf(file, "%d\n", pid);
fclose(file);
}
}
#endif
bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
{
#ifdef WIN32
return MoveFileExA(src.string().c_str(), dest.string().c_str(),
MOVEFILE_REPLACE_EXISTING) != 0;
#else
int rc = std::rename(src.string().c_str(), dest.string().c_str());
return (rc == 0);
#endif /* WIN32 */
}
/**
* Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
* Specifically handles case where path p exists, but it wasn't possible for the user to
* write to the parent directory.
*/
bool TryCreateDirectory(const boost::filesystem::path& p)
{
try {
return boost::filesystem::create_directory(p);
} catch (boost::filesystem::filesystem_error) {
if (!boost::filesystem::exists(p) || !boost::filesystem::is_directory(p))
throw;
}
// create_directory didn't create the directory, it had to have existed already
return false;
}
void FileCommit(FILE* fileout)
{
fflush(fileout); // harmless if redundantly called
#ifdef WIN32
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout));
FlushFileBuffers(hFile);
#else
#if defined(__linux__) || defined(__NetBSD__)
fdatasync(fileno(fileout));
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
fcntl(fileno(fileout), F_FULLFSYNC, 0);
#else
fsync(fileno(fileout));
#endif
#endif
}
bool TruncateFile(FILE* file, unsigned int length)
{
#if defined(WIN32)
return _chsize(_fileno(file), length) == 0;
#else
return ftruncate(fileno(file), length) == 0;
#endif
}
/**
* this function tries to raise the file descriptor limit to the requested number.
* It returns the actual file descriptor limit (which may be more or less than nMinFD)
*/
int RaiseFileDescriptorLimit(int nMinFD)
{
#if defined(WIN32)
return 2048;
#else
struct rlimit limitFD;
if (getrlimit(RLIMIT_NOFILE, &limitFD) != -1) {
if (limitFD.rlim_cur < (rlim_t)nMinFD) {
limitFD.rlim_cur = nMinFD;
if (limitFD.rlim_cur > limitFD.rlim_max)
limitFD.rlim_cur = limitFD.rlim_max;
setrlimit(RLIMIT_NOFILE, &limitFD);
getrlimit(RLIMIT_NOFILE, &limitFD);
}
return limitFD.rlim_cur;
}
return nMinFD; // getrlimit failed, assume it's fine
#endif
}
/**
* this function tries to make a particular range of a file allocated (corresponding to disk space)
* it is advisory, and the range specified in the arguments will never contain live data
*/
void AllocateFileRange(FILE* file, unsigned int offset, unsigned int length)
{
#if defined(WIN32)
// Windows-specific version
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(file));
LARGE_INTEGER nFileSize;
int64_t nEndPos = (int64_t)offset + length;
nFileSize.u.LowPart = nEndPos & 0xFFFFFFFF;
nFileSize.u.HighPart = nEndPos >> 32;
SetFilePointerEx(hFile, nFileSize, 0, FILE_BEGIN);
SetEndOfFile(hFile);
#elif defined(MAC_OSX)
// OSX specific version
fstore_t fst;
fst.fst_flags = F_ALLOCATECONTIG;
fst.fst_posmode = F_PEOFPOSMODE;
fst.fst_offset = 0;
fst.fst_length = (off_t)offset + length;
fst.fst_bytesalloc = 0;
if (fcntl(fileno(file), F_PREALLOCATE, &fst) == -1) {
fst.fst_flags = F_ALLOCATEALL;
fcntl(fileno(file), F_PREALLOCATE, &fst);
}
ftruncate(fileno(file), fst.fst_length);
#elif defined(__linux__)
// Version using posix_fallocate
off_t nEndPos = (off_t)offset + length;
posix_fallocate(fileno(file), 0, nEndPos);
#else
// Fallback version
// TODO: just write one byte per block
static const char buf[65536] = {};
fseek(file, offset, SEEK_SET);
while (length > 0) {
unsigned int now = 65536;
if (length < now)
now = length;
fwrite(buf, 1, now, file); // allowed to fail; this function is advisory anyway
length -= now;
}
#endif
}
void ShrinkDebugFile()
{
// Scroll debug.log if it's getting too big
boost::filesystem::path pathLog = GetDataDir() / "debug.log";
FILE* file = fopen(pathLog.string().c_str(), "r");
if (file && boost::filesystem::file_size(pathLog) > 10 * 1000000) {
// Restart the file with some of the end
std::vector<char> vch(200000, 0);
fseek(file, -((long)vch.size()), SEEK_END);
int nBytes = fread(begin_ptr(vch), 1, vch.size(), file);
fclose(file);
file = fopen(pathLog.string().c_str(), "w");
if (file) {
fwrite(begin_ptr(vch), 1, nBytes, file);
fclose(file);
}
} else if (file != NULL)
fclose(file);
}
#ifdef WIN32
boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate)
{
namespace fs = boost::filesystem;
char pszPath[MAX_PATH] = "";
if (SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate)) {
return fs::path(pszPath);
}
LogPrintf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n");
return fs::path("");
}
#endif
boost::filesystem::path GetTempPath()
{
#if BOOST_FILESYSTEM_VERSION == 3
return boost::filesystem::temp_directory_path();
#else
// TODO: remove when we don't support filesystem v2 anymore
boost::filesystem::path path;
#ifdef WIN32
char pszPath[MAX_PATH] = "";
if (GetTempPathA(MAX_PATH, pszPath))
path = boost::filesystem::path(pszPath);
#else
path = boost::filesystem::path("/tmp");
#endif
if (path.empty() || !boost::filesystem::is_directory(path)) {
LogPrintf("GetTempPath(): failed to find temp path\n");
return boost::filesystem::path("");
}
return path;
#endif
}
void runCommand(std::string strCommand)
{
int nErr = ::system(strCommand.c_str());
if (nErr)
LogPrintf("runCommand error: system(%s) returned %d\n", strCommand, nErr);
}
void RenameThread(const char* name)
{
#if defined(PR_SET_NAME)
// Only the first 15 characters are used (16 - NUL terminator)
::prctl(PR_SET_NAME, name, 0, 0, 0);
#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__))
// TODO: This is currently disabled because it needs to be verified to work
// on FreeBSD or OpenBSD first. When verified the '0 &&' part can be
// removed.
pthread_set_name_np(pthread_self(), name);
#elif defined(MAC_OSX) && defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
// pthread_setname_np is XCode 10.6-and-later
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
pthread_setname_np(name);
#endif
#else
// Prevent warnings for unused parameters...
(void)name;
#endif
}
void SetupEnvironment()
{
// On most POSIX systems (e.g. Linux, but not BSD) the environment's locale
// may be invalid, in which case the "C" locale is used as fallback.
#if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
try {
std::locale(""); // Raises a runtime error if current locale is invalid
} catch (const std::runtime_error&) {
setenv("LC_ALL", "C", 1);
}
#endif
// The path locale is lazy initialized and to avoid deinitialization errors
// in multithreading environments, it is set explicitly by the main thread.
// A dummy locale is used to extract the internal default locale, used by
// boost::filesystem::path, which is then used to explicitly imbue the path.
std::locale loc = boost::filesystem::path::imbue(std::locale::classic());
boost::filesystem::path::imbue(loc);
}
void SetThreadPriority(int nPriority)
{
#ifdef WIN32
SetThreadPriority(GetCurrentThread(), nPriority);
#else // WIN32
#ifdef PRIO_THREAD
setpriority(PRIO_THREAD, 0, nPriority);
#else // PRIO_THREAD
setpriority(PRIO_PROCESS, 0, nPriority);
#endif // PRIO_THREAD
#endif // WIN32
}
|
[
"apfelbaum@email.de"
] |
apfelbaum@email.de
|
a846686c5c8e13d2c4b04b66c8775ecdc7fc3534
|
8154eca670c979874d99ce9dc07d2051e428c256
|
/src/wallet/test/init_tests.cpp
|
05f0261dcf202652d7a0cf06cdd2f64712371e04
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
pocketnetteam/pocketnet.core
|
f7e9a7f1589fb71de39214013475abe6e6a68fd2
|
1bdbbc306285be11f11998827ef26b16d47d7643
|
refs/heads/0.21
| 2023-08-31T03:22:50.870853
| 2023-06-13T09:28:13
| 2023-06-13T09:28:13
| 172,682,555
| 111
| 32
|
Apache-2.0
| 2023-09-11T04:11:07
| 2019-02-26T09:43:47
|
C++
|
UTF-8
|
C++
| false
| false
| 2,802
|
cpp
|
// Copyright (c) 2018-2019 The Pocketcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/test/unit_test.hpp>
#include <noui.h>
#include <test/util/logging.h>
#include <test/util/setup_common.h>
#include <util/system.h>
#include <wallet/test/init_test_fixture.h>
BOOST_FIXTURE_TEST_SUITE(init_tests, InitWalletDirTestingSetup)
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_default)
{
SetWalletDir(m_walletdir_path_cases["default"]);
bool result = m_wallet_client->verify();
BOOST_CHECK(result == true);
fs::path walletdir = gArgs.GetArg("-walletdir", "");
fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]);
BOOST_CHECK(walletdir == expected_path);
}
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_custom)
{
SetWalletDir(m_walletdir_path_cases["custom"]);
bool result = m_wallet_client->verify();
BOOST_CHECK(result == true);
fs::path walletdir = gArgs.GetArg("-walletdir", "");
fs::path expected_path = fs::canonical(m_walletdir_path_cases["custom"]);
BOOST_CHECK(walletdir == expected_path);
}
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_does_not_exist)
{
SetWalletDir(m_walletdir_path_cases["nonexistent"]);
{
ASSERT_DEBUG_LOG("does not exist");
bool result = m_wallet_client->verify();
BOOST_CHECK(result == false);
}
}
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_directory)
{
SetWalletDir(m_walletdir_path_cases["file"]);
{
ASSERT_DEBUG_LOG("is not a directory");
bool result = m_wallet_client->verify();
BOOST_CHECK(result == false);
}
}
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_relative)
{
SetWalletDir(m_walletdir_path_cases["relative"]);
{
ASSERT_DEBUG_LOG("is a relative path");
bool result = m_wallet_client->verify();
BOOST_CHECK(result == false);
}
}
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing)
{
SetWalletDir(m_walletdir_path_cases["trailing"]);
bool result = m_wallet_client->verify();
BOOST_CHECK(result == true);
fs::path walletdir = gArgs.GetArg("-walletdir", "");
fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]);
BOOST_CHECK(walletdir == expected_path);
}
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing2)
{
SetWalletDir(m_walletdir_path_cases["trailing2"]);
bool result = m_wallet_client->verify();
BOOST_CHECK(result == true);
fs::path walletdir = gArgs.GetArg("-walletdir", "");
fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]);
BOOST_CHECK(walletdir == expected_path);
}
BOOST_AUTO_TEST_SUITE_END()
|
[
"andrew300399@gmail.com"
] |
andrew300399@gmail.com
|
6591e63b8c4e63790adbc1fbb992fa7d561bba14
|
e5a078e8d7f1da417da6315f7f4080fee16dac0e
|
/DP/trianglePath.cpp
|
d885bca520a2f67007c1df18c753c909f934025e
|
[] |
no_license
|
Aierhaimian/data-structures
|
2fcdab5a31b9d910e39d558ff83918b71d378c27
|
7b3bfbd7f9b12104a2f899258830c05114c0ec22
|
refs/heads/master
| 2020-04-01T14:24:12.688295
| 2019-09-08T07:33:19
| 2019-09-08T07:33:19
| 153,292,819
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,585
|
cpp
|
#include <iostream>
#include <vector>
#include <climits>
using namespace std;
class TrianglePath
{
public:
TrianglePath() = default;
TrianglePath(int h, vector<vector<int>> &vec)
:hight(h), triNum(vec)
{
minPath = INT_MAX;
states.resize(vec.size());
for (size_t i=0; i<vec.size(); i++)
states[i].resize(vec[hight].size());
mem.resize(vec.size());
for (size_t i=0; i<vec.size(); i++)
mem[i].resize(vec[hight].size());
for (size_t i=0; i<vec.size(); i++)
for (size_t j=0; j<vec[i].size(); j++)
mem[i][j] = false;
}
void Backtracking(int i, int j, int val)
{
if (i == hight)
{
if (val < minPath)
minPath = val;
return;
}
Backtracking(i+1, j, val+triNum[i+1][j]);
Backtracking(i+1, j+1, val+triNum[i+1][j+1]);
}
void memBT(int i, int j, int val)
{
if (i == hight)
{
if (val < minPath)
minPath = val;
return;
}
if (mem[i][j])
return;
mem[i][j] = true;
memBT(i+1, j, val+triNum[i+1][j]);
memBT(i+1, j+1, val+triNum[i+1][j+1]);
}
void DP()
{
for (size_t i=0; i<triNum.size(); i++)
for (size_t j=0; j<triNum[i].size(); j++)
states[i][j] = -1;
states[0][0] = triNum[0][0];
for (size_t i=1; i<triNum.size(); i++)
{
for (size_t j=0; j< triNum[i].size(); j++)
{
if (j == 0)
states[i][j] = states[i-1][j] + triNum[i][j];
else if (j == triNum[i].size() - 1)
states[i][j] = states[i-1][j-1] + triNum[i][j];
else
states[i][j] = min(states[i-1][j-1]+triNum[i][j], states[i-1][j]+triNum[i][j]);
}
}
for (size_t i=0; i<states[hight].size(); i++)
{
if (states[hight][i] < minPath)
minPath = states[hight][i];
}
}
int get()
{
return minPath;
}
private:
int minPath;
int hight;
vector<vector<int>> triNum;
vector<vector<bool>> mem;
vector<vector<int>> states;
};
int main()
{
vector<vector<int>> vec = {{5}, {7,8}, {2,3,4}, {4,9,6,1}, {2,7,9,4,5}};
TrianglePath tri(vec.size()-1, vec);
//tri.Backtracking(0, 0, vec[0][0]);
//tri.memBT(0, 0, vec[0][0]);
tri.DP();
cout << tri.get() << endl;
return 0;
}
|
[
"scu_duzexu@163.com"
] |
scu_duzexu@163.com
|
a146b54d18297c9055b3b3ff8cc6bda0ccd2799a
|
f239c72fe8724f07a58583ddb19db49b794f8171
|
/d05/ex00/Bureaucrat.cpp
|
5aa73b73ff1a23510933a18a6260c64e210ec49f
|
[] |
no_license
|
ncollie42/cpp_piscine
|
8723774d1dfd817a4dfffda691616992dbb4aa7f
|
ddd9e477a32f76c886558a405946a601f1407f33
|
refs/heads/master
| 2020-06-20T12:19:55.292088
| 2019-07-27T05:49:12
| 2019-07-27T05:49:12
| 197,119,840
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,184
|
cpp
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Bureaucrat.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncollie <ncollie@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/22 12:20:00 by ncollie #+# #+# */
/* Updated: 2019/07/22 17:18:00 by ncollie ### ########.fr */
/* */
/* ************************************************************************** */
#include "Bureaucrat.hpp"
Bureaucrat::Bureaucrat(void)
{
return;
}
Bureaucrat::Bureaucrat(int grade, std::string name)
{
if (grade > MIN_SCORE)
throw Bureaucrat::GradeTooLowException();
if (grade < MAX_SCORE)
throw Bureaucrat::GradeTooHighException();
_grade = grade;
_name = name;
return;
}
Bureaucrat::~Bureaucrat(void)
{
return;
}
Bureaucrat::Bureaucrat(Bureaucrat const &src)
{
*this = src;
}
Bureaucrat &Bureaucrat::operator=(Bureaucrat const &rhs)
{
if (this == &rhs)
return (*this);
return (*this);
}
std::ostream &operator<<(std::ostream &out, Bureaucrat const &rhs)
{
std::string tmp = " Bureaucrat grade ";
out << rhs.getName() << tmp.c_str() << rhs.getGrade();
return out;
}
void Bureaucrat::upGrade()
{
if ((_grade - 1) < MAX_SCORE)
throw Bureaucrat::GradeTooHighException();
else
_grade--;
}
void Bureaucrat::downGrade()
{
if ((_grade + 1) > MIN_SCORE)
throw Bureaucrat::GradeTooLowException();
else
_grade++;
}
int Bureaucrat::getGrade() const
{
return _grade;
}
std::string Bureaucrat::getName() const
{
return _name;
}
const char *Bureaucrat::GradeTooHighException::what(void) const throw()
{
return ("Score is too high");
}
const char *Bureaucrat::GradeTooLowException::what(void) const throw()
{
return ("Score is too low");
}
|
[
"ncollie42@gmail.com"
] |
ncollie42@gmail.com
|
d5a0352ed8c9b7ead357645c2a3b439b80c4ee47
|
bdd8150e5113560b7589fd3c9c6a2e19994ce476
|
/src/p50.cc
|
3c525b338708e9c9ae455807ad95fdcee18116e9
|
[] |
no_license
|
qclijun/LeetCode
|
1da1db8e886864194bfe9ded2c593971b3ffb768
|
3465ba23d4d3961422f4ff775e978d75981b1bb9
|
refs/heads/master
| 2020-03-28T15:53:06.467738
| 2018-10-10T23:54:30
| 2018-10-10T23:54:30
| 148,634,759
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,136
|
cc
|
/*
* p50.cc
*
* Created on: 2018年9月29日
* Author: jun
*/
/*
* 50. Pow(x, n)
* Implement pow(x, n), which calculates x raised to the power n (xn).
Example 1:
Input: 2.00000, 10
Output: 1024.00000
Example 2:
Input: 2.10000, 3
Output: 9.26100
Example 3:
Input: 2.00000, -2
Output: 0.25000
Explanation: 2-2 = 1/22 = 1/4 = 0.25
Note:
-100.0 < x < 100.0
n is a 32-bit signed integer, within the range [−231, 231 − 1]
*/
#include <iostream>
#include <limits>
using namespace std;
// time complexity O(logn), space complexity O(1)
class Solution {
public:
double myPow(double x, int n) {
if(x == 1.0) return 1.0;
if(x == 0.0) return 0.0;
if(n < 0) return 1.0 / myPow(x, -n - 1) / x ;
return myPow0(x, n);
}
private:
double myPow0(double x, int n){
if(n == 0) return 1.0;
double val = myPow0(x, n/2);
if(n % 2 == 0){
return val * val;
}else{
return val * val * x;
}
}
};
int main(){
int n = numeric_limits<int>::min();
cout << "min: " << n << endl;
int n2 = -n - 1;
cout << "max: " << n2 << endl;
int n3 = -n;
cout << n3 << endl;
}
|
[
"jun235@163.com"
] |
jun235@163.com
|
13cc0acdc69ae320a42e511eb53385eb6d7f7db4
|
89a33e9e60a25dd5d3cbdc27799d2381dec91805
|
/src/pubsub_node/src/test.cpp
|
348654b0417a7dacd628aa41fb9dbd05630ad762
|
[] |
no_license
|
Hgp2Huge/hello_ros2
|
17e1d0cb89a83fe6fb79b3b3f74757b0b93c0ac0
|
076d3930f749b9095acea374f24298f6c2f3ac32
|
refs/heads/master
| 2023-04-30T05:34:01.856505
| 2020-04-29T09:31:25
| 2020-04-29T09:31:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 558
|
cpp
|
//
// Created by zhihui on 1/14/20.
//
#include "pubsub_node/publisher.h"
#include "pubsub_node/subscriber.h"
int main(int argc, char *argv[]) {
rclcpp::init(argc, argv);
rclcpp::executors::MultiThreadedExecutor exec;
// magic!
rclcpp::NodeOptions options;
options.use_intra_process_comms(true);
auto publisher = std::make_shared<Publisher>(options);
auto subscriber = std::make_shared<Subscriber>(options);
exec.add_node(publisher);
exec.add_node(subscriber);
exec.spin();
rclcpp::shutdown();
return 0;
}
|
[
"707060335@qq.com"
] |
707060335@qq.com
|
ec96e9e11870d7cbfdc1cab2b7f653e6a44780ac
|
b91f2ff2ddaa281efa79c9e35c5ecef2b1fbb23c
|
/example/ws_call_test/proto_server_main.cpp
|
cc844457c47c6c048fec4af941ce3d3555821f7c
|
[] |
no_license
|
qduyang/fiber_kit
|
2bdeadc76f9fabd2eb6421b779a49ea570a900a7
|
a4f4715ea74f92e324e940ea4f53727c4c6a1362
|
refs/heads/master
| 2020-04-30T15:35:53.228096
| 2019-01-30T01:28:50
| 2019-01-30T01:28:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 660
|
cpp
|
#include "proto_test_server.hpp"
#include "fiber_frame_context.hpp"
int main()
{
FiberFrameContext& frame_cxt = FiberFrameContext::instance();
frame_cxt.run_thread_count = 3;
frame_cxt.init();
init_logging("./proto_server.log", boost::log::trivial::debug);
TestServer server("0.0.0.0", 38080);
server.start();
//模拟停止
// boost::fibers::fiber([&server, &frame_cxt](){
// boost::this_fiber::sleep_for(std::chrono::seconds(15));
// server.stop();
// std::cout << "server stop()\n";
// frame_cxt.notify_stop();
// }).detach();
frame_cxt.wait();
return 0;
}
|
[
"jxfwinter@test.com"
] |
jxfwinter@test.com
|
f9b647ef6afda2707dd7220bd4972a269971be16
|
2aa246a5d70450e47f6a61f7fe5efb074f43335d
|
/src/testApp.h
|
91af23e506af0f4ef020d54da9522f8c3e73baf0
|
[] |
no_license
|
breeeew/trash
|
45011775cc63ed123b62c04c8d6b59d6dd42a1f7
|
9d713eaf3d813ef7a40d31fe14e9cd847df553b9
|
refs/heads/master
| 2021-01-02T09:27:49.188574
| 2013-01-10T20:21:42
| 2013-01-10T20:21:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 675
|
h
|
#pragma once
#include "ofMain.h"
#include <list>
class PhCircle{
public:
void setup();
void update();
void draw();
ofPoint point;
ofColor color;
};
class testApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
list <PhCircle> list_of_circles;
};
|
[
"phoenix@phoenix.(none)"
] |
phoenix@phoenix.(none)
|
a384b0593f99859b97ada8611b63c1452b015b2a
|
c13e7cf93b2681c591da8f224da62cb028d73306
|
/Memo/Memo/MainFrm.cpp
|
5dfa4b126d2d6881809681b22dc2f92e31f7995e
|
[] |
no_license
|
dazzul94/CppWindowProgramming
|
3986890b16d85c132f9deaa5a2f41e32eeb622e0
|
fabca6c1fde1aec8b6ad35f925ae166f3849485d
|
refs/heads/master
| 2020-05-04T16:38:59.851878
| 2019-06-15T10:27:19
| 2019-06-15T10:27:19
| 179,283,780
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,978
|
cpp
|
// MainFrm.cpp: CMainFrame 클래스의 구현
//
#include "pch.h"
#include "framework.h"
#include "Memo.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMainFrame
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR, // 상태 줄 표시기
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
// CMainFrame 생성/소멸
CMainFrame::CMainFrame() noexcept
{
// TODO: 여기에 멤버 초기화 코드를 추가합니다.
}
CMainFrame::~CMainFrame()
{
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("도구 모음을 만들지 못했습니다.\n");
return -1; // 만들지 못했습니다.
}
if (!m_wndStatusBar.Create(this))
{
TRACE0("상태 표시줄을 만들지 못했습니다.\n");
return -1; // 만들지 못했습니다.
}
m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT));
// TODO: 도구 모음을 도킹할 수 없게 하려면 이 세 줄을 삭제하십시오.
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: CREATESTRUCT cs를 수정하여 여기에서
// Window 클래스 또는 스타일을 수정합니다.
return TRUE;
}
// CMainFrame 진단
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
CMDIFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
CMDIFrameWnd::Dump(dc);
}
#endif //_DEBUG
// CMainFrame 메시지 처리기
|
[
"32053060+dazzul94@users.noreply.github.com"
] |
32053060+dazzul94@users.noreply.github.com
|
2aeb947baa0031cac8626cbb55b70c74f2f9c495
|
9ead30376893877e9d7747073462b86c7c5fdb5b
|
/Projects/Blink/Plugins/visit/dayreserve.h
|
40e8f90b4a07067f70854c6183f734fd1587c017
|
[] |
no_license
|
MarcoBueno1/qrad
|
3633398fd333a232e36a603dc471f6f1d122a1af
|
9215ef47e065345deb92b2139489092aa6ff94e2
|
refs/heads/master
| 2020-04-08T16:58:27.383242
| 2019-07-19T19:40:28
| 2019-07-19T19:40:28
| 159,544,545
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 694
|
h
|
#ifndef DAYRESERVE_H
#define DAYRESERVE_H
#include <QDialog>
#include <QSqlQueryModel>
#include <QDate>
#include "column2delegate.h"
namespace Ui {
class DayReserve;
}
class DayReserve : public QDialog
{
Q_OBJECT
public:
explicit DayReserve(QWidget *parent = 0);
~DayReserve();
int Exec(int CommonId, QString CommonName, QDate day);
public slots:
void NewClicked(bool);
void CenceledClicked(bool);
void EditClicked(bool);
private:
Ui::DayReserve *ui;
QSqlQueryModel *m_model;
int m_CommonId;
QString m_CommonName;
QDate m_day;
ColumnCenter *m_CenterDelegate;
ColumnLeft *m_LeftDelegate;
void RunSQL();
};
#endif // DAYRESERVE_H
|
[
"bueno.marco@gmail.com"
] |
bueno.marco@gmail.com
|
58dfcf41ef8868cde364b724e25b1bfd29d9f7f0
|
0b8a62bf49b97e89cc74dd8ebe04facb90e55a1f
|
/src/pupil_tracker/CurveGazingRecorder.cpp
|
88e636f550c94d265de7f7be3dd0cb3a2814f5c5
|
[] |
no_license
|
saranyasubramaniam/eye-tracking
|
83a6b783b532b3e036b0b1ceba5522797c8ea315
|
fd148e5c386ebd23d1d5968b9f7642c1e0749e56
|
refs/heads/master
| 2021-01-18T08:22:17.323261
| 2015-01-14T05:16:19
| 2015-01-14T05:16:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,761
|
cpp
|
#include <jzp_lib/jzplib_all.h>
#include <boost/filesystem.hpp>
#include <boost/math/special_functions.hpp>
#include <boost/thread.hpp>
#include "boost/date_time/posix_time/posix_time.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/lockfree/spsc_queue.hpp>
#include <deque>
namespace fs = boost::filesystem;
using namespace boost::posix_time;
string windowName = "Gaze Training Recorder";
Size fullSize(1366,720);
Mat whitebg(fullSize,CV_8UC3,Scalar::all(255));
Mat bg = whitebg.clone();
vector<Point2f> controlPoints;
vector<int> pointsBezierOrders;
vector<Point2f> curvePoints;
vector<Point2f> animatePoints;
int divs = 40;
int currentBezierOrder = 4;
int distancePerFrame = 5;
int frameRate = 30;
int currentAnimationPoint = -1;
Scalar lineColor(0,0,0);
Scalar endPointColor(0,0,0);
Scalar controlPointColor(255,0,0);
int captureRate = 60;
int writeRate = 40;
double cameraWidth, cameraHeight;
Mat capturedFrame;
boost::lockfree::spsc_queue<Mat, boost::lockfree::capacity<512> > matQueue;
bool aminationFinishSign = false;
bool animationFinished = false;
bool captureFinishSign = false;
bool writeFinishSign = false;
bool writeEnabled = false;
void readPathData(fs::path filePath) {
FileStorage storage;
storage.open(filePath.string(), FileStorage::READ);
storage["points"] >> controlPoints;
storage["pointsOrders"] >> pointsBezierOrders;
storage["distancePerFrame"] >> distancePerFrame;
storage["frameRate"] >> frameRate;
writeRate = frameRate;
storage.release();
curvePoints = generalizedBezierCurve(controlPoints,pointsBezierOrders,1.0/divs);
animatePoints = curveAnimateSequence(curvePoints, distancePerFrame);
}
int setupTrajectories(fs::path pathDirPath, vector<fs::path>& trajectoryFiles) {
if (!fs::exists(pathDirPath) || !fs::is_directory(pathDirPath)) {
cout<<" trajectoies_set_dir doesn't exist."<<endl;
return 0;
}
trajectoryFiles = listFilesWithExtension(pathDirPath, "", "yaml");
if (trajectoryFiles.empty()) {
cout<<" trajectoies_set_dir doesn't contain trajectory files (.yaml file)."<<endl;
return 0;
} else {
return 1;
}
}
void setupCameraCapture(VideoCapture *capture, Mat* frame) {
cameraWidth = capture->get(CV_CAP_PROP_FRAME_WIDTH);
cameraHeight = capture->get(CV_CAP_PROP_FRAME_HEIGHT);
cout << "camera width = " << cameraWidth << endl <<"height = "<< cameraHeight << endl;
boost::thread captureThread(videoCaptureThreadFun,capture, frame, captureRate*2, &captureFinishSign);
}
void animateFuc(Mat* bg) {
cout<<"totally "<<animatePoints.size()<<" animation frames, frame rate: "<<frameRate<<endl;
boost::posix_time::ptime startTime = microsec_clock::local_time();
FPScontroller fpsDelayer(frameRate);
writeEnabled = true;
for (int i = 0; i<animatePoints.size(); i++) {
Mat temp ;
whitebg.copyTo(temp);
circle(temp, animatePoints[i], 15, Scalar(0,0,255),-1,CV_AA);
temp.copyTo((*bg));
currentAnimationPoint = i;
fpsDelayer.controlledDelay();
}
writeEnabled = false;
boost::posix_time::ptime endTime = microsec_clock::local_time();
boost::posix_time::time_duration td = endTime - startTime;
cout<<"animation duration"<<td<<endl;
animationFinished = true;
}
void showPrelude() {
Mat current;
whitebg.copyTo(current);
circle(current, animatePoints[0], 10, Scalar(0,0,255),-1,CV_AA);
drawStringAtPoint(current, "Ready to go? Press [y]es !", Point(100,100));
while(true) {
imshow(windowName,current);
int k = waitKey()%256;
if (k == 'y' || k=='Y') {
break;
}
}
}
void invoke_HeadPoseAdviser(fs::path userProfileDir,fs::path cameraFile) {
cout<<"------- Invoking ./HeadPoseAdviser ----------"<<endl;
string cmdpath = (fs::current_path()/"HeadPoseAdviser").string();
string cmd = cmdpath+" "+userProfileDir.string()+" "+cameraFile.string();
system(cmd.c_str());
cout<<"------- Invocation Done ------------------------"<<endl;
}
void showResultPreviewAndSave(fs::path videoFilePath, fs::path userProfilePath,fs::path cameraFile) {
cout<<"------- Invoking ./PupilTracker ----------------"<<endl;
string cmdpath = (fs::current_path()/"PupilTracker").string();
string cmd = cmdpath+" "+userProfilePath.string()+" "+cameraFile.string()+" "+videoFilePath.string();
system(cmd.c_str());
cout<<"------- Invocation Done ------------------------"<<endl;
}
bool showResult() {
Mat current;
whitebg.copyTo(current);
drawStringAtPoint(current, "Proceed to next one? press [y]es! Wanna repeat last one? press [r]epeat!", Point(100,100));
bool result = true;
while(true) {
imshow(windowName,current);
int k = waitKey()%256;
if (k == 'y' || k=='Y') {
break;
}
if (k == 'r' || k=='R') {
result = false;
break;
}
}
return result;
}
void writeAnimationTraceFile(string path) {
Mat points = Mat(animatePoints).reshape(1);
CSVFileWriter logger;
for (int j = 0; j < points.rows; j++) {
logger.addSlot(points.row(j));
}
logger.writeToFile(fs::path(path));
}
void showAnimationAndRecordVideo(fs::path trajectoryfile, fs::path userProfilePath, fs::path cameraProfilePath, fs::path outputfilePrefix) {
readPathData(trajectoryfile);
showPrelude();
// start up camera
captureFinishSign = false;
writeFinishSign = false;
VideoCapture cam(0);
setupCameraCapture(&cam, &capturedFrame);
//setup video writer
string videoOutputFileName = outputfilePrefix.string()+".avi";
string animationTraceOutputFileName =outputfilePrefix.string()+".groundtruth";
writeAnimationTraceFile(animationTraceOutputFileName);
// mp4v is small , acceptable.
// mjpg is big, slow, but clear.
// divx is small, slower than mp4v, less acceptable.
string ccstr = "mp4v";
VideoWriter videoWriter(videoOutputFileName,CV_FOURCC(ccstr[0],ccstr[1],ccstr[2],ccstr[3]), writeRate, cvSize((int)cameraWidth,(int)cameraHeight));
BlockDelayer::delay_milisec(50);
boost::thread frameBufferThread(videoBufferThreadFun,&matQueue,&capturedFrame,writeRate,0,&writeEnabled,&writeFinishSign);
BlockDelayer::delay_milisec(50);
boost::thread frameWriteThread(videoWriterThreadFun,&videoWriter,&matQueue,writeRate,&writeEnabled,&writeFinishSign);
// then start the animation.
Mat bgcopy = whitebg.clone();
animationFinished = false;
BlockDelayer::delay_milisec(50);
boost::thread animateThread(animateFuc,&bgcopy);
for(;;){
imshow(windowName, bgcopy);
waitKey(1);
if (animationFinished) {
break;
}
}
writeFinishSign = true;
frameBufferThread.join();
frameWriteThread.join();
waitKey(50);
captureFinishSign = true;
waitKey(50);
showResultPreviewAndSave(fs::path(videoOutputFileName),userProfilePath,cameraProfilePath);
}
int main (int argc, char *argv[])
{
if (argc < 4) {
cout<<argv[0]<<" "<<"trajectoies_set_dir user_profile_dir camera_profile output_dir"<<endl;
return 0;
}
fs::path pathDirPath(argv[1]);
fs::path userProfilePath(argv[2]);
fs::path cameraProfilePath(argv[3]);
fs::path resultsBasePath(argv[4]);
vector<fs::path> trajectoryFiles;
if (setupTrajectories(pathDirPath,trajectoryFiles) == 0) {
return 0;
}
ptime presentPtime = second_clock::local_time();
string dateString = simpleDataFormat(presentPtime, "%Y_%m_%d");
fs::path resultDirPath = resultsBasePath / string(userProfilePath.filename().string());
fs::create_directories(resultDirPath);
copyDirRecursively(userProfilePath, resultDirPath/"user_profile");
//setup
namedWindow(windowName,CV_WINDOW_AUTOSIZE | CV_WINDOW_KEEPRATIO |CV_GUI_NORMAL);
moveWindow(windowName, 0, 0);
// setWindowProperty(windowName, CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN);
deque<fs::path> trainQueue;
for (int i = 0; i < trajectoryFiles.size(); i++) {
trainQueue.push_back(trajectoryFiles[i]);
}
while (trainQueue.empty() == false) {
invoke_HeadPoseAdviser(userProfilePath,cameraProfilePath);
fs::path currentPath =trainQueue.front();
trainQueue.pop_front();
fs::path outputfilepath = resultDirPath / currentPath.stem().string();
cout<<outputfilepath<<endl;
showAnimationAndRecordVideo(currentPath, userProfilePath, cameraProfilePath, outputfilepath);
if (showResult() == false) {
trainQueue.push_front(currentPath);
}
}
}
|
[
"jiangzp.cs@gmail.com"
] |
jiangzp.cs@gmail.com
|
6caddc90a60293480b75db894e3b1b004c632bd3
|
c46aa3cd0401b9855498d515d911ec7bdba6b221
|
/bot/weapon/SemiAutoBuilder.h
|
279f607aeb4f80d184b8e73bef0d407be9e644fb
|
[] |
no_license
|
taiyungwang/hl2_goap_bot
|
0c9634c75db1331d340f2971eb2de426aad9fdf1
|
7cb4713f4961893e9cd101cd7c627263c0e0c9af
|
refs/heads/master
| 2023-06-07T12:47:42.789429
| 2023-05-28T04:57:55
| 2023-05-28T04:57:55
| 165,223,234
| 7
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 247
|
h
|
#pragma once
#include "ReloadableWeaponBuilder.h"
class SemiAutoBuilder: public ReloadableWeaponBuilder<> {
public:
SemiAutoBuilder(float damage1) {
this->damage1 = damage1;
}
virtual std::shared_ptr<Weapon> build(edict_t* weap) const;
};
|
[
"ttwang@ttwang-PC.lan"
] |
ttwang@ttwang-PC.lan
|
80a9eaf183555932b19783df0428100630a51173
|
c67838253a735ad108ee8fc0b23505b6d0160ac2
|
/mmixvm/CommonImpl.cpp
|
be1d13ad50859c54df8f132545263af7e5f65295
|
[] |
no_license
|
xuhd/llvmmmix
|
d70c6af85444ba6c82774ceae9efab7c56eb1335
|
5da01418ae94e0eaeb4ccbae279535b31715e730
|
refs/heads/master
| 2021-01-15T20:57:16.913870
| 2013-07-02T17:45:45
| 2013-07-02T17:45:45
| 41,653,524
| 2
| 0
| null | 2015-08-31T03:21:42
| 2015-08-31T03:21:42
| null |
UTF-8
|
C++
| false
| false
| 28,844
|
cpp
|
#include "stdafx.h"
#include "Util.h"
#include "MmixEmit.h"
#include "MmixEmitPvt.h"
#include "MmixDef.h"
using llvm::LLVMContext;
using llvm::Module;
using llvm::Type;
using llvm::PointerType;
using llvm::Value;
using llvm::PHINode;
using llvm::Argument;
using llvm::Function;
using llvm::BasicBlock;
using llvm::IRBuilder;
using llvm::ArrayRef;
using llvm::SwitchInst;
using llvm::Twine;
using llvm::cast;
using namespace MmixLlvm::Util;
using namespace MmixLlvm::Private;
using MmixLlvm::MXByte;
using MmixLlvm::MXTetra;
using MmixLlvm::MXOcta;
namespace {
const MXTetra REGION_BIT_OFFSET = 61;
const MXOcta TWO_ENABLED_BITS = 3i64;
const MXOcta ADDR_MASK = ~(TWO_ENABLED_BITS << REGION_BIT_OFFSET);
};
Value* MmixLlvm::Private::emitAdjust64Endianness(VerticeContext& vctx, IRBuilder<>& builder, Value* val) {
Function* f = vctx.getModuleFunction("Adjust64EndiannessImpl");
Value* args[] = { val };
return builder.CreateCall(f, ArrayRef<Value*>(args, args + 1));
}
Value* MmixLlvm::Private::emitAdjust32Endianness(VerticeContext& vctx, IRBuilder<>& builder, Value* val) {
Value* b0 = builder.CreateLShr(val, builder.getInt32(24));
Value* b1 = builder.CreateAnd(builder.CreateLShr(val, builder.getInt32(16)), builder.getInt32(0xFF));
Value* b2 = builder.CreateAnd(builder.CreateLShr(val, builder.getInt32(8)), builder.getInt32(0xFF));
Value* b3 = builder.CreateAnd(val, builder.getInt32(0xFF));
Value* q0 = builder.CreateShl(b3, builder.getInt32(24));
Value* q1 = builder.CreateOr(q0, builder.CreateShl(b2, builder.getInt32(16)));
Value* q2 = builder.CreateOr(q1, builder.CreateShl(b1, builder.getInt32(8)));
Value* q3 = builder.CreateOr(q2, b0);
return q3;
}
Value* MmixLlvm::Private::emitAdjust16Endianness(VerticeContext& vctx, IRBuilder<>& builder, Value* val) {
Value* b0 = builder.CreateLShr(val, builder.getInt16(8));
Value* b1 = builder.CreateAnd(val, builder.getInt16(0xFF));
Value* q0 = builder.CreateShl(b1, builder.getInt16(8));
Value* q1 = builder.CreateOr(q0, b0);
return q1;
}
Value* MmixLlvm::Private::emitQueryArithFlag(VerticeContext& vctx, IRBuilder<>& builder, MmixLlvm::ArithFlag flag) {
Value* ra = vctx.getSpRegister(rA);
return builder.CreateICmpNE(builder.CreateAnd(ra, builder.getInt64(flag)), builder.getInt64(0));
}
namespace {
void saveRegisters(VerticeContext& vctx, IRBuilder<>& builder)
{
LLVMContext& ctx = vctx.getLctx();
std::vector<MXByte> dirtyRegs(vctx.getDirtyRegisters());
for (auto itr = dirtyRegs.begin(); itr != dirtyRegs.end(); ++itr) {
Value* regGlob = builder.CreateSelect(
builder.CreateICmpULT(builder.getInt64(*itr),
vctx.getSpRegister(MmixLlvm::rG)),
vctx.getModuleVar("RegisterStackTop"),
vctx.getModuleVar("RegisterStackBase"));
builder.CreateStore(
vctx.getRegister(*itr),
builder.CreateGEP(
builder.CreateLoad(regGlob, false),
builder.getInt32(*itr)));
}
Value* specialRegisters = vctx.getModuleVar("SpecialRegisters");
std::vector<MmixLlvm::SpecialReg> dirtySRegs(vctx.getDirtySpRegisters());
for (auto itr = dirtySRegs.begin(); itr != dirtySRegs.end(); ++itr) {
Value* ix[2];
ix[0] = builder.getInt32(0);
ix[1] = builder.getInt32(*itr);
builder.CreateStore(
vctx.getSpRegister(*itr),
builder.CreatePointerCast(
builder.CreateGEP(specialRegisters, ArrayRef<Value*>(ix, ix + 2)), Type::getInt64PtrTy(ctx)));
}
}
}
void MmixLlvm::Private::flushRegistersCache(VerticeContext& vctx, llvm::IRBuilder<>& builder) {
saveRegisters(vctx, builder);
vctx.markAllClean();
}
void MmixLlvm::Private::assignRegister(VerticeContext& vctx, IRBuilder<>& builder, MXByte reg, Value* value) {
Value* rG = vctx.getSpRegister(MmixLlvm::rG);
Value* rL = vctx.getSpRegister(MmixLlvm::rL);
Value* reg0 = builder.getInt64(reg);
Value* cond = builder.CreateAnd(builder.CreateICmpUGE(reg0, rL), builder.CreateICmpULT(reg0, rG));
vctx.assignSpRegister(MmixLlvm::rL, builder.CreateSelect(cond, builder.CreateAdd(reg0, builder.getInt64(1LL)), rL));
vctx.assignRegister(reg, value);
}
void MmixLlvm::Private::emitLeaveVerticeViaTrip(VerticeContext& vctx, llvm::IRBuilder<>& builder,
llvm::Value* rY, llvm::Value* rZ, MXOcta target)
{
boost::shared_ptr<VerticeContext> branch(vctx.makeBranch());
branch->assignSpRegister(MmixLlvm::rW, builder.getInt64(branch->getXPtr() + 4));
Value* r255 = branch->getRegister(255);
branch->assignSpRegister(MmixLlvm::rB, r255);
Value* rJ = branch->getSpRegister(MmixLlvm::rJ);
branch->assignRegister(255, rJ);
branch->assignSpRegister(MmixLlvm::rX,
builder.CreateOr(builder.CreateShl(builder.getInt64(1), 63), builder.getInt64(branch->getInstr())));
branch->assignSpRegister(MmixLlvm::rY, rY);
branch->assignSpRegister(MmixLlvm::rZ, rZ);
saveRegisters(*branch, builder);
std::vector<Argument*> args(vctx.getVerticeArgs());
builder.CreateStore(builder.getInt64(branch->getXPtr()), args[0]);
builder.CreateStore(builder.getInt64(target), args[1]);
builder.CreateRetVoid();
}
void MmixLlvm::Private::emitLeaveVerticeViaJump(VerticeContext& vctx, IRBuilder<>& builder, MXOcta target)
{
saveRegisters(vctx, builder);
std::vector<Argument*> args(vctx.getVerticeArgs());
builder.CreateStore(builder.getInt64(vctx.getXPtr()), args[0]);
builder.CreateStore(builder.getInt64(target), args[1]);
builder.CreateRetVoid();
}
void MmixLlvm::Private::emitPushRegsAndLeaveVerticeViaJump(VerticeContext&vctx,
MXByte xarg, IRBuilder<>& builder, MXOcta target)
{
LLVMContext& ctx = vctx.getLctx();
Value* rLVal = vctx.getSpRegister(MmixLlvm::rL);
Value* k = builder.getInt64(xarg);
saveRegisters(vctx, builder);
Value* callParams[] = {
builder.CreateLoad(vctx.getModuleVar("ThisRef")),
builder.CreateAdd(k, builder.getInt64(1)),
vctx.getSpRegister(MmixLlvm::rL)
};
builder.CreateCall(vctx.getModuleFunction("PushRegStack"), ArrayRef<Value*>(callParams, callParams + 3));
Value* newRlVal = builder.CreateSelect(
builder.CreateICmpULT(k, rLVal),
builder.CreateSub(rLVal, builder.CreateAdd(k, builder.getInt64(1))),
builder.CreateAdd(k, builder.getInt64(1)));
Value* specialRegisters = vctx.getModuleVar("SpecialRegisters");
Value* ix[2];
ix[0] = builder.getInt32(0);
ix[1] = builder.getInt32((int)MmixLlvm::rL);
builder.CreateStore(
newRlVal,
builder.CreatePointerCast(
builder.CreateGEP(specialRegisters, ArrayRef<Value*>(ix, ix + 2)), Type::getInt64PtrTy(ctx)));
std::vector<Argument*> args(vctx.getVerticeArgs());
builder.CreateStore(builder.getInt64(vctx.getXPtr()), args[0]);
builder.CreateStore(builder.getInt64(target), args[1]);
builder.CreateRetVoid();
}
void MmixLlvm::Private::emitPushRegsAndLeaveVerticeViaIndirectJump(VerticeContext&vctx,
MXByte xarg, IRBuilder<>& builder, Value* target)
{
LLVMContext& ctx = vctx.getLctx();
Value* rLVal = vctx.getSpRegister(MmixLlvm::rL);
Value* k = builder.getInt64(xarg);
saveRegisters(vctx, builder);
Value* callParams[] = {
builder.CreateLoad(vctx.getModuleVar("ThisRef")),
builder.CreateAdd(k, builder.getInt64(1)),
vctx.getSpRegister(MmixLlvm::rL)
};
builder.CreateCall(vctx.getModuleFunction("PushRegStack"), ArrayRef<Value*>(callParams, callParams + 3));
Value* newRlVal = builder.CreateSelect(
builder.CreateICmpULT(k, rLVal),
builder.CreateSub(rLVal, builder.CreateAdd(k, builder.getInt64(1))),
builder.CreateAdd(k, builder.getInt64(1)));
Value* specialRegisters = vctx.getModuleVar("SpecialRegisters");
Value* ix[2];
ix[0] = builder.getInt32(0);
ix[1] = builder.getInt32((int)MmixLlvm::rL);
builder.CreateStore(
newRlVal,
builder.CreatePointerCast(
builder.CreateGEP(specialRegisters, ArrayRef<Value*>(ix, ix + 2)), Type::getInt64PtrTy(ctx)));
std::vector<Argument*> args(vctx.getVerticeArgs());
builder.CreateStore(builder.getInt64(vctx.getXPtr()), args[0]);
builder.CreateStore(target, args[1]);
builder.CreateRetVoid();
}
void MmixLlvm::Private::emitLeaveVerticeViaPop(VerticeContext& vctx, IRBuilder<>& builder,
Value* retainLocalRegs, Value* target)
{
LLVMContext& ctx = vctx.getLctx();
saveRegisters(vctx, builder);
Value* newRlVal = builder.CreateAlloca(builder.getInt64Ty());
Value* callParams[] = {
builder.CreateLoad(vctx.getModuleVar("ThisRef")),
retainLocalRegs,
newRlVal
};
Value* specialRegisters = vctx.getModuleVar("SpecialRegisters");
builder.CreateCall(vctx.getModuleFunction("PopRegStack"), ArrayRef<Value*>(callParams, callParams + 3));
std::vector<Argument*> args(vctx.getVerticeArgs());
Value* ix[2];
ix[0] = builder.getInt32(0);
ix[1] = builder.getInt32((int)MmixLlvm::rL);
builder.CreateStore(
builder.CreateLoad(newRlVal, false),
builder.CreatePointerCast(
builder.CreateGEP(specialRegisters, ArrayRef<Value*>(ix, ix + 2)), Type::getInt64PtrTy(ctx)));
builder.CreateStore(builder.getInt64(vctx.getXPtr()), args[0]);
builder.CreateStore(target, args[1]);
builder.CreateRetVoid();
}
void MmixLlvm::Private::emitLeaveVerticeViaIndirectJump(VerticeContext& vctx, IRBuilder<>& builder, Value* target)
{
saveRegisters(vctx, builder);
std::vector<Argument*> args(vctx.getVerticeArgs());
builder.CreateStore(builder.getInt64(vctx.getXPtr()), args[0]);
builder.CreateStore(target, args[1]);
builder.CreateRetVoid();
}
Value* MmixLlvm::Private::emitFetchMem(VerticeContext& vctx, IRBuilder<>& builder, Value* theA, Type* ty)
{
Value* glob = vctx.getModuleVar("AddressTranslateTable");
Value* ix[2];
ix[0] = builder.getInt32(0);
ix[1] = builder.CreateIntCast(
builder.CreateAnd(
builder.CreateLShr(theA, REGION_BIT_OFFSET),
builder.getInt64(TWO_ENABLED_BITS)),
Type::getInt32Ty(vctx.getLctx()), false);
Value *attVal = builder.CreateLoad(builder.CreateGEP(glob, ArrayRef<Value*>(ix, ix + 2)));
glob = vctx.getModuleVar("Memory");
Value* normAddr = builder.CreateIntCast(builder.CreateAnd(theA, builder.getInt64(ADDR_MASK)), Type::getInt32Ty(vctx.getLctx()), false);
ix[1] = builder.CreateAdd(normAddr, attVal);
Value* targetPtr = builder.CreatePointerCast(
builder.CreateGEP(glob, ArrayRef<Value*>(ix, ix + 2)), PointerType::get(ty, 0));
return builder.CreateLoad(targetPtr);
}
void MmixLlvm::Private::emitStoreMem(VerticeContext& vctx, IRBuilder<>& builder, Value* theA, Value* val)
{
Value* glob = vctx.getModuleVar("AddressTranslateTable");
Value* ix[2];
ix[0] = builder.getInt32(0);
ix[1] = builder.CreateIntCast(
builder.CreateAnd(
builder.CreateLShr(theA, REGION_BIT_OFFSET),
builder.getInt64(TWO_ENABLED_BITS)),
Type::getInt32Ty(vctx.getLctx()), false);
Value *attVal = builder.CreateLoad(builder.CreateGEP(glob, ArrayRef<Value*>(ix, ix + 2)));
glob = vctx.getModuleVar("Memory");
Value* normAddr = builder.CreateIntCast(
builder.CreateAnd(theA, builder.getInt64(ADDR_MASK)),
Type::getInt32Ty(vctx.getLctx()), false);
ix[1] = builder.CreateAdd(normAddr, attVal);
Value* targetPtr = builder.CreatePointerCast(
builder.CreateGEP(glob, ArrayRef<Value*>(ix, ix + 2)), (*(*val).getType()).getPointerTo());
builder.CreateStore(val, targetPtr);
}
MXOcta MmixLlvm::Private::getArithTripVector(ArithFlag flag) {
switch (flag) {
case MmixLlvm::X:
return 128;
case MmixLlvm::Z:
return 112;
case MmixLlvm::U:
return 96;
case MmixLlvm::O:
return 80;
case MmixLlvm::I:
return 64;
case MmixLlvm::W:
return 48;
case MmixLlvm::V:
return 32;
case MmixLlvm::D:
return 16;
default:
return 0;
}
}
void MmixLlvm::Private::debugInt64(VerticeContext& vctx, IRBuilder<>& builder, Value* val) {
Value* callParams[] = { val };
builder.CreateCall(vctx.getModuleFunction("DebugInt64"), ArrayRef<Value*>(callParams, callParams + 1));
}
void MmixLlvm::Private::emitInstruction(VerticeContext& vctx, IRBuilder<>& builder) {
MXTetra instr = vctx.getInstr();
MXByte o0 = (MXByte) (instr >> 24);
MXByte xarg = (MXByte) ((instr >> 16) & 0xff);
MXByte yarg = (MXByte) ((instr >> 8) & 0xff);
MXByte zarg = (MXByte) (instr & 0xff);
switch(o0) {
case MmixLlvm::LDO:
emitLdo(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::LDOI:
emitLdoi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::LDT:
emitLdt(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::LDTI:
emitLdti(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::LDW:
emitLdw(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::LDWI:
emitLdwi(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::LDB:
emitLdb(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::LDBI:
emitLdbi(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::LDOU:
emitLdo(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::LDOUI:
emitLdoi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::LDTU:
emitLdt(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::LDTUI:
emitLdti(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::LDWU:
emitLdw(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::LDWUI:
emitLdwi(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::LDBU:
emitLdb(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::LDBUI:
emitLdbi(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::LDHT:
emitLdht(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::LDHTI:
emitLdhti(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::GET:
emitGet(vctx, builder, xarg, zarg);
break;
case MmixLlvm::PUT:
emitPut(vctx, builder, xarg, zarg, false);
break;
case MmixLlvm::PUTI:
emitPut(vctx, builder, xarg, zarg, true);
break;
case MmixLlvm::STO:
emitSto(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STOI:
emitStoi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STT:
emitStt(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STTI:
emitStti(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STW:
emitStw(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STWI:
emitStwi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STB:
emitStb(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STBI:
emitStbi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STOU:
emitSto(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STTU:
emitSttu(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STWU:
emitStwu(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STBU:
emitStbu(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STOUI:
emitStoi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STTUI:
emitSttui(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STWUI:
emitStwui(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STBUI:
emitStbui(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STHT:
emitStht(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STHTI:
emitSthti(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STCO:
emitStco(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::STCOI:
emitStcoi(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::ADD:
emitAdd(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ADDI:
emitAdd(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ADDU:
emitAddu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ADDUI:
emitAddu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::_2ADDU:
emit2Addu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::_2ADDUI:
emit2Addu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::_4ADDU:
emit4Addu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::_4ADDUI:
emit4Addu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::_8ADDU:
emit8Addu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::_8ADDUI:
emit8Addu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::_16ADDU:
emit16Addu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::_16ADDUI:
emit16Addu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SUB:
emitSub(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SUBI:
emitSub(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SUBU:
emitSubu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SUBUI:
emitSubu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::MUL:
emitMul(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::MULI:
emitMul(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::DIV:
emitDiv(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::DIVI:
emitDiv(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::MULU:
emitMulu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::MULUI:
emitMulu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::DIVU:
emitDivu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::DIVUI:
emitDivu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::NEG:
emitNeg(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::NEGI:
emitNeg(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::NEGU:
emitNegu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::NEGUI:
emitNegu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SL:
emitSl(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SLI:
emitSl(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SR:
emitSr(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SRI:
emitSr(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SLU:
emitSlu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SLUI:
emitSlu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SRU:
emitSru(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SRUI:
emitSru(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CMP:
emitCmp(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CMPI:
emitCmp(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CMPU:
emitCmpu(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CMPUI:
emitCmpu(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSN:
emitCsn(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSNI:
emitCsn(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSZ:
emitCsz(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSZI:
emitCsz(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSP:
emitCsp(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSPI:
emitCsp(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSOD:
emitCsod(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSODI:
emitCsod(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSNN:
emitCsnn(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSNNI:
emitCsnn(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSNZ:
emitCsnz(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSNZI:
emitCsnz(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSNP:
emitCsnp(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSNPI:
emitCsnp(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::CSEV:
emitCsev(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::CSEVI:
emitCsev(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSN:
emitZsn(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSNI:
emitZsn(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSZ:
emitZsz(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSZI:
emitZsz(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSP:
emitZsp(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSPI:
emitZsp(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSOD:
emitZsod(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSODI:
emitZsod(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSNN:
emitZsnn(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSNNI:
emitZsnn(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSNZ:
emitZsnz(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSNZI:
emitZsnz(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSNP:
emitZsnp(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSNPI:
emitZsnp(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ZSEV:
emitZsev(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ZSEVI:
emitZsev(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::AND:
emitAnd(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ANDI:
emitAnd(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::OR:
emitOr(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ORI:
emitOr(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::XOR:
emitXor(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::XORI:
emitXor(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ANDN:
emitAndn(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ANDNI:
emitAndn(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::ORN:
emitOrn(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::ORNI:
emitOrn(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::NAND:
emitNand(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::NANDI:
emitNand(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::NOR:
emitNor(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::NORI:
emitNor(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::NXOR:
emitNxor(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::NXORI:
emitNxor(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::MUX:
emitMux(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::MUXI:
emitMux(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SADD:
emitSadd(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::SADDI:
emitSadd(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::MOR:
emitMor(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::MORI:
emitMor(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::MXOR:
emitMxor(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::MXORI:
emitMxor(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::SETH:
emitSeth(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::SETMH:
emitSetmh(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::SETML:
emitSetml(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::SETL:
emitSetl(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::INCH:
emitInch(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::INCMH:
emitIncmh(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::INCML:
emitIncml(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::INCL:
emitIncl(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ORH:
emitOrh(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ORMH:
emitOrmh(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ORML:
emitOrml(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ORL:
emitOrl(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ANDNH:
emitAndnh(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ANDNMH:
emitAndnmh(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ANDNML:
emitAndnml(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::ANDNL:
emitAndnl(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg);
break;
case MmixLlvm::TRIP:
emitTrip(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::TRAP:
emitTrap(vctx, builder, xarg, yarg, zarg);
break;
case MmixLlvm::GETA:
emitGeta(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg, false);
break;
case MmixLlvm::GETAB:
emitGeta(vctx, builder, xarg, ((MXWyde)yarg << 8) | zarg, true);
break;
case MmixLlvm::JMP:
emitJmp(vctx, builder, ((MXTetra)xarg << 16) | ((MXTetra)yarg << 8) | zarg, false);
break;
case MmixLlvm::JMPB:
emitJmp(vctx, builder, ((MXTetra)xarg << 16) | ((MXTetra)yarg << 8) | zarg, true);
break;
case MmixLlvm::BN:
emitBn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BNB:
emitBn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BZ:
emitBz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BZB:
emitBz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BP:
emitBp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BPB:
emitBp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BOD:
emitBod(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BODB:
emitBod(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BNN:
emitBnn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BNNB:
emitBnn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BNZ:
emitBnz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BNZB:
emitBnz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BNP:
emitBnp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BNPB:
emitBnp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::BEV:
emitBev(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::BEVB:
emitBev(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBN:
emitBn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBNB:
emitBn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBZ:
emitBz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBZB:
emitBz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBP:
emitBp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBPB:
emitBp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBOD:
emitBod(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBODB:
emitBod(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBNN:
emitBnn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBNNB:
emitBnn(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBNZ:
emitBnz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBNZB:
emitBnz(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBNP:
emitBnp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBNPB:
emitBnp(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::PBEV:
emitBev(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PBEVB:
emitBev(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::GO:
emitGo(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::GOI:
emitGo(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::PUSHGO:
emitPushgo(vctx, builder, xarg, yarg, zarg, false);
break;
case MmixLlvm::PUSHGOI:
emitPushgo(vctx, builder, xarg, yarg, zarg, true);
break;
case MmixLlvm::PUSHJ:
emitPushj(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, false);
break;
case MmixLlvm::PUSHJB:
emitPushj(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg, true);
break;
case MmixLlvm::POP:
emitPop(vctx, builder, xarg, ((MXWyde) yarg << 8) | zarg);
break;
default:
assert(0 && "Not implemented");
}
}
|
[
"sergey.zykov@gmail.com"
] |
sergey.zykov@gmail.com
|
dcfd786361945ef945b90e9913fa596cfcf3610f
|
a231d56beb3cc2bbe2c2f1992bc410c6af02ef02
|
/hphp/runtime/vm/translator/hopt/ir.cpp
|
a1e68ce964b8715897d602d6eead54d03b21b6cd
|
[
"LicenseRef-scancode-unknown-license-reference",
"PHP-3.01",
"Zend-2.0"
] |
permissive
|
sclin/hiphop-php
|
ac0fb069c6c7d3ad954b15a883860de3829fb2b2
|
6434422e85d52f5614fba310e0a9e62cf8c370b4
|
refs/heads/master
| 2020-12-25T10:08:41.300200
| 2013-03-10T13:03:46
| 2013-03-12T04:19:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 37,930
|
cpp
|
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/
#include "runtime/vm/translator/hopt/ir.h"
#include <algorithm>
#include <cstring>
#include <forward_list>
#include <sstream>
#include <type_traits>
#include "folly/Format.h"
#include "folly/Traits.h"
#include "util/disasm.h"
#include "util/trace.h"
#include "runtime/base/string_data.h"
#include "runtime/vm/runtime.h"
#include "runtime/vm/stats.h"
#include "runtime/vm/translator/hopt/irfactory.h"
#include "runtime/vm/translator/hopt/linearscan.h"
#include "runtime/vm/translator/hopt/cse.h"
#include "runtime/vm/translator/hopt/simplifier.h"
namespace HPHP { namespace VM { namespace JIT {
#define IRT(name, ...) const Type Type::name(Type::k##name);
IR_TYPES
#undef IRT
std::string Type::toString() const {
// Try to find an exact match to a predefined type
# define IRT(name, ...) if (*this == name) return #name;
IR_TYPES
# undef IRT
// Concat all of the primitive types in the custom union type
std::vector<std::string> types;
# define IRT(name, ...) if (name.subtypeOf(*this)) types.push_back(#name);
IRT_PRIMITIVE
# undef IRT
return folly::format("{{{}}}", folly::join('|', types)).str();
}
std::string Type::debugString(Type t) {
return t.toString();
}
Type Type::fromString(const std::string& str) {
static hphp_string_map<Type> types;
static bool init = false;
if (UNLIKELY(!init)) {
# define IRT(name, ...) types[#name] = name;
IR_TYPES
# undef IRT
init = true;
}
return mapGet(types, str, Type::None);
}
TRACE_SET_MOD(hhir);
namespace {
enum OpcodeFlag : uint64_t {
NoFlags = 0x0000,
HasDest = 0x0001,
CanCSE = 0x0002,
Essential = 0x0004,
MemEffects = 0x0008,
CallsNative = 0x0010,
ConsumesRC = 0x0020,
ProducesRC = 0x0040,
MayModifyRefs = 0x0080,
Rematerializable = 0x0100, // TODO: implies HasDest
MayRaiseError = 0x0200,
Terminal = 0x0400, // has no next instruction
NaryDest = 0x0800, // has 0 or more destinations
HasExtra = 0x1000,
Passthrough = 0x2000,
KillsSources = 0x4000,
};
#define NF 0
#define C CanCSE
#define E Essential
#define N CallsNative
#define PRc ProducesRC
#define CRc ConsumesRC
#define Refs MayModifyRefs
#define Rm Rematerializable
#define Er MayRaiseError
#define Mem MemEffects
#define T Terminal
#define P Passthrough
#define K KillsSources
#define ND 0
#define D(n) HasDest
#define DofS(n) HasDest
#define DUnbox(n) HasDest
#define DBox(n) HasDest
#define DParam HasDest
#define DLabel NaryDest
#define DVector HasDest
#define DPtrToParam HasDest
#define DBuiltin HasDest
struct {
const char* name;
uint64_t flags;
} OpInfo[] = {
#define O(name, dsts, srcs, flags) \
{ #name, \
(OpHasExtraData<name>::value ? HasExtra : 0) | \
dsts | (flags) \
},
IR_OPCODES
#undef O
{ 0 }
};
#undef NF
#undef C
#undef E
#undef PRc
#undef CRc
#undef Refs
#undef Rm
#undef Er
#undef Mem
#undef T
#undef P
#undef K
#undef ND
#undef D
#undef DofS
#undef DUnbox
#undef DBox
#undef DParam
#undef DLabel
#undef DBuiltin
/*
* dispatchExtra translates from runtime values for the Opcode enum
* into compile time types. The goal is to call a `targetFunction'
* that is overloaded on the extra data type structs.
*
* The purpose of the MAKE_DISPATCHER layer is to weed out Opcode
* values that have no associated extra data.
*
* Basically this is doing dynamic dispatch without a vtable in
* IRExtraData, instead using the Opcode tag from the associated
* instruction to discriminate the runtime type.
*
* Note: functions made with this currently only make sense to call if
* it's already known that the opcode has extra data. If you call it
* for one that doesn't, you'll get an abort. Generally hasExtra()
* should be checked first.
*/
#define MAKE_DISPATCHER(name, rettype, targetFunction) \
template<bool HasExtra, Opcode opc> struct name { \
template<class... Args> \
static rettype go(IRExtraData* vp, Args&&...) { not_reached(); } \
}; \
template<Opcode opc> struct name<true,opc> { \
template<class... Args> \
static rettype go(IRExtraData* vp, Args&&... args) { \
return targetFunction( \
static_cast<typename IRExtraDataType<opc>::type*>(vp), \
std::forward<Args>(args)... \
); \
} \
};
template<
class RetType,
template<bool, Opcode> class Dispatcher,
class... Args
>
RetType dispatchExtra(Opcode opc, IRExtraData* data, Args&&... args) {
#define O(opcode, dstinfo, srcinfo, flags) \
case opcode: \
return Dispatcher< \
OpHasExtraData<opcode>::value, \
opcode \
>::go(data, std::forward<Args>(args)...);
switch (opc) { IR_OPCODES default: not_reached(); }
#undef O
not_reached();
}
FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(has_hash, hash);
FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(has_equals, equals);
FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(has_clone, clone);
FOLLY_CREATE_HAS_MEMBER_FN_TRAITS(has_show, show);
template<class T>
typename std::enable_if<
has_hash<T,size_t () const>::value,
size_t
>::type hashExtraImpl(T* t) { return t->hash(); }
size_t hashExtraImpl(IRExtraData*) {
// This probably means an instruction was marked CanCSE but its
// extra data had no hash function.
always_assert(!"attempted to hash extra data that didn't "
"provide a hash function");
}
template<class T>
typename std::enable_if<
has_equals<T,bool (T const&) const>::value ||
has_equals<T,bool (T) const>::value,
bool
>::type equalsExtraImpl(T* t, IRExtraData* o) {
return t->equals(*static_cast<T*>(o));
}
bool equalsExtraImpl(IRExtraData*, IRExtraData*) {
// This probably means an instruction was marked CanCSE but its
// extra data had no equals function.
always_assert(!"attempted to compare extra data that didn't "
"provide an equals function");
}
// Clone using a data-specific clone function.
template<class T>
typename std::enable_if<
has_clone<T,T* (Arena&) const>::value,
T*
>::type cloneExtraImpl(T* t, Arena& arena) {
return t->clone(arena);
}
// Use the copy constructor if no clone() function was supplied.
template<class T>
typename std::enable_if<
!has_clone<T,T* (Arena&) const>::value,
T*
>::type cloneExtraImpl(T* t, Arena& arena) {
return new (arena) T(*t);
}
template<class T>
typename std::enable_if<
has_show<T,std::string () const>::value,
std::string
>::type showExtraImpl(T* t) { return t->show(); }
std::string showExtraImpl(IRExtraData*) { return "..."; }
MAKE_DISPATCHER(HashDispatcher, size_t, hashExtraImpl);
size_t hashExtra(Opcode opc, IRExtraData* data) {
return dispatchExtra<size_t,HashDispatcher>(opc, data);
}
MAKE_DISPATCHER(EqualsDispatcher, bool, equalsExtraImpl);
bool equalsExtra(Opcode opc, IRExtraData* data, IRExtraData* other) {
return dispatchExtra<bool,EqualsDispatcher>(opc, data, other);
}
MAKE_DISPATCHER(CloneDispatcher, IRExtraData*, cloneExtraImpl);
IRExtraData* cloneExtra(Opcode opc, IRExtraData* data, Arena& a) {
return dispatchExtra<IRExtraData*,CloneDispatcher>(opc, data, a);
}
MAKE_DISPATCHER(ShowDispatcher, std::string, showExtraImpl);
std::string showExtra(Opcode opc, IRExtraData* data) {
return dispatchExtra<std::string,ShowDispatcher>(opc, data);
}
}
IRInstruction::IRInstruction(Arena& arena, const IRInstruction* inst, IId iid)
: m_op(inst->m_op)
, m_typeParam(inst->m_typeParam)
, m_numSrcs(inst->m_numSrcs)
, m_numDsts(inst->m_numDsts)
, m_iid(iid)
, m_id(0)
, m_srcs(m_numSrcs ? new (arena) SSATmp*[m_numSrcs] : nullptr)
, m_dst(nullptr)
, m_taken(nullptr)
, m_block(nullptr)
, m_tca(nullptr)
, m_extra(inst->m_extra ? cloneExtra(getOpcode(), inst->m_extra, arena)
: nullptr)
{
std::copy(inst->m_srcs, inst->m_srcs + inst->m_numSrcs, m_srcs);
setTaken(inst->m_taken);
}
const char* opcodeName(Opcode opcode) { return OpInfo[opcode].name; }
static bool opcodeHasFlags(Opcode opcode, uint64_t flags) {
return OpInfo[opcode].flags & flags;
}
bool IRInstruction::hasExtra() const {
return opcodeHasFlags(getOpcode(), HasExtra) && m_extra;
}
bool IRInstruction::hasDst() const {
return opcodeHasFlags(getOpcode(), HasDest);
}
bool IRInstruction::naryDst() const {
return opcodeHasFlags(getOpcode(), NaryDest);
}
bool IRInstruction::isNative() const {
return opcodeHasFlags(getOpcode(), CallsNative);
}
bool IRInstruction::producesReference() const {
return opcodeHasFlags(getOpcode(), ProducesRC);
}
bool IRInstruction::isRematerializable() const {
return opcodeHasFlags(getOpcode(), Rematerializable);
}
bool IRInstruction::hasMemEffects() const {
return opcodeHasFlags(getOpcode(), MemEffects) || mayReenterHelper();
}
bool IRInstruction::canCSE() const {
auto canCSE = opcodeHasFlags(getOpcode(), CanCSE);
// Make sure that instructions that are CSE'able can't produce a
// reference count or consume reference counts.
assert(!canCSE || !producesReference());
assert(!canCSE || !consumesReferences());
return canCSE && !mayReenterHelper();
}
bool IRInstruction::consumesReferences() const {
return opcodeHasFlags(getOpcode(), ConsumesRC);
}
bool IRInstruction::consumesReference(int srcNo) const {
if (!consumesReferences()) {
return false;
}
// Special case StMem, StMemNT, StProp, and StPropNT.
// These instructions only consume the value operand.
if ((m_op == StMem || m_op == StMemNT) && srcNo == 0) {
// StMem[NT] <pointer>, <value>
return false;
}
if ((m_op == StProp || m_op == StPropNT) && (srcNo == 0 || srcNo == 1)) {
// StProp[NT] <base>, <offset>, <value>
return false;
}
return true;
}
bool IRInstruction::mayModifyRefs() const {
Opcode opc = getOpcode();
// DecRefNZ does not have side effects other than decrementing the ref
// count. Therefore, its MayModifyRefs should be false.
if (opc == DecRef) {
auto type = getSrc(0)->getType();
if (isControlFlowInstruction()) {
// If the decref has a target label, then it exits if the destructor
// has to be called, so it does not have any side effects on the main
// trace.
return false;
}
if (!type.canRunDtor()) {
return false;
}
}
return opcodeHasFlags(opc, MayModifyRefs) || mayReenterHelper();
}
bool IRInstruction::mayRaiseError() const {
return opcodeHasFlags(getOpcode(), MayRaiseError) || mayReenterHelper();
}
bool IRInstruction::isEssential() const {
Opcode opc = getOpcode();
if (opc == DecRefNZ) {
// If the source of a DecRefNZ is not an IncRef, mark it as essential
// because we won't remove its source as well as itself.
// If the ref count optimization is turned off, mark all DecRefNZ as
// essential.
if (!RuntimeOption::EvalHHIREnableRefCountOpt ||
getSrc(0)->getInstruction()->getOpcode() != IncRef) {
return true;
}
}
return isControlFlowInstruction() ||
opcodeHasFlags(opc, Essential) ||
mayReenterHelper();
}
bool IRInstruction::isTerminal() const {
return opcodeHasFlags(getOpcode(), Terminal);
}
bool IRInstruction::isPassthrough() const {
return opcodeHasFlags(getOpcode(), Passthrough);
}
SSATmp* IRInstruction::getPassthroughValue() const {
assert(isPassthrough());
assert(m_op == IncRef || m_op == GuardType || m_op == Mov);
return getSrc(0);
}
bool IRInstruction::killsSources() const {
return opcodeHasFlags(getOpcode(), KillsSources);
}
bool IRInstruction::killsSource(int idx) const {
if (!killsSources()) return false;
assert(m_op == DecRef);
assert(idx == 0);
return true;
}
bool IRInstruction::mayReenterHelper() const {
if (isCmpOp(getOpcode())) {
return cmpOpTypesMayReenter(getOpcode(),
getSrc(0)->getType(),
getSrc(1)->getType());
}
// Not necessarily actually false; this is just a helper for other
// bits.
return false;
}
SSATmp* IRInstruction::getDst(unsigned i) const {
assert(naryDst() && i < m_numDsts);
return &m_dst[i];
}
DstRange IRInstruction::getDsts() {
return Range<SSATmp*>(m_dst, m_numDsts);
}
Range<const SSATmp*> IRInstruction::getDsts() const {
return Range<const SSATmp*>(m_dst, m_numDsts);
}
Opcode negateQueryOp(Opcode opc) {
assert(isQueryOp(opc));
switch (opc) {
case OpGt: return OpLte;
case OpGte: return OpLt;
case OpLt: return OpGte;
case OpLte: return OpGt;
case OpEq: return OpNeq;
case OpNeq: return OpEq;
case OpSame: return OpNSame;
case OpNSame: return OpSame;
case InstanceOf: return NInstanceOf;
case NInstanceOf: return InstanceOf;
case InstanceOfBitmask: return NInstanceOfBitmask;
case NInstanceOfBitmask: return InstanceOfBitmask;
case IsType: return IsNType;
case IsNType: return IsType;
default: always_assert(0);
}
}
Opcode queryCommuteTable[] = {
OpLt, // OpGt
OpLte, // OpGte
OpGt, // OpLt
OpGte, // OpLte
OpEq, // OpEq
OpNeq, // OpNeq
OpSame, // OpSame
OpNSame // OpNSame
};
// Objects compared with strings may involve calling a user-defined
// __toString function.
bool cmpOpTypesMayReenter(Opcode op, Type t0, Type t1) {
if (op == OpNSame || op == OpSame) return false;
assert(t0 != Type::Gen && t1 != Type::Gen);
return (t0 == Type::Cell || t1 == Type::Cell) ||
((t0 == Type::Obj || t1 == Type::Obj) &&
(t0.isString() || t1.isString()));
}
TraceExitType::ExitType getExitType(Opcode opc) {
assert(opc >= ExitTrace && opc <= ExitGuardFailure);
return (TraceExitType::ExitType)(opc - ExitTrace);
}
Opcode getExitOpcode(TraceExitType::ExitType type) {
return (Opcode)(ExitTrace + type);
}
bool isRefCounted(SSATmp* tmp) {
if (tmp->getType().notCounted()) {
return false;
}
IRInstruction* inst = tmp->getInstruction();
Opcode opc = inst->getOpcode();
if (opc == DefConst || opc == LdConst || opc == LdClsCns) {
return false;
}
return true;
}
void IRInstruction::convertToNop() {
IRInstruction nop(Nop);
// copy all but m_iid, m_block, m_taken, m_listNode
m_op = nop.m_op;
m_typeParam = nop.m_typeParam;
m_numSrcs = nop.m_numSrcs;
m_id = nop.m_id;
m_srcs = nop.m_srcs;
m_liveOutRegs = nop.m_liveOutRegs;
m_numDsts = nop.m_numDsts;
m_dst = nop.m_dst;
m_taken = nullptr;
m_tca = nop.m_tca;
m_extra = nullptr;
}
void IRInstruction::convertToJmp() {
assert(isControlFlowInstruction());
assert(getBlock()->back() == this);
m_op = Jmp_;
m_typeParam = Type::None;
m_numSrcs = 0;
m_numDsts = 0;
m_srcs = nullptr;
m_dst = nullptr;
getBlock()->setNext(nullptr);
}
IRInstruction* IRInstruction::clone(IRFactory* factory) const {
return factory->cloneInstruction(this);
}
SSATmp* IRInstruction::getSrc(uint32_t i) const {
if (i >= getNumSrcs()) return nullptr;
return m_srcs[i];
}
void IRInstruction::setSrc(uint32_t i, SSATmp* newSrc) {
assert(i < getNumSrcs());
m_srcs[i] = newSrc;
}
void IRInstruction::appendSrc(Arena& arena, SSATmp* newSrc) {
auto newSrcs = new (arena) SSATmp*[getNumSrcs() + 1];
std::copy(m_srcs, m_srcs + getNumSrcs(), newSrcs);
newSrcs[getNumSrcs()] = newSrc;
++m_numSrcs;
m_srcs = newSrcs;
}
void IRInstruction::setTaken(Block* target) {
if (m_op == Jmp_ && m_extra) {
if (m_taken) m_taken->removeEdge(this);
if (target) target->addEdge(this);
}
m_taken = target;
}
void Block::addEdge(IRInstruction* jmp) {
assert(!jmp->isTransient());
EdgeData* node = jmp->getExtra<Jmp_>();
node->jmp = jmp;
node->next = m_preds;
m_preds = node;
}
void Block::removeEdge(IRInstruction* jmp) {
assert(!jmp->isTransient());
EdgeData* node = jmp->getExtra<Jmp_>();
assert(node->jmp == jmp);
EdgeData** ptr = &m_preds;
while (*ptr != node) ptr = &(*ptr)->next;
*ptr = node->next;
assert((node->next = nullptr, true));
}
bool IRInstruction::equals(IRInstruction* inst) const {
if (m_op != inst->m_op ||
m_typeParam != inst->m_typeParam ||
m_numSrcs != inst->m_numSrcs) {
return false;
}
for (uint32_t i = 0; i < getNumSrcs(); i++) {
if (getSrc(i) != inst->getSrc(i)) {
return false;
}
}
if (hasExtra() && !equalsExtra(getOpcode(), m_extra, inst->m_extra)) {
return false;
}
// TODO: check label for ControlFlowInstructions?
return true;
}
size_t IRInstruction::hash() const {
size_t srcHash = 0;
for (unsigned i = 0; i < getNumSrcs(); ++i) {
srcHash = CSEHash::hashCombine(srcHash, getSrc(i));
}
if (hasExtra()) {
srcHash = CSEHash::hashCombine(srcHash, hashExtra(getOpcode(), m_extra));
}
return CSEHash::hashCombine(srcHash, m_op, m_typeParam);
}
void IRInstruction::printOpcode(std::ostream& os) const {
os << opcodeName(m_op);
if (m_typeParam == Type::None && !hasExtra()) {
return;
}
os << '<';
if (m_typeParam != Type::None) {
os << m_typeParam.toString();
if (hasExtra()) os << ',';
}
if (hasExtra()) {
os << showExtra(getOpcode(), m_extra);
}
os << '>';
}
void IRInstruction::printDst(std::ostream& ostream) const {
if (unsigned n = m_numDsts) {
for (unsigned i = 0; i < n; ++i) {
if (i > 0) ostream << ", ";
m_dst->print(ostream, true);
}
ostream << " = ";
}
}
void IRInstruction::printSrc(std::ostream& ostream, uint32_t i) const {
SSATmp* src = getSrc(i);
if (src != nullptr) {
if (m_id != 0 && !src->isConst() && src->getLastUseId() == m_id) {
ostream << "~";
}
src->print(ostream);
} else {
ostream << "!!!NULL @ " << i;
}
}
void IRInstruction::printSrcs(std::ostream& ostream) const {
bool first = true;
if (getOpcode() == IncStat) {
ostream << " " << Stats::g_counterNames[getSrc(0)->getValInt()] <<
", " << getSrc(1)->getValInt();
return;
}
for (uint32_t i = 0; i < m_numSrcs; i++) {
if (!first) {
ostream << ", ";
} else {
ostream << " ";
first = false;
}
printSrc(ostream, i);
}
}
void IRInstruction::print(std::ostream& ostream) const {
if (getOpcode() == Marker) {
auto* marker = getExtra<Marker>();
ostream << "--- bc" << marker->bcOff
<< ", spOff: " << marker->stackOff;
return;
}
if (!isTransient()) {
ostream << folly::format("({:02d}) ", getIId());
}
printDst(ostream);
bool isStMem = m_op == StMem || m_op == StMemNT || m_op == StRaw;
bool isLdMem = m_op == LdRaw;
if (isStMem || isLdMem) {
ostream << opcodeName(m_op) << " [";
printSrc(ostream, 0);
SSATmp* offset = getSrc(1);
if (m_op == StRaw) {
RawMemSlot& s =
RawMemSlot::Get(RawMemSlot::Kind(offset->getValInt()));
int64_t offset = s.getOffset();
if (offset) {
ostream << " + " << offset;
}
} else if ((isStMem || isLdMem) &&
(!offset->isConst() || offset->getValInt() != 0)) {
ostream << " + ";
printSrc(ostream, 1);
}
Type type = isStMem ? getSrc(2)->getType() : m_typeParam;
ostream << "]:" << type.toString();
if (!isLdMem) {
assert(getNumSrcs() > 1);
ostream << ", ";
printSrc(ostream, isStMem ? 2 : 1);
}
} else {
printOpcode(ostream);
printSrcs(ostream);
}
if (m_taken) {
ostream << " -> ";
m_taken->printLabel(ostream);
}
if (m_tca) {
ostream << ", ";
if (m_tca == kIRDirectJccJmpActive) {
ostream << "JccJmp_Exit ";
}
else
if (m_tca == kIRDirectJccActive) {
ostream << "Jcc_Exit ";
}
else
if (m_tca == kIRDirectGuardActive) {
ostream << "Guard_Exit ";
}
else {
ostream << (void*)m_tca;
}
}
}
void IRInstruction::print() const {
print(std::cerr);
std::cerr << std::endl;
}
std::string IRInstruction::toString() const {
std::ostringstream str;
print(str);
return str.str();
}
static void printConst(std::ostream& os, IRInstruction* inst) {
auto t = inst->getTypeParam();
auto c = inst->getExtra<DefConst>();
if (t == Type::Int) {
os << c->as<int64_t>();
} else if (t == Type::Dbl) {
os << c->as<double>();
} else if (t == Type::Bool) {
os << (c->as<bool>() ? "true" : "false");
} else if (t.isString()) {
auto str = c->as<const StringData*>();
os << "\""
<< Util::escapeStringForCPP(str->data(), str->size())
<< "\"";
} else if (t.isArray()) {
auto arr = inst->getExtra<DefConst>()->as<const ArrayData*>();
if (arr->empty()) {
os << "array()";
} else {
os << "Array(" << arr << ")";
}
} else if (t.isNull()) {
os << t.toString();
} else if (t == Type::Func) {
auto func = c->as<const Func*>();
os << "Func(" << (func ? func->fullName()->data() : "0") << ")";
} else if (t == Type::Cls) {
auto cls = c->as<const Class*>();
os << "Cls(" << (cls ? cls->name()->data() : "0") << ")";
} else if (t == Type::NamedEntity) {
auto ne = c->as<const NamedEntity*>();
os << "NamedEntity(" << ne << ")";
} else if (t == Type::TCA) {
void* vp = c->as<TCA>();
os << folly::format("TCA: 0x{}", vp);
} else if (t == Type::None) {
os << "None:" << c->as<int64_t>();
} else if (t.isPtr()) {
os << folly::format("{}({:#x})", t.toString(), c->as<uint64_t>());
} else {
not_reached();
}
}
void Block::printLabel(std::ostream& ostream) const {
ostream << "L" << m_id;
if (getHint() == Unlikely) {
ostream << "<Unlikely>";
}
}
int SSATmp::numNeededRegs() const {
auto type = getType();
if (type.subtypeOf(Type::None | Type::Null | Type::ActRec | Type::RetAddr)) {
// These don't need a register because their values are static or unused.
//
// RetAddr doesn't take any register because currently we only target x86,
// which takes the return address from the stack. This knowledge should be
// moved to a machine-specific section once we target other architectures.
return 0;
}
if (type.subtypeOf(Type::Ctx) || type.isPtr()) {
// Ctx and PtrTo* may be statically unknown but always need just 1 register.
return 1;
}
if (type.needsReg() || type.subtypeOf(Type::FuncCtx)) {
// These need 2 registers, 1 for the value and 1 for the type, or
// 1 for the Func* and 1 for the {Obj|Cctx}
return 2;
}
// By default, all other types only need 1 register.
assert(!type.needsReg());
return 1;
}
int SSATmp::numAllocatedRegs() const {
// If an SSATmp is spilled, it must've actually had a full set of
// registers allocated to it.
if (m_isSpilled) return numNeededRegs();
// Return the number of register slots that actually have an
// allocated register. We may not have allocated a full
// numNeededRegs() worth of registers in some cases (if the value
// of this tmp wasn't used, etc).
int i = 0;
while (i < kMaxNumRegs && m_regs[i] != InvalidReg) {
++i;
}
return i;
}
bool SSATmp::getValBool() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::Bool));
return m_inst->getExtra<ConstData>()->as<bool>();
}
int64_t SSATmp::getValInt() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::Int));
return m_inst->getExtra<ConstData>()->as<int64_t>();
}
int64_t SSATmp::getValRawInt() const {
assert(isConst());
return m_inst->getExtra<ConstData>()->as<int64_t>();
}
double SSATmp::getValDbl() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::Dbl));
return m_inst->getExtra<ConstData>()->as<double>();
}
const StringData* SSATmp::getValStr() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::StaticStr));
return m_inst->getExtra<ConstData>()->as<const StringData*>();
}
const ArrayData* SSATmp::getValArr() const {
assert(isConst());
// TODO: Task #2124292, Reintroduce StaticArr
assert(m_inst->getTypeParam().subtypeOf(Type::Arr));
return m_inst->getExtra<ConstData>()->as<const ArrayData*>();
}
const Func* SSATmp::getValFunc() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::Func));
return m_inst->getExtra<ConstData>()->as<const Func*>();
}
const Class* SSATmp::getValClass() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::Cls));
return m_inst->getExtra<ConstData>()->as<const Class*>();
}
const NamedEntity* SSATmp::getValNamedEntity() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::NamedEntity));
return m_inst->getExtra<ConstData>()->as<const NamedEntity*>();
}
uintptr_t SSATmp::getValBits() const {
assert(isConst());
return m_inst->getExtra<ConstData>()->as<uintptr_t>();
}
Variant SSATmp::getValVariant() const {
switch (m_inst->getTypeParam().toDataType()) {
case KindOfUninit:
case KindOfNull:
return null;
case KindOfBoolean:
return m_inst->getExtra<ConstData>()->as<bool>();
case KindOfInt64:
return m_inst->getExtra<ConstData>()->as<int64_t>();
case KindOfDouble:
return m_inst->getExtra<ConstData>()->as<double>();
case KindOfString:
case KindOfStaticString:
return (litstr)m_inst->getExtra<ConstData>()
->as<const StringData*>()->data();
case KindOfArray:
return StaticArray(ArrayData::GetScalarArray(m_inst->getExtra<ConstData>()
->as<ArrayData*>()));
case KindOfObject:
return m_inst->getExtra<ConstData>()->as<const Object*>();
default:
assert(false);
return null;
}
}
TCA SSATmp::getValTCA() const {
assert(isConst());
assert(m_inst->getTypeParam().equals(Type::TCA));
return m_inst->getExtra<ConstData>()->as<TCA>();
}
void SSATmp::setTCA(TCA tca) {
getInstruction()->setTCA(tca);
}
TCA SSATmp::getTCA() const {
return getInstruction()->getTCA();
}
void SSATmp::print(std::ostream& os, bool printLastUse) const {
if (m_inst->getOpcode() == DefConst) {
printConst(os, m_inst);
return;
}
os << "t" << m_id;
if (printLastUse && m_lastUseId != 0) {
os << "@" << m_lastUseId << "#" << m_useCount;
}
if (m_isSpilled || numAllocatedRegs() > 0) {
os << '(';
if (!m_isSpilled) {
for (int i = 0, sz = numAllocatedRegs(); i < sz; ++i) {
if (i != 0) os << ",";
os << reg::regname(Reg64(int(m_regs[i])));
}
} else {
for (int i = 0, sz = numNeededRegs(); i < sz; ++i) {
if (i != 0) os << ",";
os << m_spillInfo[i];
}
}
os << ')';
}
os << ":" << getType().toString();
}
void SSATmp::print() const {
print(std::cerr);
std::cerr << std::endl;
}
void Trace::print(std::ostream& os, const AsmInfo* asmInfo) const {
static const int kIndent = 4;
Disasm disasm(kIndent + 4, RuntimeOption::EvalDumpIR > 5);
// Print unlikely blocks at the end
BlockList blocks, unlikely;
for (Block* block : m_blocks) {
if (block->getHint() == Block::Unlikely) {
unlikely.push_back(block);
} else {
blocks.push_back(block);
}
}
blocks.splice(blocks.end(), unlikely);
for (Block* block : blocks) {
TcaRange blockRange = asmInfo ? asmInfo->asmRanges[block] :
TcaRange(nullptr, nullptr);
for (auto it = block->begin(); it != block->end();) {
auto& inst = *it; ++it;
if (inst.getOpcode() == Marker) {
auto* marker = inst.getExtra<Marker>();
if (!m_isMain) {
// Don't print bytecode, but print the label.
os << std::string(kIndent, ' ');
inst.print(os);
os << '\n';
continue;
}
uint32_t bcOffset = marker->bcOff;
if (const auto* func = marker->func) {
func->unit()->prettyPrint(
os, Unit::PrintOpts()
.range(bcOffset, bcOffset+1)
.noLineNumbers()
.indent(0));
continue;
}
}
if (inst.getOpcode() == DefLabel) {
os << std::string(kIndent - 2, ' ');
inst.getBlock()->printLabel(os);
os << ":\n";
// print phi pseudo-instructions
for (unsigned i = 0, n = inst.getNumDsts(); i < n; ++i) {
os << std::string(kIndent +
folly::format("({}) ", inst.getIId()).str().size(),
' ');
inst.getDst(i)->print(os, false);
os << " = phi ";
bool first = true;
inst.getBlock()->forEachSrc(i, [&](IRInstruction* jmp, SSATmp*) {
if (!first) os << ", ";
first = false;
jmp->printSrc(os, i);
os << "@";
jmp->getBlock()->printLabel(os);
});
os << '\n';
}
}
os << std::string(kIndent, ' ');
inst.print(os);
os << '\n';
if (asmInfo) {
TcaRange instRange = asmInfo->instRanges[inst];
if (!instRange.empty()) {
disasm.disasm(os, instRange.begin(), instRange.end());
os << '\n';
assert(instRange.end() >= blockRange.start() &&
instRange.end() <= blockRange.end());
blockRange = TcaRange(instRange.end(), blockRange.end());
}
}
}
if (asmInfo) {
// print code associated with this block that isn't tied to any
// instruction. This includes code after the last isntruction (e.g.
// jmp to next block), and AStubs code.
if (!blockRange.empty()) {
os << std::string(kIndent, ' ') << "A:\n";
disasm.disasm(os, blockRange.start(), blockRange.end());
}
auto astubRange = asmInfo->astubRanges[block];
if (!astubRange.empty()) {
os << std::string(kIndent, ' ') << "AStubs:\n";
disasm.disasm(os, astubRange.start(), astubRange.end());
}
if (!blockRange.empty() || !astubRange.empty()) {
os << '\n';
}
}
}
for (auto* exitTrace : m_exitTraces) {
os << "\n ------- Exit Trace -------\n";
exitTrace->print(os, asmInfo);
}
}
int32_t spillValueCells(IRInstruction* spillStack) {
int32_t numSrcs = spillStack->getNumSrcs();
int32_t ret = 0;
for (int i = 2; i < numSrcs; ++i) {
if (spillStack->getSrc(i)->getType() == Type::ActRec) {
ret += kNumActRecCells;
i += kSpillStackActRecExtraArgs;
} else {
++ret;
}
}
return ret;
}
/**
* TopoSort encapsulates a depth-first search which identifies basic
* blocks and populates a list of blocks in reverse-postorder.
*/
struct TopoSort {
TopoSort(BlockList& blocks, unsigned num_blocks) : m_visited(num_blocks),
m_blocks(blocks), m_next_id(0) {
blocks.clear();
}
void visit(Block* block) {
assert(!block->empty());
if (m_visited.test(block->getId())) return;
m_visited.set(block->getId());
if (Block* next = block->getNext()) visit(next);
if (Block* taken = block->getTaken()) visit(taken);
block->setPostId(m_next_id++);
m_blocks.push_front(block);
}
private:
boost::dynamic_bitset<> m_visited;
BlockList& m_blocks;
unsigned m_next_id; // next postorder id to assign
};
BlockList sortCfg(Trace* trace, const IRFactory& factory) {
assert(trace->isMain());
BlockList blocks;
TopoSort sorter(blocks, factory.numBlocks());
sorter.visit(trace->front());
return blocks;
}
/*
* Find the immediate dominator of each block using Cooper, Harvey, and
* Kennedy's "A Simple, Fast Dominance Algorithm", returned as a vector
* of postorder ids, indexed by postorder id.
*/
IdomVector findDominators(const BlockList& blocks) {
// compute predecessors of each block
int num_blocks = blocks.size();
std::forward_list<int> preds[num_blocks];
for (Block* block : blocks) {
if (Block* succ = block->getNext()) {
preds[succ->postId()].push_front(block->postId());
}
if (Block* succ = block->getTaken()) {
preds[succ->postId()].push_front(block->postId());
}
}
// Calculate immediate dominators with the iterative two-finger algorithm.
// When it terminates, idom[post-id] will contain the post-id of the
// immediate dominator of each block. idom[start] will be -1. This is
// the general algorithm but it will only loop twice for loop-free graphs.
IdomVector idom(num_blocks, -1);
auto start = blocks.begin();
int start_id = (*start)->postId();
idom[start_id] = start_id;
start++;
for (bool changed = true; changed; ) {
changed = false;
// for each block after start, in reverse postorder
for (auto it = start; it != blocks.end(); it++) {
int b = (*it)->postId();
// new_idom = any already-processed predecessor
auto pred_it = preds[b].begin();
int new_idom = *pred_it;
while (idom[new_idom] == -1) new_idom = *(++pred_it);
// for all other already-processed predecessors p of b
for (int p : preds[b]) {
if (p != new_idom && idom[p] != -1) {
// find earliest common predecessor of p and new_idom
// (higher postIds are earlier in flow and in dom-tree).
int b1 = p, b2 = new_idom;
do {
while (b1 < b2) b1 = idom[b1];
while (b2 < b1) b2 = idom[b2];
} while (b1 != b2);
new_idom = b1;
}
}
if (idom[b] != new_idom) {
idom[b] = new_idom;
changed = true;
}
}
}
idom[start_id] = -1; // start has no idom.
return idom;
}
bool dominates(const Block* b1, const Block* b2, const IdomVector& idoms) {
int p1 = b1->postId();
int p2 = b2->postId();
for (int i = p2; i != -1; i = idoms[i]) {
if (i == p1) return true;
}
return false;
}
/*
* Check one block for being well formed. It must:
* 1. have exactly one DefLabel as the first instruction
* 2. if any instruction is isBlockEnd(), it must be last
* 3. if the last instruction isTerminal(), block->next must be null.
*/
bool checkBlock(Block* b) {
assert(!b->empty());
assert(b->front()->getOpcode() == DefLabel);
if (b->back()->isTerminal()) assert(!b->getNext());
if (b->getTaken()) {
// only Jmp_ can branch to a join block expecting values.
assert(b->back()->getOpcode() == Jmp_ ||
b->getTaken()->front()->getNumDsts() == 0);
}
if (b->getNext()) {
// cannot fall-through to join block expecting values
assert(b->getNext()->front()->getNumDsts() == 0);
}
auto i = b->begin(), e = b->end();
++i;
if (b->back()->isBlockEnd()) --e;
for (UNUSED IRInstruction& inst : folly::makeRange(i, e)) {
assert(inst.getOpcode() != DefLabel);
assert(!inst.isBlockEnd());
}
return true;
}
/*
* Build the CFG, then the dominator tree, then use it to validate SSA.
* 1. Each src must be defined by some other instruction, and each dst must
* be defined by the current instruction.
* 2. Each src must be defined earlier in the same block or in a dominator.
* 3. Each dst must not be previously defined.
* 4. Treat tmps defined by DefConst as always defined.
*/
bool checkCfg(Trace* trace, const IRFactory& factory) {
forEachTraceBlock(trace, [&](Block* b) {
checkBlock(b);
});
BlockList blocks = sortCfg(trace, factory);
IdomVector idom = findDominators(blocks);
// build dominator-children lists
std::forward_list<Block*> children[blocks.size()];
for (Block* block : blocks) {
int idom_id = idom[block->postId()];
if (idom_id != -1) children[idom_id].push_front(block);
}
// visit dom tree in preorder, checking all tmps
boost::dynamic_bitset<> defined0(factory.numTmps());
forPreorderDoms(blocks.front(), children, defined0,
[] (Block* block, boost::dynamic_bitset<>& defined) {
for (IRInstruction& inst : *block) {
for (SSATmp* UNUSED src : inst.getSrcs()) {
assert(src->getInstruction() != &inst);
assert(src->getInstruction()->getOpcode() == DefConst ||
defined[src->getId()]);
}
for (SSATmp& dst : inst.getDsts()) {
assert(dst.getInstruction() == &inst &&
inst.getOpcode() != DefConst);
assert(!defined[dst.getId()]);
defined[dst.getId()] = 1;
}
}
});
return true;
}
bool hasInternalFlow(Trace* trace) {
for (Block* block : trace->getBlocks()) {
if (Block* taken = block->getTaken()) {
if (taken->getTrace() == trace) return true;
}
}
return false;
}
}}}
|
[
"sgolemon@fb.com"
] |
sgolemon@fb.com
|
4f78afae1a7e9268b189002ff3ab0659711dfb44
|
053123bc636c9f5e912b5c0448fee771c042030d
|
/bwd_1x1_test.cpp
|
3030c62a2b840c33e6b0c2793b031ca67e9db9eb
|
[] |
no_license
|
andygongyb/SparseTrainTests
|
24cf05ea7d46d293c68b8c07e658f08c4704a3e5
|
0b6ab252b822e88a6846ea10439a28f1eddaf61e
|
refs/heads/master
| 2020-04-30T02:27:22.553397
| 2019-05-15T20:20:43
| 2019-05-15T20:20:43
| 176,560,207
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,314
|
cpp
|
/*******************************************************************************
* Copyright 2016-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#include <iostream>
#include <numeric>
#include <math.h>
#include <string>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <ittnotify.h>
#include "mkldnn.hpp"
using namespace mkldnn;
inline uint64_t rdtscp(void) {
uint64_t rax,rdx;
uint32_t aux;
__asm__ volatile( "rdtscp\n" : "=a" (rax), "=d" (rdx), "=c" (aux) : : );
return (rdx << 32) + rax;
}
inline int right_padding_(int i, int o, int k, int p, int s, int d = 0) {
return (o - 1) * s + (k - 1) * (d + 1) - (p + i - 1);
}
void simple_net(int sparsity, int n, int mb, int ic, int ih, int iw, int oc, int strh,
int strw, int kh, int kw)
{
int padh = kh / 2, padw = kw / 2;
int oh = ih / strh, ow = iw / strw;
int dilh = 0, dilw = 0;
std::cout << "mb=" << mb << " ic=" << ic << " ih=" << ih << " iw=" << iw
<< " oc=" << oc << " oh=" << oh << " ow=" << ow << " kh=" << kh << " kw=" << kw
<< " strh=" << strh << " strw=" << strw << std::endl;
float *src_data = (float *) aligned_alloc(64, mb * ic * ih * iw * sizeof(float));
float *dst_data = (float *) aligned_alloc(64, mb * oc * oh * ow * sizeof(float));
float *wei_data = (float *) aligned_alloc(64, oc * ic * kh * kw * sizeof(float));
float *src_ref_data = (float *) aligned_alloc(64, mb * ic * ih * iw * sizeof(float));
size_t s = 0;
for (size_t i = 0; i < mb * oc * oh * ow; ++i) {
if (rand() % 100 >= sparsity) {
dst_data[i] = i;
} else {
dst_data[i] = 0.0;
}
}
for (size_t i = 0; i < oc * ic * kh * kw; ++i) {
wei_data[i] = i;
}
auto cpu_engine = engine(engine::cpu, 0);
auto c_src_desc = memory::desc({ mb, ic, ih, iw }, memory::data_type::f32,
memory::format::nChw16c);
auto c_weights_desc = memory::desc({ oc, ic, kh, kw }, memory::data_type::f32,
memory::format::IOhw16o16i);
auto c_dst_desc = memory::desc({ mb, oc, oh, ow }, memory::data_type::f32,
memory::format::nChw16c);
auto c_src_desc_f = memory::desc({ mb, ic, ih, iw }, memory::data_type::f32,
memory::format::nChw16c);
auto c_dst_desc_f = memory::desc({ mb, oc, oh, ow }, memory::data_type::f32,
memory::format::nChw16c);
auto c_diff_src = memory({c_src_desc, cpu_engine}, src_data);
auto c_weights = memory({c_weights_desc, cpu_engine}, wei_data);
auto c_diff_dst = memory({c_dst_desc, cpu_engine}, dst_data);
auto c_src_ref_desc = memory::desc({ mb, ic, ih, iw }, memory::data_type::f32,
memory::format::nChw16c);
auto c_diff_ref_src = memory({c_src_ref_desc, cpu_engine}, src_ref_data);
std::vector<int> padR = {
right_padding_(ih, oh, kh, padh, strh, dilh),
right_padding_(iw, ow, kw, padw, strw, dilw)
};
auto conv_desc = convolution_forward::desc(
prop_kind::forward_training, convolution_direct, c_src_desc_f,
c_weights_desc, c_dst_desc_f,
{ strh, strw }, { dilh, dilw },
{ padh, padw }, padR, padding_kind::zero);
auto conv_primitive_desc = convolution_forward::primitive_desc(
conv_desc, cpu_engine);
auto conv_bwd_data_desc = convolution_backward_data::desc(
convolution_direct, c_src_desc, c_weights_desc, c_dst_desc,
{ strh, strw }, { dilh, dilw },
{ padh, padw }, padR, padding_kind::zero);
auto conv_bwd_data_primitive_desc
= convolution_backward_data::primitive_desc(
conv_bwd_data_desc, cpu_engine, conv_primitive_desc);
auto conv_bwd_data = convolution_backward_data(
conv_bwd_data_primitive_desc,
c_diff_dst, c_weights, c_diff_src);
std::vector<primitive> pipeline;
pipeline.push_back(conv_bwd_data);
uint64_t min_time = UINT64_MAX;
__itt_resume();
for (int i = 0; i < n; ++i) {
std::cout << "iter " << i << std::endl;
uint64_t start = rdtscp();
stream(stream::kind::eager).submit(pipeline).wait();
uint64_t end = rdtscp();
uint64_t time = end - start;
if (time < min_time) {
min_time = time;
}
std::cout << "min time: " << min_time << std::endl;
}
__itt_pause();
}
int main(int argc, char **argv)
{
int sparsity = 50;
int n = 1;
int mb = 32;
int ic = 512, ih = 28, iw = 28;
int oc = 512;
int kh = 1, kw = 1;
int strh = 1, strw = 1;
if (argc > 1) {
sparsity = atoi(argv[1]);
}
if (argc > 2) {
n = atoi(argv[2]);
}
if (argc > 3) {
mb = atoi(argv[3]);
}
if (argc > 4) {
ic = atoi(argv[4]);
}
if (argc > 5) {
ih = atoi(argv[5]);
}
if (argc > 6) {
iw = atoi(argv[6]);
}
if (argc > 7) {
oc = atoi(argv[7]);
}
if (argc > 8) {
strh = atoi(argv[8]);
}
if (argc > 9) {
strw = atoi(argv[9]);
}
if (argc > 10) {
kh = atoi(argv[10]);
}
if (argc > 11) {
kw = atoi(argv[11]);
}
try
{
simple_net(sparsity, n, mb, ic, ih, iw, oc, strh, strw, kh, kw);
std::cout << "passed" << std::endl;
}
catch (error &e)
{
std::cerr << "status: " << e.status << std::endl;
std::cerr << "message: " << e.message << std::endl;
}
return 0;
}
|
[
"gong15@mako.cs.illinois.edu"
] |
gong15@mako.cs.illinois.edu
|
194e6055bfb3dfad87daf52977acf1d2952e827a
|
6dad659f60a78bea27ef2509f90aa3341c7a88eb
|
/include/boost/beast/core/impl/flat_stream.hpp
|
304ef00e79f980c8cc99f4b218ae4eaaad9e79f1
|
[
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
MutexUnlocked/boost
|
6af1920cb08bfedc4a00a1f259443df753a0777f
|
f2dc8be896eabd5f5da18d3b78abec2f5a04d4e5
|
refs/heads/master
| 2020-05-19T09:09:30.213802
| 2019-05-04T20:16:50
| 2019-05-04T20:16:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,957
|
hpp
|
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_CORE_IMPL_FLAT_STREAM_HPP
#define BOOST_BEAST_CORE_IMPL_FLAT_STREAM_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/buffers_prefix.hpp>
#include <boost/beast/core/static_buffer.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/websocket/teardown.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/coroutine.hpp>
#include <memory>
namespace boost {
namespace beast {
template<class NextLayer>
struct flat_stream<NextLayer>::ops
{
template<class Handler>
class write_op
: public async_op_base<Handler,
beast::executor_type<flat_stream>>
, public net::coroutine
{
public:
template<
class ConstBufferSequence,
class Handler_>
write_op(
Handler_&& h,
flat_stream<NextLayer>& s,
ConstBufferSequence const& b)
: async_op_base<Handler,
beast::executor_type<flat_stream>>(
std::forward<Handler_>(h),
s.get_executor())
{
auto const result =
flatten(b, max_size);
if(result.flatten)
{
s.buffer_.clear();
s.buffer_.commit(net::buffer_copy(
s.buffer_.prepare(result.size),
b, result.size));
s.stream_.async_write_some(
s.buffer_.data(), std::move(*this));
}
else
{
s.buffer_.clear();
s.buffer_.shrink_to_fit();
s.stream_.async_write_some(
beast::buffers_prefix(
result.size, b), std::move(*this));
}
}
void
operator()(
boost::system::error_code ec,
std::size_t bytes_transferred)
{
this->invoke_now(ec, bytes_transferred);
}
};
struct run_write_op
{
template<class WriteHandler, class Buffers>
void
operator()(
WriteHandler&& h,
flat_stream& s,
Buffers const& b)
{
// If you get an error on the following line it means
// that your handler does not meet the documented type
// requirements for the handler.
static_assert(
beast::detail::is_invocable<WriteHandler,
void(error_code, std::size_t)>::value,
"WriteHandler type requirements not met");
write_op<
typename std::decay<WriteHandler>::type>(
std::forward<WriteHandler>(h),
s,
b);
}
};
};
//------------------------------------------------------------------------------
template<class NextLayer>
template<class... Args>
flat_stream<NextLayer>::
flat_stream(Args&&... args)
: stream_(std::forward<Args>(args)...)
{
}
template<class NextLayer>
template<class MutableBufferSequence>
std::size_t
flat_stream<NextLayer>::
read_some(MutableBufferSequence const& buffers)
{
static_assert(boost::beast::is_sync_read_stream<next_layer_type>::value,
"SyncReadStream type requirements not met");
static_assert(net::is_mutable_buffer_sequence<
MutableBufferSequence>::value,
"MutableBufferSequence type requirements not met");
error_code ec;
auto n = read_some(buffers, ec);
if(ec)
BOOST_THROW_EXCEPTION(boost::system::system_error{ec});
return n;
}
template<class NextLayer>
template<class MutableBufferSequence>
std::size_t
flat_stream<NextLayer>::
read_some(MutableBufferSequence const& buffers, error_code& ec)
{
static_assert(boost::beast::is_sync_read_stream<next_layer_type>::value,
"SyncReadStream type requirements not met");
static_assert(net::is_mutable_buffer_sequence<
MutableBufferSequence>::value,
"MutableBufferSequence type requirements not met");
return stream_.read_some(buffers, ec);
}
template<class NextLayer>
template<
class MutableBufferSequence,
class ReadHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(
ReadHandler, void(error_code, std::size_t))
flat_stream<NextLayer>::
async_read_some(
MutableBufferSequence const& buffers,
ReadHandler&& handler)
{
static_assert(boost::beast::is_async_read_stream<next_layer_type>::value,
"AsyncReadStream type requirements not met");
static_assert(net::is_mutable_buffer_sequence<
MutableBufferSequence >::value,
"MutableBufferSequence type requirements not met");
return stream_.async_read_some(
buffers, std::forward<ReadHandler>(handler));
}
template<class NextLayer>
template<class ConstBufferSequence>
std::size_t
flat_stream<NextLayer>::
write_some(ConstBufferSequence const& buffers)
{
static_assert(boost::beast::is_sync_write_stream<next_layer_type>::value,
"SyncWriteStream type requirements not met");
static_assert(net::is_const_buffer_sequence<
ConstBufferSequence>::value,
"ConstBufferSequence type requirements not met");
error_code ec;
auto n = write_some(buffers, ec);
if(ec)
BOOST_THROW_EXCEPTION(boost::system::system_error{ec});
return n;
}
template<class NextLayer>
template<class ConstBufferSequence>
std::size_t
flat_stream<NextLayer>::
stack_write_some(
std::size_t size,
ConstBufferSequence const& buffers,
error_code& ec)
{
static_buffer<max_stack> b;
b.commit(net::buffer_copy(
b.prepare(size), buffers));
return stream_.write_some(b.data(), ec);
}
template<class NextLayer>
template<class ConstBufferSequence>
std::size_t
flat_stream<NextLayer>::
write_some(ConstBufferSequence const& buffers, error_code& ec)
{
static_assert(boost::beast::is_sync_write_stream<next_layer_type>::value,
"SyncWriteStream type requirements not met");
static_assert(net::is_const_buffer_sequence<
ConstBufferSequence>::value,
"ConstBufferSequence type requirements not met");
auto const result = flatten(buffers, max_size);
if(result.flatten)
{
if(result.size <= max_stack)
return stack_write_some(result.size, buffers, ec);
buffer_.clear();
buffer_.commit(net::buffer_copy(
buffer_.prepare(result.size),
buffers));
return stream_.write_some(buffer_.data(), ec);
}
buffer_.clear();
buffer_.shrink_to_fit();
return stream_.write_some(
boost::beast::buffers_prefix(result.size, buffers), ec);
}
template<class NextLayer>
template<
class ConstBufferSequence,
class WriteHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(
WriteHandler, void(error_code, std::size_t))
flat_stream<NextLayer>::
async_write_some(
ConstBufferSequence const& buffers,
WriteHandler&& handler)
{
static_assert(boost::beast::is_async_write_stream<next_layer_type>::value,
"AsyncWriteStream type requirements not met");
static_assert(net::is_const_buffer_sequence<
ConstBufferSequence>::value,
"ConstBufferSequence type requirements not met");
return net::async_initiate<
WriteHandler,
void(error_code, std::size_t)>(
typename ops::run_write_op{},
handler,
*this,
buffers);
}
template<class NextLayer>
void
teardown(
boost::beast::websocket::role_type role,
flat_stream<NextLayer>& s,
error_code& ec)
{
using boost::beast::websocket::teardown;
teardown(role, s.next_layer(), ec);
}
template<class NextLayer, class TeardownHandler>
void
async_teardown(
boost::beast::websocket::role_type role,
flat_stream<NextLayer>& s,
TeardownHandler&& handler)
{
using boost::beast::websocket::async_teardown;
async_teardown(role, s.next_layer(), std::move(handler));
}
} // beast
} // boost
#endif
|
[
"friedrichdoku@gmail.com"
] |
friedrichdoku@gmail.com
|
e2a7cd65f33ccacadbac4829be2af7fb71cb3fcc
|
16e6a9900223afacd74b9aef90b13e4075bcff04
|
/libraries/RyuLib/Examples/Etc/Drone/Drone.ino
|
d3613ad8e052c339fe635fbe67d1661af7c69704
|
[] |
no_license
|
ryujt/ryulib-arduino
|
489df10855a4bb3a56c37b24beaeb46d90a98433
|
c0e9fdfabe7e7a13fcffe2ce03806bc06e66e137
|
refs/heads/master
| 2022-03-23T19:03:10.970266
| 2019-12-11T13:51:58
| 2019-12-11T13:51:58
| 49,684,699
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,703
|
ino
|
#include <math.h>
#include <Wire.h>
#include <SoftwareSerial.h>
#include "kalman.h"
#include "MotorDriver.h"
/* MPU-6050 sensor */
#define MPU6050_ACCEL_XOUT_H 0x3B // R
#define MPU6050_PWR_MGMT_1 0x6B // R/W
#define MPU6050_PWR_MGMT_2 0x6C // R/W
#define MPU6050_WHO_AM_I 0x75 // R
#define MPU6050_I2C_ADDRESS 0x68
struct GyroKalman angX;
struct GyroKalman angY;
struct GyroKalman angZ;
/*
* R represents the measurement covariance noise. In this case,
* it is a 1x1 matrix that says that we expect 0.3 rad jitter
* from the accelerometer.
*/
static const float R_angle = 0.3; //.3 default
/*
* Q is a 2x2 matrix that represents the process covariance noise.
* In this case, it indicates how much we trust the acceleromter
* relative to the gyros
*/
static const float Q_angle = 0.01; //0.01 (Kalman)
static const float Q_gyro = 0.04; //0.04 (Kalman)
//These are the limits of the values I got out of the Nunchuk accelerometers (yours may vary).
const int lowX = -2150;
const int highX = 2210;
const int lowY = -2150;
const int highY = 2210;
const int lowZ = -2150;
const int highZ = 2550;
/* time */
unsigned long prevSensoredTime = 0;
unsigned long curSensoredTime = 0;
int xInit[5] = {0,0,0,0,0};
int yInit[5] = {0,0,0,0,0};
int zInit[5] = {0,0,0,0,0};
int initIndex = 0;
int initSize = 5;
int xCal = 0;
int yCal = 0;
int zCal = 1800;
MotorDriver motors;
SoftwareSerial bluetooth(11, 12);
void setup()
{
int error;
uint8_t c;
initGyroKalman(&angX, Q_angle, Q_gyro, R_angle);
initGyroKalman(&angY, Q_angle, Q_gyro, R_angle);
initGyroKalman(&angZ, Q_angle, Q_gyro, R_angle);
Serial.begin(9600);
Wire.begin();
// default at power-up:
// Gyro at 250 degrees second
// Acceleration at 2g
// Clock source at internal 8MHz
// The device is in sleep mode.
//
error = MPU6050_read (MPU6050_WHO_AM_I, &c, 1);
Serial.print(F("WHO_AM_I : "));
Serial.print(c,HEX);
Serial.print(F(", error = "));
Serial.println(error,DEC);
// According to the datasheet, the 'sleep' bit
// should read a '1'. But I read a '0'.
// That bit has to be cleared, since the sensor
// is in sleep mode at power-up. Even if the
// bit reads '0'.
error = MPU6050_read (MPU6050_PWR_MGMT_2, &c, 1);
Serial.print(F("PWR_MGMT_2 : "));
Serial.print(c,HEX);
Serial.print(F(", error = "));
Serial.println(error,DEC);
// Clear the 'sleep' bit to start the sensor.
MPU6050_write_reg (MPU6050_PWR_MGMT_1, 0);
motors.begin();
bluetooth.begin(9600);
}
int height = 0;
void loop()
{
while (bluetooth.available() > 0) {
char ch = bluetooth.read();
Serial.println(ch);
switch (ch) {
case 'S': {
height = 0;
motors.setHeight(height);
} break;
case 'U': {
height = height + 5;
motors.setHeight(height);
} break;
case 'D': {
height = height - 5;
motors.setHeight(height);
} break;
}
}
int error;
double dT;
accel_t_gyro_union accel_t_gyro;
curSensoredTime = millis();
error = MPU6050_read (MPU6050_ACCEL_XOUT_H, (uint8_t *) &accel_t_gyro, sizeof(accel_t_gyro));
if(error != 0) {
Serial.print(F("Read accel, temp and gyro, error = "));
Serial.println(error,DEC);
}
// Swap all high and low bytes.
// After this, the registers values are swapped,
// so the structure name like x_accel_l does no
// longer contain the lower byte.
uint8_t swap;
#define SWAP(x,y) swap = x; x = y; y = swap
SWAP (accel_t_gyro.reg.x_accel_h, accel_t_gyro.reg.x_accel_l);
SWAP (accel_t_gyro.reg.y_accel_h, accel_t_gyro.reg.y_accel_l);
SWAP (accel_t_gyro.reg.z_accel_h, accel_t_gyro.reg.z_accel_l);
SWAP (accel_t_gyro.reg.t_h, accel_t_gyro.reg.t_l);
SWAP (accel_t_gyro.reg.x_gyro_h, accel_t_gyro.reg.x_gyro_l);
SWAP (accel_t_gyro.reg.y_gyro_h, accel_t_gyro.reg.y_gyro_l);
SWAP (accel_t_gyro.reg.z_gyro_h, accel_t_gyro.reg.z_gyro_l);
if(prevSensoredTime > 0) {
int gx1=0, gy1=0, gz1 = 0;
float gx2=0, gy2=0, gz2 = 0;
int loopTime = curSensoredTime - prevSensoredTime;
gx2 = angleInDegrees(lowX, highX, accel_t_gyro.value.x_gyro);
gy2 = angleInDegrees(lowY, highY, accel_t_gyro.value.y_gyro);
gz2 = angleInDegrees(lowZ, highZ, accel_t_gyro.value.z_gyro);
predict(&angX, gx2, loopTime);
predict(&angY, gy2, loopTime);
predict(&angZ, gz2, loopTime);
gx1 = update(&angX, accel_t_gyro.value.x_accel) / 10;
gy1 = update(&angY, accel_t_gyro.value.y_accel) / 10;
gz1 = update(&angZ, accel_t_gyro.value.z_accel) / 10;
if(initIndex < initSize) {
xInit[initIndex] = gx1;
yInit[initIndex] = gy1;
zInit[initIndex] = gz1;
if(initIndex == initSize - 1) {
int sumX = 0; int sumY = 0; int sumZ = 0;
for(int k=1; k <= initSize; k++) {
sumX += xInit[k];
sumY += yInit[k];
sumZ += zInit[k];
}
xCal -= sumX/(initSize -1);
yCal -= sumY/(initSize -1);
zCal = (sumZ/(initSize -1) - zCal);
}
initIndex++;
} else {
gx1 += xCal;
gy1 += yCal;
}
// Serial.print(F("Angle x,y,z : "));
// Serial.print(gx1, DEC);
// Serial.print(F(", "));
// Serial.print(gy1, DEC);
// Serial.print(F(", "));
// Serial.print(gz1, DEC);
// Serial.println(F(""));
motors.setX(gy1 - 62);
motors.setY(-gx1);
}
prevSensoredTime = curSensoredTime;
delay(200);
}
/**************************************************
* Sensor read/write
**************************************************/
int MPU6050_read(int start, uint8_t *buffer, int size)
{
int i, n, error;
Wire.beginTransmission(MPU6050_I2C_ADDRESS);
n = Wire.write(start);
if (n != 1)
return (-10);
n = Wire.endTransmission(false); // hold the I2C-bus
if (n != 0)
return (n);
// Third parameter is true: relase I2C-bus after data is read.
Wire.requestFrom(MPU6050_I2C_ADDRESS, size, true);
i = 0;
while(Wire.available() && i<size)
{
buffer[i++]=Wire.read();
}
if ( i != size)
return (-11);
return (0); // return : no error
}
int MPU6050_write(int start, const uint8_t *pData, int size)
{
int n, error;
Wire.beginTransmission(MPU6050_I2C_ADDRESS);
n = Wire.write(start); // write the start address
if (n != 1)
return (-20);
n = Wire.write(pData, size); // write data bytes
if (n != size)
return (-21);
error = Wire.endTransmission(true); // release the I2C-bus
if (error != 0)
return (error);
return (0); // return : no error
}
int MPU6050_write_reg(int reg, uint8_t data)
{
int error;
error = MPU6050_write(reg, &data, 1);
return (error);
}
/**************************************************
* Raw data processing
**************************************************/
float angleInDegrees(int lo, int hi, int measured) {
float x = (hi - lo)/180.0;
return (float)measured/x;
}
|
[
"ryujt658@hanmail.net"
] |
ryujt658@hanmail.net
|
ca6315a1920412053984360cfaafe08aafa2706d
|
cb0f510888d4d80c8fe16c22a0f40787677abfe0
|
/operator_ui/src/CamWidget.cpp
|
b47900153033e6d8b513a2c37409bc0b15c9fc80
|
[
"MIT"
] |
permissive
|
DeepBlue14/usar_system
|
89f4fb384c3fb41c3fefb9fe0eb339eb011c267f
|
a1b3d78a65f064be897f75dfc5f4dad4214f9d74
|
refs/heads/master
| 2021-01-17T21:03:37.653042
| 2017-11-16T05:21:50
| 2017-11-16T05:21:50
| 61,601,115
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,703
|
cpp
|
/*
* Copyright (C) 2016 James T. Kuczynski
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <QtWebSockets/QWebSocketServer>
#include <QtWebSockets/QWebSocket>
#include <QtCore/QDebug>
#include <iostream>
#include "../include/operator_ui/CamWidget.h"
CamWidget::CamWidget(const char* camSubTopic, QWidget* parent) : QWidget(parent), shutdown_required(false), it(nh)
{
rejectCount = 0;
swapRG = true;
this->camSubTopic = new QString(camSubTopic);
qimage.load("src/usar_teleop/robot_operator_ui/res/place_holder.png");
ccs::computeScreenSize();
resizeImage();
outerLayout = new QGridLayout();
//outerLayout->addWidget(&fakeImgLbl, 0, 0);
this->setLayout(outerLayout);
//it(nh);
//sub = nh.subscribe<sensor_msgs::Image>(camSubTopic, 10, &CamWidget::callback, this);
swapTopic(camSubTopic);
}
void CamWidget::swapTopic(const char* camSubTopic)
{
cout << "camtopic: " << camSubTopic << endl;
QString tmpQstr(camSubTopic);
if(QString::compare(camSubTopic, "/camera/rgb/image_rect_color", Qt::CaseSensitive) )
swapRG = true;
else
swapRG = false;
if(QString::compare(camSubTopic, "/camera/ir/image", Qt::CaseSensitive) )
{
sub = it.subscribe(camSubTopic, 10, &CamWidget::callback, this);
cout << "********calling IMAGE" << endl;
}
else
{
//sub = nh.subscribe<sensor_msgs::Range>(camSubTopic, 10, &CamWidget::ir_callback, this);
cout << "*********Calling IR" << endl;
}
}
void CamWidget::paintEvent(QPaintEvent* event)
{
//cout << "@paintEvent(...)" << endl;
QPainter myPainter(this);
QPointF p(5, 5);
myPainter.drawImage(p, qimage);
}
void CamWidget::callback(const sensor_msgs::ImageConstPtr& msg)
{
//cout << "@CamWidget::callback(...)" << endl;
if(rejectCount < 10)
{
rejectCount++;
}
else
{
QImage tmpQimage(&(msg->data[0]), msg->width, msg->height, QImage::Format_RGB888);
if(swapRG)
qimage = tmpQimage.rgbSwapped();
else
qimage = tmpQimage;
resizeImage();
}
}
void CamWidget::ir_callback(const sensor_msgs::Range::ConstPtr& msg)
{
;
}
void CamWidget::resizeImage()
{
qimage = QImage(qimage.scaled(qimage.width()*1.4,
qimage.height()*1.4,
Qt::KeepAspectRatio) );
}
char* CamWidget::toString()
{
char* str = const_cast<char*>("***METHOD STUB @CamWidget::toString()***");
return str;
}
CamWidget::~CamWidget()
{
delete camSubTopic;
}
|
[
"james.perl12@gmail.com"
] |
james.perl12@gmail.com
|
09b2f56cbde52f782e9ad2555f0d17e2ea7c2aa0
|
33546aee6429d5b8f19a02e14699b6ebb5b34af8
|
/src/chrome/browser/ui/views/first_run_bubble.cc
|
d1457e4b6a9c5536fd8916404014531eff7b2dfc
|
[
"BSD-3-Clause"
] |
permissive
|
mYoda/CustomBrs
|
bdbf992c0db0bf2fd1821fa1fd0120ac77ffc011
|
493fc461eb7ea7321c51c6831fe737cfb21fdd3e
|
refs/heads/master
| 2022-11-22T09:11:37.873894
| 2022-11-10T10:02:49
| 2022-11-10T10:02:49
| 24,951,822
| 0
| 1
| null | 2022-11-02T14:39:34
| 2014-10-08T17:22:30
|
C++
|
UTF-8
|
C++
| false
| false
| 3,502
|
cc
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/first_run_bubble.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/search_engines/util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/link.h"
#include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
namespace {
const int kAnchorVerticalInset = 5;
const int kTopInset = 1;
const int kLeftInset = 2;
const int kBottomInset = 7;
const int kRightInset = 2;
} // namespace
// static
FirstRunBubble* FirstRunBubble::ShowBubble(Browser* browser,
views::View* anchor_view) {
first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_SHOWN);
FirstRunBubble* delegate = new FirstRunBubble(browser, anchor_view);
views::BubbleDelegateView::CreateBubble(delegate)->Show();
return delegate;
}
void FirstRunBubble::Init() {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
const gfx::FontList& original_font_list =
rb.GetFontList(ui::ResourceBundle::MediumFont);
views::Label* title = new views::Label(
l10n_util::GetStringFUTF16(
IDS_FR_BUBBLE_TITLE,
browser_ ? GetDefaultSearchEngineName(browser_->profile())
: base::string16()),
original_font_list.Derive(2, gfx::Font::BOLD));
/*views::Link* change =
new views::Link(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE));
change->SetFontList(original_font_list);
change->set_listener(this);*/
views::Label* subtext =
new views::Label(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT),
original_font_list);
views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
layout->SetInsets(kTopInset, kLeftInset, kBottomInset, kRightInset);
views::ColumnSet* columns = layout->AddColumnSet(0);
columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0,
views::GridLayout::USE_PREF, 0, 0);
columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing);
columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0,
views::GridLayout::USE_PREF, 0, 0);
columns->AddPaddingColumn(1, 0);
layout->StartRow(0, 0);
layout->AddView(title);
// layout->AddView(change);
layout->StartRowWithPadding(0, 0, 0,
views::kRelatedControlSmallVerticalSpacing);
layout->AddView(subtext, columns->num_columns(), 1);
}
FirstRunBubble::FirstRunBubble(Browser* browser, views::View* anchor_view)
: views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT),
browser_(browser) {
// Compensate for built-in vertical padding in the anchor view's image.
set_anchor_view_insets(
gfx::Insets(kAnchorVerticalInset, 0, kAnchorVerticalInset, 0));
}
FirstRunBubble::~FirstRunBubble() {
}
void FirstRunBubble::LinkClicked(views::Link* source, int event_flags) {
first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED);
GetWidget()->Close();
if (browser_)
chrome::ShowSearchEngineSettings(browser_);
}
|
[
"nechayukanton@gmail.com"
] |
nechayukanton@gmail.com
|
cd2b7532e5defff5621b0c732147b64e6ed90b88
|
d3d29f88b30705e1ee815ff22ab2fe1e1bbcc637
|
/solution1/sim/autowrap/testbench/feature.cpp_pre.cpp.line.cpp
|
6ff7504c76a760e4b68b95870c5d70c838b914a5
|
[] |
no_license
|
sammy17/maxi_feature
|
9508e380a9dc4c1cbe6608b2b64bb70d91a750ba
|
8d838bcffd9229d577054dd90504606136d93afc
|
refs/heads/master
| 2021-09-04T03:12:36.959448
| 2017-11-21T08:41:25
| 2017-11-21T08:41:25
| 111,329,528
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,722,165
|
cpp
|
#pragma line 1 "F:/maxi/feature_maxi/feature.cpp"
#pragma line 1 "<built-in>"
#pragma line 1 "<command-line>"
#pragma line 1 "F:/maxi/feature_maxi/feature.cpp"
#pragma line 1 "F:/maxi/feature_maxi/feature.h" 1
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 1
#pragma line 48 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_axi_sdata.h" 1
#pragma line 87 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_axi_sdata.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_int.h" 1
#pragma line 74 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_int.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h" 1
#pragma line 75 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 1 3
#pragma line 19 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/_mingw.h" 1 3
#pragma line 32 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/_mingw.h" 3
#pragma empty_line
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/_mingw.h" 3
#pragma line 20 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 212 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4
typedef unsigned int size_t;
#pragma line 353 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4
typedef short unsigned int wint_t;
#pragma line 27 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdarg.h" 1 3 4
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
#pragma line 29 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3
#pragma line 129 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
typedef struct _iobuf
{
char* _ptr;
int _cnt;
char* _base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char* _tmpfname;
} FILE;
#pragma line 154 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
extern __attribute__ ((__dllimport__)) FILE _iob[];
#pragma line 163 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
extern "C" {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fopen (const char*, const char*);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) freopen (const char*, const char*, FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fflush (FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fclose (FILE*);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) remove (const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rename (const char*, const char*);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tmpfile (void);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tmpnam (char*);
#pragma empty_line
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _tempnam (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _rmtmp(void);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _unlink (const char*);
#pragma empty_line
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tempnam (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rmtmp(void);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) unlink (const char*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) setvbuf (FILE*, char*, int, size_t);
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) setbuf (FILE*, char*);
#pragma line 204 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_fprintf(FILE*, const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_printf(const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_sprintf(char*, const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_snprintf(char*, size_t, const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vfprintf(FILE*, const char*, __gnuc_va_list);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vprintf(const char*, __gnuc_va_list);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vsprintf(char*, const char*, __gnuc_va_list);
extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vsnprintf(char*, size_t, const char*, __gnuc_va_list);
#pragma line 293 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fprintf (FILE*, const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) printf (const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) sprintf (char*, const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfprintf (FILE*, const char*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vprintf (const char*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsprintf (char*, const char*, __gnuc_va_list);
#pragma line 308 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_fprintf(FILE*, const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_printf(const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_sprintf(char*, const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vfprintf(FILE*, const char*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vprintf(const char*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vsprintf(char*, const char*, __gnuc_va_list);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _snprintf (char*, size_t, const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vsnprintf (char*, size_t, const char*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vscprintf (const char*, __gnuc_va_list);
#pragma line 331 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) snprintf (char *, size_t, const char *, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsnprintf (char *, size_t, const char *, __gnuc_va_list);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vscanf (const char * __restrict__, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfscanf (FILE * __restrict__, const char * __restrict__,
__gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsscanf (const char * __restrict__,
const char * __restrict__, __gnuc_va_list);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fscanf (FILE*, const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) scanf (const char*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) sscanf (const char*, const char*, ...);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetc (FILE*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgets (char*, int, FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputc (int, FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputs (const char*, FILE*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) gets (char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) puts (const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ungetc (int, FILE*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _filbuf (FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _flsbuf (int, FILE*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getc (FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) *__F->_ptr++
: _filbuf (__F);
}
#pragma empty_line
inline int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putc (int __c, FILE* __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
: _flsbuf (__c, __F);
}
#pragma empty_line
inline int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getchar (void)
{
return (--(&_iob[0])->_cnt >= 0)
? (int) (unsigned char) *(&_iob[0])->_ptr++
: _filbuf ((&_iob[0]));
}
#pragma empty_line
inline int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putchar(int __c)
{
return (--(&_iob[1])->_cnt >= 0)
? (int) (unsigned char) (*(&_iob[1])->_ptr++ = (char)__c)
: _flsbuf (__c, (&_iob[1]));}
#pragma line 412 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fread (void*, size_t, size_t, FILE*);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwrite (const void*, size_t, size_t, FILE*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fseek (FILE*, long, int);
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ftell (FILE*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rewind (FILE*);
#pragma line 455 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
typedef long long fpos_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetpos (FILE*, fpos_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fsetpos (FILE*, const fpos_t*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) feof (FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ferror (FILE*);
#pragma empty_line
#pragma empty_line
inline int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) feof (FILE* __F)
{ return __F->_flag & 0x0010; }
inline int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ferror (FILE* __F)
{ return __F->_flag & 0x0020; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) clearerr (FILE*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) perror (const char*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _popen (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _pclose (FILE*);
#pragma empty_line
#pragma empty_line
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) popen (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) pclose (FILE*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _flushall (void);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fgetchar (void);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fputchar (int);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fdopen (int, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fileno (FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fcloseall (void);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fsopen (const char*, const char*, int);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _getmaxstdio (void);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _setmaxstdio (int);
#pragma line 522 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetchar (void);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputchar (int);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fdopen (int, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fileno (FILE*);
#pragma line 534 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 1 3
#pragma line 21 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 150 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4
typedef int ptrdiff_t;
#pragma line 22 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long __time32_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long long __time64_t;
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 3
typedef __time32_t time_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long _off_t;
#pragma empty_line
#pragma empty_line
typedef _off_t off_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef unsigned int _dev_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _dev_t dev_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef short _ino_t;
#pragma empty_line
#pragma empty_line
typedef _ino_t ino_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef int _pid_t;
#pragma empty_line
#pragma empty_line
typedef _pid_t pid_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef unsigned short _mode_t;
#pragma empty_line
#pragma empty_line
typedef _mode_t mode_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef int _sigset_t;
#pragma empty_line
#pragma empty_line
typedef _sigset_t sigset_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef int _ssize_t;
#pragma empty_line
#pragma empty_line
typedef _ssize_t ssize_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long long fpos64_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long long off64_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef unsigned int useconds_t;
#pragma line 535 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3
inline FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fopen64 (const char* filename, const char* mode)
{
return fopen (filename, mode);
}
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fseeko64 (FILE*, off64_t, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline off64_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ftello64 (FILE * stream)
{
fpos_t pos;
if (fgetpos(stream, &pos))
return -1LL;
else
return ((off64_t) pos);
}
#pragma line 563 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwprintf (FILE*, const wchar_t*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wprintf (const wchar_t*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfwprintf (FILE*, const wchar_t*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vwprintf (const wchar_t*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vsnwprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vscwprintf (const wchar_t*, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwscanf (FILE*, const wchar_t*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wscanf (const wchar_t*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) swscanf (const wchar_t*, const wchar_t*, ...);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetwc (FILE*);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputwc (wchar_t, FILE*);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ungetwc (wchar_t, FILE*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) swprintf (wchar_t*, const wchar_t*, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vswprintf (wchar_t*, const wchar_t*, __gnuc_va_list);
#pragma empty_line
#pragma empty_line
#pragma empty_line
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetws (wchar_t*, int, FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputws (const wchar_t*, FILE*);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getwc (FILE*);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getwchar (void);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _getws (wchar_t*);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putwc (wint_t, FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _putws (const wchar_t*);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putwchar (wint_t);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfdopen(int, const wchar_t *);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfopen (const wchar_t*, const wchar_t*);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfreopen (const wchar_t*, const wchar_t*, FILE*);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfsopen (const wchar_t*, const wchar_t*, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtmpnam (wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtempnam (const wchar_t*, const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wrename (const wchar_t*, const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wremove (const wchar_t*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wperror (const wchar_t*);
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wpopen (const wchar_t*, const wchar_t*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __gnuc_va_list arg);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vwscanf (const wchar_t * __restrict__, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfwscanf (FILE * __restrict__,
const wchar_t * __restrict__, __gnuc_va_list);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vswscanf (const wchar_t * __restrict__,
const wchar_t * __restrict__, __gnuc_va_list);
#pragma line 625 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3
FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wpopen (const wchar_t*, const wchar_t*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fgetwchar (void);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fputwchar (wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _getw (FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _putw (int, FILE*);
#pragma empty_line
#pragma empty_line
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetwchar (void);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputwchar (wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getw (FILE*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putw (int, FILE*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 76 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 3
#pragma empty_line
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++config.h" 1 3
#pragma line 153 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++config.h" 3
namespace std
{
typedef unsigned int size_t;
typedef int ptrdiff_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 393 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++config.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/os_defines.h" 1 3
#pragma line 394 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++config.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/cpu_defines.h" 1 3
#pragma line 397 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++config.h" 2 3
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 1 3
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
#pragma empty_line
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 3
#pragma empty_line
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iosfwd" 1 3
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iosfwd" 3
#pragma empty_line
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iosfwd" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stringfwd.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stringfwd.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stringfwd.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _Alloc>
class allocator;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _CharT>
struct char_traits;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
#pragma empty_line
template<> struct char_traits<char>;
#pragma empty_line
typedef basic_string<char> string;
#pragma empty_line
#pragma empty_line
template<> struct char_traits<wchar_t>;
#pragma empty_line
typedef basic_string<wchar_t> wstring;
#pragma line 85 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stringfwd.h" 3
#pragma empty_line
}
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iosfwd" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 1 3
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
#pragma empty_line
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 1 3
#pragma line 26 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 27 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 2 3
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wctype.h" 1 3
#pragma line 32 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wctype.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wctype.h" 2 3
#pragma line 54 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wctype.h" 3
extern "C" {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef wchar_t wctype_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswalnum(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswalpha(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswascii(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswcntrl(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswctype(wint_t, wctype_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) is_wctype(wint_t, wctype_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswdigit(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswgraph(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswlower(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswprint(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswpunct(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswspace(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswupper(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswxdigit(wint_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswblank (wint_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) towlower (wint_t);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) towupper (wint_t);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isleadbyte (int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __attribute__ ((__dllimport__)) unsigned short _ctype[];
#pragma empty_line
#pragma empty_line
extern __attribute__ ((__dllimport__)) unsigned short* _pctype;
#pragma line 148 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wctype.h" 3
typedef wchar_t wctrans_t;
#pragma line 157 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wctype.h" 3
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) towctrans(wint_t, wctrans_t);
wctrans_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wctrans(const char*);
wctype_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wctype(const char*);
#pragma empty_line
#pragma empty_line
}
#pragma line 46 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 2 3
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
extern "C" {
#pragma line 87 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
#pragma line 164 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstol (const wchar_t*, wchar_t**, int);
unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstoul (const wchar_t*, wchar_t**, int);
double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstod (const wchar_t*, wchar_t**);
#pragma empty_line
float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
#pragma empty_line
#pragma empty_line
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wgetenv(const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wputenv(const wchar_t*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsystem(const wchar_t*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfullpath (wchar_t*, const wchar_t*, size_t);
#pragma line 187 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wasctime (const struct tm*);
#pragma empty_line
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wctime (const time_t*);
#pragma empty_line
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wstrdate (wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wstrtime (wchar_t*);
#pragma line 207 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#pragma line 217 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscat (wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcschr (const wchar_t*, wchar_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscmp (const wchar_t*, const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscoll (const wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscpy (wchar_t*, const wchar_t*);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscspn (const wchar_t*, const wchar_t*);
#pragma empty_line
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcslen (const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsncat (wchar_t*, const wchar_t*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsncmp(const wchar_t*, const wchar_t*, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsncpy(wchar_t*, const wchar_t*, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcspbrk(const wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsrchr(const wchar_t*, wchar_t);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsspn(const wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsstr(const wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstok(wchar_t*, const wchar_t*);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsxfrm(wchar_t*, const wchar_t*, size_t);
#pragma line 243 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsdup (const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsicmp (const wchar_t*, const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsicoll (const wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcslwr (wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnset (wchar_t*, wchar_t, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsrev (wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsset (wchar_t*, wchar_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsupr (wchar_t*);
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsncoll(const wchar_t*, const wchar_t*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
#pragma line 264 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscmpi (const wchar_t *, const wchar_t *);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsdup (const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsicmp (const wchar_t*, const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsicoll (const wchar_t*, const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcslwr (wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsnicmp (const wchar_t*, const wchar_t*, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsnset (wchar_t*, wchar_t, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsrev (wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsset (wchar_t*, wchar_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsupr (wchar_t*);
#pragma line 292 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
typedef wchar_t _Wint_t;
#pragma empty_line
#pragma empty_line
typedef int mbstate_t;
#pragma empty_line
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) btowc(int);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbrlen(const char * __restrict__, size_t,
mbstate_t * __restrict__);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbrtowc(wchar_t * __restrict__, const char * __restrict__,
size_t, mbstate_t * __restrict__);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__,
size_t, mbstate_t * __restrict__);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcrtomb(char * __restrict__, wchar_t,
mbstate_t * __restrict__);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsrtombs(char * __restrict__, const wchar_t ** __restrict__,
size_t, mbstate_t * __restrict__);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wctob(wint_t);
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwide(FILE*, int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbsinit(const mbstate_t*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wmemset(wchar_t *, wchar_t, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wmemchr(const wchar_t*, wchar_t, size_t);
int wmemcmp(const wchar_t*, const wchar_t *, size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wmemcpy(wchar_t* __restrict__,
const wchar_t* __restrict__,
size_t);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wmemmove(wchar_t* s1, const wchar_t *, size_t);
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstoll(const wchar_t * __restrict__,
wchar_t** __restrict__, int);
unsigned long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstoull(const wchar_t * __restrict__,
wchar_t ** __restrict__, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef unsigned long _fsize_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct _wfinddata_t {
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
_fsize_t size;
wchar_t name[260];
};
struct _wfinddatai64_t {
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
long long size;
wchar_t name[260];
};
#pragma line 406 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdint.h" 1 3 4
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h" 1 3 4
#pragma line 24 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h" 3 4
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 25 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h" 2 3 4
#pragma empty_line
#pragma empty_line
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#pragma empty_line
#pragma empty_line
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef short int_least16_t;
typedef unsigned short uint_least16_t;
typedef int int_least32_t;
typedef unsigned uint_least32_t;
typedef long long int_least64_t;
typedef unsigned long long uint_least64_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef signed char int_fast8_t;
typedef unsigned char uint_fast8_t;
typedef short int_fast16_t;
typedef unsigned short uint_fast16_t;
typedef int int_fast32_t;
typedef unsigned int uint_fast32_t;
typedef long long int_fast64_t;
typedef unsigned long long uint_fast64_t;
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h" 3 4
typedef int intptr_t;
#pragma line 75 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h" 3 4
typedef unsigned int uintptr_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
#pragma line 4 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdint.h" 2 3 4
#pragma line 407 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 2 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _waccess (const wchar_t*, int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wchmod (const wchar_t*, int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcreat (const wchar_t*, int);
#pragma empty_line
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfindfirst (const wchar_t*, struct _wfinddata_t *);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfindnext (long, struct _wfinddata_t *);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wunlink (const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wopen (const wchar_t*, int, ...);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsopen (const wchar_t*, int, int, ...);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wmktemp (wchar_t*);
#pragma empty_line
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfindnexti64 (long, struct _wfinddatai64_t*);
#pragma line 454 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wchdir (const wchar_t*);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wgetcwd (wchar_t*, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wgetdcwd (int, wchar_t*, int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wmkdir (const wchar_t*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wrmdir (const wchar_t*);
#pragma line 471 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
struct _stat
{
_dev_t st_dev;
_ino_t st_ino;
_mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
time_t st_atime;
#pragma empty_line
time_t st_mtime;
time_t st_ctime;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct stat
{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
short st_nlink;
short st_uid;
short st_gid;
dev_t st_rdev;
off_t st_size;
time_t st_atime;
#pragma empty_line
time_t st_mtime;
time_t st_ctime;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct _stati64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
long long st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#pragma line 589 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wstat (const wchar_t*, struct _stat*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wstati64 (const wchar_t*, struct _stati64*);
#pragma line 612 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/wchar.h" 3
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsetlocale (int, const wchar_t*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexecl (const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexecle (const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexeclp (const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexeclpe (const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexecv (const wchar_t*, const wchar_t* const*);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexecvp (const wchar_t*, const wchar_t* const*);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
#pragma empty_line
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnl (int, const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnle (int, const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnlpe (int, const wchar_t*, const wchar_t*, ...);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnv (int, const wchar_t*, const wchar_t* const*);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnvp (int, const wchar_t*, const wchar_t* const*);
intptr_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 47 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 2 3
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
namespace std
{
using ::mbstate_t;
}
#pragma line 137 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
namespace std
{
#pragma empty_line
#pragma empty_line
using ::wint_t;
#pragma empty_line
using ::btowc;
using ::fgetwc;
using ::fgetws;
using ::fputwc;
using ::fputws;
using ::fwide;
using ::fwprintf;
using ::fwscanf;
using ::getwc;
using ::getwchar;
using ::mbrlen;
using ::mbrtowc;
using ::mbsinit;
using ::mbsrtowcs;
using ::putwc;
using ::putwchar;
#pragma empty_line
#pragma empty_line
#pragma empty_line
using ::swscanf;
using ::ungetwc;
using ::vfwprintf;
#pragma empty_line
using ::vfwscanf;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
using ::vswscanf;
#pragma empty_line
using ::vwprintf;
#pragma empty_line
using ::vwscanf;
#pragma empty_line
using ::wcrtomb;
using ::wcscat;
using ::wcscmp;
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
using ::wcsftime;
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
using ::wcsncpy;
using ::wcsrtombs;
using ::wcsspn;
using ::wcstod;
#pragma empty_line
using ::wcstof;
#pragma empty_line
using ::wcstok;
using ::wcstol;
using ::wcstoul;
using ::wcsxfrm;
using ::wctob;
using ::wmemcmp;
using ::wmemcpy;
using ::wmemmove;
using ::wmemset;
using ::wprintf;
using ::wscanf;
using ::wcschr;
using ::wcspbrk;
using ::wcsrchr;
using ::wcsstr;
using ::wmemchr;
#pragma empty_line
#pragma empty_line
inline wchar_t*
wcschr(wchar_t* __p, wchar_t __c)
{ return wcschr(const_cast<const wchar_t*>(__p), __c); }
#pragma empty_line
inline wchar_t*
wcspbrk(wchar_t* __s1, const wchar_t* __s2)
{ return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
#pragma empty_line
inline wchar_t*
wcsrchr(wchar_t* __p, wchar_t __c)
{ return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
#pragma empty_line
inline wchar_t*
wcsstr(wchar_t* __s1, const wchar_t* __s2)
{ return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
#pragma empty_line
inline wchar_t*
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
using ::wcstold;
#pragma line 259 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
using ::wcstoll;
using ::wcstoull;
#pragma empty_line
}
#pragma empty_line
namespace std
{
using ::__gnu_cxx::wcstold;
using ::__gnu_cxx::wcstoll;
using ::__gnu_cxx::wcstoull;
}
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 2 3
#pragma line 70 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
namespace std
{
#pragma empty_line
#pragma line 92 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
typedef long long streamoff;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef ptrdiff_t streamsize;
#pragma line 113 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
template<typename _StateT>
class fpos
{
private:
streamoff _M_off;
_StateT _M_state;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fpos()
: _M_off(0), _M_state() { }
#pragma line 135 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
fpos(streamoff __off)
: _M_off(__off), _M_state() { }
#pragma empty_line
#pragma empty_line
operator streamoff() const { return _M_off; }
#pragma empty_line
#pragma empty_line
void
state(_StateT __st)
{ _M_state = __st; }
#pragma empty_line
#pragma empty_line
_StateT
state() const
{ return _M_state; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fpos&
operator+=(streamoff __off)
{
_M_off += __off;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fpos&
operator-=(streamoff __off)
{
_M_off -= __off;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fpos
operator+(streamoff __off) const
{
fpos __pos(*this);
__pos += __off;
return __pos;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fpos
operator-(streamoff __off) const
{
fpos __pos(*this);
__pos -= __off;
return __pos;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
streamoff
operator-(const fpos& __other) const
{ return _M_off - __other._M_off; }
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _StateT>
inline bool
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
{ return streamoff(__lhs) == streamoff(__rhs); }
#pragma empty_line
template<typename _StateT>
inline bool
operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
{ return streamoff(__lhs) != streamoff(__rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef fpos<mbstate_t> streampos;
#pragma empty_line
typedef fpos<mbstate_t> wstreampos;
#pragma line 241 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/postypes.h" 3
#pragma empty_line
}
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iosfwd" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 76 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iosfwd" 3
class ios_base;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ios;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_streambuf;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_istream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ostream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_iostream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringbuf;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_istringstream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_ostringstream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringstream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_filebuf;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ifstream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ofstream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_fstream;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class istreambuf_iterator;
#pragma empty_line
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef basic_ios<char> ios;
#pragma empty_line
#pragma empty_line
typedef basic_streambuf<char> streambuf;
#pragma empty_line
#pragma empty_line
typedef basic_istream<char> istream;
#pragma empty_line
#pragma empty_line
typedef basic_ostream<char> ostream;
#pragma empty_line
#pragma empty_line
typedef basic_iostream<char> iostream;
#pragma empty_line
#pragma empty_line
typedef basic_stringbuf<char> stringbuf;
#pragma empty_line
#pragma empty_line
typedef basic_istringstream<char> istringstream;
#pragma empty_line
#pragma empty_line
typedef basic_ostringstream<char> ostringstream;
#pragma empty_line
#pragma empty_line
typedef basic_stringstream<char> stringstream;
#pragma empty_line
#pragma empty_line
typedef basic_filebuf<char> filebuf;
#pragma empty_line
#pragma empty_line
typedef basic_ifstream<char> ifstream;
#pragma empty_line
#pragma empty_line
typedef basic_ofstream<char> ofstream;
#pragma empty_line
#pragma empty_line
typedef basic_fstream<char> fstream;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef basic_ios<wchar_t> wios;
#pragma empty_line
#pragma empty_line
typedef basic_streambuf<wchar_t> wstreambuf;
#pragma empty_line
#pragma empty_line
typedef basic_istream<wchar_t> wistream;
#pragma empty_line
#pragma empty_line
typedef basic_ostream<wchar_t> wostream;
#pragma empty_line
#pragma empty_line
typedef basic_iostream<wchar_t> wiostream;
#pragma empty_line
#pragma empty_line
typedef basic_stringbuf<wchar_t> wstringbuf;
#pragma empty_line
#pragma empty_line
typedef basic_istringstream<wchar_t> wistringstream;
#pragma empty_line
#pragma empty_line
typedef basic_ostringstream<wchar_t> wostringstream;
#pragma empty_line
#pragma empty_line
typedef basic_stringstream<wchar_t> wstringstream;
#pragma empty_line
#pragma empty_line
typedef basic_filebuf<wchar_t> wfilebuf;
#pragma empty_line
#pragma empty_line
typedef basic_ifstream<wchar_t> wifstream;
#pragma empty_line
#pragma empty_line
typedef basic_ofstream<wchar_t> wofstream;
#pragma empty_line
#pragma empty_line
typedef basic_fstream<wchar_t> wfstream;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/exception" 1 3
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/exception" 3
#pragma empty_line
#pragma line 36 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/exception" 3
#pragma empty_line
#pragma GCC visibility push(default)
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern "C++" {
#pragma empty_line
namespace std
{
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/exception" 3
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual const char* what() const throw();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
class bad_exception : public exception
{
public:
bad_exception() throw() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual ~bad_exception() throw();
#pragma empty_line
#pragma empty_line
virtual const char* what() const throw();
};
#pragma empty_line
#pragma empty_line
typedef void (*terminate_handler) ();
#pragma empty_line
#pragma empty_line
typedef void (*unexpected_handler) ();
#pragma empty_line
#pragma empty_line
terminate_handler set_terminate(terminate_handler) throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
void terminate() throw() __attribute__ ((__noreturn__));
#pragma empty_line
#pragma empty_line
unexpected_handler set_unexpected(unexpected_handler) throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
void unexpected() __attribute__ ((__noreturn__));
#pragma line 118 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/exception" 3
bool uncaught_exception() throw() __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma line 143 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/exception" 3
void __verbose_terminate_handler();
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
}
#pragma empty_line
#pragma GCC visibility pop
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 1 3
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/functexcept.h" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/functexcept.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/exception_defines.h" 1 3
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/functexcept.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
__throw_bad_exception(void) __attribute__((__noreturn__));
#pragma empty_line
#pragma empty_line
void
__throw_bad_alloc(void) __attribute__((__noreturn__));
#pragma empty_line
#pragma empty_line
void
__throw_bad_cast(void) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_bad_typeid(void) __attribute__((__noreturn__));
#pragma empty_line
#pragma empty_line
void
__throw_logic_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_domain_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_invalid_argument(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_length_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_out_of_range(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_runtime_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_range_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_overflow_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_underflow_error(const char*) __attribute__((__noreturn__));
#pragma empty_line
#pragma empty_line
void
__throw_ios_failure(const char*) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_system_error(int) __attribute__((__noreturn__));
#pragma empty_line
void
__throw_future_error(int) __attribute__((__noreturn__));
#pragma empty_line
#pragma empty_line
void
__throw_bad_function_call() __attribute__((__noreturn__));
#pragma empty_line
#pragma empty_line
}
#pragma line 62 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cpp_type_traits.h" 1 3
#pragma line 36 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cpp_type_traits.h" 3
#pragma empty_line
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cpp_type_traits.h" 3
#pragma line 69 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cpp_type_traits.h" 3
namespace __gnu_cxx
{
#pragma empty_line
#pragma empty_line
template<typename _Iterator, typename _Container>
class __normal_iterator;
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
struct __true_type { };
struct __false_type { };
#pragma empty_line
template<bool>
struct __truth_type
{ typedef __false_type __type; };
#pragma empty_line
template<>
struct __truth_type<true>
{ typedef __true_type __type; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _Sp, class _Tp>
struct __traitor
{
enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
typedef typename __truth_type<__value>::__type __type;
};
#pragma empty_line
#pragma empty_line
template<typename, typename>
struct __are_same
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
template<typename _Tp>
struct __are_same<_Tp, _Tp>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_void
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
template<>
struct __is_void<void>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_integer
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<>
struct __is_integer<bool>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
template<>
struct __is_integer<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma line 199 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cpp_type_traits.h" 3
template<>
struct __is_integer<short>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<unsigned short>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<int>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<unsigned int>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<long>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<unsigned long>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_integer<unsigned long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_floating
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
#pragma empty_line
template<>
struct __is_floating<float>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_floating<double>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_floating<long double>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_pointer
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
template<typename _Tp>
struct __is_pointer<_Tp*>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_normal_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
template<typename _Iterator, typename _Container>
struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
_Container> >
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_arithmetic
: public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
{ };
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_fundamental
: public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
{ };
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_scalar
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
{ };
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_char
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
template<>
struct __is_char<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
template<>
struct __is_char<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_byte
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma empty_line
template<>
struct __is_byte<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_byte<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
template<>
struct __is_byte<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __is_move_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
#pragma line 422 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cpp_type_traits.h" 3
#pragma empty_line
}
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/type_traits.h" 1 3
#pragma line 32 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/type_traits.h" 3
#pragma empty_line
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/type_traits.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool, typename>
struct __enable_if
{ };
#pragma empty_line
template<typename _Tp>
struct __enable_if<true, _Tp>
{ typedef _Tp __type; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _Cond, typename _Iftrue, typename _Iffalse>
struct __conditional_type
{ typedef _Iftrue __type; };
#pragma empty_line
template<typename _Iftrue, typename _Iffalse>
struct __conditional_type<false, _Iftrue, _Iffalse>
{ typedef _Iffalse __type; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __add_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
#pragma empty_line
public:
typedef typename __if_type::__type __type;
};
#pragma empty_line
template<>
struct __add_unsigned<char>
{ typedef unsigned char __type; };
#pragma empty_line
template<>
struct __add_unsigned<signed char>
{ typedef unsigned char __type; };
#pragma empty_line
template<>
struct __add_unsigned<short>
{ typedef unsigned short __type; };
#pragma empty_line
template<>
struct __add_unsigned<int>
{ typedef unsigned int __type; };
#pragma empty_line
template<>
struct __add_unsigned<long>
{ typedef unsigned long __type; };
#pragma empty_line
template<>
struct __add_unsigned<long long>
{ typedef unsigned long long __type; };
#pragma empty_line
#pragma empty_line
template<>
struct __add_unsigned<bool>;
#pragma empty_line
template<>
struct __add_unsigned<wchar_t>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct __remove_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
#pragma empty_line
public:
typedef typename __if_type::__type __type;
};
#pragma empty_line
template<>
struct __remove_unsigned<char>
{ typedef signed char __type; };
#pragma empty_line
template<>
struct __remove_unsigned<unsigned char>
{ typedef signed char __type; };
#pragma empty_line
template<>
struct __remove_unsigned<unsigned short>
{ typedef short __type; };
#pragma empty_line
template<>
struct __remove_unsigned<unsigned int>
{ typedef int __type; };
#pragma empty_line
template<>
struct __remove_unsigned<unsigned long>
{ typedef long __type; };
#pragma empty_line
template<>
struct __remove_unsigned<unsigned long long>
{ typedef long long __type; };
#pragma empty_line
#pragma empty_line
template<>
struct __remove_unsigned<bool>;
#pragma empty_line
template<>
struct __remove_unsigned<wchar_t>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Type>
inline bool
__is_null_pointer(_Type* __ptr)
{ return __ptr == 0; }
#pragma empty_line
template<typename _Type>
inline bool
__is_null_pointer(_Type)
{ return false; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
struct __promote
{ typedef double __type; };
#pragma empty_line
template<typename _Tp>
struct __promote<_Tp, false>
{ typedef _Tp __type; };
#pragma empty_line
template<typename _Tp, typename _Up>
struct __promote_2
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
#pragma empty_line
public:
typedef __typeof__(__type1() + __type2()) __type;
};
#pragma empty_line
template<typename _Tp, typename _Up, typename _Vp>
struct __promote_3
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
typedef typename __promote<_Vp>::__type __type3;
#pragma empty_line
public:
typedef __typeof__(__type1() + __type2() + __type3()) __type;
};
#pragma empty_line
template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
struct __promote_4
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
typedef typename __promote<_Vp>::__type __type3;
typedef typename __promote<_Wp>::__type __type4;
#pragma empty_line
public:
typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
};
#pragma empty_line
#pragma empty_line
}
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/numeric_traits.h" 1 3
#pragma line 32 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/numeric_traits.h" 3
#pragma empty_line
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/numeric_traits.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma line 54 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/numeric_traits.h" 3
template<typename _Value>
struct __numeric_traits_integer
{
#pragma empty_line
static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0);
static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool __is_signed = ((_Value)(-1) < 0);
static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0));
};
#pragma empty_line
template<typename _Value>
const _Value __numeric_traits_integer<_Value>::__min;
#pragma empty_line
template<typename _Value>
const _Value __numeric_traits_integer<_Value>::__max;
#pragma empty_line
template<typename _Value>
const bool __numeric_traits_integer<_Value>::__is_signed;
#pragma empty_line
template<typename _Value>
const int __numeric_traits_integer<_Value>::__digits;
#pragma line 99 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/numeric_traits.h" 3
template<typename _Value>
struct __numeric_traits_floating
{
#pragma empty_line
static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136);
#pragma empty_line
#pragma empty_line
static const bool __is_signed = true;
static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18);
static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932);
};
#pragma empty_line
template<typename _Value>
const int __numeric_traits_floating<_Value>::__max_digits10;
#pragma empty_line
template<typename _Value>
const bool __numeric_traits_floating<_Value>::__is_signed;
#pragma empty_line
template<typename _Value>
const int __numeric_traits_floating<_Value>::__digits10;
#pragma empty_line
template<typename _Value>
const int __numeric_traits_floating<_Value>::__max_exponent10;
#pragma empty_line
template<typename _Value>
struct __numeric_traits
: public __conditional_type<std::__is_integer<_Value>::__value,
__numeric_traits_integer<_Value>,
__numeric_traits_floating<_Value> >::__type
{ };
#pragma empty_line
#pragma empty_line
}
#pragma line 65 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_pair.h" 1 3
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_pair.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/move.h" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/move.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/concept_check.h" 1 3
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/concept_check.h" 3
#pragma empty_line
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/concept_check.h" 3
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/move.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
inline _Tp*
__addressof(_Tp& __r)
{
return reinterpret_cast<_Tp*>
(&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
}
#pragma empty_line
#pragma empty_line
}
#pragma line 109 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/move.h" 3
namespace std
{
#pragma empty_line
#pragma line 120 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/move.h" 3
template<typename _Tp>
inline void
swap(_Tp& __a, _Tp& __b)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
_Tp __tmp = (__a);
__a = (__b);
__b = (__tmp);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp, size_t _Nm>
inline void
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
{
for (size_t __n = 0; __n < _Nm; ++__n)
swap(__a[__n], __b[__n]);
}
#pragma empty_line
#pragma empty_line
}
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_pair.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 86 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_pair.h" 3
template<class _T1, class _T2>
struct pair
{
typedef _T1 first_type;
typedef _T2 second_type;
#pragma empty_line
_T1 first;
_T2 second;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
pair()
: first(), second() { }
#pragma empty_line
#pragma empty_line
pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) { }
#pragma empty_line
#pragma empty_line
template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
#pragma line 196 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_pair.h" 3
};
#pragma empty_line
#pragma empty_line
template<class _T1, class _T2>
inline bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; }
#pragma empty_line
#pragma empty_line
template<class _T1, class _T2>
inline bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); }
#pragma empty_line
#pragma empty_line
template<class _T1, class _T2>
inline bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); }
#pragma empty_line
#pragma empty_line
template<class _T1, class _T2>
inline bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; }
#pragma empty_line
#pragma empty_line
template<class _T1, class _T2>
inline bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); }
#pragma empty_line
#pragma empty_line
template<class _T1, class _T2>
inline bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
#pragma line 270 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_pair.h" 3
template<class _T1, class _T2>
inline pair<_T1, _T2>
make_pair(_T1 __x, _T2 __y)
{ return pair<_T1, _T2>(__x, __y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_types.h" 1 3
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_types.h" 3
#pragma empty_line
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_types.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 90 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_types.h" 3
struct input_iterator_tag { };
#pragma empty_line
#pragma empty_line
struct output_iterator_tag { };
#pragma empty_line
#pragma empty_line
struct forward_iterator_tag : public input_iterator_tag { };
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct bidirectional_iterator_tag : public forward_iterator_tag { };
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct random_access_iterator_tag : public bidirectional_iterator_tag { };
#pragma line 117 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_types.h" 3
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
typename _Pointer = _Tp*, typename _Reference = _Tp&>
struct iterator
{
#pragma empty_line
typedef _Category iterator_category;
#pragma empty_line
typedef _Tp value_type;
#pragma empty_line
typedef _Distance difference_type;
#pragma empty_line
typedef _Pointer pointer;
#pragma empty_line
typedef _Reference reference;
};
#pragma line 163 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_types.h" 3
template<typename _Iterator>
struct iterator_traits
{
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct iterator_traits<_Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct iterator_traits<const _Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Iter>
inline typename iterator_traits<_Iter>::iterator_category
__iterator_category(const _Iter&)
{ return typename iterator_traits<_Iter>::iterator_category(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Iterator, bool _HasBase>
struct _Iter_base
{
typedef _Iterator iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it; }
};
#pragma empty_line
template<typename _Iterator>
struct _Iter_base<_Iterator, true>
{
typedef typename _Iterator::iterator_type iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it.base(); }
};
#pragma empty_line
#pragma empty_line
}
#pragma line 67 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_funcs.h" 1 3
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_funcs.h" 3
#pragma empty_line
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_funcs.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last,
input_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last)
{
++__first;
++__n;
}
return __n;
}
#pragma empty_line
template<typename _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return __last - __first;
}
#pragma line 111 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_funcs.h" 3
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last)
{
#pragma empty_line
return std::__distance(__first, __last,
std::__iterator_category(__first));
}
#pragma empty_line
template<typename _InputIterator, typename _Distance>
inline void
__advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
{
#pragma empty_line
#pragma empty_line
while (__n--)
++__i;
}
#pragma empty_line
template<typename _BidirectionalIterator, typename _Distance>
inline void
__advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__n > 0)
while (__n--)
++__i;
else
while (__n++)
--__i;
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance>
inline void
__advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
__i += __n;
}
#pragma line 169 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_funcs.h" 3
template<typename _InputIterator, typename _Distance>
inline void
advance(_InputIterator& __i, _Distance __n)
{
#pragma empty_line
typename iterator_traits<_InputIterator>::difference_type __d = __n;
std::__advance(__i, __d, std::__iterator_category(__i));
}
#pragma line 200 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator_base_funcs.h" 3
#pragma empty_line
}
#pragma line 68 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 1 3
#pragma line 68 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
namespace std
{
#pragma empty_line
#pragma line 96 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Iterator>
class reverse_iterator
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
typename iterator_traits<_Iterator>::pointer,
typename iterator_traits<_Iterator>::reference>
{
protected:
_Iterator current;
#pragma empty_line
typedef iterator_traits<_Iterator> __traits_type;
#pragma empty_line
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::pointer pointer;
typedef typename __traits_type::reference reference;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator() : current() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
reverse_iterator(iterator_type __x) : current(__x) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator(const reverse_iterator& __x)
: current(__x.current) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
: current(__x.base()) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator_type
base() const
{ return current; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
operator*() const
{
_Iterator __tmp = current;
return *--__tmp;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
pointer
operator->() const
{ return &(operator*()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator&
operator++()
{
--current;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
operator++(int)
{
reverse_iterator __tmp = *this;
--current;
return __tmp;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator&
operator--()
{
++current;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
operator--(int)
{
reverse_iterator __tmp = *this;
++current;
return __tmp;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
operator+(difference_type __n) const
{ return reverse_iterator(current - __n); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator&
operator+=(difference_type __n)
{
current -= __n;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
operator-(difference_type __n) const
{ return reverse_iterator(current + __n); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator&
operator-=(difference_type __n)
{
current += __n;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
operator[](difference_type __n) const
{ return *(*this + __n); }
};
#pragma line 283 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Iterator>
inline bool
operator==(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
#pragma empty_line
template<typename _Iterator>
inline bool
operator<(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() < __x.base(); }
#pragma empty_line
template<typename _Iterator>
inline bool
operator!=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x == __y); }
#pragma empty_line
template<typename _Iterator>
inline bool
operator>(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y < __x; }
#pragma empty_line
template<typename _Iterator>
inline bool
operator<=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__y < __x); }
#pragma empty_line
template<typename _Iterator>
inline bool
operator>=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x < __y); }
#pragma empty_line
template<typename _Iterator>
inline typename reverse_iterator<_Iterator>::difference_type
operator-(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() - __x.base(); }
#pragma empty_line
template<typename _Iterator>
inline reverse_iterator<_Iterator>
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
const reverse_iterator<_Iterator>& __x)
{ return reverse_iterator<_Iterator>(__x.base() - __n); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
inline bool
operator==(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __x.base() == __y.base(); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __y.base() < __x.base(); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
inline bool
operator!=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__x == __y); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __y < __x; }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__y < __x); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__x < __y); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR>
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline typename reverse_iterator<_IteratorL>::difference_type
operator-(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
#pragma empty_line
{ return __y.base() - __x.base(); }
#pragma line 395 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Container>
class back_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
#pragma empty_line
public:
#pragma empty_line
typedef _Container container_type;
#pragma empty_line
#pragma empty_line
explicit
back_insert_iterator(_Container& __x) : container(&__x) { }
#pragma line 422 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
back_insert_iterator&
operator=(typename _Container::const_reference __value)
{
container->push_back(__value);
return *this;
}
#pragma line 445 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
back_insert_iterator&
operator*()
{ return *this; }
#pragma empty_line
#pragma empty_line
back_insert_iterator&
operator++()
{ return *this; }
#pragma empty_line
#pragma empty_line
back_insert_iterator
operator++(int)
{ return *this; }
};
#pragma line 471 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Container>
inline back_insert_iterator<_Container>
back_inserter(_Container& __x)
{ return back_insert_iterator<_Container>(__x); }
#pragma line 486 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Container>
class front_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
#pragma empty_line
public:
#pragma empty_line
typedef _Container container_type;
#pragma empty_line
#pragma empty_line
explicit front_insert_iterator(_Container& __x) : container(&__x) { }
#pragma line 512 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
front_insert_iterator&
operator=(typename _Container::const_reference __value)
{
container->push_front(__value);
return *this;
}
#pragma line 535 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
front_insert_iterator&
operator*()
{ return *this; }
#pragma empty_line
#pragma empty_line
front_insert_iterator&
operator++()
{ return *this; }
#pragma empty_line
#pragma empty_line
front_insert_iterator
operator++(int)
{ return *this; }
};
#pragma line 561 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Container>
inline front_insert_iterator<_Container>
front_inserter(_Container& __x)
{ return front_insert_iterator<_Container>(__x); }
#pragma line 580 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Container>
class insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
typename _Container::iterator iter;
#pragma empty_line
public:
#pragma empty_line
typedef _Container container_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(&__x), iter(__i) {}
#pragma line 623 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
insert_iterator&
operator=(typename _Container::const_reference __value)
{
iter = container->insert(iter, __value);
++iter;
return *this;
}
#pragma line 649 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
insert_iterator&
operator*()
{ return *this; }
#pragma empty_line
#pragma empty_line
insert_iterator&
operator++()
{ return *this; }
#pragma empty_line
#pragma empty_line
insert_iterator&
operator++(int)
{ return *this; }
};
#pragma line 675 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _Container, typename _Iterator>
inline insert_iterator<_Container>
inserter(_Container& __x, _Iterator __i)
{
return insert_iterator<_Container>(__x,
typename _Container::iterator(__i));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma line 699 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
using std::iterator_traits;
using std::iterator;
template<typename _Iterator, typename _Container>
class __normal_iterator
{
protected:
_Iterator _M_current;
#pragma empty_line
typedef iterator_traits<_Iterator> __traits_type;
#pragma empty_line
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::iterator_category iterator_category;
typedef typename __traits_type::value_type value_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::reference reference;
typedef typename __traits_type::pointer pointer;
#pragma empty_line
__normal_iterator() : _M_current(_Iterator()) { }
#pragma empty_line
explicit
__normal_iterator(const _Iterator& __i) : _M_current(__i) { }
#pragma empty_line
#pragma empty_line
template<typename _Iter>
__normal_iterator(const __normal_iterator<_Iter,
typename __enable_if<
(std::__are_same<_Iter, typename _Container::pointer>::__value),
_Container>::__type>& __i)
: _M_current(__i.base()) { }
#pragma empty_line
#pragma empty_line
reference
operator*() const
{ return *_M_current; }
#pragma empty_line
pointer
operator->() const
{ return _M_current; }
#pragma empty_line
__normal_iterator&
operator++()
{
++_M_current;
return *this;
}
#pragma empty_line
__normal_iterator
operator++(int)
{ return __normal_iterator(_M_current++); }
#pragma empty_line
#pragma empty_line
__normal_iterator&
operator--()
{
--_M_current;
return *this;
}
#pragma empty_line
__normal_iterator
operator--(int)
{ return __normal_iterator(_M_current--); }
#pragma empty_line
#pragma empty_line
reference
operator[](const difference_type& __n) const
{ return _M_current[__n]; }
#pragma empty_line
__normal_iterator&
operator+=(const difference_type& __n)
{ _M_current += __n; return *this; }
#pragma empty_line
__normal_iterator
operator+(const difference_type& __n) const
{ return __normal_iterator(_M_current + __n); }
#pragma empty_line
__normal_iterator&
operator-=(const difference_type& __n)
{ _M_current -= __n; return *this; }
#pragma empty_line
__normal_iterator
operator-(const difference_type& __n) const
{ return __normal_iterator(_M_current - __n); }
#pragma empty_line
const _Iterator&
base() const
{ return _M_current; }
};
#pragma line 797 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_iterator.h" 3
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() == __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline bool
operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() == __rhs.base(); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() != __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline bool
operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() != __rhs.base(); }
#pragma empty_line
#pragma empty_line
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() < __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline bool
operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() < __rhs.base(); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() > __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline bool
operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() > __rhs.base(); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() <= __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline bool
operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() <= __rhs.base(); }
#pragma empty_line
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() >= __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline bool
operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() >= __rhs.base(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _IteratorL, typename _IteratorR, typename _Container>
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline typename __normal_iterator<_IteratorL, _Container>::difference_type
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
#pragma empty_line
{ return __lhs.base() - __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline typename __normal_iterator<_Iterator, _Container>::difference_type
operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
{ return __lhs.base() - __rhs.base(); }
#pragma empty_line
template<typename _Iterator, typename _Container>
inline __normal_iterator<_Iterator, _Container>
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
__n, const __normal_iterator<_Iterator, _Container>& __i)
{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
#pragma empty_line
#pragma empty_line
}
#pragma line 69 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/debug/debug.h" 1 3
#pragma line 47 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/debug/debug.h" 3
namespace std
{
namespace __debug { }
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __gnu_debug
{
using namespace std::__debug;
}
#pragma line 71 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 2 3
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _BoolType>
struct __iter_swap
{
template<typename _ForwardIterator1, typename _ForwardIterator2>
static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
_ValueType1 __tmp = (*__a);
*__a = (*__b);
*__b = (__tmp);
}
};
#pragma empty_line
template<>
struct __iter_swap<true>
{
template<typename _ForwardIterator1, typename _ForwardIterator2>
static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
swap(*__a, *__b);
}
};
#pragma line 116 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef typename iterator_traits<_ForwardIterator1>::reference
_ReferenceType1;
typedef typename iterator_traits<_ForwardIterator2>::reference
_ReferenceType2;
std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
&& __are_same<_ValueType1&, _ReferenceType1>::__value
&& __are_same<_ValueType2&, _ReferenceType2>::__value>::
iter_swap(__a, __b);
}
#pragma line 157 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first1 != __last1; ++__first1, ++__first2)
std::iter_swap(__first1, __first2);
return __first2;
}
#pragma line 185 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _Tp>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__b < __a)
return __b;
return __a;
}
#pragma line 208 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _Tp>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__a < __b)
return __b;
return __a;
}
#pragma line 231 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _Tp, typename _Compare>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
#pragma empty_line
if (__comp(__b, __a))
return __b;
return __a;
}
#pragma line 252 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _Tp, typename _Compare>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
#pragma empty_line
if (__comp(__a, __b))
return __b;
return __a;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Iterator>
struct _Niter_base
: _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value>
{ };
#pragma empty_line
template<typename _Iterator>
inline typename _Niter_base<_Iterator>::iterator_type
__niter_base(_Iterator __it)
{ return std::_Niter_base<_Iterator>::_S_base(__it); }
#pragma empty_line
#pragma empty_line
template<typename _Iterator>
struct _Miter_base
: _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value>
{ };
#pragma empty_line
template<typename _Iterator>
inline typename _Miter_base<_Iterator>::iterator_type
__miter_base(_Iterator __it)
{ return std::_Miter_base<_Iterator>::_S_base(__it); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool, bool, typename>
struct __copy_move
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
};
#pragma line 319 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<>
struct __copy_move<false, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = *__first;
++__first;
++__result;
}
return __result;
}
};
#pragma line 357 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<bool _IsMove>
struct __copy_move<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
const ptrdiff_t _Num = __last - __first;
if (_Num)
__builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
return __result + _Num;
}
};
#pragma empty_line
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::value_type _ValueTypeI;
typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
typedef typename iterator_traits<_II>::iterator_category _Category;
const bool __simple = (__is_trivial(_ValueTypeI)
&& __is_pointer<_II>::__value
&& __is_pointer<_OI>::__value
&& __are_same<_ValueTypeI, _ValueTypeO>::__value);
#pragma empty_line
return std::__copy_move<_IsMove, __simple,
_Category>::__copy_m(__first, __last, __result);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
struct char_traits;
#pragma empty_line
template<typename _CharT, typename _Traits>
class istreambuf_iterator;
#pragma empty_line
template<typename _CharT, typename _Traits>
class ostreambuf_iterator;
#pragma empty_line
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(_CharT*, _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
#pragma empty_line
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(const _CharT*, const _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
#pragma empty_line
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
#pragma empty_line
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a2(_II __first, _II __last, _OI __result)
{
return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
std::__niter_base(__last),
std::__niter_base(__result)));
}
#pragma line 442 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _II, typename _OI>
inline _OI
copy(_II __first, _II __last, _OI __result)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
(std::__miter_base(__first), std::__miter_base(__last),
__result));
}
#pragma line 494 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<bool, bool, typename>
struct __copy_move_backward
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
};
#pragma line 522 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<>
struct __copy_move_backward<false, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
};
#pragma line 552 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<bool _IsMove>
struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
const ptrdiff_t _Num = __last - __first;
if (_Num)
__builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
#pragma empty_line
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename iterator_traits<_BI1>::value_type _ValueType1;
typedef typename iterator_traits<_BI2>::value_type _ValueType2;
typedef typename iterator_traits<_BI1>::iterator_category _Category;
const bool __simple = (__is_trivial(_ValueType1)
&& __is_pointer<_BI1>::__value
&& __is_pointer<_BI2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
#pragma empty_line
return std::__copy_move_backward<_IsMove, __simple,
_Category>::__copy_move_b(__first,
__last,
__result);
}
#pragma empty_line
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
{
return _BI2(std::__copy_move_backward_a<_IsMove>
(std::__niter_base(__first), std::__niter_base(__last),
std::__niter_base(__result)));
}
#pragma line 611 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
(std::__miter_base(__first), std::__miter_base(__last),
__result));
}
#pragma line 669 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
for (; __first != __last; ++__first)
*__first = __value;
}
#pragma empty_line
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
const _Tp __tmp = __value;
for (; __first != __last; ++__first)
*__first = __tmp;
}
#pragma empty_line
#pragma empty_line
template<typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
__fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
{
const _Tp __tmp = __c;
__builtin_memset(__first, static_cast<unsigned char>(__tmp),
__last - __first);
}
#pragma line 713 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _ForwardIterator, typename _Tp>
inline void
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
std::__fill_a(std::__niter_base(__first), std::__niter_base(__last),
__value);
}
#pragma empty_line
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __value;
return __first;
}
#pragma empty_line
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
const _Tp __tmp = __value;
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __tmp;
return __first;
}
#pragma empty_line
template<typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
__fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
{
std::__fill_a(__first, __first + __n, __c);
return __first + __n;
}
#pragma line 773 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _OI, typename _Size, typename _Tp>
inline _OI
fill_n(_OI __first, _Size __n, const _Tp& __value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value));
}
#pragma empty_line
template<bool _BoolType>
struct __equal
{
template<typename _II1, typename _II2>
static bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
for (; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
return false;
return true;
}
};
#pragma empty_line
template<>
struct __equal<true>
{
template<typename _Tp>
static bool
equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
{
return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
* (__last1 - __first1));
}
};
#pragma empty_line
template<typename _II1, typename _II2>
inline bool
__equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple = (__is_integer<_ValueType1>::__value
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
#pragma empty_line
return std::__equal<__simple>::equal(__first1, __last1, __first2);
}
#pragma empty_line
#pragma empty_line
template<typename, typename>
struct __lc_rai
{
template<typename _II1, typename _II2>
static _II1
__newlast1(_II1, _II1 __last1, _II2, _II2)
{ return __last1; }
#pragma empty_line
template<typename _II>
static bool
__cnd2(_II __first, _II __last)
{ return __first != __last; }
};
#pragma empty_line
template<>
struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
{
template<typename _RAI1, typename _RAI2>
static _RAI1
__newlast1(_RAI1 __first1, _RAI1 __last1,
_RAI2 __first2, _RAI2 __last2)
{
const typename iterator_traits<_RAI1>::difference_type
__diff1 = __last1 - __first1;
const typename iterator_traits<_RAI2>::difference_type
__diff2 = __last2 - __first2;
return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
}
#pragma empty_line
template<typename _RAI>
static bool
__cnd2(_RAI, _RAI)
{ return true; }
};
#pragma empty_line
template<bool _BoolType>
struct __lexicographical_compare
{
template<typename _II1, typename _II2>
static bool __lc(_II1, _II1, _II2, _II2);
};
#pragma empty_line
template<bool _BoolType>
template<typename _II1, typename _II2>
bool
__lexicographical_compare<_BoolType>::
__lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
{
typedef typename iterator_traits<_II1>::iterator_category _Category1;
typedef typename iterator_traits<_II2>::iterator_category _Category2;
typedef std::__lc_rai<_Category1, _Category2> __rai_type;
#pragma empty_line
__last1 = __rai_type::__newlast1(__first1, __last1,
__first2, __last2);
for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, ++__first2)
{
if (*__first1 < *__first2)
return true;
if (*__first2 < *__first1)
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
#pragma empty_line
template<>
struct __lexicographical_compare<true>
{
template<typename _Tp, typename _Up>
static bool
__lc(const _Tp* __first1, const _Tp* __last1,
const _Up* __first2, const _Up* __last2)
{
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
const int __result = __builtin_memcmp(__first1, __first2,
std::min(__len1, __len2));
return __result != 0 ? __result < 0 : __len1 < __len2;
}
};
#pragma empty_line
template<typename _II1, typename _II2>
inline bool
__lexicographical_compare_aux(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple =
(__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
&& !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
&& !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value);
#pragma empty_line
return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
__first2, __last2);
}
#pragma line 934 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _ForwardIterator, typename _Tp>
_ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
_DistanceType __len = std::distance(__first, __last);
#pragma empty_line
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (*__middle < __val)
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else
__len = __half;
}
return __first;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Size>
inline _Size
__lg(_Size __n)
{
_Size __k;
for (__k = 0; __n != 0; __n >>= 1)
++__k;
return __k - 1;
}
#pragma empty_line
inline int
__lg(int __n)
{ return sizeof(int) * 8 - 1 - __builtin_clz(__n); }
#pragma empty_line
inline long
__lg(long __n)
{ return sizeof(long) * 8 - 1 - __builtin_clzl(__n); }
#pragma empty_line
inline long long
__lg(long long __n)
{ return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1008 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _II1, typename _II2>
inline bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
return std::__equal_aux(std::__niter_base(__first1),
std::__niter_base(__last1),
std::__niter_base(__first2));
}
#pragma line 1040 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
_IIter2 __first2, _BinaryPredicate __binary_pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first1 != __last1; ++__first1, ++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
return false;
return true;
}
#pragma line 1071 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _II1, typename _II2>
inline bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
#pragma empty_line
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
return std::__lexicographical_compare_aux(std::__niter_base(__first1),
std::__niter_base(__last1),
std::__niter_base(__first2),
std::__niter_base(__last2));
}
#pragma line 1105 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _II1, typename _II2, typename _Compare>
bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2, _Compare __comp)
{
typedef typename iterator_traits<_II1>::iterator_category _Category1;
typedef typename iterator_traits<_II2>::iterator_category _Category2;
typedef std::__lc_rai<_Category1, _Category2> __rai_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
__last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, ++__first2)
{
if (__comp(*__first1, *__first2))
return true;
if (__comp(*__first2, *__first1))
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
#pragma line 1145 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _InputIterator1, typename _InputIterator2>
pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
while (__first1 != __last1 && *__first1 == *__first2)
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
#pragma line 1182 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algobase.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
#pragma empty_line
#pragma empty_line
}
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwchar" 3
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 2 3
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 3
template<typename _CharT>
struct _Char_types
{
typedef unsigned long int_type;
typedef std::streampos pos_type;
typedef std::streamoff off_type;
typedef std::mbstate_t state_type;
};
#pragma line 84 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 3
template<typename _CharT>
struct char_traits
{
typedef _CharT char_type;
typedef typename _Char_types<_CharT>::int_type int_type;
typedef typename _Char_types<_CharT>::pos_type pos_type;
typedef typename _Char_types<_CharT>::off_type off_type;
typedef typename _Char_types<_CharT>::state_type state_type;
#pragma empty_line
static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
#pragma empty_line
static bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
#pragma empty_line
static bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
#pragma empty_line
static int
compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
#pragma empty_line
static std::size_t
length(const char_type* __s);
#pragma empty_line
static const char_type*
find(const char_type* __s, std::size_t __n, const char_type& __a);
#pragma empty_line
static char_type*
move(char_type* __s1, const char_type* __s2, std::size_t __n);
#pragma empty_line
static char_type*
copy(char_type* __s1, const char_type* __s2, std::size_t __n);
#pragma empty_line
static char_type*
assign(char_type* __s, std::size_t __n, char_type __a);
#pragma empty_line
static char_type
to_char_type(const int_type& __c)
{ return static_cast<char_type>(__c); }
#pragma empty_line
static int_type
to_int_type(const char_type& __c)
{ return static_cast<int_type>(__c); }
#pragma empty_line
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
#pragma empty_line
static int_type
eof()
{ return static_cast<int_type>(-1); }
#pragma empty_line
static int_type
not_eof(const int_type& __c)
{ return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
};
#pragma empty_line
template<typename _CharT>
int
char_traits<_CharT>::
compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
{
for (std::size_t __i = 0; __i < __n; ++__i)
if (lt(__s1[__i], __s2[__i]))
return -1;
else if (lt(__s2[__i], __s1[__i]))
return 1;
return 0;
}
#pragma empty_line
template<typename _CharT>
std::size_t
char_traits<_CharT>::
length(const char_type* __p)
{
std::size_t __i = 0;
while (!eq(__p[__i], char_type()))
++__i;
return __i;
}
#pragma empty_line
template<typename _CharT>
const typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
find(const char_type* __s, std::size_t __n, const char_type& __a)
{
for (std::size_t __i = 0; __i < __n; ++__i)
if (eq(__s[__i], __a))
return __s + __i;
return 0;
}
#pragma empty_line
template<typename _CharT>
typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
move(char_type* __s1, const char_type* __s2, std::size_t __n)
{
return static_cast<_CharT*>(__builtin_memmove(__s1, __s2,
__n * sizeof(char_type)));
}
#pragma empty_line
template<typename _CharT>
typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
copy(char_type* __s1, const char_type* __s2, std::size_t __n)
{
#pragma empty_line
std::copy(__s2, __s2 + __n, __s1);
return __s1;
}
#pragma empty_line
template<typename _CharT>
typename char_traits<_CharT>::char_type*
char_traits<_CharT>::
assign(char_type* __s, std::size_t __n, char_type __a)
{
#pragma empty_line
std::fill_n(__s, __n, __a);
return __s;
}
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 228 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/char_traits.h" 3
template<class _CharT>
struct char_traits : public __gnu_cxx::char_traits<_CharT>
{ };
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<>
struct char_traits<char>
{
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
typedef mbstate_t state_type;
#pragma empty_line
static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
#pragma empty_line
static bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
#pragma empty_line
static bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
#pragma empty_line
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{ return __builtin_memcmp(__s1, __s2, __n); }
#pragma empty_line
static size_t
length(const char_type* __s)
{ return __builtin_strlen(__s); }
#pragma empty_line
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{ return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); }
#pragma empty_line
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{ return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); }
#pragma empty_line
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{ return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); }
#pragma empty_line
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{ return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); }
#pragma empty_line
static char_type
to_char_type(const int_type& __c)
{ return static_cast<char_type>(__c); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
static int_type
to_int_type(const char_type& __c)
{ return static_cast<int_type>(static_cast<unsigned char>(__c)); }
#pragma empty_line
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
#pragma empty_line
static int_type
eof()
{ return static_cast<int_type>(-1); }
#pragma empty_line
static int_type
not_eof(const int_type& __c)
{ return (__c == eof()) ? 0 : __c; }
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<>
struct char_traits<wchar_t>
{
typedef wchar_t char_type;
typedef wint_t int_type;
typedef streamoff off_type;
typedef wstreampos pos_type;
typedef mbstate_t state_type;
#pragma empty_line
static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
#pragma empty_line
static bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
#pragma empty_line
static bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
#pragma empty_line
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{ return wmemcmp(__s1, __s2, __n); }
#pragma empty_line
static size_t
length(const char_type* __s)
{ return wcslen(__s); }
#pragma empty_line
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{ return wmemchr(__s, __a, __n); }
#pragma empty_line
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{ return wmemmove(__s1, __s2, __n); }
#pragma empty_line
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{ return wmemcpy(__s1, __s2, __n); }
#pragma empty_line
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{ return wmemset(__s, __a, __n); }
#pragma empty_line
static char_type
to_char_type(const int_type& __c)
{ return char_type(__c); }
#pragma empty_line
static int_type
to_int_type(const char_type& __c)
{ return int_type(__c); }
#pragma empty_line
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
#pragma empty_line
static int_type
eof()
{ return static_cast<int_type>((wchar_t)(0xFFFF)); }
#pragma empty_line
static int_type
not_eof(const int_type& __c)
{ return eq_int_type(__c, eof()) ? 0 : __c; }
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/localefwd.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/localefwd.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/localefwd.h" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++locale.h" 1 3
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++locale.h" 3
#pragma empty_line
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++locale.h" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/clocale" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/clocale" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/clocale" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/locale.h" 1 3
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/locale.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/locale.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct lconv
{
char* decimal_point;
char* thousands_sep;
char* grouping;
char* int_curr_symbol;
char* currency_symbol;
char* mon_decimal_point;
char* mon_thousands_sep;
char* mon_grouping;
char* positive_sign;
char* negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
#pragma empty_line
#pragma empty_line
extern "C" {
#pragma empty_line
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) setlocale (int, const char*);
struct lconv* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) localeconv (void);
#pragma line 82 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/locale.h" 3
}
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/clocale" 2 3
#pragma line 53 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/clocale" 3
namespace std
{
using ::lconv;
using ::setlocale;
using ::localeconv;
}
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++locale.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
typedef int* __c_locale;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int
__convert_from_v(const __c_locale&, char* __out,
const int __size __attribute__((__unused__)),
const char* __fmt, ...)
{
char* __old = std::setlocale(4, 0);
char* __sav = 0;
if (__builtin_strcmp(__old, "C"))
{
const size_t __len = __builtin_strlen(__old) + 1;
__sav = new char[__len];
__builtin_memcpy(__sav, __old, __len);
std::setlocale(4, "C");
}
#pragma empty_line
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
#pragma empty_line
#pragma empty_line
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
__builtin_va_end(__args);
#pragma empty_line
if (__sav)
{
std::setlocale(4, __sav);
delete [] __sav;
}
return __ret;
}
#pragma empty_line
#pragma empty_line
}
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/localefwd.h" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 1 3
#pragma line 20 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 21 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 2 3
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
extern "C" {
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isalnum(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isalpha(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iscntrl(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isdigit(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isgraph(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) islower(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isprint(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ispunct(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isspace(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isupper(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isxdigit(int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isblank (int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _isctype (int, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tolower(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) toupper(int);
#pragma line 83 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _tolower(int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _toupper(int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __attribute__ ((__dllimport__)) int __mb_cur_max;
#pragma line 112 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
extern __attribute__ ((__dllimport__)) unsigned short _ctype[];
#pragma empty_line
#pragma empty_line
extern __attribute__ ((__dllimport__)) unsigned short* _pctype;
#pragma line 192 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswalnum(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswalpha(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswascii(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswcntrl(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswctype(wint_t, wctype_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) is_wctype(wint_t, wctype_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswdigit(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswgraph(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswlower(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswprint(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswpunct(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswspace(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswupper(wint_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswxdigit(wint_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iswblank (wint_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) towlower (wint_t);
wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) towupper (wint_t);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isleadbyte (int);
#pragma line 246 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __isascii (int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __toascii (int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __iscsymf (int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __iscsym (int);
#pragma line 260 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/ctype.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) isascii (int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) toascii (int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iscsymf (int);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) iscsym (int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 2 3
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 3
namespace std
{
using ::isalnum;
using ::isalpha;
using ::iscntrl;
using ::isdigit;
using ::isgraph;
using ::islower;
using ::isprint;
using ::ispunct;
using ::isspace;
using ::isupper;
using ::isxdigit;
using ::tolower;
using ::toupper;
}
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/localefwd.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 57 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/localefwd.h" 3
class locale;
#pragma empty_line
template<typename _Facet>
bool
has_facet(const locale&) throw();
#pragma empty_line
template<typename _Facet>
const _Facet&
use_facet(const locale&);
#pragma empty_line
#pragma empty_line
template<typename _CharT>
bool
isspace(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isprint(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
iscntrl(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isupper(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
islower(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isalpha(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isdigit(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
ispunct(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isxdigit(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isalnum(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
bool
isgraph(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
_CharT
toupper(_CharT, const locale&);
#pragma empty_line
template<typename _CharT>
_CharT
tolower(_CharT, const locale&);
#pragma empty_line
#pragma empty_line
class ctype_base;
template<typename _CharT>
class ctype;
template<> class ctype<char>;
#pragma empty_line
template<> class ctype<wchar_t>;
#pragma empty_line
template<typename _CharT>
class ctype_byname;
#pragma empty_line
#pragma empty_line
class codecvt_base;
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt;
template<> class codecvt<char, char, mbstate_t>;
#pragma empty_line
template<> class codecvt<wchar_t, char, mbstate_t>;
#pragma empty_line
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt_byname;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class num_get;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class num_put;
#pragma empty_line
template<typename _CharT> class numpunct;
template<typename _CharT> class numpunct_byname;
#pragma empty_line
#pragma empty_line
template<typename _CharT>
class collate;
template<typename _CharT> class
collate_byname;
#pragma empty_line
#pragma empty_line
class time_base;
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class time_get;
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class time_get_byname;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class time_put;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class time_put_byname;
#pragma empty_line
#pragma empty_line
class money_base;
#pragma empty_line
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class money_get;
template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
class money_put;
#pragma empty_line
template<typename _CharT, bool _Intl = false>
class moneypunct;
template<typename _CharT, bool _Intl = false>
class moneypunct_byname;
#pragma empty_line
#pragma empty_line
class messages_base;
template<typename _CharT>
class messages;
template<typename _CharT>
class messages_byname;
#pragma empty_line
#pragma empty_line
}
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/atomicity.h" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/atomicity.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr.h" 1 3
#pragma line 30 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr.h" 3
#pragma GCC visibility push(default)
#pragma line 162 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 1 3
#pragma line 70 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/errno.h" 1 3
#pragma line 80 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/errno.h" 3
extern "C" {
#pragma line 91 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/errno.h" 3
int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _errno(void);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 71 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 2 3
#pragma line 340 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 3
extern "C" {
#pragma empty_line
#pragma empty_line
typedef unsigned long __gthread_key_t;
#pragma empty_line
typedef struct {
int done;
long started;
} __gthread_once_t;
#pragma empty_line
typedef struct {
long counter;
void *sema;
} __gthread_mutex_t;
#pragma empty_line
typedef struct {
long counter;
long depth;
unsigned long owner;
void *sema;
} __gthread_recursive_mutex_t;
#pragma line 374 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 3
extern int _CRT_MT;
extern int __mingwthr_key_dtor (unsigned long, void (*) (void *));
#pragma line 401 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 3
static inline int
__gthread_active_p (void)
{
#pragma empty_line
return _CRT_MT;
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern int __gthr_win32_once (__gthread_once_t *, void (*) (void));
extern int __gthr_win32_key_create (__gthread_key_t *, void (*) (void*));
extern int __gthr_win32_key_delete (__gthread_key_t);
extern void * __gthr_win32_getspecific (__gthread_key_t);
extern int __gthr_win32_setspecific (__gthread_key_t, const void *);
extern void __gthr_win32_mutex_init_function (__gthread_mutex_t *);
extern int __gthr_win32_mutex_lock (__gthread_mutex_t *);
extern int __gthr_win32_mutex_trylock (__gthread_mutex_t *);
extern int __gthr_win32_mutex_unlock (__gthread_mutex_t *);
extern void
__gthr_win32_recursive_mutex_init_function (__gthread_recursive_mutex_t *);
extern int __gthr_win32_recursive_mutex_lock (__gthread_recursive_mutex_t *);
extern int
__gthr_win32_recursive_mutex_trylock (__gthread_recursive_mutex_t *);
extern int __gthr_win32_recursive_mutex_unlock (__gthread_recursive_mutex_t *);
extern void __gthr_win32_mutex_destroy (__gthread_mutex_t *);
#pragma empty_line
static inline int
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
{
if (__gthread_active_p ())
return __gthr_win32_once (__once, __func);
else
return -1;
}
#pragma empty_line
static inline int
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
{
return __gthr_win32_key_create (__key, __dtor);
}
#pragma empty_line
static inline int
__gthread_key_delete (__gthread_key_t __key)
{
return __gthr_win32_key_delete (__key);
}
#pragma empty_line
static inline void *
__gthread_getspecific (__gthread_key_t __key)
{
return __gthr_win32_getspecific (__key);
}
#pragma empty_line
static inline int
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
{
return __gthr_win32_setspecific (__key, __ptr);
}
#pragma empty_line
static inline void
__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
{
__gthr_win32_mutex_init_function (__mutex);
}
#pragma empty_line
static inline void
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
{
__gthr_win32_mutex_destroy (__mutex);
}
#pragma empty_line
static inline int
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthr_win32_mutex_lock (__mutex);
else
return 0;
}
#pragma empty_line
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthr_win32_mutex_trylock (__mutex);
else
return 0;
}
#pragma empty_line
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthr_win32_mutex_unlock (__mutex);
else
return 0;
}
#pragma empty_line
static inline void
__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
{
__gthr_win32_recursive_mutex_init_function (__mutex);
}
#pragma empty_line
static inline int
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthr_win32_recursive_mutex_lock (__mutex);
else
return 0;
}
#pragma empty_line
static inline int
__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthr_win32_recursive_mutex_trylock (__mutex);
else
return 0;
}
#pragma empty_line
static inline int
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthr_win32_recursive_mutex_unlock (__mutex);
else
return 0;
}
#pragma line 767 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr-default.h" 3
}
#pragma line 163 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/gthr.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma GCC visibility pop
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/atomicity.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/atomic_word.h" 1 3
#pragma line 32 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/atomic_word.h" 3
typedef int _Atomic_word;
#pragma line 36 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/atomicity.h" 2 3
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma line 54 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/atomicity.h" 3
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word*, int) throw ();
#pragma empty_line
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word*, int) throw ();
#pragma empty_line
#pragma empty_line
static inline _Atomic_word
__exchange_and_add_single(_Atomic_word* __mem, int __val)
{
_Atomic_word __result = *__mem;
*__mem += __val;
return __result;
}
#pragma empty_line
static inline void
__atomic_add_single(_Atomic_word* __mem, int __val)
{ *__mem += __val; }
#pragma empty_line
static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add_dispatch(_Atomic_word* __mem, int __val)
{
#pragma empty_line
if (__gthread_active_p())
return __exchange_and_add(__mem, __val);
else
return __exchange_and_add_single(__mem, __val);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
static inline void
__attribute__ ((__unused__))
__atomic_add_dispatch(_Atomic_word* __mem, int __val)
{
#pragma empty_line
if (__gthread_active_p())
__atomic_add(__mem, __val);
else
__atomic_add_single(__mem, __val);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
}
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 1 3
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 3
#pragma empty_line
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/allocator.h" 1 3
#pragma line 48 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/allocator.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++allocator.h" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++allocator.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/new_allocator.h" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/new_allocator.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/new" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/new" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/new" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma GCC visibility push(default)
#pragma empty_line
extern "C++" {
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual ~bad_alloc() throw();
#pragma empty_line
#pragma empty_line
virtual const char* what() const throw();
};
#pragma empty_line
struct nothrow_t { };
#pragma empty_line
extern const nothrow_t nothrow;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef void (*new_handler)();
#pragma empty_line
#pragma empty_line
#pragma empty_line
new_handler set_new_handler(new_handler) throw();
}
#pragma line 93 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/new" 3
void* operator new(std::size_t) throw (std::bad_alloc);
void* operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void*) throw();
void operator delete[](void*) throw();
void* operator new(std::size_t, const std::nothrow_t&) throw();
void* operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void*, const std::nothrow_t&) throw();
void operator delete[](void*, const std::nothrow_t&) throw();
#pragma empty_line
#pragma empty_line
inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
#pragma empty_line
#pragma empty_line
inline void operator delete (void*, void*) throw() { }
inline void operator delete[](void*, void*) throw() { }
#pragma empty_line
}
#pragma empty_line
#pragma GCC visibility pop
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/new_allocator.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __gnu_cxx
{
#pragma empty_line
#pragma empty_line
using std::size_t;
using std::ptrdiff_t;
#pragma line 53 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/new_allocator.h" 3
template<typename _Tp>
class new_allocator
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
#pragma empty_line
template<typename _Tp1>
struct rebind
{ typedef new_allocator<_Tp1> other; };
#pragma empty_line
new_allocator() throw() { }
#pragma empty_line
new_allocator(const new_allocator&) throw() { }
#pragma empty_line
template<typename _Tp1>
new_allocator(const new_allocator<_Tp1>&) throw() { }
#pragma empty_line
~new_allocator() throw() { }
#pragma empty_line
pointer
address(reference __x) const { return std::__addressof(__x); }
#pragma empty_line
const_pointer
address(const_reference __x) const { return std::__addressof(__x); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
pointer
allocate(size_type __n, const void* = 0)
{
if (__n > this->max_size())
std::__throw_bad_alloc();
#pragma empty_line
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
}
#pragma empty_line
#pragma empty_line
void
deallocate(pointer __p, size_type)
{ ::operator delete(__p); }
#pragma empty_line
size_type
max_size() const throw()
{ return size_t(-1) / sizeof(_Tp); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
construct(pointer __p, const _Tp& __val)
{ ::new((void *)__p) _Tp(__val); }
#pragma line 117 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ext/new_allocator.h" 3
void
destroy(pointer __p) { __p->~_Tp(); }
};
#pragma empty_line
template<typename _Tp>
inline bool
operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return true; }
#pragma empty_line
template<typename _Tp>
inline bool
operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return false; }
#pragma empty_line
#pragma empty_line
}
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/c++allocator.h" 2 3
#pragma line 49 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/allocator.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 65 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/allocator.h" 3
template<typename _Tp>
class allocator;
#pragma empty_line
#pragma empty_line
template<>
class allocator<void>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
#pragma empty_line
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
};
#pragma line 91 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/allocator.h" 3
template<typename _Tp>
class allocator: public __gnu_cxx::new_allocator<_Tp>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
#pragma empty_line
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
#pragma empty_line
allocator() throw() { }
#pragma empty_line
allocator(const allocator& __a) throw()
: __gnu_cxx::new_allocator<_Tp>(__a) { }
#pragma empty_line
template<typename _Tp1>
allocator(const allocator<_Tp1>&) throw() { }
#pragma empty_line
~allocator() throw() { }
#pragma empty_line
#pragma empty_line
};
#pragma empty_line
template<typename _T1, typename _T2>
inline bool
operator==(const allocator<_T1>&, const allocator<_T2>&)
{ return true; }
#pragma empty_line
template<typename _Tp>
inline bool
operator==(const allocator<_Tp>&, const allocator<_Tp>&)
{ return true; }
#pragma empty_line
template<typename _T1, typename _T2>
inline bool
operator!=(const allocator<_T1>&, const allocator<_T2>&)
{ return false; }
#pragma empty_line
template<typename _Tp>
inline bool
operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
{ return false; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class allocator<char>;
extern template class allocator<wchar_t>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Alloc, bool = __is_empty(_Alloc)>
struct __alloc_swap
{ static void _S_do_it(_Alloc&, _Alloc&) { } };
#pragma empty_line
template<typename _Alloc>
struct __alloc_swap<_Alloc, false>
{
static void
_S_do_it(_Alloc& __one, _Alloc& __two)
{
#pragma empty_line
if (__one != __two)
swap(__one, __two);
}
};
#pragma empty_line
#pragma empty_line
template<typename _Alloc, bool = __is_empty(_Alloc)>
struct __alloc_neq
{
static bool
_S_do_it(const _Alloc&, const _Alloc&)
{ return false; }
};
#pragma empty_line
template<typename _Alloc>
struct __alloc_neq<_Alloc, false>
{
static bool
_S_do_it(const _Alloc& __one, const _Alloc& __two)
{ return __one != __two; }
};
#pragma line 236 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/allocator.h" 3
#pragma empty_line
}
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 2 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream_insert.h" 1 3
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream_insert.h" 3
#pragma empty_line
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream_insert.h" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cxxabi_forced.h" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cxxabi_forced.h" 3
#pragma empty_line
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/cxxabi_forced.h" 3
#pragma empty_line
#pragma GCC visibility push(default)
#pragma empty_line
#pragma empty_line
namespace __cxxabiv1
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class __forced_unwind
{
virtual ~__forced_unwind() throw();
#pragma empty_line
#pragma empty_line
virtual void __pure_dummy() = 0;
};
}
#pragma empty_line
#pragma empty_line
#pragma GCC visibility pop
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream_insert.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
inline void
__ostream_write(basic_ostream<_CharT, _Traits>& __out,
const _CharT* __s, streamsize __n)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef typename __ostream_type::ios_base __ios_base;
#pragma empty_line
const streamsize __put = __out.rdbuf()->sputn(__s, __n);
if (__put != __n)
__out.setstate(__ios_base::badbit);
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline void
__ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef typename __ostream_type::ios_base __ios_base;
#pragma empty_line
const _CharT __c = __out.fill();
for (; __n > 0; --__n)
{
const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
if (_Traits::eq_int_type(__put, _Traits::eof()))
{
__out.setstate(__ios_base::badbit);
break;
}
}
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
__ostream_insert(basic_ostream<_CharT, _Traits>& __out,
const _CharT* __s, streamsize __n)
{
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef typename __ostream_type::ios_base __ios_base;
#pragma empty_line
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
try
{
const streamsize __w = __out.width();
if (__w > __n)
{
const bool __left = ((__out.flags()
& __ios_base::adjustfield)
== __ios_base::left);
if (!__left)
__ostream_fill(__out, __w - __n);
if (__out.good())
__ostream_write(__out, __s, __n);
if (__left && __out.good())
__ostream_fill(__out, __w - __n);
}
else
__ostream_write(__out, __s, __n);
__out.width(0);
}
catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(__ios_base::badbit);
throw;
}
catch(...)
{ __out._M_setstate(__ios_base::badbit); }
}
return __out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
#pragma empty_line
#pragma empty_line
extern template wostream& __ostream_insert(wostream&, const wchar_t*,
streamsize);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 47 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 1 3
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
namespace std
{
#pragma empty_line
#pragma line 101 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Arg, typename _Result>
struct unary_function
{
#pragma empty_line
typedef _Arg argument_type;
#pragma empty_line
#pragma empty_line
typedef _Result result_type;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Arg1, typename _Arg2, typename _Result>
struct binary_function
{
#pragma empty_line
typedef _Arg1 first_argument_type;
#pragma empty_line
#pragma empty_line
typedef _Arg2 second_argument_type;
#pragma empty_line
#pragma empty_line
typedef _Result result_type;
};
#pragma line 140 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Tp>
struct plus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x + __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct minus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x - __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct multiplies : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x * __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct divides : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x / __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct modulus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x % __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct negate : public unary_function<_Tp, _Tp>
{
_Tp
operator()(const _Tp& __x) const
{ return -__x; }
};
#pragma line 204 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Tp>
struct equal_to : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x == __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct not_equal_to : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x != __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct greater : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x > __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct less : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x < __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct greater_equal : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x >= __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct less_equal : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x <= __y; }
};
#pragma line 268 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Tp>
struct logical_and : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x && __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct logical_or : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x || __y; }
};
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct logical_not : public unary_function<_Tp, bool>
{
bool
operator()(const _Tp& __x) const
{ return !__x; }
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct bit_and : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x & __y; }
};
#pragma empty_line
template<typename _Tp>
struct bit_or : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x | __y; }
};
#pragma empty_line
template<typename _Tp>
struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x ^ __y; }
};
#pragma line 351 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Predicate>
class unary_negate
: public unary_function<typename _Predicate::argument_type, bool>
{
protected:
_Predicate _M_pred;
#pragma empty_line
public:
explicit
unary_negate(const _Predicate& __x) : _M_pred(__x) { }
#pragma empty_line
bool
operator()(const typename _Predicate::argument_type& __x) const
{ return !_M_pred(__x); }
};
#pragma empty_line
#pragma empty_line
template<typename _Predicate>
inline unary_negate<_Predicate>
not1(const _Predicate& __pred)
{ return unary_negate<_Predicate>(__pred); }
#pragma empty_line
#pragma empty_line
template<typename _Predicate>
class binary_negate
: public binary_function<typename _Predicate::first_argument_type,
typename _Predicate::second_argument_type, bool>
{
protected:
_Predicate _M_pred;
#pragma empty_line
public:
explicit
binary_negate(const _Predicate& __x) : _M_pred(__x) { }
#pragma empty_line
bool
operator()(const typename _Predicate::first_argument_type& __x,
const typename _Predicate::second_argument_type& __y) const
{ return !_M_pred(__x, __y); }
};
#pragma empty_line
#pragma empty_line
template<typename _Predicate>
inline binary_negate<_Predicate>
not2(const _Predicate& __pred)
{ return binary_negate<_Predicate>(__pred); }
#pragma line 422 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Arg, typename _Result>
class pointer_to_unary_function : public unary_function<_Arg, _Result>
{
protected:
_Result (*_M_ptr)(_Arg);
#pragma empty_line
public:
pointer_to_unary_function() { }
#pragma empty_line
explicit
pointer_to_unary_function(_Result (*__x)(_Arg))
: _M_ptr(__x) { }
#pragma empty_line
_Result
operator()(_Arg __x) const
{ return _M_ptr(__x); }
};
#pragma empty_line
#pragma empty_line
template<typename _Arg, typename _Result>
inline pointer_to_unary_function<_Arg, _Result>
ptr_fun(_Result (*__x)(_Arg))
{ return pointer_to_unary_function<_Arg, _Result>(__x); }
#pragma empty_line
#pragma empty_line
template<typename _Arg1, typename _Arg2, typename _Result>
class pointer_to_binary_function
: public binary_function<_Arg1, _Arg2, _Result>
{
protected:
_Result (*_M_ptr)(_Arg1, _Arg2);
#pragma empty_line
public:
pointer_to_binary_function() { }
#pragma empty_line
explicit
pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
: _M_ptr(__x) { }
#pragma empty_line
_Result
operator()(_Arg1 __x, _Arg2 __y) const
{ return _M_ptr(__x, __y); }
};
#pragma empty_line
#pragma empty_line
template<typename _Arg1, typename _Arg2, typename _Result>
inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
ptr_fun(_Result (*__x)(_Arg1, _Arg2))
{ return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
#pragma empty_line
#pragma empty_line
template<typename _Tp>
struct _Identity : public unary_function<_Tp,_Tp>
{
_Tp&
operator()(_Tp& __x) const
{ return __x; }
#pragma empty_line
const _Tp&
operator()(const _Tp& __x) const
{ return __x; }
};
#pragma empty_line
template<typename _Pair>
struct _Select1st : public unary_function<_Pair,
typename _Pair::first_type>
{
typename _Pair::first_type&
operator()(_Pair& __x) const
{ return __x.first; }
#pragma empty_line
const typename _Pair::first_type&
operator()(const _Pair& __x) const
{ return __x.first; }
#pragma line 508 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
};
#pragma empty_line
template<typename _Pair>
struct _Select2nd : public unary_function<_Pair,
typename _Pair::second_type>
{
typename _Pair::second_type&
operator()(_Pair& __x) const
{ return __x.second; }
#pragma empty_line
const typename _Pair::second_type&
operator()(const _Pair& __x) const
{ return __x.second; }
};
#pragma line 541 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 3
template<typename _Ret, typename _Tp>
class mem_fun_t : public unary_function<_Tp*, _Ret>
{
public:
explicit
mem_fun_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(_Tp* __p) const
{ return (__p->*_M_f)(); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp>
class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
{
public:
explicit
const_mem_fun_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(const _Tp* __p) const
{ return (__p->*_M_f)(); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)() const;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp>
class mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
mem_fun_ref_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(_Tp& __r) const
{ return (__r.*_M_f)(); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp>
class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(const _Tp& __r) const
{ return (__r.*_M_f)(); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)() const;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
{
public:
explicit
mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(_Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)(_Arg);
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(const _Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(_Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)(_Arg);
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) { }
#pragma empty_line
_Ret
operator()(const _Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
#pragma empty_line
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Ret, typename _Tp>
inline mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)())
{ return mem_fun_t<_Ret, _Tp>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp>
inline const_mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_t<_Ret, _Tp>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp>
inline mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)())
{ return mem_fun_ref_t<_Ret, _Tp>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp>
inline const_mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
#pragma empty_line
template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/backward/binders.h" 1 3
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/backward/binders.h" 3
namespace std
{
#pragma empty_line
#pragma line 99 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/backward/binders.h" 3
template<typename _Operation>
class binder1st
: public unary_function<typename _Operation::second_argument_type,
typename _Operation::result_type>
{
protected:
_Operation op;
typename _Operation::first_argument_type value;
#pragma empty_line
public:
binder1st(const _Operation& __x,
const typename _Operation::first_argument_type& __y)
: op(__x), value(__y) { }
#pragma empty_line
typename _Operation::result_type
operator()(const typename _Operation::second_argument_type& __x) const
{ return op(value, __x); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
typename _Operation::result_type
operator()(typename _Operation::second_argument_type& __x) const
{ return op(value, __x); }
} ;
#pragma empty_line
#pragma empty_line
template<typename _Operation, typename _Tp>
inline binder1st<_Operation>
bind1st(const _Operation& __fn, const _Tp& __x)
{
typedef typename _Operation::first_argument_type _Arg1_type;
return binder1st<_Operation>(__fn, _Arg1_type(__x));
}
#pragma empty_line
#pragma empty_line
template<typename _Operation>
class binder2nd
: public unary_function<typename _Operation::first_argument_type,
typename _Operation::result_type>
{
protected:
_Operation op;
typename _Operation::second_argument_type value;
#pragma empty_line
public:
binder2nd(const _Operation& __x,
const typename _Operation::second_argument_type& __y)
: op(__x), value(__y) { }
#pragma empty_line
typename _Operation::result_type
operator()(const typename _Operation::first_argument_type& __x) const
{ return op(__x, value); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
typename _Operation::result_type
operator()(typename _Operation::first_argument_type& __x) const
{ return op(__x, value); }
} ;
#pragma empty_line
#pragma empty_line
template<typename _Operation, typename _Tp>
inline binder2nd<_Operation>
bind2nd(const _Operation& __fn, const _Tp& __x)
{
typedef typename _Operation::second_argument_type _Arg2_type;
return binder2nd<_Operation>(__fn, _Arg2_type(__x));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 732 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_function.h" 2 3
#pragma line 51 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 2 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/range_access.h" 1 3
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/range_access.h" 3
#pragma empty_line
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/range_access.h" 3
#pragma line 54 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/initializer_list" 1 3
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/initializer_list" 3
#pragma empty_line
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/initializer_list" 3
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 106 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
class basic_string
{
typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
#pragma empty_line
#pragma empty_line
public:
typedef _Traits traits_type;
typedef typename _Traits::char_type value_type;
typedef _Alloc allocator_type;
typedef typename _CharT_alloc_type::size_type size_type;
typedef typename _CharT_alloc_type::difference_type difference_type;
typedef typename _CharT_alloc_type::reference reference;
typedef typename _CharT_alloc_type::const_reference const_reference;
typedef typename _CharT_alloc_type::pointer pointer;
typedef typename _CharT_alloc_type::const_pointer const_pointer;
typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;
typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
const_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
#pragma empty_line
private:
#pragma line 143 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
struct _Rep_base
{
size_type _M_length;
size_type _M_capacity;
_Atomic_word _M_refcount;
};
#pragma empty_line
struct _Rep : _Rep_base
{
#pragma empty_line
typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
#pragma line 168 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
static const size_type _S_max_size;
static const _CharT _S_terminal;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static size_type _S_empty_rep_storage[];
#pragma empty_line
static _Rep&
_S_empty_rep()
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
return *reinterpret_cast<_Rep*>(__p);
}
#pragma empty_line
bool
_M_is_leaked() const
{ return this->_M_refcount < 0; }
#pragma empty_line
bool
_M_is_shared() const
{ return this->_M_refcount > 0; }
#pragma empty_line
void
_M_set_leaked()
{ this->_M_refcount = -1; }
#pragma empty_line
void
_M_set_sharable()
{ this->_M_refcount = 0; }
#pragma empty_line
void
_M_set_length_and_sharable(size_type __n)
{
#pragma empty_line
if (__builtin_expect(this != &_S_empty_rep(), false))
#pragma empty_line
{
this->_M_set_sharable();
this->_M_length = __n;
traits_type::assign(this->_M_refdata()[__n], _S_terminal);
#pragma empty_line
#pragma empty_line
}
}
#pragma empty_line
_CharT*
_M_refdata() throw()
{ return reinterpret_cast<_CharT*>(this + 1); }
#pragma empty_line
_CharT*
_M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
{
return (!_M_is_leaked() && __alloc1 == __alloc2)
? _M_refcopy() : _M_clone(__alloc1);
}
#pragma empty_line
#pragma empty_line
static _Rep*
_S_create(size_type, size_type, const _Alloc&);
#pragma empty_line
void
_M_dispose(const _Alloc& __a)
{
#pragma empty_line
if (__builtin_expect(this != &_S_empty_rep(), false))
#pragma empty_line
{
#pragma empty_line
;
if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,
-1) <= 0)
{
;
_M_destroy(__a);
}
}
}
#pragma empty_line
void
_M_destroy(const _Alloc&) throw();
#pragma empty_line
_CharT*
_M_refcopy() throw()
{
#pragma empty_line
if (__builtin_expect(this != &_S_empty_rep(), false))
#pragma empty_line
__gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);
return _M_refdata();
}
#pragma empty_line
_CharT*
_M_clone(const _Alloc&, size_type __res = 0);
};
#pragma empty_line
#pragma empty_line
struct _Alloc_hider : _Alloc
{
_Alloc_hider(_CharT* __dat, const _Alloc& __a)
: _Alloc(__a), _M_p(__dat) { }
#pragma empty_line
_CharT* _M_p;
};
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const size_type npos = static_cast<size_type>(-1);
#pragma empty_line
private:
#pragma empty_line
mutable _Alloc_hider _M_dataplus;
#pragma empty_line
_CharT*
_M_data() const
{ return _M_dataplus._M_p; }
#pragma empty_line
_CharT*
_M_data(_CharT* __p)
{ return (_M_dataplus._M_p = __p); }
#pragma empty_line
_Rep*
_M_rep() const
{ return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
_M_ibegin() const
{ return iterator(_M_data()); }
#pragma empty_line
iterator
_M_iend() const
{ return iterator(_M_data() + this->size()); }
#pragma empty_line
void
_M_leak()
{
if (!_M_rep()->_M_is_leaked())
_M_leak_hard();
}
#pragma empty_line
size_type
_M_check(size_type __pos, const char* __s) const
{
if (__pos > this->size())
__throw_out_of_range((__s));
return __pos;
}
#pragma empty_line
void
_M_check_length(size_type __n1, size_type __n2, const char* __s) const
{
if (this->max_size() - (this->size() - __n1) < __n2)
__throw_length_error((__s));
}
#pragma empty_line
#pragma empty_line
size_type
_M_limit(size_type __pos, size_type __off) const
{
const bool __testoff = __off < this->size() - __pos;
return __testoff ? __off : this->size() - __pos;
}
#pragma empty_line
#pragma empty_line
bool
_M_disjunct(const _CharT* __s) const
{
return (less<const _CharT*>()(__s, _M_data())
|| less<const _CharT*>()(_M_data() + this->size(), __s));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
static void
_M_copy(_CharT* __d, const _CharT* __s, size_type __n)
{
if (__n == 1)
traits_type::assign(*__d, *__s);
else
traits_type::copy(__d, __s, __n);
}
#pragma empty_line
static void
_M_move(_CharT* __d, const _CharT* __s, size_type __n)
{
if (__n == 1)
traits_type::assign(*__d, *__s);
else
traits_type::move(__d, __s, __n);
}
#pragma empty_line
static void
_M_assign(_CharT* __d, size_type __n, _CharT __c)
{
if (__n == 1)
traits_type::assign(*__d, __c);
else
traits_type::assign(__d, __n, __c);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _Iterator>
static void
_S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
{
for (; __k1 != __k2; ++__k1, ++__p)
traits_type::assign(*__p, *__k1);
}
#pragma empty_line
static void
_S_copy_chars(_CharT* __p, iterator __k1, iterator __k2)
{ _S_copy_chars(__p, __k1.base(), __k2.base()); }
#pragma empty_line
static void
_S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)
{ _S_copy_chars(__p, __k1.base(), __k2.base()); }
#pragma empty_line
static void
_S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
{ _M_copy(__p, __k1, __k2 - __k1); }
#pragma empty_line
static void
_S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
{ _M_copy(__p, __k1, __k2 - __k1); }
#pragma empty_line
static int
_S_compare(size_type __n1, size_type __n2)
{
const difference_type __d = difference_type(__n1 - __n2);
#pragma empty_line
if (__d > __gnu_cxx::__numeric_traits<int>::__max)
return __gnu_cxx::__numeric_traits<int>::__max;
else if (__d < __gnu_cxx::__numeric_traits<int>::__min)
return __gnu_cxx::__numeric_traits<int>::__min;
else
return int(__d);
}
#pragma empty_line
void
_M_mutate(size_type __pos, size_type __len1, size_type __len2);
#pragma empty_line
void
_M_leak_hard();
#pragma empty_line
static _Rep&
_S_empty_rep()
{ return _Rep::_S_empty_rep(); }
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string()
#pragma empty_line
: _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
basic_string(const _Alloc& __a);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string(const basic_string& __str);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string(const basic_string& __str, size_type __pos,
size_type __n = npos);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a);
#pragma line 478 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string(const _CharT* __s, size_type __n,
const _Alloc& __a = _Alloc());
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
#pragma line 526 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<class _InputIterator>
basic_string(_InputIterator __beg, _InputIterator __end,
const _Alloc& __a = _Alloc());
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
~basic_string()
{ _M_rep()->_M_dispose(this->get_allocator()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
operator=(const basic_string& __str)
{ return this->assign(__str); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
operator=(const _CharT* __s)
{ return this->assign(__s); }
#pragma line 559 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
operator=(_CharT __c)
{
this->assign(1, __c);
return *this;
}
#pragma line 599 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
iterator
begin()
{
_M_leak();
return iterator(_M_data());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_iterator
begin() const
{ return const_iterator(_M_data()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
end()
{
_M_leak();
return iterator(_M_data() + this->size());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_iterator
end() const
{ return const_iterator(_M_data() + this->size()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
rbegin()
{ return reverse_iterator(this->end()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reverse_iterator
rbegin() const
{ return const_reverse_iterator(this->end()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
rend()
{ return reverse_iterator(this->begin()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reverse_iterator
rend() const
{ return const_reverse_iterator(this->begin()); }
#pragma line 705 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_type
size() const
{ return _M_rep()->_M_length; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_type
length() const
{ return _M_rep()->_M_length; }
#pragma empty_line
#pragma empty_line
size_type
max_size() const
{ return _Rep::_S_max_size; }
#pragma line 734 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
void
resize(size_type __n, _CharT __c);
#pragma line 747 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
void
resize(size_type __n)
{ this->resize(__n, _CharT()); }
#pragma line 767 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
capacity() const
{ return _M_rep()->_M_capacity; }
#pragma line 788 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
void
reserve(size_type __res_arg = 0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
clear()
{ _M_mutate(0, this->size(), 0); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
empty() const
{ return this->size() == 0; }
#pragma line 817 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
const_reference
operator[] (size_type __pos) const
{
;
return _M_data()[__pos];
}
#pragma line 834 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
reference
operator[](size_type __pos)
{
#pragma empty_line
;
#pragma empty_line
;
_M_leak();
return _M_data()[__pos];
}
#pragma line 855 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
const_reference
at(size_type __n) const
{
if (__n >= this->size())
__throw_out_of_range(("basic_string::at"));
return _M_data()[__n];
}
#pragma line 908 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
reference
at(size_type __n)
{
if (__n >= size())
__throw_out_of_range(("basic_string::at"));
_M_leak();
return _M_data()[__n];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
operator+=(const basic_string& __str)
{ return this->append(__str); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
operator+=(const _CharT* __s)
{ return this->append(__s); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
operator+=(_CharT __c)
{
this->push_back(__c);
return *this;
}
#pragma line 964 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
append(const basic_string& __str);
#pragma line 979 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
append(const basic_string& __str, size_type __pos, size_type __n);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
append(const _CharT* __s, size_type __n);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
append(const _CharT* __s)
{
;
return this->append(__s, traits_type::length(__s));
}
#pragma line 1011 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
append(size_type __n, _CharT __c);
#pragma line 1033 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<class _InputIterator>
basic_string&
append(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_iend(), _M_iend(), __first, __last); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
push_back(_CharT __c)
{
const size_type __len = 1 + this->size();
if (__len > this->capacity() || _M_rep()->_M_is_shared())
this->reserve(__len);
traits_type::assign(_M_data()[this->size()], __c);
_M_rep()->_M_set_length_and_sharable(__len);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
assign(const basic_string& __str);
#pragma line 1089 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
assign(const basic_string& __str, size_type __pos, size_type __n)
{ return this->assign(__str._M_data()
+ __str._M_check(__pos, "basic_string::assign"),
__str._M_limit(__pos, __n)); }
#pragma line 1105 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
assign(const _CharT* __s, size_type __n);
#pragma line 1117 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
assign(const _CharT* __s)
{
;
return this->assign(__s, traits_type::length(__s));
}
#pragma line 1133 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
assign(size_type __n, _CharT __c)
{ return _M_replace_aux(size_type(0), this->size(), __n, __c); }
#pragma line 1145 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<class _InputIterator>
basic_string&
assign(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
#pragma line 1173 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
void
insert(iterator __p, size_type __n, _CharT __c)
{ this->replace(__p, __p, __n, __c); }
#pragma line 1188 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<class _InputIterator>
void
insert(iterator __p, _InputIterator __beg, _InputIterator __end)
{ this->replace(__p, __p, __beg, __end); }
#pragma line 1219 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
insert(size_type __pos1, const basic_string& __str)
{ return this->insert(__pos1, __str, size_type(0), __str.size()); }
#pragma line 1241 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
insert(size_type __pos1, const basic_string& __str,
size_type __pos2, size_type __n)
{ return this->insert(__pos1, __str._M_data()
+ __str._M_check(__pos2, "basic_string::insert"),
__str._M_limit(__pos2, __n)); }
#pragma line 1264 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
insert(size_type __pos, const _CharT* __s, size_type __n);
#pragma line 1282 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
insert(size_type __pos, const _CharT* __s)
{
;
return this->insert(__pos, __s, traits_type::length(__s));
}
#pragma line 1305 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
insert(size_type __pos, size_type __n, _CharT __c)
{ return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
size_type(0), __n, __c); }
#pragma line 1322 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
iterator
insert(iterator __p, _CharT __c)
{
;
const size_type __pos = __p - _M_ibegin();
_M_replace_aux(__pos, size_type(0), size_type(1), __c);
_M_rep()->_M_set_leaked();
return iterator(_M_data() + __pos);
}
#pragma line 1346 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
erase(size_type __pos = 0, size_type __n = npos)
{
_M_mutate(_M_check(__pos, "basic_string::erase"),
_M_limit(__pos, __n), size_type(0));
return *this;
}
#pragma line 1362 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
iterator
erase(iterator __position)
{
#pragma empty_line
;
const size_type __pos = __position - _M_ibegin();
_M_mutate(__pos, size_type(1), size_type(0));
_M_rep()->_M_set_leaked();
return iterator(_M_data() + __pos);
}
#pragma line 1382 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
iterator
erase(iterator __first, iterator __last);
#pragma line 1401 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(size_type __pos, size_type __n, const basic_string& __str)
{ return this->replace(__pos, __n, __str._M_data(), __str.size()); }
#pragma line 1423 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(size_type __pos1, size_type __n1, const basic_string& __str,
size_type __pos2, size_type __n2)
{ return this->replace(__pos1, __n1, __str._M_data()
+ __str._M_check(__pos2, "basic_string::replace"),
__str._M_limit(__pos2, __n2)); }
#pragma line 1447 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2);
#pragma line 1466 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(size_type __pos, size_type __n1, const _CharT* __s)
{
;
return this->replace(__pos, __n1, __s, traits_type::length(__s));
}
#pragma line 1489 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
{ return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
_M_limit(__pos, __n1), __n2, __c); }
#pragma line 1507 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(iterator __i1, iterator __i2, const basic_string& __str)
{ return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
#pragma line 1525 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
{
#pragma empty_line
;
return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
}
#pragma line 1546 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(iterator __i1, iterator __i2, const _CharT* __s)
{
;
return this->replace(__i1, __i2, __s, traits_type::length(__s));
}
#pragma line 1567 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string&
replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
{
#pragma empty_line
;
return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
}
#pragma line 1589 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<class _InputIterator>
basic_string&
replace(iterator __i1, iterator __i2,
_InputIterator __k1, _InputIterator __k2)
{
#pragma empty_line
;
;
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_string&
replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
{
#pragma empty_line
;
;
return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
__k1, __k2 - __k1);
}
#pragma empty_line
basic_string&
replace(iterator __i1, iterator __i2,
const _CharT* __k1, const _CharT* __k2)
{
#pragma empty_line
;
;
return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
__k1, __k2 - __k1);
}
#pragma empty_line
basic_string&
replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
{
#pragma empty_line
;
;
return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
__k1.base(), __k2 - __k1);
}
#pragma empty_line
basic_string&
replace(iterator __i1, iterator __i2,
const_iterator __k1, const_iterator __k2)
{
#pragma empty_line
;
;
return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
__k1.base(), __k2 - __k1);
}
#pragma line 1664 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
private:
template<class _Integer>
basic_string&
_M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
_Integer __val, __true_type)
{ return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
#pragma empty_line
template<class _InputIterator>
basic_string&
_M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
_InputIterator __k2, __false_type);
#pragma empty_line
basic_string&
_M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
_CharT __c);
#pragma empty_line
basic_string&
_M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
size_type __n2);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _InIterator>
static _CharT*
_S_construct_aux(_InIterator __beg, _InIterator __end,
const _Alloc& __a, __false_type)
{
typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
return _S_construct(__beg, __end, __a, _Tag());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _Integer>
static _CharT*
_S_construct_aux(_Integer __beg, _Integer __end,
const _Alloc& __a, __true_type)
{ return _S_construct_aux_2(static_cast<size_type>(__beg),
__end, __a); }
#pragma empty_line
static _CharT*
_S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a)
{ return _S_construct(__req, __c, __a); }
#pragma empty_line
template<class _InIterator>
static _CharT*
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
{
typedef typename std::__is_integer<_InIterator>::__type _Integral;
return _S_construct_aux(__beg, __end, __a, _Integral());
}
#pragma empty_line
#pragma empty_line
template<class _InIterator>
static _CharT*
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _FwdIterator>
static _CharT*
_S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
forward_iterator_tag);
#pragma empty_line
static _CharT*
_S_construct(size_type __req, _CharT __c, const _Alloc& __a);
#pragma empty_line
public:
#pragma line 1745 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
#pragma line 1755 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
void
swap(basic_string& __s);
#pragma line 1765 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
const _CharT*
c_str() const
{ return _M_data(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const _CharT*
data() const
{ return _M_data(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
allocator_type
get_allocator() const
{ return _M_dataplus; }
#pragma line 1797 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find(const _CharT* __s, size_type __pos, size_type __n) const;
#pragma line 1810 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find(const basic_string& __str, size_type __pos = 0) const
{ return this->find(__str.data(), __pos, __str.size()); }
#pragma line 1824 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find(const _CharT* __s, size_type __pos = 0) const
{
;
return this->find(__s, __pos, traits_type::length(__s));
}
#pragma line 1841 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find(_CharT __c, size_type __pos = 0) const;
#pragma line 1854 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
rfind(const basic_string& __str, size_type __pos = npos) const
{ return this->rfind(__str.data(), __pos, __str.size()); }
#pragma line 1869 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
rfind(const _CharT* __s, size_type __pos, size_type __n) const;
#pragma line 1882 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
rfind(const _CharT* __s, size_type __pos = npos) const
{
;
return this->rfind(__s, __pos, traits_type::length(__s));
}
#pragma line 1899 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
rfind(_CharT __c, size_type __pos = npos) const;
#pragma line 1912 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_of(const basic_string& __str, size_type __pos = 0) const
{ return this->find_first_of(__str.data(), __pos, __str.size()); }
#pragma line 1927 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
#pragma line 1940 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_of(const _CharT* __s, size_type __pos = 0) const
{
;
return this->find_first_of(__s, __pos, traits_type::length(__s));
}
#pragma line 1959 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_of(_CharT __c, size_type __pos = 0) const
{ return this->find(__c, __pos); }
#pragma line 1973 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_of(const basic_string& __str, size_type __pos = npos) const
{ return this->find_last_of(__str.data(), __pos, __str.size()); }
#pragma line 1988 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
#pragma line 2001 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_of(const _CharT* __s, size_type __pos = npos) const
{
;
return this->find_last_of(__s, __pos, traits_type::length(__s));
}
#pragma line 2020 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_of(_CharT __c, size_type __pos = npos) const
{ return this->rfind(__c, __pos); }
#pragma line 2034 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_not_of(const basic_string& __str, size_type __pos = 0) const
{ return this->find_first_not_of(__str.data(), __pos, __str.size()); }
#pragma line 2049 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
#pragma line 2063 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_not_of(const _CharT* __s, size_type __pos = 0) const
{
;
return this->find_first_not_of(__s, __pos, traits_type::length(__s));
}
#pragma line 2080 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_first_not_of(_CharT __c, size_type __pos = 0) const;
#pragma line 2093 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_not_of(const basic_string& __str, size_type __pos = npos) const
{ return this->find_last_not_of(__str.data(), __pos, __str.size()); }
#pragma line 2109 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
#pragma line 2122 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_not_of(const _CharT* __s, size_type __pos = npos) const
{
;
return this->find_last_not_of(__s, __pos, traits_type::length(__s));
}
#pragma line 2139 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
size_type
find_last_not_of(_CharT __c, size_type __pos = npos) const;
#pragma line 2154 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
basic_string
substr(size_type __pos = 0, size_type __n = npos) const
{ return basic_string(*this,
_M_check(__pos, "basic_string::substr"), __n); }
#pragma line 2172 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
int
compare(const basic_string& __str) const
{
const size_type __size = this->size();
const size_type __osize = __str.size();
const size_type __len = std::min(__size, __osize);
#pragma empty_line
int __r = traits_type::compare(_M_data(), __str.data(), __len);
if (!__r)
__r = _S_compare(__size, __osize);
return __r;
}
#pragma line 2202 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
int
compare(size_type __pos, size_type __n, const basic_string& __str) const;
#pragma line 2226 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
int
compare(size_type __pos1, size_type __n1, const basic_string& __str,
size_type __pos2, size_type __n2) const;
#pragma line 2244 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
int
compare(const _CharT* __s) const;
#pragma line 2267 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
int
compare(size_type __pos, size_type __n1, const _CharT* __s) const;
#pragma line 2292 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
int
compare(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2) const;
};
#pragma line 2304 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{
basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
__str.append(__rhs);
return __str;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT,_Traits,_Alloc>
operator+(const _CharT* __lhs,
const basic_string<_CharT,_Traits,_Alloc>& __rhs);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT,_Traits,_Alloc>
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{
basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
__str.append(__rhs);
return __str;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
{
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
__string_type __str(__lhs);
__str.append(__size_type(1), __rhs);
return __str;
}
#pragma line 2425 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) == 0; }
#pragma empty_line
template<typename _CharT>
inline
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type
operator==(const basic_string<_CharT>& __lhs,
const basic_string<_CharT>& __rhs)
{ return (__lhs.size() == __rhs.size()
&& !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(),
__lhs.size())); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator==(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) == 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) == 0; }
#pragma line 2471 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return !(__lhs == __rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator!=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return !(__lhs == __rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return !(__lhs == __rhs); }
#pragma line 2508 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) < 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) < 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) > 0; }
#pragma line 2545 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) > 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) > 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) < 0; }
#pragma line 2582 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) <= 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) <= 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator<=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) >= 0; }
#pragma line 2619 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __lhs.compare(__rhs) >= 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
const _CharT* __rhs)
{ return __lhs.compare(__rhs) >= 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
inline bool
operator>=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ return __rhs.compare(__lhs) <= 0; }
#pragma line 2656 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline void
swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
basic_string<_CharT, _Traits, _Alloc>& __rhs)
{ __lhs.swap(__rhs); }
#pragma line 2673 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Alloc>& __str);
#pragma empty_line
template<>
basic_istream<char>&
operator>>(basic_istream<char>& __is, basic_string<char>& __str);
#pragma line 2691 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const basic_string<_CharT, _Traits, _Alloc>& __str)
{
#pragma empty_line
#pragma empty_line
return __ostream_insert(__os, __str.data(), __str.size());
}
#pragma line 2714 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
#pragma line 2732 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.h" 3
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Alloc>& __str)
{ return getline(__is, __str, __is.widen('\n')); }
#pragma empty_line
template<>
basic_istream<char>&
getline(basic_istream<char>& __in, basic_string<char>& __str,
char __delim);
#pragma empty_line
#pragma empty_line
template<>
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
wchar_t __delim);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 55 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.tcc" 1 3
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.tcc" 3
#pragma empty_line
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.tcc" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
const typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
_Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4;
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
const _CharT
basic_string<_CharT, _Traits, _Alloc>::
_Rep::_S_terminal = _CharT();
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
const typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::npos;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[
(sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) /
sizeof(size_type)];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InIterator>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
input_iterator_tag)
{
#pragma empty_line
if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refdata();
#pragma empty_line
#pragma empty_line
_CharT __buf[128];
size_type __len = 0;
while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
{
__buf[__len++] = *__beg;
++__beg;
}
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
_M_copy(__r->_M_refdata(), __buf, __len);
try
{
while (__beg != __end)
{
if (__len == __r->_M_capacity)
{
#pragma empty_line
_Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
_M_copy(__another->_M_refdata(), __r->_M_refdata(), __len);
__r->_M_destroy(__a);
__r = __another;
}
__r->_M_refdata()[__len++] = *__beg;
++__beg;
}
}
catch(...)
{
__r->_M_destroy(__a);
throw;
}
__r->_M_set_length_and_sharable(__len);
return __r->_M_refdata();
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
template <typename _InIterator>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
_S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
forward_iterator_tag)
{
#pragma empty_line
if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refdata();
#pragma empty_line
#pragma empty_line
if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end)
__throw_logic_error(("basic_string::_S_construct null not valid"));
#pragma empty_line
const size_type __dnew = static_cast<size_type>(std::distance(__beg,
__end));
#pragma empty_line
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
try
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
catch(...)
{
__r->_M_destroy(__a);
throw;
}
__r->_M_set_length_and_sharable(__dnew);
return __r->_M_refdata();
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::
_S_construct(size_type __n, _CharT __c, const _Alloc& __a)
{
#pragma empty_line
if (__n == 0 && __a == _Alloc())
return _S_empty_rep()._M_refdata();
#pragma empty_line
#pragma empty_line
_Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
if (__n)
_M_assign(__r->_M_refdata(), __n, __c);
#pragma empty_line
__r->_M_set_length_and_sharable(__n);
return __r->_M_refdata();
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str)
: _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
__str.get_allocator()),
__str.get_allocator())
{ }
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const _Alloc& __a)
: _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
{ }
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str, size_type __pos, size_type __n)
: _M_dataplus(_S_construct(__str._M_data()
+ __str._M_check(__pos,
"basic_string::basic_string"),
__str._M_data() + __str._M_limit(__pos, __n)
+ __pos, _Alloc()), _Alloc())
{ }
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a)
: _M_dataplus(_S_construct(__str._M_data()
+ __str._M_check(__pos,
"basic_string::basic_string"),
__str._M_data() + __str._M_limit(__pos, __n)
+ __pos, __a), __a)
{ }
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
: _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
{ }
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const _CharT* __s, const _Alloc& __a)
: _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) :
__s + npos, __a), __a)
{ }
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(size_type __n, _CharT __c, const _Alloc& __a)
: _M_dataplus(_S_construct(__n, __c, __a), __a)
{ }
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
: _M_dataplus(_S_construct(__beg, __end, __a), __a)
{ }
#pragma line 242 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.tcc" 3
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
assign(const basic_string& __str)
{
if (_M_rep() != __str._M_rep())
{
#pragma empty_line
const allocator_type __a = this->get_allocator();
_CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
_M_rep()->_M_dispose(__a);
_M_data(__tmp);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
assign(const _CharT* __s, size_type __n)
{
;
_M_check_length(this->size(), __n, "basic_string::assign");
if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
return _M_replace_safe(size_type(0), this->size(), __s, __n);
else
{
#pragma empty_line
const size_type __pos = __s - _M_data();
if (__pos >= __n)
_M_copy(_M_data(), __s, __n);
else if (__pos)
_M_move(_M_data(), __s, __n);
_M_rep()->_M_set_length_and_sharable(__n);
return *this;
}
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
append(size_type __n, _CharT __c)
{
if (__n)
{
_M_check_length(size_type(0), __n, "basic_string::append");
const size_type __len = __n + this->size();
if (__len > this->capacity() || _M_rep()->_M_is_shared())
this->reserve(__len);
_M_assign(_M_data() + this->size(), __n, __c);
_M_rep()->_M_set_length_and_sharable(__len);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
append(const _CharT* __s, size_type __n)
{
;
if (__n)
{
_M_check_length(size_type(0), __n, "basic_string::append");
const size_type __len = __n + this->size();
if (__len > this->capacity() || _M_rep()->_M_is_shared())
{
if (_M_disjunct(__s))
this->reserve(__len);
else
{
const size_type __off = __s - _M_data();
this->reserve(__len);
__s = _M_data() + __off;
}
}
_M_copy(_M_data() + this->size(), __s, __n);
_M_rep()->_M_set_length_and_sharable(__len);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
append(const basic_string& __str)
{
const size_type __size = __str.size();
if (__size)
{
const size_type __len = __size + this->size();
if (__len > this->capacity() || _M_rep()->_M_is_shared())
this->reserve(__len);
_M_copy(_M_data() + this->size(), __str._M_data(), __size);
_M_rep()->_M_set_length_and_sharable(__len);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
append(const basic_string& __str, size_type __pos, size_type __n)
{
__str._M_check(__pos, "basic_string::append");
__n = __str._M_limit(__pos, __n);
if (__n)
{
const size_type __len = __n + this->size();
if (__len > this->capacity() || _M_rep()->_M_is_shared())
this->reserve(__len);
_M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n);
_M_rep()->_M_set_length_and_sharable(__len);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
insert(size_type __pos, const _CharT* __s, size_type __n)
{
;
_M_check(__pos, "basic_string::insert");
_M_check_length(size_type(0), __n, "basic_string::insert");
if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
return _M_replace_safe(__pos, size_type(0), __s, __n);
else
{
#pragma empty_line
const size_type __off = __s - _M_data();
_M_mutate(__pos, 0, __n);
__s = _M_data() + __off;
_CharT* __p = _M_data() + __pos;
if (__s + __n <= __p)
_M_copy(__p, __s, __n);
else if (__s >= __p)
_M_copy(__p, __s + __n, __n);
else
{
const size_type __nleft = __p - __s;
_M_copy(__p, __s, __nleft);
_M_copy(__p + __nleft, __p + __n, __n - __nleft);
}
return *this;
}
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::iterator
basic_string<_CharT, _Traits, _Alloc>::
erase(iterator __first, iterator __last)
{
#pragma empty_line
;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const size_type __size = __last - __first;
if (__size)
{
const size_type __pos = __first - _M_ibegin();
_M_mutate(__pos, __size, size_type(0));
_M_rep()->_M_set_leaked();
return iterator(_M_data() + __pos);
}
else
return __first;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
replace(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2)
{
;
_M_check(__pos, "basic_string::replace");
__n1 = _M_limit(__pos, __n1);
_M_check_length(__n1, __n2, "basic_string::replace");
bool __left;
if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
return _M_replace_safe(__pos, __n1, __s, __n2);
else if ((__left = __s + __n2 <= _M_data() + __pos)
|| _M_data() + __pos + __n1 <= __s)
{
#pragma empty_line
size_type __off = __s - _M_data();
__left ? __off : (__off += __n2 - __n1);
_M_mutate(__pos, __n1, __n2);
_M_copy(_M_data() + __pos, _M_data() + __off, __n2);
return *this;
}
else
{
#pragma empty_line
const basic_string __tmp(__s, __n2);
return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2);
}
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::_Rep::
_M_destroy(const _Alloc& __a) throw ()
{
const size_type __size = sizeof(_Rep_base) +
(this->_M_capacity + 1) * sizeof(_CharT);
_Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size);
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::
_M_leak_hard()
{
#pragma empty_line
if (_M_rep() == &_S_empty_rep())
return;
#pragma empty_line
if (_M_rep()->_M_is_shared())
_M_mutate(0, 0, 0);
_M_rep()->_M_set_leaked();
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::
_M_mutate(size_type __pos, size_type __len1, size_type __len2)
{
const size_type __old_size = this->size();
const size_type __new_size = __old_size + __len2 - __len1;
const size_type __how_much = __old_size - __pos - __len1;
#pragma empty_line
if (__new_size > this->capacity() || _M_rep()->_M_is_shared())
{
#pragma empty_line
const allocator_type __a = get_allocator();
_Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a);
#pragma empty_line
if (__pos)
_M_copy(__r->_M_refdata(), _M_data(), __pos);
if (__how_much)
_M_copy(__r->_M_refdata() + __pos + __len2,
_M_data() + __pos + __len1, __how_much);
#pragma empty_line
_M_rep()->_M_dispose(__a);
_M_data(__r->_M_refdata());
}
else if (__how_much && __len1 != __len2)
{
#pragma empty_line
_M_move(_M_data() + __pos + __len2,
_M_data() + __pos + __len1, __how_much);
}
_M_rep()->_M_set_length_and_sharable(__new_size);
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::
reserve(size_type __res)
{
if (__res != this->capacity() || _M_rep()->_M_is_shared())
{
#pragma empty_line
if (__res < this->size())
__res = this->size();
const allocator_type __a = get_allocator();
_CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
_M_rep()->_M_dispose(__a);
_M_data(__tmp);
}
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::
swap(basic_string& __s)
{
if (_M_rep()->_M_is_leaked())
_M_rep()->_M_set_sharable();
if (__s._M_rep()->_M_is_leaked())
__s._M_rep()->_M_set_sharable();
if (this->get_allocator() == __s.get_allocator())
{
_CharT* __tmp = _M_data();
_M_data(__s._M_data());
__s._M_data(__tmp);
}
#pragma empty_line
else
{
const basic_string __tmp1(_M_ibegin(), _M_iend(),
__s.get_allocator());
const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
this->get_allocator());
*this = __tmp2;
__s = __tmp1;
}
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
basic_string<_CharT, _Traits, _Alloc>::_Rep::
_S_create(size_type __capacity, size_type __old_capacity,
const _Alloc& __alloc)
{
#pragma empty_line
#pragma empty_line
if (__capacity > _S_max_size)
__throw_length_error(("basic_string::_S_create"));
#pragma line 579 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_string.tcc" 3
const size_type __pagesize = 4096;
const size_type __malloc_header_size = 4 * sizeof(void*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
__capacity = 2 * __old_capacity;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
#pragma empty_line
const size_type __adj_size = __size + __malloc_header_size;
if (__adj_size > __pagesize && __capacity > __old_capacity)
{
const size_type __extra = __pagesize - __adj_size % __pagesize;
__capacity += __extra / sizeof(_CharT);
#pragma empty_line
if (__capacity > _S_max_size)
__capacity = _S_max_size;
__size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void* __place = _Raw_bytes_alloc(__alloc).allocate(__size);
_Rep *__p = new (__place) _Rep;
__p->_M_capacity = __capacity;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
__p->_M_set_sharable();
return __p;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
_CharT*
basic_string<_CharT, _Traits, _Alloc>::_Rep::
_M_clone(const _Alloc& __alloc, size_type __res)
{
#pragma empty_line
const size_type __requested_cap = this->_M_length + __res;
_Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity,
__alloc);
if (this->_M_length)
_M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length);
#pragma empty_line
__r->_M_set_length_and_sharable(this->_M_length);
return __r->_M_refdata();
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
void
basic_string<_CharT, _Traits, _Alloc>::
resize(size_type __n, _CharT __c)
{
const size_type __size = this->size();
_M_check_length(__size, __n, "basic_string::resize");
if (__size < __n)
this->append(__n - __size, __c);
else if (__n < __size)
this->erase(__n);
#pragma empty_line
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
template<typename _InputIterator>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
_M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
_InputIterator __k2, __false_type)
{
const basic_string __s(__k1, __k2);
const size_type __n1 = __i2 - __i1;
_M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch");
return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
__s.size());
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
_M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
_CharT __c)
{
_M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
_M_mutate(__pos1, __n1, __n2);
if (__n2)
_M_assign(_M_data() + __pos1, __n2, __c);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>&
basic_string<_CharT, _Traits, _Alloc>::
_M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
size_type __n2)
{
_M_mutate(__pos1, __n1, __n2);
if (__n2)
_M_copy(_M_data() + __pos1, __s, __n2);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>
operator+(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{
;
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
const __size_type __len = _Traits::length(__lhs);
__string_type __str;
__str.reserve(__len + __rhs.size());
__str.append(__lhs, __len);
__str.append(__rhs);
return __str;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>
operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
{
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
__string_type __str;
const __size_type __len = __rhs.size();
__str.reserve(__len + 1);
__str.append(__size_type(1), __lhs);
__str.append(__rhs);
return __str;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
copy(_CharT* __s, size_type __n, size_type __pos) const
{
_M_check(__pos, "basic_string::copy");
__n = _M_limit(__pos, __n);
;
if (__n)
_M_copy(__s, _M_data() + __pos, __n);
#pragma empty_line
return __n;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find(const _CharT* __s, size_type __pos, size_type __n) const
{
;
const size_type __size = this->size();
const _CharT* __data = _M_data();
#pragma empty_line
if (__n == 0)
return __pos <= __size ? __pos : npos;
#pragma empty_line
if (__n <= __size)
{
for (; __pos <= __size - __n; ++__pos)
if (traits_type::eq(__data[__pos], __s[0])
&& traits_type::compare(__data + __pos + 1,
__s + 1, __n - 1) == 0)
return __pos;
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find(_CharT __c, size_type __pos) const
{
size_type __ret = npos;
const size_type __size = this->size();
if (__pos < __size)
{
const _CharT* __data = _M_data();
const size_type __n = __size - __pos;
const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
if (__p)
__ret = __p - __data;
}
return __ret;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
rfind(const _CharT* __s, size_type __pos, size_type __n) const
{
;
const size_type __size = this->size();
if (__n <= __size)
{
__pos = std::min(size_type(__size - __n), __pos);
const _CharT* __data = _M_data();
do
{
if (traits_type::compare(__data + __pos, __s, __n) == 0)
return __pos;
}
while (__pos-- > 0);
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
rfind(_CharT __c, size_type __pos) const
{
size_type __size = this->size();
if (__size)
{
if (--__size > __pos)
__size = __pos;
for (++__size; __size-- > 0; )
if (traits_type::eq(_M_data()[__size], __c))
return __size;
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
{
;
for (; __n && __pos < this->size(); ++__pos)
{
const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
if (__p)
return __pos;
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
{
;
size_type __size = this->size();
if (__size && __n)
{
if (--__size > __pos)
__size = __pos;
do
{
if (traits_type::find(__s, __n, _M_data()[__size]))
return __size;
}
while (__size-- != 0);
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
;
for (; __pos < this->size(); ++__pos)
if (!traits_type::find(__s, __n, _M_data()[__pos]))
return __pos;
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_first_not_of(_CharT __c, size_type __pos) const
{
for (; __pos < this->size(); ++__pos)
if (!traits_type::eq(_M_data()[__pos], __c))
return __pos;
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
;
size_type __size = this->size();
if (__size)
{
if (--__size > __pos)
__size = __pos;
do
{
if (!traits_type::find(__s, __n, _M_data()[__size]))
return __size;
}
while (__size--);
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
typename basic_string<_CharT, _Traits, _Alloc>::size_type
basic_string<_CharT, _Traits, _Alloc>::
find_last_not_of(_CharT __c, size_type __pos) const
{
size_type __size = this->size();
if (__size)
{
if (--__size > __pos)
__size = __pos;
do
{
if (!traits_type::eq(_M_data()[__size], __c))
return __size;
}
while (__size--);
}
return npos;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string<_CharT, _Traits, _Alloc>::
compare(size_type __pos, size_type __n, const basic_string& __str) const
{
_M_check(__pos, "basic_string::compare");
__n = _M_limit(__pos, __n);
const size_type __osize = __str.size();
const size_type __len = std::min(__n, __osize);
int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
if (!__r)
__r = _S_compare(__n, __osize);
return __r;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string<_CharT, _Traits, _Alloc>::
compare(size_type __pos1, size_type __n1, const basic_string& __str,
size_type __pos2, size_type __n2) const
{
_M_check(__pos1, "basic_string::compare");
__str._M_check(__pos2, "basic_string::compare");
__n1 = _M_limit(__pos1, __n1);
__n2 = __str._M_limit(__pos2, __n2);
const size_type __len = std::min(__n1, __n2);
int __r = traits_type::compare(_M_data() + __pos1,
__str.data() + __pos2, __len);
if (!__r)
__r = _S_compare(__n1, __n2);
return __r;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string<_CharT, _Traits, _Alloc>::
compare(const _CharT* __s) const
{
;
const size_type __size = this->size();
const size_type __osize = traits_type::length(__s);
const size_type __len = std::min(__size, __osize);
int __r = traits_type::compare(_M_data(), __s, __len);
if (!__r)
__r = _S_compare(__size, __osize);
return __r;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string <_CharT, _Traits, _Alloc>::
compare(size_type __pos, size_type __n1, const _CharT* __s) const
{
;
_M_check(__pos, "basic_string::compare");
__n1 = _M_limit(__pos, __n1);
const size_type __osize = traits_type::length(__s);
const size_type __len = std::min(__n1, __osize);
int __r = traits_type::compare(_M_data() + __pos, __s, __len);
if (!__r)
__r = _S_compare(__n1, __osize);
return __r;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
int
basic_string <_CharT, _Traits, _Alloc>::
compare(size_type __pos, size_type __n1, const _CharT* __s,
size_type __n2) const
{
;
_M_check(__pos, "basic_string::compare");
__n1 = _M_limit(__pos, __n1);
const size_type __len = std::min(__n1, __n2);
int __r = traits_type::compare(_M_data() + __pos, __s, __len);
if (!__r)
__r = _S_compare(__n1, __n2);
return __r;
}
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in,
basic_string<_CharT, _Traits, _Alloc>& __str)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __istream_type::ios_base __ios_base;
typedef typename __istream_type::int_type __int_type;
typedef typename __string_type::size_type __size_type;
typedef ctype<_CharT> __ctype_type;
typedef typename __ctype_type::ctype_base __ctype_base;
#pragma empty_line
__size_type __extracted = 0;
typename __ios_base::iostate __err = __ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
try
{
#pragma empty_line
__str.erase();
_CharT __buf[128];
__size_type __len = 0;
const streamsize __w = __in.width();
const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
: __str.max_size();
const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
const __int_type __eof = _Traits::eof();
__int_type __c = __in.rdbuf()->sgetc();
#pragma empty_line
while (__extracted < __n
&& !_Traits::eq_int_type(__c, __eof)
&& !__ct.is(__ctype_base::space,
_Traits::to_char_type(__c)))
{
if (__len == sizeof(__buf) / sizeof(_CharT))
{
__str.append(__buf, sizeof(__buf) / sizeof(_CharT));
__len = 0;
}
__buf[__len++] = _Traits::to_char_type(__c);
++__extracted;
__c = __in.rdbuf()->snextc();
}
__str.append(__buf, __len);
#pragma empty_line
if (_Traits::eq_int_type(__c, __eof))
__err |= __ios_base::eofbit;
__in.width(0);
}
catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
throw;
}
catch(...)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
__in._M_setstate(__ios_base::badbit);
}
}
#pragma empty_line
if (!__extracted)
__err |= __ios_base::failbit;
if (__err)
__in.setstate(__err);
return __in;
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __in,
basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __istream_type::ios_base __ios_base;
typedef typename __istream_type::int_type __int_type;
typedef typename __string_type::size_type __size_type;
#pragma empty_line
__size_type __extracted = 0;
const __size_type __n = __str.max_size();
typename __ios_base::iostate __err = __ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
try
{
__str.erase();
const __int_type __idelim = _Traits::to_int_type(__delim);
const __int_type __eof = _Traits::eof();
__int_type __c = __in.rdbuf()->sgetc();
#pragma empty_line
while (__extracted < __n
&& !_Traits::eq_int_type(__c, __eof)
&& !_Traits::eq_int_type(__c, __idelim))
{
__str += _Traits::to_char_type(__c);
++__extracted;
__c = __in.rdbuf()->snextc();
}
#pragma empty_line
if (_Traits::eq_int_type(__c, __eof))
__err |= __ios_base::eofbit;
else if (_Traits::eq_int_type(__c, __idelim))
{
++__extracted;
__in.rdbuf()->sbumpc();
}
else
__err |= __ios_base::failbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
throw;
}
catch(...)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
__in._M_setstate(__ios_base::badbit);
}
}
if (!__extracted)
__err |= __ios_base::failbit;
if (__err)
__in.setstate(__err);
return __in;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class basic_string<char>;
extern template
basic_istream<char>&
operator>>(basic_istream<char>&, string&);
extern template
basic_ostream<char>&
operator<<(basic_ostream<char>&, const string&);
extern template
basic_istream<char>&
getline(basic_istream<char>&, string&, char);
extern template
basic_istream<char>&
getline(basic_istream<char>&, string&);
#pragma empty_line
#pragma empty_line
extern template class basic_string<wchar_t>;
extern template
basic_istream<wchar_t>&
operator>>(basic_istream<wchar_t>&, wstring&);
extern template
basic_ostream<wchar_t>&
operator<<(basic_ostream<wchar_t>&, const wstring&);
extern template
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&, wchar_t);
extern template
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 56 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/string" 2 3
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 2 3
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
class locale
{
public:
#pragma empty_line
#pragma empty_line
typedef int category;
#pragma empty_line
#pragma empty_line
class facet;
class id;
class _Impl;
#pragma empty_line
friend class facet;
friend class _Impl;
#pragma empty_line
template<typename _Facet>
friend bool
has_facet(const locale&) throw();
#pragma empty_line
template<typename _Facet>
friend const _Facet&
use_facet(const locale&);
#pragma empty_line
template<typename _Cache>
friend struct __use_cache;
#pragma line 100 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
static const category none = 0;
static const category ctype = 1L << 0;
static const category numeric = 1L << 1;
static const category collate = 1L << 2;
static const category time = 1L << 3;
static const category monetary = 1L << 4;
static const category messages = 1L << 5;
static const category all = (ctype | numeric | collate |
time | monetary | messages);
#pragma line 119 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
locale() throw();
#pragma line 128 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
locale(const locale& __other) throw();
#pragma line 138 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
explicit
locale(const char* __s);
#pragma line 153 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
locale(const locale& __base, const char* __s, category __cat);
#pragma line 166 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
locale(const locale& __base, const locale& __add, category __cat);
#pragma line 178 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
template<typename _Facet>
locale(const locale& __other, _Facet* __f);
#pragma empty_line
#pragma empty_line
~locale() throw();
#pragma line 192 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
const locale&
operator=(const locale& __other) throw();
#pragma line 207 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
template<typename _Facet>
locale
combine(const locale& __other) const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
string
name() const;
#pragma line 226 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
bool
operator==(const locale& __other) const throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
operator!=(const locale& __other) const throw()
{ return !(this->operator==(__other)); }
#pragma line 254 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
template<typename _Char, typename _Traits, typename _Alloc>
bool
operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
const basic_string<_Char, _Traits, _Alloc>& __s2) const;
#pragma line 270 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
static locale
global(const locale&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const locale&
classic();
#pragma empty_line
private:
#pragma empty_line
_Impl* _M_impl;
#pragma empty_line
#pragma empty_line
static _Impl* _S_classic;
#pragma empty_line
#pragma empty_line
static _Impl* _S_global;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const char* const* const _S_categories;
#pragma line 305 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
enum { _S_categories_size = 6 + 0 };
#pragma empty_line
#pragma empty_line
static __gthread_once_t _S_once;
#pragma empty_line
#pragma empty_line
explicit
locale(_Impl*) throw();
#pragma empty_line
static void
_S_initialize();
#pragma empty_line
static void
_S_initialize_once() throw();
#pragma empty_line
static category
_S_normalize_category(category);
#pragma empty_line
void
_M_coalesce(const locale& __base, const locale& __add, category __cat);
};
#pragma line 339 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
class locale::facet
{
private:
friend class locale;
friend class locale::_Impl;
#pragma empty_line
mutable _Atomic_word _M_refcount;
#pragma empty_line
#pragma empty_line
static __c_locale _S_c_locale;
#pragma empty_line
#pragma empty_line
static const char _S_c_name[2];
#pragma empty_line
#pragma empty_line
static __gthread_once_t _S_once;
#pragma empty_line
#pragma empty_line
static void
_S_initialize_once();
#pragma empty_line
protected:
#pragma line 370 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
explicit
facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
{ }
#pragma empty_line
#pragma empty_line
virtual
~facet();
#pragma empty_line
static void
_S_create_c_locale(__c_locale& __cloc, const char* __s,
__c_locale __old = 0);
#pragma empty_line
static __c_locale
_S_clone_c_locale(__c_locale& __cloc) throw();
#pragma empty_line
static void
_S_destroy_c_locale(__c_locale& __cloc);
#pragma empty_line
static __c_locale
_S_lc_ctype_c_locale(__c_locale __cloc, const char* __s);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static __c_locale
_S_get_c_locale();
#pragma empty_line
__attribute__ ((__const__)) static const char*
_S_get_c_name() throw();
#pragma empty_line
private:
void
_M_add_reference() const throw()
{ __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
#pragma empty_line
void
_M_remove_reference() const throw()
{
#pragma empty_line
;
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
;
try
{ delete this; }
catch(...)
{ }
}
}
#pragma empty_line
facet(const facet&);
#pragma empty_line
facet&
operator=(const facet&);
};
#pragma line 437 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
class locale::id
{
private:
friend class locale;
friend class locale::_Impl;
#pragma empty_line
template<typename _Facet>
friend const _Facet&
use_facet(const locale&);
#pragma empty_line
template<typename _Facet>
friend bool
has_facet(const locale&) throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mutable size_t _M_index;
#pragma empty_line
#pragma empty_line
static _Atomic_word _S_refcount;
#pragma empty_line
void
operator=(const id&);
#pragma empty_line
id(const id&);
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
id() { }
#pragma empty_line
size_t
_M_id() const throw();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
class locale::_Impl
{
public:
#pragma empty_line
friend class locale;
friend class locale::facet;
#pragma empty_line
template<typename _Facet>
friend bool
has_facet(const locale&) throw();
#pragma empty_line
template<typename _Facet>
friend const _Facet&
use_facet(const locale&);
#pragma empty_line
template<typename _Cache>
friend struct __use_cache;
#pragma empty_line
private:
#pragma empty_line
_Atomic_word _M_refcount;
const facet** _M_facets;
size_t _M_facets_size;
const facet** _M_caches;
char** _M_names;
static const locale::id* const _S_id_ctype[];
static const locale::id* const _S_id_numeric[];
static const locale::id* const _S_id_collate[];
static const locale::id* const _S_id_time[];
static const locale::id* const _S_id_monetary[];
static const locale::id* const _S_id_messages[];
static const locale::id* const* const _S_facet_categories[];
#pragma empty_line
void
_M_add_reference() throw()
{ __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
#pragma empty_line
void
_M_remove_reference() throw()
{
#pragma empty_line
;
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
;
try
{ delete this; }
catch(...)
{ }
}
}
#pragma empty_line
_Impl(const _Impl&, size_t);
_Impl(const char*, size_t);
_Impl(size_t) throw();
#pragma empty_line
~_Impl() throw();
#pragma empty_line
_Impl(const _Impl&);
#pragma empty_line
void
operator=(const _Impl&);
#pragma empty_line
bool
_M_check_same_name()
{
bool __ret = true;
if (_M_names[1])
#pragma empty_line
for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
__ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
return __ret;
}
#pragma empty_line
void
_M_replace_categories(const _Impl*, category);
#pragma empty_line
void
_M_replace_category(const _Impl*, const locale::id* const*);
#pragma empty_line
void
_M_replace_facet(const _Impl*, const locale::id*);
#pragma empty_line
void
_M_install_facet(const locale::id*, const facet*);
#pragma empty_line
template<typename _Facet>
void
_M_init_facet(_Facet* __facet)
{ _M_install_facet(&_Facet::id, __facet); }
#pragma empty_line
void
_M_install_cache(const facet*, size_t);
};
#pragma line 583 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
template<typename _Facet>
bool
has_facet(const locale& __loc) throw();
#pragma line 600 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
template<typename _Facet>
const _Facet&
use_facet(const locale& __loc);
#pragma line 617 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
template<typename _CharT>
class collate : public locale::facet
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
#pragma empty_line
#pragma empty_line
protected:
#pragma empty_line
#pragma empty_line
__c_locale _M_c_locale_collate;
#pragma empty_line
public:
#pragma empty_line
static locale::id id;
#pragma line 644 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
explicit
collate(size_t __refs = 0)
: facet(__refs), _M_c_locale_collate(_S_get_c_locale())
{ }
#pragma line 658 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
explicit
collate(__c_locale __cloc, size_t __refs = 0)
: facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
{ }
#pragma line 675 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
int
compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const
{ return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
#pragma line 694 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
string_type
transform(const _CharT* __lo, const _CharT* __hi) const
{ return this->do_transform(__lo, __hi); }
#pragma line 708 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
long
hash(const _CharT* __lo, const _CharT* __hi) const
{ return this->do_hash(__lo, __hi); }
#pragma empty_line
#pragma empty_line
int
_M_compare(const _CharT*, const _CharT*) const throw();
#pragma empty_line
size_t
_M_transform(_CharT*, const _CharT*, size_t) const throw();
#pragma empty_line
protected:
#pragma empty_line
virtual
~collate()
{ _S_destroy_c_locale(_M_c_locale_collate); }
#pragma line 737 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
virtual int
do_compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const;
#pragma line 753 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
virtual string_type
do_transform(const _CharT* __lo, const _CharT* __hi) const;
#pragma line 766 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 3
virtual long
do_hash(const _CharT* __lo, const _CharT* __hi) const;
};
#pragma empty_line
template<typename _CharT>
locale::id collate<_CharT>::id;
#pragma empty_line
#pragma empty_line
template<>
int
collate<char>::_M_compare(const char*, const char*) const throw();
#pragma empty_line
template<>
size_t
collate<char>::_M_transform(char*, const char*, size_t) const throw();
#pragma empty_line
#pragma empty_line
template<>
int
collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw();
#pragma empty_line
template<>
size_t
collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
class collate_byname : public collate<_CharT>
{
public:
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
#pragma empty_line
#pragma empty_line
explicit
collate_byname(const char* __s, size_t __refs = 0)
: collate<_CharT>(__refs)
{
if (__builtin_strcmp(__s, "C") != 0
&& __builtin_strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_collate);
this->_S_create_c_locale(this->_M_c_locale_collate, __s);
}
}
#pragma empty_line
protected:
virtual
~collate_byname() { }
};
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.tcc" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.tcc" 3
#pragma empty_line
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.tcc" 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _Facet>
locale::
locale(const locale& __other, _Facet* __f)
{
_M_impl = new _Impl(*__other._M_impl, 1);
#pragma empty_line
try
{ _M_impl->_M_install_facet(&_Facet::id, __f); }
catch(...)
{
_M_impl->_M_remove_reference();
throw;
}
delete [] _M_impl->_M_names[0];
_M_impl->_M_names[0] = 0;
}
#pragma empty_line
template<typename _Facet>
locale
locale::
combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
try
{
__tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
}
catch(...)
{
__tmp->_M_remove_reference();
throw;
}
return locale(__tmp);
}
#pragma empty_line
template<typename _CharT, typename _Traits, typename _Alloc>
bool
locale::
operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
const basic_string<_CharT, _Traits, _Alloc>& __s2) const
{
typedef std::collate<_CharT> __collate_type;
const __collate_type& __collate = use_facet<__collate_type>(*this);
return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
__s2.data(), __s2.data() + __s2.length()) < 0);
}
#pragma empty_line
#pragma empty_line
template<typename _Facet>
bool
has_facet(const locale& __loc) throw()
{
const size_t __i = _Facet::id._M_id();
const locale::facet** __facets = __loc._M_impl->_M_facets;
return (__i < __loc._M_impl->_M_facets_size
#pragma empty_line
&& dynamic_cast<const _Facet*>(__facets[__i]));
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
template<typename _Facet>
const _Facet&
use_facet(const locale& __loc)
{
const size_t __i = _Facet::id._M_id();
const locale::facet** __facets = __loc._M_impl->_M_facets;
if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i])
__throw_bad_cast();
#pragma empty_line
return dynamic_cast<const _Facet&>(*__facets[__i]);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
int
collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw ()
{ return 0; }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
size_t
collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw ()
{ return 0; }
#pragma empty_line
template<typename _CharT>
int
collate<_CharT>::
do_compare(const _CharT* __lo1, const _CharT* __hi1,
const _CharT* __lo2, const _CharT* __hi2) const
{
#pragma empty_line
#pragma empty_line
const string_type __one(__lo1, __hi1);
const string_type __two(__lo2, __hi2);
#pragma empty_line
const _CharT* __p = __one.c_str();
const _CharT* __pend = __one.data() + __one.length();
const _CharT* __q = __two.c_str();
const _CharT* __qend = __two.data() + __two.length();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
for (;;)
{
const int __res = _M_compare(__p, __q);
if (__res)
return __res;
#pragma empty_line
__p += char_traits<_CharT>::length(__p);
__q += char_traits<_CharT>::length(__q);
if (__p == __pend && __q == __qend)
return 0;
else if (__p == __pend)
return -1;
else if (__q == __qend)
return 1;
#pragma empty_line
__p++;
__q++;
}
}
#pragma empty_line
template<typename _CharT>
typename collate<_CharT>::string_type
collate<_CharT>::
do_transform(const _CharT* __lo, const _CharT* __hi) const
{
string_type __ret;
#pragma empty_line
#pragma empty_line
const string_type __str(__lo, __hi);
#pragma empty_line
const _CharT* __p = __str.c_str();
const _CharT* __pend = __str.data() + __str.length();
#pragma empty_line
size_t __len = (__hi - __lo) * 2;
#pragma empty_line
_CharT* __c = new _CharT[__len];
#pragma empty_line
try
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
for (;;)
{
#pragma empty_line
size_t __res = _M_transform(__c, __p, __len);
#pragma empty_line
#pragma empty_line
if (__res >= __len)
{
__len = __res + 1;
delete [] __c, __c = 0;
__c = new _CharT[__len];
__res = _M_transform(__c, __p, __len);
}
#pragma empty_line
__ret.append(__c, __res);
__p += char_traits<_CharT>::length(__p);
if (__p == __pend)
break;
#pragma empty_line
__p++;
__ret.push_back(_CharT());
}
}
catch(...)
{
delete [] __c;
throw;
}
#pragma empty_line
delete [] __c;
#pragma empty_line
return __ret;
}
#pragma empty_line
template<typename _CharT>
long
collate<_CharT>::
do_hash(const _CharT* __lo, const _CharT* __hi) const
{
unsigned long __val = 0;
for (; __lo < __hi; ++__lo)
__val =
*__lo + ((__val << 7)
| (__val >> (__gnu_cxx::__numeric_traits<unsigned long>::
__digits - 7)));
return static_cast<long>(__val);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class collate<char>;
extern template class collate_byname<char>;
#pragma empty_line
extern template
const collate<char>&
use_facet<collate<char> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<collate<char> >(const locale&);
#pragma empty_line
#pragma empty_line
extern template class collate<wchar_t>;
extern template class collate_byname<wchar_t>;
#pragma empty_line
extern template
const collate<wchar_t>&
use_facet<collate<wchar_t> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<collate<wchar_t> >(const locale&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 824 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_classes.h" 2 3
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum _Ios_Fmtflags
{
_S_boolalpha = 1L << 0,
_S_dec = 1L << 1,
_S_fixed = 1L << 2,
_S_hex = 1L << 3,
_S_internal = 1L << 4,
_S_left = 1L << 5,
_S_oct = 1L << 6,
_S_right = 1L << 7,
_S_scientific = 1L << 8,
_S_showbase = 1L << 9,
_S_showpoint = 1L << 10,
_S_showpos = 1L << 11,
_S_skipws = 1L << 12,
_S_unitbuf = 1L << 13,
_S_uppercase = 1L << 14,
_S_adjustfield = _S_left | _S_right | _S_internal,
_S_basefield = _S_dec | _S_oct | _S_hex,
_S_floatfield = _S_scientific | _S_fixed,
_S_ios_fmtflags_end = 1L << 16
};
#pragma empty_line
inline _Ios_Fmtflags
operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
{ return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Fmtflags
operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
{ return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Fmtflags
operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
{ return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Fmtflags
operator~(_Ios_Fmtflags __a)
{ return _Ios_Fmtflags(~static_cast<int>(__a)); }
#pragma empty_line
inline const _Ios_Fmtflags&
operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
{ return __a = __a | __b; }
#pragma empty_line
inline const _Ios_Fmtflags&
operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
{ return __a = __a & __b; }
#pragma empty_line
inline const _Ios_Fmtflags&
operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
{ return __a = __a ^ __b; }
#pragma empty_line
#pragma empty_line
enum _Ios_Openmode
{
_S_app = 1L << 0,
_S_ate = 1L << 1,
_S_bin = 1L << 2,
_S_in = 1L << 3,
_S_out = 1L << 4,
_S_trunc = 1L << 5,
_S_ios_openmode_end = 1L << 16
};
#pragma empty_line
inline _Ios_Openmode
operator&(_Ios_Openmode __a, _Ios_Openmode __b)
{ return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Openmode
operator|(_Ios_Openmode __a, _Ios_Openmode __b)
{ return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Openmode
operator^(_Ios_Openmode __a, _Ios_Openmode __b)
{ return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Openmode
operator~(_Ios_Openmode __a)
{ return _Ios_Openmode(~static_cast<int>(__a)); }
#pragma empty_line
inline const _Ios_Openmode&
operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
{ return __a = __a | __b; }
#pragma empty_line
inline const _Ios_Openmode&
operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
{ return __a = __a & __b; }
#pragma empty_line
inline const _Ios_Openmode&
operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
{ return __a = __a ^ __b; }
#pragma empty_line
#pragma empty_line
enum _Ios_Iostate
{
_S_goodbit = 0,
_S_badbit = 1L << 0,
_S_eofbit = 1L << 1,
_S_failbit = 1L << 2,
_S_ios_iostate_end = 1L << 16
};
#pragma empty_line
inline _Ios_Iostate
operator&(_Ios_Iostate __a, _Ios_Iostate __b)
{ return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Iostate
operator|(_Ios_Iostate __a, _Ios_Iostate __b)
{ return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Iostate
operator^(_Ios_Iostate __a, _Ios_Iostate __b)
{ return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
#pragma empty_line
inline _Ios_Iostate
operator~(_Ios_Iostate __a)
{ return _Ios_Iostate(~static_cast<int>(__a)); }
#pragma empty_line
inline const _Ios_Iostate&
operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
{ return __a = __a | __b; }
#pragma empty_line
inline const _Ios_Iostate&
operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
{ return __a = __a & __b; }
#pragma empty_line
inline const _Ios_Iostate&
operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
{ return __a = __a ^ __b; }
#pragma empty_line
#pragma empty_line
enum _Ios_Seekdir
{
_S_beg = 0,
_S_cur = 1,
_S_end = 2,
_S_ios_seekdir_end = 1L << 16
};
#pragma line 201 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
class ios_base
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class failure : public exception
{
public:
#pragma empty_line
#pragma empty_line
explicit
failure(const string& __str) throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual
~failure() throw();
#pragma empty_line
virtual const char*
what() const throw();
#pragma empty_line
private:
string _M_msg;
};
#pragma line 257 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
typedef _Ios_Fmtflags fmtflags;
#pragma empty_line
#pragma empty_line
static const fmtflags boolalpha = _S_boolalpha;
#pragma empty_line
#pragma empty_line
static const fmtflags dec = _S_dec;
#pragma empty_line
#pragma empty_line
static const fmtflags fixed = _S_fixed;
#pragma empty_line
#pragma empty_line
static const fmtflags hex = _S_hex;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const fmtflags internal = _S_internal;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const fmtflags left = _S_left;
#pragma empty_line
#pragma empty_line
static const fmtflags oct = _S_oct;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const fmtflags right = _S_right;
#pragma empty_line
#pragma empty_line
static const fmtflags scientific = _S_scientific;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const fmtflags showbase = _S_showbase;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const fmtflags showpoint = _S_showpoint;
#pragma empty_line
#pragma empty_line
static const fmtflags showpos = _S_showpos;
#pragma empty_line
#pragma empty_line
static const fmtflags skipws = _S_skipws;
#pragma empty_line
#pragma empty_line
static const fmtflags unitbuf = _S_unitbuf;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const fmtflags uppercase = _S_uppercase;
#pragma empty_line
#pragma empty_line
static const fmtflags adjustfield = _S_adjustfield;
#pragma empty_line
#pragma empty_line
static const fmtflags basefield = _S_basefield;
#pragma empty_line
#pragma empty_line
static const fmtflags floatfield = _S_floatfield;
#pragma line 332 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
typedef _Ios_Iostate iostate;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const iostate badbit = _S_badbit;
#pragma empty_line
#pragma empty_line
static const iostate eofbit = _S_eofbit;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const iostate failbit = _S_failbit;
#pragma empty_line
#pragma empty_line
static const iostate goodbit = _S_goodbit;
#pragma line 363 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
typedef _Ios_Openmode openmode;
#pragma empty_line
#pragma empty_line
static const openmode app = _S_app;
#pragma empty_line
#pragma empty_line
static const openmode ate = _S_ate;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const openmode binary = _S_bin;
#pragma empty_line
#pragma empty_line
static const openmode in = _S_in;
#pragma empty_line
#pragma empty_line
static const openmode out = _S_out;
#pragma empty_line
#pragma empty_line
static const openmode trunc = _S_trunc;
#pragma line 395 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
typedef _Ios_Seekdir seekdir;
#pragma empty_line
#pragma empty_line
static const seekdir beg = _S_beg;
#pragma empty_line
#pragma empty_line
static const seekdir cur = _S_cur;
#pragma empty_line
#pragma empty_line
static const seekdir end = _S_end;
#pragma empty_line
#pragma empty_line
typedef int io_state;
typedef int open_mode;
typedef int seek_dir;
#pragma empty_line
typedef std::streampos streampos;
typedef std::streamoff streamoff;
#pragma line 421 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
enum event
{
erase_event,
imbue_event,
copyfmt_event
};
#pragma line 438 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
typedef void (*event_callback) (event, ios_base&, int);
#pragma line 450 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
void
register_callback(event_callback __fn, int __index);
#pragma empty_line
protected:
streamsize _M_precision;
streamsize _M_width;
fmtflags _M_flags;
iostate _M_exception;
iostate _M_streambuf_state;
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct _Callback_list
{
#pragma empty_line
_Callback_list* _M_next;
ios_base::event_callback _M_fn;
int _M_index;
_Atomic_word _M_refcount;
#pragma empty_line
_Callback_list(ios_base::event_callback __fn, int __index,
_Callback_list* __cb)
: _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
#pragma empty_line
void
_M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
#pragma empty_line
#pragma empty_line
int
_M_remove_reference()
{
#pragma empty_line
;
int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1);
if (__res == 0)
{
;
}
return __res;
}
};
#pragma empty_line
_Callback_list* _M_callbacks;
#pragma empty_line
void
_M_call_callbacks(event __ev) throw();
#pragma empty_line
void
_M_dispose_callbacks(void) throw();
#pragma empty_line
#pragma empty_line
struct _Words
{
void* _M_pword;
long _M_iword;
_Words() : _M_pword(0), _M_iword(0) { }
};
#pragma empty_line
#pragma empty_line
_Words _M_word_zero;
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum { _S_local_word_size = 8 };
_Words _M_local_word[_S_local_word_size];
#pragma empty_line
#pragma empty_line
int _M_word_size;
_Words* _M_word;
#pragma empty_line
_Words&
_M_grow_words(int __index, bool __iword);
#pragma empty_line
#pragma empty_line
locale _M_ios_locale;
#pragma empty_line
void
_M_init() throw();
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class Init
{
friend class ios_base;
public:
Init();
~Init();
#pragma empty_line
private:
static _Atomic_word _S_refcount;
static bool _S_synced_with_stdio;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fmtflags
flags() const
{ return _M_flags; }
#pragma line 563 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
fmtflags
flags(fmtflags __fmtfl)
{
fmtflags __old = _M_flags;
_M_flags = __fmtfl;
return __old;
}
#pragma line 579 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
fmtflags
setf(fmtflags __fmtfl)
{
fmtflags __old = _M_flags;
_M_flags |= __fmtfl;
return __old;
}
#pragma line 596 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
fmtflags
setf(fmtflags __fmtfl, fmtflags __mask)
{
fmtflags __old = _M_flags;
_M_flags &= ~__mask;
_M_flags |= (__fmtfl & __mask);
return __old;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
unsetf(fmtflags __mask)
{ _M_flags &= ~__mask; }
#pragma line 622 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
streamsize
precision() const
{ return _M_precision; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
streamsize
precision(streamsize __prec)
{
streamsize __old = _M_precision;
_M_precision = __prec;
return __old;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
streamsize
width() const
{ return _M_width; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
streamsize
width(streamsize __wide)
{
streamsize __old = _M_width;
_M_width = __wide;
return __old;
}
#pragma line 673 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
static bool
sync_with_stdio(bool __sync = true);
#pragma line 685 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
locale
imbue(const locale& __loc) throw();
#pragma line 696 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
locale
getloc() const
{ return _M_ios_locale; }
#pragma line 707 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
const locale&
_M_getloc() const
{ return _M_ios_locale; }
#pragma line 726 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
static int
xalloc() throw();
#pragma line 742 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
long&
iword(int __ix)
{
_Words& __word = (__ix < _M_word_size)
? _M_word[__ix] : _M_grow_words(__ix, true);
return __word._M_iword;
}
#pragma line 763 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
void*&
pword(int __ix)
{
_Words& __word = (__ix < _M_word_size)
? _M_word[__ix] : _M_grow_words(__ix, false);
return __word._M_pword;
}
#pragma line 780 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ios_base.h" 3
virtual ~ios_base();
#pragma empty_line
protected:
ios_base() throw ();
#pragma empty_line
#pragma empty_line
#pragma empty_line
private:
ios_base(const ios_base&);
#pragma empty_line
ios_base&
operator=(const ios_base&);
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ios_base&
boolalpha(ios_base& __base)
{
__base.setf(ios_base::boolalpha);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
noboolalpha(ios_base& __base)
{
__base.unsetf(ios_base::boolalpha);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
showbase(ios_base& __base)
{
__base.setf(ios_base::showbase);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
noshowbase(ios_base& __base)
{
__base.unsetf(ios_base::showbase);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
showpoint(ios_base& __base)
{
__base.setf(ios_base::showpoint);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
noshowpoint(ios_base& __base)
{
__base.unsetf(ios_base::showpoint);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
showpos(ios_base& __base)
{
__base.setf(ios_base::showpos);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
noshowpos(ios_base& __base)
{
__base.unsetf(ios_base::showpos);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
skipws(ios_base& __base)
{
__base.setf(ios_base::skipws);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
noskipws(ios_base& __base)
{
__base.unsetf(ios_base::skipws);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
uppercase(ios_base& __base)
{
__base.setf(ios_base::uppercase);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
nouppercase(ios_base& __base)
{
__base.unsetf(ios_base::uppercase);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
unitbuf(ios_base& __base)
{
__base.setf(ios_base::unitbuf);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
nounitbuf(ios_base& __base)
{
__base.unsetf(ios_base::unitbuf);
return __base;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ios_base&
internal(ios_base& __base)
{
__base.setf(ios_base::internal, ios_base::adjustfield);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
left(ios_base& __base)
{
__base.setf(ios_base::left, ios_base::adjustfield);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
right(ios_base& __base)
{
__base.setf(ios_base::right, ios_base::adjustfield);
return __base;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ios_base&
dec(ios_base& __base)
{
__base.setf(ios_base::dec, ios_base::basefield);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
hex(ios_base& __base)
{
__base.setf(ios_base::hex, ios_base::basefield);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
oct(ios_base& __base)
{
__base.setf(ios_base::oct, ios_base::basefield);
return __base;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ios_base&
fixed(ios_base& __base)
{
__base.setf(ios_base::fixed, ios_base::floatfield);
return __base;
}
#pragma empty_line
#pragma empty_line
inline ios_base&
scientific(ios_base& __base)
{
__base.setf(ios_base::scientific, ios_base::floatfield);
return __base;
}
#pragma empty_line
#pragma empty_line
}
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
#pragma empty_line
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
#pragma line 46 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
streamsize
__copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
basic_streambuf<_CharT, _Traits>*, bool&);
#pragma line 116 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
template<typename _CharT, typename _Traits>
class basic_streambuf
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef basic_streambuf<char_type, traits_type> __streambuf_type;
#pragma empty_line
#pragma empty_line
friend class basic_ios<char_type, traits_type>;
friend class basic_istream<char_type, traits_type>;
friend class basic_ostream<char_type, traits_type>;
friend class istreambuf_iterator<char_type, traits_type>;
friend class ostreambuf_iterator<char_type, traits_type>;
#pragma empty_line
friend streamsize
__copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&);
#pragma empty_line
template<bool _IsMove, typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
_CharT2*>::__type
__copy_move_a2(istreambuf_iterator<_CharT2>,
istreambuf_iterator<_CharT2>, _CharT2*);
#pragma empty_line
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
istreambuf_iterator<_CharT2> >::__type
find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
const _CharT2&);
#pragma empty_line
template<typename _CharT2, typename _Traits2>
friend basic_istream<_CharT2, _Traits2>&
operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*);
#pragma empty_line
template<typename _CharT2, typename _Traits2, typename _Alloc>
friend basic_istream<_CharT2, _Traits2>&
operator>>(basic_istream<_CharT2, _Traits2>&,
basic_string<_CharT2, _Traits2, _Alloc>&);
#pragma empty_line
template<typename _CharT2, typename _Traits2, typename _Alloc>
friend basic_istream<_CharT2, _Traits2>&
getline(basic_istream<_CharT2, _Traits2>&,
basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2);
#pragma empty_line
protected:
#pragma line 182 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
char_type* _M_in_beg;
char_type* _M_in_cur;
char_type* _M_in_end;
char_type* _M_out_beg;
char_type* _M_out_cur;
char_type* _M_out_end;
#pragma empty_line
#pragma empty_line
locale _M_buf_locale;
#pragma empty_line
public:
#pragma empty_line
virtual
~basic_streambuf()
{ }
#pragma line 206 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
locale
pubimbue(const locale &__loc)
{
locale __tmp(this->getloc());
this->imbue(__loc);
_M_buf_locale = __loc;
return __tmp;
}
#pragma line 223 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
locale
getloc() const
{ return _M_buf_locale; }
#pragma line 236 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
__streambuf_type*
pubsetbuf(char_type* __s, streamsize __n)
{ return this->setbuf(__s, __n); }
#pragma empty_line
pos_type
pubseekoff(off_type __off, ios_base::seekdir __way,
ios_base::openmode __mode = ios_base::in | ios_base::out)
{ return this->seekoff(__off, __way, __mode); }
#pragma empty_line
pos_type
pubseekpos(pos_type __sp,
ios_base::openmode __mode = ios_base::in | ios_base::out)
{ return this->seekpos(__sp, __mode); }
#pragma empty_line
int
pubsync() { return this->sync(); }
#pragma line 263 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
streamsize
in_avail()
{
const streamsize __ret = this->egptr() - this->gptr();
return __ret ? __ret : this->showmanyc();
}
#pragma line 277 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
int_type
snextc()
{
int_type __ret = traits_type::eof();
if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(),
__ret), true))
__ret = this->sgetc();
return __ret;
}
#pragma line 295 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
int_type
sbumpc()
{
int_type __ret;
if (__builtin_expect(this->gptr() < this->egptr(), true))
{
__ret = traits_type::to_int_type(*this->gptr());
this->gbump(1);
}
else
__ret = this->uflow();
return __ret;
}
#pragma line 317 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
int_type
sgetc()
{
int_type __ret;
if (__builtin_expect(this->gptr() < this->egptr(), true))
__ret = traits_type::to_int_type(*this->gptr());
else
__ret = this->underflow();
return __ret;
}
#pragma line 336 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
streamsize
sgetn(char_type* __s, streamsize __n)
{ return this->xsgetn(__s, __n); }
#pragma line 351 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
int_type
sputbackc(char_type __c)
{
int_type __ret;
const bool __testpos = this->eback() < this->gptr();
if (__builtin_expect(!__testpos ||
!traits_type::eq(__c, this->gptr()[-1]), false))
__ret = this->pbackfail(traits_type::to_int_type(__c));
else
{
this->gbump(-1);
__ret = traits_type::to_int_type(*this->gptr());
}
return __ret;
}
#pragma line 376 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
int_type
sungetc()
{
int_type __ret;
if (__builtin_expect(this->eback() < this->gptr(), true))
{
this->gbump(-1);
__ret = traits_type::to_int_type(*this->gptr());
}
else
__ret = this->pbackfail();
return __ret;
}
#pragma line 403 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
int_type
sputc(char_type __c)
{
int_type __ret;
if (__builtin_expect(this->pptr() < this->epptr(), true))
{
*this->pptr() = __c;
this->pbump(1);
__ret = traits_type::to_int_type(__c);
}
else
__ret = this->overflow(traits_type::to_int_type(__c));
return __ret;
}
#pragma line 429 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
streamsize
sputn(const char_type* __s, streamsize __n)
{ return this->xsputn(__s, __n); }
#pragma empty_line
protected:
#pragma line 443 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
basic_streambuf()
: _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
_M_out_beg(0), _M_out_cur(0), _M_out_end(0),
_M_buf_locale(locale())
{ }
#pragma line 461 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
char_type*
eback() const { return _M_in_beg; }
#pragma empty_line
char_type*
gptr() const { return _M_in_cur; }
#pragma empty_line
char_type*
egptr() const { return _M_in_end; }
#pragma line 477 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
void
gbump(int __n) { _M_in_cur += __n; }
#pragma line 488 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
void
setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
{
_M_in_beg = __gbeg;
_M_in_cur = __gnext;
_M_in_end = __gend;
}
#pragma line 508 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
char_type*
pbase() const { return _M_out_beg; }
#pragma empty_line
char_type*
pptr() const { return _M_out_cur; }
#pragma empty_line
char_type*
epptr() const { return _M_out_end; }
#pragma line 524 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
void
pbump(int __n) { _M_out_cur += __n; }
#pragma line 534 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
void
setp(char_type* __pbeg, char_type* __pend)
{
_M_out_beg = _M_out_cur = __pbeg;
_M_out_end = __pend;
}
#pragma line 555 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual void
imbue(const locale&)
{ }
#pragma line 570 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual basic_streambuf<char_type,_Traits>*
setbuf(char_type*, streamsize)
{ return this; }
#pragma line 581 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual pos_type
seekoff(off_type, ios_base::seekdir,
ios_base::openmode = ios_base::in | ios_base::out)
{ return pos_type(off_type(-1)); }
#pragma line 593 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual pos_type
seekpos(pos_type,
ios_base::openmode = ios_base::in | ios_base::out)
{ return pos_type(off_type(-1)); }
#pragma line 606 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual int
sync() { return 0; }
#pragma line 628 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual streamsize
showmanyc() { return 0; }
#pragma line 644 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual streamsize
xsgetn(char_type* __s, streamsize __n);
#pragma line 666 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual int_type
underflow()
{ return traits_type::eof(); }
#pragma line 679 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual int_type
uflow()
{
int_type __ret = traits_type::eof();
const bool __testeof = traits_type::eq_int_type(this->underflow(),
__ret);
if (!__testeof)
{
__ret = traits_type::to_int_type(*this->gptr());
this->gbump(1);
}
return __ret;
}
#pragma line 703 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual int_type
pbackfail(int_type = traits_type::eof())
{ return traits_type::eof(); }
#pragma line 721 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual streamsize
xsputn(const char_type* __s, streamsize __n);
#pragma line 747 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
virtual int_type
overflow(int_type = traits_type::eof())
{ return traits_type::eof(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
#pragma line 762 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 3
void
stossc()
{
if (this->gptr() < this->egptr())
this->gbump(1);
else
this->uflow();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
__safe_gbump(streamsize __n) { _M_in_cur += __n; }
#pragma empty_line
void
__safe_pbump(streamsize __n) { _M_out_cur += __n; }
#pragma empty_line
private:
#pragma empty_line
#pragma empty_line
basic_streambuf(const __streambuf_type& __sb)
: _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur),
_M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg),
_M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur),
_M_buf_locale(__sb._M_buf_locale)
{ }
#pragma empty_line
__streambuf_type&
operator=(const __streambuf_type&) { return *this; };
};
#pragma empty_line
#pragma empty_line
template<>
streamsize
__copy_streambufs_eof(basic_streambuf<char>* __sbin,
basic_streambuf<char>* __sbout, bool& __ineof);
#pragma empty_line
template<>
streamsize
__copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin,
basic_streambuf<wchar_t>* __sbout, bool& __ineof);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf.tcc" 1 3
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf.tcc" 3
#pragma empty_line
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf.tcc" 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::
xsgetn(char_type* __s, streamsize __n)
{
streamsize __ret = 0;
while (__ret < __n)
{
const streamsize __buf_len = this->egptr() - this->gptr();
if (__buf_len)
{
const streamsize __remaining = __n - __ret;
const streamsize __len = std::min(__buf_len, __remaining);
traits_type::copy(__s, this->gptr(), __len);
__ret += __len;
__s += __len;
this->__safe_gbump(__len);
}
#pragma empty_line
if (__ret < __n)
{
const int_type __c = this->uflow();
if (!traits_type::eq_int_type(__c, traits_type::eof()))
{
traits_type::assign(*__s++, traits_type::to_char_type(__c));
++__ret;
}
else
break;
}
}
return __ret;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::
xsputn(const char_type* __s, streamsize __n)
{
streamsize __ret = 0;
while (__ret < __n)
{
const streamsize __buf_len = this->epptr() - this->pptr();
if (__buf_len)
{
const streamsize __remaining = __n - __ret;
const streamsize __len = std::min(__buf_len, __remaining);
traits_type::copy(this->pptr(), __s, __len);
__ret += __len;
__s += __len;
this->__safe_pbump(__len);
}
#pragma empty_line
if (__ret < __n)
{
int_type __c = this->overflow(traits_type::to_int_type(*__s));
if (!traits_type::eq_int_type(__c, traits_type::eof()))
{
++__ret;
++__s;
}
else
break;
}
}
return __ret;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
streamsize
__copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin,
basic_streambuf<_CharT, _Traits>* __sbout,
bool& __ineof)
{
streamsize __ret = 0;
__ineof = true;
typename _Traits::int_type __c = __sbin->sgetc();
while (!_Traits::eq_int_type(__c, _Traits::eof()))
{
__c = __sbout->sputc(_Traits::to_char_type(__c));
if (_Traits::eq_int_type(__c, _Traits::eof()))
{
__ineof = false;
break;
}
++__ret;
__c = __sbin->snextc();
}
return __ret;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline streamsize
__copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
basic_streambuf<_CharT, _Traits>* __sbout)
{
bool __ineof;
return __copy_streambufs_eof(__sbin, __sbout, __ineof);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class basic_streambuf<char>;
extern template
streamsize
__copy_streambufs(basic_streambuf<char>*,
basic_streambuf<char>*);
extern template
streamsize
__copy_streambufs_eof(basic_streambuf<char>*,
basic_streambuf<char>*, bool&);
#pragma empty_line
#pragma empty_line
extern template class basic_streambuf<wchar_t>;
extern template
streamsize
__copy_streambufs(basic_streambuf<wchar_t>*,
basic_streambuf<wchar_t>*);
extern template
streamsize
__copy_streambufs_eof(basic_streambuf<wchar_t>*,
basic_streambuf<wchar_t>*, bool&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 809 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/streambuf" 2 3
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 1 3
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
#pragma empty_line
#pragma line 36 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwctype" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwctype" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwctype" 3
#pragma line 82 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cwctype" 3
namespace std
{
using ::wctrans_t;
using ::wctype_t;
using ::wint_t;
#pragma empty_line
using ::iswalnum;
using ::iswalpha;
#pragma empty_line
using ::iswblank;
#pragma empty_line
using ::iswcntrl;
using ::iswctype;
using ::iswdigit;
using ::iswgraph;
using ::iswlower;
using ::iswprint;
using ::iswpunct;
using ::iswspace;
using ::iswupper;
using ::iswxdigit;
using ::towctrans;
using ::towlower;
using ::towupper;
using ::wctrans;
using ::wctype;
}
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cctype" 3
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/ctype_base.h" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/ctype_base.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct ctype_base
{
#pragma empty_line
typedef const int* __to_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef unsigned short mask;
static const mask upper = 1 << 0;
static const mask lower = 1 << 1;
static const mask alpha = 1 << 2;
static const mask digit = 1 << 3;
static const mask xdigit = 1 << 4;
static const mask space = 1 << 5;
static const mask print = 1 << 6;
static const mask graph = (1 << 2) | (1 << 3) | (1 << 9);
static const mask cntrl = 1 << 8;
static const mask punct = 1 << 9;
static const mask alnum = (1 << 2) | (1 << 3);
};
#pragma empty_line
#pragma empty_line
}
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf_iterator.h" 1 3
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf_iterator.h" 3
#pragma empty_line
#pragma line 36 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf_iterator.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 51 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/streambuf_iterator.h" 3
template<typename _CharT, typename _Traits>
class istreambuf_iterator
: public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
_CharT*, _CharT&>
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
typedef typename _Traits::int_type int_type;
typedef basic_streambuf<_CharT, _Traits> streambuf_type;
typedef basic_istream<_CharT, _Traits> istream_type;
#pragma empty_line
#pragma empty_line
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
ostreambuf_iterator<_CharT2> >::__type
copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
ostreambuf_iterator<_CharT2>);
#pragma empty_line
template<bool _IsMove, typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
_CharT2*>::__type
__copy_move_a2(istreambuf_iterator<_CharT2>,
istreambuf_iterator<_CharT2>, _CharT2*);
#pragma empty_line
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
istreambuf_iterator<_CharT2> >::__type
find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
const _CharT2&);
#pragma empty_line
private:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mutable streambuf_type* _M_sbuf;
mutable int_type _M_c;
#pragma empty_line
public:
#pragma empty_line
istreambuf_iterator() throw()
: _M_sbuf(0), _M_c(traits_type::eof()) { }
#pragma empty_line
#pragma empty_line
istreambuf_iterator(istream_type& __s) throw()
: _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
#pragma empty_line
#pragma empty_line
istreambuf_iterator(streambuf_type* __s) throw()
: _M_sbuf(__s), _M_c(traits_type::eof()) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
char_type
operator*() const
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return traits_type::to_char_type(_M_get());
}
#pragma empty_line
#pragma empty_line
istreambuf_iterator&
operator++()
{
#pragma empty_line
#pragma empty_line
;
if (_M_sbuf)
{
_M_sbuf->sbumpc();
_M_c = traits_type::eof();
}
return *this;
}
#pragma empty_line
#pragma empty_line
istreambuf_iterator
operator++(int)
{
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
istreambuf_iterator __old = *this;
if (_M_sbuf)
{
__old._M_c = _M_sbuf->sbumpc();
_M_c = traits_type::eof();
}
return __old;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
equal(const istreambuf_iterator& __b) const
{ return _M_at_eof() == __b._M_at_eof(); }
#pragma empty_line
private:
int_type
_M_get() const
{
const int_type __eof = traits_type::eof();
int_type __ret = __eof;
if (_M_sbuf)
{
if (!traits_type::eq_int_type(_M_c, __eof))
__ret = _M_c;
else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()),
__eof))
_M_c = __ret;
else
_M_sbuf = 0;
}
return __ret;
}
#pragma empty_line
bool
_M_at_eof() const
{
const int_type __eof = traits_type::eof();
return traits_type::eq_int_type(_M_get(), __eof);
}
};
#pragma empty_line
template<typename _CharT, typename _Traits>
inline bool
operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return __a.equal(__b); }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline bool
operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return !__a.equal(__b); }
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
class ostreambuf_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> streambuf_type;
typedef basic_ostream<_CharT, _Traits> ostream_type;
#pragma empty_line
#pragma empty_line
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
ostreambuf_iterator<_CharT2> >::__type
copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
ostreambuf_iterator<_CharT2>);
#pragma empty_line
private:
streambuf_type* _M_sbuf;
bool _M_failed;
#pragma empty_line
public:
#pragma empty_line
ostreambuf_iterator(ostream_type& __s) throw ()
: _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
#pragma empty_line
#pragma empty_line
ostreambuf_iterator(streambuf_type* __s) throw ()
: _M_sbuf(__s), _M_failed(!_M_sbuf) { }
#pragma empty_line
#pragma empty_line
ostreambuf_iterator&
operator=(_CharT __c)
{
if (!_M_failed &&
_Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
_M_failed = true;
return *this;
}
#pragma empty_line
#pragma empty_line
ostreambuf_iterator&
operator*()
{ return *this; }
#pragma empty_line
#pragma empty_line
ostreambuf_iterator&
operator++(int)
{ return *this; }
#pragma empty_line
#pragma empty_line
ostreambuf_iterator&
operator++()
{ return *this; }
#pragma empty_line
#pragma empty_line
bool
failed() const throw()
{ return _M_failed; }
#pragma empty_line
ostreambuf_iterator&
_M_put(const _CharT* __ws, streamsize __len)
{
if (__builtin_expect(!_M_failed, true)
&& __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
false))
_M_failed = true;
return *this;
}
};
#pragma empty_line
#pragma empty_line
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
copy(istreambuf_iterator<_CharT> __first,
istreambuf_iterator<_CharT> __last,
ostreambuf_iterator<_CharT> __result)
{
if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
{
bool __ineof;
__copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
if (!__ineof)
__result._M_failed = true;
}
return __result;
}
#pragma empty_line
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
__copy_move_a2(_CharT* __first, _CharT* __last,
ostreambuf_iterator<_CharT> __result)
{
const streamsize __num = __last - __first;
if (__num > 0)
__result._M_put(__first, __num);
return __result;
}
#pragma empty_line
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
__copy_move_a2(const _CharT* __first, const _CharT* __last,
ostreambuf_iterator<_CharT> __result)
{
const streamsize __num = __last - __first;
if (__num > 0)
__result._M_put(__first, __num);
return __result;
}
#pragma empty_line
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_move_a2(istreambuf_iterator<_CharT> __first,
istreambuf_iterator<_CharT> __last, _CharT* __result)
{
typedef istreambuf_iterator<_CharT> __is_iterator_type;
typedef typename __is_iterator_type::traits_type traits_type;
typedef typename __is_iterator_type::streambuf_type streambuf_type;
typedef typename traits_type::int_type int_type;
#pragma empty_line
if (__first._M_sbuf && !__last._M_sbuf)
{
streambuf_type* __sb = __first._M_sbuf;
int_type __c = __sb->sgetc();
while (!traits_type::eq_int_type(__c, traits_type::eof()))
{
const streamsize __n = __sb->egptr() - __sb->gptr();
if (__n > 1)
{
traits_type::copy(__result, __sb->gptr(), __n);
__sb->__safe_gbump(__n);
__result += __n;
__c = __sb->underflow();
}
else
{
*__result++ = traits_type::to_char_type(__c);
__c = __sb->snextc();
}
}
}
return __result;
}
#pragma empty_line
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
istreambuf_iterator<_CharT> >::__type
find(istreambuf_iterator<_CharT> __first,
istreambuf_iterator<_CharT> __last, const _CharT& __val)
{
typedef istreambuf_iterator<_CharT> __is_iterator_type;
typedef typename __is_iterator_type::traits_type traits_type;
typedef typename __is_iterator_type::streambuf_type streambuf_type;
typedef typename traits_type::int_type int_type;
#pragma empty_line
if (__first._M_sbuf && !__last._M_sbuf)
{
const int_type __ival = traits_type::to_int_type(__val);
streambuf_type* __sb = __first._M_sbuf;
int_type __c = __sb->sgetc();
while (!traits_type::eq_int_type(__c, traits_type::eof())
&& !traits_type::eq_int_type(__c, __ival))
{
streamsize __n = __sb->egptr() - __sb->gptr();
if (__n > 1)
{
const _CharT* __p = traits_type::find(__sb->gptr(),
__n, __val);
if (__p)
__n = __p - __sb->gptr();
__sb->__safe_gbump(__n);
__c = __sb->sgetc();
}
else
__c = __sb->snextc();
}
#pragma empty_line
if (!traits_type::eq_int_type(__c, traits_type::eof()))
__first._M_c = __c;
else
__first._M_sbuf = 0;
}
return __first;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 51 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<typename _Tp>
void
__convert_to_v(const char*, _Tp&, ios_base::iostate&,
const __c_locale&) throw();
#pragma empty_line
#pragma empty_line
template<>
void
__convert_to_v(const char*, float&, ios_base::iostate&,
const __c_locale&) throw();
#pragma empty_line
template<>
void
__convert_to_v(const char*, double&, ios_base::iostate&,
const __c_locale&) throw();
#pragma empty_line
template<>
void
__convert_to_v(const char*, long double&, ios_base::iostate&,
const __c_locale&) throw();
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
struct __pad
{
static void
_S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
const _CharT* __olds, streamsize __newlen, streamsize __oldlen);
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
_CharT*
__add_grouping(_CharT* __s, _CharT __sep,
const char* __gbeg, size_t __gsize,
const _CharT* __first, const _CharT* __last);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline
ostreambuf_iterator<_CharT>
__write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len)
{
__s._M_put(__ws, __len);
return __s;
}
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _OutIter>
inline
_OutIter
__write(_OutIter __s, const _CharT* __ws, int __len)
{
for (int __j = 0; __j < __len; __j++, ++__s)
*__s = __ws[__j];
return __s;
}
#pragma line 144 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<typename _CharT>
class __ctype_abstract_base : public locale::facet, public ctype_base
{
public:
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
#pragma line 162 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
bool
is(mask __m, char_type __c) const
{ return this->do_is(__m, __c); }
#pragma line 179 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
is(const char_type *__lo, const char_type *__hi, mask *__vec) const
{ return this->do_is(__lo, __hi, __vec); }
#pragma line 195 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
{ return this->do_scan_is(__m, __lo, __hi); }
#pragma line 211 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{ return this->do_scan_not(__m, __lo, __hi); }
#pragma line 225 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
toupper(char_type __c) const
{ return this->do_toupper(__c); }
#pragma line 240 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
{ return this->do_toupper(__lo, __hi); }
#pragma line 254 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
tolower(char_type __c) const
{ return this->do_tolower(__c); }
#pragma line 269 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
{ return this->do_tolower(__lo, __hi); }
#pragma line 286 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
widen(char __c) const
{ return this->do_widen(__c); }
#pragma line 305 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
{ return this->do_widen(__lo, __hi, __to); }
#pragma line 324 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char
narrow(char_type __c, char __dfault) const
{ return this->do_narrow(__c, __dfault); }
#pragma line 346 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char *__to) const
{ return this->do_narrow(__lo, __hi, __dfault, __to); }
#pragma empty_line
protected:
explicit
__ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
#pragma empty_line
virtual
~__ctype_abstract_base() { }
#pragma line 371 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual bool
do_is(mask __m, char_type __c) const = 0;
#pragma line 390 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi,
mask* __vec) const = 0;
#pragma line 409 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
#pragma line 428 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
#pragma line 446 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_toupper(char_type) const = 0;
#pragma line 463 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const = 0;
#pragma line 479 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_tolower(char_type) const = 0;
#pragma line 496 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const = 0;
#pragma line 515 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_widen(char) const = 0;
#pragma line 536 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char*
do_widen(const char* __lo, const char* __hi,
char_type* __dest) const = 0;
#pragma line 558 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char
do_narrow(char_type, char __dfault) const = 0;
#pragma line 582 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const = 0;
};
#pragma line 605 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<typename _CharT>
class ctype : public __ctype_abstract_base<_CharT>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef typename __ctype_abstract_base<_CharT>::mask mask;
#pragma empty_line
#pragma empty_line
static locale::id id;
#pragma empty_line
explicit
ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
#pragma empty_line
protected:
virtual
~ctype();
#pragma empty_line
virtual bool
do_is(mask __m, char_type __c) const;
#pragma empty_line
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
#pragma empty_line
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
#pragma empty_line
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const;
#pragma empty_line
virtual char_type
do_toupper(char_type __c) const;
#pragma empty_line
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
#pragma empty_line
virtual char_type
do_tolower(char_type __c) const;
#pragma empty_line
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
#pragma empty_line
virtual char_type
do_widen(char __c) const;
#pragma empty_line
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
#pragma empty_line
virtual char
do_narrow(char_type, char __dfault) const;
#pragma empty_line
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const;
};
#pragma empty_line
template<typename _CharT>
locale::id ctype<_CharT>::id;
#pragma line 674 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<>
class ctype<char> : public locale::facet, public ctype_base
{
public:
#pragma empty_line
#pragma empty_line
typedef char char_type;
#pragma empty_line
protected:
#pragma empty_line
__c_locale _M_c_locale_ctype;
bool _M_del;
__to_type _M_toupper;
__to_type _M_tolower;
const mask* _M_table;
mutable char _M_widen_ok;
mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
mutable char _M_narrow_ok;
#pragma empty_line
#pragma empty_line
public:
#pragma empty_line
static locale::id id;
#pragma empty_line
static const size_t table_size = 1 + static_cast<unsigned char>(-1);
#pragma line 711 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
#pragma line 724 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
size_t __refs = 0);
#pragma line 737 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
inline bool
is(mask __m, char __c) const;
#pragma line 752 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
inline const char*
is(const char* __lo, const char* __hi, mask* __vec) const;
#pragma line 766 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
inline const char*
scan_is(mask __m, const char* __lo, const char* __hi) const;
#pragma line 780 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
inline const char*
scan_not(mask __m, const char* __lo, const char* __hi) const;
#pragma line 795 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
toupper(char_type __c) const
{ return this->do_toupper(__c); }
#pragma line 812 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
{ return this->do_toupper(__lo, __hi); }
#pragma line 828 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
tolower(char_type __c) const
{ return this->do_tolower(__c); }
#pragma line 845 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
{ return this->do_tolower(__lo, __hi); }
#pragma line 865 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
widen(char __c) const
{
if (_M_widen_ok)
return _M_widen[static_cast<unsigned char>(__c)];
this->_M_widen_init();
return this->do_widen(__c);
}
#pragma line 892 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
{
if (_M_widen_ok == 1)
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
if (!_M_widen_ok)
_M_widen_init();
return this->do_widen(__lo, __hi, __to);
}
#pragma line 923 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char
narrow(char_type __c, char __dfault) const
{
if (_M_narrow[static_cast<unsigned char>(__c)])
return _M_narrow[static_cast<unsigned char>(__c)];
const char __t = do_narrow(__c, __dfault);
if (__t != __dfault)
_M_narrow[static_cast<unsigned char>(__c)] = __t;
return __t;
}
#pragma line 956 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char *__to) const
{
if (__builtin_expect(_M_narrow_ok == 1, true))
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
if (!_M_narrow_ok)
_M_narrow_init();
return this->do_narrow(__lo, __hi, __dfault, __to);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const mask*
table() const throw()
{ return _M_table; }
#pragma empty_line
#pragma empty_line
static const mask*
classic_table() throw();
protected:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual
~ctype();
#pragma line 1005 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_toupper(char_type) const;
#pragma line 1022 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
#pragma line 1038 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_tolower(char_type) const;
#pragma line 1055 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
#pragma line 1075 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_widen(char __c) const
{ return __c; }
#pragma line 1098 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __dest) const
{
__builtin_memcpy(__dest, __lo, __hi - __lo);
return __hi;
}
#pragma line 1124 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char
do_narrow(char_type __c, char) const
{ return __c; }
#pragma line 1150 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char, char* __dest) const
{
__builtin_memcpy(__dest, __lo, __hi - __lo);
return __hi;
}
#pragma empty_line
private:
void _M_narrow_init() const;
void _M_widen_init() const;
};
#pragma line 1175 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<>
class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
{
public:
#pragma empty_line
#pragma empty_line
typedef wchar_t char_type;
typedef wctype_t __wmask_type;
#pragma empty_line
protected:
__c_locale _M_c_locale_ctype;
#pragma empty_line
#pragma empty_line
bool _M_narrow_ok;
char _M_narrow[128];
wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
#pragma empty_line
#pragma empty_line
mask _M_bit[16];
__wmask_type _M_wmask[16];
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
static locale::id id;
#pragma line 1208 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
ctype(size_t __refs = 0);
#pragma line 1219 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
ctype(__c_locale __cloc, size_t __refs = 0);
#pragma empty_line
protected:
__wmask_type
_M_convert_to_wmask(const mask __m) const throw();
#pragma empty_line
#pragma empty_line
virtual
~ctype();
#pragma line 1243 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual bool
do_is(mask __m, char_type __c) const;
#pragma line 1262 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
#pragma line 1280 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
#pragma line 1298 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const;
#pragma line 1315 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_toupper(char_type) const;
#pragma line 1332 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
#pragma line 1348 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_tolower(char_type) const;
#pragma line 1365 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
#pragma line 1385 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_widen(char) const;
#pragma line 1407 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
#pragma line 1430 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char
do_narrow(char_type, char __dfault) const;
#pragma line 1456 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const;
#pragma empty_line
#pragma empty_line
void
_M_initialize_ctype() throw();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
class ctype_byname : public ctype<_CharT>
{
public:
typedef typename ctype<_CharT>::mask mask;
#pragma empty_line
explicit
ctype_byname(const char* __s, size_t __refs = 0);
#pragma empty_line
protected:
virtual
~ctype_byname() { };
};
#pragma empty_line
#pragma empty_line
template<>
class ctype_byname<char> : public ctype<char>
{
public:
explicit
ctype_byname(const char* __s, size_t __refs = 0);
#pragma empty_line
protected:
virtual
~ctype_byname();
};
#pragma empty_line
#pragma empty_line
template<>
class ctype_byname<wchar_t> : public ctype<wchar_t>
{
public:
explicit
ctype_byname(const char* __s, size_t __refs = 0);
#pragma empty_line
protected:
virtual
~ctype_byname();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/ctype_inline.h" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/ctype_inline.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
bool
ctype<char>::
is(mask __m, char __c) const
{ return (_M_table[static_cast<unsigned char>(__c) ] & __m); }
#pragma empty_line
#pragma empty_line
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
while (__low < __high)
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
return __high;
}
#pragma empty_line
const char*
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && !this->is(__m, *__low))
++__low;
return __low;
}
#pragma empty_line
const char*
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && this->is(__m, *__low) != 0)
++__low;
return __low;
}
#pragma empty_line
#pragma empty_line
}
#pragma line 1513 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
class __num_base
{
public:
#pragma empty_line
#pragma empty_line
enum
{
_S_ominus,
_S_oplus,
_S_ox,
_S_oX,
_S_odigits,
_S_odigits_end = _S_odigits + 16,
_S_oudigits = _S_odigits_end,
_S_oudigits_end = _S_oudigits + 16,
_S_oe = _S_odigits + 14,
_S_oE = _S_oudigits + 14,
_S_oend = _S_oudigits_end
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const char* _S_atoms_out;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const char* _S_atoms_in;
#pragma empty_line
enum
{
_S_iminus,
_S_iplus,
_S_ix,
_S_iX,
_S_izero,
_S_ie = _S_izero + 14,
_S_iE = _S_izero + 20,
_S_iend = 26
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
static void
_S_format_float(const ios_base& __io, char* __fptr, char __mod) throw();
};
#pragma empty_line
template<typename _CharT>
struct __numpunct_cache : public locale::facet
{
const char* _M_grouping;
size_t _M_grouping_size;
bool _M_use_grouping;
const _CharT* _M_truename;
size_t _M_truename_size;
const _CharT* _M_falsename;
size_t _M_falsename_size;
_CharT _M_decimal_point;
_CharT _M_thousands_sep;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_CharT _M_atoms_out[__num_base::_S_oend];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_CharT _M_atoms_in[__num_base::_S_iend];
#pragma empty_line
bool _M_allocated;
#pragma empty_line
__numpunct_cache(size_t __refs = 0)
: facet(__refs), _M_grouping(0), _M_grouping_size(0),
_M_use_grouping(false),
_M_truename(0), _M_truename_size(0), _M_falsename(0),
_M_falsename_size(0), _M_decimal_point(_CharT()),
_M_thousands_sep(_CharT()), _M_allocated(false)
{ }
#pragma empty_line
~__numpunct_cache();
#pragma empty_line
void
_M_cache(const locale& __loc);
#pragma empty_line
private:
__numpunct_cache&
operator=(const __numpunct_cache&);
#pragma empty_line
explicit
__numpunct_cache(const __numpunct_cache&);
};
#pragma empty_line
template<typename _CharT>
__numpunct_cache<_CharT>::~__numpunct_cache()
{
if (_M_allocated)
{
delete [] _M_grouping;
delete [] _M_truename;
delete [] _M_falsename;
}
}
#pragma line 1641 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<typename _CharT>
class numpunct : public locale::facet
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
#pragma empty_line
typedef __numpunct_cache<_CharT> __cache_type;
#pragma empty_line
protected:
__cache_type* _M_data;
#pragma empty_line
public:
#pragma empty_line
static locale::id id;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
numpunct(size_t __refs = 0)
: facet(__refs), _M_data(0)
{ _M_initialize_numpunct(); }
#pragma line 1679 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
numpunct(__cache_type* __cache, size_t __refs = 0)
: facet(__refs), _M_data(__cache)
{ _M_initialize_numpunct(); }
#pragma line 1693 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
numpunct(__c_locale __cloc, size_t __refs = 0)
: facet(__refs), _M_data(0)
{ _M_initialize_numpunct(__cloc); }
#pragma line 1707 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
decimal_point() const
{ return this->do_decimal_point(); }
#pragma line 1720 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
char_type
thousands_sep() const
{ return this->do_thousands_sep(); }
#pragma line 1751 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
string
grouping() const
{ return this->do_grouping(); }
#pragma line 1764 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
string_type
truename() const
{ return this->do_truename(); }
#pragma line 1777 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
string_type
falsename() const
{ return this->do_falsename(); }
#pragma empty_line
protected:
#pragma empty_line
virtual
~numpunct();
#pragma line 1794 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_decimal_point() const
{ return _M_data->_M_decimal_point; }
#pragma line 1806 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual char_type
do_thousands_sep() const
{ return _M_data->_M_thousands_sep; }
#pragma line 1819 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual string
do_grouping() const
{ return _M_data->_M_grouping; }
#pragma line 1832 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual string_type
do_truename() const
{ return _M_data->_M_truename; }
#pragma line 1845 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual string_type
do_falsename() const
{ return _M_data->_M_falsename; }
#pragma empty_line
#pragma empty_line
void
_M_initialize_numpunct(__c_locale __cloc = 0);
};
#pragma empty_line
template<typename _CharT>
locale::id numpunct<_CharT>::id;
#pragma empty_line
template<>
numpunct<char>::~numpunct();
#pragma empty_line
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
#pragma empty_line
#pragma empty_line
template<>
numpunct<wchar_t>::~numpunct();
#pragma empty_line
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
class numpunct_byname : public numpunct<_CharT>
{
public:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
#pragma empty_line
explicit
numpunct_byname(const char* __s, size_t __refs = 0)
: numpunct<_CharT>(__refs)
{
if (__builtin_strcmp(__s, "C") != 0
&& __builtin_strcmp(__s, "POSIX") != 0)
{
__c_locale __tmp;
this->_S_create_c_locale(__tmp, __s);
this->_M_initialize_numpunct(__tmp);
this->_S_destroy_c_locale(__tmp);
}
}
#pragma empty_line
protected:
virtual
~numpunct_byname() { }
};
#pragma empty_line
#pragma empty_line
#pragma line 1915 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<typename _CharT, typename _InIter>
class num_get : public locale::facet
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef _InIter iter_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static locale::id id;
#pragma line 1936 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
num_get(size_t __refs = 0) : facet(__refs) { }
#pragma line 1962 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, bool& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma line 1998 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned short& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned int& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long long& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma line 2057 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, float& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, double& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long double& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma line 2099 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
get(iter_type __in, iter_type __end, ios_base& __io,
ios_base::iostate& __err, void*& __v) const
{ return this->do_get(__in, __end, __io, __err, __v); }
#pragma empty_line
protected:
#pragma empty_line
virtual ~num_get() { }
#pragma empty_line
iter_type
_M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
string&) const;
#pragma empty_line
template<typename _ValueT>
iter_type
_M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
_ValueT&) const;
#pragma empty_line
template<typename _CharT2>
typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type
_M_find(const _CharT2*, size_t __len, _CharT2 __c) const
{
int __ret = -1;
if (__len <= 10)
{
if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len))
__ret = __c - _CharT2('0');
}
else
{
if (__c >= _CharT2('0') && __c <= _CharT2('9'))
__ret = __c - _CharT2('0');
else if (__c >= _CharT2('a') && __c <= _CharT2('f'))
__ret = 10 + (__c - _CharT2('a'));
else if (__c >= _CharT2('A') && __c <= _CharT2('F'))
__ret = 10 + (__c - _CharT2('A'));
}
return __ret;
}
#pragma empty_line
template<typename _CharT2>
typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
int>::__type
_M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const
{
int __ret = -1;
const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
if (__q)
{
__ret = __q - __zero;
if (__ret > 15)
__ret -= 6;
}
return __ret;
}
#pragma line 2170 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
#pragma empty_line
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long& __v) const
{ return _M_extract_int(__beg, __end, __io, __err, __v); }
#pragma empty_line
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned short& __v) const
{ return _M_extract_int(__beg, __end, __io, __err, __v); }
#pragma empty_line
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned int& __v) const
{ return _M_extract_int(__beg, __end, __io, __err, __v); }
#pragma empty_line
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long& __v) const
{ return _M_extract_int(__beg, __end, __io, __err, __v); }
#pragma empty_line
#pragma empty_line
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long long& __v) const
{ return _M_extract_int(__beg, __end, __io, __err, __v); }
#pragma empty_line
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, unsigned long long& __v) const
{ return _M_extract_int(__beg, __end, __io, __err, __v); }
#pragma empty_line
#pragma empty_line
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
float&) const;
#pragma empty_line
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
double&) const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
long double&) const;
#pragma empty_line
#pragma empty_line
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
void*&) const;
#pragma line 2235 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
};
#pragma empty_line
template<typename _CharT, typename _InIter>
locale::id num_get<_CharT, _InIter>::id;
#pragma line 2253 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
template<typename _CharT, typename _OutIter>
class num_put : public locale::facet
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef _OutIter iter_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static locale::id id;
#pragma line 2274 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
explicit
num_put(size_t __refs = 0) : facet(__refs) { }
#pragma line 2292 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma line 2334 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma empty_line
iter_type
put(iter_type __s, ios_base& __f, char_type __fill,
unsigned long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma empty_line
#pragma empty_line
iter_type
put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma empty_line
iter_type
put(iter_type __s, ios_base& __f, char_type __fill,
unsigned long long __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma line 2397 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma empty_line
iter_type
put(iter_type __s, ios_base& __f, char_type __fill,
long double __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma line 2422 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
iter_type
put(iter_type __s, ios_base& __f, char_type __fill,
const void* __v) const
{ return this->do_put(__s, __f, __fill, __v); }
#pragma empty_line
protected:
template<typename _ValueT>
iter_type
_M_insert_float(iter_type, ios_base& __io, char_type __fill,
char __mod, _ValueT __v) const;
#pragma empty_line
void
_M_group_float(const char* __grouping, size_t __grouping_size,
char_type __sep, const char_type* __p, char_type* __new,
char_type* __cs, int& __len) const;
#pragma empty_line
template<typename _ValueT>
iter_type
_M_insert_int(iter_type, ios_base& __io, char_type __fill,
_ValueT __v) const;
#pragma empty_line
void
_M_group_int(const char* __grouping, size_t __grouping_size,
char_type __sep, ios_base& __io, char_type* __new,
char_type* __cs, int& __len) const;
#pragma empty_line
void
_M_pad(char_type __fill, streamsize __w, ios_base& __io,
char_type* __new, const char_type* __cs, int& __len) const;
#pragma empty_line
#pragma empty_line
virtual
~num_put() { };
#pragma line 2470 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 3
virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
#pragma empty_line
virtual iter_type
do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
{ return _M_insert_int(__s, __io, __fill, __v); }
#pragma empty_line
virtual iter_type
do_put(iter_type __s, ios_base& __io, char_type __fill,
unsigned long __v) const
{ return _M_insert_int(__s, __io, __fill, __v); }
#pragma empty_line
#pragma empty_line
virtual iter_type
do_put(iter_type __s, ios_base& __io, char_type __fill,
long long __v) const
{ return _M_insert_int(__s, __io, __fill, __v); }
#pragma empty_line
virtual iter_type
do_put(iter_type __s, ios_base& __io, char_type __fill,
unsigned long long __v) const
{ return _M_insert_int(__s, __io, __fill, __v); }
#pragma empty_line
#pragma empty_line
virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, double __v) const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
#pragma empty_line
#pragma empty_line
virtual iter_type
do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
};
#pragma empty_line
template <typename _CharT, typename _OutIter>
locale::id num_put<_CharT, _OutIter>::id;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isspace(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isprint(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
iscntrl(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isupper(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
islower(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isalpha(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isdigit(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
ispunct(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isxdigit(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isalnum(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline bool
isgraph(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline _CharT
toupper(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).toupper(__c); }
#pragma empty_line
#pragma empty_line
template<typename _CharT>
inline _CharT
tolower(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 1 3
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
#pragma empty_line
#pragma line 36 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Facet>
struct __use_cache
{
const _Facet*
operator() (const locale& __loc) const;
};
#pragma empty_line
#pragma empty_line
template<typename _CharT>
struct __use_cache<__numpunct_cache<_CharT> >
{
const __numpunct_cache<_CharT>*
operator() (const locale& __loc) const
{
const size_t __i = numpunct<_CharT>::id._M_id();
const locale::facet** __caches = __loc._M_impl->_M_caches;
if (!__caches[__i])
{
__numpunct_cache<_CharT>* __tmp = 0;
try
{
__tmp = new __numpunct_cache<_CharT>;
__tmp->_M_cache(__loc);
}
catch(...)
{
delete __tmp;
throw;
}
__loc._M_impl->_M_install_cache(__tmp, __i);
}
return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]);
}
};
#pragma empty_line
template<typename _CharT>
void
__numpunct_cache<_CharT>::_M_cache(const locale& __loc)
{
_M_allocated = true;
#pragma empty_line
const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
#pragma empty_line
char* __grouping = 0;
_CharT* __truename = 0;
_CharT* __falsename = 0;
try
{
_M_grouping_size = __np.grouping().size();
__grouping = new char[_M_grouping_size];
__np.grouping().copy(__grouping, _M_grouping_size);
_M_grouping = __grouping;
_M_use_grouping = (_M_grouping_size
&& static_cast<signed char>(_M_grouping[0]) > 0
&& (_M_grouping[0]
!= __gnu_cxx::__numeric_traits<char>::__max));
#pragma empty_line
_M_truename_size = __np.truename().size();
__truename = new _CharT[_M_truename_size];
__np.truename().copy(__truename, _M_truename_size);
_M_truename = __truename;
#pragma empty_line
_M_falsename_size = __np.falsename().size();
__falsename = new _CharT[_M_falsename_size];
__np.falsename().copy(__falsename, _M_falsename_size);
_M_falsename = __falsename;
#pragma empty_line
_M_decimal_point = __np.decimal_point();
_M_thousands_sep = __np.thousands_sep();
#pragma empty_line
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
__ct.widen(__num_base::_S_atoms_out,
__num_base::_S_atoms_out
+ __num_base::_S_oend, _M_atoms_out);
__ct.widen(__num_base::_S_atoms_in,
__num_base::_S_atoms_in
+ __num_base::_S_iend, _M_atoms_in);
}
catch(...)
{
delete [] __grouping;
delete [] __truename;
delete [] __falsename;
throw;
}
}
#pragma line 138 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
__attribute__ ((__pure__)) bool
__verify_grouping(const char* __grouping, size_t __grouping_size,
const string& __grouping_tmp) throw ();
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
_M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
ios_base::iostate& __err, string& __xtrc) const
{
typedef char_traits<_CharT> __traits_type;
typedef __numpunct_cache<_CharT> __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
const _CharT* __lit = __lc->_M_atoms_in;
char_type __c = char_type();
#pragma empty_line
#pragma empty_line
bool __testeof = __beg == __end;
#pragma empty_line
#pragma empty_line
if (!__testeof)
{
__c = *__beg;
const bool __plus = __c == __lit[__num_base::_S_iplus];
if ((__plus || __c == __lit[__num_base::_S_iminus])
&& !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
&& !(__c == __lc->_M_decimal_point))
{
__xtrc += __plus ? '+' : '-';
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
}
#pragma empty_line
#pragma empty_line
bool __found_mantissa = false;
int __sep_pos = 0;
while (!__testeof)
{
if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
|| __c == __lc->_M_decimal_point)
break;
else if (__c == __lit[__num_base::_S_izero])
{
if (!__found_mantissa)
{
__xtrc += '0';
__found_mantissa = true;
}
++__sep_pos;
#pragma empty_line
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
else
break;
}
#pragma empty_line
#pragma empty_line
bool __found_dec = false;
bool __found_sci = false;
string __found_grouping;
if (__lc->_M_use_grouping)
__found_grouping.reserve(32);
const char_type* __lit_zero = __lit + __num_base::_S_izero;
#pragma empty_line
if (!__lc->_M_allocated)
#pragma empty_line
while (!__testeof)
{
const int __digit = _M_find(__lit_zero, 10, __c);
if (__digit != -1)
{
__xtrc += '0' + __digit;
__found_mantissa = true;
}
else if (__c == __lc->_M_decimal_point
&& !__found_dec && !__found_sci)
{
__xtrc += '.';
__found_dec = true;
}
else if ((__c == __lit[__num_base::_S_ie]
|| __c == __lit[__num_base::_S_iE])
&& !__found_sci && __found_mantissa)
{
#pragma empty_line
__xtrc += 'e';
__found_sci = true;
#pragma empty_line
#pragma empty_line
if (++__beg != __end)
{
__c = *__beg;
const bool __plus = __c == __lit[__num_base::_S_iplus];
if (__plus || __c == __lit[__num_base::_S_iminus])
__xtrc += __plus ? '+' : '-';
else
continue;
}
else
{
__testeof = true;
break;
}
}
else
break;
#pragma empty_line
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
else
while (!__testeof)
{
#pragma empty_line
#pragma empty_line
if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
{
if (!__found_dec && !__found_sci)
{
#pragma empty_line
#pragma empty_line
if (__sep_pos)
{
__found_grouping += static_cast<char>(__sep_pos);
__sep_pos = 0;
}
else
{
#pragma empty_line
#pragma empty_line
__xtrc.clear();
break;
}
}
else
break;
}
else if (__c == __lc->_M_decimal_point)
{
if (!__found_dec && !__found_sci)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__found_grouping.size())
__found_grouping += static_cast<char>(__sep_pos);
__xtrc += '.';
__found_dec = true;
}
else
break;
}
else
{
const char_type* __q =
__traits_type::find(__lit_zero, 10, __c);
if (__q)
{
__xtrc += '0' + (__q - __lit_zero);
__found_mantissa = true;
++__sep_pos;
}
else if ((__c == __lit[__num_base::_S_ie]
|| __c == __lit[__num_base::_S_iE])
&& !__found_sci && __found_mantissa)
{
#pragma empty_line
if (__found_grouping.size() && !__found_dec)
__found_grouping += static_cast<char>(__sep_pos);
__xtrc += 'e';
__found_sci = true;
#pragma empty_line
#pragma empty_line
if (++__beg != __end)
{
__c = *__beg;
const bool __plus = __c == __lit[__num_base::_S_iplus];
if ((__plus || __c == __lit[__num_base::_S_iminus])
&& !(__lc->_M_use_grouping
&& __c == __lc->_M_thousands_sep)
&& !(__c == __lc->_M_decimal_point))
__xtrc += __plus ? '+' : '-';
else
continue;
}
else
{
__testeof = true;
break;
}
}
else
break;
}
#pragma empty_line
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__found_grouping.size())
{
#pragma empty_line
if (!__found_dec && !__found_sci)
__found_grouping += static_cast<char>(__sep_pos);
#pragma empty_line
if (!std::__verify_grouping(__lc->_M_grouping,
__lc->_M_grouping_size,
__found_grouping))
__err = ios_base::failbit;
}
#pragma empty_line
return __beg;
}
#pragma empty_line
template<typename _CharT, typename _InIter>
template<typename _ValueT>
_InIter
num_get<_CharT, _InIter>::
_M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
ios_base::iostate& __err, _ValueT& __v) const
{
typedef char_traits<_CharT> __traits_type;
using __gnu_cxx::__add_unsigned;
typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
typedef __numpunct_cache<_CharT> __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
const _CharT* __lit = __lc->_M_atoms_in;
char_type __c = char_type();
#pragma empty_line
#pragma empty_line
const ios_base::fmtflags __basefield = __io.flags()
& ios_base::basefield;
const bool __oct = __basefield == ios_base::oct;
int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10);
#pragma empty_line
#pragma empty_line
bool __testeof = __beg == __end;
#pragma empty_line
#pragma empty_line
bool __negative = false;
if (!__testeof)
{
__c = *__beg;
__negative = __c == __lit[__num_base::_S_iminus];
if ((__negative || __c == __lit[__num_base::_S_iplus])
&& !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
&& !(__c == __lc->_M_decimal_point))
{
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool __found_zero = false;
int __sep_pos = 0;
while (!__testeof)
{
if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
|| __c == __lc->_M_decimal_point)
break;
else if (__c == __lit[__num_base::_S_izero]
&& (!__found_zero || __base == 10))
{
__found_zero = true;
++__sep_pos;
if (__basefield == 0)
__base = 8;
if (__base == 8)
__sep_pos = 0;
}
else if (__found_zero
&& (__c == __lit[__num_base::_S_ix]
|| __c == __lit[__num_base::_S_iX]))
{
if (__basefield == 0)
__base = 16;
if (__base == 16)
{
__found_zero = false;
__sep_pos = 0;
}
else
break;
}
else
break;
#pragma empty_line
if (++__beg != __end)
{
__c = *__beg;
if (!__found_zero)
break;
}
else
__testeof = true;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
const size_t __len = (__base == 16 ? __num_base::_S_iend
- __num_base::_S_izero : __base);
#pragma empty_line
#pragma empty_line
string __found_grouping;
if (__lc->_M_use_grouping)
__found_grouping.reserve(32);
bool __testfail = false;
bool __testoverflow = false;
const __unsigned_type __max =
(__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
? -__gnu_cxx::__numeric_traits<_ValueT>::__min
: __gnu_cxx::__numeric_traits<_ValueT>::__max;
const __unsigned_type __smax = __max / __base;
__unsigned_type __result = 0;
int __digit = 0;
const char_type* __lit_zero = __lit + __num_base::_S_izero;
#pragma empty_line
if (!__lc->_M_allocated)
#pragma empty_line
while (!__testeof)
{
__digit = _M_find(__lit_zero, __len, __c);
if (__digit == -1)
break;
#pragma empty_line
if (__result > __smax)
__testoverflow = true;
else
{
__result *= __base;
__testoverflow |= __result > __max - __digit;
__result += __digit;
++__sep_pos;
}
#pragma empty_line
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
else
while (!__testeof)
{
#pragma empty_line
#pragma empty_line
if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
{
#pragma empty_line
#pragma empty_line
if (__sep_pos)
{
__found_grouping += static_cast<char>(__sep_pos);
__sep_pos = 0;
}
else
{
__testfail = true;
break;
}
}
else if (__c == __lc->_M_decimal_point)
break;
else
{
const char_type* __q =
__traits_type::find(__lit_zero, __len, __c);
if (!__q)
break;
#pragma empty_line
__digit = __q - __lit_zero;
if (__digit > 15)
__digit -= 6;
if (__result > __smax)
__testoverflow = true;
else
{
__result *= __base;
__testoverflow |= __result > __max - __digit;
__result += __digit;
++__sep_pos;
}
}
#pragma empty_line
if (++__beg != __end)
__c = *__beg;
else
__testeof = true;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__found_grouping.size())
{
#pragma empty_line
__found_grouping += static_cast<char>(__sep_pos);
#pragma empty_line
if (!std::__verify_grouping(__lc->_M_grouping,
__lc->_M_grouping_size,
__found_grouping))
__err = ios_base::failbit;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
if ((!__sep_pos && !__found_zero && !__found_grouping.size())
|| __testfail)
{
__v = 0;
__err = ios_base::failbit;
}
else if (__testoverflow)
{
if (__negative
&& __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
__v = __gnu_cxx::__numeric_traits<_ValueT>::__min;
else
__v = __gnu_cxx::__numeric_traits<_ValueT>::__max;
__err = ios_base::failbit;
}
else
__v = __negative ? -__result : __result;
#pragma empty_line
if (__testeof)
__err |= ios_base::eofbit;
return __beg;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, bool& __v) const
{
if (!(__io.flags() & ios_base::boolalpha))
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
long __l = -1;
__beg = _M_extract_int(__beg, __end, __io, __err, __l);
if (__l == 0 || __l == 1)
__v = bool(__l);
else
{
#pragma empty_line
#pragma empty_line
__v = true;
__err = ios_base::failbit;
if (__beg == __end)
__err |= ios_base::eofbit;
}
}
else
{
#pragma empty_line
typedef __numpunct_cache<_CharT> __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
#pragma empty_line
bool __testf = true;
bool __testt = true;
bool __donef = __lc->_M_falsename_size == 0;
bool __donet = __lc->_M_truename_size == 0;
bool __testeof = false;
size_t __n = 0;
while (!__donef || !__donet)
{
if (__beg == __end)
{
__testeof = true;
break;
}
#pragma empty_line
const char_type __c = *__beg;
#pragma empty_line
if (!__donef)
__testf = __c == __lc->_M_falsename[__n];
#pragma empty_line
if (!__testf && __donet)
break;
#pragma empty_line
if (!__donet)
__testt = __c == __lc->_M_truename[__n];
#pragma empty_line
if (!__testt && __donef)
break;
#pragma empty_line
if (!__testt && !__testf)
break;
#pragma empty_line
++__n;
++__beg;
#pragma empty_line
__donef = !__testf || __n >= __lc->_M_falsename_size;
__donet = !__testt || __n >= __lc->_M_truename_size;
}
if (__testf && __n == __lc->_M_falsename_size && __n)
{
__v = false;
if (__testt && __n == __lc->_M_truename_size)
__err = ios_base::failbit;
else
__err = __testeof ? ios_base::eofbit : ios_base::goodbit;
}
else if (__testt && __n == __lc->_M_truename_size && __n)
{
__v = true;
__err = __testeof ? ios_base::eofbit : ios_base::goodbit;
}
else
{
#pragma empty_line
#pragma empty_line
__v = false;
__err = ios_base::failbit;
if (__testeof)
__err |= ios_base::eofbit;
}
}
return __beg;
}
#pragma empty_line
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, float& __v) const
{
string __xtrc;
__xtrc.reserve(32);
__beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
}
#pragma empty_line
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, double& __v) const
{
string __xtrc;
__xtrc.reserve(32);
__beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
}
#pragma line 732 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long double& __v) const
{
string __xtrc;
__xtrc.reserve(32);
__beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
if (__beg == __end)
__err |= ios_base::eofbit;
return __beg;
}
#pragma empty_line
template<typename _CharT, typename _InIter>
_InIter
num_get<_CharT, _InIter>::
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, void*& __v) const
{
#pragma empty_line
typedef ios_base::fmtflags fmtflags;
const fmtflags __fmt = __io.flags();
__io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
#pragma empty_line
typedef __gnu_cxx::__conditional_type<(sizeof(void*)
<= sizeof(unsigned long)),
unsigned long, unsigned long long>::__type _UIntPtrType;
#pragma empty_line
_UIntPtrType __ul;
__beg = _M_extract_int(__beg, __end, __io, __err, __ul);
#pragma empty_line
#pragma empty_line
__io.flags(__fmt);
#pragma empty_line
__v = reinterpret_cast<void*>(__ul);
return __beg;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _OutIter>
void
num_put<_CharT, _OutIter>::
_M_pad(_CharT __fill, streamsize __w, ios_base& __io,
_CharT* __new, const _CharT* __cs, int& __len) const
{
#pragma empty_line
#pragma empty_line
__pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new,
__cs, __w, __len);
__len = static_cast<int>(__w);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _ValueT>
int
__int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
ios_base::fmtflags __flags, bool __dec)
{
_CharT* __buf = __bufend;
if (__builtin_expect(__dec, true))
{
#pragma empty_line
do
{
*--__buf = __lit[(__v % 10) + __num_base::_S_odigits];
__v /= 10;
}
while (__v != 0);
}
else if ((__flags & ios_base::basefield) == ios_base::oct)
{
#pragma empty_line
do
{
*--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits];
__v >>= 3;
}
while (__v != 0);
}
else
{
#pragma empty_line
const bool __uppercase = __flags & ios_base::uppercase;
const int __case_offset = __uppercase ? __num_base::_S_oudigits
: __num_base::_S_odigits;
do
{
*--__buf = __lit[(__v & 0xf) + __case_offset];
__v >>= 4;
}
while (__v != 0);
}
return __bufend - __buf;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _OutIter>
void
num_put<_CharT, _OutIter>::
_M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep,
ios_base&, _CharT* __new, _CharT* __cs, int& __len) const
{
_CharT* __p = std::__add_grouping(__new, __sep, __grouping,
__grouping_size, __cs, __cs + __len);
__len = __p - __new;
}
#pragma empty_line
template<typename _CharT, typename _OutIter>
template<typename _ValueT>
_OutIter
num_put<_CharT, _OutIter>::
_M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill,
_ValueT __v) const
{
using __gnu_cxx::__add_unsigned;
typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
typedef __numpunct_cache<_CharT> __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
const _CharT* __lit = __lc->_M_atoms_out;
const ios_base::fmtflags __flags = __io.flags();
#pragma empty_line
#pragma empty_line
const int __ilen = 5 * sizeof(_ValueT);
_CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __ilen));
#pragma empty_line
#pragma empty_line
#pragma empty_line
const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
const bool __dec = (__basefield != ios_base::oct
&& __basefield != ios_base::hex);
const __unsigned_type __u = ((__v > 0 || !__dec)
? __unsigned_type(__v)
: -__unsigned_type(__v));
int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec);
__cs += __ilen - __len;
#pragma empty_line
#pragma empty_line
if (__lc->_M_use_grouping)
{
#pragma empty_line
#pragma empty_line
_CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* (__len + 1)
* 2));
_M_group_int(__lc->_M_grouping, __lc->_M_grouping_size,
__lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len);
__cs = __cs2 + 2;
}
#pragma empty_line
#pragma empty_line
if (__builtin_expect(__dec, true))
{
#pragma empty_line
if (__v >= 0)
{
if (bool(__flags & ios_base::showpos)
&& __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
*--__cs = __lit[__num_base::_S_oplus], ++__len;
}
else
*--__cs = __lit[__num_base::_S_ominus], ++__len;
}
else if (bool(__flags & ios_base::showbase) && __v)
{
if (__basefield == ios_base::oct)
*--__cs = __lit[__num_base::_S_odigits], ++__len;
else
{
#pragma empty_line
const bool __uppercase = __flags & ios_base::uppercase;
*--__cs = __lit[__num_base::_S_ox + __uppercase];
#pragma empty_line
*--__cs = __lit[__num_base::_S_odigits];
__len += 2;
}
}
#pragma empty_line
#pragma empty_line
const streamsize __w = __io.width();
if (__w > static_cast<streamsize>(__len))
{
_CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __w));
_M_pad(__fill, __w, __io, __cs3, __cs, __len);
__cs = __cs3;
}
__io.width(0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
return std::__write(__s, __cs, __len);
}
#pragma empty_line
template<typename _CharT, typename _OutIter>
void
num_put<_CharT, _OutIter>::
_M_group_float(const char* __grouping, size_t __grouping_size,
_CharT __sep, const _CharT* __p, _CharT* __new,
_CharT* __cs, int& __len) const
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
const int __declen = __p ? __p - __cs : __len;
_CharT* __p2 = std::__add_grouping(__new, __sep, __grouping,
__grouping_size,
__cs, __cs + __declen);
#pragma empty_line
#pragma empty_line
int __newlen = __p2 - __new;
if (__p)
{
char_traits<_CharT>::copy(__p2, __p, __len - __declen);
__newlen += __len - __declen;
}
__len = __newlen;
}
#pragma line 968 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
template<typename _CharT, typename _OutIter>
template<typename _ValueT>
_OutIter
num_put<_CharT, _OutIter>::
_M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
_ValueT __v) const
{
typedef __numpunct_cache<_CharT> __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
#pragma empty_line
#pragma empty_line
const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision();
#pragma empty_line
const int __max_digits =
__gnu_cxx::__numeric_traits<_ValueT>::__digits10;
#pragma empty_line
#pragma empty_line
int __len;
#pragma empty_line
char __fbuf[16];
__num_base::_S_format_float(__io, __fbuf, __mod);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __cs_size = __max_digits * 3;
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
__len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
__fbuf, __prec, __v);
#pragma empty_line
#pragma empty_line
if (__len >= __cs_size)
{
__cs_size = __len + 1;
__cs = static_cast<char*>(__builtin_alloca(__cs_size));
__len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
__fbuf, __prec, __v);
}
#pragma line 1029 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
#pragma empty_line
_CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __len));
__ctype.widen(__cs, __cs + __len, __ws);
#pragma empty_line
#pragma empty_line
_CharT* __wp = 0;
const char* __p = char_traits<char>::find(__cs, __len, '.');
if (__p)
{
__wp = __ws + (__p - __cs);
*__wp = __lc->_M_decimal_point;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__lc->_M_use_grouping
&& (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9'
&& __cs[1] >= '0' && __cs[2] >= '0')))
{
#pragma empty_line
#pragma empty_line
_CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __len * 2));
#pragma empty_line
streamsize __off = 0;
if (__cs[0] == '-' || __cs[0] == '+')
{
__off = 1;
__ws2[0] = __ws[0];
__len -= 1;
}
#pragma empty_line
_M_group_float(__lc->_M_grouping, __lc->_M_grouping_size,
__lc->_M_thousands_sep, __wp, __ws2 + __off,
__ws + __off, __len);
__len += __off;
#pragma empty_line
__ws = __ws2;
}
#pragma empty_line
#pragma empty_line
const streamsize __w = __io.width();
if (__w > static_cast<streamsize>(__len))
{
_CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __w));
_M_pad(__fill, __w, __io, __ws3, __ws, __len);
__ws = __ws3;
}
__io.width(0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
return std::__write(__s, __ws, __len);
}
#pragma empty_line
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
{
const ios_base::fmtflags __flags = __io.flags();
if ((__flags & ios_base::boolalpha) == 0)
{
const long __l = __v;
__s = _M_insert_int(__s, __io, __fill, __l);
}
else
{
typedef __numpunct_cache<_CharT> __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
const __cache_type* __lc = __uc(__loc);
#pragma empty_line
const _CharT* __name = __v ? __lc->_M_truename
: __lc->_M_falsename;
int __len = __v ? __lc->_M_truename_size
: __lc->_M_falsename_size;
#pragma empty_line
const streamsize __w = __io.width();
if (__w > static_cast<streamsize>(__len))
{
const streamsize __plen = __w - __len;
_CharT* __ps
= static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __plen));
#pragma empty_line
char_traits<_CharT>::assign(__ps, __plen, __fill);
__io.width(0);
#pragma empty_line
if ((__flags & ios_base::adjustfield) == ios_base::left)
{
__s = std::__write(__s, __name, __len);
__s = std::__write(__s, __ps, __plen);
}
else
{
__s = std::__write(__s, __ps, __plen);
__s = std::__write(__s, __name, __len);
}
return __s;
}
__io.width(0);
__s = std::__write(__s, __name, __len);
}
return __s;
}
#pragma empty_line
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
{ return _M_insert_float(__s, __io, __fill, char(), __v); }
#pragma line 1154 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill,
long double __v) const
{ return _M_insert_float(__s, __io, __fill, 'L', __v); }
#pragma empty_line
template<typename _CharT, typename _OutIter>
_OutIter
num_put<_CharT, _OutIter>::
do_put(iter_type __s, ios_base& __io, char_type __fill,
const void* __v) const
{
const ios_base::fmtflags __flags = __io.flags();
const ios_base::fmtflags __fmt = ~(ios_base::basefield
| ios_base::uppercase);
__io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase));
#pragma empty_line
typedef __gnu_cxx::__conditional_type<(sizeof(const void*)
<= sizeof(unsigned long)),
unsigned long, unsigned long long>::__type _UIntPtrType;
#pragma empty_line
__s = _M_insert_int(__s, __io, __fill,
reinterpret_cast<_UIntPtrType>(__v));
__io.flags(__flags);
return __s;
}
#pragma empty_line
#pragma empty_line
#pragma line 1191 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.tcc" 3
template<typename _CharT, typename _Traits>
void
__pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
_CharT* __news, const _CharT* __olds,
streamsize __newlen, streamsize __oldlen)
{
const size_t __plen = static_cast<size_t>(__newlen - __oldlen);
const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
#pragma empty_line
#pragma empty_line
if (__adjust == ios_base::left)
{
_Traits::copy(__news, __olds, __oldlen);
_Traits::assign(__news + __oldlen, __plen, __fill);
return;
}
#pragma empty_line
size_t __mod = 0;
if (__adjust == ios_base::internal)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
const locale& __loc = __io._M_getloc();
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
#pragma empty_line
if (__ctype.widen('-') == __olds[0]
|| __ctype.widen('+') == __olds[0])
{
__news[0] = __olds[0];
__mod = 1;
++__news;
}
else if (__ctype.widen('0') == __olds[0]
&& __oldlen > 1
&& (__ctype.widen('x') == __olds[1]
|| __ctype.widen('X') == __olds[1]))
{
__news[0] = __olds[0];
__news[1] = __olds[1];
__mod = 2;
__news += 2;
}
#pragma empty_line
}
_Traits::assign(__news, __plen, __fill);
_Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod);
}
#pragma empty_line
template<typename _CharT>
_CharT*
__add_grouping(_CharT* __s, _CharT __sep,
const char* __gbeg, size_t __gsize,
const _CharT* __first, const _CharT* __last)
{
size_t __idx = 0;
size_t __ctr = 0;
#pragma empty_line
while (__last - __first > __gbeg[__idx]
&& static_cast<signed char>(__gbeg[__idx]) > 0
&& __gbeg[__idx] != __gnu_cxx::__numeric_traits<char>::__max)
{
__last -= __gbeg[__idx];
__idx < __gsize - 1 ? ++__idx : ++__ctr;
}
#pragma empty_line
while (__first != __last)
*__s++ = *__first++;
#pragma empty_line
while (__ctr--)
{
*__s++ = __sep;
for (char __i = __gbeg[__idx]; __i > 0; --__i)
*__s++ = *__first++;
}
#pragma empty_line
while (__idx--)
{
*__s++ = __sep;
for (char __i = __gbeg[__idx]; __i > 0; --__i)
*__s++ = *__first++;
}
#pragma empty_line
return __s;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class numpunct<char>;
extern template class numpunct_byname<char>;
extern template class num_get<char>;
extern template class num_put<char>;
extern template class ctype_byname<char>;
#pragma empty_line
extern template
const ctype<char>&
use_facet<ctype<char> >(const locale&);
#pragma empty_line
extern template
const numpunct<char>&
use_facet<numpunct<char> >(const locale&);
#pragma empty_line
extern template
const num_put<char>&
use_facet<num_put<char> >(const locale&);
#pragma empty_line
extern template
const num_get<char>&
use_facet<num_get<char> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<ctype<char> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<numpunct<char> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<num_put<char> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<num_get<char> >(const locale&);
#pragma empty_line
#pragma empty_line
extern template class numpunct<wchar_t>;
extern template class numpunct_byname<wchar_t>;
extern template class num_get<wchar_t>;
extern template class num_put<wchar_t>;
extern template class ctype_byname<wchar_t>;
#pragma empty_line
extern template
const ctype<wchar_t>&
use_facet<ctype<wchar_t> >(const locale&);
#pragma empty_line
extern template
const numpunct<wchar_t>&
use_facet<numpunct<wchar_t> >(const locale&);
#pragma empty_line
extern template
const num_put<wchar_t>&
use_facet<num_put<wchar_t> >(const locale&);
#pragma empty_line
extern template
const num_get<wchar_t>&
use_facet<num_get<wchar_t> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<ctype<wchar_t> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<numpunct<wchar_t> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<num_put<wchar_t> >(const locale&);
#pragma empty_line
extern template
bool
has_facet<num_get<wchar_t> >(const locale&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 2609 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/locale_facets.h" 2 3
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 2 3
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _Facet>
inline const _Facet&
__check_facet(const _Facet* __f)
{
if (!__f)
__throw_bad_cast();
return *__f;
}
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
template<typename _CharT, typename _Traits>
class basic_ios : public ios_base
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef ctype<_CharT> __ctype_type;
typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
__num_put_type;
typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
__num_get_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
protected:
basic_ostream<_CharT, _Traits>* _M_tie;
mutable char_type _M_fill;
mutable bool _M_fill_init;
basic_streambuf<_CharT, _Traits>* _M_streambuf;
#pragma empty_line
#pragma empty_line
const __ctype_type* _M_ctype;
#pragma empty_line
const __num_put_type* _M_num_put;
#pragma empty_line
const __num_get_type* _M_num_get;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
operator void*() const
{ return this->fail() ? 0 : const_cast<basic_ios*>(this); }
#pragma empty_line
bool
operator!() const
{ return this->fail(); }
#pragma line 128 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
iostate
rdstate() const
{ return _M_streambuf_state; }
#pragma line 139 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
void
clear(iostate __state = goodbit);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
setstate(iostate __state)
{ this->clear(this->rdstate() | __state); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_setstate(iostate __state)
{
#pragma empty_line
#pragma empty_line
_M_streambuf_state |= __state;
if (this->exceptions() & __state)
throw;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
good() const
{ return this->rdstate() == 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
eof() const
{ return (this->rdstate() & eofbit) != 0; }
#pragma line 192 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
bool
fail() const
{ return (this->rdstate() & (badbit | failbit)) != 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
bad() const
{ return (this->rdstate() & badbit) != 0; }
#pragma line 213 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
iostate
exceptions() const
{ return _M_exception; }
#pragma line 248 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
void
exceptions(iostate __except)
{
_M_exception = __except;
this->clear(_M_streambuf_state);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
: ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
_M_ctype(0), _M_num_put(0), _M_num_get(0)
{ this->init(__sb); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual
~basic_ios() { }
#pragma line 286 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
basic_ostream<_CharT, _Traits>*
tie() const
{ return _M_tie; }
#pragma line 298 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
basic_ostream<_CharT, _Traits>*
tie(basic_ostream<_CharT, _Traits>* __tiestr)
{
basic_ostream<_CharT, _Traits>* __old = _M_tie;
_M_tie = __tiestr;
return __old;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_streambuf<_CharT, _Traits>*
rdbuf() const
{ return _M_streambuf; }
#pragma line 338 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
basic_streambuf<_CharT, _Traits>*
rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
#pragma line 352 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
basic_ios&
copyfmt(const basic_ios& __rhs);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
char_type
fill() const
{
if (!_M_fill_init)
{
_M_fill = this->widen(' ');
_M_fill_init = true;
}
return _M_fill;
}
#pragma line 381 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
char_type
fill(char_type __ch)
{
char_type __old = this->fill();
_M_fill = __ch;
return __old;
}
#pragma line 401 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
locale
imbue(const locale& __loc);
#pragma line 421 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
char
narrow(char_type __c, char __dfault) const
{ return __check_facet(_M_ctype).narrow(__c, __dfault); }
#pragma line 440 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 3
char_type
widen(char __c) const
{ return __check_facet(_M_ctype).widen(__c); }
#pragma empty_line
protected:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
basic_ios()
: ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
_M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
init(basic_streambuf<_CharT, _Traits>* __sb);
#pragma empty_line
void
_M_cache_locale(const locale& __loc);
};
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.tcc" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.tcc" 3
#pragma empty_line
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.tcc" 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
void
basic_ios<_CharT, _Traits>::clear(iostate __state)
{
if (this->rdbuf())
_M_streambuf_state = __state;
else
_M_streambuf_state = __state | badbit;
if (this->exceptions() & this->rdstate())
__throw_ios_failure(("basic_ios::clear"));
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_streambuf<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
{
basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
_M_streambuf = __sb;
this->clear();
return __old;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ios<_CharT, _Traits>&
basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
{
#pragma empty_line
#pragma empty_line
if (this != &__rhs)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
_M_local_word : new _Words[__rhs._M_word_size];
#pragma empty_line
#pragma empty_line
_Callback_list* __cb = __rhs._M_callbacks;
if (__cb)
__cb->_M_add_reference();
_M_call_callbacks(erase_event);
if (_M_word != _M_local_word)
{
delete [] _M_word;
_M_word = 0;
}
_M_dispose_callbacks();
#pragma empty_line
#pragma empty_line
_M_callbacks = __cb;
for (int __i = 0; __i < __rhs._M_word_size; ++__i)
__words[__i] = __rhs._M_word[__i];
_M_word = __words;
_M_word_size = __rhs._M_word_size;
#pragma empty_line
this->flags(__rhs.flags());
this->width(__rhs.width());
this->precision(__rhs.precision());
this->tie(__rhs.tie());
this->fill(__rhs.fill());
_M_ios_locale = __rhs.getloc();
_M_cache_locale(_M_ios_locale);
#pragma empty_line
_M_call_callbacks(copyfmt_event);
#pragma empty_line
#pragma empty_line
this->exceptions(__rhs.exceptions());
}
return *this;
}
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
locale
basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
{
locale __old(this->getloc());
ios_base::imbue(__loc);
_M_cache_locale(__loc);
if (this->rdbuf() != 0)
this->rdbuf()->pubimbue(__loc);
return __old;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
void
basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
{
#pragma empty_line
ios_base::_M_init();
#pragma empty_line
#pragma empty_line
_M_cache_locale(_M_ios_locale);
#pragma line 147 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.tcc" 3
_M_fill = _CharT();
_M_fill_init = false;
#pragma empty_line
_M_tie = 0;
_M_exception = goodbit;
_M_streambuf = __sb;
_M_streambuf_state = __sb ? goodbit : badbit;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
void
basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc)
{
if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
_M_ctype = &use_facet<__ctype_type>(__loc);
else
_M_ctype = 0;
#pragma empty_line
if (__builtin_expect(has_facet<__num_put_type>(__loc), true))
_M_num_put = &use_facet<__num_put_type>(__loc);
else
_M_num_put = 0;
#pragma empty_line
if (__builtin_expect(has_facet<__num_get_type>(__loc), true))
_M_num_get = &use_facet<__num_get_type>(__loc);
else
_M_num_get = 0;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class basic_ios<char>;
#pragma empty_line
#pragma empty_line
extern template class basic_ios<wchar_t>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 474 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/basic_ios.h" 2 3
#pragma line 46 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ios" 2 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 2 3
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 56 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
template<typename _CharT, typename _Traits>
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_ios<_CharT, _Traits> __ios_type;
typedef basic_ostream<_CharT, _Traits> __ostream_type;
typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
__num_put_type;
typedef ctype<_CharT> __ctype_type;
#pragma line 83 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
explicit
basic_ostream(__streambuf_type* __sb)
{ this->init(__sb); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual
~basic_ostream() { }
#pragma empty_line
#pragma empty_line
class sentry;
friend class sentry;
#pragma line 109 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
operator<<(__ostream_type& (*__pf)(__ostream_type&))
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return __pf(*this);
}
#pragma empty_line
__ostream_type&
operator<<(__ios_type& (*__pf)(__ios_type&))
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
__pf(*this);
return *this;
}
#pragma empty_line
__ostream_type&
operator<<(ios_base& (*__pf) (ios_base&))
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
__pf(*this);
return *this;
}
#pragma line 166 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
operator<<(long __n)
{ return _M_insert(__n); }
#pragma empty_line
__ostream_type&
operator<<(unsigned long __n)
{ return _M_insert(__n); }
#pragma empty_line
__ostream_type&
operator<<(bool __n)
{ return _M_insert(__n); }
#pragma empty_line
__ostream_type&
operator<<(short __n);
#pragma empty_line
__ostream_type&
operator<<(unsigned short __n)
{
#pragma empty_line
#pragma empty_line
return _M_insert(static_cast<unsigned long>(__n));
}
#pragma empty_line
__ostream_type&
operator<<(int __n);
#pragma empty_line
__ostream_type&
operator<<(unsigned int __n)
{
#pragma empty_line
#pragma empty_line
return _M_insert(static_cast<unsigned long>(__n));
}
#pragma empty_line
#pragma empty_line
__ostream_type&
operator<<(long long __n)
{ return _M_insert(__n); }
#pragma empty_line
__ostream_type&
operator<<(unsigned long long __n)
{ return _M_insert(__n); }
#pragma empty_line
#pragma empty_line
__ostream_type&
operator<<(double __f)
{ return _M_insert(__f); }
#pragma empty_line
__ostream_type&
operator<<(float __f)
{
#pragma empty_line
#pragma empty_line
return _M_insert(static_cast<double>(__f));
}
#pragma empty_line
__ostream_type&
operator<<(long double __f)
{ return _M_insert(__f); }
#pragma empty_line
__ostream_type&
operator<<(const void* __p)
{ return _M_insert(__p); }
#pragma line 251 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
operator<<(__streambuf_type* __sb);
#pragma line 284 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
put(char_type __c);
#pragma empty_line
#pragma empty_line
void
_M_write(const char_type* __s, streamsize __n)
{
const streamsize __put = this->rdbuf()->sputn(__s, __n);
if (__put != __n)
this->setstate(ios_base::badbit);
}
#pragma line 312 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
write(const char_type* __s, streamsize __n);
#pragma line 325 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
flush();
#pragma line 336 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
pos_type
tellp();
#pragma line 347 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
seekp(pos_type);
#pragma line 359 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
__ostream_type&
seekp(off_type, ios_base::seekdir);
#pragma empty_line
protected:
basic_ostream()
{ this->init(0); }
#pragma empty_line
template<typename _ValueT>
__ostream_type&
_M_insert(_ValueT __v);
};
#pragma line 378 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
template <typename _CharT, typename _Traits>
class basic_ostream<_CharT, _Traits>::sentry
{
#pragma empty_line
bool _M_ok;
basic_ostream<_CharT, _Traits>& _M_os;
#pragma empty_line
public:
#pragma line 397 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
explicit
sentry(basic_ostream<_CharT, _Traits>& __os);
#pragma line 407 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
~sentry()
{
#pragma empty_line
if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())
{
#pragma empty_line
if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
_M_os.setstate(ios_base::badbit);
}
}
#pragma line 428 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
operator bool() const
{ return _M_ok; }
};
#pragma line 449 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
{ return __ostream_insert(__out, &__c, 1); }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
{ return (__out << __out.widen(__c)); }
#pragma empty_line
#pragma empty_line
template <class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, char __c)
{ return __ostream_insert(__out, &__c, 1); }
#pragma empty_line
#pragma empty_line
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
{ return (__out << static_cast<char>(__c)); }
#pragma empty_line
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
{ return (__out << static_cast<char>(__c)); }
#pragma line 491 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
{
if (!__s)
__out.setstate(ios_base::badbit);
else
__ostream_insert(__out, __s,
static_cast<streamsize>(_Traits::length(__s)));
return __out;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits> &
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
#pragma empty_line
#pragma empty_line
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
{
if (!__s)
__out.setstate(ios_base::badbit);
else
__ostream_insert(__out, __s,
static_cast<streamsize>(_Traits::length(__s)));
return __out;
}
#pragma empty_line
#pragma empty_line
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
{ return (__out << reinterpret_cast<const char*>(__s)); }
#pragma empty_line
template<class _Traits>
inline basic_ostream<char, _Traits> &
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
{ return (__out << reinterpret_cast<const char*>(__s)); }
#pragma line 541 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
endl(basic_ostream<_CharT, _Traits>& __os)
{ return flush(__os.put(__os.widen('\n'))); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
ends(basic_ostream<_CharT, _Traits>& __os)
{ return __os.put(_CharT()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
flush(basic_ostream<_CharT, _Traits>& __os)
{ return __os.flush(); }
#pragma line 585 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 3
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream.tcc" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream.tcc" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/ostream.tcc" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>::sentry::
sentry(basic_ostream<_CharT, _Traits>& __os)
: _M_ok(false), _M_os(__os)
{
#pragma empty_line
if (__os.tie() && __os.good())
__os.tie()->flush();
#pragma empty_line
if (__os.good())
_M_ok = true;
else
__os.setstate(ios_base::failbit);
}
#pragma empty_line
template<typename _CharT, typename _Traits>
template<typename _ValueT>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
_M_insert(_ValueT __v)
{
sentry __cerb(*this);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const __num_put_type& __np = __check_facet(this->_M_num_put);
if (__np.put(*this, *this, this->fill(), __v).failed())
__err |= ios_base::badbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
operator<<(short __n)
{
#pragma empty_line
#pragma empty_line
const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
if (__fmt == ios_base::oct || __fmt == ios_base::hex)
return _M_insert(static_cast<long>(static_cast<unsigned short>(__n)));
else
return _M_insert(static_cast<long>(__n));
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
operator<<(int __n)
{
#pragma empty_line
#pragma empty_line
const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
if (__fmt == ios_base::oct || __fmt == ios_base::hex)
return _M_insert(static_cast<long>(static_cast<unsigned int>(__n)));
else
return _M_insert(static_cast<long>(__n));
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
operator<<(__streambuf_type* __sbin)
{
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this);
if (__cerb && __sbin)
{
try
{
if (!__copy_streambufs(__sbin, this->rdbuf()))
__err |= ios_base::failbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::failbit); }
}
else if (!__sbin)
__err |= ios_base::badbit;
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
put(char_type __c)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
sentry __cerb(*this);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const int_type __put = this->rdbuf()->sputc(__c);
if (traits_type::eq_int_type(__put, traits_type::eof()))
__err |= ios_base::badbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
write(const _CharT* __s, streamsize __n)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
sentry __cerb(*this);
if (__cerb)
{
try
{ _M_write(__s, __n); }
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
flush()
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
ios_base::iostate __err = ios_base::goodbit;
try
{
if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
__err |= ios_base::badbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
typename basic_ostream<_CharT, _Traits>::pos_type
basic_ostream<_CharT, _Traits>::
tellp()
{
pos_type __ret = pos_type(-1);
try
{
if (!this->fail())
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
return __ret;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
seekp(pos_type __pos)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
if (!this->fail())
{
#pragma empty_line
#pragma empty_line
const pos_type __p = this->rdbuf()->pubseekpos(__pos,
ios_base::out);
#pragma empty_line
#pragma empty_line
if (__p == pos_type(off_type(-1)))
__err |= ios_base::failbit;
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::
seekp(off_type __off, ios_base::seekdir __dir)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
if (!this->fail())
{
#pragma empty_line
#pragma empty_line
const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
ios_base::out);
#pragma empty_line
#pragma empty_line
if (__p == pos_type(off_type(-1)))
__err |= ios_base::failbit;
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
{
if (!__s)
__out.setstate(ios_base::badbit);
else
{
#pragma empty_line
#pragma empty_line
const size_t __clen = char_traits<char>::length(__s);
try
{
struct __ptr_guard
{
_CharT *__p;
__ptr_guard (_CharT *__ip): __p(__ip) { }
~__ptr_guard() { delete[] __p; }
_CharT* __get() { return __p; }
} __pg (new _CharT[__clen]);
#pragma empty_line
_CharT *__ws = __pg.__get();
for (size_t __i = 0; __i < __clen; ++__i)
__ws[__i] = __out.widen(__s[__i]);
__ostream_insert(__out, __ws, __clen);
}
catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ __out._M_setstate(ios_base::badbit); }
}
return __out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class basic_ostream<char>;
extern template ostream& endl(ostream&);
extern template ostream& ends(ostream&);
extern template ostream& flush(ostream&);
extern template ostream& operator<<(ostream&, char);
extern template ostream& operator<<(ostream&, unsigned char);
extern template ostream& operator<<(ostream&, signed char);
extern template ostream& operator<<(ostream&, const char*);
extern template ostream& operator<<(ostream&, const unsigned char*);
extern template ostream& operator<<(ostream&, const signed char*);
#pragma empty_line
extern template ostream& ostream::_M_insert(long);
extern template ostream& ostream::_M_insert(unsigned long);
extern template ostream& ostream::_M_insert(bool);
#pragma empty_line
extern template ostream& ostream::_M_insert(long long);
extern template ostream& ostream::_M_insert(unsigned long long);
#pragma empty_line
extern template ostream& ostream::_M_insert(double);
extern template ostream& ostream::_M_insert(long double);
extern template ostream& ostream::_M_insert(const void*);
#pragma empty_line
#pragma empty_line
extern template class basic_ostream<wchar_t>;
extern template wostream& endl(wostream&);
extern template wostream& ends(wostream&);
extern template wostream& flush(wostream&);
extern template wostream& operator<<(wostream&, wchar_t);
extern template wostream& operator<<(wostream&, char);
extern template wostream& operator<<(wostream&, const wchar_t*);
extern template wostream& operator<<(wostream&, const char*);
#pragma empty_line
extern template wostream& wostream::_M_insert(long);
extern template wostream& wostream::_M_insert(unsigned long);
extern template wostream& wostream::_M_insert(bool);
#pragma empty_line
extern template wostream& wostream::_M_insert(long long);
extern template wostream& wostream::_M_insert(unsigned long long);
#pragma empty_line
extern template wostream& wostream::_M_insert(double);
extern template wostream& wostream::_M_insert(long double);
extern template wostream& wostream::_M_insert(const void*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 589 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/ostream" 2 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 1 3
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
#pragma empty_line
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 56 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
template<typename _CharT, typename _Traits>
class basic_istream : virtual public basic_ios<_CharT, _Traits>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_ios<_CharT, _Traits> __ios_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
__num_get_type;
typedef ctype<_CharT> __ctype_type;
#pragma empty_line
protected:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
streamsize _M_gcount;
#pragma empty_line
public:
#pragma line 92 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
explicit
basic_istream(__streambuf_type* __sb)
: _M_gcount(streamsize(0))
{ this->init(__sb); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual
~basic_istream()
{ _M_gcount = streamsize(0); }
#pragma empty_line
#pragma empty_line
class sentry;
friend class sentry;
#pragma line 121 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
operator>>(__istream_type& (*__pf)(__istream_type&))
{ return __pf(*this); }
#pragma empty_line
__istream_type&
operator>>(__ios_type& (*__pf)(__ios_type&))
{
__pf(*this);
return *this;
}
#pragma empty_line
__istream_type&
operator>>(ios_base& (*__pf)(ios_base&))
{
__pf(*this);
return *this;
}
#pragma line 168 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
operator>>(bool& __n)
{ return _M_extract(__n); }
#pragma empty_line
__istream_type&
operator>>(short& __n);
#pragma empty_line
__istream_type&
operator>>(unsigned short& __n)
{ return _M_extract(__n); }
#pragma empty_line
__istream_type&
operator>>(int& __n);
#pragma empty_line
__istream_type&
operator>>(unsigned int& __n)
{ return _M_extract(__n); }
#pragma empty_line
__istream_type&
operator>>(long& __n)
{ return _M_extract(__n); }
#pragma empty_line
__istream_type&
operator>>(unsigned long& __n)
{ return _M_extract(__n); }
#pragma empty_line
#pragma empty_line
__istream_type&
operator>>(long long& __n)
{ return _M_extract(__n); }
#pragma empty_line
__istream_type&
operator>>(unsigned long long& __n)
{ return _M_extract(__n); }
#pragma empty_line
#pragma empty_line
__istream_type&
operator>>(float& __f)
{ return _M_extract(__f); }
#pragma empty_line
__istream_type&
operator>>(double& __f)
{ return _M_extract(__f); }
#pragma empty_line
__istream_type&
operator>>(long double& __f)
{ return _M_extract(__f); }
#pragma empty_line
__istream_type&
operator>>(void*& __p)
{ return _M_extract(__p); }
#pragma line 240 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
operator>>(__streambuf_type* __sb);
#pragma line 250 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
streamsize
gcount() const
{ return _M_gcount; }
#pragma line 282 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
int_type
get();
#pragma line 296 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
get(char_type& __c);
#pragma line 323 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
get(char_type* __s, streamsize __n, char_type __delim);
#pragma line 334 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
get(char_type* __s, streamsize __n)
{ return this->get(__s, __n, this->widen('\n')); }
#pragma line 357 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
get(__streambuf_type& __sb, char_type __delim);
#pragma line 367 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
get(__streambuf_type& __sb)
{ return this->get(__sb, this->widen('\n')); }
#pragma line 396 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
getline(char_type* __s, streamsize __n, char_type __delim);
#pragma line 407 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
getline(char_type* __s, streamsize __n)
{ return this->getline(__s, __n, this->widen('\n')); }
#pragma line 431 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
ignore();
#pragma empty_line
__istream_type&
ignore(streamsize __n);
#pragma empty_line
__istream_type&
ignore(streamsize __n, int_type __delim);
#pragma line 448 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
int_type
peek();
#pragma line 466 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
read(char_type* __s, streamsize __n);
#pragma line 485 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
streamsize
readsome(char_type* __s, streamsize __n);
#pragma line 502 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
putback(char_type __c);
#pragma line 518 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
unget();
#pragma line 536 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
int
sync();
#pragma line 551 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
pos_type
tellg();
#pragma line 566 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
seekg(pos_type);
#pragma line 582 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
__istream_type&
seekg(off_type, ios_base::seekdir);
#pragma empty_line
#pragma empty_line
protected:
basic_istream()
: _M_gcount(streamsize(0))
{ this->init(0); }
#pragma empty_line
template<typename _ValueT>
__istream_type&
_M_extract(_ValueT& __v);
};
#pragma empty_line
#pragma empty_line
template<>
basic_istream<char>&
basic_istream<char>::
getline(char_type* __s, streamsize __n, char_type __delim);
#pragma empty_line
template<>
basic_istream<char>&
basic_istream<char>::
ignore(streamsize __n);
#pragma empty_line
template<>
basic_istream<char>&
basic_istream<char>::
ignore(streamsize __n, int_type __delim);
#pragma empty_line
#pragma empty_line
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
getline(char_type* __s, streamsize __n, char_type __delim);
#pragma empty_line
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
ignore(streamsize __n);
#pragma empty_line
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
ignore(streamsize __n, int_type __delim);
#pragma line 637 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
template<typename _CharT, typename _Traits>
class basic_istream<_CharT, _Traits>::sentry
{
#pragma empty_line
bool _M_ok;
#pragma empty_line
public:
#pragma empty_line
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::__ctype_type __ctype_type;
typedef typename _Traits::int_type __int_type;
#pragma line 673 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
explicit
sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
#pragma line 686 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
operator bool() const
{ return _M_ok; }
};
#pragma line 703 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
#pragma empty_line
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
{ return (__in >> reinterpret_cast<char&>(__c)); }
#pragma empty_line
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
{ return (__in >> reinterpret_cast<char&>(__c)); }
#pragma line 745 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
#pragma empty_line
#pragma empty_line
template<>
basic_istream<char>&
operator>>(basic_istream<char>& __in, char* __s);
#pragma empty_line
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
{ return (__in >> reinterpret_cast<char*>(__s)); }
#pragma empty_line
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
{ return (__in >> reinterpret_cast<char*>(__s)); }
#pragma line 773 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
template<typename _CharT, typename _Traits>
class basic_iostream
: public basic_istream<_CharT, _Traits>,
public basic_ostream<_CharT, _Traits>
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_ostream<_CharT, _Traits> __ostream_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
: __istream_type(__sb), __ostream_type(__sb) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual
~basic_iostream() { }
#pragma empty_line
protected:
basic_iostream()
: __istream_type(), __ostream_type() { }
};
#pragma line 834 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is);
#pragma line 856 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 3
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/istream.tcc" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/istream.tcc" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/istream.tcc" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>::sentry::
sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
{
ios_base::iostate __err = ios_base::goodbit;
if (__in.good())
{
if (__in.tie())
__in.tie()->flush();
if (!__noskip && bool(__in.flags() & ios_base::skipws))
{
const __int_type __eof = traits_type::eof();
__streambuf_type* __sb = __in.rdbuf();
__int_type __c = __sb->sgetc();
#pragma empty_line
const __ctype_type& __ct = __check_facet(__in._M_ctype);
while (!traits_type::eq_int_type(__c, __eof)
&& __ct.is(ctype_base::space,
traits_type::to_char_type(__c)))
__c = __sb->snextc();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
}
#pragma empty_line
if (__in.good() && __err == ios_base::goodbit)
_M_ok = true;
else
{
__err |= ios_base::failbit;
__in.setstate(__err);
}
}
#pragma empty_line
template<typename _CharT, typename _Traits>
template<typename _ValueT>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
_M_extract(_ValueT& __v)
{
sentry __cerb(*this, false);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __v);
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(short& __n)
{
#pragma empty_line
#pragma empty_line
sentry __cerb(*this, false);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
long __l;
const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __l);
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__l < __gnu_cxx::__numeric_traits<short>::__min)
{
__err |= ios_base::failbit;
__n = __gnu_cxx::__numeric_traits<short>::__min;
}
else if (__l > __gnu_cxx::__numeric_traits<short>::__max)
{
__err |= ios_base::failbit;
__n = __gnu_cxx::__numeric_traits<short>::__max;
}
else
__n = short(__l);
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(int& __n)
{
#pragma empty_line
#pragma empty_line
sentry __cerb(*this, false);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
long __l;
const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __l);
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__l < __gnu_cxx::__numeric_traits<int>::__min)
{
__err |= ios_base::failbit;
__n = __gnu_cxx::__numeric_traits<int>::__min;
}
else if (__l > __gnu_cxx::__numeric_traits<int>::__max)
{
__err |= ios_base::failbit;
__n = __gnu_cxx::__numeric_traits<int>::__max;
}
else
__n = int(__l);
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
operator>>(__streambuf_type* __sbout)
{
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, false);
if (__cerb && __sbout)
{
try
{
bool __ineof;
if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
__err |= ios_base::failbit;
if (__ineof)
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::failbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::failbit); }
}
else if (!__sbout)
__err |= ios_base::failbit;
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>::
get(void)
{
const int_type __eof = traits_type::eof();
int_type __c = __eof;
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
if (__cerb)
{
try
{
__c = this->rdbuf()->sbumpc();
#pragma empty_line
if (!traits_type::eq_int_type(__c, __eof))
_M_gcount = 1;
else
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
__err |= ios_base::failbit;
if (__err)
this->setstate(__err);
return __c;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
get(char_type& __c)
{
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
if (__cerb)
{
try
{
const int_type __cb = this->rdbuf()->sbumpc();
#pragma empty_line
if (!traits_type::eq_int_type(__cb, traits_type::eof()))
{
_M_gcount = 1;
__c = traits_type::to_char_type(__cb);
}
else
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
__err |= ios_base::failbit;
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
get(char_type* __s, streamsize __n, char_type __delim)
{
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
if (__cerb)
{
try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
#pragma empty_line
while (_M_gcount + 1 < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim))
{
*__s++ = traits_type::to_char_type(__c);
++_M_gcount;
__c = __sb->snextc();
}
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
#pragma empty_line
#pragma empty_line
if (__n > 0)
*__s = char_type();
if (!_M_gcount)
__err |= ios_base::failbit;
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
get(__streambuf_type& __sb, char_type __delim)
{
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
if (__cerb)
{
try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
__streambuf_type* __this_sb = this->rdbuf();
int_type __c = __this_sb->sgetc();
char_type __c2 = traits_type::to_char_type(__c);
#pragma empty_line
while (!traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim)
&& !traits_type::eq_int_type(__sb.sputc(__c2), __eof))
{
++_M_gcount;
__c = __this_sb->snextc();
__c2 = traits_type::to_char_type(__c);
}
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
__err |= ios_base::failbit;
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
getline(char_type* __s, streamsize __n, char_type __delim)
{
_M_gcount = 0;
ios_base::iostate __err = ios_base::goodbit;
sentry __cerb(*this, true);
if (__cerb)
{
try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
#pragma empty_line
while (_M_gcount + 1 < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __idelim))
{
*__s++ = traits_type::to_char_type(__c);
__c = __sb->snextc();
++_M_gcount;
}
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
else
{
if (traits_type::eq_int_type(__c, __idelim))
{
__sb->sbumpc();
++_M_gcount;
}
else
__err |= ios_base::failbit;
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
#pragma empty_line
#pragma empty_line
if (__n > 0)
*__s = char_type();
if (!_M_gcount)
__err |= ios_base::failbit;
if (__err)
this->setstate(__err);
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
ignore(void)
{
_M_gcount = 0;
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
#pragma empty_line
if (traits_type::eq_int_type(__sb->sbumpc(), __eof))
__err |= ios_base::eofbit;
else
_M_gcount = 1;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
ignore(streamsize __n)
{
_M_gcount = 0;
sentry __cerb(*this, true);
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
#pragma line 515 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/istream.tcc" 3
bool __large_ignore = false;
while (true)
{
while (_M_gcount < __n
&& !traits_type::eq_int_type(__c, __eof))
{
++_M_gcount;
__c = __sb->snextc();
}
if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
&& !traits_type::eq_int_type(__c, __eof))
{
_M_gcount =
__gnu_cxx::__numeric_traits<streamsize>::__min;
__large_ignore = true;
}
else
break;
}
#pragma empty_line
if (__large_ignore)
_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
#pragma empty_line
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
ignore(streamsize __n, int_type __delim)
{
_M_gcount = 0;
sentry __cerb(*this, true);
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
int_type __c = __sb->sgetc();
#pragma empty_line
#pragma empty_line
bool __large_ignore = false;
while (true)
{
while (_M_gcount < __n
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __delim))
{
++_M_gcount;
__c = __sb->snextc();
}
if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
&& !traits_type::eq_int_type(__c, __eof)
&& !traits_type::eq_int_type(__c, __delim))
{
_M_gcount =
__gnu_cxx::__numeric_traits<streamsize>::__min;
__large_ignore = true;
}
else
break;
}
#pragma empty_line
if (__large_ignore)
_M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
#pragma empty_line
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
else if (traits_type::eq_int_type(__c, __delim))
{
if (_M_gcount
< __gnu_cxx::__numeric_traits<streamsize>::__max)
++_M_gcount;
__sb->sbumpc();
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>::
peek(void)
{
int_type __c = traits_type::eof();
_M_gcount = 0;
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
__c = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__c, traits_type::eof()))
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return __c;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
read(char_type* __s, streamsize __n)
{
_M_gcount = 0;
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
_M_gcount = this->rdbuf()->sgetn(__s, __n);
if (_M_gcount != __n)
__err |= (ios_base::eofbit | ios_base::failbit);
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
streamsize
basic_istream<_CharT, _Traits>::
readsome(char_type* __s, streamsize __n)
{
_M_gcount = 0;
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
#pragma empty_line
const streamsize __num = this->rdbuf()->in_avail();
if (__num > 0)
_M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
else if (__num == -1)
__err |= ios_base::eofbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return _M_gcount;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
putback(char_type __c)
{
#pragma empty_line
#pragma empty_line
_M_gcount = 0;
#pragma empty_line
this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
if (!__sb
|| traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
__err |= ios_base::badbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
unget(void)
{
#pragma empty_line
#pragma empty_line
_M_gcount = 0;
#pragma empty_line
this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
if (!__sb
|| traits_type::eq_int_type(__sb->sungetc(), __eof))
__err |= ios_base::badbit;
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
int
basic_istream<_CharT, _Traits>::
sync(void)
{
#pragma empty_line
#pragma empty_line
int __ret = -1;
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
__streambuf_type* __sb = this->rdbuf();
if (__sb)
{
if (__sb->pubsync() == -1)
__err |= ios_base::badbit;
else
__ret = 0;
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return __ret;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
typename basic_istream<_CharT, _Traits>::pos_type
basic_istream<_CharT, _Traits>::
tellg(void)
{
#pragma empty_line
#pragma empty_line
pos_type __ret = pos_type(-1);
sentry __cerb(*this, true);
if (__cerb)
{
try
{
if (!this->fail())
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
ios_base::in);
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
return __ret;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
seekg(pos_type __pos)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
if (!this->fail())
{
#pragma empty_line
const pos_type __p = this->rdbuf()->pubseekpos(__pos,
ios_base::in);
#pragma empty_line
#pragma empty_line
if (__p == pos_type(off_type(-1)))
__err |= ios_base::failbit;
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::
seekg(off_type __off, ios_base::seekdir __dir)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __cerb(*this, true);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
if (!this->fail())
{
#pragma empty_line
const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
ios_base::in);
#pragma empty_line
#pragma empty_line
if (__p == pos_type(off_type(-1)))
__err |= ios_base::failbit;
}
}
catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
}
return *this;
}
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::int_type __int_type;
#pragma empty_line
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
ios_base::iostate __err = ios_base::goodbit;
try
{
const __int_type __cb = __in.rdbuf()->sbumpc();
if (!_Traits::eq_int_type(__cb, _Traits::eof()))
__c = _Traits::to_char_type(__cb);
else
__err |= (ios_base::eofbit | ios_base::failbit);
}
catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ __in._M_setstate(ios_base::badbit); }
if (__err)
__in.setstate(__err);
}
return __in;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef typename _Traits::int_type int_type;
typedef _CharT char_type;
typedef ctype<_CharT> __ctype_type;
#pragma empty_line
streamsize __extracted = 0;
ios_base::iostate __err = ios_base::goodbit;
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
try
{
#pragma empty_line
streamsize __num = __in.width();
if (__num <= 0)
__num = __gnu_cxx::__numeric_traits<streamsize>::__max;
#pragma empty_line
const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
#pragma empty_line
const int_type __eof = _Traits::eof();
__streambuf_type* __sb = __in.rdbuf();
int_type __c = __sb->sgetc();
#pragma empty_line
while (__extracted < __num - 1
&& !_Traits::eq_int_type(__c, __eof)
&& !__ct.is(ctype_base::space,
_Traits::to_char_type(__c)))
{
*__s++ = _Traits::to_char_type(__c);
++__extracted;
__c = __sb->snextc();
}
if (_Traits::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
#pragma empty_line
#pragma empty_line
#pragma empty_line
*__s = char_type();
__in.width(0);
}
catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
throw;
}
catch(...)
{ __in._M_setstate(ios_base::badbit); }
}
if (!__extracted)
__err |= ios_base::failbit;
if (__err)
__in.setstate(__err);
return __in;
}
#pragma empty_line
#pragma empty_line
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __in)
{
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef typename __istream_type::int_type __int_type;
typedef ctype<_CharT> __ctype_type;
#pragma empty_line
const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
const __int_type __eof = _Traits::eof();
__streambuf_type* __sb = __in.rdbuf();
__int_type __c = __sb->sgetc();
#pragma empty_line
while (!_Traits::eq_int_type(__c, __eof)
&& __ct.is(ctype_base::space, _Traits::to_char_type(__c)))
__c = __sb->snextc();
#pragma empty_line
if (_Traits::eq_int_type(__c, __eof))
__in.setstate(ios_base::eofbit);
return __in;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class basic_istream<char>;
extern template istream& ws(istream&);
extern template istream& operator>>(istream&, char&);
extern template istream& operator>>(istream&, char*);
extern template istream& operator>>(istream&, unsigned char&);
extern template istream& operator>>(istream&, signed char&);
extern template istream& operator>>(istream&, unsigned char*);
extern template istream& operator>>(istream&, signed char*);
#pragma empty_line
extern template istream& istream::_M_extract(unsigned short&);
extern template istream& istream::_M_extract(unsigned int&);
extern template istream& istream::_M_extract(long&);
extern template istream& istream::_M_extract(unsigned long&);
extern template istream& istream::_M_extract(bool&);
#pragma empty_line
extern template istream& istream::_M_extract(long long&);
extern template istream& istream::_M_extract(unsigned long long&);
#pragma empty_line
extern template istream& istream::_M_extract(float&);
extern template istream& istream::_M_extract(double&);
extern template istream& istream::_M_extract(long double&);
extern template istream& istream::_M_extract(void*&);
#pragma empty_line
extern template class basic_iostream<char>;
#pragma empty_line
#pragma empty_line
extern template class basic_istream<wchar_t>;
extern template wistream& ws(wistream&);
extern template wistream& operator>>(wistream&, wchar_t&);
extern template wistream& operator>>(wistream&, wchar_t*);
#pragma empty_line
extern template wistream& wistream::_M_extract(unsigned short&);
extern template wistream& wistream::_M_extract(unsigned int&);
extern template wistream& wistream::_M_extract(long&);
extern template wistream& wistream::_M_extract(unsigned long&);
extern template wistream& wistream::_M_extract(bool&);
#pragma empty_line
extern template wistream& wistream::_M_extract(long long&);
extern template wistream& wistream::_M_extract(unsigned long long&);
#pragma empty_line
extern template wistream& wistream::_M_extract(float&);
extern template wistream& wistream::_M_extract(double&);
extern template wistream& wistream::_M_extract(long double&);
extern template wistream& wistream::_M_extract(void*&);
#pragma empty_line
extern template class basic_iostream<wchar_t>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 860 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/istream" 2 3
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iostream" 3
extern istream cin;
extern ostream cout;
extern ostream cerr;
extern ostream clog;
#pragma empty_line
#pragma empty_line
extern wistream wcin;
extern wostream wcout;
extern wostream wcerr;
extern wostream wclog;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static ios_base::Init __ioinit;
#pragma empty_line
#pragma empty_line
}
#pragma line 77 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h" 2
#pragma line 97 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 1
#pragma line 103 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
namespace AESL_std {
template <class DataType>
DataType inline min(DataType a, DataType b) {
#pragma empty_line
#pragma empty_line
return (a>=b) ? b : a;
}
#pragma empty_line
template <class DataType>
DataType inline max(DataType a, DataType b) {
#pragma empty_line
#pragma empty_line
return (a>=b) ? a : b;
}
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cassert" 1 3
#pragma line 43 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cassert" 3
#pragma empty_line
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cassert" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 1 3
#pragma line 23 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
extern "C" {
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _assert (const char*, const char*, int) __attribute__ ((__noreturn__));
#pragma line 48 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
}
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cassert" 2 3
#pragma line 120 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 1 3
#pragma line 16 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
#pragma empty_line
#pragma line 17 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
#pragma line 90 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern "C" {
#pragma line 134 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
struct _exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
#pragma empty_line
double __attribute__((__cdecl__)) sin (double);
double __attribute__((__cdecl__)) cos (double);
double __attribute__((__cdecl__)) tan (double);
double __attribute__((__cdecl__)) sinh (double);
double __attribute__((__cdecl__)) cosh (double);
double __attribute__((__cdecl__)) tanh (double);
double __attribute__((__cdecl__)) asin (double);
double __attribute__((__cdecl__)) acos (double);
double __attribute__((__cdecl__)) atan (double);
double __attribute__((__cdecl__)) atan2 (double, double);
double __attribute__((__cdecl__)) exp (double);
double __attribute__((__cdecl__)) log (double);
double __attribute__((__cdecl__)) log10 (double);
double __attribute__((__cdecl__)) pow (double, double);
double __attribute__((__cdecl__)) sqrt (double);
double __attribute__((__cdecl__)) ceil (double);
double __attribute__((__cdecl__)) floor (double);
double __attribute__((__cdecl__)) fabs (double);
double __attribute__((__cdecl__)) ldexp (double, int);
double __attribute__((__cdecl__)) frexp (double, int*);
double __attribute__((__cdecl__)) modf (double, double*);
double __attribute__((__cdecl__)) fmod (double, double);
#pragma line 210 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
struct _complex
{
double x;
double y;
};
#pragma empty_line
double __attribute__((__cdecl__)) _cabs (struct _complex);
#pragma empty_line
double __attribute__((__cdecl__)) _hypot (double, double);
double __attribute__((__cdecl__)) _j0 (double);
double __attribute__((__cdecl__)) _j1 (double);
double __attribute__((__cdecl__)) _jn (int, double);
double __attribute__((__cdecl__)) _y0 (double);
double __attribute__((__cdecl__)) _y1 (double);
double __attribute__((__cdecl__)) _yn (int, double);
int __attribute__((__cdecl__)) _matherr (struct _exception *);
#pragma line 234 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
double __attribute__((__cdecl__)) _chgsign (double);
double __attribute__((__cdecl__)) _copysign (double, double);
double __attribute__((__cdecl__)) _logb (double);
double __attribute__((__cdecl__)) _nextafter (double, double);
double __attribute__((__cdecl__)) _scalb (double, long);
#pragma empty_line
int __attribute__((__cdecl__)) _finite (double);
int __attribute__((__cdecl__)) _fpclass (double);
int __attribute__((__cdecl__)) _isnan (double);
#pragma line 254 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
double __attribute__((__cdecl__)) j0 (double);
double __attribute__((__cdecl__)) j1 (double);
double __attribute__((__cdecl__)) jn (int, double);
double __attribute__((__cdecl__)) y0 (double);
double __attribute__((__cdecl__)) y1 (double);
double __attribute__((__cdecl__)) yn (int, double);
#pragma empty_line
double __attribute__((__cdecl__)) chgsign (double);
#pragma line 270 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
int __attribute__((__cdecl__)) finite (double);
int __attribute__((__cdecl__)) fpclass (double);
#pragma line 324 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
typedef long double float_t;
typedef long double double_t;
#pragma line 354 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern int __attribute__((__cdecl__)) __fpclassifyf (float);
extern int __attribute__((__cdecl__)) __fpclassify (double);
extern int __attribute__((__cdecl__)) __fpclassifyl (long double);
#pragma line 379 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern int __attribute__((__cdecl__)) __isnan (double);
extern int __attribute__((__cdecl__)) __isnanf (float);
extern int __attribute__((__cdecl__)) __isnanl (long double);
#pragma line 419 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern int __attribute__((__cdecl__)) __signbit (double);
extern int __attribute__((__cdecl__)) __signbitf (float);
extern int __attribute__((__cdecl__)) __signbitl (long double);
#pragma line 447 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern float __attribute__((__cdecl__)) sinf (float);
extern long double __attribute__((__cdecl__)) sinl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) cosf (float);
extern long double __attribute__((__cdecl__)) cosl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) tanf (float);
extern long double __attribute__((__cdecl__)) tanl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) asinf (float);
extern long double __attribute__((__cdecl__)) asinl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) acosf (float);
extern long double __attribute__((__cdecl__)) acosl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) atanf (float);
extern long double __attribute__((__cdecl__)) atanl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) atan2f (float, float);
extern long double __attribute__((__cdecl__)) atan2l (long double, long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) sinhf (float);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) sinhl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) coshf (float);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) coshl (long double);
#pragma empty_line
extern float __attribute__((__cdecl__)) tanhf (float);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) tanhl (long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) acosh (double);
extern float __attribute__((__cdecl__)) acoshf (float);
extern long double __attribute__((__cdecl__)) acoshl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) asinh (double);
extern float __attribute__((__cdecl__)) asinhf (float);
extern long double __attribute__((__cdecl__)) asinhl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) atanh (double);
extern float __attribute__((__cdecl__)) atanhf (float);
extern long double __attribute__((__cdecl__)) atanhl (long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) expf (float);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) expl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) exp2(double);
extern float __attribute__((__cdecl__)) exp2f(float);
extern long double __attribute__((__cdecl__)) exp2l(long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) expm1(double);
extern float __attribute__((__cdecl__)) expm1f(float);
extern long double __attribute__((__cdecl__)) expm1l(long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) frexpf (float, int*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) frexpl (long double, int*);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern int __attribute__((__cdecl__)) ilogb (double);
extern int __attribute__((__cdecl__)) ilogbf (float);
extern int __attribute__((__cdecl__)) ilogbl (long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) ldexpf (float, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) ldexpl (long double, int);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) logf (float);
extern long double __attribute__((__cdecl__)) logl (long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) log10f (float);
extern long double __attribute__((__cdecl__)) log10l (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) log1p(double);
extern float __attribute__((__cdecl__)) log1pf(float);
extern long double __attribute__((__cdecl__)) log1pl(long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) log2 (double);
extern float __attribute__((__cdecl__)) log2f (float);
extern long double __attribute__((__cdecl__)) log2l (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) logb (double);
extern float __attribute__((__cdecl__)) logbf (float);
extern long double __attribute__((__cdecl__)) logbl (long double);
#pragma line 603 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern float __attribute__((__cdecl__)) modff (float, float*);
extern long double __attribute__((__cdecl__)) modfl (long double, long double*);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) scalbn (double, int);
extern float __attribute__((__cdecl__)) scalbnf (float, int);
extern long double __attribute__((__cdecl__)) scalbnl (long double, int);
#pragma empty_line
extern double __attribute__((__cdecl__)) scalbln (double, long);
extern float __attribute__((__cdecl__)) scalblnf (float, long);
extern long double __attribute__((__cdecl__)) scalblnl (long double, long);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) cbrt (double);
extern float __attribute__((__cdecl__)) cbrtf (float);
extern long double __attribute__((__cdecl__)) cbrtl (long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) fabsf (float x);
extern long double __attribute__((__cdecl__)) fabsl (long double x);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) hypot (double, double);
extern float __attribute__((__cdecl__)) hypotf (float, float);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) hypotl (long double, long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) powf (float, float);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern long double __attribute__((__cdecl__)) powl (long double, long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) sqrtf (float);
extern long double __attribute__((__cdecl__)) sqrtl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) erf (double);
extern float __attribute__((__cdecl__)) erff (float);
extern long double __attribute__((__cdecl__)) erfl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) erfc (double);
extern float __attribute__((__cdecl__)) erfcf (float);
extern long double __attribute__((__cdecl__)) erfcl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) lgamma (double);
extern float __attribute__((__cdecl__)) lgammaf (float);
extern long double __attribute__((__cdecl__)) lgammal (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) tgamma (double);
extern float __attribute__((__cdecl__)) tgammaf (float);
extern long double __attribute__((__cdecl__)) tgammal (long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) ceilf (float);
extern long double __attribute__((__cdecl__)) ceill (long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) floorf (float);
extern long double __attribute__((__cdecl__)) floorl (long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) nearbyint ( double);
extern float __attribute__((__cdecl__)) nearbyintf (float);
extern long double __attribute__((__cdecl__)) nearbyintl (long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) rint (double);
extern float __attribute__((__cdecl__)) rintf (float);
extern long double __attribute__((__cdecl__)) rintl (long double);
#pragma empty_line
#pragma empty_line
extern long __attribute__((__cdecl__)) lrint (double);
extern long __attribute__((__cdecl__)) lrintf (float);
extern long __attribute__((__cdecl__)) lrintl (long double);
#pragma empty_line
extern long long __attribute__((__cdecl__)) llrint (double);
extern long long __attribute__((__cdecl__)) llrintf (float);
extern long long __attribute__((__cdecl__)) llrintl (long double);
#pragma line 771 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern double __attribute__((__cdecl__)) round (double);
extern float __attribute__((__cdecl__)) roundf (float);
extern long double __attribute__((__cdecl__)) roundl (long double);
#pragma empty_line
#pragma empty_line
extern long __attribute__((__cdecl__)) lround (double);
extern long __attribute__((__cdecl__)) lroundf (float);
extern long __attribute__((__cdecl__)) lroundl (long double);
#pragma empty_line
extern long long __attribute__((__cdecl__)) llround (double);
extern long long __attribute__((__cdecl__)) llroundf (float);
extern long long __attribute__((__cdecl__)) llroundl (long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) trunc (double);
extern float __attribute__((__cdecl__)) truncf (float);
extern long double __attribute__((__cdecl__)) truncl (long double);
#pragma empty_line
#pragma empty_line
extern float __attribute__((__cdecl__)) fmodf (float, float);
extern long double __attribute__((__cdecl__)) fmodl (long double, long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) remainder (double, double);
extern float __attribute__((__cdecl__)) remainderf (float, float);
extern long double __attribute__((__cdecl__)) remainderl (long double, long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) remquo(double, double, int *);
extern float __attribute__((__cdecl__)) remquof(float, float, int *);
extern long double __attribute__((__cdecl__)) remquol(long double, long double, int *);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) copysign (double, double);
extern float __attribute__((__cdecl__)) copysignf (float, float);
extern long double __attribute__((__cdecl__)) copysignl (long double, long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) nan(const char *tagp);
extern float __attribute__((__cdecl__)) nanf(const char *tagp);
extern long double __attribute__((__cdecl__)) nanl(const char *tagp);
#pragma line 821 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
extern double __attribute__((__cdecl__)) nextafter (double, double);
extern float __attribute__((__cdecl__)) nextafterf (float, float);
extern long double __attribute__((__cdecl__)) nextafterl (long double, long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) nexttoward (double, long double);
extern float __attribute__((__cdecl__)) nexttowardf (float, long double);
extern long double __attribute__((__cdecl__)) nexttowardl (long double, long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) fdim (double x, double y);
extern float __attribute__((__cdecl__)) fdimf (float x, float y);
extern long double __attribute__((__cdecl__)) fdiml (long double x, long double y);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) fmax (double, double);
extern float __attribute__((__cdecl__)) fmaxf (float, float);
extern long double __attribute__((__cdecl__)) fmaxl (long double, long double);
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) fmin (double, double);
extern float __attribute__((__cdecl__)) fminf (float, float);
extern long double __attribute__((__cdecl__)) fminl (long double, long double);
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern double __attribute__((__cdecl__)) fma (double, double, double);
extern float __attribute__((__cdecl__)) fmaf (float, float, float);
extern long double __attribute__((__cdecl__)) fmal (long double, long double, long double);
#pragma line 910 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/math.h" 3
}
#pragma line 123 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
#pragma line 148 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum float_round_style
{
round_indeterminate = -1,
round_toward_zero = 0,
round_to_nearest = 1,
round_toward_infinity = 2,
round_toward_neg_infinity = 3
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum float_denorm_style
{
#pragma empty_line
denorm_indeterminate = -1,
#pragma empty_line
denorm_absent = 0,
#pragma empty_line
denorm_present = 1
};
#pragma line 192 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
struct __numeric_limits_base
{
#pragma empty_line
#pragma empty_line
static const bool is_specialized = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = 0;
#pragma empty_line
#pragma empty_line
static const int digits10 = 0;
#pragma line 213 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
static const bool is_signed = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_integer = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_exact = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int radix = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int min_exponent = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int min_exponent10 = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int max_exponent = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int max_exponent10 = 0;
#pragma empty_line
#pragma empty_line
static const bool has_infinity = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool has_quiet_NaN = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool has_signaling_NaN = false;
#pragma empty_line
#pragma empty_line
static const float_denorm_style has_denorm = denorm_absent;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool has_denorm_loss = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_iec559 = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_bounded = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_modulo = false;
#pragma empty_line
#pragma empty_line
static const bool traps = false;
#pragma empty_line
#pragma empty_line
static const bool tinyness_before = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const float_round_style round_style =
round_toward_zero;
};
#pragma line 303 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
template<typename _Tp>
struct numeric_limits : public __numeric_limits_base
{
#pragma empty_line
#pragma empty_line
static _Tp
min() throw() { return static_cast<_Tp>(0); }
#pragma empty_line
#pragma empty_line
static _Tp
max() throw() { return static_cast<_Tp>(0); }
#pragma line 324 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
static _Tp
epsilon() throw() { return static_cast<_Tp>(0); }
#pragma empty_line
#pragma empty_line
static _Tp
round_error() throw() { return static_cast<_Tp>(0); }
#pragma empty_line
#pragma empty_line
static _Tp
infinity() throw() { return static_cast<_Tp>(0); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
static _Tp
quiet_NaN() throw() { return static_cast<_Tp>(0); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
static _Tp
signaling_NaN() throw() { return static_cast<_Tp>(0); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static _Tp
denorm_min() throw() { return static_cast<_Tp>(0); }
};
#pragma line 370 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
template<>
struct numeric_limits<bool>
{
static const bool is_specialized = true;
#pragma empty_line
static bool
min() throw() { return false; }
#pragma empty_line
static bool
max() throw() { return true; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = 1;
static const int digits10 = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static bool
epsilon() throw() { return false; }
#pragma empty_line
static bool
round_error() throw() { return false; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static bool
infinity() throw() { return false; }
#pragma empty_line
static bool
quiet_NaN() throw() { return false; }
#pragma empty_line
static bool
signaling_NaN() throw() { return false; }
#pragma empty_line
static bool
denorm_min() throw() { return false; }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = false;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<char>
{
static const bool is_specialized = true;
#pragma empty_line
static char
min() throw() { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); }
#pragma empty_line
static char
max() throw() { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0));
static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = ((char)(-1) < 0);
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static char
epsilon() throw() { return 0; }
#pragma empty_line
static char
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static
char infinity() throw() { return char(); }
#pragma empty_line
static char
quiet_NaN() throw() { return char(); }
#pragma empty_line
static char
signaling_NaN() throw() { return char(); }
#pragma empty_line
static char
denorm_min() throw() { return static_cast<char>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<signed char>
{
static const bool is_specialized = true;
#pragma empty_line
static signed char
min() throw() { return -127 - 1; }
#pragma empty_line
static signed char
max() throw() { return 127; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0));
static const int digits10
= ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static signed char
epsilon() throw() { return 0; }
#pragma empty_line
static signed char
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static signed char
infinity() throw() { return static_cast<signed char>(0); }
#pragma empty_line
static signed char
quiet_NaN() throw() { return static_cast<signed char>(0); }
#pragma empty_line
static signed char
signaling_NaN() throw() { return static_cast<signed char>(0); }
#pragma empty_line
static signed char
denorm_min() throw() { return static_cast<signed char>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<unsigned char>
{
static const bool is_specialized = true;
#pragma empty_line
static unsigned char
min() throw() { return 0; }
#pragma empty_line
static unsigned char
max() throw() { return 127 * 2U + 1; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits
= (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0));
static const int digits10
= ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static unsigned char
epsilon() throw() { return 0; }
#pragma empty_line
static unsigned char
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static unsigned char
infinity() throw() { return static_cast<unsigned char>(0); }
#pragma empty_line
static unsigned char
quiet_NaN() throw() { return static_cast<unsigned char>(0); }
#pragma empty_line
static unsigned char
signaling_NaN() throw() { return static_cast<unsigned char>(0); }
#pragma empty_line
static unsigned char
denorm_min() throw() { return static_cast<unsigned char>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<wchar_t>
{
static const bool is_specialized = true;
#pragma empty_line
static wchar_t
min() throw() { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); }
#pragma empty_line
static wchar_t
max() throw() { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0));
static const int digits10
= ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = ((wchar_t)(-1) < 0);
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static wchar_t
epsilon() throw() { return 0; }
#pragma empty_line
static wchar_t
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static wchar_t
infinity() throw() { return wchar_t(); }
#pragma empty_line
static wchar_t
quiet_NaN() throw() { return wchar_t(); }
#pragma empty_line
static wchar_t
signaling_NaN() throw() { return wchar_t(); }
#pragma empty_line
static wchar_t
denorm_min() throw() { return wchar_t(); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma line 852 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/limits" 3
template<>
struct numeric_limits<short>
{
static const bool is_specialized = true;
#pragma empty_line
static short
min() throw() { return -32767 - 1; }
#pragma empty_line
static short
max() throw() { return 32767; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0));
static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static short
epsilon() throw() { return 0; }
#pragma empty_line
static short
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static short
infinity() throw() { return short(); }
#pragma empty_line
static short
quiet_NaN() throw() { return short(); }
#pragma empty_line
static short
signaling_NaN() throw() { return short(); }
#pragma empty_line
static short
denorm_min() throw() { return short(); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<unsigned short>
{
static const bool is_specialized = true;
#pragma empty_line
static unsigned short
min() throw() { return 0; }
#pragma empty_line
static unsigned short
max() throw() { return 32767 * 2U + 1; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits
= (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0));
static const int digits10
= ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static unsigned short
epsilon() throw() { return 0; }
#pragma empty_line
static unsigned short
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static unsigned short
infinity() throw() { return static_cast<unsigned short>(0); }
#pragma empty_line
static unsigned short
quiet_NaN() throw() { return static_cast<unsigned short>(0); }
#pragma empty_line
static unsigned short
signaling_NaN() throw() { return static_cast<unsigned short>(0); }
#pragma empty_line
static unsigned short
denorm_min() throw() { return static_cast<unsigned short>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<int>
{
static const bool is_specialized = true;
#pragma empty_line
static int
min() throw() { return -2147483647 - 1; }
#pragma empty_line
static int
max() throw() { return 2147483647; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0));
static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static int
epsilon() throw() { return 0; }
#pragma empty_line
static int
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static int
infinity() throw() { return static_cast<int>(0); }
#pragma empty_line
static int
quiet_NaN() throw() { return static_cast<int>(0); }
#pragma empty_line
static int
signaling_NaN() throw() { return static_cast<int>(0); }
#pragma empty_line
static int
denorm_min() throw() { return static_cast<int>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<unsigned int>
{
static const bool is_specialized = true;
#pragma empty_line
static unsigned int
min() throw() { return 0; }
#pragma empty_line
static unsigned int
max() throw() { return 2147483647 * 2U + 1; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits
= (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0));
static const int digits10
= ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static unsigned int
epsilon() throw() { return 0; }
#pragma empty_line
static unsigned int
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static unsigned int
infinity() throw() { return static_cast<unsigned int>(0); }
#pragma empty_line
static unsigned int
quiet_NaN() throw() { return static_cast<unsigned int>(0); }
#pragma empty_line
static unsigned int
signaling_NaN() throw() { return static_cast<unsigned int>(0); }
#pragma empty_line
static unsigned int
denorm_min() throw() { return static_cast<unsigned int>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<long>
{
static const bool is_specialized = true;
#pragma empty_line
static long
min() throw() { return -2147483647L - 1; }
#pragma empty_line
static long
max() throw() { return 2147483647L; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0));
static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static long
epsilon() throw() { return 0; }
#pragma empty_line
static long
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static long
infinity() throw() { return static_cast<long>(0); }
#pragma empty_line
static long
quiet_NaN() throw() { return static_cast<long>(0); }
#pragma empty_line
static long
signaling_NaN() throw() { return static_cast<long>(0); }
#pragma empty_line
static long
denorm_min() throw() { return static_cast<long>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<unsigned long>
{
static const bool is_specialized = true;
#pragma empty_line
static unsigned long
min() throw() { return 0; }
#pragma empty_line
static unsigned long
max() throw() { return 2147483647L * 2UL + 1; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits
= (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0));
static const int digits10
= ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static unsigned long
epsilon() throw() { return 0; }
#pragma empty_line
static unsigned long
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static unsigned long
infinity() throw() { return static_cast<unsigned long>(0); }
#pragma empty_line
static unsigned long
quiet_NaN() throw() { return static_cast<unsigned long>(0); }
#pragma empty_line
static unsigned long
signaling_NaN() throw() { return static_cast<unsigned long>(0); }
#pragma empty_line
static unsigned long
denorm_min() throw() { return static_cast<unsigned long>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<long long>
{
static const bool is_specialized = true;
#pragma empty_line
static long long
min() throw() { return -9223372036854775807LL - 1; }
#pragma empty_line
static long long
max() throw() { return 9223372036854775807LL; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits
= (sizeof(long long) * 8 - ((long long)(-1) < 0));
static const int digits10
= ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static long long
epsilon() throw() { return 0; }
#pragma empty_line
static long long
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static long long
infinity() throw() { return static_cast<long long>(0); }
#pragma empty_line
static long long
quiet_NaN() throw() { return static_cast<long long>(0); }
#pragma empty_line
static long long
signaling_NaN() throw() { return static_cast<long long>(0); }
#pragma empty_line
static long long
denorm_min() throw() { return static_cast<long long>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<unsigned long long>
{
static const bool is_specialized = true;
#pragma empty_line
static unsigned long long
min() throw() { return 0; }
#pragma empty_line
static unsigned long long
max() throw() { return 9223372036854775807LL * 2ULL + 1; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits
= (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0));
static const int digits10
= ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136);
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
#pragma empty_line
static unsigned long long
epsilon() throw() { return 0; }
#pragma empty_line
static unsigned long long
round_error() throw() { return 0; }
#pragma empty_line
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
#pragma empty_line
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm
= denorm_absent;
static const bool has_denorm_loss = false;
#pragma empty_line
static unsigned long long
infinity() throw() { return static_cast<unsigned long long>(0); }
#pragma empty_line
static unsigned long long
quiet_NaN() throw() { return static_cast<unsigned long long>(0); }
#pragma empty_line
static unsigned long long
signaling_NaN() throw() { return static_cast<unsigned long long>(0); }
#pragma empty_line
static unsigned long long
denorm_min() throw() { return static_cast<unsigned long long>(0); }
#pragma empty_line
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = true;
#pragma empty_line
static const bool traps = true;
static const bool tinyness_before = false;
static const float_round_style round_style
= round_toward_zero;
};
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<float>
{
static const bool is_specialized = true;
#pragma empty_line
static float
min() throw() { return 1.17549435082228750797e-38F; }
#pragma empty_line
static float
max() throw() { return 3.40282346638528859812e+38F; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = 24;
static const int digits10 = 6;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = 2;
#pragma empty_line
static float
epsilon() throw() { return 1.19209289550781250000e-7F; }
#pragma empty_line
static float
round_error() throw() { return 0.5F; }
#pragma empty_line
static const int min_exponent = (-125);
static const int min_exponent10 = (-37);
static const int max_exponent = 128;
static const int max_exponent10 = 38;
#pragma empty_line
static const bool has_infinity = 1;
static const bool has_quiet_NaN = 1;
static const bool has_signaling_NaN = has_quiet_NaN;
static const float_denorm_style has_denorm
= bool(1) ? denorm_present : denorm_absent;
static const bool has_denorm_loss
= false;
#pragma empty_line
static float
infinity() throw() { return __builtin_huge_valf (); }
#pragma empty_line
static float
quiet_NaN() throw() { return __builtin_nanf (""); }
#pragma empty_line
static float
signaling_NaN() throw() { return __builtin_nansf (""); }
#pragma empty_line
static float
denorm_min() throw() { return 1.40129846432481707092e-45F; }
#pragma empty_line
static const bool is_iec559
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
static const bool is_bounded = true;
static const bool is_modulo = false;
#pragma empty_line
static const bool traps = false;
static const bool tinyness_before
= false;
static const float_round_style round_style
= round_to_nearest;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<double>
{
static const bool is_specialized = true;
#pragma empty_line
static double
min() throw() { return double(2.22507385850720138309e-308L); }
#pragma empty_line
static double
max() throw() { return double(1.79769313486231570815e+308L); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = 53;
static const int digits10 = 15;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = 2;
#pragma empty_line
static double
epsilon() throw() { return double(2.22044604925031308085e-16L); }
#pragma empty_line
static double
round_error() throw() { return 0.5; }
#pragma empty_line
static const int min_exponent = (-1021);
static const int min_exponent10 = (-307);
static const int max_exponent = 1024;
static const int max_exponent10 = 308;
#pragma empty_line
static const bool has_infinity = 1;
static const bool has_quiet_NaN = 1;
static const bool has_signaling_NaN = has_quiet_NaN;
static const float_denorm_style has_denorm
= bool(1) ? denorm_present : denorm_absent;
static const bool has_denorm_loss
= false;
#pragma empty_line
static double
infinity() throw() { return __builtin_huge_val(); }
#pragma empty_line
static double
quiet_NaN() throw() { return __builtin_nan (""); }
#pragma empty_line
static double
signaling_NaN() throw() { return __builtin_nans (""); }
#pragma empty_line
static double
denorm_min() throw() { return double(4.94065645841246544177e-324L); }
#pragma empty_line
static const bool is_iec559
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
static const bool is_bounded = true;
static const bool is_modulo = false;
#pragma empty_line
static const bool traps = false;
static const bool tinyness_before
= false;
static const float_round_style round_style
= round_to_nearest;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<>
struct numeric_limits<long double>
{
static const bool is_specialized = true;
#pragma empty_line
static long double
min() throw() { return 3.36210314311209350626e-4932L; }
#pragma empty_line
static long double
max() throw() { return 1.18973149535723176502e+4932L; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const int digits = 64;
static const int digits10 = 18;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
static const int radix = 2;
#pragma empty_line
static long double
epsilon() throw() { return 1.08420217248550443401e-19L; }
#pragma empty_line
static long double
round_error() throw() { return 0.5L; }
#pragma empty_line
static const int min_exponent = (-16381);
static const int min_exponent10 = (-4931);
static const int max_exponent = 16384;
static const int max_exponent10 = 4932;
#pragma empty_line
static const bool has_infinity = 1;
static const bool has_quiet_NaN = 1;
static const bool has_signaling_NaN = has_quiet_NaN;
static const float_denorm_style has_denorm
= bool(1) ? denorm_present : denorm_absent;
static const bool has_denorm_loss
= false;
#pragma empty_line
static long double
infinity() throw() { return __builtin_huge_vall (); }
#pragma empty_line
static long double
quiet_NaN() throw() { return __builtin_nanl (""); }
#pragma empty_line
static long double
signaling_NaN() throw() { return __builtin_nansl (""); }
#pragma empty_line
static long double
denorm_min() throw() { return 3.64519953188247460253e-4951L; }
#pragma empty_line
static const bool is_iec559
= has_infinity && has_quiet_NaN && has_denorm == denorm_present;
static const bool is_bounded = true;
static const bool is_modulo = false;
#pragma empty_line
static const bool traps = false;
static const bool tinyness_before =
false;
static const float_round_style round_style =
round_to_nearest;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 124 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 1 3
#pragma line 24 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 25 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern "C" {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memchr (const void*, int, size_t) __attribute__ ((__pure__));
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memcmp (const void*, const void*, size_t) __attribute__ ((__pure__));
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memcpy (void*, const void*, size_t);
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memmove (void*, const void*, size_t);
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memset (void*, int, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcat (char*, const char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strchr (const char*, int) __attribute__ ((__pure__));
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcmp (const char*, const char*) __attribute__ ((__pure__));
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcoll (const char*, const char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcpy (char*, const char*);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcspn (const char*, const char*) __attribute__ ((__pure__));
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strerror (int);
#pragma empty_line
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strlen (const char*) __attribute__ ((__pure__));
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncat (char*, const char*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncmp (const char*, const char*, size_t) __attribute__ ((__pure__));
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncpy (char*, const char*, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strpbrk (const char*, const char*) __attribute__ ((__pure__));
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strrchr (const char*, int) __attribute__ ((__pure__));
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strspn (const char*, const char*) __attribute__ ((__pure__));
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strstr (const char*, const char*) __attribute__ ((__pure__));
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtok (char*, const char*);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strxfrm (char*, const char*, size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strerror (const char *);
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _memccpy (void*, const void*, int, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _memicmp (const void*, const void*, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strdup (const char*) __attribute__ ((__malloc__));
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strcmpi (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _stricmp (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _stricoll (const char*, const char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strlwr (char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strnicmp (const char*, const char*, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strnset (char*, int, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strrev (char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strset (char*, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strupr (char*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _swab (const char*, char*, size_t);
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strncoll(const char*, const char*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strnicoll(const char*, const char*, size_t);
#pragma line 90 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memccpy (void*, const void*, int, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memicmp (const void*, const void*, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strdup (const char*) __attribute__ ((__malloc__));
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcmpi (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) stricmp (const char*, const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcasecmp (const char*, const char *);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) stricoll (const char*, const char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strlwr (char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strnicmp (const char*, const char*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncasecmp (const char *, const char *, size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strnset (char*, int, size_t);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strrev (char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strset (char*, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strupr (char*);
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) swab (const char*, char*, size_t);
#pragma line 196 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3
}
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 2 3
#pragma line 73 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 3
namespace std
{
#pragma empty_line
#pragma empty_line
using ::memchr;
using ::memcmp;
using ::memcpy;
using ::memmove;
using ::memset;
using ::strcat;
using ::strcmp;
using ::strcoll;
using ::strcpy;
using ::strcspn;
using ::strerror;
using ::strlen;
using ::strncat;
using ::strncmp;
using ::strncpy;
using ::strspn;
using ::strtok;
using ::strxfrm;
using ::strchr;
using ::strpbrk;
using ::strrchr;
using ::strstr;
#pragma empty_line
#pragma empty_line
inline void*
memchr(void* __s, int __c, size_t __n)
{ return __builtin_memchr(__s, __c, __n); }
#pragma empty_line
inline char*
strchr(char* __s, int __n)
{ return __builtin_strchr(__s, __n); }
#pragma empty_line
inline char*
strpbrk(char* __s1, const char* __s2)
{ return __builtin_strpbrk(__s1, __s2); }
#pragma empty_line
inline char*
strrchr(char* __s, int __n)
{ return __builtin_strrchr(__s, __n); }
#pragma empty_line
inline char*
strstr(char* __s1, const char* __s2)
{ return __builtin_strstr(__s1, __s2); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 125 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 1 3
#pragma line 21 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 22 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 2 3
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern "C" {
#pragma line 71 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern int _argc;
extern char** _argv;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p___argc(void);
extern char*** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p___argv(void);
extern wchar_t*** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p___wargv(void);
#pragma line 137 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _errno(void);
#pragma empty_line
#pragma empty_line
int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __doserrno(void);
#pragma line 149 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern char *** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__environ(void);
extern wchar_t *** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__wenviron(void);
#pragma line 172 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern __attribute__ ((__dllimport__)) int _sys_nerr;
#pragma line 196 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern __attribute__ ((__dllimport__)) char* _sys_errlist[];
#pragma line 209 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__osver(void);
extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__winver(void);
extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__winmajor(void);
extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__winminor(void);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __attribute__ ((__dllimport__)) unsigned int _osver;
extern __attribute__ ((__dllimport__)) unsigned int _winver;
extern __attribute__ ((__dllimport__)) unsigned int _winmajor;
extern __attribute__ ((__dllimport__)) unsigned int _winminor;
#pragma line 260 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
char** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__pgmptr(void);
#pragma empty_line
wchar_t** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__wpgmptr(void);
#pragma line 293 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
extern __attribute__ ((__dllimport__)) int _fmode;
#pragma line 303 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atof (const char*);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atoi (const char*);
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atol (const char*);
#pragma empty_line
double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtof (const wchar_t *);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtoi (const wchar_t *);
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtol (const wchar_t *);
#pragma empty_line
#pragma empty_line
double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __strtod (const char*, char**);
extern double __attribute__((__cdecl__)) __attribute__ ((__nothrow__))
strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr);
float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtof (const char * __restrict__, char ** __restrict__);
long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtold (const char * __restrict__, char ** __restrict__);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtol (const char*, char**, int);
unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtoul (const char*, char**, int);
#pragma line 345 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstombs (char*, const wchar_t*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wctomb (char*, wchar_t);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mblen (const char*, size_t);
size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbstowcs (wchar_t*, const char*, size_t);
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbtowc (wchar_t*, const char*, size_t);
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rand (void);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) srand (unsigned int);
#pragma empty_line
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) calloc (size_t, size_t) __attribute__ ((__malloc__));
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) malloc (size_t) __attribute__ ((__malloc__));
void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) realloc (void*, size_t);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) free (void*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) abort (void) __attribute__ ((__noreturn__));
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) exit (int) __attribute__ ((__noreturn__));
#pragma empty_line
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atexit (void (*)(void));
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) system (const char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getenv (const char*);
#pragma empty_line
#pragma empty_line
void* __attribute__((__cdecl__)) bsearch (const void*, const void*, size_t, size_t,
int (*)(const void*, const void*));
void __attribute__((__cdecl__)) qsort(void*, size_t, size_t,
int (*)(const void*, const void*));
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) abs (int) __attribute__ ((__const__));
long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) labs (long) __attribute__ ((__const__));
#pragma line 385 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
typedef struct { int quot, rem; } div_t;
typedef struct { long quot, rem; } ldiv_t;
#pragma empty_line
div_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) div (int, int) __attribute__ ((__const__));
ldiv_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ldiv (long, long) __attribute__ ((__const__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _beep (unsigned int, unsigned int) __attribute__ ((__deprecated__));
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _seterrormode (int) __attribute__ ((__deprecated__));
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _sleep (unsigned long) __attribute__ ((__deprecated__));
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _exit (int) __attribute__ ((__noreturn__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef int (* _onexit_t)(void);
_onexit_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _onexit( _onexit_t );
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _putenv (const char*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _searchenv (const char*, const char*, char*);
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ecvt (double, int, int*, int*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fcvt (double, int, int*, int*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _gcvt (double, int, char*);
#pragma empty_line
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _makepath (char*, const char*, const char*, const char*, const char*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _splitpath (const char*, char*, char*, char*, char*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fullpath (char*, const char*, size_t);
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _itoa (int, char*, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ltoa (long, char*, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ultoa(unsigned long, char*, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _itow (int, wchar_t*, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ltow (long, wchar_t*, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ultow (unsigned long, wchar_t*, int);
#pragma empty_line
#pragma empty_line
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _atoi64(const char *);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _i64toa(long long, char *, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ui64toa(unsigned long long, char *, int);
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtoi64(const wchar_t *);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _i64tow(long long, wchar_t *, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ui64tow(unsigned long long, wchar_t *, int);
#pragma empty_line
unsigned int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_rotl)(unsigned int, int) __attribute__ ((__const__));
unsigned int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_rotr)(unsigned int, int) __attribute__ ((__const__));
unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_lrotl)(unsigned long, int) __attribute__ ((__const__));
unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_lrotr)(unsigned long, int) __attribute__ ((__const__));
#pragma empty_line
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _set_error_mode (int);
#pragma line 477 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putenv (const char*);
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) searchenv (const char*, const char*, char*);
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) itoa (int, char*, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ltoa (long, char*, int);
#pragma empty_line
#pragma empty_line
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ecvt (double, int, int*, int*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fcvt (double, int, int*, int*);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) gcvt (double, int, char*);
#pragma line 497 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _Exit(int) __attribute__ ((__noreturn__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef struct { long long quot, rem; } lldiv_t;
#pragma empty_line
lldiv_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) lldiv (long long, long long) __attribute__ ((__const__));
#pragma empty_line
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) llabs(long long);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtoll (const char* __restrict__, char** __restrict, int);
unsigned long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtoull (const char* __restrict__, char** __restrict__, int);
#pragma empty_line
#pragma empty_line
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atoll (const char *);
#pragma empty_line
#pragma empty_line
long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wtoll (const wchar_t *);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) lltoa (long long, char *, int);
char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ulltoa (unsigned long long , char *, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) lltow (long long, wchar_t *, int);
wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ulltow (unsigned long long, wchar_t *, int);
#pragma line 549 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3
}
#pragma line 67 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 2 3
#pragma line 98 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
namespace std
{
#pragma empty_line
#pragma empty_line
using ::div_t;
using ::ldiv_t;
#pragma empty_line
using ::abort;
using ::abs;
using ::atexit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
#pragma empty_line
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
#pragma empty_line
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
#pragma empty_line
using ::wcstombs;
using ::wctomb;
#pragma empty_line
#pragma empty_line
inline long
abs(long __i) { return labs(__i); }
#pragma empty_line
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
#pragma empty_line
#pragma empty_line
}
#pragma line 158 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
namespace __gnu_cxx
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
using ::lldiv_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
using ::_Exit;
#pragma empty_line
#pragma empty_line
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
#pragma empty_line
#pragma empty_line
using ::llabs;
#pragma empty_line
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#pragma empty_line
using ::lldiv;
#pragma line 193 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
using ::atoll;
using ::strtoll;
using ::strtoull;
#pragma empty_line
using ::strtof;
using ::strtold;
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
namespace std
{
#pragma empty_line
using ::__gnu_cxx::lldiv_t;
#pragma empty_line
using ::__gnu_cxx::_Exit;
using ::__gnu_cxx::abs;
#pragma empty_line
using ::__gnu_cxx::llabs;
using ::__gnu_cxx::div;
using ::__gnu_cxx::lldiv;
#pragma empty_line
using ::__gnu_cxx::atoll;
using ::__gnu_cxx::strtof;
using ::__gnu_cxx::strtoll;
using ::__gnu_cxx::strtoull;
using ::__gnu_cxx::strtold;
}
#pragma line 126 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 1 3
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
#pragma empty_line
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
#pragma line 48 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct _Resetiosflags { ios_base::fmtflags _M_mask; };
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
inline _Resetiosflags
resetiosflags(ios_base::fmtflags __mask)
{ return { __mask }; }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
{
__is.setf(ios_base::fmtflags(0), __f._M_mask);
return __is;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
{
__os.setf(ios_base::fmtflags(0), __f._M_mask);
return __os;
}
#pragma empty_line
#pragma empty_line
struct _Setiosflags { ios_base::fmtflags _M_mask; };
#pragma line 94 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
inline _Setiosflags
setiosflags(ios_base::fmtflags __mask)
{ return { __mask }; }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
{
__is.setf(__f._M_mask);
return __is;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
{
__os.setf(__f._M_mask);
return __os;
}
#pragma empty_line
#pragma empty_line
struct _Setbase { int _M_base; };
#pragma line 125 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
inline _Setbase
setbase(int __base)
{ return { __base }; }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
{
__is.setf(__f._M_base == 8 ? ios_base::oct :
__f._M_base == 10 ? ios_base::dec :
__f._M_base == 16 ? ios_base::hex :
ios_base::fmtflags(0), ios_base::basefield);
return __is;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
{
__os.setf(__f._M_base == 8 ? ios_base::oct :
__f._M_base == 10 ? ios_base::dec :
__f._M_base == 16 ? ios_base::hex :
ios_base::fmtflags(0), ios_base::basefield);
return __os;
}
#pragma empty_line
#pragma empty_line
template<typename _CharT>
struct _Setfill { _CharT _M_c; };
#pragma line 162 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
template<typename _CharT>
inline _Setfill<_CharT>
setfill(_CharT __c)
{ return { __c }; }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
{
__is.fill(__f._M_c);
return __is;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
{
__os.fill(__f._M_c);
return __os;
}
#pragma empty_line
#pragma empty_line
struct _Setprecision { int _M_n; };
#pragma line 193 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
inline _Setprecision
setprecision(int __n)
{ return { __n }; }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
{
__is.precision(__f._M_n);
return __is;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
{
__os.precision(__f._M_n);
return __os;
}
#pragma empty_line
#pragma empty_line
struct _Setw { int _M_n; };
#pragma line 223 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
inline _Setw
setw(int __n)
{ return { __n }; }
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
{
__is.width(__f._M_n);
return __is;
}
#pragma empty_line
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
{
__os.width(__f._M_n);
return __os;
}
#pragma line 320 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/iomanip" 3
extern template ostream& operator<<(ostream&, _Setfill<char>);
extern template ostream& operator<<(ostream&, _Setiosflags);
extern template ostream& operator<<(ostream&, _Resetiosflags);
extern template ostream& operator<<(ostream&, _Setbase);
extern template ostream& operator<<(ostream&, _Setprecision);
extern template ostream& operator<<(ostream&, _Setw);
extern template istream& operator>>(istream&, _Setfill<char>);
extern template istream& operator>>(istream&, _Setiosflags);
extern template istream& operator>>(istream&, _Resetiosflags);
extern template istream& operator>>(istream&, _Setbase);
extern template istream& operator>>(istream&, _Setprecision);
extern template istream& operator>>(istream&, _Setw);
#pragma empty_line
#pragma empty_line
extern template wostream& operator<<(wostream&, _Setfill<wchar_t>);
extern template wostream& operator<<(wostream&, _Setiosflags);
extern template wostream& operator<<(wostream&, _Resetiosflags);
extern template wostream& operator<<(wostream&, _Setbase);
extern template wostream& operator<<(wostream&, _Setprecision);
extern template wostream& operator<<(wostream&, _Setw);
extern template wistream& operator>>(wistream&, _Setfill<wchar_t>);
extern template wistream& operator>>(wistream&, _Setiosflags);
extern template wistream& operator>>(wistream&, _Resetiosflags);
extern template wistream& operator>>(wistream&, _Setbase);
extern template wistream& operator>>(wistream&, _Setprecision);
extern template wistream& operator>>(wistream&, _Setw);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 127 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 1 3
#pragma line 37 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
#pragma empty_line
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
template<typename _CharT, typename _Traits, typename _Alloc>
class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef _Alloc allocator_type;
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
#pragma empty_line
typedef basic_streambuf<char_type, traits_type> __streambuf_type;
typedef basic_string<char_type, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
#pragma empty_line
protected:
#pragma empty_line
ios_base::openmode _M_mode;
#pragma empty_line
#pragma empty_line
__string_type _M_string;
#pragma empty_line
public:
#pragma line 93 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
: __streambuf_type(), _M_mode(__mode), _M_string()
{ }
#pragma line 106 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_stringbuf(const __string_type& __str,
ios_base::openmode __mode = ios_base::in | ios_base::out)
: __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size())
{ _M_stringbuf_init(__mode); }
#pragma line 121 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
__string_type
str() const
{
__string_type __ret;
if (this->pptr())
{
#pragma empty_line
if (this->pptr() > this->egptr())
__ret = __string_type(this->pbase(), this->pptr());
else
__ret = __string_type(this->pbase(), this->egptr());
}
else
__ret = _M_string;
return __ret;
}
#pragma line 145 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
void
str(const __string_type& __s)
{
#pragma empty_line
_M_string.assign(__s.data(), __s.size());
_M_stringbuf_init(_M_mode);
}
#pragma empty_line
protected:
#pragma empty_line
void
_M_stringbuf_init(ios_base::openmode __mode)
{
_M_mode = __mode;
__size_type __len = 0;
if (_M_mode & (ios_base::ate | ios_base::app))
__len = _M_string.size();
_M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
}
#pragma empty_line
virtual streamsize
showmanyc()
{
streamsize __ret = -1;
if (_M_mode & ios_base::in)
{
_M_update_egptr();
__ret = this->egptr() - this->gptr();
}
return __ret;
}
#pragma empty_line
virtual int_type
underflow();
#pragma empty_line
virtual int_type
pbackfail(int_type __c = traits_type::eof());
#pragma empty_line
virtual int_type
overflow(int_type __c = traits_type::eof());
#pragma line 197 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
virtual __streambuf_type*
setbuf(char_type* __s, streamsize __n)
{
if (__s && __n >= 0)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_M_string.clear();
#pragma empty_line
#pragma empty_line
_M_sync(__s, __n, 0);
}
return this;
}
#pragma empty_line
virtual pos_type
seekoff(off_type __off, ios_base::seekdir __way,
ios_base::openmode __mode = ios_base::in | ios_base::out);
#pragma empty_line
virtual pos_type
seekpos(pos_type __sp,
ios_base::openmode __mode = ios_base::in | ios_base::out);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_sync(char_type* __base, __size_type __i, __size_type __o);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_update_egptr()
{
const bool __testin = _M_mode & ios_base::in;
if (this->pptr() && this->pptr() > this->egptr())
{
if (__testin)
this->setg(this->eback(), this->gptr(), this->pptr());
else
this->setg(this->pptr(), this->pptr(), this->pptr());
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_pbump(char_type* __pbeg, char_type* __pend, off_type __off);
};
#pragma line 262 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
template<typename _CharT, typename _Traits, typename _Alloc>
class basic_istringstream : public basic_istream<_CharT, _Traits>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef _Alloc allocator_type;
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
#pragma empty_line
#pragma empty_line
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
typedef basic_istream<char_type, traits_type> __istream_type;
#pragma empty_line
private:
__stringbuf_type _M_stringbuf;
#pragma empty_line
public:
#pragma line 298 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_istringstream(ios_base::openmode __mode = ios_base::in)
: __istream_type(), _M_stringbuf(__mode | ios_base::in)
{ this->init(&_M_stringbuf); }
#pragma line 316 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_istringstream(const __string_type& __str,
ios_base::openmode __mode = ios_base::in)
: __istream_type(), _M_stringbuf(__str, __mode | ios_base::in)
{ this->init(&_M_stringbuf); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
~basic_istringstream()
{ }
#pragma line 338 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
__stringbuf_type*
rdbuf() const
{ return const_cast<__stringbuf_type*>(&_M_stringbuf); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
__string_type
str() const
{ return _M_stringbuf.str(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
str(const __string_type& __s)
{ _M_stringbuf.str(__s); }
};
#pragma line 372 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
template <typename _CharT, typename _Traits, typename _Alloc>
class basic_ostringstream : public basic_ostream<_CharT, _Traits>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef _Alloc allocator_type;
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
#pragma empty_line
#pragma empty_line
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
typedef basic_ostream<char_type, traits_type> __ostream_type;
#pragma empty_line
private:
__stringbuf_type _M_stringbuf;
#pragma empty_line
public:
#pragma line 408 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_ostringstream(ios_base::openmode __mode = ios_base::out)
: __ostream_type(), _M_stringbuf(__mode | ios_base::out)
{ this->init(&_M_stringbuf); }
#pragma line 426 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_ostringstream(const __string_type& __str,
ios_base::openmode __mode = ios_base::out)
: __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out)
{ this->init(&_M_stringbuf); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
~basic_ostringstream()
{ }
#pragma line 448 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
__stringbuf_type*
rdbuf() const
{ return const_cast<__stringbuf_type*>(&_M_stringbuf); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
__string_type
str() const
{ return _M_stringbuf.str(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
str(const __string_type& __s)
{ _M_stringbuf.str(__s); }
};
#pragma line 482 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
template <typename _CharT, typename _Traits, typename _Alloc>
class basic_stringstream : public basic_iostream<_CharT, _Traits>
{
public:
#pragma empty_line
typedef _CharT char_type;
typedef _Traits traits_type;
#pragma empty_line
#pragma empty_line
typedef _Alloc allocator_type;
typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
#pragma empty_line
#pragma empty_line
typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
typedef basic_iostream<char_type, traits_type> __iostream_type;
#pragma empty_line
private:
__stringbuf_type _M_stringbuf;
#pragma empty_line
public:
#pragma line 516 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
: __iostream_type(), _M_stringbuf(__m)
{ this->init(&_M_stringbuf); }
#pragma line 532 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
explicit
basic_stringstream(const __string_type& __str,
ios_base::openmode __m = ios_base::out | ios_base::in)
: __iostream_type(), _M_stringbuf(__str, __m)
{ this->init(&_M_stringbuf); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
~basic_stringstream()
{ }
#pragma line 554 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 3
__stringbuf_type*
rdbuf() const
{ return const_cast<__stringbuf_type*>(&_M_stringbuf); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
__string_type
str() const
{ return _M_stringbuf.str(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
str(const __string_type& __s)
{ _M_stringbuf.str(__s); }
};
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/sstream.tcc" 1 3
#pragma line 39 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/sstream.tcc" 3
#pragma empty_line
#pragma line 40 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/sstream.tcc" 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
pbackfail(int_type __c)
{
int_type __ret = traits_type::eof();
if (this->eback() < this->gptr())
{
#pragma empty_line
#pragma empty_line
const bool __testeof = traits_type::eq_int_type(__c, __ret);
if (!__testeof)
{
const bool __testeq = traits_type::eq(traits_type::
to_char_type(__c),
this->gptr()[-1]);
const bool __testout = this->_M_mode & ios_base::out;
if (__testeq || __testout)
{
this->gbump(-1);
if (!__testeq)
*this->gptr() = traits_type::to_char_type(__c);
__ret = __c;
}
}
else
{
this->gbump(-1);
__ret = traits_type::not_eof(__c);
}
}
return __ret;
}
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
overflow(int_type __c)
{
const bool __testout = this->_M_mode & ios_base::out;
if (__builtin_expect(!__testout, false))
return traits_type::eof();
#pragma empty_line
const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
if (__builtin_expect(__testeof, false))
return traits_type::not_eof(__c);
#pragma empty_line
const __size_type __capacity = _M_string.capacity();
const __size_type __max_size = _M_string.max_size();
const bool __testput = this->pptr() < this->epptr();
if (__builtin_expect(!__testput && __capacity == __max_size, false))
return traits_type::eof();
#pragma empty_line
#pragma empty_line
#pragma empty_line
const char_type __conv = traits_type::to_char_type(__c);
if (!__testput)
{
#pragma line 112 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/sstream.tcc" 3
const __size_type __opt_len = std::max(__size_type(2 * __capacity),
__size_type(512));
const __size_type __len = std::min(__opt_len, __max_size);
__string_type __tmp;
__tmp.reserve(__len);
if (this->pbase())
__tmp.assign(this->pbase(), this->epptr() - this->pbase());
__tmp.push_back(__conv);
_M_string.swap(__tmp);
_M_sync(const_cast<char_type*>(_M_string.data()),
this->gptr() - this->eback(), this->pptr() - this->pbase());
}
else
*this->pptr() = __conv;
this->pbump(1);
return __c;
}
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
underflow()
{
int_type __ret = traits_type::eof();
const bool __testin = this->_M_mode & ios_base::in;
if (__testin)
{
#pragma empty_line
_M_update_egptr();
#pragma empty_line
if (this->gptr() < this->egptr())
__ret = traits_type::to_int_type(*this->gptr());
}
return __ret;
}
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
{
pos_type __ret = pos_type(off_type(-1));
bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
const bool __testboth = __testin && __testout && __way != ios_base::cur;
__testin &= !(__mode & ios_base::out);
__testout &= !(__mode & ios_base::in);
#pragma empty_line
#pragma empty_line
#pragma empty_line
const char_type* __beg = __testin ? this->eback() : this->pbase();
if ((__beg || !__off) && (__testin || __testout || __testboth))
{
_M_update_egptr();
#pragma empty_line
off_type __newoffi = __off;
off_type __newoffo = __newoffi;
if (__way == ios_base::cur)
{
__newoffi += this->gptr() - __beg;
__newoffo += this->pptr() - __beg;
}
else if (__way == ios_base::end)
__newoffo = __newoffi += this->egptr() - __beg;
#pragma empty_line
if ((__testin || __testboth)
&& __newoffi >= 0
&& this->egptr() - __beg >= __newoffi)
{
this->setg(this->eback(), this->eback() + __newoffi,
this->egptr());
__ret = pos_type(__newoffi);
}
if ((__testout || __testboth)
&& __newoffo >= 0
&& this->egptr() - __beg >= __newoffo)
{
_M_pbump(this->pbase(), this->epptr(), __newoffo);
__ret = pos_type(__newoffo);
}
}
return __ret;
}
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
seekpos(pos_type __sp, ios_base::openmode __mode)
{
pos_type __ret = pos_type(off_type(-1));
const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
#pragma empty_line
const char_type* __beg = __testin ? this->eback() : this->pbase();
if ((__beg || !off_type(__sp)) && (__testin || __testout))
{
_M_update_egptr();
#pragma empty_line
const off_type __pos(__sp);
const bool __testpos = (0 <= __pos
&& __pos <= this->egptr() - __beg);
if (__testpos)
{
if (__testin)
this->setg(this->eback(), this->eback() + __pos,
this->egptr());
if (__testout)
_M_pbump(this->pbase(), this->epptr(), __pos);
__ret = __sp;
}
}
return __ret;
}
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
void
basic_stringbuf<_CharT, _Traits, _Alloc>::
_M_sync(char_type* __base, __size_type __i, __size_type __o)
{
const bool __testin = _M_mode & ios_base::in;
const bool __testout = _M_mode & ios_base::out;
char_type* __endg = __base + _M_string.size();
char_type* __endp = __base + _M_string.capacity();
#pragma empty_line
if (__base != _M_string.data())
{
#pragma empty_line
__endg += __i;
__i = 0;
__endp = __endg;
}
#pragma empty_line
if (__testin)
this->setg(__base, __base + __i, __endg);
if (__testout)
{
_M_pbump(__base, __endp, __o);
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (!__testin)
this->setg(__endg, __endg, __endg);
}
}
#pragma empty_line
template <class _CharT, class _Traits, class _Alloc>
void
basic_stringbuf<_CharT, _Traits, _Alloc>::
_M_pbump(char_type* __pbeg, char_type* __pend, off_type __off)
{
this->setp(__pbeg, __pend);
while (__off > __gnu_cxx::__numeric_traits<int>::__max)
{
this->pbump(__gnu_cxx::__numeric_traits<int>::__max);
__off -= __gnu_cxx::__numeric_traits<int>::__max;
}
this->pbump(__off);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern template class basic_stringbuf<char>;
extern template class basic_istringstream<char>;
extern template class basic_ostringstream<char>;
extern template class basic_stringstream<char>;
#pragma empty_line
#pragma empty_line
extern template class basic_stringbuf<wchar_t>;
extern template class basic_istringstream<wchar_t>;
extern template class basic_ostringstream<wchar_t>;
extern template class basic_stringstream<wchar_t>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 581 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/sstream" 2 3
#pragma line 128 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h" 2
#pragma empty_line
template<int _AP_W, bool _AP_S, bool _AP_C = _AP_W <= 64> class ap_private;
namespace ap_private_ops {
#pragma empty_line
inline uint32_t Hi_32(uint64_t Value) {
return static_cast<uint32_t>(Value >> 32);
}
#pragma empty_line
#pragma empty_line
inline uint32_t Lo_32(uint64_t Value) {
return static_cast<uint32_t>(Value);
}
#pragma empty_line
template<int _AP_W>
inline bool isNegative(const ap_private<_AP_W, false>& a) {
return false;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W>
inline bool isNegative(const ap_private<_AP_W, true>& a) {
enum {APINT_BITS_PER_WORD=64,_AP_N=(_AP_W+APINT_BITS_PER_WORD-1)/APINT_BITS_PER_WORD};
static const uint64_t sign_mask = 1ULL << ((_AP_W - 1) %APINT_BITS_PER_WORD);
return (sign_mask & a.get_pVal(_AP_N-1)) != 0;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline unsigned CountLeadingZeros_32(uint32_t Value) {
unsigned Count;
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (Value == 0) return 32;
#pragma empty_line
Count = __builtin_clz(Value);
#pragma line 179 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
return Count;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline unsigned CountLeadingZeros_64(uint64_t Value) {
unsigned Count;
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (!Value) return 64;
#pragma empty_line
Count = __builtin_clzll(Value);
#pragma line 223 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
return Count;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline unsigned CountTrailingZeros_64(uint64_t Value) {
#pragma empty_line
return (Value != 0) ? __builtin_ctzll(Value) : 64;
#pragma line 243 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline unsigned CountPopulation_64(uint64_t Value) {
#pragma empty_line
return __builtin_popcountll(Value);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
static inline uint32_t countLeadingOnes_64(uint64_t __V, uint32_t skip) {
uint32_t Count = 0;
if (skip)
(__V) <<= (skip);
while (__V && (__V & (1ULL << 63))) {
Count++;
(__V) <<= 1;
}
return Count;
}
#pragma empty_line
static inline std::string oct2Bin(char oct) {
switch (oct) {
case '\0': {
return "";
}
case '.': {
return ".";
}
case '0': {
return "000";
}
case '1': {
return "001";
}
case '2': {
return "010";
}
case '3': {
return "011";
}
case '4': {
return "100";
}
case '5': {
return "101";
}
case '6': {
return "110";
}
case '7': {
return "111";
}
}
#pragma empty_line
((0 && "Invalid character in digit string") ? (void)0 : _assert("0 && \"Invalid character in digit string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 303));
return "";
}
#pragma empty_line
static inline std::string hex2Bin(char hex) {
switch (hex) {
case '\0': {
return "";
}
case '.': {
return ".";
}
case '0': {
return "0000";
}
case '1': {
return "0001";
}
case '2': {
return "0010";
}
case '3': {
return "0011";
}
case '4': {
return "0100";
}
case '5': {
return "0101";
}
case '6': {
return "0110";
}
case '7': {
return "0111";
}
case '8': {
return "1000";
}
case '9': {
return "1001";
}
case 'A':
case 'a': {
return "1010";
}
case 'B':
case 'b': {
return "1011";
}
case 'C':
case 'c': {
return "1100";
}
case 'D':
case 'd': {
return "1101";
}
case 'E':
case 'e': {
return "1110";
}
case 'F':
case 'f': {
return "1111";
}
}
((0 && "Invalid character in digit string") ? (void)0 : _assert("0 && \"Invalid character in digit string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 370));
return "";
}
#pragma empty_line
static inline uint32_t decode_digit(char cdigit, int radix) {
uint32_t digit;
if (radix == 16) {
#pragma empty_line
#pragma empty_line
if (!(((cdigit) >= '0' && (cdigit) <= '9') || ((cdigit) >= 'a' && (cdigit) <= 'f') || ((cdigit) >= 'A' && (cdigit) <= 'F')))
((0 && "Invalid hex digit in string") ? (void)0 : _assert("0 && \"Invalid hex digit in string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 380));
if (((cdigit) >= '0' && (cdigit) <= '9'))
digit = cdigit - '0';
else if (cdigit >= 'a')
digit = cdigit - 'a' + 10;
else if (cdigit >= 'A')
digit = cdigit - 'A' + 10;
else
((0 && "huh? we shouldn't get here") ? (void)0 : _assert("0 && \"huh? we shouldn't get here\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 388));
} else if (((cdigit) >= '0' && (cdigit) <= '9')) {
digit = cdigit - '0';
} else {
((0 && "Invalid character in digit string") ? (void)0 : _assert("0 && \"Invalid character in digit string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 392));
}
#pragma empty_line
#pragma empty_line
return digit;
}
#pragma empty_line
#pragma empty_line
static inline std::string parseString(const std::string& input, int& radix) {
#pragma empty_line
size_t len = input.length();
if(len == 0) return input;
#pragma empty_line
size_t startPos = 0;
#pragma empty_line
while(input[startPos] == ' ' && startPos < len) startPos++;
while(input[len-1] == ' ' && startPos < len) len--;
#pragma empty_line
std::string val = input.substr(startPos, len-startPos);
#pragma empty_line
len = val.length();
startPos = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (len < 2)
return val;
#pragma empty_line
bool isNegative = false;
std::string ans;
#pragma empty_line
#pragma empty_line
if (val[0] == '-') {
ans = "-";
++startPos;
isNegative = true;
} else if (val[0] == '+')
++startPos;
#pragma empty_line
if (len - startPos < 2)
return val;
#pragma empty_line
if (val.substr(startPos, 2) == "0x" || val.substr(startPos, 2) == "0X") {
#pragma empty_line
radix = 16;
startPos += 2;
} else if (val.substr(startPos, 2) == "0b" || val.substr(startPos, 2) == "0B") {
#pragma empty_line
radix = 2;
startPos += 2;
} if (val.substr(startPos, 2) == "0o" || val.substr(startPos, 2) == "0O") {
#pragma empty_line
radix = 8;
startPos += 2;
}
#pragma empty_line
int exp = 0;
if (radix == 10) {
#pragma empty_line
#pragma empty_line
size_t expPos = val.find('e');
bool has_exponent = true;
if (expPos == std::string::npos)
expPos = val.find('E');
if (expPos == std::string::npos) {
#pragma empty_line
expPos = len;
has_exponent = false;
}
#pragma empty_line
#pragma empty_line
ans += val.substr(startPos, expPos-startPos);
if(has_exponent) {
#pragma empty_line
std::istringstream iss(val.substr(expPos+1, len-expPos-1));
iss >> exp;
}
} else {
#pragma empty_line
size_t expPos = val.find('p');
bool has_exponent = true;
if (expPos == std::string::npos)
expPos = val.find('P');
if (expPos == std::string::npos) {
#pragma empty_line
expPos = len;
has_exponent = false;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
((startPos <= expPos) ? (void)0 : _assert("startPos <= expPos", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 483));
#pragma empty_line
for (size_t i=startPos; i<expPos; ++i) {
if(radix == 16) {
ans += hex2Bin(val[i]);
} else if(radix == 8) {
ans += oct2Bin(val[i]);
} else {
ans += val[i];
}
}
#pragma empty_line
radix = 2;
if (has_exponent) {
#pragma empty_line
std::istringstream iss(val.substr(expPos+1, len-expPos-1));
iss >> exp;
}
}
if (exp == 0)
return ans;
#pragma empty_line
size_t decPos = ans.find('.');
if (decPos == std::string::npos)
decPos = ans.length();
if ((int) decPos + exp >= (int) ans.length()) {
int i = decPos;
for (; i< (int) ans.length()-1; ++i)
ans[i] = ans[i+1];
for (; i< (int) ans.length(); ++i)
ans[i] = '0';
for (; i< (int) decPos + exp; ++i)
ans += '0';
return ans;
} else if ((int) decPos + exp < (int) isNegative) {
std::string dupAns = "0.";
if (ans[0] == '-')
dupAns = "-0.";
for (int i=0; i<isNegative-(int)decPos-exp; ++i)
dupAns += '0';
for (size_t i=isNegative; i< ans.length(); ++i)
if (ans[i] != '.')
dupAns += ans[i];
return dupAns;
}
#pragma empty_line
if (exp > 0)
for (size_t i=decPos; i<decPos+exp; ++i)
ans[i] = ans[i+1];
else {
if (decPos == ans.length())
ans += ' ';
for (int i=decPos; i>(int)decPos+exp; --i)
ans[i] = ans[i-1];
}
ans[decPos+exp] = '.';
return ans;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool sub_1(uint64_t x[], uint32_t len, uint64_t y) {
for (uint32_t i = 0; i < len; ++i) {
uint64_t __X = x[i];
x[i] -= y;
if (y > __X)
y = 1;
else {
y = 0;
break;
}
}
return (y != 0);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static inline bool add_1(uint64_t dest[], uint64_t x[], uint32_t len, uint64_t y) {
for (uint32_t i = 0; i < len; ++i) {
dest[i] = y + x[i];
if (dest[i] < y)
y = 1;
else {
y = 0;
break;
}
}
return (y != 0);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static inline bool add(uint64_t *dest, const uint64_t *x, const uint64_t *y,
uint32_t destlen, uint32_t xlen, uint32_t ylen, bool xsigned, bool ysigned) {
bool carry = false;
uint32_t len = AESL_std::min(xlen, ylen);
uint32_t i;
for (i = 0; i< len && i < destlen; ++i) {
uint64_t limit = AESL_std::min(x[i],y[i]);
dest[i] = x[i] + y[i] + carry;
carry = dest[i] < limit || (carry && dest[i] == limit);
}
if (xlen > ylen) {
const uint64_t yext = ysigned && int64_t(y[ylen-1])<0 ? -1 : 0;
for (i=ylen; i< xlen && i < destlen; i++) {
uint64_t limit = AESL_std::min(x[i], yext);
dest[i] = x[i] + yext + carry;
carry = (dest[i] < limit)||(carry && dest[i] == x[i]);
}
} else if (ylen> xlen) {
const uint64_t xext = xsigned && int64_t(x[xlen-1])<0 ? -1 : 0;
for (i=xlen; i< ylen && i < destlen; i++) {
uint64_t limit = AESL_std::min(xext, y[i]);
dest[i] = xext + y[i] + carry;
carry = (dest[i] < limit)||(carry && dest[i] == y[i]);
}
}
return carry;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
static inline bool sub(uint64_t *dest, const uint64_t *x, const uint64_t *y,
uint32_t destlen, uint32_t xlen, uint32_t ylen, bool xsigned, bool ysigned) {
bool borrow = false;
uint32_t i;
uint32_t len = AESL_std::min(xlen, ylen);
for (i = 0; i < len && i < destlen; ++i) {
uint64_t x_tmp = borrow ? x[i] - 1 : x[i];
borrow = y[i] > x_tmp || (borrow && x[i] == 0);
dest[i] = x_tmp - y[i];
}
if (xlen > ylen) {
const uint64_t yext = ysigned && int64_t(y[ylen-1])<0 ? -1 : 0;
for (i=ylen; i< xlen && i < destlen; i++) {
uint64_t x_tmp = borrow ? x[i] - 1 : x[i];
borrow = yext > x_tmp || (borrow && x[i] == 0);
dest[i] = x_tmp - yext;
}
} else if (ylen> xlen) {
const uint64_t xext = xsigned && int64_t(x[xlen-1])<0 ? -1 : 0;
for (i=xlen; i< ylen && i < destlen; i++) {
uint64_t x_tmp = borrow ? xext - 1 : xext;
borrow = y[i] > x_tmp || (borrow && xext==0);
dest[i] = x_tmp - y[i];
}
}
return borrow;
}
#pragma line 649 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
static inline uint64_t mul_1(uint64_t dest[], const uint64_t x[], uint32_t len, uint64_t y) {
#pragma empty_line
uint64_t ly = y & 0xffffffffULL, hy = (y) >> 32;
uint64_t carry = 0;
static const uint64_t two_power_32 = 1ULL << 32;
#pragma empty_line
for (uint32_t i = 0; i < len; ++i) {
#pragma empty_line
uint64_t lx = x[i] & 0xffffffffULL;
uint64_t hx = (x[i]) >> 32;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint8_t hasCarry = 0;
dest[i] = carry + lx * ly;
#pragma empty_line
hasCarry = (dest[i] < carry) ? 1 : 0;
carry = hx * ly + ((dest[i]) >> 32) + (hasCarry ? two_power_32 : 0);
#pragma empty_line
#pragma empty_line
hasCarry = (!carry && hasCarry) ? 1 : (!carry ? 2 : 0);
#pragma empty_line
carry += (lx * hy) & 0xffffffffULL;
dest[i] = ((carry) << 32) | (dest[i] & 0xffffffffULL);
carry = (((!carry && hasCarry != 2) || hasCarry == 1) ? two_power_32 : 0) +
((carry) >> 32) + ((lx * hy) >> 32) + hx * hy;
}
return carry;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static inline void mul(uint64_t dest[], const uint64_t x[], uint32_t xlen, const uint64_t y[],
uint32_t ylen, uint32_t destlen) {
((xlen > 0) ? (void)0 : _assert("xlen > 0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 687));
((ylen > 0) ? (void)0 : _assert("ylen > 0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 688));
((destlen >= xlen + ylen) ? (void)0 : _assert("destlen >= xlen + ylen", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 689));
if(xlen < destlen)
dest[xlen] = mul_1(dest, x, xlen, y[0]);
for (uint32_t i = 1; i < ylen; ++i) {
uint64_t ly = y[i] & 0xffffffffULL, hy = (y[i]) >> 32;
uint64_t carry = 0, lx = 0, hx = 0;
for (uint32_t j = 0; j < xlen; ++j) {
lx = x[j] & 0xffffffffULL;
hx = (x[j]) >> 32;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint8_t hasCarry = 0;
uint64_t resul = carry + lx * ly;
hasCarry = (resul < carry) ? 1 : 0;
carry = (hasCarry ? (1ULL << 32) : 0) + hx * ly + ((resul) >> 32);
hasCarry = (!carry && hasCarry) ? 1 : (!carry ? 2 : 0);
carry += (lx * hy) & 0xffffffffULL;
resul = ((carry) << 32) | (resul & 0xffffffffULL);
if(i+j < destlen)
dest[i+j] += resul;
carry = (((!carry && hasCarry != 2) || hasCarry == 1) ? (1ULL << 32) : 0)+
((carry) >> 32) + (dest[i+j] < resul ? 1 : 0) +
((lx * hy) >> 32) + hx * hy;
}
if (i+xlen < destlen)
dest[i+xlen] = carry;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static inline void KnuthDiv(uint32_t *u, uint32_t *v, uint32_t *q, uint32_t* r,
uint32_t m, uint32_t n) {
((u && "Must provide dividend") ? (void)0 : _assert("u && \"Must provide dividend\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 726));
((v && "Must provide divisor") ? (void)0 : _assert("v && \"Must provide divisor\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 727));
((q && "Must provide quotient") ? (void)0 : _assert("q && \"Must provide quotient\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 728));
((u != v && u != q && v != q && "Must us different memory") ? (void)0 : _assert("u != v && u != q && v != q && \"Must us different memory\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 729));
((n>1 && "n must be > 1") ? (void)0 : _assert("n>1 && \"n must be > 1\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 730));
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t b = uint64_t(1) << 32;
#pragma line 750 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
uint32_t shift = CountLeadingZeros_32(v[n-1]);
uint32_t v_carry = 0;
uint32_t u_carry = 0;
if (shift) {
for (uint32_t i = 0; i < m+n; ++i) {
uint32_t u_tmp = (u[i]) >> (32 - shift);
u[i] = ((u[i]) << (shift)) | u_carry;
u_carry = u_tmp;
}
for (uint32_t i = 0; i < n; ++i) {
uint32_t v_tmp = (v[i]) >> (32 - shift);
v[i] = ((v[i]) << (shift)) | v_carry;
v_carry = v_tmp;
}
}
u[m+n] = u_carry;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int j = m;
do {
#pragma line 784 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
uint64_t dividend = ((uint64_t(u[j+n]) << 32) + u[j+n-1]);
#pragma empty_line
uint64_t qp = dividend / v[n-1];
uint64_t rp = dividend % v[n-1];
if (qp == b || qp*v[n-2] > b*rp + u[j+n-2]) {
qp--;
rp += v[n-1];
if (rp < b && (qp == b || qp*v[n-2] > b*rp + u[j+n-2]))
qp--;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool isNeg = false;
for (uint32_t i = 0; i < n; ++i) {
uint64_t u_tmp = uint64_t(u[j+i]) | ((uint64_t(u[j+i+1])) << 32);
uint64_t subtrahend = uint64_t(qp) * uint64_t(v[i]);
bool borrow = subtrahend > u_tmp;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t result = u_tmp - subtrahend;
uint32_t k = j + i;
u[k++] = (uint32_t)(result & (b-1));
u[k++] = (uint32_t)((result) >> 32);
while (borrow && k <= m+n) {
borrow = u[k] == 0;
u[k]--;
k++;
}
isNeg |= borrow;
#pragma empty_line
#pragma empty_line
}
#pragma line 830 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
if (isNeg) {
bool carry = true;
for (uint32_t i = 0; i <= m+n; ++i) {
u[i] = ~u[i] + carry;
carry = carry && u[i] == 0;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
q[j] = (uint32_t)qp;
if (isNeg) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
q[j]--;
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool carry = false;
for (uint32_t i = 0; i < n; i++) {
uint32_t limit = AESL_std::min(u[j+i],v[i]);
u[j+i] += v[i] + carry;
carry = u[j+i] < limit || (carry && u[j+i] == limit);
}
u[j+n] += carry;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
} while (--j >= 0);
#pragma line 874 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
if (r) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shift) {
uint32_t carry = 0;
#pragma empty_line
for (int i = n-1; i >= 0; i--) {
r[i] = ((u[i]) >> (shift)) | carry;
carry = (u[i]) << (32 - shift);
#pragma empty_line
}
} else {
for (int i = n-1; i >= 0; i--) {
r[i] = u[i];
#pragma empty_line
}
}
#pragma empty_line
}
#pragma empty_line
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
void divide(const ap_private<_AP_W, _AP_S>& LHS, uint32_t lhsWords,
const ap_private<_AP_W, _AP_S>& RHS, uint32_t rhsWords,
ap_private<_AP_W, _AP_S> *Quotient, ap_private<_AP_W, _AP_S> *Remainder) {
((lhsWords >= rhsWords && "Fractional result") ? (void)0 : _assert("lhsWords >= rhsWords && \"Fractional result\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 901));
enum {APINT_BITS_PER_WORD=64};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t mask = ~0ull >> (sizeof(uint32_t)*8);
uint32_t n = rhsWords * 2;
uint32_t m = (lhsWords * 2) - n;
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint32_t SPACE[128];
uint32_t *__U = 0;
uint32_t *__V = 0;
uint32_t *__Q = 0;
uint32_t *__R = 0;
if ((Remainder?4:3)*n+2*m+1 <= 128) {
__U = &SPACE[0];
__V = &SPACE[m+n+1];
__Q = &SPACE[(m+n+1) + n];
if (Remainder)
__R = &SPACE[(m+n+1) + n + (m+n)];
} else {
__U = new uint32_t[m + n + 1];
__V = new uint32_t[n];
__Q = new uint32_t[m+n];
if (Remainder)
__R = new uint32_t[n];
}
#pragma empty_line
#pragma empty_line
memset(__U, 0, (m+n+1)*sizeof(uint32_t));
for (unsigned i = 0; i < lhsWords; ++i) {
uint64_t tmp = LHS.get_pVal(i);
__U[i * 2] = (uint32_t)(tmp & mask);
__U[i * 2 + 1] = (tmp) >> (sizeof(uint32_t)*8);
}
__U[m+n] = 0;
#pragma empty_line
#pragma empty_line
memset(__V, 0, (n)*sizeof(uint32_t));
for (unsigned i = 0; i < rhsWords; ++i) {
uint64_t tmp = RHS.get_pVal(i);
__V[i * 2] = (uint32_t)(tmp & mask);
__V[i * 2 + 1] = (tmp) >> (sizeof(uint32_t)*8);
}
#pragma empty_line
#pragma empty_line
memset(__Q, 0, (m+n) * sizeof(uint32_t));
if (Remainder)
memset(__R, 0, n * sizeof(uint32_t));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
for (unsigned i = n; i > 0 && __V[i-1] == 0; i--) {
n--;
m++;
}
for (unsigned i = m+n; i > 0 && __U[i-1] == 0; i--)
m--;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
((n != 0 && "Divide by zero?") ? (void)0 : _assert("n != 0 && \"Divide by zero?\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 974));
if (n == 1) {
uint32_t divisor = __V[0];
uint32_t remainder = 0;
for (int i = m+n-1; i >= 0; i--) {
uint64_t partial_dividend = (uint64_t(remainder)) << 32 | __U[i];
if (partial_dividend == 0) {
__Q[i] = 0;
remainder = 0;
} else if (partial_dividend < divisor) {
__Q[i] = 0;
remainder = (uint32_t)partial_dividend;
} else if (partial_dividend == divisor) {
__Q[i] = 1;
remainder = 0;
} else {
__Q[i] = (uint32_t)(partial_dividend / divisor);
remainder = (uint32_t)(partial_dividend - (__Q[i] * divisor));
}
}
if (__R)
__R[0] = remainder;
} else {
#pragma empty_line
#pragma empty_line
KnuthDiv(__U, __V, __Q, __R, m, n);
}
#pragma empty_line
#pragma empty_line
if (Quotient) {
#pragma empty_line
if (Quotient->BitWidth != LHS.BitWidth) {
if (Quotient->isSingleWord())
Quotient->set_VAL(0);
} else
Quotient->clear();
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (lhsWords == 1) {
uint64_t tmp =
uint64_t(__Q[0]) | ((uint64_t(__Q[1])) << (APINT_BITS_PER_WORD / 2));
Quotient->set_VAL(tmp);
} else {
((!Quotient->isSingleWord() && "Quotient ap_private not large enough") ? (void)0 : _assert("!Quotient->isSingleWord() && \"Quotient ap_private not large enough\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1018));
for (unsigned i = 0; i < lhsWords; ++i)
Quotient->set_pVal(i,
uint64_t(__Q[i*2]) | ((uint64_t(__Q[i*2+1])) << (APINT_BITS_PER_WORD / 2)));
}
Quotient->clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
if (Remainder) {
#pragma empty_line
if (Remainder->BitWidth != RHS.BitWidth) {
if (Remainder->isSingleWord())
Remainder->set_VAL(0);
} else
Remainder->clear();
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (rhsWords == 1) {
uint64_t tmp =
uint64_t(__R[0]) | ((uint64_t(__R[1])) << (APINT_BITS_PER_WORD / 2));
Remainder->set_VAL(tmp);
} else {
((!Remainder->isSingleWord() && "Remainder ap_private not large enough") ? (void)0 : _assert("!Remainder->isSingleWord() && \"Remainder ap_private not large enough\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1042));
for (unsigned i = 0; i < rhsWords; ++i)
Remainder->set_pVal(i,
uint64_t(__R[i*2]) | ((uint64_t(__R[i*2+1])) << (APINT_BITS_PER_WORD / 2)));
}
Remainder->clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
if (__U != &SPACE[0]) {
delete [] __U;
delete [] __V;
delete [] __Q;
delete [] __R;
}
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
void divide(const ap_private<_AP_W, _AP_S>& LHS, uint32_t lhsWords,
uint64_t RHS,
ap_private<_AP_W, _AP_S> *Quotient, ap_private<_AP_W, _AP_S> *Remainder) {
uint32_t rhsWords=1;
((lhsWords >= rhsWords && "Fractional result") ? (void)0 : _assert("lhsWords >= rhsWords && \"Fractional result\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1064));
enum {APINT_BITS_PER_WORD=64};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t mask = ~0ull >> (sizeof(uint32_t)*8);
uint32_t n = 2;
uint32_t m = (lhsWords * 2) - n;
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint32_t SPACE[128];
uint32_t *__U = 0;
uint32_t *__V = 0;
uint32_t *__Q = 0;
uint32_t *__R = 0;
if ((Remainder?4:3)*n+2*m+1 <= 128) {
__U = &SPACE[0];
__V = &SPACE[m+n+1];
__Q = &SPACE[(m+n+1) + n];
if (Remainder)
__R = &SPACE[(m+n+1) + n + (m+n)];
} else {
__U = new uint32_t[m + n + 1];
__V = new uint32_t[n];
__Q = new uint32_t[m+n];
if (Remainder)
__R = new uint32_t[n];
}
#pragma empty_line
#pragma empty_line
memset(__U, 0, (m+n+1)*sizeof(uint32_t));
for (unsigned i = 0; i < lhsWords; ++i) {
uint64_t tmp = LHS.get_pVal(i);
__U[i * 2] = tmp & mask;
__U[i * 2 + 1] = (tmp) >> (sizeof(uint32_t)*8);
}
__U[m+n] = 0;
#pragma empty_line
#pragma empty_line
memset(__V, 0, (n)*sizeof(uint32_t));
__V[0] = RHS & mask;
__V[1] = (RHS) >> (sizeof(uint32_t)*8);
#pragma empty_line
#pragma empty_line
memset(__Q, 0, (m+n) * sizeof(uint32_t));
if (Remainder)
memset(__R, 0, n * sizeof(uint32_t));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
for (unsigned i = n; i > 0 && __V[i-1] == 0; i--) {
n--;
m++;
}
for (unsigned i = m+n; i > 0 && __U[i-1] == 0; i--)
m--;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
((n != 0 && "Divide by zero?") ? (void)0 : _assert("n != 0 && \"Divide by zero?\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1134));
if (n == 1) {
uint32_t divisor = __V[0];
uint32_t remainder = 0;
for (int i = m+n-1; i >= 0; i--) {
uint64_t partial_dividend = (uint64_t(remainder)) << 32 | __U[i];
if (partial_dividend == 0) {
__Q[i] = 0;
remainder = 0;
} else if (partial_dividend < divisor) {
__Q[i] = 0;
remainder = partial_dividend;
} else if (partial_dividend == divisor) {
__Q[i] = 1;
remainder = 0;
} else {
__Q[i] = partial_dividend / divisor;
remainder = partial_dividend - (__Q[i] * divisor);
}
}
if (__R)
__R[0] = remainder;
} else {
#pragma empty_line
#pragma empty_line
KnuthDiv(__U, __V, __Q, __R, m, n);
}
#pragma empty_line
#pragma empty_line
if (Quotient) {
#pragma empty_line
if (Quotient->BitWidth != LHS.BitWidth) {
if (Quotient->isSingleWord())
Quotient->set_VAL(0);
} else
Quotient->clear();
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (lhsWords == 1) {
uint64_t tmp =
uint64_t(__Q[0]) | ((uint64_t(__Q[1])) << (APINT_BITS_PER_WORD / 2));
Quotient->set_VAL(tmp);
} else {
((!Quotient->isSingleWord() && "Quotient ap_private not large enough") ? (void)0 : _assert("!Quotient->isSingleWord() && \"Quotient ap_private not large enough\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1178));
for (unsigned i = 0; i < lhsWords; ++i)
Quotient->set_pVal(i,
uint64_t(__Q[i*2]) | ((uint64_t(__Q[i*2+1])) << (APINT_BITS_PER_WORD / 2)));
}
Quotient->clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
if (Remainder) {
#pragma empty_line
if (Remainder->BitWidth != 64 ) {
if (Remainder->isSingleWord())
Remainder->set_VAL(0);
} else
Remainder->clear();
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (rhsWords == 1) {
uint64_t tmp =
uint64_t(__R[0]) | ((uint64_t(__R[1])) << (APINT_BITS_PER_WORD / 2));
Remainder->set_VAL(tmp);
} else {
((!Remainder->isSingleWord() && "Remainder ap_private not large enough") ? (void)0 : _assert("!Remainder->isSingleWord() && \"Remainder ap_private not large enough\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1202));
for (unsigned i = 0; i < rhsWords; ++i)
Remainder->set_pVal(i,
uint64_t(__R[i*2]) | ((uint64_t(__R[i*2+1])) << (APINT_BITS_PER_WORD / 2)));
}
Remainder->clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
if (__U != &SPACE[0]) {
delete [] __U;
delete [] __V;
delete [] __Q;
delete [] __R;
}
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S, bool _AP_C> inline ap_private<_AP_W, _AP_S, _AP_C> lshr(const ap_private<_AP_W, _AP_S, _AP_C>& LHS, uint32_t shiftAmt) {
return LHS.lshr(shiftAmt);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S, bool _AP_C> inline ap_private<_AP_W, _AP_S, _AP_C> shl(const ap_private<_AP_W, _AP_S, _AP_C>& LHS, uint32_t shiftAmt) {
return LHS.shl(shiftAmt);
}
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum ap_q_mode {
AP_RND,
AP_RND_ZERO,
AP_RND_MIN_INF,
AP_RND_INF,
AP_RND_CONV,
AP_TRN,
AP_TRN_ZERO
#pragma empty_line
};
enum ap_o_mode {
AP_SAT,
AP_SAT_ZERO,
AP_SAT_SYM,
AP_WRAP,
AP_WRAP_SM
};
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q,
ap_o_mode _AP_O, int _AP_N> struct ap_fixed_base;
template<int _AP_W, int _AP_I, bool _AP_S,
ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_range_ref;
template<int _AP_W, int _AP_I, bool _AP_S,
ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_bit_ref;
#pragma empty_line
template<int _AP_W, bool _AP_S> struct ap_range_ref;
template<int _AP_W, bool _AP_S> struct ap_bit_ref;
template<int _AP_W1, typename _AP_T1, int _AP_W2, typename _AP_T2> struct ap_concat_ref;
#pragma empty_line
#pragma empty_line
enum {
MIN_INT_BITS = 1,
#pragma empty_line
MAX_INT_BITS = (1<<23)-1
#pragma empty_line
};
#pragma line 1313 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
typedef unsigned long long ap_ulong;
typedef signed long long ap_slong;
#pragma empty_line
template <int _AP_N8, bool _AP_S> struct valtype;
#pragma empty_line
template<int _AP_N8> struct valtype<_AP_N8, false> {
typedef uint64_t Type;
};
#pragma empty_line
template<int _AP_N8> struct valtype<_AP_N8, true> {
typedef int64_t Type;
};
#pragma empty_line
template<> struct valtype<1, false> {
typedef unsigned char Type;
};
template<> struct valtype<2, false> {
typedef unsigned short Type;
};
template<> struct valtype<3, false> {
typedef unsigned int Type;
};
template<> struct valtype<4, false> {
typedef unsigned int Type;
};
template<> struct valtype<1, true> {
typedef char Type;
};
template<> struct valtype<2, true> {
typedef short Type;
};
template<> struct valtype<3, true> {
typedef int Type;
};
template<> struct valtype<4, true> {
typedef int Type;
};
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S> class ap_private <_AP_W, _AP_S, true> {
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef typename valtype<(_AP_W+7)/8, _AP_S>::Type ValType;
template<int _AP_W2, bool _AP_S2>
struct RType {
enum {
mult_w = _AP_W+_AP_W2,
mult_s = _AP_S||_AP_S2,
plus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1,
plus_s = _AP_S||_AP_S2,
minus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1,
minus_s = true,
div_w = _AP_W+_AP_S2,
div_s = _AP_S||_AP_S2,
mod_w = ((_AP_W) < (_AP_W2+(!_AP_S2&&_AP_S)) ? (_AP_W) : (_AP_W2+(!_AP_S2&&_AP_S))),
mod_s = _AP_S,
logic_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2))),
logic_s = _AP_S||_AP_S2
};
typedef ap_private<mult_w, mult_s> mult;
typedef ap_private<plus_w, plus_s> plus;
typedef ap_private<minus_w, minus_s> minus;
typedef ap_private<logic_w, logic_s> logic;
typedef ap_private<div_w, div_s> div;
typedef ap_private<mod_w, mod_s> mod;
typedef ap_private<_AP_W, _AP_S> arg1;
typedef bool reduce;
};
enum { APINT_BITS_PER_WORD = sizeof(uint64_t) * 8 };
enum { excess_bits = (_AP_W%APINT_BITS_PER_WORD) ? APINT_BITS_PER_WORD -(_AP_W%APINT_BITS_PER_WORD) : 0};
static const uint64_t mask = ((uint64_t)~0ULL >> (excess_bits));
static const uint64_t not_mask = ~mask;
static const uint64_t sign_bit_mask = 1ULL << (APINT_BITS_PER_WORD-1);
template<int _AP_W1> struct sign_ext_mask { static const uint64_t mask=~0ULL<<_AP_W1;};
static const int width = _AP_W;
#pragma empty_line
#pragma empty_line
enum { BitWidth=_AP_W, _AP_N = 1, };
ValType VAL;
#pragma line 1403 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
void check_canary() {}
void set_canary() {}
#pragma empty_line
#pragma empty_line
inline ValType& get_VAL(void) {
return VAL;
}
inline ValType get_VAL(void) const{
return VAL;
}
inline ValType get_VAL(void) const volatile{
return VAL;
}
inline void set_VAL(uint64_t value) {
VAL = (ValType)value;
}
inline ValType& get_pVal(int i) {
return VAL;
}
inline ValType get_pVal(int i) const{
return VAL;
}
inline const uint64_t* get_pVal() const{
((0 && "invalid usage") ? (void)0 : _assert("0 && \"invalid usage\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1426));
return 0;
}
inline ValType get_pVal(int i) const volatile {
return VAL;
}
inline uint64_t* get_pVal() const volatile {
((0 && "invalid usage") ? (void)0 : _assert("0 && \"invalid usage\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1433));
return 0;
}
inline void set_pVal(int i, uint64_t value) {
VAL = (ValType)value;
}
#pragma empty_line
inline uint32_t getBitWidth() const {
return BitWidth;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private<_AP_W, _AP_S>& operator=(const ap_private<_AP_W1, _AP_S1>& RHS) {
VAL = (ValType)(RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private<_AP_W, _AP_S>& operator=(const volatile ap_private<_AP_W1, _AP_S1>& RHS) {
VAL = (ValType)(RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
void operator=(const ap_private& RHS) volatile {
#pragma empty_line
VAL = RHS.get_VAL();
}
ap_private& operator=(const ap_private& RHS) {
#pragma empty_line
VAL = RHS.get_VAL();
return *this;
}
#pragma empty_line
void operator=(const volatile ap_private& RHS) volatile {
#pragma empty_line
VAL = RHS.get_VAL();
}
ap_private& operator=(const volatile ap_private& RHS) {
#pragma empty_line
VAL = RHS.get_VAL();
return *this;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private& operator = (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
*this = ap_private<_AP_W2, false>(op2);
return *this;
}
#pragma empty_line
private:
explicit inline ap_private(uint64_t* val):VAL(val[0]) {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
inline bool isSingleWord() const { return true; }
#pragma empty_line
inline void fromString(const char *strStart, uint32_t slen,
uint8_t radix) {
#pragma empty_line
(((radix == 10 || radix == 8 || radix == 16 || radix == 2) && "Radix should be 2, 8, 10, or 16!") ? (void)0 : _assert("(radix == 10 || radix == 8 || radix == 16 || radix == 2) && \"Radix should be 2, 8, 10, or 16!\"",
"F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
#pragma line 1497 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
,
1498
#pragma line 1497 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
))
;
((strStart && "String is null?") ? (void)0 : _assert("strStart && \"String is null?\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1499));
uint64_t tmpVAL = VAL;
bool isNeg = false;
if (*strStart == '-') {
isNeg = true;
strStart++;
}
switch(radix) {
case 2:
#pragma empty_line
#pragma empty_line
for (;*strStart; ++strStart) {
(((*strStart=='0'|| *strStart=='1')&&("Wrong binary number")) ? (void)0 : _assert("(*strStart=='0'|| *strStart=='1')&&(\"Wrong binary number\")", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1511));
tmpVAL <<=1;
tmpVAL |= (*strStart-'0');
}
break;
case 8:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
sscanf(strStart,"%I64o",&tmpVAL);
#pragma line 1533 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
break;
case 10:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
sscanf(strStart,"%I64u",&tmpVAL);
#pragma line 1551 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
break;
case 16:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
sscanf(strStart,"%I64x",&tmpVAL);
#pragma line 1569 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
break;
default:
((true && "Unknown radix") ? (void)0 : _assert("true && \"Unknown radix\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1571));
#pragma empty_line
}
VAL = isNeg ? (ValType)(-tmpVAL) : (ValType) (tmpVAL);
#pragma empty_line
clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
ap_private(const std::string& val, uint8_t radix=2): VAL(0) {
((!val.empty() && "String empty?") ? (void)0 : _assert("!val.empty() && \"String empty?\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 1581));
set_canary();
fromString(val.c_str(), val.size(), radix);
check_canary();
}
#pragma empty_line
ap_private(const char strStart[], uint32_t slen, uint8_t radix) : VAL(0) {
set_canary();
fromString(strStart, slen, radix);
check_canary();
}
#pragma empty_line
ap_private(uint32_t numWords, const uint64_t bigVal[]): VAL(bigVal[0]) {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
#pragma empty_line
public:
inline ap_private() {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private(int v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(bool v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(signed char v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(unsigned char v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(short v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(unsigned short v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(unsigned int v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(long v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(unsigned long v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(unsigned long long v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(long long v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(float v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
inline ap_private(double v) : VAL((ValType)v) { set_canary(); clearUnusedBits(); check_canary(); }
#pragma empty_line
ap_private(const ap_private& that) : VAL(that.get_VAL()) {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
ap_private(const ap_private<_AP_W, !_AP_S>& that) : VAL(that.get_VAL()) {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private(const ap_private<_AP_W1, _AP_S1>& that) : VAL((ValType)that.get_VAL()) {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private(const volatile ap_private<_AP_W1, _AP_S1>& that) : VAL((ValType)that.get_VAL()) {
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
explicit ap_private(const char* val) {
set_canary();
int radix = 10;
std::string str = ap_private_ops::parseString(val, radix);
std::string::size_type pos = str.find('.');
#pragma empty_line
if (pos != std::string::npos)
str = str.substr(pos);
#pragma empty_line
ap_private<_AP_W, _AP_S> ap_private_val(str, radix);
operator = (ap_private_val);
check_canary();
}
#pragma empty_line
ap_private(const char* val, signed char rd) {
set_canary();
int radix = rd;
std::string str = ap_private_ops::parseString(val, radix);;
std::string::size_type pos = str.find('.');
#pragma empty_line
if (pos != std::string::npos)
str = str.substr(pos);
#pragma empty_line
ap_private<_AP_W, _AP_S> ap_private_val(str, radix);
operator = (ap_private_val);
check_canary();
}
#pragma empty_line
~ap_private() {check_canary();}
#pragma empty_line
inline bool isNegative() const {
static const uint64_t sign_mask = 1ULL << (_AP_W-1);
return _AP_S && (sign_mask & VAL);
}
#pragma empty_line
inline bool isPositive() const {
return !isNegative();
}
#pragma empty_line
inline bool isStrictlyPositive() const {
return !isNegative() && VAL!=0;
}
#pragma empty_line
inline bool isAllOnesValue() const {
return (mask & VAL) == mask;
}
#pragma empty_line
inline bool operator==(const ap_private<_AP_W, _AP_S>& RHS) const { return VAL == RHS.get_VAL(); }
inline bool operator==(const ap_private<_AP_W, !_AP_S>& RHS) const { return (uint64_t)VAL == (uint64_t)RHS.get_VAL(); }
#pragma empty_line
inline bool operator==(uint64_t Val) const { return ((uint64_t)VAL == Val); }
inline bool operator!=(uint64_t Val) const { return ((uint64_t)VAL != Val); }
inline bool operator!=(const ap_private<_AP_W, _AP_S>& RHS) const { return VAL != RHS.get_VAL(); }
inline bool operator!=(const ap_private<_AP_W, !_AP_S>& RHS) const { return (uint64_t)VAL != (uint64_t)RHS.get_VAL(); }
const ap_private operator++() { ++VAL; clearUnusedBits(); return *this; }
const ap_private operator--(int) {
ap_private orig(*this);
--VAL; clearUnusedBits();
return orig;
}
const ap_private operator--() { --VAL; clearUnusedBits(); return *this;}
inline bool operator !() const { return !VAL;}
#pragma empty_line
const ap_private operator++(int) {
ap_private orig(*this);
VAL++; clearUnusedBits();
return orig;
}
#pragma empty_line
inline ap_private<((64) < (_AP_W + 1) ? (64) : (_AP_W + 1)), true>
operator-() const {
return ap_private<1,false>(0) - (*this);
}
#pragma empty_line
inline std::string toString(uint8_t radix, bool wantSigned) const ;
inline std::string toStringUnsigned(uint8_t radix = 10) const {
return toString(radix, false);
}
inline std::string toStringSigned(uint8_t radix = 10) const {
return toString(radix, true);
}
inline void clear() {
VAL=0;
}
inline ap_private& clear(uint32_t bitPosition) { VAL &= ~(1ULL<<(bitPosition)); clearUnusedBits(); return *this;}
#pragma empty_line
inline ap_private ashr(uint32_t shiftAmt) const {
if (_AP_S)
return ap_private((shiftAmt == BitWidth) ? 0 : ((int64_t)VAL) >> (shiftAmt));
else
return ap_private((shiftAmt == BitWidth) ? 0 : ((uint64_t)VAL) >> (shiftAmt));
}
#pragma empty_line
inline ap_private lshr(uint32_t shiftAmt) const {
return ap_private((shiftAmt == BitWidth) ? ap_private(0) : ap_private((VAL&mask) >> (shiftAmt)));
}
#pragma empty_line
inline ap_private shl(uint32_t shiftAmt) const {
if (shiftAmt > BitWidth) {
if (!isNegative())
return ap_private(0);
else return ap_private(-1);
}
if (shiftAmt == BitWidth) return ap_private(0);
else return ap_private((VAL) << (shiftAmt));
#pragma empty_line
}
#pragma empty_line
inline int64_t getSExtValue() const {
return VAL;
}
#pragma empty_line
inline uint64_t getZExtValue() const {
return VAL & mask;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private(const ap_range_ref<_AP_W2,_AP_S2>& ref) {
set_canary();
*this=ref.get();
check_canary();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private(const ap_bit_ref<_AP_W2,_AP_S2>& ref) {
set_canary();
*this = ((uint64_t)(bool)ref);
check_canary();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private(const ap_concat_ref<_AP_W2, _AP_T2,_AP_W3, _AP_T3>& ref) {
set_canary();
*this=ref.get();
check_canary();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_private(const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2> &val) {
set_canary();
*this = ((val.operator ap_private<_AP_W2, false> ()));
check_canary();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_private(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2> &val) {
set_canary();
*this = (uint64_t)(bool)val;
check_canary();
}
#pragma empty_line
inline void write(const ap_private<_AP_W, _AP_S>& op2) volatile {
*this = (op2);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
operator ValType () const {
return get_VAL();
}
#pragma empty_line
inline int to_uchar() const {
return (unsigned char) get_VAL();
}
#pragma empty_line
inline int to_char() const {
return (char) get_VAL();
}
#pragma empty_line
inline int to_ushort() const {
return (unsigned short) get_VAL();
}
#pragma empty_line
inline int to_short() const {
return (short) get_VAL();
}
#pragma empty_line
inline int to_int() const {
#pragma empty_line
return (int) get_VAL();
}
#pragma empty_line
inline unsigned to_uint() const {
return (unsigned) get_VAL();
}
#pragma empty_line
inline long to_long() const {
return (long) get_VAL();
}
#pragma empty_line
inline unsigned long to_ulong() const {
return (unsigned long) get_VAL();
}
#pragma empty_line
inline ap_slong to_int64() const {
return (ap_slong) get_VAL();
}
#pragma empty_line
inline ap_ulong to_uint64() const {
return (ap_ulong) get_VAL();
}
#pragma empty_line
inline double to_double() const {
if (isNegative())
return roundToDouble(true);
else
return roundToDouble(false);
}
#pragma empty_line
inline unsigned length() const { return _AP_W; }
#pragma empty_line
inline bool isMinValue() const { return VAL == 0;}
template<int _AP_W1, bool _AP_S1> inline ap_private& operator&=(const ap_private<_AP_W1, _AP_S1>& RHS) {
VAL = (ValType)(((uint64_t)VAL)&RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline ap_private& operator|=(const ap_private<_AP_W1, _AP_S1>& RHS) {
VAL = (ValType)(((uint64_t)VAL)|RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline ap_private& operator^=(const ap_private<_AP_W1, _AP_S1>& RHS){
VAL = (ValType)(((uint64_t)VAL)^RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline ap_private& operator*=(const ap_private<_AP_W1, _AP_S1>& RHS){
VAL = (ValType)(((uint64_t)VAL)*RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline ap_private& operator+=(const ap_private<_AP_W1, _AP_S1>& RHS){
VAL = (ValType)(((uint64_t)VAL)+RHS.get_VAL());
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline ap_private& operator-=(const ap_private<_AP_W1, _AP_S1>& RHS){
VAL = (ValType)(((uint64_t)VAL)-RHS.get_VAL());
clearUnusedBits();
return *this;
}
inline const ap_private& operator<<=(uint32_t shiftAmt) { VAL<<=shiftAmt; clearUnusedBits(); return *this; }
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline typename RType<_AP_W1, _AP_S1>::logic operator&(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (RType<_AP_W1, _AP_S1>::logic_w <= 64) {
typename RType<_AP_W1, _AP_S1>::logic Ret(((uint64_t)VAL) & RHS.get_VAL());
return Ret;
} else {
typename RType<_AP_W1, _AP_S1>::logic Ret = *this;
return Ret & RHS;
}
}
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline typename RType<_AP_W1, _AP_S1>::logic operator^(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (RType<_AP_W1, _AP_S1>::logic_w <= 64) {
typename RType<_AP_W1, _AP_S1>::logic Ret(((uint64_t)VAL) ^ RHS.get_VAL());
return Ret;
} else {
typename RType<_AP_W1, _AP_S1>::logic Ret = *this;
return Ret ^ RHS;
}
}
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline typename RType<_AP_W1, _AP_S1>::logic operator|(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (RType<_AP_W1, _AP_S1>::logic_w <= 64) {
typename RType<_AP_W1, _AP_S1>::logic Ret(((uint64_t)VAL) | RHS.get_VAL());
return Ret;
} else {
typename RType<_AP_W1, _AP_S1>::logic Ret = *this;
return Ret | RHS;
}
}
#pragma empty_line
inline ap_private And(const ap_private& RHS) const {
return ap_private(VAL & RHS.get_VAL());
}
#pragma empty_line
inline ap_private Or(const ap_private& RHS) const {
return ap_private(VAL | RHS.get_VAL());
}
#pragma empty_line
inline ap_private Xor(const ap_private& RHS) const {
return ap_private(VAL ^ RHS.get_VAL());
}
#pragma empty_line
template <int _AP_W1, bool _AP_S1>
inline typename RType<_AP_W1, _AP_S1>::mult operator*(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (RType<_AP_W1, _AP_S1>::mult_w <= 64) {
typename RType<_AP_W1, _AP_S1>::mult Result(((uint64_t)VAL) * RHS.get_VAL());
return Result;
} else {
typename RType<_AP_W1, _AP_S1>::mult Result(*this);
Result *= RHS;
return Result;
}
}
#pragma empty_line
inline ap_private Mul(const ap_private& RHS) const {
return ap_private(VAL * RHS.get_VAL());
}
#pragma empty_line
inline ap_private Add(const ap_private& RHS) const {
return ap_private(VAL + RHS.get_VAL());
}
#pragma empty_line
inline ap_private Sub(const ap_private& RHS) const {
return ap_private(VAL - RHS.get_VAL());
}
#pragma empty_line
#pragma empty_line
inline ap_private& operator&=(uint64_t RHS) { VAL &= (ValType)RHS; clearUnusedBits(); return *this;}
inline ap_private& operator|=(uint64_t RHS) { VAL |= (ValType)RHS; clearUnusedBits(); return *this;}
inline ap_private& operator^=(uint64_t RHS){ VAL ^= (ValType)RHS; clearUnusedBits(); return *this;}
inline ap_private& operator*=(uint64_t RHS){ VAL *= (ValType)RHS; clearUnusedBits(); return *this; }
inline ap_private& operator+=(uint64_t RHS){ VAL += (ValType)RHS; clearUnusedBits(); return *this;}
inline ap_private& operator-=(uint64_t RHS){ VAL -= (ValType)RHS; clearUnusedBits(); return *this; }
#pragma line 1989 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline bool isMinSignedValue() const {
static const uint64_t min_mask = ~(~0ULL << (_AP_W-1));
return BitWidth == 1 ? VAL == 1 :
(ap_private_ops::isNegative<_AP_W>(*this) && ((min_mask & VAL)==0));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline
typename RType<_AP_W1,_AP_S1>::plus operator+(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (RType<_AP_W1,_AP_S1>::plus_w <=64)
return typename RType<_AP_W1,_AP_S1>::plus(RType<_AP_W1,_AP_S1>::plus_s ? int64_t(((uint64_t)VAL)+RHS.get_VAL()):uint64_t(((uint64_t)VAL)+RHS.get_VAL()));
typename RType<_AP_W1,_AP_S1>::plus Result=RHS;
Result += ((uint64_t)VAL);
return Result;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1> inline
typename RType<_AP_W1,_AP_S1>::minus operator-(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (RType<_AP_W1,_AP_S1>::minus_w <=64)
return typename RType<_AP_W1,_AP_S1>::minus(int64_t(((uint64_t)VAL)-RHS.get_VAL()));
typename RType<_AP_W1,_AP_S1>::minus Result=*this;
Result -= RHS;
return Result;
}
#pragma empty_line
inline ap_private& flip() {
VAL = (ValType)((~0ULL^VAL)&mask);
clearUnusedBits();
return *this;
}
#pragma empty_line
uint32_t countPopulation() const { return ap_private_ops::CountPopulation_64(VAL);}
uint32_t countLeadingZeros() const {
int remainder = BitWidth % 64;
int excessBits = (64 - remainder) % 64;
uint32_t Count = ap_private_ops::CountLeadingZeros_64(VAL);
if (Count)
Count-=excessBits;
return AESL_std::min(Count, (uint32_t)_AP_W);
}
#pragma empty_line
#pragma empty_line
ap_private<_AP_W, _AP_S> getHiBits(uint32_t numBits) const {
ap_private<_AP_W, _AP_S> ret(*this);
ret = (ret)>>(BitWidth - numBits);
return ret;
}
#pragma empty_line
#pragma empty_line
ap_private<_AP_W, _AP_S> getLoBits(uint32_t numBits) const {
ap_private<_AP_W, _AP_S> ret(((uint64_t)VAL) << (BitWidth - numBits));
ret = (ret)>>(BitWidth - numBits);
return ret;
#pragma empty_line
}
#pragma empty_line
ap_private<_AP_W, _AP_S>& set(uint32_t bitPosition) {
VAL |= (1ULL << (bitPosition));
clearUnusedBits();
return *this;
}
#pragma empty_line
void set() {
VAL = (ValType)~0ULL;
clearUnusedBits();
}
#pragma empty_line
template<int _AP_W3>
inline void set(const ap_private<_AP_W3, false> & val) {
operator = (ap_private<_AP_W3, _AP_S>(val));
}
#pragma empty_line
inline void set(const ap_private & val) {
operator = (val);
}
#pragma empty_line
bool operator[](uint32_t bitPosition) const {
return (((1ULL << (bitPosition)) & VAL) != 0);
}
#pragma empty_line
inline void clearUnusedBits(void) {
enum { excess_bits = (_AP_W%64) ? 64 -_AP_W%64 : 0};
VAL = (ValType)(_AP_S ? ((((int64_t)VAL)<<(excess_bits))>> (excess_bits)) : (excess_bits ? (((uint64_t)VAL)<<(excess_bits))>>(excess_bits) : (uint64_t)VAL));
}
#pragma empty_line
inline void clearUnusedBitsToZero(void) {
enum { excess_bits = (_AP_W%64) ? 64 -_AP_W%64 : 0};
static uint64_t mask = ~0ULL >> (excess_bits);
VAL &= mask;
}
#pragma empty_line
inline ap_private udiv(const ap_private& RHS) const {
return ap_private((uint64_t)VAL / RHS.get_VAL());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private sdiv(const ap_private& RHS) const {
if (isNegative())
if (RHS.isNegative())
return ((uint64_t)(0 -(*this))) / (uint64_t) (0-RHS);
else
return 0 -((uint64_t)(0-(*this)) / (uint64_t)(RHS));
else if (RHS.isNegative())
return 0 -(this->udiv((ap_private)(0-RHS)));
return this->udiv(RHS);
}
#pragma empty_line
template<bool _AP_S2>
inline ap_private urem(const ap_private<_AP_W, _AP_S2>& RHS) const {
((RHS.get_VAL() != 0 && "Divide by 0") ? (void)0 : _assert("RHS.get_VAL() != 0 && \"Divide by 0\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2099));
return ap_private(((uint64_t)VAL)%((uint64_t)RHS.get_VAL()));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S2>
inline ap_private srem(const ap_private<_AP_W, _AP_S2>& RHS) const {
if (isNegative()) {
ap_private lhs = 0 -(*this);
if (RHS.isNegative()) {
ap_private rhs = 0 -RHS;
return 0 -(lhs.urem(rhs));
} else
return 0 -(lhs.urem(RHS));
} else if (RHS.isNegative()) {
ap_private rhs = 0-RHS;
return this->urem(rhs);
}
return this->urem(RHS);
}
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool eq(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return (*this) == RHS;
}
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool ne(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return !((*this) == RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool ult(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (_AP_W1 <= 64) {
uint64_t lhsZext = ((uint64_t(VAL)) << (64-_AP_W)) >> (64-_AP_W);
uint64_t rhsZext = ((uint64_t(RHS.get_VAL())) <<
(64-_AP_W1)) >> (64-_AP_W1);
return lhsZext < rhsZext;
} else
return RHS.uge(*this);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool slt(const ap_private<_AP_W1, _AP_S1>& RHS) const {
if (_AP_W1 <= 64) {
int64_t lhsSext = ((int64_t(VAL)) << (64-_AP_W)) >> (64-_AP_W);
int64_t rhsSext = ((int64_t(RHS.get_VAL())) << (64-_AP_W1))
>> (64-_AP_W1);
return lhsSext < rhsSext;
} else
return RHS.sge(*this);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool ule(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return ult(RHS) || eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool sle(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return slt(RHS) || eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool ugt(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return !ult(RHS) && !eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool sgt(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return !slt(RHS) && !eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool uge(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return !ult(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1> inline bool sge(const ap_private<_AP_W1, _AP_S1>& RHS) const {
return !slt(RHS);
}
#pragma empty_line
inline ap_private abs() const {
if (isNegative())
return -(*this);
return *this;
}
#pragma empty_line
ap_private<_AP_W, false> get() const {
ap_private<_AP_W,false> ret(*this);
return ret;
}
#pragma empty_line
inline static uint32_t getBitsNeeded(const char* str, uint32_t slen, uint8_t radix) {
return _AP_W;
}
#pragma empty_line
inline uint32_t getActiveBits() const {
uint32_t bits=_AP_W - countLeadingZeros();
return bits?bits:1;
}
#pragma empty_line
inline double roundToDouble(bool isSigned=false) const {
return isSigned ? double((int64_t)VAL) : double((uint64_t)VAL);
}
#pragma empty_line
#pragma empty_line
inline ap_private& reverse () {
for (int i = 0; i < _AP_W/2; ++i) {
bool tmp = operator[](i);
if (operator[](_AP_W - 1 - i))
set(i);
else
clear(i);
if (tmp)
set(_AP_W - 1 - i);
else
clear(_AP_W - 1 - i);
}
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
inline bool iszero () const {
return isMinValue();
}
#pragma empty_line
inline bool to_bool() const {
return !iszero();
}
#pragma empty_line
#pragma empty_line
inline bool sign () const {
if (isNegative())
return true;
return false;
}
#pragma empty_line
#pragma empty_line
inline void invert (int i) {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2265));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2266));
flip(i);
}
#pragma empty_line
#pragma empty_line
inline bool test (int i) const {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2272));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2273));
return operator[](i);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void lrotate(int n) {
((n >= 0 && "Attempting to shift negative index") ? (void)0 : _assert("n >= 0 && \"Attempting to shift negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2280));
((n < _AP_W && "Shift value larger than bit width") ? (void)0 : _assert("n < _AP_W && \"Shift value larger than bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2281));
operator = (shl(n) | lshr(_AP_W - n));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void rrotate(int n) {
((n >= 0 && "Attempting to shift negative index") ? (void)0 : _assert("n >= 0 && \"Attempting to shift negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2288));
((n < _AP_W && "Shift value larger than bit width") ? (void)0 : _assert("n < _AP_W && \"Shift value larger than bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2289));
operator = (lshr(n) | shl(_AP_W - n));
}
#pragma empty_line
#pragma empty_line
inline void set (int i, bool v) {
((i >= 0 && "Attempting to write bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to write bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2295));
((i < _AP_W && "Attempting to write bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to write bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2296));
v ? set(i) : clear(i);
}
#pragma empty_line
#pragma empty_line
inline void set_bit (int i, bool v) {
((i >= 0 && "Attempting to write bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to write bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2302));
((i < _AP_W && "Attempting to write bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to write bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2303));
v ? set(i) : clear(i);
}
#pragma empty_line
#pragma empty_line
inline bool get_bit (int i) const {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2309));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2310));
return operator [](i);
}
#pragma empty_line
#pragma empty_line
inline void b_not() {
flip();
}
#pragma line 2337 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W2, bool _AP_S2>
inline typename RType<_AP_W2,_AP_S2>::div
operator / (const ap_private<_AP_W2,_AP_S2>&op) const {
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> lhs=*this;
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> rhs=op;
return typename RType<_AP_W2,_AP_S2>::div((_AP_S||_AP_S2)?lhs.sdiv(rhs):lhs.udiv(rhs));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline typename RType<_AP_W2,_AP_S2>::mod
operator % (const ap_private<_AP_W2,_AP_S2>&op) const {
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> lhs=*this;
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> rhs=op;
typename RType<_AP_W2,_AP_S2>::mod res = typename RType<_AP_W2,_AP_S2>::mod (_AP_S?lhs.srem(rhs):lhs.urem(rhs));
return res;
}
#pragma line 2363 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W2, bool _AP_S2> inline ap_private<_AP_W, _AP_S>& operator /=(const ap_private<_AP_W2,_AP_S2>& op) { *this=operator / (op); return *this; }
template<int _AP_W2, bool _AP_S2> inline ap_private<_AP_W, _AP_S>& operator %=(const ap_private<_AP_W2,_AP_S2>& op) { *this=operator % (op); return *this; }
#pragma line 2382 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline ap_private operator << (const int op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const bool op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const signed char op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned char op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const short op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned short op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned int op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const long op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned long op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned long long op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const long long op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const float op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const double op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private
operator << (const ap_private<_AP_W2, _AP_S2>& op2) const {
if (_AP_S2 == false) {
uint32_t sh = op2.to_uint();
return *this << sh;
} else {
int sh = op2.to_int();
return *this << sh;
}
}
#pragma line 2424 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline ap_private operator >> (const int op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const bool op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const signed char op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned char op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const short op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned short op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned int op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned long long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const long long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const float op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const double op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private
operator >> (const ap_private<_AP_W2, _AP_S2>& op2) const {
if (_AP_S2 == false) {
uint32_t sh = op2.to_uint();
return *this >> sh;
} else {
int sh = op2.to_int();
return *this >> sh;
}
}
#pragma line 2458 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W2, bool _AP_S2> inline ap_private<_AP_W, _AP_S>& operator >>=(const ap_private<_AP_W2,_AP_S2>& op) { *this=operator >> (op.get_VAL()); return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline bool operator == (const ap_private<_AP_W1, _AP_S1>& op) const {
enum { _AP_MAX_W = ((((_AP_W) > (_AP_W1) ? (_AP_W) : (_AP_W1))) > (32) ? (((_AP_W) > (_AP_W1) ? (_AP_W) : (_AP_W1))) : (32))};
ap_private<_AP_MAX_W, false> lhs(*this);
ap_private<_AP_MAX_W, false> rhs(op);
if (_AP_MAX_W <= 64) {
return (uint64_t) lhs.get_VAL() ==
(uint64_t) rhs.get_VAL();
} else
return lhs == rhs;
#pragma empty_line
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator != (const ap_private<_AP_W2, _AP_S2>& op) const {
return !(*this==op);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator > (const ap_private<_AP_W2, _AP_S2>& op) const {
enum { _AP_MAX_W = ((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2)))};
ap_private<_AP_MAX_W, _AP_S> lhs(*this);
ap_private<_AP_MAX_W, _AP_S2> rhs(op);
#pragma empty_line
#pragma empty_line
if (_AP_S == _AP_S2)
return _AP_S?lhs.sgt(rhs):lhs.ugt(rhs);
else if (_AP_W < 32 && _AP_W2 < 32)
#pragma empty_line
return lhs.sgt(rhs);
else
#pragma empty_line
#pragma empty_line
if (_AP_S)
if (_AP_W2 >= _AP_W)
return lhs.ugt(rhs);
else
return lhs.sgt(rhs);
else
if (_AP_W >= _AP_W2)
return lhs.ugt(rhs);
else
return lhs.sgt(rhs);
#pragma empty_line
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator <= (const ap_private<_AP_W2, _AP_S2>& op) const {
return !(*this>op);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator < (const ap_private<_AP_W2, _AP_S2>& op) const {
enum { _AP_MAX_W = ((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2)))};
ap_private<_AP_MAX_W, _AP_S> lhs(*this);
ap_private<_AP_MAX_W, _AP_S2> rhs(op);
if (_AP_S == _AP_S2)
return _AP_S?lhs.slt(rhs):lhs.ult(rhs);
else if (_AP_W < 32 && _AP_W2 < 32)
return lhs.slt(rhs);
else
if (_AP_S)
if (_AP_W2 >= _AP_W)
return lhs.ult(rhs);
else
return lhs.slt(rhs);
else
if (_AP_W >= _AP_W2)
return lhs.ult(rhs);
else
return lhs.slt(rhs);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator >=(const ap_private<_AP_W2, _AP_S2>& op) const {
return !(*this<op);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
operator () (int Hi, int Lo) {
return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo);
}
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
operator () (int Hi, int Lo) const {
return ap_range_ref<_AP_W,_AP_S>(const_cast<ap_private<_AP_W,
_AP_S>*>(this), Hi, Lo);
}
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
range (int Hi, int Lo) const {
return ap_range_ref<_AP_W,_AP_S>((const_cast<ap_private<_AP_W,
_AP_S>*> (this)), Hi, Lo);
}
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
range (int Hi, int Lo) {
return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo);
}
#pragma empty_line
#pragma empty_line
inline ap_bit_ref<_AP_W,_AP_S> operator [] (uint32_t index) {
return ap_bit_ref<_AP_W,_AP_S> (*this, (int)index);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref<_AP_W,_AP_S> operator [] (const ap_private<_AP_W2,_AP_S2> &index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index.to_int() );
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator [] (const ap_private<_AP_W2,_AP_S2>& index) const {
ap_bit_ref<_AP_W,_AP_S> br =operator [] (index);
return br.to_bool();
}
#pragma empty_line
inline ap_bit_ref<_AP_W,_AP_S> bit (int index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index );
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref<_AP_W,_AP_S> bit (const ap_private<_AP_W2,_AP_S2> &index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index.to_int() );
}
#pragma empty_line
inline bool bit (int index) const {
ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_private<_AP_W, _AP_S>*>(this), index);
return br.to_bool();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool bit (const ap_private<_AP_W2,_AP_S2>& index) const {
ap_bit_ref<_AP_W,_AP_S> br = bit(index);
return br.to_bool();
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W,ap_private<_AP_W, _AP_S>,_AP_W2,ap_private<_AP_W2,_AP_S2> > concat(const ap_private<_AP_W2,_AP_S2>& a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_private<_AP_W2,_AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_private<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W,ap_private<_AP_W, _AP_S>,_AP_W2,ap_private<_AP_W2,_AP_S2> > concat(ap_private<_AP_W2,_AP_S2>& a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_private<_AP_W2,_AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (const ap_private<_AP_W2, _AP_S2>& a2) const {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this), const_cast<ap_private<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (const ap_private<_AP_W2, _AP_S2>& a2) {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(*this, const_cast<ap_private<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (ap_private<_AP_W2, _AP_S2>& a2) const {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this), a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (ap_private<_AP_W2, _AP_S2>& a2) {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >
operator, (const ap_range_ref<_AP_W2, _AP_S2> &a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2,
ap_range_ref<_AP_W2, _AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_range_ref<_AP_W2, _AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >
operator, (ap_range_ref<_AP_W2, _AP_S2> &a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2,
ap_range_ref<_AP_W2, _AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1, ap_bit_ref<_AP_W2, _AP_S2> >
operator, (const ap_bit_ref<_AP_W2, _AP_S2> &a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1,
ap_bit_ref<_AP_W2, _AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1, ap_bit_ref<_AP_W2, _AP_S2> >
operator, (ap_bit_ref<_AP_W2, _AP_S2> &a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1,
ap_bit_ref<_AP_W2, _AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(a2));
}
#pragma empty_line
template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) const {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<af_range_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) const {
return ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<af_bit_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2);
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S>
operator & (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) {
return *this & a2.get();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S>
operator | (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) {
return *this | a2.get();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S>
operator ^ (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) {
return *this ^ a2.get();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool and_reduce() const {
return (VAL & mask) == mask;
}
#pragma empty_line
inline bool nand_reduce() const {
return (VAL & mask) != mask;
}
#pragma empty_line
inline bool or_reduce() const {
return (bool)VAL;
}
#pragma empty_line
inline bool nor_reduce() const {
return VAL==0;
}
#pragma empty_line
inline bool xor_reduce() const {
unsigned int i=countPopulation();
return (i%2)?true:false;
}
#pragma empty_line
inline bool xnor_reduce() const {
unsigned int i=countPopulation();
return (i%2)?false:true;
}
#pragma empty_line
inline std::string to_string(uint8_t radix=2, bool sign=false) const {
return toString(radix, radix==10?_AP_S:sign);
}
};
#pragma empty_line
template<int _AP_W, bool _AP_S>
std::string ap_private<_AP_W, _AP_S, true>::toString(uint8_t radix, bool wantSigned) const {
(((radix == 10 || radix == 8 || radix == 16 || radix == 2) && "Radix should be 2, 8, 10, or 16!") ? (void)0 : _assert("(radix == 10 || radix == 8 || radix == 16 || radix == 2) && \"Radix should be 2, 8, 10, or 16!\"",
"F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
#pragma line 2776 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
,
2777
#pragma line 2776 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
))
;
static const char *digits[] = {
"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"
};
std::string result;
if (radix != 10) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (*this == (uint64_t)(0)) {
#pragma empty_line
#pragma empty_line
switch (radix) {
case 2: result = "0b0"; break;
case 8: result = "0o0"; break;
case 16: result = "0x0"; break;
default: (("invalid radix" && 0) ? (void)0 : _assert("\"invalid radix\" && 0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2795));
}
} else {
ap_private<_AP_W, false, true> tmp(*this);
size_t insert_at = 0;
bool leading_zero = true;
if (wantSigned && isNegative()) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
tmp.flip();
tmp++;
result = "-";
insert_at = 1;
leading_zero = false;
}
switch (radix) {
case 2: result += "0b"; break;
case 8: result += "0o"; break;
case 16: result += "0x"; break;
default: (("invalid radix" && 0) ? (void)0 : _assert("\"invalid radix\" && 0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2815));
}
insert_at += 2;
#pragma empty_line
#pragma empty_line
uint32_t shift = (radix == 16 ? 4 : (radix == 8 ? 3 : 1));
uint64_t mask = radix - 1;
ap_private<_AP_W, false, true> zero(0);
unsigned bits = 0;
bool msb = false;
while (tmp.ne(zero)) {
unsigned digit = (unsigned)(tmp.get_VAL() & mask);
result.insert(insert_at, digits[digit]);
tmp = tmp.lshr(shift);
bits++;
msb = (digit >> (shift - 1)) == 1;
}
bits *= shift;
if (bits < _AP_W && leading_zero && msb)
result.insert(insert_at, digits[0]);
}
return result;
}
#pragma empty_line
ap_private<_AP_W, false, true> tmp(*this);
ap_private<6, false, true> divisor(radix);
ap_private<_AP_W, _AP_S, true> zero(0);
size_t insert_at = 0;
if (wantSigned && isNegative()) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
tmp.flip();
tmp++;
result = "-";
insert_at = 1;
}
if (tmp == ap_private<_AP_W, false, true>(0ULL))
result = "0";
else while (tmp.ne(zero)) {
ap_private<_AP_W, false, true> APdigit = tmp%divisor;
ap_private<_AP_W, false, true> tmp2 = tmp/divisor;
uint32_t digit = (uint32_t)(APdigit.getZExtValue());
((digit < radix && "divide failed") ? (void)0 : _assert("digit < radix && \"divide failed\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2858));
result.insert(insert_at,digits[digit]);
tmp = tmp2;
}
return result;
#pragma empty_line
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
class ap_private <_AP_W, _AP_S, false> {
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
enum { BitWidth = _AP_W, _AP_N = (_AP_W + 63) / 64 };
static const int width = _AP_W;
#pragma empty_line
private:
#pragma line 2885 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
ap_private(uint32_t numWords, const uint64_t bigVal[]) {
set_canary();
((bigVal && "Null pointer detected!") ? (void)0 : _assert("bigVal && \"Null pointer detected!\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2887));
{
#pragma empty_line
memset(pVal, 0, _AP_N * sizeof(uint64_t));
#pragma empty_line
#pragma empty_line
uint32_t words = AESL_std::min<uint32_t>(numWords, _AP_N);
#pragma empty_line
memcpy(pVal, bigVal, words * APINT_WORD_SIZE);
if (words >= _AP_W)
clearUnusedBits();
#pragma empty_line
}
check_canary();
}
#pragma line 2912 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
ap_private(const std::string& val, uint8_t radix=2) {
set_canary();
((!val.empty() && "The input string is empty.") ? (void)0 : _assert("!val.empty() && \"The input string is empty.\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 2914));
const char *c_str = val.c_str();
fromString(c_str, val.size(), radix);
check_canary();
}
#pragma line 2931 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
ap_private(const char strStart[], uint32_t slen, uint8_t radix) {
set_canary();
fromString(strStart, slen, radix);
check_canary();
}
#pragma empty_line
inline void report() {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (_AP_W > ((4096 + 1023) / 1024) * 1024) {
fprintf((&_iob[2]), "[E] ap_%sint<%d>: Bitwidth exceeds the "
"default max value %d. Please use macro "
"AP_INT_MAX_W to set a larger max value.\n",
_AP_S?"":"u", _AP_W,
((4096 + 1023) / 1024) * 1024);
exit(1);
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t pVal[_AP_N];
#pragma line 2969 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
void check_canary() {}
void set_canary() {}
#pragma empty_line
#pragma empty_line
public:
typedef typename valtype<8, _AP_S>::Type ValType;
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> friend struct ap_fixed_base;
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
struct RType {
enum {
mult_w = _AP_W+_AP_W2,
mult_s = _AP_S||_AP_S2,
plus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1,
plus_s = _AP_S||_AP_S2,
minus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1,
minus_s = true,
div_w = _AP_W+_AP_S2,
div_s = _AP_S||_AP_S2,
mod_w = ((_AP_W) < (_AP_W2+(!_AP_S2&&_AP_S)) ? (_AP_W) : (_AP_W2+(!_AP_S2&&_AP_S))),
mod_s = _AP_S,
logic_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2))),
logic_s = _AP_S||_AP_S2
};
typedef ap_private<mult_w, mult_s> mult;
typedef ap_private<plus_w, plus_s> plus;
typedef ap_private<minus_w, minus_s> minus;
typedef ap_private<logic_w, logic_s> logic;
typedef ap_private<div_w, div_s> div;
typedef ap_private<mod_w, mod_s> mod;
typedef ap_private<_AP_W, _AP_S> arg1;
typedef bool reduce;
};
#pragma empty_line
#pragma empty_line
inline uint64_t& get_VAL(void) {
return pVal[0];
}
inline uint64_t get_VAL(void) const {
return pVal[0];
}
inline uint64_t get_VAL(void) const volatile{
return pVal[0];
}
inline void set_VAL(uint64_t value) {
pVal[0] = value;
}
inline uint64_t& get_pVal(int index) {
return pVal[index];
}
inline uint64_t* get_pVal() {
return pVal;
}
inline const uint64_t* get_pVal() const{
return pVal;
}
inline uint64_t get_pVal(int index) const{
return pVal[index];
}
inline uint64_t* get_pVal() const volatile {
return pVal;
}
inline uint64_t get_pVal(int index) const volatile {
return pVal[index];
}
inline void set_pVal(int i, uint64_t value) {
pVal[i] = value;
}
#pragma empty_line
#pragma empty_line
enum {
APINT_BITS_PER_WORD = sizeof(uint64_t) * 8,
APINT_WORD_SIZE = sizeof(uint64_t)
};
#pragma empty_line
enum { excess_bits = (_AP_W%APINT_BITS_PER_WORD) ? APINT_BITS_PER_WORD -(_AP_W%APINT_BITS_PER_WORD) : 0};
static const uint64_t mask = ((uint64_t)~0ULL >> (excess_bits));
#pragma empty_line
public:
#pragma empty_line
ap_private(const char* val) {
set_canary();
int radix = 10;
std::string str = ap_private_ops::parseString(val, radix);
std::string::size_type pos = str.find('.');
if (pos != std::string::npos)
str = str.substr(pos);
ap_private ap_private_val(str, radix);
operator = (ap_private_val);
report();
check_canary();
}
#pragma empty_line
ap_private(const char* val, int rd) {
set_canary();
int radix = rd;
std::string str = ap_private_ops::parseString(val, radix);
std::string::size_type pos = str.find('.');
if (pos != std::string::npos)
str = str.substr(pos);
ap_private ap_private_val(str, radix);
operator = (ap_private_val);
report();
#pragma empty_line
report();
check_canary();
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private(const ap_range_ref<_AP_W2,_AP_S2>& ref) {
set_canary();
*this=ref.get();
report();
check_canary();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private(const ap_bit_ref<_AP_W2,_AP_S2>& ref) {
set_canary();
*this = ((uint64_t)(bool)ref);
report();
check_canary();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private(const ap_concat_ref<_AP_W2, _AP_T2,_AP_W3, _AP_T3>& ref) {
set_canary();
*this=ref.get();
report();
check_canary();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_private(const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2> &val) {
set_canary();
*this = ((val.operator ap_private<_AP_W2, false> ()));
report();
check_canary();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_private(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2> &val) {
set_canary();
*this = (uint64_t)(bool)val;
report();
check_canary();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private(const volatile ap_private<_AP_W1, _AP_S1>& that) {
set_canary();
operator = (const_cast<const ap_private<_AP_W1, _AP_S1>& >(that));
check_canary();
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private(const ap_private<_AP_W1, _AP_S1>& that) {
set_canary();
operator = (that);
check_canary();
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
explicit ap_private(const ap_private<_AP_W1, _AP_S1, true>& that) {
set_canary();
static const uint64_t that_sign_ext_mask = (_AP_W1==APINT_BITS_PER_WORD)?0:~0ULL>>(_AP_W1%APINT_BITS_PER_WORD)<<(_AP_W1%APINT_BITS_PER_WORD);
if (that.isNegative()) {
pVal[0] = that.get_VAL()|that_sign_ext_mask;
memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1));
} else {
pVal[0] = that.get_VAL();
memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1));
}
clearUnusedBits();
check_canary();
}
#pragma empty_line
ap_private(const ap_private& that) {
set_canary();
memcpy(pVal, that.get_pVal(), _AP_N * APINT_WORD_SIZE);
clearUnusedBits();
check_canary();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
~ap_private() {check_canary();}
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private(){
set_canary();
clearUnusedBits();
check_canary();
}
#pragma empty_line
ap_private(uint64_t* val, uint32_t bits=_AP_W) {((0) ? (void)0 : _assert("0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3173));}
ap_private(const uint64_t *const val, uint32_t bits) {((0) ? (void)0 : _assert("0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3174));}
#pragma line 3199 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
ap_private(int val, bool isSigned=true) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(bool val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(signed char val, bool isSigned=true) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(unsigned char val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(short val, bool isSigned=true) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(unsigned short val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(unsigned int val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(long val, bool isSigned=true) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(unsigned long val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(unsigned long long val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(long long val, bool isSigned=true) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(float val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
ap_private(double val, bool isSigned=false) { set_canary(); pVal[0] = (ValType) val; if (isSigned && int64_t(pVal[0]) < 0) { memset(pVal+1, ~0, sizeof(uint64_t)*(_AP_N-1)); } else { memset(pVal+1, 0, sizeof(uint64_t)*(_AP_N-1)); } clearUnusedBits(); check_canary(); }
#pragma line 3221 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline bool isSingleWord() const {
return false;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
static uint32_t whichWord(uint32_t bitPosition) {
#pragma empty_line
return (bitPosition) >> 6;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static uint32_t whichBit(uint32_t bitPosition) {
#pragma empty_line
return bitPosition & 0x3f;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static uint64_t maskBit(uint32_t bitPosition) {
return 1ULL << (whichBit(bitPosition));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint64_t getWord(uint32_t bitPosition) const {
return pVal[whichWord(bitPosition)];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void clearUnusedBits(void) {
pVal[_AP_N-1] = _AP_S ? ((((int64_t)pVal[_AP_N-1])<<(excess_bits))>> excess_bits) : (excess_bits ? ((pVal[_AP_N-1])<<(excess_bits))>>(excess_bits) : pVal[_AP_N-1]);
}
#pragma empty_line
inline void clearUnusedBitsToZero(void) {
pVal[_AP_N-1] &= mask;
}
#pragma empty_line
inline void clearUnusedBitsToOne(void) {
pVal[_AP_N-1] |= mask;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void fromString(const char *str, uint32_t slen,
uint8_t radix) {
enum { numbits=_AP_W};
#pragma empty_line
(((radix == 10 || radix == 8 || radix == 16 || radix == 2) && "Radix should be 2, 8, 10, or 16!") ? (void)0 : _assert("(radix == 10 || radix == 8 || radix == 16 || radix == 2) && \"Radix should be 2, 8, 10, or 16!\"",
"F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
#pragma line 3277 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
,
3278
#pragma line 3277 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
))
;
((str && "String is null?") ? (void)0 : _assert("str && \"String is null?\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3279));
bool isNeg = str[0] == '-';
if (isNeg)
str++, slen--;
#pragma empty_line
#pragma empty_line
while(*str == '0' && *(str+1) != '\0') {str++; slen--;}
(((slen <= numbits || radix != 2) && "Insufficient bit width") ? (void)0 : _assert("(slen <= numbits || radix != 2) && \"Insufficient bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3286));
((((slen - 1)*3 <= numbits || radix != 8) && "Insufficient bit width") ? (void)0 : _assert("((slen - 1)*3 <= numbits || radix != 8) && \"Insufficient bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3287));
((((slen - 1)*4 <= numbits || radix != 16) && "Insufficient bit width") ? (void)0 : _assert("((slen - 1)*4 <= numbits || radix != 16) && \"Insufficient bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3288));
(((((slen -1)*64)/22 <= numbits || radix != 10) && "Insufficient bit width") ? (void)0 : _assert("(((slen -1)*64)/22 <= numbits || radix != 10) && \"Insufficient bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3289));
#pragma empty_line
memset(pVal, 0, _AP_N * sizeof(uint64_t));
#pragma empty_line
#pragma empty_line
uint32_t shift = (radix == 16 ? 4 : radix == 8 ? 3 : radix == 2 ? 1 : 0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t bigVal[_AP_N];
memset(bigVal, 0, _AP_N * sizeof(uint64_t));
ap_private<_AP_W, _AP_S> apdigit(getBitWidth(), bigVal);
ap_private<_AP_W, _AP_S> apradix(radix);
#pragma empty_line
#pragma empty_line
for (unsigned i = 0; i < slen; i++) {
#pragma empty_line
uint32_t digit = 0;
char cdigit = str[i];
if (radix == 16) {
#pragma empty_line
#pragma empty_line
if (!(((cdigit) >= '0' && (cdigit) <= '9') || ((cdigit) >= 'a' && (cdigit) <= 'f') || ((cdigit) >= 'A' && (cdigit) <= 'F')))
((0 && "Invalid hex digit in string") ? (void)0 : _assert("0 && \"Invalid hex digit in string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3312));
if (((cdigit) >= '0' && (cdigit) <= '9'))
digit = cdigit - '0';
else if (cdigit >= 'a')
digit = cdigit - 'a' + 10;
else if (cdigit >= 'A')
digit = cdigit - 'A' + 10;
else
((0 && "huh? we shouldn't get here") ? (void)0 : _assert("0 && \"huh? we shouldn't get here\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3320));
} else if (((cdigit) >= '0' && (cdigit) <= '9')) {
digit = cdigit - '0';
} else if (cdigit != '\0'){
((0 && "Invalid character in digit string") ? (void)0 : _assert("0 && \"Invalid character in digit string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3324));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shift)
*this <<= shift;
else
*this *= apradix;
#pragma empty_line
#pragma empty_line
apdigit.set_VAL(digit);
*this += apdigit;
}
#pragma empty_line
if (isNeg) {
(*this)--;
this->flip();
}
clearUnusedBits();
}
#pragma empty_line
inline ap_private read() volatile {
return *this;
}
#pragma empty_line
inline void write(const ap_private& op2) volatile {
*this = (op2);
}
#pragma empty_line
operator ValType () const {
return get_VAL();
}
#pragma empty_line
inline int to_uchar() const {
return (unsigned char) get_VAL();
}
#pragma empty_line
inline int to_char() const {
return (char) get_VAL();
}
#pragma empty_line
inline int to_ushort() const {
return (unsigned short) get_VAL();
}
#pragma empty_line
inline int to_short() const {
return (short) get_VAL();
}
#pragma empty_line
inline int to_int() const {
return (int) get_VAL();
}
#pragma empty_line
inline unsigned to_uint() const {
return (unsigned) get_VAL();
}
#pragma empty_line
inline long to_long() const {
return (long) get_VAL();
}
#pragma empty_line
inline unsigned long to_ulong() const {
return (unsigned long) get_VAL();
}
#pragma empty_line
inline ap_slong to_int64() const {
return (ap_slong) get_VAL();
}
#pragma empty_line
inline ap_ulong to_uint64() const {
return (ap_ulong) get_VAL();
}
#pragma empty_line
inline double to_double() const {
if (isNegative())
return roundToDouble(true);
else
return roundToDouble(false);
}
#pragma empty_line
inline unsigned length() const { return _AP_W; }
#pragma empty_line
#pragma empty_line
inline ap_private& reverse () {
for (int i = 0; i < _AP_W/2; ++i) {
bool tmp = operator[](i);
if (operator[](_AP_W - 1 - i))
set(i);
else
clear(i);
if (tmp)
set(_AP_W - 1 - i);
else
clear(_AP_W - 1 - i);
}
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
inline bool iszero () const {
return isMinValue();
}
#pragma empty_line
inline bool to_bool() const {
return !iszero();
}
#pragma empty_line
#pragma empty_line
inline bool sign () const {
if (isNegative())
return true;
return false;
}
#pragma empty_line
#pragma empty_line
inline void invert (int i) {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3442));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3443));
flip(i);
}
#pragma empty_line
#pragma empty_line
inline bool test (int i) const {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3449));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3450));
return operator[](i);
}
#pragma empty_line
#pragma empty_line
inline void set (int i, bool v) {
((i >= 0 && "Attempting to write bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to write bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3456));
((i < _AP_W && "Attempting to write bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to write bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3457));
v ? set(i) : clear(i);
}
#pragma empty_line
#pragma empty_line
inline void set_bit (int i, bool v) {
((i >= 0 && "Attempting to write bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to write bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3463));
((i < _AP_W && "Attempting to write bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to write bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3464));
v ? set(i) : clear(i);
}
#pragma empty_line
inline ap_private& set(uint32_t bitPosition) {
pVal[whichWord(bitPosition)] |= maskBit(bitPosition);
clearUnusedBits();
return *this;
}
#pragma empty_line
inline void set() {
for (int i = 0; i < _AP_N; ++i)
pVal[i] = ~0ULL;
clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
inline bool get (int i) const {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3482));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3483));
return operator [](i);
}
#pragma empty_line
#pragma empty_line
inline bool get_bit (int i) const {
((i >= 0 && "Attempting to read bit with negative index") ? (void)0 : _assert("i >= 0 && \"Attempting to read bit with negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3489));
((i < _AP_W && "Attempting to read bit beyond MSB") ? (void)0 : _assert("i < _AP_W && \"Attempting to read bit beyond MSB\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3490));
return operator [](i);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void lrotate(int n) {
((n >= 0 && "Attempting to shift negative index") ? (void)0 : _assert("n >= 0 && \"Attempting to shift negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3497));
((n < _AP_W && "Shift value larger than bit width") ? (void)0 : _assert("n < _AP_W && \"Shift value larger than bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3498));
operator = (shl(n) | lshr(_AP_W - n));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void rrotate(int n) {
((n >= 0 && "Attempting to shift negative index") ? (void)0 : _assert("n >= 0 && \"Attempting to shift negative index\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3505));
((n < _AP_W && "Shift value larger than bit width") ? (void)0 : _assert("n < _AP_W && \"Shift value larger than bit width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3506));
operator = (lshr(n) | shl(_AP_W - n));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private& clear(uint32_t bitPosition) {
pVal[whichWord(bitPosition)] &= ~maskBit(bitPosition);
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
void clear() {
memset(pVal, 0, _AP_N * APINT_WORD_SIZE);
}
#pragma empty_line
#pragma empty_line
ap_private& flip() {
for (int i = 0; i < _AP_N; ++i)
pVal[i] ^= ~0ULL;
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private& flip(uint32_t bitPosition) {
((bitPosition < BitWidth && "Out of the bit-width range!") ? (void)0 : _assert("bitPosition < BitWidth && \"Out of the bit-width range!\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 3535));
if ((*this)[bitPosition]) clear(bitPosition);
else set(bitPosition);
return *this;
}
#pragma empty_line
#pragma empty_line
inline void b_not() {
flip();
}
#pragma empty_line
ap_private getLoBits(uint32_t numBits) const {
return ap_private_ops::lshr(ap_private_ops::shl(*this, _AP_W - numBits),
_AP_W - numBits);
}
#pragma empty_line
ap_private getHiBits(uint32_t numBits) const {
return ap_private_ops::lshr(*this, _AP_W - numBits);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S>
operator & (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) {
return *this & a2.get();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S>
operator | (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) {
return *this | a2.get();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_private<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S>
operator ^ (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) {
return *this ^ a2.get();
}
#pragma line 3597 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W1, bool _AP_S1> inline ap_private& operator &=(const ap_private<_AP_W1, _AP_S1>& RHS) { const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N; uint32_t numWords = AESL_std::min((int)_AP_N, _AP_N1); uint32_t i; for (i = 0; i < numWords; ++i) pVal[i] &= RHS.get_pVal(i); if (_AP_N1 < _AP_N) { uint64_t ext = RHS.isNegative()?~0ULL:0; for (;i<_AP_N; i++) pVal[i] &= ext; } clearUnusedBits(); return *this; };
template<int _AP_W1, bool _AP_S1> inline ap_private& operator |=(const ap_private<_AP_W1, _AP_S1>& RHS) { const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N; uint32_t numWords = AESL_std::min((int)_AP_N, _AP_N1); uint32_t i; for (i = 0; i < numWords; ++i) pVal[i] |= RHS.get_pVal(i); if (_AP_N1 < _AP_N) { uint64_t ext = RHS.isNegative()?~0ULL:0; for (;i<_AP_N; i++) pVal[i] |= ext; } clearUnusedBits(); return *this; };
template<int _AP_W1, bool _AP_S1> inline ap_private& operator ^=(const ap_private<_AP_W1, _AP_S1>& RHS) { const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N; uint32_t numWords = AESL_std::min((int)_AP_N, _AP_N1); uint32_t i; for (i = 0; i < numWords; ++i) pVal[i] ^= RHS.get_pVal(i); if (_AP_N1 < _AP_N) { uint64_t ext = RHS.isNegative()?~0ULL:0; for (;i<_AP_N; i++) pVal[i] ^= ext; } clearUnusedBits(); return *this; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline ap_private& operator+=(const ap_private<_AP_W1, _AP_S1>& RHS) {
const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N;
uint64_t RHSpVal[_AP_N1];
for (int i=0; i<_AP_N1; ++i)
RHSpVal[i] = RHS.get_pVal(i);
ap_private_ops::add(pVal, pVal, RHSpVal, _AP_N, _AP_N, _AP_N1, _AP_S, _AP_S1);
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline ap_private& operator-=(const ap_private<_AP_W1, _AP_S1>& RHS) {
const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N;
uint64_t RHSpVal[_AP_N1];
for (int i=0; i<_AP_N1; ++i)
RHSpVal[i] = RHS.get_pVal(i);
ap_private_ops::sub(pVal, pVal, RHSpVal, _AP_N, _AP_N, _AP_N1, _AP_S, _AP_S1);
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
ap_private& operator*=(const ap_private<_AP_W1, _AP_S1>& RHS) {
#pragma empty_line
uint32_t lhsBits = getActiveBits();
uint32_t lhsWords = !lhsBits ? 0 : whichWord(lhsBits - 1) + 1;
if (!lhsWords) {
#pragma empty_line
return *this;
}
#pragma empty_line
ap_private dupRHS = RHS;
#pragma empty_line
uint32_t rhsBits = dupRHS.getActiveBits();
uint32_t rhsWords = !rhsBits ? 0 : whichWord(rhsBits - 1) + 1;
if (!rhsWords) {
#pragma empty_line
clear();
return *this;
}
#pragma empty_line
#pragma empty_line
uint32_t destWords = rhsWords + lhsWords;
uint64_t *dest = (uint64_t*) malloc(destWords*sizeof(uint64_t));
#pragma empty_line
#pragma empty_line
ap_private_ops::mul(dest, pVal, lhsWords, dupRHS.get_pVal(), rhsWords, destWords);
#pragma empty_line
#pragma empty_line
clear();
uint32_t wordsToCopy = destWords >= _AP_N ? _AP_N : destWords;
#pragma empty_line
memcpy(pVal, dest, wordsToCopy* APINT_WORD_SIZE);
#pragma empty_line
uint64_t ext = (isNegative() ^ RHS.isNegative()) ? ~0ULL : 0ULL;
for (int i=wordsToCopy; i<_AP_N; i++)
pVal[i]=ext;
clearUnusedBits();
#pragma empty_line
free(dest);
return *this;
}
#pragma line 3677 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W2, bool _AP_S2> inline ap_private& operator /=(const ap_private<_AP_W2,_AP_S2>& op) { *this=operator / (op); return *this; }
template<int _AP_W2, bool _AP_S2> inline ap_private& operator %=(const ap_private<_AP_W2,_AP_S2>& op) { *this=operator % (op); return *this; }
#pragma line 3711 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W1, bool _AP_S1> inline typename RType<_AP_W1, _AP_S1>::logic operator | (const ap_private<_AP_W1, _AP_S1>& RHS) const { enum { numWords = (RType<_AP_W1, _AP_S1>::logic_w +APINT_BITS_PER_WORD-1)/APINT_BITS_PER_WORD}; typename RType<_AP_W1, _AP_S1>::logic Result; uint32_t i; const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N; uint32_t min_N = std::min((int)_AP_N, _AP_N1); uint32_t max_N = std::max((int)_AP_N, _AP_N1); for (i = 0; i < min_N; ++i) Result.set_pVal(i, pVal[i] | RHS.get_pVal(i)); if (numWords > i) { uint64_t ext = ((_AP_N<_AP_N1 && isNegative() )||(_AP_N1 < _AP_N && RHS.isNegative())) ? ~0ULL : 0; if (_AP_N>_AP_N1) for (;i<max_N;i++) Result.set_pVal(i, pVal[i] | ext); else for (;i<max_N;i++) Result.set_pVal(i, RHS.get_pVal(i) | ext); if (numWords > i) { uint64_t ext2 = ((_AP_N>_AP_N1 && isNegative() )||(_AP_N1 > _AP_N && RHS.isNegative())) ? ~0ULL : 0; Result.set_pVal(i, ext | ext2); } } Result.clearUnusedBits(); return Result; };
template<int _AP_W1, bool _AP_S1> inline typename RType<_AP_W1, _AP_S1>::logic operator & (const ap_private<_AP_W1, _AP_S1>& RHS) const { enum { numWords = (RType<_AP_W1, _AP_S1>::logic_w +APINT_BITS_PER_WORD-1)/APINT_BITS_PER_WORD}; typename RType<_AP_W1, _AP_S1>::logic Result; uint32_t i; const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N; uint32_t min_N = std::min((int)_AP_N, _AP_N1); uint32_t max_N = std::max((int)_AP_N, _AP_N1); for (i = 0; i < min_N; ++i) Result.set_pVal(i, pVal[i] & RHS.get_pVal(i)); if (numWords > i) { uint64_t ext = ((_AP_N<_AP_N1 && isNegative() )||(_AP_N1 < _AP_N && RHS.isNegative())) ? ~0ULL : 0; if (_AP_N>_AP_N1) for (;i<max_N;i++) Result.set_pVal(i, pVal[i] & ext); else for (;i<max_N;i++) Result.set_pVal(i, RHS.get_pVal(i) & ext); if (numWords > i) { uint64_t ext2 = ((_AP_N>_AP_N1 && isNegative() )||(_AP_N1 > _AP_N && RHS.isNegative())) ? ~0ULL : 0; Result.set_pVal(i, ext & ext2); } } Result.clearUnusedBits(); return Result; };
template<int _AP_W1, bool _AP_S1> inline typename RType<_AP_W1, _AP_S1>::logic operator ^ (const ap_private<_AP_W1, _AP_S1>& RHS) const { enum { numWords = (RType<_AP_W1, _AP_S1>::logic_w +APINT_BITS_PER_WORD-1)/APINT_BITS_PER_WORD}; typename RType<_AP_W1, _AP_S1>::logic Result; uint32_t i; const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N; uint32_t min_N = std::min((int)_AP_N, _AP_N1); uint32_t max_N = std::max((int)_AP_N, _AP_N1); for (i = 0; i < min_N; ++i) Result.set_pVal(i, pVal[i] ^ RHS.get_pVal(i)); if (numWords > i) { uint64_t ext = ((_AP_N<_AP_N1 && isNegative() )||(_AP_N1 < _AP_N && RHS.isNegative())) ? ~0ULL : 0; if (_AP_N>_AP_N1) for (;i<max_N;i++) Result.set_pVal(i, pVal[i] ^ ext); else for (;i<max_N;i++) Result.set_pVal(i, RHS.get_pVal(i) ^ ext); if (numWords > i) { uint64_t ext2 = ((_AP_N>_AP_N1 && isNegative() )||(_AP_N1 > _AP_N && RHS.isNegative())) ? ~0ULL : 0; Result.set_pVal(i, ext ^ ext2); } } Result.clearUnusedBits(); return Result; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline typename RType<_AP_W1,_AP_S1>::plus operator+(const ap_private<_AP_W1, _AP_S1>& RHS) const {
#pragma empty_line
typename RType<_AP_W1,_AP_S1>::plus Result;
const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N;
uint64_t RHSpVal[_AP_N1];
for (int i=0; i<_AP_N1; ++i)
RHSpVal[i] = RHS.get_pVal(i);
bool carry = ap_private_ops::add(Result.get_pVal(), pVal, RHSpVal, (RType<_AP_W1,_AP_S1>::plus_w + 63) / 64, _AP_N, _AP_N1, _AP_S, _AP_S1);
if ((RType<_AP_W1,_AP_S1>::plus_w + 63) / 64> std::max(_AP_W, _AP_W1) )
Result.get_pVal((RType<_AP_W1,_AP_S1>::plus_w + 63)/64 - 1) = carry;
Result.clearUnusedBits();
return Result;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline typename RType<_AP_W1,_AP_S1>::minus operator-(const ap_private<_AP_W1, _AP_S1>& RHS) const {
typename RType<_AP_W1,_AP_S1>::minus Result;
const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N;
uint64_t RHSpVal[_AP_N1];
for (int i=0; i<_AP_N1; ++i)
RHSpVal[i] = RHS.get_pVal(i);
bool borrow = ap_private_ops::sub(Result.get_pVal(), pVal, RHSpVal, (RType<_AP_W1,_AP_S1>::minus_w + 63) / 64, _AP_N, _AP_N1, _AP_S, _AP_S1);
if ((RType<_AP_W1,_AP_S1>::minus_w + 63) / 64 > AESL_std::max(_AP_W, _AP_W1) ) {
Result.get_pVal((RType<_AP_W1,_AP_S1>::minus_w+63)/64 - 1) = borrow;
}
Result.clearUnusedBits();
return Result;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
typename RType<_AP_W1, _AP_S1>::mult operator*(const ap_private<_AP_W1, _AP_S1>& RHS) const {
typename RType<_AP_W1, _AP_S1>::mult temp = *this;
temp *= RHS;
return temp;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline typename RType<_AP_W2,_AP_S2>::div
operator / (const ap_private<_AP_W2,_AP_S2>& op) const {
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> lhs=*this;
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> rhs=op;
return typename RType<_AP_W2,_AP_S2>::div((_AP_S||_AP_S2)?lhs.sdiv(rhs):lhs.udiv(rhs));
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline typename RType<_AP_W2,_AP_S2>::mod
operator % (const ap_private<_AP_W2,_AP_S2>& op) const {
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> lhs=*this;
ap_private<((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2))), (_AP_W>_AP_W2?_AP_S:(_AP_W2>_AP_W?_AP_S2:_AP_S||_AP_S2))> rhs= op;
typename RType<_AP_W2,_AP_S2>::mod res = typename RType<_AP_W2,_AP_S2>::mod(_AP_S?lhs.srem(rhs):lhs.urem(rhs));
return res;
}
#pragma line 3781 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline ap_private operator << (const int op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const bool op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const signed char op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned char op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const short op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned short op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned int op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const long op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned long op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const unsigned long long op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const long long op) const { if (op >= _AP_W) return ap_private(0); if (true && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const float op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
inline ap_private operator << (const double op) const { if (op >= _AP_W) return ap_private(0); if (false && op < 0) return *this >> (0-op); return shl(op); }
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private
operator << (const ap_private<_AP_W2, _AP_S2>& op2) const {
if (_AP_S2 == false) {
uint32_t sh = op2.to_uint();
return *this << sh;
} else {
int sh = op2.to_int();
return *this << sh;
}
}
#pragma line 3825 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline ap_private operator >> (const int op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const bool op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const signed char op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned char op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const short op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned short op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned int op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const unsigned long long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const long long op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (true && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const float op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
inline ap_private operator >> (const double op) const { if (op >= _AP_W) { if (isNegative()) return ap_private(-1); else return ap_private(0); } if (false && op < 0) return *this << (0-op); if (_AP_S) return ashr(op) ; else return lshr(op); }
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_private
operator >> (const ap_private<_AP_W2, _AP_S2>& op2) const {
if (_AP_S2 == false) {
uint32_t sh = op2.to_uint();
return *this >> sh;
} else {
int sh = op2.to_int();
return *this >> sh;
}
}
#pragma line 3872 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
template<int _AP_W2, bool _AP_S2> inline ap_private& operator >>=(int op) { *this = operator >> (op); return *this; } inline ap_private& operator >>=(unsigned int op) { *this = operator >> (op); return *this; } template<int _AP_W2, bool _AP_S2> inline ap_private& operator >>=(const ap_private<_AP_W2,_AP_S2>& op) { *this = operator >> (op); return *this; }
template<int _AP_W2, bool _AP_S2> inline ap_private& operator <<=(int op) { *this = operator << (op); return *this; } inline ap_private& operator <<=(unsigned int op) { *this = operator << (op); return *this; } template<int _AP_W2, bool _AP_S2> inline ap_private& operator <<=(const ap_private<_AP_W2,_AP_S2>& op) { *this = operator << (op); return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool operator==(const ap_private& RHS) const {
#pragma empty_line
uint32_t n1 = getActiveBits();
uint32_t n2 = RHS.getActiveBits();
#pragma empty_line
#pragma empty_line
if (n1 != n2)
return false;
#pragma empty_line
#pragma empty_line
if (n1 <= APINT_BITS_PER_WORD)
return pVal[0] == RHS.get_pVal(0);
#pragma empty_line
#pragma empty_line
for (int i = whichWord(n1 - 1); i >= 0; --i)
if (pVal[i] != RHS.get_pVal(i))
return false;
return true;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator == (const ap_private<_AP_W2, _AP_S2>& op) const {
enum { _AP_MAX_W = ((_AP_W) > (_AP_W2) ? (_AP_W) : (_AP_W2)),};
ap_private<_AP_MAX_W, false> lhs(*this);
ap_private<_AP_MAX_W, false> rhs(op);
return lhs==rhs;
}
#pragma empty_line
bool operator==(uint64_t Val) const {
uint32_t n = getActiveBits();
if (n <= APINT_BITS_PER_WORD)
return pVal[0] == Val;
else
return false;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator != (const ap_private<_AP_W2, _AP_S2>& op) const {
return !(*this==op);
}
#pragma empty_line
template<bool _AP_S1>
inline bool operator!=(const ap_private<_AP_W, _AP_S1>& RHS) const {
return !((*this) == RHS);
}
#pragma empty_line
inline bool operator!=(uint64_t Val) const {
return !((*this) == Val);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator <= (const ap_private<_AP_W2,_AP_S2>& op) const {
return !(*this>op);
}
#pragma empty_line
inline bool operator <(const ap_private& op) const {
return _AP_S ? slt(op):ult(op);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator < (const ap_private<_AP_W2, _AP_S2>& op) const {
enum { _AP_MAX_W = ((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2)))};
ap_private<_AP_MAX_W, _AP_S> lhs(*this);
ap_private<_AP_MAX_W, _AP_S2> rhs(op);
if (_AP_S == _AP_S2)
return _AP_S?lhs.slt(rhs):lhs.ult(rhs);
else
if (_AP_S)
if (_AP_W2 >= _AP_W)
return lhs.ult(rhs);
else
return lhs.slt(rhs);
else
if (_AP_W >= _AP_W2)
return lhs.ult(rhs);
else
return lhs.slt(rhs);
#pragma empty_line
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator >=(const ap_private<_AP_W2,_AP_S2>& op) const {
return !(*this<op);
}
#pragma empty_line
inline bool operator >(const ap_private& op) const {
return _AP_S ? sgt(op):ugt(op);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator > (const ap_private<_AP_W2, _AP_S2>& op) const {
enum { _AP_MAX_W = ((_AP_W+(_AP_S||_AP_S2)) > (_AP_W2+(_AP_S||_AP_S2)) ? (_AP_W+(_AP_S||_AP_S2)) : (_AP_W2+(_AP_S||_AP_S2)))};
ap_private<_AP_MAX_W, _AP_S> lhs(*this);
ap_private<_AP_MAX_W, _AP_S2> rhs(op);
if (_AP_S == _AP_S2)
return _AP_S?lhs.sgt(rhs):lhs.ugt(rhs);
else
if (_AP_S)
if (_AP_W2 >= _AP_W)
return lhs.ugt(rhs);
else
return lhs.sgt(rhs);
else
if (_AP_W >= _AP_W2)
return lhs.ugt(rhs);
else
return lhs.sgt(rhs);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
operator () (int Hi, int Lo) {
return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo);
}
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
operator () (int Hi, int Lo) const {
return ap_range_ref<_AP_W,_AP_S>(const_cast<ap_private<_AP_W,
_AP_S>*>(this), Hi, Lo);
}
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
range (int Hi, int Lo) const {
return ap_range_ref<_AP_W,_AP_S>((const_cast<ap_private<_AP_W,
_AP_S>*> (this)), Hi, Lo);
}
#pragma empty_line
inline ap_range_ref<_AP_W,_AP_S>
range (int Hi, int Lo) {
return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline ap_range_ref<_AP_W,_AP_S>
range (const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline ap_range_ref<_AP_W,_AP_S>
operator () (const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline ap_range_ref<_AP_W,_AP_S>
range (const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) const {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return ap_range_ref<_AP_W,_AP_S>(const_cast<ap_private*>(this), Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline ap_range_ref<_AP_W,_AP_S>
operator () (const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) const {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return this->range(Hi, Lo);
}
#pragma empty_line
inline ap_bit_ref<_AP_W,_AP_S> operator [] (uint32_t index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index );
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref<_AP_W,_AP_S> operator [] (const ap_private<_AP_W2,_AP_S2> &index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index.to_int() );
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator [] (const ap_private<_AP_W2,_AP_S2>& index) const {
ap_bit_ref<_AP_W,_AP_S> br =operator [] (index);
return br.to_bool();
}
#pragma empty_line
inline bool operator [](uint32_t bitPosition) const {
return (maskBit(bitPosition) & (pVal[whichWord(bitPosition)])) != 0;
}
#pragma empty_line
inline ap_bit_ref<_AP_W,_AP_S> bit (int index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index );
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref<_AP_W,_AP_S> bit (const ap_private<_AP_W2,_AP_S2> &index) {
return ap_bit_ref<_AP_W,_AP_S>( *this, index.to_int() );
}
#pragma empty_line
inline bool bit (int index) const {
ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_private<_AP_W, _AP_S>*>(this), index);
return br.to_bool();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool bit (const ap_private<_AP_W2,_AP_S2>& index) const {
ap_bit_ref<_AP_W,_AP_S> br = bit(index);
return br.to_bool();
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W,ap_private<_AP_W, _AP_S>,_AP_W2,ap_private<_AP_W2,_AP_S2> > concat(ap_private<_AP_W2,_AP_S2>& a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_private<_AP_W2,_AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W,ap_private<_AP_W, _AP_S>,_AP_W2,ap_private<_AP_W2,_AP_S2> > concat(const ap_private<_AP_W2,_AP_S2>& a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_private<_AP_W2,_AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_private<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (ap_private<_AP_W2, _AP_S2>& a2) {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (ap_private<_AP_W2, _AP_S2>& a2) const {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this), a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (const ap_private<_AP_W2, _AP_S2>& a2) {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(*this, const_cast<ap_private<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (const ap_private<_AP_W2, _AP_S2>& a2) const {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, ap_private<_AP_W2,
_AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this), const_cast<ap_private<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >
operator, (const ap_range_ref<_AP_W2, _AP_S2> &a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2,
ap_range_ref<_AP_W2, _AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_range_ref<_AP_W2, _AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >
operator, (ap_range_ref<_AP_W2, _AP_S2> &a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2,
ap_range_ref<_AP_W2, _AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1, ap_bit_ref<_AP_W2, _AP_S2> >
operator, (const ap_bit_ref<_AP_W2, _AP_S2> &a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1,
ap_bit_ref<_AP_W2, _AP_S2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1, ap_bit_ref<_AP_W2, _AP_S2> >
operator, (ap_bit_ref<_AP_W2, _AP_S2> &a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, 1,
ap_bit_ref<_AP_W2, _AP_S2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline
ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) const {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(a2));
}
#pragma empty_line
template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline
ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) {
return ap_concat_ref<_AP_W, ap_private<_AP_W, _AP_S>, _AP_W2+_AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) const {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<af_range_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<_AP_W, ap_private, _AP_W2, af_range_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2);
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) const {
return ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_private<_AP_W,_AP_S>& >(*this),
const_cast<af_bit_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<_AP_W, ap_private, 1, af_bit_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2);
}
#pragma empty_line
inline ap_private<_AP_W,false> get() const {
ap_private<_AP_W,false> ret(*this);
return ret;
}
#pragma empty_line
template<int _AP_W3>
inline void set(const ap_private<_AP_W3, false> & val) {
operator = (ap_private<_AP_W3, _AP_S>(val));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isNegative() const {
#pragma empty_line
enum {shift = (_AP_W-APINT_BITS_PER_WORD*(_AP_N-1)-1)};
static const uint64_t mask = 1ULL << (shift);
return _AP_S && (pVal[_AP_N-1]&mask);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isPositive() const {
return !isNegative();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isStrictlyPositive() const {
return isPositive() && (*this) != 0;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isAllOnesValue() const {
return countPopulation() == _AP_W;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isMaxValue() const {
return countPopulation() == _AP_W;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isMaxSignedValue() const {
return !isNegative() && countPopulation() == _AP_W - 1;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isMinValue() const {
return countPopulation() == 0;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isMinSignedValue() const {
return isNegative() && countPopulation() == 1;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline const uint64_t* getRawData() const {
return &pVal[0];
}
#pragma line 4293 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
ap_private sqrt() const {
#pragma empty_line
#pragma empty_line
uint32_t magnitude = getActiveBits();
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (magnitude <= 5) {
static const uint8_t results[32] = {
0,
1, 1,
2, 2, 2, 2,
3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
6
};
return ap_private<_AP_W, _AP_S>( results[get_VAL()]);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (magnitude < 52) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return ap_private<_AP_W, _AP_S>(
uint64_t(::round(::sqrt(double(get_VAL())))));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint32_t nbits = BitWidth, i = 4;
ap_private<_AP_W, _AP_S> testy(16);
ap_private<_AP_W, _AP_S> x_old( 1);
ap_private<_AP_W, _AP_S> x_new(0);
ap_private<_AP_W, _AP_S> two( 2);
#pragma empty_line
#pragma empty_line
for (;; i += 2, testy = testy.shl(2))
if (i >= nbits || this->ule(testy)) {
x_old = x_old.shl(i / 2);
break;
}
#pragma empty_line
#pragma empty_line
for (;;) {
x_new = (this->udiv(x_old) + x_old).udiv(two);
if (x_old.ule(x_new))
break;
x_old = x_new;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private<_AP_W, _AP_S> square(x_old * x_old);
ap_private<_AP_W, _AP_S> nextSquare((x_old + 1) * (x_old +1));
if (this->ult(square))
return x_old;
else if (this->ule(nextSquare)) {
ap_private<_AP_W, _AP_S> midpoint((nextSquare - square).udiv(two));
ap_private<_AP_W, _AP_S> offset(*this - square);
if (offset.ult(midpoint))
return x_old;
else
return x_old + 1;
} else
((0 && "Error in ap_private<_AP_W, _AP_S>::sqrt computation") ? (void)0 : _assert("0 && \"Error in ap_private<_AP_W, _AP_S>::sqrt computation\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4372));
return x_old + 1;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private& operator=(const ap_private& RHS) {
if (this != &RHS)
memcpy(pVal, RHS.get_pVal(), _AP_N * APINT_WORD_SIZE);
return *this;
}
inline ap_private& operator=(const volatile ap_private& RHS) {
if (this != &RHS)
for (int i=0; i<_AP_N; ++i)
pVal[i] = RHS.get_pVal(i);
return *this;
}
inline void operator=(const ap_private& RHS) volatile {
if (this != &RHS)
for (int i=0; i<_AP_N; ++i)
pVal[i] = RHS.get_pVal(i);
}
inline void operator=(const volatile ap_private& RHS) volatile {
if (this != &RHS)
for (int i=0; i<_AP_N; ++i)
pVal[i] = RHS.get_pVal(i);
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline ap_private& operator=(const ap_private<_AP_W1, _AP_S1>& RHS) {
if (_AP_S1)
cpSextOrTrunc(RHS);
else
cpZextOrTrunc(RHS);
clearUnusedBits();
return *this;
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
inline ap_private& operator=(const volatile ap_private<_AP_W1, _AP_S1>& RHS) {
if (_AP_S1)
cpSextOrTrunc(RHS);
else
cpZextOrTrunc(RHS);
clearUnusedBits();
return *this;
}
#pragma line 4456 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline const ap_private operator++(int) {
ap_private API(*this);
++(*this);
return API;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private& operator++() {
ap_private_ops::add_1(pVal, pVal, _AP_N, 1);
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline const ap_private operator--(int) {
ap_private API(*this);
--(*this);
return API;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private& operator--() {
ap_private_ops::sub_1(pVal, _AP_N, 1);
clearUnusedBits();
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private<_AP_W + !_AP_S, true> operator~() const {
ap_private<_AP_W + !_AP_S, true> Result(*this);
Result.flip();
return Result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline typename RType<1,false>::minus operator-() const {
return ap_private<1,false>(0) - (*this);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool operator !() const {
for (int i = 0; i < _AP_N; ++i)
if (pVal[i])
return false;
return true;
}
#pragma empty_line
template<bool _AP_S1>
inline ap_private<_AP_W, _AP_S||_AP_S1> And(const ap_private<_AP_W, _AP_S1>& RHS) const {
return this->operator&(RHS);
}
template<bool _AP_S1>
inline ap_private Or(const ap_private<_AP_W, _AP_S1>& RHS) const {
return this->operator|(RHS);
}
template<bool _AP_S1>
ap_private Xor(const ap_private<_AP_W, _AP_S1>& RHS) const {
return this->operator^(RHS);
}
#pragma empty_line
ap_private Mul(const ap_private& RHS) const {
ap_private Result(*this);
Result *= RHS;
return Result;
}
#pragma empty_line
ap_private Add(const ap_private& RHS) const {
ap_private Result(0);
ap_private_ops::add(Result.get_pVal(), pVal, RHS.get_pVal(), _AP_N, _AP_N, _AP_N, _AP_S, _AP_S);
Result.clearUnusedBits();
return Result;
}
#pragma empty_line
ap_private Sub(const ap_private& RHS) const {
ap_private Result(0);
ap_private_ops::sub(Result.get_pVal(), pVal, RHS.get_pVal(), _AP_N, _AP_N, _AP_N, _AP_S, _AP_S);
Result.clearUnusedBits();
return Result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private ashr(uint32_t shiftAmt) const {
((shiftAmt <= BitWidth && "Invalid shift amount, too big") ? (void)0 : _assert("shiftAmt <= BitWidth && \"Invalid shift amount, too big\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4548));
#pragma empty_line
if (shiftAmt == 0)
return *this;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shiftAmt == BitWidth) {
if (isNegative())
return ap_private(-1);
else
return ap_private(0);
}
#pragma empty_line
#pragma empty_line
ap_private Retval(0);
uint64_t * val = Retval.get_pVal();
#pragma empty_line
#pragma empty_line
uint32_t wordShift = shiftAmt % APINT_BITS_PER_WORD;
uint32_t offset = shiftAmt / APINT_BITS_PER_WORD;
uint32_t breakWord = _AP_N - 1 - offset;
uint32_t bitsInWord = whichBit(BitWidth);
if (bitsInWord == 0)
bitsInWord = APINT_BITS_PER_WORD;
#pragma empty_line
#pragma empty_line
if (wordShift == 0) {
#pragma empty_line
for (uint32_t i = 0; i <= breakWord; ++i)
val[i] = pVal[i+offset];
#pragma empty_line
#pragma empty_line
if (isNegative())
if (bitsInWord < APINT_BITS_PER_WORD)
val[breakWord] |= ~0ULL << (bitsInWord);
} else {
#pragma empty_line
for (uint32_t i = 0; i < breakWord; ++i) {
#pragma empty_line
#pragma empty_line
val[i] = ((pVal[i+offset]) >> (wordShift));
val[i] |= ((pVal[i+offset+1]) << (APINT_BITS_PER_WORD - wordShift));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
val[breakWord] = (pVal[breakWord+offset]) >> (wordShift);
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (isNegative()) {
if (wordShift > bitsInWord) {
if (breakWord > 0)
val[breakWord-1] |=
~0ULL << (APINT_BITS_PER_WORD - (wordShift - bitsInWord));
val[breakWord] |= ~0ULL;
} else
val[breakWord] |= (~0ULL << (bitsInWord - wordShift));
}
}
#pragma empty_line
#pragma empty_line
uint64_t fillValue = (isNegative() ? ~0ULL : 0);
for (int i = breakWord+1; i < _AP_N; ++i)
val[i] = fillValue;
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private lshr(uint32_t shiftAmt) const {
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shiftAmt == BitWidth)
return ap_private(0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shiftAmt == 0)
return *this;
#pragma empty_line
#pragma empty_line
ap_private Retval(0);
uint64_t * val = Retval.get_pVal();
#pragma empty_line
#pragma empty_line
if (shiftAmt < APINT_BITS_PER_WORD) {
uint64_t carry = 0;
for (int i = _AP_N-1; i >= 0; --i) {
val[i] = ((pVal[i]) >> (shiftAmt)) | carry;
carry = (pVal[i]) << (APINT_BITS_PER_WORD - shiftAmt);
}
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
#pragma empty_line
uint32_t wordShift = shiftAmt % APINT_BITS_PER_WORD;
uint32_t offset = shiftAmt / APINT_BITS_PER_WORD;
#pragma empty_line
#pragma empty_line
if (wordShift == 0) {
for (uint32_t i = 0; i < _AP_N - offset; ++i)
val[i] = pVal[i+offset];
for (uint32_t i = _AP_N-offset; i < _AP_N; i++)
val[i] = 0;
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
#pragma empty_line
uint32_t breakWord = _AP_N - offset -1;
for (uint32_t i = 0; i < breakWord; ++i)
val[i] = ((pVal[i+offset]) >> (wordShift)) |
((pVal[i+offset+1]) << (APINT_BITS_PER_WORD - wordShift));
#pragma empty_line
val[breakWord] = (pVal[breakWord+offset]) >> (wordShift);
#pragma empty_line
#pragma empty_line
for (int i = breakWord+1; i < _AP_N; ++i)
val[i] = 0;
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private shl(uint32_t shiftAmt) const {
((shiftAmt <= BitWidth && "Invalid shift amount, too big") ? (void)0 : _assert("shiftAmt <= BitWidth && \"Invalid shift amount, too big\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4681));
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shiftAmt == BitWidth)
return ap_private(0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (shiftAmt == 0)
return *this;
#pragma empty_line
#pragma empty_line
ap_private Retval(0);
uint64_t* val = Retval.get_pVal();
#pragma empty_line
if (shiftAmt < APINT_BITS_PER_WORD) {
uint64_t carry = 0;
for (int i = 0; i < _AP_N; i++) {
val[i] = ((pVal[i]) << (shiftAmt)) | carry;
carry = (pVal[i]) >> (APINT_BITS_PER_WORD - shiftAmt);
}
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
#pragma empty_line
uint32_t wordShift = shiftAmt % APINT_BITS_PER_WORD;
uint32_t offset = shiftAmt / APINT_BITS_PER_WORD;
#pragma empty_line
#pragma empty_line
if (wordShift == 0) {
for (uint32_t i = 0; i < offset; i++)
val[i] = 0;
for (int i = offset; i < _AP_N; i++)
val[i] = pVal[i-offset];
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
#pragma empty_line
uint32_t i = _AP_N - 1;
for (; i > offset; --i)
val[i] = (pVal[i-offset]) << (wordShift) |
(pVal[i-offset-1]) >> (APINT_BITS_PER_WORD - wordShift);
val[offset] = (pVal[0]) << (wordShift);
for (i = 0; i < offset; ++i)
val[i] = 0;
Retval.clearUnusedBits();
return Retval;
}
#pragma empty_line
inline ap_private rotl(uint32_t rotateAmt) const {
if (rotateAmt == 0)
return *this;
#pragma empty_line
ap_private hi(*this);
ap_private lo(*this);
hi.shl(rotateAmt);
lo.lshr(BitWidth - rotateAmt);
return hi | lo;
}
#pragma empty_line
inline ap_private rotr(uint32_t rotateAmt) const {
if (rotateAmt == 0)
return *this;
#pragma empty_line
ap_private hi(*this);
ap_private lo(*this);
lo.lshr(rotateAmt);
hi.shl(BitWidth - rotateAmt);
return hi | lo;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private udiv(const ap_private& RHS) const {
#pragma empty_line
uint32_t rhsBits = RHS.getActiveBits();
uint32_t rhsWords = !rhsBits ? 0 : (whichWord(rhsBits - 1) + 1);
((rhsWords && "Divided by zero???") ? (void)0 : _assert("rhsWords && \"Divided by zero???\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4764));
uint32_t lhsBits = this->getActiveBits();
uint32_t lhsWords = !lhsBits ? 0 : (whichWord(lhsBits - 1) + 1);
#pragma empty_line
#pragma empty_line
if (!lhsWords)
#pragma empty_line
return ap_private(0);
else if (lhsWords < rhsWords || this->ult(RHS)) {
#pragma empty_line
return ap_private(0);
} else if (*this == RHS) {
#pragma empty_line
return ap_private(1);
} else if (lhsWords == 1 && rhsWords == 1) {
#pragma empty_line
return ap_private(this->pVal[0] / RHS.get_pVal(0));
}
#pragma empty_line
#pragma empty_line
ap_private Quotient(0);
ap_private_ops::divide(*this, lhsWords, RHS, rhsWords, &Quotient, (ap_private*)0);
return Quotient;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private sdiv(const ap_private& RHS) const {
if (isNegative())
if (RHS.isNegative())
return (-(*this)).udiv(-RHS);
else
return -((-(*this)).udiv(RHS));
else if (RHS.isNegative())
return -(this->udiv((ap_private)(-RHS)));
return this->udiv(RHS);
}
#pragma line 4809 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
ap_private urem(const ap_private& RHS) const {
#pragma empty_line
uint32_t lhsBits = getActiveBits();
uint32_t lhsWords = !lhsBits ? 0 : (whichWord(lhsBits - 1) + 1);
#pragma empty_line
#pragma empty_line
uint32_t rhsBits = RHS.getActiveBits();
uint32_t rhsWords = !rhsBits ? 0 : (whichWord(rhsBits - 1) + 1);
((rhsWords && "Performing remainder operation by zero ???") ? (void)0 : _assert("rhsWords && \"Performing remainder operation by zero ???\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4817));
#pragma empty_line
#pragma empty_line
if (lhsWords == 0) {
#pragma empty_line
return ap_private(0);
} else if (lhsWords < rhsWords || this->ult(RHS)) {
#pragma empty_line
return *this;
} else if (*this == RHS) {
#pragma empty_line
return ap_private(0);
} else if (lhsWords == 1) {
#pragma empty_line
return ap_private(pVal[0] % RHS.get_pVal(0));
}
#pragma empty_line
#pragma empty_line
ap_private Remainder(0);
ap_private_ops::divide(*this, lhsWords, RHS, rhsWords, (ap_private*)(0), &Remainder);
return Remainder;
}
#pragma empty_line
ap_private urem(uint64_t RHS) const {
#pragma empty_line
uint32_t lhsBits = getActiveBits();
uint32_t lhsWords = !lhsBits ? 0 : (whichWord(lhsBits - 1) + 1);
#pragma empty_line
uint32_t rhsWords = 1;
((rhsWords && "Performing remainder operation by zero ???") ? (void)0 : _assert("rhsWords && \"Performing remainder operation by zero ???\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4846));
#pragma empty_line
if (lhsWords == 0) {
#pragma empty_line
return ap_private(0);
} else if (lhsWords < rhsWords || this->ult(RHS)) {
#pragma empty_line
return *this;
} else if (*this == RHS) {
#pragma empty_line
return ap_private(0);
} else if (lhsWords == 1) {
#pragma empty_line
return ap_private(pVal[0] % RHS);
}
#pragma empty_line
#pragma empty_line
ap_private Remainder(0);
divide(*this, lhsWords, RHS, (ap_private*)(0), &Remainder);
return Remainder;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private srem(const ap_private& RHS) const {
if (isNegative()) {
ap_private lhs = -(*this);
if (RHS.isNegative()) {
ap_private rhs = -RHS;
return -(lhs.urem(rhs));
} else
return -(lhs.urem(RHS));
} else if (RHS.isNegative()) {
ap_private rhs = -RHS;
return this->urem(rhs);
}
return this->urem(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private srem(int64_t RHS) const {
if (isNegative())
if (RHS<0)
return -((-(*this)).urem(-RHS));
else
return -((-(*this)).urem(RHS));
else if (RHS<0)
return this->urem(-RHS);
return this->urem(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool eq(const ap_private<_AP_W, _AP_S1>& RHS) const {
return (*this) == RHS;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool ne(const ap_private<_AP_W, _AP_S1> &RHS) const {
return !((*this) == RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool ult(const ap_private<_AP_W, _AP_S1>& RHS) const {
#pragma empty_line
uint32_t n1 = getActiveBits();
uint32_t n2 = RHS.getActiveBits();
#pragma empty_line
#pragma empty_line
if (n1 < n2)
return true;
#pragma empty_line
#pragma empty_line
if (n2 < n1)
return false;
#pragma empty_line
#pragma empty_line
if (n1 <= APINT_BITS_PER_WORD && n2 <= APINT_BITS_PER_WORD)
return pVal[0] < RHS.get_pVal(0);
#pragma empty_line
#pragma empty_line
uint32_t topWord = whichWord(AESL_std::max(n1,n2)-1);
for (int i = topWord; i >= 0; --i) {
if (pVal[i] > RHS.get_pVal(i))
return false;
if (pVal[i] < RHS.get_pVal(i))
return true;
}
return false;
}
#pragma empty_line
inline bool ult(uint64_t RHS) const {
#pragma empty_line
uint32_t n1 = getActiveBits();
uint32_t n2 = 64 - ap_private_ops::CountLeadingZeros_64(RHS);
#pragma empty_line
#pragma empty_line
if (n1 < n2)
return true;
#pragma empty_line
#pragma empty_line
if (n2 < n1)
return false;
#pragma empty_line
#pragma empty_line
if (n1 <= APINT_BITS_PER_WORD && n2 <= APINT_BITS_PER_WORD)
return pVal[0] < RHS;
((0) ? (void)0 : _assert("0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 4965));
}
#pragma empty_line
template<bool _AP_S1>
inline bool slt(const ap_private<_AP_W, _AP_S1>& RHS) const {
ap_private lhs(*this);
ap_private<_AP_W, _AP_S1> rhs(RHS);
bool lhsNeg = isNegative();
bool rhsNeg = rhs.isNegative();
if (lhsNeg) {
#pragma empty_line
lhs.flip();
lhs++;
}
if (rhsNeg) {
#pragma empty_line
rhs.flip();
rhs++;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (lhsNeg)
if (rhsNeg)
return lhs.ugt(rhs);
else
return true;
else if (rhsNeg)
return false;
else
return lhs.ult(rhs);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool ule(const ap_private<_AP_W, _AP_S1>& RHS) const {
return ult(RHS) || eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool sle(const ap_private<_AP_W, _AP_S1>& RHS) const {
return slt(RHS) || eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool ugt(const ap_private<_AP_W, _AP_S1>& RHS) const {
return !ult(RHS) && !eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool sgt(const ap_private<_AP_W, _AP_S1>& RHS) const {
return !slt(RHS) && !eq(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool uge(const ap_private<_AP_W, _AP_S>& RHS) const {
return !ult(RHS);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<bool _AP_S1>
inline bool sge(const ap_private<_AP_W, _AP_S1>& RHS) const {
return !slt(RHS);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
void cpSext(const ap_private<_AP_W1, _AP_S1>& that) {
((_AP_W1 < BitWidth && "Invalid ap_private SignExtend request") ? (void)0 : _assert("_AP_W1 < BitWidth && \"Invalid ap_private SignExtend request\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5055));
((_AP_W1 <= MAX_INT_BITS && "Too many bits") ? (void)0 : _assert("_AP_W1 <= MAX_INT_BITS && \"Too many bits\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5056));
#pragma empty_line
if (!that.isNegative()) {
cpZext(that);
return;
}
#pragma empty_line
#pragma empty_line
enum { wordBits = _AP_W1 % APINT_BITS_PER_WORD};
const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N;
#pragma empty_line
if (_AP_N1 == _AP_N) {
enum { newWordBits = _AP_W % APINT_BITS_PER_WORD};
#pragma empty_line
static const uint64_t mask = wordBits?(~0ULL<<(wordBits)):0ULL;
for (int i = 0; i < _AP_N; ++i)
pVal[i] = that.get_pVal(i);
pVal[_AP_N-1] |= mask;
return;
}
#pragma empty_line
enum { newWordBits = _AP_W % APINT_BITS_PER_WORD};
#pragma empty_line
static const uint64_t mask = wordBits?(~0ULL<<(wordBits)):0ULL;
int i;
for (i = 0; i < _AP_N1; ++i)
pVal[i] = that.get_pVal(i);
pVal[i - 1] |= mask;
for (; i < _AP_N-1; i++)
pVal[i] = ~0ULL;
pVal[i] = ~0ULL;
clearUnusedBits();
return;
}
#pragma empty_line
#pragma empty_line
template <int _AP_W1, bool _AP_S1>
void cpZext(const ap_private<_AP_W1, _AP_S1>& that) {
((_AP_W1 < BitWidth && "Invalid ap_private ZeroExtend request") ? (void)0 : _assert("_AP_W1 < BitWidth && \"Invalid ap_private ZeroExtend request\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5094));
((_AP_W1 <= MAX_INT_BITS && "Too many bits") ? (void)0 : _assert("_AP_W1 <= MAX_INT_BITS && \"Too many bits\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5095));
const int _AP_N1 = ap_private<_AP_W1, _AP_S1>::_AP_N;
int i = 0;
for (; i < _AP_N1; ++i)
pVal[i] = that.get_pVal(i);
for (; i < _AP_N; ++i)
pVal[i] = 0;
clearUnusedBits();
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
void cpZextOrTrunc(const ap_private<_AP_W1, _AP_S1>& that) {
if (BitWidth > _AP_W1)
cpZext(that);
else {
for (int i=0; i<_AP_N; ++i)
pVal[i]=that.get_pVal(i);
clearUnusedBits();
}
}
#pragma empty_line
template<int _AP_W1, bool _AP_S1>
void cpSextOrTrunc(const ap_private<_AP_W1, _AP_S1>& that) {
if (BitWidth > _AP_W1)
cpSext(that);
else {
for (int i=0; i<_AP_N; ++i)
pVal[i] = that.get_pVal(i);
clearUnusedBits();
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint32_t getBitWidth() const {
return BitWidth;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint32_t getNumWords() const {
return (BitWidth + APINT_BITS_PER_WORD - 1) / APINT_BITS_PER_WORD;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint32_t getActiveBits() const {
uint32_t bits=BitWidth - countLeadingZeros();
return bits?bits:1;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint64_t getZExtValue() const {
((getActiveBits() <= 64 && "Too many bits for uint64_t") ? (void)0 : _assert("getActiveBits() <= 64 && \"Too many bits for uint64_t\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5157));
return *pVal;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int64_t getSExtValue() const {
((getActiveBits() <= 64 && "Too many bits for int64_t") ? (void)0 : _assert("getActiveBits() <= 64 && \"Too many bits for int64_t\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5166));
return int64_t(pVal[0]);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static uint32_t getBitsNeeded(const char* str, uint32_t slen, uint8_t radix) {
((str != 0 && "Invalid value string") ? (void)0 : _assert("str != 0 && \"Invalid value string\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5174));
((slen > 0 && "Invalid string length") ? (void)0 : _assert("slen > 0 && \"Invalid string length\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5175));
#pragma empty_line
#pragma empty_line
uint32_t isNegative = str[0] == '-';
if (isNegative) {
slen--;
str++;
}
#pragma empty_line
#pragma empty_line
if (radix == 2)
return slen + isNegative;
if (radix == 8)
return slen * 3 + isNegative;
if (radix == 16)
return slen * 4 + isNegative;
#pragma empty_line
#pragma empty_line
((radix == 10 && "Invalid radix") ? (void)0 : _assert("radix == 10 && \"Invalid radix\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5193));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return isNegative + slen * 4;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint32_t countLeadingZeros() const {
enum { msw_bits = (BitWidth % APINT_BITS_PER_WORD)?(BitWidth % APINT_BITS_PER_WORD):APINT_BITS_PER_WORD,
excessBits = APINT_BITS_PER_WORD - msw_bits };
uint32_t Count = ap_private_ops::CountLeadingZeros_64(pVal[_AP_N-1]);
if (Count>=excessBits)
Count -= excessBits;
if (!pVal[_AP_N-1]) {
for (int i = _AP_N-1 ; i ; --i) {
if (!pVal[i-1])
Count += APINT_BITS_PER_WORD;
else {
Count += ap_private_ops::CountLeadingZeros_64(pVal[i-1]);
break;
}
}
}
return Count;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint32_t countLeadingOnes() const {
if (isSingleWord())
return countLeadingOnes_64(get_VAL(), APINT_BITS_PER_WORD - BitWidth);
#pragma empty_line
uint32_t highWordBits = BitWidth % APINT_BITS_PER_WORD;
uint32_t shift = (highWordBits == 0 ? 0 : APINT_BITS_PER_WORD - highWordBits);
int i = _AP_N - 1;
uint32_t Count = countLeadingOnes_64(get_pVal(i), shift);
if (Count == highWordBits) {
for (i--; i >= 0; --i) {
if (get_pVal(i) == ~0ULL)
Count += APINT_BITS_PER_WORD;
else {
Count += countLeadingOnes_64(get_pVal(i), 0);
break;
}
}
}
return Count;
}
#pragma line 5261 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
inline uint32_t countTrailingZeros() const {
uint32_t Count = 0;
uint32_t i = 0;
for (; i < _AP_N && get_pVal(i) == 0; ++i)
Count += APINT_BITS_PER_WORD;
if (i < _AP_N)
Count += ap_private_ops::CountTrailingZeros_64(get_pVal(i));
return AESL_std::min(Count, BitWidth);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint32_t countPopulation() const {
uint32_t Count = 0;
for (int i = 0; i<_AP_N-1 ; ++i)
Count += ap_private_ops::CountPopulation_64(pVal[i]);
Count += ap_private_ops::CountPopulation_64(pVal[_AP_N-1]&mask);
return Count;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline std::string toString(uint8_t radix, bool wantSigned) const
;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline std::string toStringUnsigned(uint8_t radix = 10) const {
return toString(radix, false);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline std::string toStringSigned(uint8_t radix = 10) const {
return toString(radix, true);
}
#pragma empty_line
#pragma empty_line
inline double roundToDouble(bool isSigned) const {
#pragma empty_line
#pragma empty_line
if (isSingleWord() || getActiveBits() <= APINT_BITS_PER_WORD) {
uint64_t val = pVal[0];
if (isSigned) {
int64_t sext = ((int64_t(val)) << (64-BitWidth)) >> (64-BitWidth);
return double(sext);
} else
return double(val);
}
#pragma empty_line
#pragma empty_line
bool isNeg = isSigned ? (*this)[BitWidth-1] : false;
#pragma empty_line
#pragma empty_line
ap_private<_AP_W, _AP_S> Tmp(isNeg ? -(*this) : (*this));
#pragma empty_line
#pragma empty_line
uint32_t n = Tmp.getActiveBits();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t exp = n;
#pragma empty_line
#pragma empty_line
if (exp > 1023) {
if (!isSigned || !isNeg)
return std::numeric_limits<double>::infinity();
else
return -std::numeric_limits<double>::infinity();
}
exp += 1023;
#pragma empty_line
#pragma empty_line
#pragma empty_line
uint64_t mantissa;
unsigned hiWord = whichWord(n-1);
if (hiWord == 0) {
mantissa = Tmp.get_pVal(0);
if (n > 52)
(mantissa) >>= (n - 52);
} else {
((hiWord > 0 && "High word is negative?") ? (void)0 : _assert("hiWord > 0 && \"High word is negative?\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5354));
uint64_t hibits = (Tmp.get_pVal(hiWord)) << (52 - n % APINT_BITS_PER_WORD);
uint64_t lobits = (Tmp.get_pVal(hiWord-1)) >> (11 + n % APINT_BITS_PER_WORD);
mantissa = hibits | lobits;
}
#pragma empty_line
#pragma empty_line
uint64_t sign = isNeg ? (1ULL << (APINT_BITS_PER_WORD - 1)) : 0;
union {
double __D;
uint64_t __I;
} __T;
__T.__I = sign | ((exp) << 52) | mantissa;
return __T.__D;
}
#pragma empty_line
#pragma empty_line
inline double roundToDouble() const {
return roundToDouble(false);
}
#pragma empty_line
#pragma empty_line
inline double signedRoundToDouble() const {
return roundToDouble(true);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline double bitsToDouble() const {
union {
uint64_t __I;
double __D;
} __T;
__T.__I = pVal[0];
return __T.__D;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float bitsToFloat() const {
union {
uint32_t __I;
float __F;
} __T;
__T.__I = uint32_t(pVal[0]);
return __T.__F;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private& doubleToBits(double __V) {
union {
uint64_t __I;
double __D;
} __T;
__T.__D = __V;
pVal[0] = __T.__I;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private& floatToBits(float __V) {
union {
uint32_t __I;
float __F;
} __T;
__T.__F = __V;
pVal[0] = __T.__I;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool and_reduce() const {
return isMaxValue();
}
#pragma empty_line
inline bool nand_reduce() const {
return isMinValue();
}
#pragma empty_line
inline bool or_reduce() const {
return (bool)countPopulation();
}
#pragma empty_line
inline bool nor_reduce() const {
return countPopulation()==0;
}
#pragma empty_line
inline bool xor_reduce() const {
unsigned int i=countPopulation();
return (i%2)?true:false;
}
#pragma empty_line
inline bool xnor_reduce() const {
unsigned int i=countPopulation();
return (i%2)?false:true;
}
inline std::string to_string(uint8_t radix=16, bool sign=false) const {
return toString(radix, radix==10?_AP_S:sign);
}
};
#pragma empty_line
namespace ap_private_ops {
enum {APINT_BITS_PER_WORD=64};
template<int _AP_W, bool _AP_S>
inline bool operator==(uint64_t V1, const ap_private<_AP_W, _AP_S>& V2) {
return V2 == V1;
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
inline bool operator!=(uint64_t V1, const ap_private<_AP_W, _AP_S>& V2) {
return V2 != V1;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S, int index>
inline bool get(const ap_private<_AP_W, _AP_S>& a) {
static const uint64_t mask=1ULL << (index&0x3f);
return ((mask & a.get_pVal((index)>>6)) != 0);
}
#pragma empty_line
template<int _AP_W, bool _AP_S, int msb_index, int lsb_index>
inline void set(ap_private<_AP_W, _AP_S>& a,
const ap_private<((msb_index) > (1) ? (msb_index) : (1)), true>& mark1 = 0,
const ap_private<((lsb_index) > (1) ? (lsb_index) : (1)), true>& mark2 = 0) {
enum { APINT_BITS_PER_WORD=64,
lsb_word = lsb_index /APINT_BITS_PER_WORD,
msb_word = msb_index / APINT_BITS_PER_WORD,
msb = msb_index % APINT_BITS_PER_WORD,
lsb=lsb_index % APINT_BITS_PER_WORD};
if (msb_word==lsb_word) {
const uint64_t mask = ~0ULL >> (lsb) << (APINT_BITS_PER_WORD-msb+lsb-1)>>(APINT_BITS_PER_WORD-msb-1);
#pragma empty_line
a.get_pVal(msb_word) |= mask;
} else {
const uint64_t lsb_mask = ~0ULL >> (lsb) << (lsb);
const uint64_t msb_mask = ~0ULL << (APINT_BITS_PER_WORD-msb-1)>>(APINT_BITS_PER_WORD-msb-1);
#pragma empty_line
a.get_pVal(lsb_word) |=lsb_mask;
for (int i=lsb_word+1; i<msb_word; i++) {
a.set_pVal(i, ~0ULL);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
a.get_pVal(msb_word) |= msb_mask;
}
a.clearUnusedBits();
}
#pragma empty_line
template<int _AP_W, bool _AP_S, int msb_index, int lsb_index>
inline void clear(ap_private<_AP_W, _AP_S>& a,
const ap_private<((msb_index) > (1) ? (msb_index) : (1)), true>& mark1 = 0,
const ap_private<((lsb_index) > (1) ? (lsb_index) : (1)), true>& mark2 = 0) {
enum { APINT_BITS_PER_WORD=64,
lsb_word = lsb_index /APINT_BITS_PER_WORD,
msb_word = msb_index / APINT_BITS_PER_WORD,
msb = msb_index % APINT_BITS_PER_WORD,
lsb=lsb_index % APINT_BITS_PER_WORD};
if (msb_word == lsb_word) {
const uint64_t mask = ~(~0ULL >> (lsb) << (APINT_BITS_PER_WORD-msb+lsb-1)>>(APINT_BITS_PER_WORD-msb-1));
#pragma empty_line
a.get_pVal(msb_word) &= mask;
} else {
const uint64_t lsb_mask = ~(~0ULL >> (lsb) << (lsb));
const uint64_t msb_mask = ~(~0ULL << (APINT_BITS_PER_WORD-msb-1)>>(APINT_BITS_PER_WORD-msb-1));
#pragma empty_line
a.get_pVal(lsb_word) &=lsb_mask;
for (int i=lsb_word+1; i<msb_word; i++) {
#pragma empty_line
a.get_pVal(i)=0;
}
#pragma empty_line
a.get_pVal(msb_word) &= msb_mask;
}
a.clearUnusedBits();
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S, int index>
inline void set(ap_private<_AP_W, _AP_S>& a,
const ap_private<((index) > (1) ? (index) : (1)), true>& mark = 0) {
enum { APINT_BITS_PER_WORD=64, word = index/APINT_BITS_PER_WORD};
static const uint64_t mask=1ULL << (index%APINT_BITS_PER_WORD);
#pragma empty_line
a.get_pVal(word) |= mask;
a.clearUnusedBits();
}
#pragma empty_line
template<int _AP_W, bool _AP_S, int index>
inline void clear(ap_private<_AP_W, _AP_S>& a,
const ap_private<((index) > (1) ? (index) : (1)), true>& mark = 0) {
enum { APINT_BITS_PER_WORD=64, word = index/APINT_BITS_PER_WORD};
static const uint64_t mask=~(1ULL << (index%APINT_BITS_PER_WORD));
#pragma empty_line
a.get_pVal(word) &= mask;
a.clearUnusedBits();
}
#pragma empty_line
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
std::string ap_private<_AP_W, _AP_S, false>::toString(uint8_t radix, bool wantSigned) const {
(((radix == 10 || radix == 8 || radix == 16 || radix == 2) && "Radix should be 2, 8, 10, or 16!") ? (void)0 : _assert("(radix == 10 || radix == 8 || radix == 16 || radix == 2) && \"Radix should be 2, 8, 10, or 16!\"",
"F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
#pragma line 5566 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
,
5567
#pragma line 5566 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h"
))
;
static const char *digits[] = {
"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"
};
std::string result;
#pragma empty_line
if (radix != 10) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (*this == (uint64_t)(0))
result = "0";
else {
ap_private<_AP_W, false> tmp(*this);
size_t insert_at = 0;
bool leading_zero = true;
if (wantSigned && isNegative()) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
tmp.flip();
tmp++;
tmp.clearUnusedBitsToZero();
result = "-";
insert_at = 1;
leading_zero = false;
}
switch (radix) {
case 2: result += "0b"; break;
case 8: result += "0o"; break;
case 16: result += "0x"; break;
default: (("invalid radix" && 0) ? (void)0 : _assert("\"invalid radix\" && 0", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5600));
}
insert_at += 2;
#pragma empty_line
uint32_t shift = (radix == 16 ? 4 : (radix == 8 ? 3 : 1));
uint64_t mask = radix - 1;
ap_private<_AP_W, false> zero(0);
unsigned bits = 0;
while (tmp.ne(zero)) {
uint64_t digit = tmp.get_VAL() & mask;
result.insert(insert_at, digits[digit]);
tmp = tmp.lshr(shift);
++bits;
}
bits *= shift;
if (bits < _AP_W && leading_zero)
result.insert(insert_at, digits[0]);
}
return result;
}
#pragma empty_line
ap_private<_AP_W, false> tmp(*this);
ap_private<_AP_W, false> divisor(radix);
ap_private<_AP_W, false> zero(0);
size_t insert_at = 0;
if (wantSigned && isNegative()) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
tmp.flip();
tmp++;
tmp.clearUnusedBitsToZero();
result = "-";
insert_at = 1;
}
if (tmp == ap_private<_AP_W, false>(0))
result = "0";
else while (tmp.ne(zero)) {
ap_private<_AP_W, false> APdigit(0);
ap_private<_AP_W, false> tmp2(0);
ap_private_ops::divide(tmp, tmp.getNumWords(), divisor, divisor.getNumWords(), &tmp2,
&APdigit);
uint64_t digit = APdigit.getZExtValue();
((digit < radix && "divide failed") ? (void)0 : _assert("digit < radix && \"divide failed\"", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_private.h", 5643));
result.insert(insert_at,digits[digit]);
tmp = tmp2;
}
#pragma empty_line
return result;
}
#pragma line 98 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h" 2
#pragma line 169 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S> struct ap_range_ref;
template<int _AP_W, bool _AP_S> struct ap_bit_ref;
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q,
ap_o_mode _AP_O, int _AP_N> struct ap_fixed_base;
template<int _AP_W, int _AP_I, bool _AP_S,
ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_range_ref;
template<int _AP_W, int _AP_I, bool _AP_S,
ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_bit_ref;
template<int _AP_W> class ap_uint;
#pragma empty_line
enum {AP_BIN=2,AP_OCT=8,AP_DEC=10,AP_HEX=16};
#pragma line 192 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W1, typename _AP_T1, int _AP_W2, typename _AP_T2>
struct ap_concat_ref {
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum {_AP_WR=_AP_W1+_AP_W2,};
_AP_T1& mbv1;
_AP_T2& mbv2;
#pragma empty_line
inline ap_concat_ref(const ap_concat_ref<_AP_W1, _AP_T1,
_AP_W2, _AP_T2>& ref):
mbv1(ref.mbv1), mbv2(ref.mbv2) {}
#pragma empty_line
inline ap_concat_ref(_AP_T1& bv1, _AP_T2& bv2):mbv1(bv1),mbv2(bv2) {}
#pragma empty_line
#pragma empty_line
template <int _AP_W3, bool _AP_S3>
inline ap_concat_ref& operator = (const ap_private<_AP_W3,_AP_S3>& val) {
ap_private<_AP_W1+_AP_W2, false> vval(val);
int W_ref1=mbv1.length();
int W_ref2=mbv2.length();
ap_private<_AP_W1,false> mask1(-1);
mask1>>=_AP_W1-W_ref1;
ap_private<_AP_W2,false> mask2(-1);
mask2>>=_AP_W2-W_ref2;
mbv1.set(ap_private<_AP_W1,false>((vval>>W_ref2)&mask1));
mbv2.set(ap_private<_AP_W2,false>(vval&mask2));
return *this;
}
#pragma empty_line
#pragma empty_line
inline ap_concat_ref& operator = (unsigned long long val) {
ap_private<_AP_W1+_AP_W2, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
template<int _AP_W3, typename _AP_T3, int _AP_W4, typename _AP_T4>
inline ap_concat_ref& operator =
(const ap_concat_ref <_AP_W3, _AP_T3, _AP_W4, _AP_T4>& val)
{
ap_private<_AP_W1+_AP_W2, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
inline ap_concat_ref& operator =
(const ap_concat_ref <_AP_W1, _AP_T1, _AP_W2, _AP_T2>& val)
{
ap_private<_AP_W1+_AP_W2, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W3, bool _AP_S3>
inline ap_concat_ref& operator =(const ap_bit_ref<_AP_W3, _AP_S3>& val)
{
ap_private<_AP_W1+_AP_W2, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
#pragma empty_line
template <int _AP_W3, bool _AP_S3>
inline ap_concat_ref& operator =(const ap_range_ref<_AP_W3,_AP_S3>& val)
{
ap_private<_AP_W1+_AP_W2, false> tmpVal(val);
return operator =(tmpVal);
}
#pragma empty_line
template<int _AP_W3, int _AP_I3, bool _AP_S3,
ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3>
inline ap_concat_ref& operator= (const af_range_ref<_AP_W3, _AP_I3, _AP_S3,
_AP_Q3, _AP_O3, _AP_N3>& val) {
return operator = ((const ap_private<_AP_W3, false>)(val));
}
#pragma empty_line
template<int _AP_W3, int _AP_I3, bool _AP_S3,
ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3>
inline ap_concat_ref& operator= (const ap_fixed_base<_AP_W3, _AP_I3, _AP_S3,
_AP_Q3, _AP_O3, _AP_N3>& val) {
return operator = (val.to_ap_private());
}
#pragma empty_line
template<int _AP_W3, int _AP_I3, bool _AP_S3,
ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3>
inline ap_concat_ref& operator= (const af_bit_ref<_AP_W3, _AP_I3, _AP_S3,
_AP_Q3, _AP_O3, _AP_N3>& val) {
return operator=((unsigned long long)(bool)(val));
}
#pragma empty_line
#pragma empty_line
inline operator ap_private<_AP_WR, false> () const
{
return get();
}
#pragma empty_line
inline operator unsigned long long () const
{
return get().to_uint64();
}
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_range_ref<_AP_W3, _AP_S3> >
operator, (const ap_range_ref<_AP_W3, _AP_S3> &a2)
{
return ap_concat_ref<_AP_WR, ap_concat_ref,
_AP_W3, ap_range_ref<_AP_W3, _AP_S3> >(*this,
const_cast<ap_range_ref<_AP_W3, _AP_S3> &>(a2));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_private<_AP_W3, _AP_S3> >
operator, (ap_private<_AP_W3, _AP_S3> &a2)
{
return ap_concat_ref<_AP_WR, ap_concat_ref,
_AP_W3, ap_private<_AP_W3, _AP_S3> >(*this, a2);
}
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_private<_AP_W3, _AP_S3> >
operator, (const ap_private<_AP_W3, _AP_S3> &a2)
{
return ap_concat_ref<_AP_WR, ap_concat_ref,
_AP_W3, ap_private<_AP_W3, _AP_S3> >(*this,
const_cast<ap_private<_AP_W3, _AP_S3>&>(a2));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_concat_ref<_AP_WR, ap_concat_ref, 1, ap_bit_ref<_AP_W3, _AP_S3> >
operator, (const ap_bit_ref<_AP_W3, _AP_S3> &a2)
{
return ap_concat_ref<_AP_WR, ap_concat_ref,
1, ap_bit_ref<_AP_W3, _AP_S3> >(*this,
const_cast<ap_bit_ref<_AP_W3, _AP_S3> &>(a2));
}
#pragma empty_line
template<int _AP_W3, typename _AP_T3, int _AP_W4, typename _AP_T4>
inline ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3+_AP_W4, ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,_AP_T4> >
operator, (const ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,_AP_T4> &a2)
{
return ap_concat_ref<_AP_WR, ap_concat_ref,
_AP_W3+_AP_W4, ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,
_AP_T4> >(*this, const_cast<ap_concat_ref<_AP_W3,
_AP_T3,_AP_W4, _AP_T4>& >(a2));
}
#pragma empty_line
template <int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3>
inline
ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, af_range_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> >
operator, (const af_range_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3,
_AP_O3, _AP_N3> &a2) {
return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, af_range_ref<_AP_W3,
_AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> >(*this,
const_cast<af_range_ref<_AP_W3,_AP_I3, _AP_S3, _AP_Q3,
_AP_O3, _AP_N3>& >(a2));
}
#pragma empty_line
template <int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3>
inline
ap_concat_ref<_AP_WR, ap_concat_ref, 1, af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> >
operator, (const af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3,
_AP_O3, _AP_N3> &a2) {
return ap_concat_ref<_AP_WR, ap_concat_ref, 1, af_bit_ref<_AP_W3,
_AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> >(*this,
const_cast<af_bit_ref<_AP_W3,_AP_I3, _AP_S3,
_AP_Q3, _AP_O3, _AP_N3>& >(a2));
}
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_private<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3>
operator & (const ap_private<_AP_W3,_AP_S3>& a2)
{
return get() & a2;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_private<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3>
operator | (const ap_private<_AP_W3,_AP_S3>& a2)
{
return get() | a2;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W3, bool _AP_S3>
inline ap_private<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3>
operator ^ (const ap_private<_AP_W3,_AP_S3>& a2)
{
return ap_private<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3>(get() ^ a2);
}
#pragma empty_line
#pragma empty_line
inline const ap_private<_AP_WR, false> get() const
{
ap_private<_AP_W1+_AP_W2, false> tmpVal = ap_private<_AP_W1+_AP_W2, false> (mbv1.get());
ap_private<_AP_W1+_AP_W2, false> tmpVal2 = ap_private<_AP_W1+_AP_W2, false> (mbv2.get());
int W_ref2 = mbv2.length();
tmpVal <<= W_ref2;
tmpVal |= tmpVal2;
return tmpVal;
}
#pragma empty_line
#pragma empty_line
inline const ap_private<_AP_WR, false> get()
{
ap_private<_AP_W1+_AP_W2, false> tmpVal =ap_private<_AP_W1+_AP_W2, false> ( mbv1.get());
ap_private<_AP_W1+_AP_W2, false> tmpVal2 = ap_private<_AP_W1+_AP_W2, false> (mbv2.get());
int W_ref2 = mbv2.length();
tmpVal <<= W_ref2;
tmpVal |= tmpVal2;
return tmpVal;
}
#pragma empty_line
#pragma empty_line
template <int _AP_W3>
inline void set(const ap_private<_AP_W3,false> & val)
{
ap_private<_AP_W1+_AP_W2, false> vval(val);
int W_ref1=mbv1.length();
int W_ref2=mbv2.length();
ap_private<_AP_W1,false> mask1(-1);
mask1>>=_AP_W1-W_ref1;
ap_private<_AP_W2,false> mask2(-1);
mask2>>=_AP_W2-W_ref2;
mbv1.set(ap_private<_AP_W1,false>((vval>>W_ref2)&mask1));
mbv2.set(ap_private<_AP_W2,false>(vval&mask2));
}
#pragma empty_line
#pragma empty_line
inline int length() const {
return mbv1.length()+mbv2.length();
}
#pragma empty_line
inline std::string to_string(uint8_t radix=2) const {
return get().to_string(radix);
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S>
struct ap_range_ref {
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private<_AP_W,_AP_S> &d_bv;
int l_index;
int h_index;
#pragma empty_line
public:
inline ap_range_ref(const ap_range_ref<_AP_W, _AP_S>& ref):
d_bv(ref.d_bv), l_index(ref.l_index), h_index(ref.h_index) {}
#pragma empty_line
inline ap_range_ref(ap_private<_AP_W,_AP_S>* bv, int h, int l):
d_bv(*bv),l_index(l),h_index(h)
{
if (h < 0 || l < 0)
fprintf((&_iob[2]), "Warning! Higher bound (%d) and lower bound (%d) cannot be negative.\n", h, l);
if (h >= _AP_W || l >= _AP_W)
fprintf((&_iob[2]), "Warning! Higher bound (%d) or lower bound (%d) out of range (%d).\n", h, l, _AP_W);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
inline operator ap_private<_AP_W, false> () const
{
ap_private<_AP_W, false> val(0);
if(h_index>=l_index) {
if (_AP_W > 64) {
val=d_bv;
ap_private<_AP_W,false> mask(-1);
mask>>=_AP_W-(h_index-l_index+1);
val>>=l_index;
val&=mask;
} else {
const static uint64_t mask = (~0ULL>> (64>_AP_W ? (64-_AP_W):0));
val = (d_bv >> l_index) & (mask >>(_AP_W-(h_index-l_index+1)));
}
} else {
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
if((d_bv)[j]) val.set(i);
}
return val;
}
#pragma empty_line
inline operator unsigned long long () const
{
return to_uint64();
}
#pragma empty_line
template<int _AP_W2,bool _AP_S2>
inline ap_range_ref& operator =(const ap_private<_AP_W2,_AP_S2>& val)
{
ap_private<_AP_W,false> vval=ap_private<_AP_W,false>(val);
if(l_index>h_index)
{
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
(vval)[i]? d_bv.set(j):d_bv.clear(j);
} else {
if (_AP_W > 64) {
ap_private<_AP_W,false> mask(-1);
if(l_index>0)
{
mask<<=l_index;
vval<<=l_index;
}
if(h_index<_AP_W-1)
{
ap_private<_AP_W,false> mask2(-1);
mask2>>=_AP_W-h_index-1;
mask&=mask2;
vval&=mask2;
}
mask.flip();
d_bv&=mask;
d_bv|=vval;
} else {
unsigned shift = 64-_AP_W;
uint64_t mask = ~0ULL>>(shift);
if(l_index>0)
{
vval = mask & vval << l_index;
mask = mask & mask << l_index;
}
if(h_index<_AP_W-1)
{
uint64_t mask2 = mask;
mask2 >>= (_AP_W-h_index-1);
mask&=mask2;
vval&=mask2;
}
mask = ~mask;
d_bv&=mask;
d_bv|=vval;
}
}
return *this;
}
#pragma empty_line
inline ap_range_ref& operator = (unsigned long long val)
{
const ap_private<_AP_W,_AP_S> vval=val;
return operator = (vval);
}
#pragma empty_line
#pragma empty_line
inline ap_range_ref& operator =(const ap_range_ref<_AP_W, _AP_S>& val)
{
const ap_private<_AP_W, false> tmpVal(val);
return operator =(tmpVal);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W3, typename _AP_T3, int _AP_W4, typename _AP_T4>
inline ap_range_ref& operator =
(const ap_concat_ref <_AP_W3, _AP_T3, _AP_W4, _AP_T4>& val)
{
const ap_private<_AP_W, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
template <int _AP_W3, bool _AP_S3>
inline ap_range_ref& operator =(const ap_range_ref<_AP_W3,_AP_S3>& val)
{
const ap_private<_AP_W, false> tmpVal(val);
return operator =(tmpVal);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_range_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=((const ap_private<_AP_W2, _AP_S2>)(val));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_range_ref& operator= (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=(val.to_ap_private());
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_range_ref& operator= (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=((unsigned long long)(bool)(val));
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_range_ref& operator= (const ap_bit_ref<_AP_W2, _AP_S2>& val) {
return operator=((unsigned long long)(bool)(val));
}
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline
ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_range_ref<_AP_W2,_AP_S2> >
operator, (const ap_range_ref<_AP_W2,_AP_S2> &a2)
{
return
ap_concat_ref<_AP_W, ap_range_ref, _AP_W2,
ap_range_ref<_AP_W2,_AP_S2> >(*this,
const_cast<ap_range_ref<_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_private<_AP_W2,_AP_S2> >
operator , (ap_private<_AP_W2,_AP_S2>& a2)
{
return
ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, ap_private<_AP_W2,_AP_S2> >(*this, a2);
}
#pragma empty_line
inline ap_concat_ref<_AP_W,ap_range_ref,_AP_W,ap_private<_AP_W,_AP_S> >
operator , (ap_private<_AP_W, _AP_S>& a2)
{
return
ap_concat_ref<_AP_W, ap_range_ref, _AP_W,
ap_private<_AP_W,_AP_S> >(*this, a2);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W2, bool _AP_S2>
inline
ap_concat_ref<_AP_W,ap_range_ref,1,ap_bit_ref<_AP_W2,_AP_S2> >
operator, (const ap_bit_ref<_AP_W2,_AP_S2> &a2)
{
return
ap_concat_ref<_AP_W, ap_range_ref, 1,
ap_bit_ref<_AP_W2,_AP_S2> >(*this, const_cast<ap_bit_ref<
_AP_W2,_AP_S2>& >(a2));
}
#pragma empty_line
#pragma empty_line
template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline
ap_concat_ref<_AP_W, ap_range_ref, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2)
{
return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2+_AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this,
const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3,
_AP_T3>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline
ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, af_range_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_range_ref<_AP_W2,_AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline
ap_concat_ref<_AP_W, ap_range_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<_AP_W, ap_range_ref, 1, af_bit_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_bit_ref<_AP_W2,_AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator == (const ap_range_ref<_AP_W2, _AP_S2>& op2)
{
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs==rhs;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator != (const ap_range_ref<_AP_W2, _AP_S2>& op2)
{
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs!=rhs;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator > (const ap_range_ref<_AP_W2, _AP_S2>& op2)
{
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs>rhs;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator >= (const ap_range_ref<_AP_W2, _AP_S2>& op2)
{
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs>=rhs;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator < (const ap_range_ref<_AP_W2, _AP_S2>& op2)
{
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs<rhs;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator <= (const ap_range_ref<_AP_W2, _AP_S2>& op2)
{
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs<=rhs;
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2>
inline void set(const ap_private<_AP_W2,false>& val)
{
ap_private<_AP_W,_AP_S> vval=val;
if(l_index>h_index)
{
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
(vval)[i]? d_bv.set(j):d_bv.clear(j);
} else {
if (_AP_W>64 ) {
ap_private<_AP_W,_AP_S> mask(-1);
if(l_index>0)
{
ap_private<_AP_W,false> mask1(-1);
mask1>>=_AP_W-l_index;
mask1.flip();
mask=mask1;
#pragma empty_line
vval<<=l_index;
}
if(h_index<_AP_W-1)
{
ap_private<_AP_W,false> mask2(-1);
mask2<<=h_index+1;
mask2.flip();
mask&=mask2;
vval&=mask2;
}
mask.flip();
d_bv&=mask;
d_bv|=vval;
} else {
uint64_t mask = ~0ULL >> (64-_AP_W);
if(l_index>0)
{
uint64_t mask1 = mask;
mask1=mask & (mask1>>(_AP_W-l_index));
vval =mask&( vval <<l_index);
mask=~mask1&mask;
#pragma empty_line
}
if(h_index<_AP_W-1) {
uint64_t mask2 = ~0ULL >> (64-_AP_W);
mask2 = mask &(mask2<<(h_index+1));
mask&=~mask2;
vval&=~mask2;
}
d_bv&=(~mask&(~0ULL >> (64-_AP_W)));
d_bv|=vval;
}
}
}
#pragma empty_line
#pragma empty_line
inline ap_private<_AP_W,false> get() const
{
ap_private<_AP_W,false> val(0);
if(h_index<l_index) {
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
if((d_bv)[j]) val.set(i);
} else {
val=d_bv;
val>>=l_index;
if(h_index<_AP_W-1)
{
if (_AP_W <= 64) {
const static uint64_t mask = (~0ULL>> (64>_AP_W ? (64-_AP_W):0));
val &= (mask>> (_AP_W-(h_index-l_index+1)));
} else {
ap_private<_AP_W,false> mask(-1);
mask>>=_AP_W-(h_index-l_index+1);
val&=mask;
}
}
}
return val;
}
#pragma empty_line
#pragma empty_line
inline ap_private<_AP_W,false> get()
{
ap_private<_AP_W,false> val(0);
if(h_index<l_index) {
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
if((d_bv)[j]) val.set(i);
} else {
val=d_bv;
val>>=l_index;
if(h_index<_AP_W-1)
{
if (_AP_W <= 64 ) {
static const uint64_t mask = ~0ULL>> (64>_AP_W ? (64-_AP_W):0);
return val &= ( (mask) >> (_AP_W - (h_index-l_index+1)));
} else {
ap_private<_AP_W,false> mask(-1);
mask>>=_AP_W-(h_index-l_index+1);
val&=mask;
}
}
}
return val;
}
#pragma empty_line
#pragma empty_line
inline int length() const
{
return h_index>=l_index?h_index-l_index+1:l_index-h_index+1;
}
#pragma empty_line
#pragma empty_line
inline int to_int() const
{
ap_private<_AP_W,false> val=get();
return val.to_int();
}
#pragma empty_line
#pragma empty_line
inline unsigned int to_uint() const
{
ap_private<_AP_W,false> val=get();
return val.to_uint();
}
#pragma empty_line
#pragma empty_line
inline long to_long() const
{
ap_private<_AP_W,false> val=get();
return val.to_long();
}
#pragma empty_line
#pragma empty_line
inline unsigned long to_ulong() const
{
ap_private<_AP_W,false> val=get();
return val.to_ulong();
}
#pragma empty_line
#pragma empty_line
inline ap_slong to_int64() const
{
ap_private<_AP_W,false> val=get();
return val.to_int64();
}
#pragma empty_line
#pragma empty_line
inline ap_ulong to_uint64() const
{
ap_private<_AP_W,false> val=get();
return val.to_uint64();
}
#pragma empty_line
inline std::string to_string(uint8_t radix=2) const {
return get().to_string(radix);
}
#pragma empty_line
inline bool and_reduce() {
bool ret = true;
bool reverse = l_index > h_index;
unsigned low = reverse ? h_index : l_index;
unsigned high = reverse ? l_index : h_index;
for (unsigned i = low; i != high; ++i)
ret &= d_bv[i];
return ret;
}
#pragma empty_line
inline bool or_reduce() {
bool ret = false;
bool reverse = l_index > h_index;
unsigned low = reverse ? h_index : l_index;
unsigned high = reverse ? l_index : h_index;
for (unsigned i = low; i != high; ++i)
ret |= d_bv[i];
return ret;
}
#pragma empty_line
inline bool xor_reduce() {
bool ret = false;
bool reverse = l_index > h_index;
unsigned low = reverse ? h_index : l_index;
unsigned high = reverse ? l_index : h_index;
for (unsigned i = low; i != high; ++i)
ret ^= d_bv[i];
return ret;
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int _AP_W, bool _AP_S>
struct ap_bit_ref {
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private<_AP_W,_AP_S>& d_bv;
int d_index;
#pragma empty_line
public:
inline ap_bit_ref(const ap_bit_ref<_AP_W, _AP_S>& ref):
d_bv(ref.d_bv), d_index(ref.d_index) {}
#pragma empty_line
inline ap_bit_ref(ap_private<_AP_W,_AP_S>& bv, int index=0):
d_bv(bv),d_index(index)
{
if (d_index < 0 )
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) cannot be negative.\n", d_index);
if (d_index >= _AP_W)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", d_index, _AP_W);
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
inline operator bool () const
{
return d_bv.get_bit(d_index);
}
#pragma empty_line
#pragma empty_line
inline bool to_bool() const
{
return operator bool ();
}
#pragma empty_line
#pragma empty_line
inline ap_bit_ref& operator = (unsigned long long val)
{
if(val)
d_bv.set(d_index);
else
d_bv.clear(d_index);
return *this;
}
#pragma line 971 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref& operator =(const ap_private<_AP_W2,_AP_S2>& val)
{
return operator =((unsigned long long)(val != 0));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref& operator =(const ap_bit_ref<_AP_W2,_AP_S2>& val)
{
return operator =((unsigned long long)(bool)val);
}
#pragma empty_line
inline ap_bit_ref& operator =(const ap_bit_ref<_AP_W,_AP_S>& val)
{
return operator =((unsigned long long)(bool)val);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_bit_ref& operator =(const ap_range_ref<_AP_W2,_AP_S2>& val)
{
return operator =((unsigned long long)(bool) val);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_bit_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=((const ap_private<_AP_W2, false>)(val));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_bit_ref& operator= (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=((unsigned long long)(bool)(val));
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_bit_ref& operator= (const ap_concat_ref<_AP_W2, _AP_T3, _AP_W3, _AP_T3>& val) {
return operator=((const ap_private<_AP_W2 + _AP_W3, false>)(val));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_private<_AP_W2,_AP_S2> >
operator , (ap_private<_AP_W2, _AP_S2>& a2)
{
return ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_private<_AP_W2,_AP_S2> >(*this, a2);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_range_ref<_AP_W2,_AP_S2> >
operator, (const ap_range_ref<_AP_W2, _AP_S2> &a2)
{
return
ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_range_ref<_AP_W2,_AP_S2> >(*this,
const_cast<ap_range_ref<_AP_W2, _AP_S2> &>(a2));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_concat_ref<1, ap_bit_ref, 1, ap_bit_ref<_AP_W2,_AP_S2> >
operator, (const ap_bit_ref<_AP_W2, _AP_S2> &a2)
{
return
ap_concat_ref<1, ap_bit_ref, 1, ap_bit_ref<_AP_W2,_AP_S2> >(*this,
const_cast<ap_bit_ref<_AP_W2, _AP_S2> &>(a2));
}
#pragma empty_line
#pragma empty_line
inline ap_concat_ref<1, ap_bit_ref, 1, ap_bit_ref >
operator, (const ap_bit_ref &a2)
{
return
ap_concat_ref<1, ap_bit_ref, 1, ap_bit_ref >(*this,
const_cast<ap_bit_ref&>(a2));
}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_concat_ref<1, ap_bit_ref, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3> >
operator, (const ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3> &a2)
{
return
ap_concat_ref<1,ap_bit_ref,_AP_W2+_AP_W3,
ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3> >(*this,
const_cast<ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline
ap_concat_ref<1, ap_bit_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<1, ap_bit_ref, _AP_W2, af_range_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_range_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline
ap_concat_ref<1, ap_bit_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &a2) {
return ap_concat_ref<1, ap_bit_ref, 1, af_bit_ref<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& >(a2));
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator == (const ap_bit_ref<_AP_W2, _AP_S2>& op) {
return get() == op.get();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator != (const ap_bit_ref<_AP_W2, _AP_S2>& op) {
return get() != op.get();
}
#pragma empty_line
#pragma empty_line
inline bool get() const
{
return operator bool ();
}
#pragma empty_line
#pragma empty_line
inline bool get()
{
return operator bool ();
}
#pragma empty_line
#pragma empty_line
template <int _AP_W3>
inline void set(const ap_private<_AP_W3, false>& val)
{
operator = (val);
}
#pragma empty_line
inline bool operator ~ () const {
bool bit = (d_bv)[d_index];
return bit ? false : true;
}
#pragma empty_line
inline int length() const { return 1; }
#pragma empty_line
inline std::string to_string() const {
bool val = get();
return val ? "1" : "0";
}
};
#pragma line 1146 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline PTR_TYPE* operator + (PTR_TYPE* i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op + op2; } template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline PTR_TYPE* operator + (const ap_private<_AP_W,_AP_S> &op, PTR_TYPE* i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 + i_op; }
template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline PTR_TYPE* operator - (PTR_TYPE* i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op - op2; } template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline PTR_TYPE* operator - (const ap_private<_AP_W,_AP_S> &op, PTR_TYPE* i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 - i_op; }
#pragma line 1171 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S> inline float operator * (float i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline float operator * (const ap_private<_AP_W,_AP_S> &op, float i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 * i_op; } template<int _AP_W, bool _AP_S> inline float operator / (float i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline float operator / (const ap_private<_AP_W,_AP_S> &op, float i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 / i_op; } template<int _AP_W, bool _AP_S> inline float operator + (float i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline float operator + (const ap_private<_AP_W,_AP_S> &op, float i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 + i_op; } template<int _AP_W, bool _AP_S> inline float operator - (float i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline float operator - (const ap_private<_AP_W,_AP_S> &op, float i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 - i_op; }
template<int _AP_W, bool _AP_S> inline double operator * (double i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline double operator * (const ap_private<_AP_W,_AP_S> &op, double i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 * i_op; } template<int _AP_W, bool _AP_S> inline double operator / (double i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline double operator / (const ap_private<_AP_W,_AP_S> &op, double i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 / i_op; } template<int _AP_W, bool _AP_S> inline double operator + (double i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline double operator + (const ap_private<_AP_W,_AP_S> &op, double i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 + i_op; } template<int _AP_W, bool _AP_S> inline double operator - (double i_op, const ap_private<_AP_W,_AP_S> &op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline double operator - (const ap_private<_AP_W,_AP_S> &op, double i_op) { typename ap_private<_AP_W,_AP_S>::ValType op2 = op; return op2 - i_op; }
#pragma line 1270 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::mult operator * ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator * (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::plus operator + ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator + (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::minus operator - ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator - (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::div operator / ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::div operator / ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator / (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::mod operator % ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator % (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::logic operator & ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator & (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::logic operator | ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator | (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1,false>::template RType<_AP_W,_AP_S>::logic operator ^ ( bool i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<1,false>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator ^ (ap_private<1,false>(i_op)); } template<int _AP_W, bool _AP_S> bool operator >> ( bool i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> bool operator << ( bool i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<1,false>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, bool i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator == (ap_private<1, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( bool op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<1,false>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator != (ap_private<1, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( bool op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<1,false>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator > (ap_private<1, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( bool op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<1,false>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator >= (ap_private<1, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( bool op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<1,false>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator < (ap_private<1, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( bool op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<1,false>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator <= (ap_private<1, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( bool op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<1,false>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator += (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator -= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator *= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator /= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator %= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator &= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator |= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, bool op2) { return op.operator ^= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, bool op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, bool op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::mult operator * ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator * (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::plus operator + ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator + (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::minus operator - ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator - (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::div operator / ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::div operator / ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator / (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::mod operator % ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator % (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::logic operator & ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator & (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::logic operator | ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator | (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::logic operator ^ ( char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator ^ (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> char operator >> ( char i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> char operator << ( char i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, char i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator == (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator != (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator > (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator >= (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator < (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator <= (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator += (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator -= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator *= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator /= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator %= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator &= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator |= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, char op2) { return op.operator ^= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, char op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, char op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::mult operator * ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator * (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::plus operator + ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator + (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::minus operator - ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator - (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::div operator / ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::div operator / ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator / (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::mod operator % ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator % (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::logic operator & ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator & (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::logic operator | ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator | (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,true>::template RType<_AP_W,_AP_S>::logic operator ^ ( signed char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,true>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator ^ (ap_private<8,true>(i_op)); } template<int _AP_W, bool _AP_S> signed char operator >> ( signed char i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> signed char operator << ( signed char i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,true>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, signed char i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator == (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( signed char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator != (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( signed char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator > (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( signed char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator >= (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( signed char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator < (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( signed char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator <= (ap_private<8, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( signed char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,true>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator += (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator -= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator *= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator /= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator %= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator &= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator |= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { return op.operator ^= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, signed char op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::mult operator * ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator * (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::plus operator + ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator + (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::minus operator - ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator - (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::div operator / ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::div operator / ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator / (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::mod operator % ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator % (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::logic operator & ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator & (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::logic operator | ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator | (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8,false>::template RType<_AP_W,_AP_S>::logic operator ^ ( unsigned char i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<8,false>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator ^ (ap_private<8,false>(i_op)); } template<int _AP_W, bool _AP_S> unsigned char operator >> ( unsigned char i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> unsigned char operator << ( unsigned char i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<8,false>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, unsigned char i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator == (ap_private<8, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,false>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator != (ap_private<8, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,false>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator > (ap_private<8, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,false>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator >= (ap_private<8, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,false>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator < (ap_private<8, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,false>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator <= (ap_private<8, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned char op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<8,false>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator += (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator -= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator *= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator /= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator %= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator &= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator |= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator ^= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, unsigned char op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::mult operator * ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator * (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::plus operator + ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator + (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::minus operator - ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator - (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::div operator / ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::div operator / ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator / (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::mod operator % ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator % (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::logic operator & ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator & (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::logic operator | ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator | (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,true>::template RType<_AP_W,_AP_S>::logic operator ^ ( short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,true>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator ^ (ap_private<16,true>(i_op)); } template<int _AP_W, bool _AP_S> short operator >> ( short i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> short operator << ( short i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,true>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, short i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator == (ap_private<16, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,true>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator != (ap_private<16, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,true>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator > (ap_private<16, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,true>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator >= (ap_private<16, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,true>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator < (ap_private<16, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,true>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator <= (ap_private<16, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,true>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator += (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator -= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator *= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator /= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator %= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator &= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator |= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, short op2) { return op.operator ^= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, short op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, short op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::mult operator * ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator * (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::plus operator + ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator + (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::minus operator - ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator - (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::div operator / ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::div operator / ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator / (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::mod operator % ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator % (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::logic operator & ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator & (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::logic operator | ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator | (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16,false>::template RType<_AP_W,_AP_S>::logic operator ^ ( unsigned short i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<16,false>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator ^ (ap_private<16,false>(i_op)); } template<int _AP_W, bool _AP_S> unsigned short operator >> ( unsigned short i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> unsigned short operator << ( unsigned short i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<16,false>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, unsigned short i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator == (ap_private<16, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,false>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator != (ap_private<16, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,false>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator > (ap_private<16, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,false>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator >= (ap_private<16, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,false>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator < (ap_private<16, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,false>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator <= (ap_private<16, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned short op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<16,false>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator += (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator -= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator *= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator /= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator %= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator &= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator |= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator ^= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, unsigned short op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::mult operator * ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator * (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::plus operator + ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator + (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::minus operator - ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator - (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::div operator / ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::div operator / ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator / (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::mod operator % ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator % (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::logic operator & ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator & (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::logic operator | ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator | (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::logic operator ^ ( int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator ^ (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> int operator >> ( int i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> int operator << ( int i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, int i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator == (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator != (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator > (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator >= (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator < (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator <= (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator += (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator -= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator *= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator /= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator %= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator &= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator |= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, int op2) { return op.operator ^= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, int op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, int op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::mult operator * ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator * (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::plus operator + ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator + (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::minus operator - ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator - (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::div operator / ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::div operator / ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator / (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::mod operator % ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator % (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::logic operator & ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator & (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::logic operator | ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator | (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::logic operator ^ ( unsigned int i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator ^ (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> unsigned int operator >> ( unsigned int i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> unsigned int operator << ( unsigned int i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, unsigned int i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator == (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator != (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator > (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator >= (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator < (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator <= (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned int op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator += (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator -= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator *= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator /= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator %= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator &= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator |= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator ^= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, unsigned int op2) { op = op.operator << (op2); return op; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::mult operator * ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator * (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::plus operator + ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator + (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::minus operator - ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator - (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::div operator / ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::div operator / ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator / (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::mod operator % ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator % (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::logic operator & ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator & (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::logic operator | ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator | (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,true>::template RType<_AP_W,_AP_S>::logic operator ^ ( long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,true>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator ^ (ap_private<32,true>(i_op)); } template<int _AP_W, bool _AP_S> long operator >> ( long i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> long operator << ( long i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,true>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, long i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator == (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator != (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator > (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator >= (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator < (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator <= (ap_private<32, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,true>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator += (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator -= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator *= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator /= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator %= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator &= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator |= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, long op2) { return op.operator ^= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, long op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, long op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::mult operator * ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator * (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::plus operator + ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator + (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::minus operator - ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator - (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::div operator / ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::div operator / ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator / (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::mod operator % ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator % (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::logic operator & ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator & (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::logic operator | ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator | (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32,false>::template RType<_AP_W,_AP_S>::logic operator ^ ( unsigned long i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<32,false>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator ^ (ap_private<32,false>(i_op)); } template<int _AP_W, bool _AP_S> unsigned long operator >> ( unsigned long i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> unsigned long operator << ( unsigned long i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<32,false>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, unsigned long i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator == (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator != (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator > (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator >= (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator < (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator <= (ap_private<32, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned long op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<32,false>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator += (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator -= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator *= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator /= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator %= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator &= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator |= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator ^= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, unsigned long op2) { op = op.operator << (op2); return op; }
#pragma empty_line
template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::mult operator * ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator * (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::plus operator + ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator + (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::minus operator - ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator - (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::div operator / ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::div operator / ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator / (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::mod operator % ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator % (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::logic operator & ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator & (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::logic operator | ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator | (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,true>::template RType<_AP_W,_AP_S>::logic operator ^ ( ap_slong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,true>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator ^ (ap_private<64,true>(i_op)); } template<int _AP_W, bool _AP_S> ap_slong operator >> ( ap_slong i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> ap_slong operator << ( ap_slong i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,true>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, ap_slong i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator == (ap_private<64, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( ap_slong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,true>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator != (ap_private<64, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( ap_slong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,true>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator > (ap_private<64, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( ap_slong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,true>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator >= (ap_private<64, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( ap_slong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,true>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator < (ap_private<64, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( ap_slong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,true>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator <= (ap_private<64, true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( ap_slong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,true>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator += (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator -= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator *= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator /= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator %= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator &= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator |= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator ^= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, ap_slong op2) { op = op.operator << (op2); return op; }
template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::mult operator * ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator * (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::mult operator * ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator * (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::plus operator + ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator + (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::plus operator + ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator + (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::minus operator - ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator - (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::minus operator - ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator - (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::div operator / ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator / (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::div operator / ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator / (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::mod operator % ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator % (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::mod operator % ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator % (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::logic operator & ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator & (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::logic operator & ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator & (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::logic operator | ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator | (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::logic operator | ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator | (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64,false>::template RType<_AP_W,_AP_S>::logic operator ^ ( ap_ulong i_op, const ap_private<_AP_W,_AP_S> &op) { return ap_private<64,false>(i_op).operator ^ (op); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::logic operator ^ ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator ^ (ap_private<64,false>(i_op)); } template<int _AP_W, bool _AP_S> ap_ulong operator >> ( ap_ulong i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op >> (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::arg1 operator >> ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator >> (i_op); } template<int _AP_W, bool _AP_S> ap_ulong operator << ( ap_ulong i_op, const ap_private<_AP_W,_AP_S, false> &op) { return i_op << (op.get_VAL()); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W,_AP_S>::template RType<64,false>::arg1 operator << ( const ap_private<_AP_W,_AP_S> &op, ap_ulong i_op) { return op.operator << (i_op); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator == (ap_private<64, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( ap_ulong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,false>(op2).operator == (op); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator != (ap_private<64, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( ap_ulong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,false>(op2).operator != (op); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator > (ap_private<64, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( ap_ulong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,false>(op2).operator > (op); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator >= (ap_private<64, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( ap_ulong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,false>(op2).operator >= (op); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator < (ap_private<64, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( ap_ulong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,false>(op2).operator < (op); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator <= (ap_private<64, false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( ap_ulong op2, const ap_private<_AP_W,_AP_S, false> &op) { return ap_private<64,false>(op2).operator <= (op); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator += ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator += (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator -= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator -= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator *= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator *= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator /= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator /= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator %= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator %= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator &= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator &= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator |= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator |= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator ^= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator ^= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator >>= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { op = op.operator >> (op2); return op; } template<int _AP_W, bool _AP_S> inline ap_private<_AP_W,_AP_S> &operator <<= ( ap_private<_AP_W,_AP_S> &op, ap_ulong op2) { op = op.operator << (op2); return op; }
#pragma line 1324 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator += ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator += (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator += (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator += (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator -= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator -= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator -= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator -= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator *= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator *= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator *= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator *= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator /= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator /= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator /= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator /= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator %= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator %= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator %= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator %= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator >>= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >>= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator >>= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator >>= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator <<= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <<= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator <<= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator <<= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator &= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator &= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator &= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator &= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator |= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator |= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator |= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator |= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator ^= ( ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator ^= (ap_private<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_range_ref<_AP_W1,_AP_S1>& operator ^= (ap_range_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<_AP_W1, false> tmp(op1); tmp.operator ^= (op2); op1 = tmp; return op1; }
#pragma empty_line
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator == (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator == (op2.operator ap_private<_AP_W2, false>()); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator != (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator != (op2.operator ap_private<_AP_W2, false>()); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator > (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator > (op2.operator ap_private<_AP_W2, false>()); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator >= (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >= (op2.operator ap_private<_AP_W2, false>()); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator < (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator < (op2.operator ap_private<_AP_W2, false>()); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator <= (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <= (op2.operator ap_private<_AP_W2, false>()); }
#pragma empty_line
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::plus operator + ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator + (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::plus operator + ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator + (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::minus operator - ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator - (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::minus operator - ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator - (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mult operator * ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator * (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mult operator * ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator * (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::div operator / ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator / (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::div operator / ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator / (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mod operator % ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator % (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mod operator % ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator % (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator >> ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator >> (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator >> ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >> (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator << ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator << (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator << ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator << (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator & ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator & (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator & ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator & (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator | ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator | (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator | ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator | (ap_private<_AP_W2, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator ^ ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1, false>(op1).operator ^ (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator ^ ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator ^ (ap_private<_AP_W2, false>(op2)); }
#pragma line 1389 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator += ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator += (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator += ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator += (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator -= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator -= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator -= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator -= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator *= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator *= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator *= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator *= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator /= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator /= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator /= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator /= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator %= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator %= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator %= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator %= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator >>= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >>= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator >>= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator >>= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator <<= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <<= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator <<= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator <<= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator &= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator &= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator &= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator &= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator |= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator |= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator |= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator |= (op2); op1 = tmp; return op1; }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W1,_AP_S1>& operator ^= ( ap_private<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator ^= (ap_private<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline ap_bit_ref<_AP_W1,_AP_S1>& operator ^= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_private<_AP_W2,_AP_S2>& op2) { ap_private<1, false> tmp(op1); tmp.operator ^= (op2); op1 = tmp; return op1; }
#pragma empty_line
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator == (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator == (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator != (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator != (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator > (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator > (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator >= (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >= (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator < (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator < (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<_AP_W1,false>(op1).operator <= (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <= (ap_private<1, false>(op2)); }
#pragma empty_line
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::plus operator + ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator + (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::plus operator + ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator + (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::minus operator - ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator - (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::minus operator - ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator - (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::mult operator * ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator * (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::mult operator * ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator * (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::div operator / ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator / (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::div operator / ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator / (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::mod operator % ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator % (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::mod operator % ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator % (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::arg1 operator >> ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator >> (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::arg1 operator >> ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >> (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::arg1 operator << ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator << (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::arg1 operator << ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator << (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::logic operator & ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator & (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::logic operator & ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator & (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::logic operator | ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator | (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::logic operator | ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator | (ap_private<1, false>(op2)); }
template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<1, false>::template RType<_AP_W2,_AP_S2>::logic operator ^ ( const ap_bit_ref<_AP_W1,_AP_S1>& op1, const ap_private<_AP_W2,_AP_S2>& op2) { return ap_private<1, false>(op1).operator ^ (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W1,_AP_S1>::template RType<1,false>::logic operator ^ ( const ap_private<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator ^ (ap_private<1, false>(op2)); }
#pragma line 1452 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<1,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( bool op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<1,false>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<1,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( bool op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<1,false>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<1,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( bool op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<1,false>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<1,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( bool op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<1,false>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<1,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( bool op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<1,false>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<1,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( bool op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<1,false>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( signed char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( signed char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( signed char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( signed char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( signed char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<8,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( signed char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,true>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<8,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( unsigned char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,false>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<8,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( unsigned char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,false>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<8,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( unsigned char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,false>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<8,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( unsigned char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,false>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<8,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( unsigned char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,false>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<8,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( unsigned char op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<8,false>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<16,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,true>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<16,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,true>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<16,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,true>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<16,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,true>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<16,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,true>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<16,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,true>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<16,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( unsigned short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,false>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<16,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( unsigned short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,false>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<16,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( unsigned short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,false>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<16,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( unsigned short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,false>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<16,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( unsigned short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,false>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<16,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( unsigned short op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<16,false>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( unsigned int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( unsigned int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( unsigned int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( unsigned int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( unsigned int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( unsigned int op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<32,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,true>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( unsigned long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( unsigned long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( unsigned long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( unsigned long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( unsigned long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<32,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( unsigned long op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<32,false>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
#pragma empty_line
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<64,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( ap_slong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,true>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<64,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( ap_slong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,true>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<64,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( ap_slong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,true>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<64,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( ap_slong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,true>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<64,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( ap_slong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,true>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<64,true>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( ap_slong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,true>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator > ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline bool operator > ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator > (ap_private<64,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator > ( ap_ulong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,false>(op2).operator > (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator < ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline bool operator < ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator < (ap_private<64,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator < ( ap_ulong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,false>(op2).operator < (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline bool operator >= ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator >= (ap_private<64,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator >= ( ap_ulong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,false>(op2).operator >= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline bool operator <= ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator <= (ap_private<64,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator <= ( ap_ulong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,false>(op2).operator <= (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator == ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline bool operator == ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator == (ap_private<64,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator == ( ap_ulong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,false>(op2).operator == (ap_private<_AP_W + _AP_W1, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline bool operator != ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline bool operator != ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_private<_AP_W + _AP_W1, false>(op)).operator != (ap_private<64,false>(op2)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline bool operator != ( ap_ulong op2, const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op) { return ap_private<64,false>(op2).operator != (ap_private<_AP_W + _AP_W1, false>(op)); }
#pragma line 1494 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::plus operator + ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::minus operator - ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::mult operator * ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::div operator / ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::mod operator % ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::arg1 operator >> ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::arg1 operator << ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::logic operator & ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::logic operator | ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<1,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<1, false>::template RType<_AP_W,false>::logic operator ^ ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<1,false>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::plus operator + ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::minus operator - ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::mult operator * ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::div operator / ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::mod operator % ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::arg1 operator >> ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::arg1 operator << ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::logic operator & ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::logic operator | ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::logic operator ^ ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::plus operator + ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::minus operator - ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::mult operator * ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::div operator / ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::mod operator % ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::arg1 operator >> ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::arg1 operator << ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::logic operator & ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::logic operator | ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, true>::template RType<_AP_W,false>::logic operator ^ ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,true>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::plus operator + ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::minus operator - ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::mult operator * ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::div operator / ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::mod operator % ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::arg1 operator << ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::logic operator & ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::logic operator | ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<8,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<8, false>::template RType<_AP_W,false>::logic operator ^ ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<8,false>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::plus operator + ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::minus operator - ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::mult operator * ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::div operator / ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::mod operator % ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::arg1 operator >> ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::arg1 operator << ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::logic operator & ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::logic operator | ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, true>::template RType<_AP_W,false>::logic operator ^ ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,true>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::plus operator + ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::minus operator - ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::mult operator * ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::div operator / ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::mod operator % ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::arg1 operator << ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::logic operator & ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::logic operator | ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<16,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<16, false>::template RType<_AP_W,false>::logic operator ^ ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<16,false>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::plus operator + ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::minus operator - ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::mult operator * ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::div operator / ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::mod operator % ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::arg1 operator >> ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::arg1 operator << ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::logic operator & ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::logic operator | ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::logic operator ^ ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::plus operator + ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::minus operator - ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::mult operator * ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::div operator / ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::mod operator % ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::arg1 operator << ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::logic operator & ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::logic operator | ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::logic operator ^ ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::plus operator + ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::minus operator - ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::mult operator * ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::div operator / ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::mod operator % ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::arg1 operator >> ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::arg1 operator << ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::logic operator & ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::logic operator | ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, true>::template RType<_AP_W,false>::logic operator ^ ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,true>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::plus operator + ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::minus operator - ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::mult operator * ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::div operator / ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::mod operator % ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::arg1 operator << ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::logic operator & ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::logic operator | ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<32,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<32, false>::template RType<_AP_W,false>::logic operator ^ ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<32,false>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
#pragma empty_line
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::plus operator + ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::minus operator - ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::mult operator * ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::div operator / ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::mod operator % ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::arg1 operator >> ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::arg1 operator << ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::logic operator & ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::logic operator | ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, true>::template RType<_AP_W,false>::logic operator ^ ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,true>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator + (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::plus operator + ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator + (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator - (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::minus operator - ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator - (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator * (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::mult operator * ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator * (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator / (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::div operator / ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator / (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator % (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::mod operator % ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator % (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator >> (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::arg1 operator >> ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator >> (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator << (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::arg1 operator << ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator << (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator & (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::logic operator & ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator & (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator | (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::logic operator | ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator | (ap_private<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline typename ap_private<_AP_W, false>::template RType<64,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator ^ (ap_private<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline typename ap_private<64, false>::template RType<_AP_W,false>::logic operator ^ ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_private<64,false>(op2).operator ^ (ap_private<_AP_W, false>(op)); }
#pragma line 1519 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::plus operator + (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator + (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::minus operator - (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator - (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::mult operator * (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator * (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::div operator / (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator / (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::mod operator % (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator % (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::arg1 operator >> (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator >> (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::arg1 operator << (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator << (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::logic operator & (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator & (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::logic operator | (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator | (ap_private<_AP_W2, false>(rhs)); }
template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline typename ap_private<_AP_W, false>::template RType<_AP_W2, false>::logic operator ^ (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_private<_AP_W,false>(lhs).operator ^ (ap_private<_AP_W2, false>(rhs)); }
#pragma line 1671 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 1, false > operator, (const ap_private<_AP_W, _AP_S> &op1, bool op2) { ap_private<1 + _AP_W, false> val(op2); ap_private<1 + _AP_W, false> ret(op1); ret <<= 1; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 1, false > operator, (bool op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<1 + _AP_W, false> val(op1); ap_private<1 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 1; ret >>= 1; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 1, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, bool op2) { ap_private<1 + _AP_W, false> val(op2); ap_private<1 + _AP_W, false> ret(op1); ret <<= 1; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 1, false > operator, (bool op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<1 + _AP_W, false> val(op1); ap_private<1 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<1 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, bool op2) { ap_private<1 + 1, false> val(op2); val[1] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<1 + 1, false > operator, (bool op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<1 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 1, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, bool op2) { ap_private<1 + _AP_W + _AP_W2, false> val(op2); ap_private<1 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 1; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 1, false > operator, (bool op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<1 + _AP_W + _AP_W2, false> val(op1); ap_private<1 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 1, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, bool op2) { ap_private<1 + _AP_W, false> val(op2); ap_private<1 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 1; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 1, false > operator, (bool op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<1 + _AP_W, false> val(op1); ap_private<1 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 1, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, bool op2) { ap_private<1 + 1, false> val(op2); val[1] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 1, false> operator, (bool op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<1 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (const ap_private<_AP_W, _AP_S> &op1, char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (char op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, char op2) { ap_private<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<8 + 1, false > operator, (char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, char op2) { ap_private<8 + _AP_W + _AP_W2, true> val(op2); ap_private<8 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 8, false > operator, (char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<8 + _AP_W + _AP_W2, true> val(op1); ap_private<8 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 8, false > operator, (char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, char op2) { ap_private<8 + 1, true> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 8, false> operator, (char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<8 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (const ap_private<_AP_W, _AP_S> &op1, signed char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (signed char op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, signed char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (signed char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, signed char op2) { ap_private<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<8 + 1, false > operator, (signed char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, signed char op2) { ap_private<8 + _AP_W + _AP_W2, true> val(op2); ap_private<8 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 8, false > operator, (signed char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<8 + _AP_W + _AP_W2, true> val(op1); ap_private<8 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, signed char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 8, false > operator, (signed char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, signed char op2) { ap_private<8 + 1, true> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 8, false> operator, (signed char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<8 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (const ap_private<_AP_W, _AP_S> &op1, unsigned char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); ret <<= 8; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (unsigned char op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); ret <<= 8; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 8, false > operator, (unsigned char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned char op2) { ap_private<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<8 + 1, false > operator, (unsigned char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned char op2) { ap_private<8 + _AP_W + _AP_W2, false> val(op2); ap_private<8 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 8, false > operator, (unsigned char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<8 + _AP_W + _AP_W2, false> val(op1); ap_private<8 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned char op2) { ap_private<8 + _AP_W, false> val(op2); ap_private<8 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 8, false > operator, (unsigned char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<8 + _AP_W, false> val(op1); ap_private<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned char op2) { ap_private<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 8, false> operator, (unsigned char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (const ap_private<_AP_W, _AP_S> &op1, short op2) { ap_private<16 + _AP_W, false> val(op2); ap_private<16 + _AP_W, false> ret(op1); ret <<= 16; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (short op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<16 + _AP_W, false> val(op1); ap_private<16 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 16; ret >>= 16; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, short op2) { ap_private<16 + _AP_W, false> val(op2); ap_private<16 + _AP_W, false> ret(op1); ret <<= 16; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (short op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<16 + _AP_W, false> val(op1); ap_private<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<16 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, short op2) { ap_private<16 + 1, false> val(op2); val[16] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<16 + 1, false > operator, (short op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<16 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 16, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, short op2) { ap_private<16 + _AP_W + _AP_W2, true> val(op2); ap_private<16 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 16; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 16, false > operator, (short op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<16 + _AP_W + _AP_W2, true> val(op1); ap_private<16 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 16, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, short op2) { ap_private<16 + _AP_W, false> val(op2); ap_private<16 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 16; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 16, false > operator, (short op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<16 + _AP_W, false> val(op1); ap_private<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 16, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, short op2) { ap_private<16 + 1, true> val(op2); val[16] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 16, false> operator, (short op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<16 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (const ap_private<_AP_W, _AP_S> &op1, unsigned short op2) { ap_private<16 + _AP_W, false> val(op2); ap_private<16 + _AP_W, false> ret(op1); ret <<= 16; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (unsigned short op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<16 + _AP_W, false> val(op1); ap_private<16 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 16; ret >>= 16; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned short op2) { ap_private<16 + _AP_W, false> val(op2); ap_private<16 + _AP_W, false> ret(op1); ret <<= 16; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 16, false > operator, (unsigned short op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<16 + _AP_W, false> val(op1); ap_private<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<16 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned short op2) { ap_private<16 + 1, false> val(op2); val[16] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<16 + 1, false > operator, (unsigned short op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<16 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 16, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned short op2) { ap_private<16 + _AP_W + _AP_W2, false> val(op2); ap_private<16 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 16; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 16, false > operator, (unsigned short op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<16 + _AP_W + _AP_W2, false> val(op1); ap_private<16 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 16, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned short op2) { ap_private<16 + _AP_W, false> val(op2); ap_private<16 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 16; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 16, false > operator, (unsigned short op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<16 + _AP_W, false> val(op1); ap_private<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 16, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned short op2) { ap_private<16 + 1, false> val(op2); val[16] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 16, false> operator, (unsigned short op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<16 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_private<_AP_W, _AP_S> &op1, int op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (int op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 32; ret >>= 32; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, int op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (int op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, int op2) { ap_private<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (int op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, int op2) { ap_private<32 + _AP_W + _AP_W2, true> val(op2); ap_private<32 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 32; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (int op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<32 + _AP_W + _AP_W2, true> val(op1); ap_private<32 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, int op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 32; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (int op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, int op2) { ap_private<32 + 1, true> val(op2); val[32] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (int op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_private<_AP_W, _AP_S> &op1, unsigned int op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (unsigned int op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 32; ret >>= 32; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned int op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (unsigned int op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned int op2) { ap_private<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (unsigned int op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned int op2) { ap_private<32 + _AP_W + _AP_W2, false> val(op2); ap_private<32 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 32; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (unsigned int op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<32 + _AP_W + _AP_W2, false> val(op1); ap_private<32 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned int op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 32; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (unsigned int op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned int op2) { ap_private<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (unsigned int op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_private<_AP_W, _AP_S> &op1, long op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (long op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 32; ret >>= 32; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, long op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (long op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, long op2) { ap_private<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (long op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, long op2) { ap_private<32 + _AP_W + _AP_W2, true> val(op2); ap_private<32 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 32; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (long op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<32 + _AP_W + _AP_W2, true> val(op1); ap_private<32 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, long op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 32; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (long op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, long op2) { ap_private<32 + 1, true> val(op2); val[32] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (long op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_private<_AP_W, _AP_S> &op1, unsigned long op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (unsigned long op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 32; ret >>= 32; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned long op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); ret <<= 32; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 32, false > operator, (unsigned long op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned long op2) { ap_private<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<32 + 1, false > operator, (unsigned long op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned long op2) { ap_private<32 + _AP_W + _AP_W2, false> val(op2); ap_private<32 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 32; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 32, false > operator, (unsigned long op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<32 + _AP_W + _AP_W2, false> val(op1); ap_private<32 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned long op2) { ap_private<32 + _AP_W, false> val(op2); ap_private<32 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 32; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 32, false > operator, (unsigned long op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + _AP_W, false> val(op1); ap_private<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned long op2) { ap_private<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 32, false> operator, (unsigned long op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; }
#pragma empty_line
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (const ap_private<_AP_W, _AP_S> &op1, ap_slong op2) { ap_private<64 + _AP_W, false> val(op2); ap_private<64 + _AP_W, false> ret(op1); ret <<= 64; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (ap_slong op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<64 + _AP_W, false> val(op1); ap_private<64 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 64; ret >>= 64; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, ap_slong op2) { ap_private<64 + _AP_W, false> val(op2); ap_private<64 + _AP_W, false> ret(op1); ret <<= 64; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (ap_slong op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<64 + _AP_W, false> val(op1); ap_private<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<64 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, ap_slong op2) { ap_private<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<64 + 1, false > operator, (ap_slong op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 64, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, ap_slong op2) { ap_private<64 + _AP_W + _AP_W2, true> val(op2); ap_private<64 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 64; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 64, false > operator, (ap_slong op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<64 + _AP_W + _AP_W2, true> val(op1); ap_private<64 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 64, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_slong op2) { ap_private<64 + _AP_W, false> val(op2); ap_private<64 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 64; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 64, false > operator, (ap_slong op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<64 + _AP_W, false> val(op1); ap_private<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 64, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_slong op2) { ap_private<64 + 1, true> val(op2); val[64] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 64, false> operator, (ap_slong op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<64 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }
template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (const ap_private<_AP_W, _AP_S> &op1, ap_ulong op2) { ap_private<64 + _AP_W, false> val(op2); ap_private<64 + _AP_W, false> ret(op1); ret <<= 64; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (ap_ulong op1, const ap_private<_AP_W, _AP_S>& op2) { ap_private<64 + _AP_W, false> val(op1); ap_private<64 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 64; ret >>= 64; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, ap_ulong op2) { ap_private<64 + _AP_W, false> val(op2); ap_private<64 + _AP_W, false> ret(op1); ret <<= 64; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private< _AP_W + 64, false > operator, (ap_ulong op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_private<64 + _AP_W, false> val(op1); ap_private<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline ap_private<64 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, ap_ulong op2) { ap_private<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, bool _AP_S> inline ap_private<64 + 1, false > operator, (ap_ulong op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_private<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 64, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, ap_ulong op2) { ap_private<64 + _AP_W + _AP_W2, false> val(op2); ap_private<64 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 64; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline ap_private<_AP_W + _AP_W2 + 64, false > operator, (ap_ulong op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_private<64 + _AP_W + _AP_W2, false> val(op1); ap_private<64 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 64, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_ulong op2) { ap_private<64 + _AP_W, false> val(op2); ap_private<64 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 64; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< _AP_W + 64, false > operator, (ap_ulong op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<64 + _AP_W, false> val(op1); ap_private<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 64, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_ulong op2) { ap_private<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline ap_private< 1 + 64, false> operator, (ap_ulong op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_private<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; }
#pragma line 1697 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned int rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_ulong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_slong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned int rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_ulong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); }
template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_slong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); }
#pragma line 1718 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h"
template<int _AP_W, bool _AP_S>
inline std::ostream& operator<<(std::ostream& out, const ap_private<_AP_W,_AP_S> &op)
{
ap_private<_AP_W, _AP_S> v=op;
const std::ios_base::fmtflags basefield = out.flags() & std::ios_base::basefield;
unsigned radix = (basefield == std::ios_base::hex) ? 16 :
((basefield == std::ios_base::oct) ? 8 : 10);
std::string str=v.toString(radix,_AP_S);
out<<str;
return out;
#pragma empty_line
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
inline std::istream& operator >> (std::istream& in, ap_private<_AP_W,_AP_S> &op)
{
std::string str;
in >> str;
const std::ios_base::fmtflags basefield = in.flags() & std::ios_base::basefield;
unsigned radix = (basefield == std::ios_base::hex) ? 16 :
((basefield == std::ios_base::oct) ? 8 : 10);
op = ap_private<_AP_W, _AP_S>(str.c_str(), radix);
return in;
#pragma empty_line
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
inline std::ostream& operator<<(std::ostream& out, const ap_range_ref<_AP_W,_AP_S> &op)
{
return operator<<(out, ap_private<_AP_W, _AP_S>(op));
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
inline std::istream& operator >> (std::istream& in, ap_range_ref<_AP_W,_AP_S> &op)
{
return operator>>(in, ap_private<_AP_W, _AP_S>(op));;
}
#pragma empty_line
template<int _AP_W, bool _AP_S>
inline void print(const ap_private<_AP_W,_AP_S> &op, bool fill=true )
{
ap_private<_AP_W, _AP_S> v=op;
uint32_t ws=v.getNumWords();
const uint64_t *ptr=v.getRawData();
int i=ws-1;
#pragma empty_line
if(_AP_W%64 != 0) {
uint32_t offset=_AP_W%64;
uint32_t count=(offset+3)/4;
int64_t data=*(ptr+i);
if(_AP_S)
data=(data<<(64-offset))>>(64-offset);
else
count=(offset+4)/4;
while(count-->0)
#pragma empty_line
#pragma empty_line
#pragma empty_line
printf("%llx",(data>>(count*4))&0xf);
#pragma empty_line
} else {
if(_AP_S==false)
printf("0");
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
printf("%016llx",*(ptr+i));
#pragma empty_line
}
for(--i;i>=0;i--)
#pragma empty_line
#pragma empty_line
#pragma empty_line
printf("%016llx",*(ptr+i));
#pragma empty_line
printf("\n");
#pragma empty_line
}
#pragma line 75 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_int.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h" 1
#pragma line 75 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_int_sim.h" 1
#pragma line 76 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h" 2
#pragma line 93 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct ap_fixed_base;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
struct af_bit_ref {
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& d_bv;
int d_index;
public:
inline af_bit_ref(const af_bit_ref<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& ref):
d_bv(ref.d_bv), d_index(ref.d_index) {
if (d_index < 0 )
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) cannot be negative.\n", d_index);
if (d_index >= _AP_W)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", d_index, _AP_W);
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
inline af_bit_ref(ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>* bv, int index=0):
d_bv(*bv),d_index(index) {}
#pragma empty_line
inline operator bool() const {
return d_bv.V[d_index];
}
#pragma empty_line
inline af_bit_ref& operator=(unsigned long long val) {
if(val)
d_bv.V.set(d_index);
else
d_bv.V.clear(d_index);
return *this;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline af_bit_ref& operator =(const ap_private<_AP_W2,_AP_S2>& val) {
return operator=(val!=0);
}
#pragma empty_line
inline af_bit_ref& operator =(const af_bit_ref<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& val) {
return operator=((unsigned long long)(bool)val);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline af_bit_ref operator=(const af_bit_ref<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& val) {
return operator=((unsigned long long)(bool)val);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline af_bit_ref& operator = ( const ap_bit_ref<_AP_W2, _AP_S2> &val) {
return operator =((unsigned long long) (bool) val);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline af_bit_ref& operator = ( const ap_range_ref<_AP_W2,_AP_S2>& val) {
return operator =((const ap_private<_AP_W2, false>) val);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline af_bit_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=((const ap_private<_AP_W2, false>)(val));
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline af_bit_ref& operator= (const ap_concat_ref<_AP_W2, _AP_T3, _AP_W3, _AP_T3>& val) {
return operator=((const ap_private<_AP_W2 + _AP_W3, false>)(val));
}
#pragma empty_line
template<int _AP_W2, int _AP_S2>
inline ap_concat_ref<1, af_bit_ref, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (ap_private<_AP_W2, _AP_S2>& op) {
return ap_concat_ref<1, af_bit_ref, _AP_W2,
ap_private<_AP_W2, _AP_S2> >(*this, op);
}
#pragma empty_line
template<int _AP_W2, int _AP_S2>
inline ap_concat_ref<1, af_bit_ref, 1, ap_bit_ref<_AP_W2, _AP_S2> >
operator, (const ap_bit_ref<_AP_W2, _AP_S2> &op) {
return ap_concat_ref<1, af_bit_ref, 1,
ap_bit_ref<_AP_W2, _AP_S2> >(*this,
const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(op));
}
#pragma empty_line
template<int _AP_W2, int _AP_S2>
inline ap_concat_ref<1, af_bit_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >
operator, (const ap_range_ref<_AP_W2, _AP_S2> &op) {
return ap_concat_ref<1, af_bit_ref, _AP_W2,
ap_range_ref<_AP_W2, _AP_S2> >(*this,
const_cast<ap_range_ref<_AP_W2, _AP_S2>& >(op));
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_concat_ref<1, af_bit_ref, _AP_W2 + _AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &op) {
return ap_concat_ref<1, af_bit_ref, _AP_W2 + _AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this,
const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(op));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<1, af_bit_ref, _AP_W2,
af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &op) {
return ap_concat_ref<1, af_bit_ref, _AP_W2,
af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2,
_AP_N2> >(*this, const_cast<af_range_ref<_AP_W2, _AP_I2,
_AP_S2, _AP_Q2, _AP_O2,_AP_N2>& >(op));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<1, af_bit_ref, 1,
af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &op) {
return ap_concat_ref<1, af_bit_ref, 1,
af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(op));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator == (const af_bit_ref<_AP_W2, _AP_I2,
_AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) {
return get() == op.get();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator != (const af_bit_ref<_AP_W2, _AP_I2,
_AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) {
return get() != op.get();
}
#pragma empty_line
inline bool operator ~ () const {
bool bit = (d_bv.V)[d_index];
return bit ? false : true;
}
#pragma empty_line
inline int length() const {
return 1;
}
#pragma empty_line
inline bool get() {
return d_bv.V[d_index];
}
#pragma empty_line
inline bool get() const {
return d_bv.V[d_index];
}
#pragma empty_line
inline std::string to_string() const {
return d_bv.V[d_index] ? "1" : "0";
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
struct af_range_ref {
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &d_bv;
int l_index;
int h_index;
#pragma empty_line
public:
inline af_range_ref(const af_range_ref<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& ref):
d_bv(ref.d_bv), l_index(ref.l_index), h_index(ref.h_index) {}
#pragma empty_line
inline af_range_ref(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>* bv, int h, int l):
d_bv(*bv),l_index(l),h_index(h) {
if (h < 0 || l < 0)
fprintf((&_iob[2]), "Warning! Higher bound (%d) and lower bound (%d) cannot be negative.\n", h, l);
if (h >= _AP_W || l >= _AP_W)
fprintf((&_iob[2]), "Warning! Higher bound (%d) or lower bound (%d) out of range (%d).\n", h, l, _AP_W);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
inline operator ap_private<_AP_W, false> () const {
if(h_index >= l_index) {
ap_private<_AP_W, false> val(d_bv.V);
ap_private<_AP_W,false> mask(-1);
mask>>=_AP_W-(h_index-l_index+1);
val>>=l_index;
return val&=mask;
} else {
ap_private<_AP_W, false> val = 0;
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
if((d_bv.V)[j]) val.set(i);
return val;
}
}
#pragma empty_line
inline operator unsigned long long() const {
return get().to_uint64();
}
#pragma empty_line
template<int _AP_W2,bool _AP_S2>
inline af_range_ref& operator =(const ap_private<_AP_W2,_AP_S2>& val) {
ap_private<_AP_W, false> vval= ap_private<_AP_W, false>(val);
if(l_index > h_index) {
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
vval[i]? d_bv.V.set(j):d_bv.V.clear(j);
} else {
ap_private<_AP_W,false> mask(-1);
if(l_index>0) {
mask<<=l_index;
vval<<=l_index;
}
if(h_index<_AP_W-1) {
ap_private<_AP_W,false> mask2(-1);
mask2>>=_AP_W-h_index-1;
mask&=mask2;
vval&=mask2;
}
mask.flip();
d_bv.V &= mask;
d_bv.V |= vval;
}
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline af_range_ref& operator = (const char val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const signed char val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const short val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const unsigned short val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const int val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const unsigned int val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const long val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const unsigned long val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const long long val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
inline af_range_ref& operator = (const unsigned long long val) { const ap_private<_AP_W, false> tmpVal(val); return operator = (tmpVal); }
#pragma empty_line
#pragma empty_line
template<int _AP_W3, typename _AP_T3, int _AP_W4, typename _AP_T4>
inline af_range_ref& operator =
(const ap_concat_ref <_AP_W3, _AP_T3, _AP_W4, _AP_T4>& val) {
const ap_private<_AP_W, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
template <int _AP_W3, bool _AP_S3>
inline af_range_ref& operator =(const ap_bit_ref<_AP_W3, _AP_S3>& val) {
const ap_private<_AP_W, false> tmpVal(val);
return operator = (tmpVal);
}
#pragma empty_line
template <int _AP_W3, bool _AP_S3>
inline af_range_ref& operator =(const ap_range_ref<_AP_W3,_AP_S3>& val) {
const ap_private<_AP_W, false> tmpVal(val);
return operator =(tmpVal);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline af_range_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) {
const ap_private<_AP_W2, false> tmp= val.get();
return operator = (tmp);
}
#pragma empty_line
inline af_range_ref& operator= (const char* val) {
const ap_private<_AP_W, false> tmp(val);
return operator = (tmp);
}
#pragma empty_line
inline af_range_ref& operator= (const af_range_ref<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& val) {
const ap_private<_AP_W, false> tmp= val.get();
return operator = (tmp);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline af_range_ref& operator= (const ap_fixed_base<_AP_W2,
_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) {
return operator=(val.to_ap_private());
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator == (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs==rhs;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator != (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs!=rhs;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator > (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs>rhs;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator >= (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs>=rhs;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator < (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs<rhs;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator <= (const ap_range_ref<_AP_W2, _AP_S2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs<=rhs;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator == (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs==rhs;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator != (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs!=rhs;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator > (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs>rhs;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator >= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs>=rhs;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator < (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs<rhs;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator <= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) {
ap_private<_AP_W,false> lhs=get();
ap_private<_AP_W2,false> rhs=op2.get();
return lhs<=rhs;
}
#pragma empty_line
template<int _AP_W2>
inline void set(const ap_private<_AP_W2,false>& val) {
ap_private<_AP_W,_AP_S> vval=val;
if(l_index>h_index) {
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
vval[i]? d_bv.V.set(j):d_bv.V.clear(j);
} else {
ap_private<_AP_W,_AP_S> mask(-1);
if(l_index>0) {
ap_private<_AP_W,false> mask1(-1);
mask1>>=_AP_W-l_index;
mask1.flip();
mask=mask1;
#pragma empty_line
vval<<=l_index;
}
if(h_index<_AP_W-1) {
ap_private<_AP_W,false> mask2(-1);
mask2<<=h_index+1;
mask2.flip();
mask&=mask2;
vval&=mask2;
}
mask.flip();
d_bv&=mask;
d_bv|=vval;
}
#pragma empty_line
}
#pragma empty_line
inline ap_private<_AP_W,false> get() const {
if(h_index<l_index) {
ap_private<_AP_W, false> val(0);
for(int i=0, j=l_index;j>=0&&j>=h_index;j--,i++)
if((d_bv.V)[j]) val.set(i);
return val;
} else {
ap_private<_AP_W, false> val = ap_private<_AP_W,false>(d_bv.V);
val>>= l_index;
if(h_index<_AP_W-1)
{
ap_private<_AP_W,false> mask(-1);
mask>>=_AP_W-(h_index-l_index+1);
val&=mask;
}
return val;
}
}
#pragma empty_line
template<int _AP_W2, int _AP_S2>
inline ap_concat_ref<_AP_W, af_range_ref, _AP_W2, ap_private<_AP_W2, _AP_S2> >
operator, (ap_private<_AP_W2, _AP_S2>& op) {
return ap_concat_ref<_AP_W, af_range_ref, _AP_W2,
ap_private<_AP_W2, _AP_S2> >(*this, op);
}
#pragma empty_line
template<int _AP_W2, int _AP_S2>
inline ap_concat_ref<_AP_W, af_range_ref, 1, ap_bit_ref<_AP_W2, _AP_S2> >
operator, (const ap_bit_ref<_AP_W2, _AP_S2> &op) {
return ap_concat_ref<_AP_W, af_range_ref, 1,
ap_bit_ref<_AP_W2, _AP_S2> >(*this,
const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(op));
}
#pragma empty_line
template<int _AP_W2, int _AP_S2>
inline ap_concat_ref<_AP_W, af_range_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >
operator, (const ap_range_ref<_AP_W2, _AP_S2> &op) {
return ap_concat_ref<_AP_W, af_range_ref, _AP_W2,
ap_range_ref<_AP_W2, _AP_S2> >(*this,
const_cast<ap_range_ref<_AP_W2, _AP_S2>& >(op));
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_concat_ref<_AP_W, af_range_ref, _AP_W2 + _AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >
operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &op) {
return ap_concat_ref<_AP_W, af_range_ref, _AP_W2 + _AP_W3,
ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this,
const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3,
_AP_T3>& >(op));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, af_range_ref, _AP_W2,
af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &op) {
return ap_concat_ref<_AP_W, af_range_ref, _AP_W2,
af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2,
_AP_N2>& > (op));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_concat_ref<_AP_W, af_range_ref, 1,
af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >
operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2> &op) {
return ap_concat_ref<_AP_W, af_range_ref, 1,
af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this,
const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& >(op));
}
#pragma empty_line
inline int length() const {
return h_index>=l_index?h_index-l_index+1:l_index-h_index+1;
}
#pragma empty_line
inline int to_int() const {
ap_private<_AP_W,false> val=get();
return val.to_int();
}
#pragma empty_line
inline unsigned int to_uint() const {
ap_private<_AP_W,false> val=get();
return val.to_uint();
}
#pragma empty_line
inline long to_long() const {
ap_private<_AP_W,false> val=get();
return val.to_long();
}
#pragma empty_line
inline unsigned long to_ulong() const {
ap_private<_AP_W,false> val=get();
return val.to_ulong();
}
#pragma empty_line
inline ap_slong to_int64() const {
ap_private<_AP_W,false> val=get();
return val.to_int64();
}
#pragma empty_line
inline ap_ulong to_uint64() const {
ap_private<_AP_W,false> val=get();
return val.to_uint64();
}
#pragma empty_line
inline std::string to_string(uint8_t radix) const {
return get().to_string(radix);
}
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S=true, ap_q_mode _AP_Q=AP_TRN,
ap_o_mode _AP_O=AP_WRAP, int _AP_N=0>
struct ap_fixed_base {
#pragma empty_line
#pragma empty_line
#pragma empty_line
private:
#pragma empty_line
inline ap_fixed_base(const std::string& val) {
#pragma empty_line
#pragma empty_line
fromString(val);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
void fromString(const std::string& val) {
int radix = 10;
#pragma empty_line
std::string s = ap_private_ops::parseString(val, radix);
#pragma empty_line
fromString(s, radix);
}
#pragma empty_line
void fromString(const std::string& val, unsigned char radix) {
((radix == 2 || radix == 8 || radix == 10 || radix == 16) ? (void)0 : _assert("radix == 2 || radix == 8 || radix == 10 || radix == 16", "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h", 653));
V = 0;
int startPos = 0;
int endPos = val.length();
int decPos = val.find(".");
if (decPos == -1)
decPos = endPos;
bool isNegative = false;
if (val[0] == '-') {
isNegative = true;
++startPos;
} else if (val[0] == '+')
++startPos;
#pragma line 688 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
ap_fixed_base<((_AP_I) > (4) ? (_AP_I) : (4))+4, ((_AP_I) > (4) ? (_AP_I) : (4))+4, false> integer_bits = 0;
#pragma empty_line
#pragma empty_line
uint32_t shift = (radix == 16 ? 4 : radix == 8 ? 3 : radix == 2 ? 1 : 0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool sticky_int = false;
#pragma empty_line
#pragma empty_line
for (int i = startPos; i < decPos; i++) {
#pragma empty_line
char cdigit = val[i];
if (cdigit == '\0') continue;
uint32_t digit = ap_private_ops::decode_digit(cdigit, radix);
#pragma empty_line
sticky_int |= integer_bits[((_AP_I) > (4) ? (_AP_I) : (4))+4 - 1] | integer_bits[((_AP_I) > (4) ? (_AP_I) : (4))+4 - 2] | integer_bits[((_AP_I) > (4) ? (_AP_I) : (4))+4 - 3] | integer_bits[((_AP_I) > (4) ? (_AP_I) : (4))+4 - 4];
#pragma empty_line
if (shift)
integer_bits <<= shift;
else
integer_bits *= radix;
#pragma empty_line
#pragma empty_line
integer_bits += digit;
#pragma empty_line
}
integer_bits[((_AP_I) > (4) ? (_AP_I) : (4))+4 - 3] = integer_bits[((_AP_I) > (4) ? (_AP_I) : (4))+4 - 3] | sticky_int;
#pragma empty_line
ap_fixed_base<((_AP_W-_AP_I) > (0) ? (_AP_W-_AP_I) : (0))+4+4, 4, false> fractional_bits = 0;
bool sticky = false;
#pragma empty_line
#pragma empty_line
for (int i = endPos-1; i >= decPos+1; i--) {
#pragma empty_line
char cdigit = val[i];
if (cdigit == '\0') continue;
uint32_t digit = ap_private_ops::decode_digit(cdigit, radix);
#pragma empty_line
fractional_bits += digit;
#pragma empty_line
sticky |= fractional_bits[0] | fractional_bits[1] | fractional_bits[2] | fractional_bits[3];
#pragma empty_line
if (shift)
fractional_bits >>= shift;
else
fractional_bits /= radix;
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
fractional_bits[0] = fractional_bits[0] | sticky;
#pragma empty_line
if(isNegative)
*this = -(integer_bits + fractional_bits);
else
*this = integer_bits + fractional_bits;
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
inline void report() {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (!_AP_S && _AP_O == AP_WRAP_SM) {
fprintf((&_iob[2]), "ap_ufxied<...> cannot support AP_WRAP_SM.\n");
exit(1);
}
if (_AP_W > ((4096 + 1023) / 1024) * 1024) {
fprintf((&_iob[2]), "[E] ap_%sfixed<%d, ...>: Bitwidth exceeds the "
"default max value %d. Please use macro "
"AP_INT_MAX_W to set a larger max value.\n",
_AP_S?"":"u", _AP_W,
((4096 + 1023) / 1024) * 1024);
exit(1);
}
}
#pragma empty_line
#pragma empty_line
inline unsigned long long doubleToRawBits(double pf)const {
union {
unsigned long long __L;
double __D;
}LD;
LD.__D=pf;
return LD.__L;
}
#pragma empty_line
#pragma empty_line
inline double rawBitsToDouble(unsigned long long pi) const {
union {
unsigned long long __L;
double __D;
}LD;
LD.__L=pi;
return LD.__D;
}
#pragma empty_line
inline float rawBitsToFloat(uint32_t pi) const {
union {
uint32_t __L;
float __D;
}LD;
LD.__L = pi;
return LD.__D;
}
#pragma empty_line
#pragma empty_line
public:
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> friend struct
ap_fixed_base;
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> friend struct
af_bit_ref;
#pragma empty_line
inline void overflow_adjust(bool underflow, bool overflow,
bool lD, bool sign) {
if (!overflow && !underflow) return;
switch (_AP_O) {
case AP_WRAP:
if (_AP_N == 0)
return;
if (_AP_S) {
#pragma empty_line
#pragma empty_line
if (_AP_N > 1) {
ap_private<_AP_W, _AP_S> mask(-1);
if (_AP_N >= _AP_W) mask = 0;
else mask.lshr(_AP_N);
if (sign)
V &= mask;
else
V |= ~mask;
}
sign ? V.set(_AP_W - 1) : V.clear(_AP_W - 1);
} else {
#pragma empty_line
ap_private<_AP_W, _AP_S> mask(-1);
if (_AP_N >= _AP_W) mask = 0;
else mask.lshr(_AP_N);
mask.flip();
V |= mask;
}
break;
case AP_SAT_ZERO:
V.clear();
break;
case AP_WRAP_SM:
{
bool Ro = ap_private_ops::get<_AP_W, _AP_S, _AP_W -1>(V);
if (_AP_N == 0) {
if (lD != Ro) {
V.flip();
lD ? ap_private_ops::set<_AP_W, _AP_S, _AP_W - 1>(V) :
ap_private_ops::clear<_AP_W, _AP_S, _AP_W - 1>(V);
}
} else {
if (_AP_N == 1 && sign != Ro) {
V.flip();
} else if (_AP_N > 1) {
bool lNo = ap_private_ops::get<_AP_W, _AP_S, _AP_W - _AP_N> (V);
if (lNo == sign)
V.flip();
ap_private<_AP_W, false> mask(-1);
if (_AP_N >= _AP_W) mask = 0;
else mask.lshr(_AP_N);
if (sign)
V &= mask;
else
V |= mask.flip();
sign ? ap_private_ops::set<_AP_W, _AP_S, _AP_W - 1>(V) : ap_private_ops::clear<_AP_W, _AP_S, _AP_W - 1>(V);
}
}
}
break;
default:
if (_AP_S) {
if (overflow) {
V.set(); ap_private_ops::clear<_AP_W, _AP_S, _AP_W-1>(V);
} else if (underflow) {
V.clear();
ap_private_ops::set<_AP_W, _AP_S, _AP_W-1>(V);
if(_AP_O == AP_SAT_SYM)
ap_private_ops::set<_AP_W, _AP_S, 0>(V);
}
} else {
if (overflow)
V.set();
else if (underflow)
V.clear();
}
}
}
#pragma empty_line
inline bool quantization_adjust(bool qb, bool r, bool s) {
bool carry=ap_private_ops::get<_AP_W, _AP_S, _AP_W-1>(V);
switch (_AP_Q) {
case AP_TRN:
return false;
case AP_RND_ZERO:
qb &= s || r;
break;
case AP_RND_MIN_INF:
qb &= r;
break;
case AP_RND_INF:
qb &= !s || r;
break;
case AP_RND_CONV:
qb &= ap_private_ops::get<_AP_W, _AP_S, 0>(V) || r;
break;
case AP_TRN_ZERO:
qb = s && ( qb || r );
break;
default:;
#pragma empty_line
}
if(qb) ++V;
#pragma empty_line
return carry && !(ap_private_ops::get<_AP_W, _AP_S, _AP_W-1>(V));
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2>
struct RType {
enum {
_AP_F=_AP_W-_AP_I,
F2=_AP_W2-_AP_I2,
mult_w = _AP_W+_AP_W2,
mult_i = _AP_I+_AP_I2,
mult_s = _AP_S||_AP_S2,
plus_w = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1+((_AP_F) > (F2) ? (_AP_F) : (F2)),
plus_i = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1,
plus_s = _AP_S||_AP_S2,
minus_w = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1+((_AP_F) > (F2) ? (_AP_F) : (F2)),
minus_i = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1,
minus_s = true,
#pragma empty_line
div_w = _AP_W + ((_AP_W2 - _AP_I2) > (0) ? (_AP_W2 - _AP_I2) : (0)) + _AP_S2,
#pragma empty_line
#pragma empty_line
#pragma empty_line
div_i = _AP_I + (_AP_W2-_AP_I2) + _AP_S2,
div_s = _AP_S||_AP_S2,
logic_w = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+((_AP_F) > (F2) ? (_AP_F) : (F2)),
logic_i = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2))),
logic_s = _AP_S||_AP_S2
};
#pragma empty_line
typedef ap_fixed_base<mult_w, mult_i, mult_s> mult;
typedef ap_fixed_base<plus_w, plus_i, plus_s> plus;
typedef ap_fixed_base<minus_w, minus_i, minus_s> minus;
typedef ap_fixed_base<logic_w, logic_i, logic_s> logic;
typedef ap_fixed_base<div_w, div_i, div_s> div;
typedef ap_fixed_base<_AP_W, _AP_I, _AP_S> arg1;
};
#pragma line 961 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
inline ap_fixed_base() {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base(const ap_fixed_base& op):V(op.V) {}
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed_base(const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op):V(0) {
enum {N2=_AP_W2,_AP_F=_AP_W-_AP_I,F2=_AP_W2-_AP_I2,QUAN_INC=F2>_AP_F && !(_AP_Q==AP_TRN ||
(_AP_Q==AP_TRN_ZERO && !_AP_S2))};
if (!op) return;
bool carry=false;
#pragma empty_line
enum { sh_amt =(F2>_AP_F)?F2-_AP_F:_AP_F-F2};
const ap_private<_AP_W2, _AP_S2>& val = op.V;
bool neg_src=val.isNegative();
if (F2==_AP_F)
V=val;
#pragma empty_line
else if (F2>_AP_F) {
if (sh_amt >= _AP_W2)
V = neg_src ? -1 : 0;
else
V = _AP_S2?val.ashr(sh_amt):val.lshr(sh_amt);
if (_AP_Q!=AP_TRN && !(_AP_Q==AP_TRN_ZERO && !_AP_S2)) {
bool qb = false;
if (F2-_AP_F>_AP_W2)
qb = neg_src;
else
qb = ap_private_ops::get<_AP_W2, _AP_S2, F2-_AP_F-1>(val);
#pragma empty_line
bool r=false;
enum { pos3 = F2-_AP_F-2};
if(pos3>=_AP_W2-1)
r=val!=0;
else if (pos3>=0)
r = (val<<(_AP_W2-1-pos3))!=0;
carry = quantization_adjust(qb,r,neg_src);
}
} else {
if (sh_amt < _AP_W) {
V=val;
V <<= sh_amt;
}
}
#pragma empty_line
if ((_AP_O!=AP_WRAP || _AP_N != 0) &&
((!_AP_S && _AP_S2) || _AP_I-_AP_S <
_AP_I2 - _AP_S2 + (QUAN_INC|| (_AP_S2 &&
_AP_O==AP_SAT_SYM)))) {
bool deleted_zeros = _AP_S2?true:!carry,
deleted_ones = true;
bool lD=(_AP_I2>_AP_I) && (_AP_W2-_AP_I2+_AP_I>=0) &&
ap_private_ops::get<_AP_W2, _AP_S2, _AP_W2-_AP_I2+_AP_I>(val);
enum { pos1=F2-_AP_F+_AP_W, pos2=F2-_AP_F+_AP_W+1};
if (pos1 < _AP_W2) {
bool Range1_all_ones= true;
bool Range1_all_zeros= true;
if (pos1 >= 0) {
enum { __W = (_AP_W2-pos1) > 0 ? (_AP_W2-pos1) : 1 };
const ap_private<__W, _AP_S2> Range1=ap_private<__W, _AP_S2>(val.lshr(pos1));
Range1_all_ones=Range1.isAllOnesValue();
Range1_all_zeros=Range1.isMinValue();
} else {
Range1_all_ones=false;
Range1_all_zeros=val.isMinValue();
}
bool Range2_all_ones=true;
if (pos2<_AP_W2 && pos2>=0) {
enum { __W = (_AP_W2-pos2)>0 ? (_AP_W2-pos2) : 1};
ap_private<__W, true> Range2=ap_private<__W, true>(val.lshr(pos2));
Range2_all_ones=Range2.isAllOnesValue();
} else if(pos2<0)
Range2_all_ones=false;
#pragma empty_line
deleted_zeros=deleted_zeros && (carry?Range1_all_ones:Range1_all_zeros);
deleted_ones=carry?Range2_all_ones&&(F2-_AP_F+_AP_W<0||!lD)
:Range1_all_ones;
neg_src= neg_src&&!(carry && Range1_all_ones);
} else
neg_src = neg_src && V[_AP_W-1];
#pragma empty_line
bool neg_trg= V.isNegative();
bool overflow=(neg_trg||!deleted_zeros) && !val.isNegative();
bool underflow=(!neg_trg||!deleted_ones)&&neg_src;
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(_AP_O==AP_SAT_SYM && _AP_S2 && _AP_S)
underflow |= neg_src && (_AP_W>1?V.isMinSignedValue():true);
overflow_adjust(underflow, overflow, lD, neg_src);
}
report();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed_base(const volatile ap_fixed_base<_AP_W2,_AP_I2,
_AP_S2,_AP_Q2,_AP_O2, _AP_N2> &op) : V(op.V) {
*this = const_cast<ap_fixed_base<_AP_W2,_AP_I2,
_AP_S2,_AP_Q2,_AP_O2, _AP_N2>&>(op);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_fixed_base(const ap_private<_AP_W2,_AP_S2>& op) {
ap_fixed_base<_AP_W2,_AP_W2,_AP_S2> f_op;
f_op.V=op;
*this = f_op;
}
#pragma empty_line
inline ap_fixed_base(bool b) {
*this=(ap_private<1,false>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(char b) {
*this=(ap_private<8,false>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(signed char b) {
*this=(ap_private<8,true>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(unsigned char b) {
*this=(ap_private<8,false>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(signed short b) {
*this=(ap_private<16,true>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(unsigned short b) {
*this=(ap_private<16,false>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(signed int b) {
*this=(ap_private<32,true>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(unsigned int b) {
*this=(ap_private<32,false>)b;
report();
}
#pragma line 1119 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
inline ap_fixed_base(signed long b) {
*this=(ap_private<32,true>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(unsigned long b) {
*this=(ap_private<32,false>)b;
report();
}
#pragma empty_line
#pragma empty_line
inline ap_fixed_base(ap_slong b) {
*this=(ap_private<64,true>)b;
report();
}
#pragma empty_line
inline ap_fixed_base(ap_ulong b) {
*this=(ap_private<64,false>)b;
report();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base(const char* val):V(0) {
#pragma empty_line
#pragma empty_line
fromString(val);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
inline ap_fixed_base(const char* val, signed char radix): V(0) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_private<_AP_W, _AP_S> Tmp(val, radix);
V = Tmp;
#pragma empty_line
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_fixed_base(const ap_bit_ref<_AP_W2, _AP_S2>& op) {
*this = ((bool)op);
report();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_fixed_base(const ap_range_ref<_AP_W2, _AP_S2>& op) {
*this = ap_private<_AP_W2, _AP_S2>(op);
report();
}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_fixed_base(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op) {
*this = ((const ap_private<_AP_W2 + _AP_W3, false>&)(op));
report();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed_base(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) {
*this = (bool(op));
report();
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2,
ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed_base(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) {
*this = (ap_private<_AP_W2, false>(op));
report();
}
#pragma empty_line
inline ap_fixed_base(double d):V(0) {
if(!d) return;
const bool isneg=d<0;
#pragma empty_line
const uint64_t ireg=doubleToRawBits(isneg?-d:d);
if((ireg&0x7fffffffffffffffULL)!=0) {
const int32_t exp=(((ireg)>>52)&0x07ff)-((1ULL<<(11 -1))-1);
ap_private<52 +2, true> man = ireg & 0x3fffffffffffffULL;
#pragma empty_line
if (exp == ((1ULL<<(11 -1))-1) + 1 &&
man.range(52 - 1, 0) != 0) {
#pragma empty_line
fprintf((&_iob[2]), "[E] ap_%sfixed<%d, ...>: trying to "
"assign NaN to fixed point value.\n",
_AP_S?"":"u", _AP_W);
exit(1);
}
man.clear(52 +1);
man.set(52);
if(isneg) {
man.flip();
man++;
}
#pragma empty_line
enum {_AP_S2=true, _AP_W2=52 +2,_AP_F=_AP_W -_AP_I };
const int _AP_I2=exp+2;
const int F2=_AP_W2-_AP_I2;
const bool QUAN_INC=F2>_AP_F && !(_AP_Q==AP_TRN || (_AP_Q==AP_TRN_ZERO &&
!_AP_S2));
bool carry=false;
#pragma empty_line
const unsigned sh_amt=abs(F2-_AP_F);
if (F2==_AP_F )
V=man;
else if (F2>_AP_F) {
if(sh_amt >= 52 +2)
V=isneg?-1:0;
else
V= ap_private<52 +2, true>((man>>sh_amt) |
((man & 1ULL<<(52 +1))?
(0x3fffffffffffffULL>>(52 +2-sh_amt)
<<(52 +2-sh_amt)):0));
#pragma empty_line
if (_AP_Q!=AP_TRN && !(_AP_Q==AP_TRN_ZERO && !_AP_S2)) {
const bool qb=((F2-_AP_F > 52 +2) ? isneg : (man & (1ULL<<(F2-_AP_F-1))) != 0);
const int pos3=F2-_AP_F-2;
const bool r = (pos3>= 0) ? (man << ((0) > (_AP_W2-pos3-1) ? (0) : (_AP_W2-pos3-1))& 0x3fffffffffffffULL)!=0 : false;
carry = quantization_adjust(qb,r,isneg);
}
}
else {
#pragma empty_line
if (sh_amt < _AP_W) {
V = man;
V <<= sh_amt;
}
}
#pragma empty_line
if((_AP_O != AP_WRAP || _AP_N != 0) &&
((!_AP_S && _AP_S2) || _AP_I-_AP_S <
_AP_I2-_AP_S2+(QUAN_INC|| (_AP_S2 &&
_AP_O==AP_SAT_SYM)) )) {
bool deleted_zeros = _AP_S2?true:!carry,
deleted_ones = true;
bool neg_src;
const bool lD=(_AP_I2>_AP_I) && (_AP_W2-_AP_I2+_AP_I>=0) &&
(man & (1ULL <<(52 +2-_AP_I2+_AP_I)));
int pos1=F2+_AP_W-_AP_F;
if (pos1 < _AP_W2) {
int pos2=pos1+1;
bool Range1_all_ones=true;
bool Range1_all_zeros=true;
if (pos1>=0) {
ap_private<52 +2,_AP_S> Range1=
ap_private<52 +2,_AP_S>((man >> pos1) | ((1ULL<<(52 +1)&man) ? (0x3fffffffffffffULL >> (52 +2-pos1) <<(52 +2-pos1)):0));
Range1_all_ones = Range1.isAllOnesValue();
Range1_all_zeros = Range1.isMinValue();
} else {
Range1_all_ones=false;
Range1_all_zeros = man==0;
}
bool Range2_all_ones=true;
if (pos2<_AP_W2 && pos2>=0) {
ap_private<52 +2, _AP_S> Range2=
ap_private<52 +2, _AP_S>((man >> pos2) | ((1ULL<<(52 +1)&man) ? (0x3fffffffffffffULL >> (52 +2-pos2) <<(52 +2-pos2)):0));
Range2_all_ones=Range2.isAllOnesValue();
} else if (pos2<0)
Range2_all_ones=false;
deleted_zeros=deleted_zeros && (carry?Range1_all_ones:Range1_all_zeros);
deleted_ones=carry?Range2_all_ones&&(F2-_AP_F+_AP_W<0||!lD) : Range1_all_ones;
neg_src=isneg&&!(carry&Range1_all_ones);
} else
neg_src = isneg && V[_AP_W -1];
#pragma empty_line
const bool neg_trg=V.isNegative();
const bool overflow=(neg_trg||!deleted_zeros) && !isneg;
bool underflow=(!neg_trg||!deleted_ones)&&neg_src;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(_AP_O==AP_SAT_SYM && _AP_S2 && _AP_S)
underflow |= neg_src && (_AP_W>1?V.isMinSignedValue():true);
overflow_adjust(underflow,overflow,lD, neg_src);
}
}
report();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline void operator=(const ap_fixed_base<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& op) volatile {
V = op.V;
}
#pragma empty_line
inline ap_fixed_base& operator=(const ap_fixed_base<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& op) {
V = op.V;
return *this;
}
#pragma empty_line
inline void operator=(const volatile ap_fixed_base<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& op) volatile {
V = op.V;
}
#pragma empty_line
inline ap_fixed_base& operator=(const volatile ap_fixed_base<_AP_W, _AP_I, _AP_S,
_AP_Q, _AP_O, _AP_N>& op) {
V = op.V;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base& setBits(unsigned long long bv) {
V=bv;
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
static inline ap_fixed_base bitsToFixed(unsigned long long bv) {
ap_fixed_base Tmp=bv;
return Tmp;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_private<((_AP_I) > (1) ? (_AP_I) : (1)),_AP_S>
to_ap_private(bool Cnative = true) const {
ap_private<((_AP_I) > (1) ? (_AP_I) : (1)),_AP_S> ret = ap_private<((_AP_I) > (1) ? (_AP_I) : (1)),_AP_S> ((_AP_I >= 1) ? (_AP_S==true ? V.ashr(((0) > (_AP_W - _AP_I) ? (0) : (_AP_W - _AP_I))) : V.lshr(((0) > (_AP_W - _AP_I) ? (0) : (_AP_W - _AP_I)))) : ap_private<_AP_W, _AP_S>(0));
#pragma empty_line
if (Cnative) {
bool r = false;
if (_AP_I < _AP_W) {
if (_AP_I > 0) r = !(V.getLoBits(_AP_W - _AP_I).isMinValue());
else r = !(V.isMinValue());
}
if (r && V.isNegative()) {
++ret;
}
} else {
#pragma empty_line
}
return ret;
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline operator ap_private<_AP_W2,_AP_S2> () const {
return (ap_private<_AP_W2,_AP_S2>)to_ap_private();
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_N2>
inline operator ap_private<_AP_W2,_AP_S2,_AP_N2> () const {
return (ap_private<_AP_W2,_AP_S2,_AP_N2>)to_ap_private();
}
#pragma empty_line
#pragma empty_line
inline int to_int() const {
return to_ap_private().to_int();
}
#pragma empty_line
inline int to_uint() const {
return to_ap_private().to_uint();
}
#pragma empty_line
inline ap_slong to_int64() const {
return to_ap_private().to_int64();
}
#pragma empty_line
inline ap_ulong to_uint64() const {
return to_ap_private().to_uint64();
}
#pragma empty_line
inline double to_double() const {
if(!V)
return 0;
bool isneg = _AP_S && V[_AP_W-1];
uint64_t res = isneg ? 0x8000000000000000ULL : 0;
ap_private<_AP_W, false> tmp(V);
if (isneg) tmp = ap_private<_AP_W, false>(-V);
int i = _AP_W -1 - tmp.countLeadingZeros();
int exp = _AP_I-(_AP_W-i);
res|=((uint64_t)(exp+((1ULL<<(11 -1))-1)))<<52;
if(i!=0) {
tmp.clear(i);
uint64_t man = ((i>52)?tmp.lshr(i-52):tmp).to_uint64() & 0x3fffffffffffffULL;
res |= i<52 ? (man)<<(52 -i)& 0x3fffffffffffffULL : man;
}
double dp=rawBitsToDouble(res);
return dp;
}
#pragma empty_line
inline float to_float() const {
if(!V)
return 0;
bool isneg = _AP_S && V[_AP_W-1];
uint64_t res = isneg ? 0x80000000ULL : 0;
ap_private<_AP_W, false> tmp = V;
if (isneg) tmp = -tmp;
int i = _AP_W -1 - tmp.countLeadingZeros();
int exp = _AP_I-(_AP_W-i);
res|=((uint64_t)(exp+((1ULL<<(8 -1))-1)))<<23;
if(i!=0) {
tmp.clear(i);
uint32_t man = ((i>23) ? tmp.lshr(i-23) : tmp).to_uint() & 0x7fffff;
res |= i<23 ? (man)<<(23 -i)& 0x7fffff : man;
}
float dp=rawBitsToFloat(res);
return dp;
}
#pragma empty_line
inline operator long double () const {
return to_double();
}
#pragma empty_line
inline operator double () const {
return to_double();
}
#pragma empty_line
inline operator float () const {
return to_float();
}
#pragma empty_line
inline operator char () const {
return (char) to_int();
}
#pragma empty_line
inline operator signed char () const {
return (signed char) to_int();
}
#pragma empty_line
inline operator unsigned char () const {
return (unsigned char) to_uint();
}
#pragma empty_line
inline operator short () const {
return (short) to_int();
}
#pragma empty_line
inline operator unsigned short () const {
return (unsigned short) to_uint();
}
#pragma empty_line
inline operator int () const {
return to_int();
}
#pragma empty_line
inline operator unsigned int () const {
return to_uint();
}
#pragma line 1481 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
inline operator long () const {
return to_int64();
}
#pragma empty_line
inline operator unsigned long () const {
return to_uint64();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline operator unsigned long long () const {
return to_uint64();
}
#pragma empty_line
inline operator long long () const {
return to_int64();
}
#pragma empty_line
#pragma empty_line
inline std::string to_string(uint8_t radix=2, bool sign=_AP_S) const;
#pragma empty_line
inline ap_slong bits_to_int64() const {
ap_private<((_AP_W) < (64) ? (_AP_W) : (64)), _AP_S> res(V);
return (ap_slong) res;
}
#pragma empty_line
inline ap_ulong bits_to_uint64() const {
ap_private<((64) < (_AP_W) ? (64) : (_AP_W)), _AP_S> res(V);
return (ap_ulong) res;
}
#pragma empty_line
inline int length() const {return _AP_W;}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int countLeadingZeros() {
return V.countLeadingZeros();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline typename RType<_AP_W2,_AP_I2,_AP_S2>::mult
operator * (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
typename RType<_AP_W2,_AP_I2,_AP_S2>::mult r;
r.V = V * op2.V;
return r;
}
#pragma empty_line
template<int _AP_W1, int _AP_I1, bool _AP_S1, int _AP_W2, int _AP_I2, bool _AP_S2>
static inline ap_fixed_base multiply(const ap_fixed_base<_AP_W1,_AP_I1,_AP_S1>& op1, const
ap_fixed_base<_AP_W2,_AP_I2,_AP_S2>& op2) {
ap_private<_AP_W+_AP_W2, _AP_S> OP1=op1.V;
ap_private<_AP_W2,_AP_S2> OP2=op2.V;
return OP1*OP2;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline typename RType<_AP_W2,_AP_I2,_AP_S2>::div
operator / (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
enum {F2 = _AP_W2-_AP_I2,
_W1=((_AP_W + ((F2) > (0) ? (F2) : (0)) + ((_AP_S2 && !_AP_S) ? 1 : 0)) > (_AP_W2 + ((_AP_S && !_AP_S2) ? 1 : 0)) ? (_AP_W + ((F2) > (0) ? (F2) : (0)) + ((_AP_S2 && !_AP_S) ? 1 : 0)) : (_AP_W2 + ((_AP_S && !_AP_S2) ? 1 : 0)))};
ap_private<_W1, _AP_S||_AP_S2> dividend = (ap_private<_W1, _AP_S>(V)) << ((F2) > (0) ? (F2) : (0));
ap_private<_W1, _AP_S||_AP_S2> divisior = ap_private<_W1, _AP_S2>(op2.V);
typename RType<_AP_W2, _AP_I2, _AP_S2>::div r;
r.V = ((_AP_S||_AP_S2) ? dividend.sdiv(divisior): dividend.udiv(divisior));
return r;
}
#pragma line 1568 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline typename RType<_AP_W2,_AP_I2,_AP_S2>::plus operator + (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { enum {_AP_F=_AP_W-_AP_I, F2=_AP_W2-_AP_I2}; typename RType<_AP_W2,_AP_I2,_AP_S2>::plus r, lhs(*this), rhs(op2); r.V = lhs.V.Add(rhs.V); return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::plus operator + (const ap_fixed_base& op2) const { typename RType<_AP_W,_AP_I,_AP_S>::plus r; r.V = V + op2.V; return r; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline typename RType<_AP_W2,_AP_I2,_AP_S2>::minus operator - (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { enum {_AP_F=_AP_W-_AP_I, F2=_AP_W2-_AP_I2}; typename RType<_AP_W2,_AP_I2,_AP_S2>::minus r, lhs(*this), rhs(op2); r.V = lhs.V.Sub(rhs.V); return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::minus operator - (const ap_fixed_base& op2) const { typename RType<_AP_W,_AP_I,_AP_S>::minus r; r.V = V - op2.V; return r; }
#pragma line 1591 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline typename RType<_AP_W2,_AP_I2,_AP_S2>::logic operator & (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { typename RType<_AP_W2,_AP_I2,_AP_S2>::logic r, lhs(*this), rhs(op2); r.V=lhs.V & rhs.V; return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::logic operator & (const ap_fixed_base& op2) const { typename RType<_AP_W,_AP_I,_AP_S>::logic r; r.V = V & op2.V; return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::logic operator &(int op2) const { return V & (op2<<(_AP_W - _AP_I)); }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline typename RType<_AP_W2,_AP_I2,_AP_S2>::logic operator | (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { typename RType<_AP_W2,_AP_I2,_AP_S2>::logic r, lhs(*this), rhs(op2); r.V=lhs.V | rhs.V; return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::logic operator | (const ap_fixed_base& op2) const { typename RType<_AP_W,_AP_I,_AP_S>::logic r; r.V = V | op2.V; return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::logic operator |(int op2) const { return V | (op2<<(_AP_W - _AP_I)); }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline typename RType<_AP_W2,_AP_I2,_AP_S2>::logic operator ^ (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { typename RType<_AP_W2,_AP_I2,_AP_S2>::logic r, lhs(*this), rhs(op2); r.V=lhs.V ^ rhs.V; return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::logic operator ^ (const ap_fixed_base& op2) const { typename RType<_AP_W,_AP_I,_AP_S>::logic r; r.V = V ^ op2.V; return r; } inline typename RType<_AP_W,_AP_I,_AP_S>::logic operator ^(int op2) const { return V ^ (op2<<(_AP_W - _AP_I)); }
#pragma line 1605 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator += (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator + (op2) ; return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator -= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator - (op2) ; return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator &= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator & (op2) ; return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator |= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator | (op2) ; return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator ^= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator ^ (op2) ; return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator *= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator * (op2) ; return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator /= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator / (op2) ; return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base& operator ++() {
operator+=(ap_fixed_base<1,1,false>(1));
return *this;
}
#pragma empty_line
inline ap_fixed_base& operator --() {
operator-=(ap_fixed_base<1,1,false>(1));
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline const ap_fixed_base operator ++(int) {
ap_fixed_base t(*this);
operator++();
return t;
}
#pragma empty_line
inline const ap_fixed_base operator --(int) {
ap_fixed_base t = *this;
operator--();
return t;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base operator +() {return *this;}
#pragma empty_line
inline ap_fixed_base<_AP_W + 1, _AP_I + 1, true> operator -() const {
ap_fixed_base<_AP_W + 1, _AP_I + 1, true> Tmp(*this);
Tmp.V = - Tmp.V;
return Tmp;
}
#pragma empty_line
inline ap_fixed_base<_AP_W,_AP_I,true,_AP_Q,_AP_O, _AP_N> getNeg() {
ap_fixed_base<_AP_W,_AP_I,true,_AP_Q,_AP_O, _AP_N> Tmp(*this);
Tmp.V=-Tmp.V;
return Tmp;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool operator !() const {
return !V;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base<_AP_W, _AP_I, _AP_S>
operator ~() const {
ap_fixed_base<_AP_W, _AP_I, _AP_S> res(*this);
res.V.flip();
return res;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_SHIFT>
inline ap_fixed_base<_AP_W, _AP_I + _AP_SHIFT, _AP_S> lshift () const {
ap_fixed_base<_AP_W, _AP_I + _AP_SHIFT, _AP_S> r;
r.V = V;
return r;
}
#pragma empty_line
template<int _AP_SHIFT>
inline ap_fixed_base<_AP_W, _AP_I - _AP_SHIFT, _AP_S> rshift () const {
ap_fixed_base<_AP_W, _AP_I - _AP_SHIFT, _AP_S> r;
r.V = V;
return r;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed_base operator << (int sh) const {
ap_fixed_base r;
bool isNeg=(sh&0x80000000) != 0;
sh=isNeg?-sh:sh;
bool shiftoverflow = sh >= _AP_W;
bool NegSrc = V.isNegative();
if(isNeg) {
if(shiftoverflow)
NegSrc?r.V.set():r.V.clear();
else
r.V=_AP_S?V.ashr(sh):V.lshr(sh);
} else {
if(shiftoverflow)
r.V.clear();
else
r.V=V<<sh;
}
#pragma line 1738 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
return r;
}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed_base operator<<(const ap_private<_AP_W2,true>& op2) const {
int sh = op2.to_int();
return operator << (sh);
}
#pragma empty_line
inline ap_fixed_base operator << (unsigned int sh ) const {
ap_fixed_base r;
bool shiftoverflow = sh >= _AP_W;
r.V = shiftoverflow ? ap_private<_AP_W, _AP_S >(0) : V << sh;
if (sh == 0) return r;
#pragma line 1773 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
return r;
}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed_base operator << (const ap_private<_AP_W2,false>& op2) const {
unsigned int sh = op2.to_uint();
return operator << (sh);
}
#pragma empty_line
inline ap_fixed_base operator >> (int sh) const {
ap_fixed_base r;
bool isNeg=(sh&0x80000000) != 0;
bool NegSrc = V.isNegative();
sh=isNeg?-sh:sh;
bool shiftoverflow = sh >= _AP_W;
if(isNeg && !shiftoverflow) r.V=V<<sh;
else {
if(shiftoverflow)
NegSrc?r.V.set():r.V.clear();
else
r.V=_AP_S?V.ashr(sh):V.lshr(sh);
}
#pragma line 1825 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
return r;
}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed_base operator >> (const ap_private<_AP_W2,true>& op2) const {
int sh = op2.to_int();
return operator >> (sh);
}
#pragma empty_line
inline ap_fixed_base operator >> (unsigned int sh) const {
ap_fixed_base r;
bool NegSrc = V.isNegative();
bool shiftoverflow = sh >= _AP_W;
if(shiftoverflow)
NegSrc?r.V.set():r.V.clear();
else
r.V=_AP_S?V.ashr(sh):V.lshr(sh);
#pragma line 1855 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
return r;
}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed_base operator >> (const ap_private<_AP_W2,false>& op2) const {
unsigned int sh = op2.to_uint();
return operator >> (sh);
}
#pragma line 1874 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W2, bool _AP_S2> inline ap_fixed_base& operator <<=(const ap_private<_AP_W2,_AP_S2>& op2) { *this=operator << (op2); return *this; }
template<int _AP_W2, bool _AP_S2> inline ap_fixed_base& operator >>=(const ap_private<_AP_W2,_AP_S2>& op2) { *this=operator >> (op2); return *this; }
#pragma line 1891 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base operator << (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { return operator << (op2.to_ap_private()); } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator <<= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator << (op2); return *this; }
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base operator >> (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { return operator >> (op2.to_ap_private()); } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline ap_fixed_base& operator >>= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) { *this=operator >> (op2); return *this; }
#pragma empty_line
inline ap_fixed_base& operator >>= (unsigned int sh) {
*this = operator >> (sh);
return *this;
}
#pragma empty_line
inline ap_fixed_base& operator <<= (unsigned int sh) {
*this = operator << (sh);
return *this;
}
#pragma empty_line
inline ap_fixed_base& operator >>= (int sh) {
*this = operator >> (sh);
return *this;
}
#pragma empty_line
inline ap_fixed_base& operator <<= (int sh) {
*this = operator << (sh);
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator == (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
enum {_AP_F=_AP_W-_AP_I,F2=_AP_W2-_AP_I2, shAmt1 = ((F2-_AP_F) > (0) ? (F2-_AP_F) : (0)), shAmt2 = ((_AP_F-F2) > (0) ? (_AP_F-F2) : (0)), _AP_W3 = (_AP_F==F2) ? ((_AP_W) > (_AP_W2) ? (_AP_W) : (_AP_W2)) : ((_AP_W+shAmt1) > (_AP_W2+shAmt2) ? (_AP_W+shAmt1) : (_AP_W2+shAmt2))};
ap_private<_AP_W3, _AP_S > OP1= ap_private<_AP_W3, _AP_S >(V)<<shAmt1;
ap_private<_AP_W3,_AP_S2 > OP2=ap_private<_AP_W3,_AP_S2 >(op2.V)<<shAmt2;
return OP1 == OP2;
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator != (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
return !(*this==op2);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator > (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
enum {_AP_F=_AP_W-_AP_I,F2=_AP_W2-_AP_I2, shAmt1 = ((F2-_AP_F) > (0) ? (F2-_AP_F) : (0)), shAmt2 = ((_AP_F-F2) > (0) ? (_AP_F-F2) : (0)), _AP_W3 = (_AP_F==F2) ? ((_AP_W) > (_AP_W2) ? (_AP_W) : (_AP_W2)) : ((_AP_W+shAmt1) > (_AP_W2+shAmt2) ? (_AP_W+shAmt1) : (_AP_W2+shAmt2))};
ap_private<_AP_W3, _AP_S > OP1= ap_private<_AP_W3, _AP_S >(V)<<shAmt1;
ap_private<_AP_W3,_AP_S2 > OP2=ap_private<_AP_W3,_AP_S2 >(op2.V)<<shAmt2;
if(_AP_S||_AP_S2)
return OP1.sgt(OP2);
else
return OP1.ugt(OP2);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator <= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
return !(*this>op2);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator < (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
enum {_AP_F=_AP_W-_AP_I,F2=_AP_W2-_AP_I2, shAmt1 = ((F2-_AP_F) > (0) ? (F2-_AP_F) : (0)), shAmt2 = ((_AP_F-F2) > (0) ? (_AP_F-F2) : (0)), _AP_W3 = (_AP_F==F2) ? ((_AP_W) > (_AP_W2) ? (_AP_W) : (_AP_W2)) : ((_AP_W+shAmt1) > (_AP_W2+shAmt2) ? (_AP_W+shAmt1) : (_AP_W2+shAmt2))};
ap_private<_AP_W3, _AP_S > OP1= ap_private<_AP_W3, _AP_S >(V)<<shAmt1;
ap_private<_AP_W3,_AP_S2 > OP2=ap_private<_AP_W3,_AP_S2 >(op2.V)<<shAmt2;
if(_AP_S||_AP_S2)
return OP1.slt(OP2);
else
return OP1.ult(OP2);
}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2>
inline bool operator >= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const {
return !(*this<op2);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool operator == (double d) const { return to_double() == d; }
inline bool operator != (double d) const { return to_double() != d; }
inline bool operator > (double d) const { return to_double() > d; }
inline bool operator >= (double d) const { return to_double() >= d; }
inline bool operator < (double d) const { return to_double() < d; }
inline bool operator <= (double d) const { return to_double() <= d; }
#pragma empty_line
#pragma empty_line
inline af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N> operator [] (unsigned int index) {
return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>(this, index);
}
#pragma empty_line
inline af_bit_ref<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N> bit(unsigned int index) {
return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>(this, index);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N> bit (const ap_private<_AP_W2,_AP_S2>& index) {
return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>(this, index.to_int());
}
#pragma empty_line
inline bool bit (unsigned int index) const {
if (index >= _AP_W)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", index, _AP_W);
#pragma empty_line
return V[index];
}
#pragma empty_line
inline bool operator [] (unsigned int index) const {
if (index >= _AP_W)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", index, _AP_W);
#pragma empty_line
return V[index];
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool bit (const ap_private<_AP_W2, _AP_S2>& index) const {
if (index >= _AP_W)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", index.to_int(), _AP_W);
#pragma empty_line
return V[index.to_uint()];
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline bool operator [] (const ap_private<_AP_W2, _AP_S2>& index) const {
if (index >= _AP_W)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", index.to_int(), _AP_W);
#pragma empty_line
return V[index.to_uint()];
}
#pragma empty_line
inline af_bit_ref<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N> get_bit(int index) {
return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>(this, index + _AP_W - _AP_I);
}
#pragma empty_line
template<int _AP_W2>
inline af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N> get_bit (const ap_private<_AP_W2, true>& index) {
return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>(this, index.to_int() + _AP_W - _AP_I);
}
#pragma empty_line
inline bool get_bit (int index) const {
if (index < _AP_I - _AP_W )
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) cannot be negative.\n", index);
if (index >= _AP_I)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", index, _AP_W);
#pragma empty_line
#pragma empty_line
return V[index + _AP_W - _AP_I];
}
#pragma empty_line
template<int _AP_W2>
inline bool get_bit (const ap_private<_AP_W2, true>& index) const {
if (index < _AP_I - _AP_W )
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) cannot be negative.\n", index.to_int());
if (index >= _AP_I)
fprintf((&_iob[2]), "Warning! Index of bit vector (%d) out of range (%d).\n", index.to_int(), _AP_W);
#pragma empty_line
#pragma empty_line
return V[index.to_int() + _AP_W - _AP_I];
}
#pragma empty_line
inline af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N>
range(int Hi, int Lo) {
return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo);
}
#pragma empty_line
inline af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>
operator () (int Hi, int Lo) {
return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo);
}
#pragma empty_line
inline af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>
range(int Hi, int Lo) const {
return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(const_cast<ap_fixed_base*>(this), Hi, Lo);
}
#pragma empty_line
inline af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>
operator () (int Hi, int Lo) const {
return this->range(Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N>
range(const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N>
operator () (const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N>
range(const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) const {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(const_cast<
ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>*>(this),
Hi, Lo);
}
#pragma empty_line
template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3>
inline af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N>
operator () (const ap_private<_AP_W2, _AP_S2> &HiIdx,
const ap_private<_AP_W3, _AP_S3> &LoIdx) const {
int Hi = HiIdx.to_int();
int Lo = LoIdx.to_int();
return this->range(Hi, Lo);
}
#pragma empty_line
inline af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>
range() {
return this->range(_AP_W - 1, 0);
}
#pragma empty_line
inline af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>
range() const {
return this->range(_AP_W - 1, 0);
}
#pragma empty_line
inline bool is_zero () const {
return V.isMinValue();
}
#pragma empty_line
inline bool is_neg () const {
if (V.isNegative())
return true;
return false;
}
#pragma empty_line
inline int wl () const {
return _AP_W;
}
#pragma empty_line
inline int iwl () const {
return _AP_I;
}
#pragma empty_line
inline ap_q_mode q_mode () const {
return _AP_Q;
}
#pragma empty_line
inline ap_o_mode o_mode () const {
return _AP_O;
}
#pragma empty_line
inline int n_bits () const {
return 0;
}
#pragma empty_line
#pragma empty_line
public:
ap_private<_AP_W, _AP_S> V;
static const int width = _AP_W;
static const int iwidth = _AP_I;
static const ap_q_mode qmode = _AP_Q;
static const ap_o_mode omode = _AP_O;
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
std::string ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>::to_string(
uint8_t radix, bool sign) const {
std::string str;
str.clear();
char step = 0;
bool isNeg = sign && V.isNegative();
#pragma empty_line
#pragma empty_line
ap_fixed_base<_AP_W+1, _AP_I+1> tmp(*this);
if (isNeg) {
tmp = -tmp;
str += '-';
}
std::string prefix;
switch (radix) {
case 2 : prefix = "0b"; step = 1; break;
case 8 : prefix = "0o"; step = 3; break;
case 16 : prefix = "0x"; step = 4; break;
default : break;
}
#pragma empty_line
if (_AP_I > 0) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_fixed_base<((_AP_I+1) > (1) ? (_AP_I+1) : (1)), ((_AP_I+1) > (1) ? (_AP_I+1) : (1)), false> int_part = tmp;
str += int_part.to_ap_private().to_string(radix, false);
} else {
str += prefix;
str += '0';
}
ap_fixed_base<((_AP_W - _AP_I) > (1) ? (_AP_W - _AP_I) : (1)), 0, false> frac_part = tmp;
#pragma empty_line
if (radix == 10) {
if (frac_part != 0) {
str += ".";
while (frac_part != 0) {
char digit = (char)(frac_part * radix).to_ap_private();
str += static_cast<char>(digit + '0');
frac_part *= radix;
}
}
} else {
if (frac_part != 0) {
str += ".";
for (signed i = _AP_W - _AP_I - 1; i >= 0; i -= step) {
char digit = (char)(frac_part.range(i, ((0) > (i - step + 1) ? (0) : (i - step + 1))));
#pragma empty_line
#pragma empty_line
int offset = ((0) < (i - step + 1) ? (0) : (i - step + 1));
digit <<= -offset;
str += digit < 10 ? static_cast<char>(digit + '0') :
static_cast<char>(digit - 10 + 'a');
}
str += "p0";
}
}
return str;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline void b_not(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) {
ret.V = op.V;
ret.V.flip();
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline void b_and(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op1,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op2) {
ret.V = op1.V & op2.V;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline void b_or(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op1,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op2) {
ret.V = op1.V | op2.V;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline void b_xor(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op1,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op2) {
ret.V = op1.V ^ op2.V;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
int _AP_N, int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline void neg(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) {
ap_fixed_base<_AP_W2+!_AP_S2, _AP_I2+!_AP_S2, true, _AP_Q2, _AP_O2, _AP_N2> Tmp;
Tmp.V = - op.V;
ret = Tmp;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
int _AP_N>
inline void neg(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) {
ret.V = -op.V;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
int _AP_N, int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline void lshift(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op,
int i) {
ap_fixed_base<_AP_W2 - _AP_I2 + ((_AP_I) > (_AP_I2) ? (_AP_I) : (_AP_I2)), ((_AP_I) > (_AP_I2) ? (_AP_I) : (_AP_I2)), _AP_S2, _AP_Q2, _AP_O2, _AP_N2> Tmp;
Tmp = op;
Tmp.V <<= i;
ret = Tmp;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
int _AP_N>
inline void lshift(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op,
int i) {
ret.V = op.V << i;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
int _AP_N, int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline void rshift(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op,
int i) {
ap_fixed_base<_AP_I2 + ((_AP_W - _AP_I) > (_AP_W2 - _AP_I2) ? (_AP_W - _AP_I) : (_AP_W2 - _AP_I2)), _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> Tmp;
Tmp = op;
Tmp.V = _AP_S2 ? Tmp.V.ashr(i): Tmp.V.lshr(i);
ret = Tmp;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
int _AP_N>
inline void rshift(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret,
const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op,
int i) {
ret.V = _AP_S ? op.V.ashr(i): op.V.lshr(i);
}
#pragma line 2316 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<> inline ap_fixed_base<1,1,true,AP_TRN,AP_WRAP>::ap_fixed_base(bool i_op):V(i_op) { } template<> inline ap_fixed_base<1,1,false,AP_TRN,AP_WRAP>::ap_fixed_base(bool i_op):V(i_op) { }
template<> inline ap_fixed_base<8,8,true,AP_TRN,AP_WRAP>::ap_fixed_base(signed char i_op):V(i_op) { } template<> inline ap_fixed_base<8,8,false,AP_TRN,AP_WRAP>::ap_fixed_base(signed char i_op):V(i_op) { }
template<> inline ap_fixed_base<8,8,true,AP_TRN,AP_WRAP>::ap_fixed_base(unsigned char i_op):V(i_op) { } template<> inline ap_fixed_base<8,8,false,AP_TRN,AP_WRAP>::ap_fixed_base(unsigned char i_op):V(i_op) { }
template<> inline ap_fixed_base<16,16,true,AP_TRN,AP_WRAP>::ap_fixed_base(signed short i_op):V(i_op) { } template<> inline ap_fixed_base<16,16,false,AP_TRN,AP_WRAP>::ap_fixed_base(signed short i_op):V(i_op) { }
template<> inline ap_fixed_base<16,16,true,AP_TRN,AP_WRAP>::ap_fixed_base(unsigned short i_op):V(i_op) { } template<> inline ap_fixed_base<16,16,false,AP_TRN,AP_WRAP>::ap_fixed_base(unsigned short i_op):V(i_op) { }
template<> inline ap_fixed_base<32,32,true,AP_TRN,AP_WRAP>::ap_fixed_base(signed int i_op):V(i_op) { } template<> inline ap_fixed_base<32,32,false,AP_TRN,AP_WRAP>::ap_fixed_base(signed int i_op):V(i_op) { }
template<> inline ap_fixed_base<32,32,true,AP_TRN,AP_WRAP>::ap_fixed_base(unsigned int i_op):V(i_op) { } template<> inline ap_fixed_base<32,32,false,AP_TRN,AP_WRAP>::ap_fixed_base(unsigned int i_op):V(i_op) { }
template<> inline ap_fixed_base<64,64,true,AP_TRN,AP_WRAP>::ap_fixed_base(ap_slong i_op):V(i_op) { } template<> inline ap_fixed_base<64,64,false,AP_TRN,AP_WRAP>::ap_fixed_base(ap_slong i_op):V(i_op) { }
template<> inline ap_fixed_base<64,64,true,AP_TRN,AP_WRAP>::ap_fixed_base(ap_ulong i_op):V(i_op) { } template<> inline ap_fixed_base<64,64,false,AP_TRN,AP_WRAP>::ap_fixed_base(ap_ulong i_op):V(i_op) { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline std::string scientificFormat(std::string& input) {
if (input.length() == 0)
return input;
#pragma empty_line
size_t decPosition = input.find('.');
if (decPosition == std::string::npos)
decPosition = input.length();
#pragma empty_line
size_t firstNonZeroPos = 0;
for (; input[firstNonZeroPos] > '9' ||
input[firstNonZeroPos] < '1';
firstNonZeroPos++);
#pragma empty_line
int exp;
if (firstNonZeroPos > decPosition)
exp = decPosition - firstNonZeroPos;
else
exp = decPosition - firstNonZeroPos - 1;
std::string expString = "";
if (exp == 0);
else if (exp < 0) {
expString += "e-";
exp = -exp;
} else
expString += "e+";
#pragma empty_line
if (exp < 10 && exp > 0) {
expString += '0';
expString += (char)('0' + exp);
} else if (exp != 0) {
std::string tmp;
#pragma empty_line
std::ostringstream oss;
oss<<exp;
#pragma empty_line
tmp=oss.str();
expString += tmp;
}
#pragma empty_line
int lastNonZeroPos = (int) (input.length() - 1);
for (; lastNonZeroPos >= 0; --lastNonZeroPos)
if (input[lastNonZeroPos] <= '9' && input[lastNonZeroPos] > '0')
break;
#pragma empty_line
std::string ans = "";
ans += input[firstNonZeroPos];
if (firstNonZeroPos != (size_t)lastNonZeroPos) {
ans += '.';
for (int i=firstNonZeroPos+1; i <= lastNonZeroPos; i++)
if (input[i] != '.')
ans += input[i];
}
#pragma empty_line
ans += expString;
return ans;
}
#pragma empty_line
inline std::string reduceToPrecision(std::string& input, int precision) {
#pragma empty_line
bool isZero = true;
size_t inputLen = input.length();
for (size_t i=0; i<inputLen && isZero; i++)
if (input[i] != '.' && input[i] != '0')
isZero = false;
if (isZero)
return "0";
#pragma empty_line
#pragma empty_line
int FirstNonZeroPos = 0;
int LastNonZeroPos = (int) inputLen - 1;
int truncBitPosition = 0;
size_t decPosition = input.find('.');
for (; input[FirstNonZeroPos] < '1' || input[FirstNonZeroPos] > '9';
FirstNonZeroPos++);
#pragma empty_line
for (; input[LastNonZeroPos] < '1' || input[LastNonZeroPos] > '9';
LastNonZeroPos--);
#pragma empty_line
if (decPosition == std::string::npos)
decPosition = inputLen;
#pragma empty_line
if ((int) decPosition > LastNonZeroPos) {
if (LastNonZeroPos - FirstNonZeroPos + 1 <= precision)
return input;
truncBitPosition = FirstNonZeroPos + precision;
} else if ((int) decPosition < FirstNonZeroPos) {
if (LastNonZeroPos - FirstNonZeroPos + 1 <= precision) {
if (FirstNonZeroPos - decPosition - 1 < 4) {
return input;
} else {
if (input[0] == '-') {
std::string tmp = input.substr(1, inputLen-1);
return std::string("-") +
scientificFormat(tmp);
} else
return scientificFormat(input);
}
}
truncBitPosition = FirstNonZeroPos + precision;
} else {
if (LastNonZeroPos - FirstNonZeroPos <= precision)
return input;
truncBitPosition = FirstNonZeroPos + precision + 1;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
std::string ans = "";
std::string dupInput = "0";
if (input[0] == '-') {
ans += '-';
dupInput += input.substr(1, inputLen-1);
} else {
dupInput += input.substr(0, inputLen);
++truncBitPosition;
}
#pragma empty_line
#pragma empty_line
bool carry = dupInput[truncBitPosition] > '4';
for (int i = truncBitPosition-1; i >=0 && carry; i--) {
if (dupInput[i] == '.')
continue;
if (dupInput[i] == '9')
dupInput[i] = '0';
else {
++dupInput[i];
carry = false;
}
}
#pragma empty_line
#pragma empty_line
if (dupInput[0] == '1')
FirstNonZeroPos = 0;
else {
FirstNonZeroPos = 0;
while (dupInput[FirstNonZeroPos] < '1' ||
dupInput[FirstNonZeroPos] > '9')
++FirstNonZeroPos;
}
#pragma empty_line
unsigned it = FirstNonZeroPos;
int NValidNumber = 0;
while (it < dupInput.length()) {
if (dupInput[it] == '.') {
++it;
continue;
}
++NValidNumber;
if (NValidNumber > precision)
dupInput[it] = '0';
++it;
}
#pragma empty_line
#pragma empty_line
decPosition = dupInput.find('.');
if (decPosition == std::string::npos)
truncBitPosition = (int) dupInput.length();
else
for (truncBitPosition = (int) (dupInput.length()-1);
truncBitPosition >=0;
--truncBitPosition) {
if (dupInput[truncBitPosition] == '.')
break;
if (dupInput[truncBitPosition] != '0') {
truncBitPosition++;
break;
}
}
#pragma empty_line
if (dupInput[0] == '1')
dupInput = dupInput.substr(0,
truncBitPosition);
else
dupInput = dupInput.substr(1, truncBitPosition-1);
#pragma empty_line
decPosition = dupInput.find('.');
if (decPosition != std::string::npos) {
size_t it = 0;
for (it = decPosition+1; dupInput[it]=='0'; it++);
if (it - decPosition - 1 < 4) {
ans += dupInput;
return ans;
} else {
ans += scientificFormat(dupInput);
return ans;
}
} else if ((int)(dupInput.length()) <= precision) {
ans += dupInput;
return ans;
}
#pragma empty_line
ans += scientificFormat(dupInput);
return ans;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline std::ostream&
operator <<(std::ostream& out, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& x) {
unsigned width = out.width();
unsigned precision = out.precision();
char fill = out.fill();
std::string str=x.to_string(10,_AP_S);
str = reduceToPrecision(str, precision);
if (width > str.length()) {
char *padding = (char*)malloc((width - str.length() + 1)*sizeof(char));
for (unsigned i=0; i<width - str.length(); ++i)
padding[i] = fill;
padding[width - str.length()] = 0;
str = std::string(padding) + str;
free(padding);
}
out<<str;
return out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline std::istream&
operator >> (std::istream& os, ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& x) {
double d;
os >> d;
x = ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>(d);
return os;
}
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline void print(const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& x) {
ap_private<_AP_W,_AP_S> data=x.V;
if(_AP_I>0) {
const ap_private<_AP_I,_AP_S> p1=data>>(_AP_W-_AP_I);
print(p1);
#pragma empty_line
} else
printf("0");
printf(".");
if(_AP_I<_AP_W) {
const ap_private<_AP_W-_AP_I,false> p2=data;
print(p2,false);
}
}
#pragma line 2703 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator + (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::plus operator + (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator - (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::minus operator - (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator * (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::mult operator * (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator / (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::div operator / (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator >>(ap_private<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator <<(ap_private<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator & (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator & (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator | (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator | (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator ^ (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator ^ (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator == (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator != (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator > (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator >= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator < (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator <= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator += (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator -= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator *= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator /= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator >>= (ap_private<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator <<= (ap_private<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator &= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator |= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator ^= (ap_fixed_base<1,1,false>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator + (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator - (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator * (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator / (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator >>(ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator <<(ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator & (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator | (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator ^ (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator == (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator != (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator > (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator >= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator < (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator <= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator += (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator -= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator *= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator /= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator >>= (ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator <<= (ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator &= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator |= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator ^= (ap_fixed_base<8,8,true>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator + (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator - (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator * (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator / (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator >>(ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator <<(ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator & (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator | (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator ^ (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator == (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator != (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator > (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator >= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator < (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator <= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator += (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator -= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator *= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator /= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator >>= (ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator <<= (ap_private<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator &= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator |= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator ^= (ap_fixed_base<8,8,true>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator + (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::plus operator + (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator - (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::minus operator - (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator * (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::mult operator * (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator / (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::div operator / (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator >>(ap_private<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator <<(ap_private<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator & (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator & (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator | (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator | (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator ^ (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator ^ (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator == (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator != (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator > (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator >= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator < (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator <= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator += (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator -= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator *= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator /= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator >>= (ap_private<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator <<= (ap_private<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator &= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator |= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator ^= (ap_fixed_base<8,8,false>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator + (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::plus operator + (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator - (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::minus operator - (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator * (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::mult operator * (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator / (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::div operator / (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator >>(ap_private<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator <<(ap_private<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator & (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator & (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator | (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator | (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator ^ (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator ^ (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator == (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator != (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator > (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator >= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator < (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator <= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator += (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator -= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator *= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator /= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator >>= (ap_private<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator <<= (ap_private<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator &= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator |= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, short i_op) { return op.operator ^= (ap_fixed_base<16,16,true>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator + (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::plus operator + (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator - (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::minus operator - (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator * (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::mult operator * (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator / (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::div operator / (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator >>(ap_private<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator <<(ap_private<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator & (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator & (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator | (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator | (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator ^ (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator ^ (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator == (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator != (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator > (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator >= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator < (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator <= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator += (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator -= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator *= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator /= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator >>= (ap_private<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator <<= (ap_private<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator &= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator |= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator ^= (ap_fixed_base<16,16,false>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator + (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::plus operator + (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator - (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::minus operator - (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator * (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::mult operator * (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator / (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::div operator / (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator >>(ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator <<(ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator & (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator & (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator | (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator | (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator ^ (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator ^ (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator == (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator != (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator > (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator >= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator < (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator <= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator += (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator -= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator *= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator /= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator >>= (ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator <<= (ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator &= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator |= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator ^= (ap_fixed_base<32,32,true>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator + (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::plus operator + (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator - (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::minus operator - (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator * (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::mult operator * (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator / (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::div operator / (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator >>(ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator <<(ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator & (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator & (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator | (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator | (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator ^ (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator ^ (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator == (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator != (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator > (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator >= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator < (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator <= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator += (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator -= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator *= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator /= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator >>= (ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator <<= (ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator &= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator |= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator ^= (ap_fixed_base<32,32,false>(i_op)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator + (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::plus operator + (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator - (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::minus operator - (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator * (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::mult operator * (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator / (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::div operator / (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator >>(ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator <<(ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator & (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator & (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator | (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator | (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator ^ (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator ^ (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator == (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator != (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator > (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator >= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator < (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator <= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator += (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator -= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator *= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator /= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator >>= (ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator <<= (ap_private<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator &= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator |= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator ^= (ap_fixed_base<32,32,true>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator + (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::plus operator + (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator - (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::minus operator - (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator * (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::mult operator * (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator / (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::div operator / (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator >>(ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator <<(ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator & (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator & (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator | (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator | (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator ^ (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator ^ (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator == (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator != (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator > (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator >= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator < (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator <= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator += (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator -= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator *= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator /= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator >>= (ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator <<= (ap_private<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator &= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator |= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator ^= (ap_fixed_base<32,32,false>(i_op)); }
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator + (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::plus operator + (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator - (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::minus operator - (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator * (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::mult operator * (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator / (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::div operator / (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator >>(ap_private<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator <<(ap_private<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator & (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator & (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator | (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator | (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator ^ (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator ^ (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator == (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator != (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator > (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator >= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator < (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator <= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator += (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator -= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator *= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator /= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator >>= (ap_private<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator <<= (ap_private<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator &= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator |= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator ^= (ap_fixed_base<64,64,true>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::plus operator + (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator + (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::plus operator + (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::minus operator - (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator - (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::minus operator - (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::mult operator * (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator * (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::mult operator * (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::div operator / (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator / (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::div operator / (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::arg1 operator >> (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator >>(ap_private<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::arg1 operator << (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator <<(ap_private<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator & (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator & (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator & (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator | (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator | (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator | (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator ^ (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator ^ (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S,ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator ^ (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator == (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator != (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator > (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator >= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator < (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator <= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= (ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator += (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator -= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator *= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator /= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator >>= (ap_private<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator <<= (ap_private<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator &= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator |= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator ^= (ap_fixed_base<64,64,false>(i_op)); }
#pragma line 2753 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::plus operator + ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator + (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::minus operator - ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator - (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::mult operator * ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator * (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::div operator / ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator / (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::logic operator & ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator & (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::logic operator | ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator | (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::logic operator ^ ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator ^ (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); }
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator == ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator == (op); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator != ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator != (op); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator > ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator > (op); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator >= ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator >= (op); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator < ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator < (op); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator <= ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator <= (op); }
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator += (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator += ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator += (op.to_ap_private()); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator -= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator -= ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator -= (op.to_ap_private()); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator *= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator *= ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator *= (op.to_ap_private()); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator /= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator /= ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator /= (op.to_ap_private()); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator &= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator &= ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator &= (op.to_ap_private()); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator |= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator |= ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator |= (op.to_ap_private()); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, const ap_private<_AP_W2,_AP_S2>& i_op) { return op.operator ^= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline ap_private<_AP_W2,_AP_S2>& operator ^= ( ap_private<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator ^= (op.to_ap_private()); }
#pragma line 2806 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<1,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<1,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<1,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<1,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<1,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<1,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<8,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<16,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<32,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,true>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,true>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,true>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,true>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,true>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,true>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator > (ap_private<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,false>(op2).operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator > ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator < (ap_private<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,false>(op2).operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator < ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator >= (ap_private<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,false>(op2).operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator >= ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator <= (ap_private<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,false>(op2).operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator <= ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator == (ap_private<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,false>(op2).operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator == ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_private<_AP_W, false>(op)).operator != (ap_private<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_private<64,false>(op2).operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline bool operator != ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); }
#pragma line 2846 "F:/Xilinx/Vivado_HLS/2015.4/include/etc/ap_fixed_sim.h"
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S> &op2) { return (ap_private<_AP_W, false>(op)).operator > (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator > (const ap_private<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator > (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S2> &op2) { return (ap_private<1, false>(op)).operator > (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator > ( const ap_private<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator > (ap_private<1,false>(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S> &op2) { return (ap_private<_AP_W, false>(op)).operator < (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator < (const ap_private<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator < (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S2> &op2) { return (ap_private<1, false>(op)).operator < (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator < ( const ap_private<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator < (ap_private<1,false>(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S> &op2) { return (ap_private<_AP_W, false>(op)).operator >= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator >= (const ap_private<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator >= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S2> &op2) { return (ap_private<1, false>(op)).operator >= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator >= ( const ap_private<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator >= (ap_private<1,false>(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S> &op2) { return (ap_private<_AP_W, false>(op)).operator <= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator <= (const ap_private<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator <= (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S2> &op2) { return (ap_private<1, false>(op)).operator <= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator <= ( const ap_private<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator <= (ap_private<1,false>(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S> &op2) { return (ap_private<_AP_W, false>(op)).operator == (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator == (const ap_private<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator == (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S2> &op2) { return (ap_private<1, false>(op)).operator == (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator == ( const ap_private<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator == (ap_private<1,false>(op)); }
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S> &op2) { return (ap_private<_AP_W, false>(op)).operator != (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator != (const ap_private<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator != (ap_private<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_private<_AP_W2, _AP_S2> &op2) { return (ap_private<1, false>(op)).operator != (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline bool operator != ( const ap_private<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator != (ap_private<1,false>(op)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline bool operator == ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) {
return op2.operator == (op1);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline bool operator != ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) {
return op2.operator != (op1);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline bool operator > ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) {
return op2.operator < (op1);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline bool operator >= ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) {
return op2.operator <= (op1);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline bool operator < ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) {
return op2.operator > (op1);
}
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N>
inline bool operator <= ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) {
return op2.operator >= (op1);
}
#pragma line 76 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_int.h" 2
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, ap_q_mode _AP_Q,
ap_o_mode _AP_O, int _AP_N> class ap_fixed;
template<int _AP_W, int _AP_I, ap_q_mode _AP_Q,
ap_o_mode _AP_O, int _AP_N> class ap_ufixed;
template<int _AP_W> class ap_int;
template<int _AP_W> class ap_uint;
#pragma empty_line
#pragma empty_line
template<int _AP_W>
class ap_int: public ap_private<_AP_W, true> {
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef ap_private<_AP_W, true> Base;
#pragma empty_line
inline ap_int(): Base() {}
template<int _AP_W2>
inline ap_int(const volatile ap_int<_AP_W2> &op):Base((const ap_private<_AP_W2,true> &)(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_int(const ap_int<_AP_W2> &op):Base((const ap_private<_AP_W2,true> &)(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_int(const ap_uint<_AP_W2> &op):Base((const ap_private<_AP_W2,false> &)(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_int(const volatile ap_uint<_AP_W2> &op):Base((const ap_private<_AP_W2,false> &)(op)) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_int(const ap_range_ref<_AP_W2, _AP_S2>& ref):Base(ref) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_int(const ap_bit_ref<_AP_W2, _AP_S2>& ref):Base(ref) {}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_int(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& ref):Base(ref) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_int(const ap_private<_AP_W2, _AP_S2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2,
_AP_N2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2,
_AP_N2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_int(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op):Base(op.to_ap_private()) {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_int(bool v):Base(v) {}
inline ap_int(signed char v):Base(v) {}
inline ap_int(unsigned char v):Base(v) {}
inline ap_int(short v):Base(v) {}
inline ap_int(unsigned short v):Base(v) {}
inline ap_int(int v):Base(v) {}
inline ap_int(unsigned int v):Base(v) {}
inline ap_int(long v):Base(v) {}
inline ap_int(unsigned long v):Base(v) {}
inline ap_int(unsigned long long v):Base(v) {}
inline ap_int(long long v):Base(v) {}
inline ap_int(float v):Base(v) {}
inline ap_int(double v):Base(v) {}
inline ap_int(const char* v):Base(v) {}
#pragma empty_line
#pragma empty_line
inline ap_int(const char* str, signed char rd):Base(str, rd) {}
#pragma empty_line
#pragma empty_line
inline void operator = (const ap_int<_AP_W>& op2) volatile {
const_cast<ap_int*>(this)->operator = (op2);
}
#pragma empty_line
inline void operator = (const volatile ap_int<_AP_W>& op2) volatile {
const_cast<Base*>(this)->operator = (op2);
}
#pragma empty_line
inline ap_int<_AP_W>& operator = (const volatile ap_int<_AP_W>& op2) {
Base::operator = (const_cast<ap_int<_AP_W>& >(op2));
return *this;
}
#pragma empty_line
inline ap_int<_AP_W>& operator = (const ap_int<_AP_W>& op2) {
Base::operator = ((const ap_private<_AP_W, true>&)op2);
return *this;
}
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W>
class ap_uint: public ap_private<_AP_W, false> {
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef ap_private<_AP_W, false> Base;
#pragma empty_line
inline ap_uint(): Base() {}
inline ap_uint(const ap_uint<_AP_W>& op) :Base(dynamic_cast<const ap_private<_AP_W, false>&>(op)) {}
inline ap_uint(const volatile ap_uint<_AP_W>& op):Base(dynamic_cast<const volatile ap_private<_AP_W, false>&>(op)){}
template<int _AP_W2>
inline ap_uint(const volatile ap_uint<_AP_W2> &op):Base((const ap_private<_AP_W2, false>&)(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_uint(const ap_uint<_AP_W2> &op) : Base((const ap_private<_AP_W2, false>&)(op)){}
#pragma empty_line
template<int _AP_W2>
inline ap_uint(const ap_int<_AP_W2> &op) : Base((const ap_private<_AP_W2, true>&)(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_uint(const volatile ap_int<_AP_W2> &op) : Base((const ap_private<_AP_W2, false>&)(op)) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_uint(const ap_range_ref<_AP_W2, _AP_S2>& ref):Base(ref) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_uint(const ap_bit_ref<_AP_W2, _AP_S2>& ref):Base(ref) {}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_uint(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& ref):Base(ref) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op.to_ap_private()) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op)
:Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_uint(const ap_private<_AP_W2, _AP_S2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2,
_AP_N2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2,
_AP_N2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_uint(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op):Base(op.to_ap_private()) {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_uint(bool v):Base(v) {}
inline ap_uint(signed char v):Base(v) {}
inline ap_uint(unsigned char v):Base(v) {}
inline ap_uint(short v):Base(v) {}
inline ap_uint(unsigned short v):Base(v) {}
inline ap_uint(int v):Base(v) {}
inline ap_uint(unsigned int v):Base(v) {}
inline ap_uint(long v):Base(v) {}
inline ap_uint(unsigned long v):Base(v) {}
inline ap_uint(unsigned long long v):Base(v) {}
inline ap_uint(long long v):Base(v) {}
inline ap_uint(float v):Base(v) {}
inline ap_uint(double v):Base(v) {}
inline ap_uint(const char* v):Base(v) {}
#pragma empty_line
#pragma empty_line
inline ap_uint(const char* str, signed char rd):Base(str, rd) {}
#pragma empty_line
#pragma empty_line
inline void operator = (const ap_uint<_AP_W>& op2) volatile {
Base::operator = (op2);
}
#pragma empty_line
inline void operator = (const volatile ap_uint<_AP_W>& op2) volatile {
Base::operator = (op2);
}
#pragma empty_line
inline ap_uint<_AP_W>& operator = (const volatile ap_uint<_AP_W>& op2) {
Base::operator = (op2);
return *this;
}
#pragma empty_line
inline ap_uint<_AP_W>& operator = (const ap_uint<_AP_W>& op2) {
Base::operator = ((const ap_private<_AP_W, false>&)(op2));
return *this;
}
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, ap_q_mode _AP_Q = AP_TRN,
ap_o_mode _AP_O = AP_WRAP, int _AP_N = 0>
class ap_fixed: public ap_fixed_base<_AP_W, _AP_I, true, _AP_Q, _AP_O, _AP_N> {
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef ap_fixed_base<_AP_W, _AP_I, true, _AP_Q, _AP_O, _AP_N> Base;
#pragma empty_line
inline ap_fixed():Base() {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2,
_AP_N2>& op): Base(op) {}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2,
_AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2,
false, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed(const ap_int<_AP_W2>& op):
Base(ap_private<_AP_W2, true>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed(const ap_uint<_AP_W2>& op):Base(ap_private<_AP_W2, false>(op)) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2,
_AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2,
true, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2,
_AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2,
false, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed(const volatile ap_int<_AP_W2>& op):
Base(ap_private<_AP_W2, true>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_fixed(const volatile ap_uint<_AP_W2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_fixed(const ap_bit_ref<_AP_W2, _AP_S2>& op):
Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_fixed(const ap_range_ref<_AP_W2, _AP_S2>& op):
Base(op) {}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_fixed(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op):
Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_fixed(const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_fixed(const ap_private<_AP_W2, _AP_S2>& op):Base(op) {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_fixed(bool v):Base(v) {}
inline ap_fixed(signed char v):Base(v) {}
inline ap_fixed(unsigned char v):Base(v) {}
inline ap_fixed(short v):Base(v) {}
inline ap_fixed(unsigned short v):Base(v) {}
inline ap_fixed(int v):Base(v) {}
inline ap_fixed(unsigned int v):Base(v) {}
inline ap_fixed(long v):Base(v) {}
inline ap_fixed(unsigned long v):Base(v) {}
inline ap_fixed(unsigned long long v):Base(v) {}
inline ap_fixed(long long v):Base(v) {}
inline ap_fixed(float v):Base(v) {}
inline ap_fixed(double v):Base(v) {}
inline ap_fixed(const char* v):Base(v) {}
#pragma empty_line
#pragma empty_line
inline ap_fixed(const char* str, signed char rd):Base(str, rd) {}
#pragma empty_line
#pragma empty_line
inline ap_fixed& operator = (const ap_fixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) {
Base::operator = (op);
return *this;
}
#pragma empty_line
inline ap_fixed& operator = (const volatile ap_fixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) {
Base::operator = (op);
return *this;
}
#pragma empty_line
inline void operator = (const ap_fixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) volatile {
Base::operator = (op);
}
#pragma empty_line
inline void operator = (const volatile ap_fixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) volatile {
Base::operator = (op);
}
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
template<int _AP_W, int _AP_I, ap_q_mode _AP_Q = AP_TRN,
ap_o_mode _AP_O = AP_WRAP, int _AP_N = 0>
class ap_ufixed: public ap_fixed_base<_AP_W, _AP_I, false, _AP_Q, _AP_O, _AP_N> {
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef ap_fixed_base<_AP_W, _AP_I, false, _AP_Q, _AP_O, _AP_N> Base;
#pragma empty_line
inline ap_ufixed():Base() {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2,
_AP_O2, _AP_N2>& op) : Base(ap_fixed_base<_AP_W2,
_AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2,
_AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2,
false, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_ufixed(const ap_int<_AP_W2>& op):
Base((const ap_private<_AP_W2, true>&)(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_ufixed(const ap_uint<_AP_W2>& op):
Base((const ap_private<_AP_W2, false>&)(op)) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2,
_AP_O2, _AP_N2>& op) : Base(ap_fixed_base<_AP_W2,
_AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
#pragma empty_line
template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2,
_AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2,
false, _AP_Q2, _AP_O2, _AP_N2>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_ufixed(const volatile ap_int<_AP_W2>& op):
Base(ap_private<_AP_W2, true>(op)) {}
#pragma empty_line
template<int _AP_W2>
inline ap_ufixed(const volatile ap_uint<_AP_W2>& op):
Base(ap_private<_AP_W2, false>(op)) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2,
_AP_O2, _AP_N2>& op):Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_ufixed(const ap_bit_ref<_AP_W2, _AP_S2>& op):
Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_ufixed(const ap_range_ref<_AP_W2, _AP_S2>& op):
Base(op) {}
#pragma empty_line
template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3>
inline ap_ufixed(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op):
Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {}
#pragma empty_line
template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2,
ap_o_mode _AP_O2, int _AP_N2>
inline ap_ufixed(const af_range_ref<_AP_W2, _AP_I2, _AP_S2,
_AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {}
#pragma empty_line
template<int _AP_W2, bool _AP_S2>
inline ap_ufixed(const ap_private<_AP_W2, _AP_S2>& op):Base(op) {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_ufixed(bool v):Base(v) {}
inline ap_ufixed(signed char v):Base(v) {}
inline ap_ufixed(unsigned char v):Base(v) {}
inline ap_ufixed(short v):Base(v) {}
inline ap_ufixed(unsigned short v):Base(v) {}
inline ap_ufixed(int v):Base(v) {}
inline ap_ufixed(unsigned int v):Base(v) {}
inline ap_ufixed(long v):Base(v) {}
inline ap_ufixed(unsigned long v):Base(v) {}
inline ap_ufixed(unsigned long long v):Base(v) {}
inline ap_ufixed(long long v):Base(v) {}
inline ap_ufixed(float v):Base(v) {}
inline ap_ufixed(double v):Base(v) {}
inline ap_ufixed(const char* v):Base(v) {}
#pragma empty_line
#pragma empty_line
inline ap_ufixed(const char* str, signed char rd):Base(str, rd) {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline ap_ufixed& operator = (const ap_ufixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) {
Base::operator = (op);
return *this;
}
#pragma empty_line
inline ap_ufixed& operator = (const volatile ap_ufixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) {
Base::V = const_cast<ap_ufixed&>(op);
return *this;
}
#pragma empty_line
inline void operator = (const ap_ufixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) volatile {
Base::operator = (op);
}
#pragma empty_line
inline void operator = (const volatile ap_ufixed<_AP_W, _AP_I,
_AP_Q, _AP_O, _AP_N>& op) volatile {
Base::V = const_cast<ap_ufixed&>(op);
}
#pragma empty_line
};
#pragma line 88 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_axi_sdata.h" 2
#pragma empty_line
template<int D,int U,int TI,int TD>
struct ap_axis{
ap_int<D> data;
ap_uint<(D+7)/8> keep;
ap_uint<(D+7)/8> strb;
ap_uint<U> user;
ap_uint<1> last;
ap_uint<TI> id;
ap_uint<TD> dest;
};
#pragma empty_line
template<int D,int U,int TI,int TD>
struct ap_axiu{
ap_uint<D> data;
ap_uint<(D+7)/8> keep;
ap_uint<(D+7)/8> strb;
ap_uint<U> user;
ap_uint<1> last;
ap_uint<TI> id;
ap_uint<TD> dest;
};
#pragma line 40 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h" 1
#pragma line 35 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma line 36 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_fixed.h" 1
#pragma line 37 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 1
#pragma line 40 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h" 1
#pragma line 115 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h"
typedef int8_t xint8;
typedef int16_t xint16;
typedef int32_t xint32;
typedef int64_t xint64;
typedef uint8_t xuint8;
typedef uint16_t xuint16;
typedef uint32_t xuint32;
typedef uint64_t xuint64;
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdbool.h" 1 3 4
#pragma line 126 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h" 2
#pragma line 143 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h" 1
#pragma line 27 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdio" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdio" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdio" 3
#pragma line 92 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdio" 3
namespace std
{
using ::FILE;
using ::fpos_t;
#pragma empty_line
using ::clearerr;
using ::fclose;
using ::feof;
using ::ferror;
using ::fflush;
using ::fgetc;
using ::fgetpos;
using ::fgets;
using ::fopen;
using ::fprintf;
using ::fputc;
using ::fputs;
using ::fread;
using ::freopen;
using ::fscanf;
using ::fseek;
using ::fsetpos;
using ::ftell;
using ::fwrite;
using ::getc;
using ::getchar;
using ::gets;
using ::perror;
using ::printf;
using ::putc;
using ::putchar;
using ::puts;
using ::remove;
using ::rename;
using ::rewind;
using ::scanf;
using ::setbuf;
using ::setvbuf;
using ::sprintf;
using ::sscanf;
using ::tmpfile;
using ::tmpnam;
using ::ungetc;
using ::vfprintf;
using ::vprintf;
using ::vsprintf;
}
#pragma line 148 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdio" 3
namespace __gnu_cxx
{
#pragma line 166 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdio" 3
using ::snprintf;
using ::vfscanf;
using ::vscanf;
using ::vsnprintf;
using ::vsscanf;
#pragma empty_line
}
#pragma empty_line
namespace std
{
using ::__gnu_cxx::snprintf;
using ::__gnu_cxx::vfscanf;
using ::__gnu_cxx::vscanf;
using ::__gnu_cxx::vsnprintf;
using ::__gnu_cxx::vsscanf;
}
#pragma line 28 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h" 2
#pragma line 53 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstddef" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstddef" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstddef" 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstddef" 2 3
#pragma line 54 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h" 2
#pragma line 201 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
typedef unsigned long int mp_limb_t;
typedef long int mp_limb_signed_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef unsigned long int mp_bitcnt_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef struct
{
int _mp_alloc;
#pragma empty_line
int _mp_size;
#pragma empty_line
#pragma empty_line
mp_limb_t *_mp_d;
} __mpz_struct;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef __mpz_struct mpz_t[1];
#pragma empty_line
typedef mp_limb_t * mp_ptr;
typedef const mp_limb_t * mp_srcptr;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long int mp_size_t;
typedef long int mp_exp_t;
#pragma empty_line
#pragma empty_line
typedef struct
{
__mpz_struct _mp_num;
__mpz_struct _mp_den;
} __mpq_struct;
#pragma empty_line
typedef __mpq_struct mpq_t[1];
#pragma empty_line
typedef struct
{
int _mp_prec;
#pragma empty_line
#pragma empty_line
#pragma empty_line
int _mp_size;
#pragma empty_line
#pragma empty_line
mp_exp_t _mp_exp;
mp_limb_t *_mp_d;
} __mpf_struct;
#pragma empty_line
typedef __mpf_struct mpf_t[1];
#pragma empty_line
#pragma empty_line
typedef enum
{
GMP_RAND_ALG_DEFAULT = 0,
GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT
} gmp_randalg_t;
#pragma empty_line
#pragma empty_line
typedef struct
{
mpz_t _mp_seed;
gmp_randalg_t _mp_alg;
union {
void *_mp_lc;
} _mp_algdata;
} __gmp_randstate_struct;
typedef __gmp_randstate_struct gmp_randstate_t[1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef const __mpz_struct *mpz_srcptr;
typedef __mpz_struct *mpz_ptr;
typedef const __mpf_struct *mpf_srcptr;
typedef __mpf_struct *mpf_ptr;
typedef const __mpq_struct *mpq_srcptr;
typedef __mpq_struct *mpq_ptr;
#pragma line 532 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
extern "C" {
using std::FILE;
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmp_set_memory_functions (void *(*) (size_t), void *(*) (void *, size_t, size_t), void (*) (void *, size_t))
#pragma empty_line
throw ();
#pragma empty_line
#pragma empty_line
void __gmp_get_memory_functions (void *(**) (size_t), void *(**) (void *, size_t, size_t), void (**) (void *, size_t))
#pragma empty_line
throw ();
#pragma empty_line
#pragma empty_line
extern const int __gmp_bits_per_limb;
#pragma empty_line
#pragma empty_line
extern int __gmp_errno;
#pragma empty_line
#pragma empty_line
extern const char * const __gmp_version;
#pragma empty_line
#pragma empty_line
extern const char * const __mpir_version;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmp_randinit_default (gmp_randstate_t);
#pragma empty_line
#pragma empty_line
void __gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t)
#pragma empty_line
;
#pragma empty_line
#pragma empty_line
int __gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmp_randinit_mt (gmp_randstate_t);
#pragma empty_line
#pragma empty_line
void __gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *);
#pragma empty_line
#pragma empty_line
void __gmp_randseed (gmp_randstate_t, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmp_randseed_ui (gmp_randstate_t, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmp_randclear (gmp_randstate_t);
#pragma empty_line
#pragma empty_line
unsigned long __gmp_urandomb_ui (gmp_randstate_t, unsigned long);
#pragma empty_line
#pragma empty_line
unsigned long __gmp_urandomm_ui (gmp_randstate_t, unsigned long);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmp_asprintf (char **, const char *, ...);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmp_fprintf (FILE *, const char *, ...);
#pragma line 615 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
int __gmp_printf (const char *, ...);
#pragma empty_line
#pragma empty_line
int __gmp_snprintf (char *, size_t, const char *, ...);
#pragma empty_line
#pragma empty_line
int __gmp_sprintf (char *, const char *, ...);
#pragma line 653 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
int __gmp_fscanf (FILE *, const char *, ...);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmp_scanf (const char *, ...);
#pragma empty_line
#pragma empty_line
int __gmp_sscanf (const char *, const char *, ...);
#pragma line 684 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
void *__gmpz_realloc (mpz_ptr, mp_size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_abs (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_array_init (mpz_ptr, mp_size_t, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, unsigned long);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_cdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_clear (mpz_ptr);
#pragma empty_line
#pragma empty_line
void __gmpz_clears (mpz_ptr, ...);
#pragma empty_line
#pragma empty_line
void __gmpz_clrbit (mpz_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
int __gmpz_cmp (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_cmp_d (mpz_srcptr, double) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_cmp_si (mpz_srcptr, signed long int) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_cmp_ui (mpz_srcptr, unsigned long int) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_cmpabs (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_cmpabs_d (mpz_srcptr, double) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_cmpabs_ui (mpz_srcptr, unsigned long int) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_com (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_combit (mpz_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
int __gmpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long);
#pragma empty_line
#pragma empty_line
int __gmpz_divisible_p (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_divisible_ui_p (mpz_srcptr, unsigned long) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_dump (mpz_srcptr);
#pragma empty_line
#pragma empty_line
void *__gmpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_fac_ui (mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_fdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_fib_ui (mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
int __gmpz_fits_sint_p (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_fits_slong_p (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_fits_sshort_p (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_fits_uint_p (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_fits_ulong_p (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_fits_ushort_p (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
double __gmpz_get_d (mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
double __gmpz_get_d_2exp (signed long int *, mpz_srcptr);
#pragma empty_line
#pragma empty_line
long int __gmpz_get_si (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
char *__gmpz_get_str (char *, int, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_get_ui (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpz_getlimbn (mpz_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpz_hamdist (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *);
#pragma empty_line
#pragma empty_line
void __gmpz_init (mpz_ptr);
#pragma empty_line
#pragma empty_line
void __gmpz_init2 (mpz_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmpz_inits (mpz_ptr, ...);
#pragma empty_line
#pragma empty_line
void __gmpz_init_set (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_init_set_d (mpz_ptr, double);
#pragma empty_line
#pragma empty_line
void __gmpz_init_set_si (mpz_ptr, signed long int);
#pragma empty_line
#pragma empty_line
int __gmpz_init_set_str (mpz_ptr, const char *, int);
#pragma empty_line
#pragma empty_line
void __gmpz_init_set_ui (mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpz_inp_raw (mpz_ptr, FILE *);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpz_inp_str (mpz_ptr, FILE *, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
int __gmpz_jacobi (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_kronecker_si (mpz_srcptr, long) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_kronecker_ui (mpz_srcptr, unsigned long) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_si_kronecker (long, mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_ui_kronecker (unsigned long, mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_lucnum_ui (mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
int __gmpz_millerrabin (mpz_srcptr, int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_mul_si (mpz_ptr, mpz_srcptr, long int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_neg (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_nextprime (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_next_likely_prime (mpz_ptr, mpz_srcptr,gmp_randstate_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpz_out_raw (FILE *, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpz_out_str (FILE *, int, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_perfect_power_p (mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpz_perfect_square_p (mpz_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpz_popcount (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr);
#pragma empty_line
#pragma empty_line
int __gmpz_probab_prime_p (mpz_srcptr, int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpz_probable_prime_p (mpz_srcptr,gmp_randstate_t, int,unsigned long);
#pragma empty_line
#pragma empty_line
int __gmpz_likely_prime_p (mpz_srcptr,gmp_randstate_t, unsigned long);
#pragma empty_line
#pragma empty_line
void __gmpz_realloc2 (mpz_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
int __gmpz_root (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_nthroot (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_rootrem (mpz_ptr,mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpz_scan0 (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpz_scan1 (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_set (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_set_d (mpz_ptr, double);
#pragma empty_line
#pragma empty_line
void __gmpz_set_f (mpz_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_set_q (mpz_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_set_si (mpz_ptr, signed long int);
#pragma empty_line
#pragma empty_line
int __gmpz_set_str (mpz_ptr, const char *, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_set_ui (mpz_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_setbit (mpz_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpz_size (mpz_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpz_sizeinbase (mpz_srcptr, int) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_sqrt (mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_swap (mpz_ptr, mpz_ptr) throw ();
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_tdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
unsigned long int __gmpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
int __gmpz_tstbit (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpq_abs (mpq_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_canonicalize (mpq_ptr);
#pragma empty_line
#pragma empty_line
void __gmpq_clear (mpq_ptr);
#pragma empty_line
#pragma empty_line
void __gmpq_clears (mpq_ptr, ...);
#pragma empty_line
#pragma empty_line
int __gmpq_cmp (mpq_srcptr, mpq_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpq_cmp_si (mpq_srcptr, long, unsigned long) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
int __gmpq_equal (mpq_srcptr, mpq_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpq_get_num (mpz_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_get_den (mpz_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
double __gmpq_get_d (mpq_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
char *__gmpq_get_str (char *, int, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_init (mpq_ptr);
#pragma empty_line
#pragma empty_line
void __gmpq_inits (mpq_ptr, ...);
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpq_inp_str (mpq_ptr, FILE *, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpq_inv (mpq_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpq_neg (mpq_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpq_out_str (FILE *, int, mpq_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpq_set (mpq_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_set_d (mpq_ptr, double);
#pragma empty_line
#pragma empty_line
void __gmpq_set_den (mpq_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_set_f (mpq_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_set_num (mpq_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_set_si (mpq_ptr, signed long int, unsigned long int);
#pragma empty_line
#pragma empty_line
int __gmpq_set_str (mpq_ptr, const char *, int);
#pragma empty_line
#pragma empty_line
void __gmpq_set_ui (mpq_ptr, unsigned long int, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpq_set_z (mpq_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpq_swap (mpq_ptr, mpq_ptr) throw ();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpf_abs (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int);
#pragma empty_line
void __gmpf_ceil (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_clear (mpf_ptr);
#pragma empty_line
#pragma empty_line
void __gmpf_clears (mpf_ptr, ...);
#pragma empty_line
#pragma empty_line
int __gmpf_cmp (mpf_srcptr, mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_cmp_d (mpf_srcptr, double) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_cmp_si (mpf_srcptr, signed long int) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_cmp_ui (mpf_srcptr, unsigned long int) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpf_dump (mpf_srcptr);
#pragma empty_line
#pragma empty_line
int __gmpf_eq (mpf_srcptr, mpf_srcptr, unsigned long int) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_fits_sint_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_fits_slong_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_fits_sshort_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_fits_uint_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_fits_ulong_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
int __gmpf_fits_ushort_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpf_floor (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
double __gmpf_get_d (mpf_srcptr) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
double __gmpf_get_d_2exp (signed long int *, mpf_srcptr);
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpf_get_default_prec (void) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpf_get_prec (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
long __gmpf_get_si (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
char *__gmpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr);
#pragma empty_line
#pragma empty_line
unsigned long __gmpf_get_ui (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpf_init (mpf_ptr);
#pragma empty_line
#pragma empty_line
void __gmpf_init2 (mpf_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmpf_inits (mpf_ptr, ...);
#pragma empty_line
#pragma empty_line
void __gmpf_init_set (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_init_set_d (mpf_ptr, double);
#pragma empty_line
#pragma empty_line
void __gmpf_init_set_si (mpf_ptr, signed long int);
#pragma empty_line
#pragma empty_line
int __gmpf_init_set_str (mpf_ptr, const char *, int);
#pragma empty_line
#pragma empty_line
void __gmpf_init_set_ui (mpf_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpf_inp_str (mpf_ptr, FILE *, int);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpf_integer_p (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpf_neg (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpf_out_str (FILE *, int, size_t, mpf_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpf_random2 (mpf_ptr, mp_size_t, mp_exp_t);
#pragma empty_line
#pragma empty_line
void __gmpf_rrandomb (mpf_ptr, gmp_randstate_t, mp_size_t, mp_exp_t);
#pragma empty_line
#pragma empty_line
void __gmpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_set (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_set_d (mpf_ptr, double);
#pragma empty_line
#pragma empty_line
void __gmpf_set_default_prec (mp_bitcnt_t) throw ();
#pragma empty_line
#pragma empty_line
void __gmpf_set_prec (mpf_ptr, mp_bitcnt_t);
#pragma empty_line
#pragma empty_line
void __gmpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) throw ();
#pragma empty_line
#pragma empty_line
void __gmpf_set_q (mpf_ptr, mpq_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_set_si (mpf_ptr, signed long int);
#pragma empty_line
#pragma empty_line
int __gmpf_set_str (mpf_ptr, const char *, int);
#pragma empty_line
#pragma empty_line
void __gmpf_set_ui (mpf_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpf_set_z (mpf_ptr, mpz_srcptr);
#pragma empty_line
#pragma empty_line
size_t __gmpf_size (mpf_srcptr) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpf_sqrt (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_sqrt_ui (mpf_ptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int);
#pragma empty_line
#pragma empty_line
void __gmpf_swap (mpf_ptr, mpf_ptr) throw ();
#pragma empty_line
#pragma empty_line
void __gmpf_trunc (mpf_ptr, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t);
#pragma line 1516 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
mp_limb_t __gmpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) throw ();
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_bdivmod (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, unsigned long int);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
int __gmpn_mulmod_2expp1 (mp_ptr, mp_srcptr, mp_srcptr,int,unsigned long, mp_ptr);
#pragma empty_line
#pragma empty_line
void __gmpn_mulmod_2expm1 (mp_ptr, mp_ptr, mp_ptr,unsigned long, mp_ptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
int __gmpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr);
#pragma empty_line
#pragma empty_line
void __gmpn_invert (mp_ptr xp, mp_srcptr ap, mp_size_t n);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sb_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dip)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dip, mp_ptr tp)
;
#pragma empty_line
#pragma empty_line
void __gmpn_dc_bdiv_q_n (mp_ptr qp, mp_ptr wp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr scratch)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_inv_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_srcptr dip)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t n, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_inv_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t n, mp_srcptr dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_inv_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_inv_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_inv_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr tp)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sb_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
void __gmpn_sb_bdiv_q (mp_ptr qp, mp_ptr wp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
void __gmpn_dc_bdiv_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_dc_bdiv_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr tp)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sb_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sb_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
;
#pragma empty_line
#pragma empty_line
void __gmpn_tdiv_q (mp_ptr qp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn)
;
#pragma empty_line
#pragma empty_line
void __gmpn_divexact (mp_ptr qp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn)
;
#pragma empty_line
#pragma empty_line
void __gmpn_redc_1 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
#pragma empty_line
#pragma empty_line
mp_size_t __gmpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_size_t __gmpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t);
#pragma empty_line
#pragma empty_line
size_t __gmpn_get_str (unsigned char *, int, mp_ptr, mp_size_t);
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
#pragma empty_line
#pragma empty_line
void __gmpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_sqr (mp_ptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_neg_n (mp_ptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void __gmpn_com_n (mp_ptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
int __gmpn_perfect_square_p (mp_srcptr, mp_size_t) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpn_popcount (mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_size_t __gmpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
void __gmpn_random (mp_ptr, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_random2 (mp_ptr, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_urandomb (mp_ptr, gmp_randstate_t, unsigned long);
#pragma empty_line
#pragma empty_line
void __gmpn_urandomm (mp_ptr, gmp_randstate_t, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_randomb (mp_ptr, gmp_randstate_t, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_rrandom (mp_ptr, gmp_randstate_t, mp_size_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpn_scan0 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_bitcnt_t __gmpn_scan1 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
mp_size_t __gmpn_set_str (mp_ptr, const unsigned char *, size_t, int);
#pragma empty_line
#pragma empty_line
mp_size_t __gmpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) throw ();
#pragma empty_line
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
mp_limb_t __gmpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
#pragma empty_line
#pragma empty_line
void __gmpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
#pragma empty_line
#pragma empty_line
void __gmpn_copyi (mp_ptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_copyd (mp_ptr, mp_srcptr, mp_size_t);
#pragma empty_line
void __gmpn_zero (mp_ptr, mp_size_t);
#pragma line 1799 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
extern __inline__ __attribute__((__gnu_inline__)) void
__gmpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u)
{
if (__gmp_w != __gmp_u)
__gmpz_set (__gmp_w, __gmp_u);
__gmp_w->_mp_size = ((__gmp_w->_mp_size) >= 0 ? (__gmp_w->_mp_size) : -(__gmp_w->_mp_size));
}
#pragma line 1823 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
int
__gmpz_fits_uint_p (mpz_srcptr __gmp_z) throw ()
{
mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned) 0)));;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
int
__gmpz_fits_ulong_p (mpz_srcptr __gmp_z) throw ()
{
mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned long) 0)));;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
int
__gmpz_fits_ushort_p (mpz_srcptr __gmp_z) throw ()
{
mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= ((unsigned short) ~0)));;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
unsigned long
__gmpz_get_ui (mpz_srcptr __gmp_z) throw ()
{
mp_ptr __gmp_p = __gmp_z->_mp_d;
mp_size_t __gmp_n = __gmp_z->_mp_size;
mp_limb_t __gmp_l = __gmp_p[0];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return (unsigned long)(__gmp_n != 0 ? __gmp_l : 0);
#pragma line 1879 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
mp_limb_t
__gmpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) throw ()
{
mp_limb_t __gmp_result = 0;
if (__builtin_expect ((__gmp_n >= 0 && __gmp_n < ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size))) != 0, 1))
__gmp_result = __gmp_z->_mp_d[__gmp_n];
return __gmp_result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__)) void
__gmpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u)
{
if (__gmp_w != __gmp_u)
__gmpz_set (__gmp_w, __gmp_u);
__gmp_w->_mp_size = - __gmp_w->_mp_size;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
int
__gmpz_perfect_square_p (mpz_srcptr __gmp_a)
{
mp_size_t __gmp_asize;
int __gmp_result;
#pragma empty_line
__gmp_asize = __gmp_a->_mp_size;
__gmp_result = (__gmp_asize >= 0);
if (__builtin_expect ((__gmp_asize > 0) != 0, 1))
__gmp_result = __gmpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize);
return __gmp_result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
mp_bitcnt_t
__gmpz_popcount (mpz_srcptr __gmp_u) throw ()
{
mp_size_t __gmp_usize;
mp_bitcnt_t __gmp_result;
#pragma empty_line
__gmp_usize = __gmp_u->_mp_size;
__gmp_result = (__gmp_usize < 0 ? (~ (unsigned long) 0) : 0);
if (__builtin_expect ((__gmp_usize > 0) != 0, 1))
__gmp_result = __gmpn_popcount (__gmp_u->_mp_d, __gmp_usize);
return __gmp_result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
void
__gmpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u)
{
__gmpz_tdiv_q (__gmp_w, (&((__gmp_u)->_mp_num)), (&((__gmp_u)->_mp_den)));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
size_t
__gmpz_size (mpz_srcptr __gmp_z) throw ()
{
return ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__)) void
__gmpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u)
{
if (__gmp_w != __gmp_u)
__gmpq_set (__gmp_w, __gmp_u);
__gmp_w->_mp_num._mp_size = ((__gmp_w->_mp_num._mp_size) >= 0 ? (__gmp_w->_mp_num._mp_size) : -(__gmp_w->_mp_num._mp_size));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__)) void
__gmpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u)
{
if (__gmp_w != __gmp_u)
__gmpq_set (__gmp_w, __gmp_u);
__gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size;
}
#pragma line 2220 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
mp_limb_t
__gmpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize)
{
mp_limb_t __gmp_c;
do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_add_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ (static_cast<mp_limb_t> (0))) >> 0)) == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0);
return __gmp_c;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
mp_limb_t
__gmpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) throw ()
{
mp_limb_t __gmp_c;
do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x + (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_r) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x + 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_r) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0);
return __gmp_c;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
int
__gmpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) throw ()
{
int __gmp_result;
do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_y; (__gmp_result) = 0; __gmp_i = (__gmp_size); while (--__gmp_i >= 0) { __gmp_x = (__gmp_xp)[__gmp_i]; __gmp_y = (__gmp_yp)[__gmp_i]; if (__gmp_x != __gmp_y) { (__gmp_result) = (__gmp_x > __gmp_y ? 1 : -1); break; } } } while (0);
return __gmp_result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
mp_limb_t
__gmpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize)
{
mp_limb_t __gmp_c;
do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_sub_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x - 1) & ((~ (static_cast<mp_limb_t> (0))) >> 0)), __gmp_x == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0);
return __gmp_c;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern __inline__ __attribute__((__gnu_inline__))
#pragma empty_line
mp_limb_t
__gmpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) throw ()
{
mp_limb_t __gmp_c;
do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x - (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_x) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x - 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_x) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0);
return __gmp_c;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 2328 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
std::ostream& operator<< (std::ostream &, mpz_srcptr);
std::ostream& operator<< (std::ostream &, mpq_srcptr);
std::ostream& operator<< (std::ostream &, mpf_srcptr);
std::istream& operator>> (std::istream &, mpz_ptr);
std::istream& operator>> (std::istream &, mpq_ptr);
std::istream& operator>> (std::istream &, mpf_ptr);
#pragma line 2348 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
typedef __mpz_struct MP_INT;
typedef __mpq_struct MP_RAT;
#pragma line 2358 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h"
enum
{
GMP_ERROR_NONE = 0,
GMP_ERROR_UNSUPPORTED_ARGUMENT = 1,
GMP_ERROR_DIVISION_BY_ZERO = 2,
GMP_ERROR_SQRT_OF_NEGATIVE = 4,
GMP_ERROR_INVALID_ARGUMENT = 8
};
#pragma line 144 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h" 1
#pragma line 73 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
typedef void mpfr_void;
typedef int mpfr_int;
typedef unsigned int mpfr_uint;
typedef long mpfr_long;
typedef unsigned long mpfr_ulong;
typedef size_t mpfr_size_t;
#pragma line 95 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
typedef enum {
MPFR_RNDN=0,
MPFR_RNDZ,
MPFR_RNDU,
MPFR_RNDD,
MPFR_RNDA,
MPFR_RNDF,
MPFR_RNDNA=-1
} mpfr_rnd_t;
#pragma line 130 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
typedef long mpfr_prec_t;
typedef unsigned long mpfr_uprec_t;
#pragma line 143 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
typedef int mpfr_sign_t;
#pragma empty_line
#pragma empty_line
typedef mp_exp_t mpfr_exp_t;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef struct {
mpfr_prec_t _mpfr_prec;
mpfr_sign_t _mpfr_sign;
mpfr_exp_t _mpfr_exp;
mp_limb_t *_mpfr_d;
} __mpfr_struct;
#pragma line 179 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
typedef __mpfr_struct mpfr_t[1];
typedef __mpfr_struct *mpfr_ptr;
typedef const __mpfr_struct *mpfr_srcptr;
#pragma line 192 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
typedef enum {
MPFR_NAN_KIND = 0,
MPFR_INF_KIND = 1, MPFR_ZERO_KIND = 2, MPFR_REGULAR_KIND = 3
} mpfr_kind_t;
#pragma line 241 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
extern "C" {
#pragma empty_line
#pragma empty_line
const char * mpfr_get_version (void);
const char * mpfr_get_patches (void);
int mpfr_buildopt_tls_p (void);
int mpfr_buildopt_decimal_p (void);
#pragma empty_line
mpfr_exp_t mpfr_get_emin (void);
int mpfr_set_emin (mpfr_exp_t);
mpfr_exp_t mpfr_get_emin_min (void);
mpfr_exp_t mpfr_get_emin_max (void);
mpfr_exp_t mpfr_get_emax (void);
int mpfr_set_emax (mpfr_exp_t);
mpfr_exp_t mpfr_get_emax_min (void);
mpfr_exp_t mpfr_get_emax_max (void);
#pragma empty_line
void mpfr_set_default_rounding_mode (mpfr_rnd_t);
mpfr_rnd_t mpfr_get_default_rounding_mode (void);
const char *
mpfr_print_rnd_mode (mpfr_rnd_t);
#pragma empty_line
void mpfr_clear_flags (void);
void mpfr_clear_underflow (void);
void mpfr_clear_overflow (void);
void mpfr_clear_nanflag (void);
void mpfr_clear_inexflag (void);
void mpfr_clear_erangeflag (void);
#pragma empty_line
void mpfr_set_underflow (void);
void mpfr_set_overflow (void);
void mpfr_set_nanflag (void);
void mpfr_set_inexflag (void);
void mpfr_set_erangeflag (void);
#pragma empty_line
int mpfr_underflow_p (void);
int mpfr_overflow_p (void);
int mpfr_nanflag_p (void);
int mpfr_inexflag_p (void);
int mpfr_erangeflag_p (void);
#pragma empty_line
int
mpfr_check_range (mpfr_ptr, int, mpfr_rnd_t);
#pragma empty_line
void mpfr_init2 (mpfr_ptr, mpfr_prec_t);
void mpfr_init (mpfr_ptr);
void mpfr_clear (mpfr_ptr);
#pragma empty_line
void
mpfr_inits2 (mpfr_prec_t, mpfr_ptr, ...) __attribute__ ((sentinel));
void
mpfr_inits (mpfr_ptr, ...) __attribute__ ((sentinel));
void
mpfr_clears (mpfr_ptr, ...) __attribute__ ((sentinel));
#pragma empty_line
int
mpfr_prec_round (mpfr_ptr, mpfr_prec_t, mpfr_rnd_t);
int
mpfr_can_round (mpfr_srcptr, mpfr_exp_t, mpfr_rnd_t, mpfr_rnd_t, mpfr_prec_t)
;
mpfr_prec_t mpfr_min_prec (mpfr_srcptr);
#pragma empty_line
mpfr_exp_t mpfr_get_exp (mpfr_srcptr);
int mpfr_set_exp (mpfr_ptr, mpfr_exp_t);
mpfr_prec_t mpfr_get_prec (mpfr_srcptr);
void mpfr_set_prec (mpfr_ptr, mpfr_prec_t);
void mpfr_set_prec_raw (mpfr_ptr, mpfr_prec_t);
void mpfr_set_default_prec (mpfr_prec_t);
mpfr_prec_t mpfr_get_default_prec (void);
#pragma empty_line
int mpfr_set_d (mpfr_ptr, double, mpfr_rnd_t);
int mpfr_set_flt (mpfr_ptr, float, mpfr_rnd_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int
mpfr_set_ld (mpfr_ptr, long double, mpfr_rnd_t);
int
mpfr_set_z (mpfr_ptr, mpz_srcptr, mpfr_rnd_t);
int
mpfr_set_z_2exp (mpfr_ptr, mpz_srcptr, mpfr_exp_t, mpfr_rnd_t);
void mpfr_set_nan (mpfr_ptr);
void mpfr_set_inf (mpfr_ptr, int);
void mpfr_set_zero (mpfr_ptr, int);
int
mpfr_set_f (mpfr_ptr, mpf_srcptr, mpfr_rnd_t);
int
mpfr_get_f (mpf_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_set_si (mpfr_ptr, long, mpfr_rnd_t);
int
mpfr_set_ui (mpfr_ptr, unsigned long, mpfr_rnd_t);
int
mpfr_set_si_2exp (mpfr_ptr, long, mpfr_exp_t, mpfr_rnd_t);
int
mpfr_set_ui_2exp (mpfr_ptr,unsigned long,mpfr_exp_t,mpfr_rnd_t);
int
mpfr_set_q (mpfr_ptr, mpq_srcptr, mpfr_rnd_t);
int
mpfr_set_str (mpfr_ptr, const char *, int, mpfr_rnd_t);
int
mpfr_init_set_str (mpfr_ptr, const char *, int, mpfr_rnd_t)
;
int
mpfr_set4 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t, int);
int
mpfr_abs (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int
mpfr_set (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_neg (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_signbit (mpfr_srcptr);
int
mpfr_setsign (mpfr_ptr, mpfr_srcptr, int, mpfr_rnd_t);
int
mpfr_copysign (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t);
#pragma line 364 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
int __gmpfr_set_sj (mpfr_t, intmax_t, mpfr_rnd_t);
int
__gmpfr_set_sj_2exp (mpfr_t, intmax_t, intmax_t, mpfr_rnd_t);
int __gmpfr_set_uj (mpfr_t, uintmax_t, mpfr_rnd_t);
int
__gmpfr_set_uj_2exp (mpfr_t, uintmax_t, intmax_t, mpfr_rnd_t);
intmax_t __gmpfr_mpfr_get_sj (mpfr_srcptr, mpfr_rnd_t);
uintmax_t __gmpfr_mpfr_get_uj (mpfr_srcptr, mpfr_rnd_t);
#pragma empty_line
#pragma empty_line
mpfr_exp_t mpfr_get_z_2exp (mpz_ptr, mpfr_srcptr);
float mpfr_get_flt (mpfr_srcptr, mpfr_rnd_t);
double mpfr_get_d (mpfr_srcptr, mpfr_rnd_t);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
long double mpfr_get_ld (mpfr_srcptr, mpfr_rnd_t)
;
double mpfr_get_d1 (mpfr_srcptr);
double mpfr_get_d_2exp (long*, mpfr_srcptr, mpfr_rnd_t)
;
long double mpfr_get_ld_2exp (long*, mpfr_srcptr, mpfr_rnd_t)
;
long mpfr_get_si (mpfr_srcptr, mpfr_rnd_t);
unsigned long mpfr_get_ui (mpfr_srcptr, mpfr_rnd_t)
;
char*mpfr_get_str (char*, mpfr_exp_t*, int, size_t, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_get_z (mpz_ptr z, mpfr_srcptr f, mpfr_rnd_t)
;
#pragma empty_line
void mpfr_free_str (char *);
#pragma empty_line
int mpfr_urandom (mpfr_ptr, gmp_randstate_t, mpfr_rnd_t)
;
int mpfr_urandomb (mpfr_ptr, gmp_randstate_t);
#pragma empty_line
void mpfr_nextabove (mpfr_ptr);
void mpfr_nextbelow (mpfr_ptr);
void mpfr_nexttoward (mpfr_ptr, mpfr_srcptr);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_t __gmpfr_inp_str (mpfr_ptr, FILE*, int, mpfr_rnd_t)
;
size_t __gmpfr_out_str (FILE*, int, size_t, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int __gmpfr_fprintf (FILE*, const char*, ...)
;
#pragma empty_line
int mpfr_printf (const char*, ...);
int mpfr_asprintf (char**, const char*, ...)
;
int mpfr_sprintf (char*, const char*, ...)
;
int mpfr_snprintf (char*, size_t, const char*, ...)
;
#pragma line 444 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h"
int mpfr_pow (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_pow_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t)
;
int mpfr_pow_ui (mpfr_ptr, mpfr_srcptr, unsigned long int, mpfr_rnd_t)
;
int mpfr_ui_pow_ui (mpfr_ptr, unsigned long int, unsigned long int, mpfr_rnd_t)
;
int mpfr_ui_pow (mpfr_ptr, unsigned long int, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_pow_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_sqrt (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_sqrt_ui (mpfr_ptr, unsigned long, mpfr_rnd_t)
;
int mpfr_rec_sqrt (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_add (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_sub (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_mul (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_div (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_add_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_sub_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_ui_sub (mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_mul_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_div_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_ui_div (mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_add_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t)
;
int mpfr_sub_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t)
;
int mpfr_si_sub (mpfr_ptr, long int, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_mul_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t)
;
int mpfr_div_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t)
;
int mpfr_si_div (mpfr_ptr, long int, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_add_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
;
int mpfr_sub_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
;
int mpfr_d_sub (mpfr_ptr, double, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_mul_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
;
int mpfr_div_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
;
int mpfr_d_div (mpfr_ptr, double, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_sqr (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
#pragma empty_line
int mpfr_const_pi (mpfr_ptr, mpfr_rnd_t);
int mpfr_const_log2 (mpfr_ptr, mpfr_rnd_t);
int mpfr_const_euler (mpfr_ptr, mpfr_rnd_t);
int mpfr_const_catalan (mpfr_ptr, mpfr_rnd_t);
#pragma empty_line
int mpfr_agm (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_log (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_log2 (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_log10 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_log1p (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_exp (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_exp2 (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_exp10 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_expm1 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_eint (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_li2 (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
#pragma empty_line
int mpfr_cmp (mpfr_srcptr, mpfr_srcptr);
int mpfr_cmp3 (mpfr_srcptr, mpfr_srcptr, int);
int mpfr_cmp_d (mpfr_srcptr, double);
int mpfr_cmp_ld (mpfr_srcptr, long double);
int mpfr_cmpabs (mpfr_srcptr, mpfr_srcptr);
int mpfr_cmp_ui (mpfr_srcptr, unsigned long);
int mpfr_cmp_si (mpfr_srcptr, long);
int mpfr_cmp_ui_2exp (mpfr_srcptr, unsigned long, mpfr_exp_t)
;
int mpfr_cmp_si_2exp (mpfr_srcptr, long, mpfr_exp_t)
;
void mpfr_reldiff (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_eq (mpfr_srcptr, mpfr_srcptr, unsigned long)
;
int mpfr_sgn (mpfr_srcptr);
#pragma empty_line
int mpfr_mul_2exp (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_div_2exp (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_mul_2ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_div_2ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
;
int mpfr_mul_2si (mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
;
int mpfr_div_2si (mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_rint (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t);
int mpfr_round (mpfr_ptr, mpfr_srcptr);
int mpfr_trunc (mpfr_ptr, mpfr_srcptr);
int mpfr_ceil (mpfr_ptr, mpfr_srcptr);
int mpfr_floor (mpfr_ptr, mpfr_srcptr);
int mpfr_rint_round (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_rint_trunc (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_rint_ceil (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_rint_floor (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_frac (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_modf (mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_remquo (mpfr_ptr, long*, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_remainder (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_fmod (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_fits_ulong_p (mpfr_srcptr, mpfr_rnd_t);
int mpfr_fits_slong_p (mpfr_srcptr, mpfr_rnd_t);
int mpfr_fits_uint_p (mpfr_srcptr, mpfr_rnd_t);
int mpfr_fits_sint_p (mpfr_srcptr, mpfr_rnd_t);
int mpfr_fits_ushort_p (mpfr_srcptr, mpfr_rnd_t);
int mpfr_fits_sshort_p (mpfr_srcptr, mpfr_rnd_t);
int mpfr_fits_uintmax_p (mpfr_srcptr,mpfr_rnd_t);
int mpfr_fits_intmax_p (mpfr_srcptr, mpfr_rnd_t);
#pragma empty_line
void mpfr_extract (mpz_ptr, mpfr_srcptr, unsigned int)
;
void mpfr_swap (mpfr_ptr, mpfr_ptr);
void mpfr_dump (mpfr_srcptr);
#pragma empty_line
int mpfr_nan_p (mpfr_srcptr);
int mpfr_inf_p (mpfr_srcptr);
int mpfr_number_p (mpfr_srcptr);
int mpfr_integer_p (mpfr_srcptr);
int mpfr_zero_p (mpfr_srcptr);
int mpfr_regular_p (mpfr_srcptr);
#pragma empty_line
int mpfr_greater_p (mpfr_srcptr, mpfr_srcptr);
int mpfr_greaterequal_p (mpfr_srcptr, mpfr_srcptr)
;
int mpfr_less_p (mpfr_srcptr, mpfr_srcptr);
int mpfr_lessequal_p (mpfr_srcptr, mpfr_srcptr);
int mpfr_lessgreater_p (mpfr_srcptr,mpfr_srcptr);
int mpfr_equal_p (mpfr_srcptr, mpfr_srcptr);
int mpfr_unordered_p (mpfr_srcptr, mpfr_srcptr);
#pragma empty_line
int mpfr_atanh (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_acosh (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_asinh (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_cosh (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t);
int mpfr_sinh (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t);
int mpfr_tanh (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t);
int mpfr_sinh_cosh (mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_sech (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_csch (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_coth (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
#pragma empty_line
int mpfr_acos (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_asin (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_atan (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_sin (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_sin_cos (mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_cos (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_tan (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_atan2 (mpfr_ptr,mpfr_srcptr,mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_sec (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_csc (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_cot (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
#pragma empty_line
int mpfr_hypot (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_erf (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_erfc (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t);
int mpfr_cbrt (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_root (mpfr_ptr,mpfr_srcptr,unsigned long,mpfr_rnd_t);
int mpfr_gamma (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_lngamma (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_lgamma (mpfr_ptr,int*,mpfr_srcptr,mpfr_rnd_t);
int mpfr_digamma (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_zeta (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t);
int mpfr_zeta_ui (mpfr_ptr,unsigned long,mpfr_rnd_t);
int mpfr_fac_ui (mpfr_ptr, unsigned long int, mpfr_rnd_t)
;
int mpfr_j0 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_j1 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_jn (mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_y0 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_y1 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
int mpfr_yn (mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_ai (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t);
#pragma empty_line
int mpfr_min (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_max (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_dim (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_mul_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
;
int mpfr_div_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
;
int mpfr_add_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
;
int mpfr_sub_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
;
int mpfr_cmp_z (mpfr_srcptr, mpz_srcptr);
#pragma empty_line
int mpfr_mul_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
;
int mpfr_div_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
;
int mpfr_add_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
;
int mpfr_sub_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
;
int mpfr_cmp_q (mpfr_srcptr, mpq_srcptr);
#pragma empty_line
int mpfr_cmp_f (mpfr_srcptr, mpf_srcptr);
#pragma empty_line
int mpfr_fma (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_fms (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
;
int mpfr_sum (mpfr_ptr, mpfr_ptr *const, unsigned long, mpfr_rnd_t)
;
#pragma empty_line
void mpfr_free_cache (void);
#pragma empty_line
int mpfr_subnormalize (mpfr_ptr, int, mpfr_rnd_t)
;
#pragma empty_line
int mpfr_strtofr (mpfr_ptr, const char *, char **, int, mpfr_rnd_t)
;
#pragma empty_line
size_t mpfr_custom_get_size (mpfr_prec_t);
void mpfr_custom_init (void *, mpfr_prec_t);
void * mpfr_custom_get_significand (mpfr_srcptr);
mpfr_exp_t mpfr_custom_get_exp (mpfr_srcptr);
void mpfr_custom_move (mpfr_ptr, void *);
void mpfr_custom_init_set (mpfr_ptr, int, mpfr_exp_t, mpfr_prec_t, void *)
;
int mpfr_custom_get_kind (mpfr_srcptr);
#pragma empty_line
#pragma empty_line
}
#pragma line 149 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef long xip_fpo_prec_t;
#pragma empty_line
#pragma empty_line
typedef int xip_fpo_sign_t;
#pragma empty_line
#pragma empty_line
typedef long xip_fpo_exp_t;
#pragma empty_line
#pragma empty_line
typedef struct {
xip_fpo_prec_t _xip_fpo_exp_prec;
xip_fpo_prec_t _xip_fpo_mant_prec;
xip_fpo_sign_t _xip_fpo_sign;
xip_fpo_exp_t _xip_fpo_exp;
mp_limb_t *_xip_fpo_d;
} __xip_fpo_struct;
#pragma empty_line
#pragma empty_line
typedef struct {
xip_fpo_prec_t _xip_fpo_i_prec;
xip_fpo_prec_t _xip_fpo_frac_prec;
xint64 _xip_fpo_i;
xint64 _xip_fpo_frac;
} __xip_fpo_fix_struct;
#pragma empty_line
#pragma empty_line
typedef __xip_fpo_struct xip_fpo_t[1];
typedef __xip_fpo_fix_struct xip_fpo_fix_t[1];
#pragma empty_line
#pragma empty_line
typedef __xip_fpo_struct *xip_fpo_ptr;
typedef const __xip_fpo_struct *xip_fpo_srcptr;
typedef __xip_fpo_fix_struct *xip_fpo_fix_ptr;
typedef const __xip_fpo_fix_struct *xip_fpo_fix_srcptr;
#pragma line 197 "F:/Xilinx/Vivado_HLS/2015.4/include/floating_point_v7_0_bitacc_cmodel.h"
typedef int xip_fpo_exc_t;
#pragma empty_line
#pragma empty_line
extern "C" {
#pragma empty_line
#pragma empty_line
typedef struct xil_fpo_accum_state xil_fpo_accum_state;
#pragma empty_line
#pragma empty_line
const char * xip_fpo_get_version (void);
#pragma empty_line
#pragma empty_line
void xip_fpo_init2 (xip_fpo_ptr, xip_fpo_prec_t, xip_fpo_prec_t);
void xip_fpo_fix_init2 (xip_fpo_fix_ptr, xip_fpo_prec_t, xip_fpo_prec_t);
void xip_fpo_inits2 (xip_fpo_prec_t, xip_fpo_prec_t, xip_fpo_ptr, ...) __attribute__ ((sentinel));
void xip_fpo_fix_inits2 (xip_fpo_prec_t, xip_fpo_prec_t, xip_fpo_fix_ptr, ...) __attribute__ ((sentinel));
void xip_fpo_clear (xip_fpo_ptr);
void xip_fpo_fix_clear (xip_fpo_fix_ptr);
void xip_fpo_clears (xip_fpo_ptr, ...) __attribute__ ((sentinel));
void xip_fpo_fix_clears (xip_fpo_fix_ptr, ...) __attribute__ ((sentinel));
void xip_fpo_set_prec (xip_fpo_ptr, xip_fpo_prec_t, xip_fpo_prec_t);
void xip_fpo_fix_set_prec (xip_fpo_fix_ptr, xip_fpo_prec_t, xip_fpo_prec_t);
xip_fpo_prec_t xip_fpo_get_prec_mant (xip_fpo_ptr);
xip_fpo_prec_t xip_fpo_get_prec_exp (xip_fpo_ptr);
xip_fpo_prec_t xip_fpo_fix_get_prec_frac (xip_fpo_fix_ptr);
xip_fpo_prec_t xip_fpo_fix_get_prec_int (xip_fpo_fix_ptr);
#pragma empty_line
#pragma empty_line
xip_fpo_exc_t xip_fpo_set (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_fix_set (xip_fpo_fix_ptr, xip_fpo_fix_srcptr);
xip_fpo_exc_t xip_fpo_set_ui (xip_fpo_ptr, unsigned long);
xip_fpo_exc_t xip_fpo_fix_set_ui (xip_fpo_fix_ptr, unsigned long);
xip_fpo_exc_t xip_fpo_set_si (xip_fpo_ptr, long);
xip_fpo_exc_t xip_fpo_fix_set_si (xip_fpo_fix_ptr, long);
xip_fpo_exc_t xip_fpo_set_uj (xip_fpo_ptr, uintmax_t);
xip_fpo_exc_t xip_fpo_fix_set_uj (xip_fpo_fix_ptr, uintmax_t);
xip_fpo_exc_t xip_fpo_set_sj (xip_fpo_ptr, intmax_t);
xip_fpo_exc_t xip_fpo_fix_set_sj (xip_fpo_fix_ptr, intmax_t);
xip_fpo_exc_t xip_fpo_set_flt (xip_fpo_ptr, float);
xip_fpo_exc_t xip_fpo_fix_set_flt (xip_fpo_fix_ptr, float);
xip_fpo_exc_t xip_fpo_set_d (xip_fpo_ptr, double);
xip_fpo_exc_t xip_fpo_fix_set_d (xip_fpo_fix_ptr, double);
xip_fpo_exc_t xip_fpo_set_z (xip_fpo_ptr, mpz_srcptr);
xip_fpo_exc_t xip_fpo_fix_set_z (xip_fpo_fix_ptr, mpz_srcptr);
xip_fpo_exc_t xip_fpo_set_q (xip_fpo_ptr, mpq_srcptr);
xip_fpo_exc_t xip_fpo_fix_set_q (xip_fpo_fix_ptr, mpq_srcptr);
xip_fpo_exc_t xip_fpo_set_f (xip_fpo_ptr, mpf_srcptr);
xip_fpo_exc_t xip_fpo_fix_set_f (xip_fpo_fix_ptr, mpf_srcptr);
xip_fpo_exc_t xip_fpo_set_fr (xip_fpo_ptr, mpfr_srcptr);
xip_fpo_exc_t xip_fpo_fix_set_fr (xip_fpo_fix_ptr, mpfr_srcptr);
xip_fpo_exc_t xip_fpo_set_ui_2exp (xip_fpo_ptr, unsigned long, xip_fpo_exp_t);
xip_fpo_exc_t xip_fpo_set_si_2exp (xip_fpo_ptr, long, xip_fpo_exp_t);
xip_fpo_exc_t xip_fpo_set_uj_2exp (xip_fpo_ptr, uintmax_t, intmax_t);
xip_fpo_exc_t xip_fpo_set_sj_2exp (xip_fpo_ptr, intmax_t, intmax_t);
xip_fpo_exc_t xip_fpo_set_str (xip_fpo_ptr, const char *, int);
xip_fpo_exc_t xip_fpo_fix_set_str (xip_fpo_fix_ptr, const char *, int);
void xip_fpo_set_nan (xip_fpo_ptr);
void xip_fpo_set_inf (xip_fpo_ptr, int);
void xip_fpo_set_zero (xip_fpo_ptr, int);
#pragma empty_line
#pragma empty_line
unsigned long xip_fpo_get_ui (xip_fpo_srcptr);
unsigned long xip_fpo_fix_get_ui (xip_fpo_fix_srcptr);
long xip_fpo_get_si (xip_fpo_srcptr);
long xip_fpo_fix_get_si (xip_fpo_fix_srcptr);
uintmax_t xip_fpo_get_uj (xip_fpo_srcptr);
uintmax_t xip_fpo_fix_get_uj (xip_fpo_fix_srcptr);
intmax_t xip_fpo_get_sj (xip_fpo_srcptr);
intmax_t xip_fpo_fix_get_sj (xip_fpo_fix_srcptr);
float xip_fpo_get_flt (xip_fpo_srcptr);
float xip_fpo_fix_get_flt (xip_fpo_fix_srcptr);
double xip_fpo_get_d (xip_fpo_srcptr);
double xip_fpo_fix_get_d (xip_fpo_fix_srcptr);
double xip_fpo_get_d_2exp (long *, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_get_z (mpz_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_fix_get_z (mpz_ptr, xip_fpo_fix_srcptr);
xip_fpo_exc_t xip_fpo_get_f (mpf_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_fix_get_f (mpf_ptr, xip_fpo_fix_srcptr);
xip_fpo_exc_t xip_fpo_get_fr (mpfr_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_fix_get_fr (mpfr_ptr, xip_fpo_fix_srcptr);
char * xip_fpo_get_str (char *, xip_fpo_exp_t *, int, int, xip_fpo_srcptr);
char * xip_fpo_fix_get_str (char *, int, xip_fpo_fix_srcptr);
void xip_fpo_free_str (char *);
void xip_fpo_fix_free_str (char *);
int xip_fpo_sizeinbase (xip_fpo_srcptr, int);
int xip_fpo_fix_sizeinbase (xip_fpo_fix_srcptr, int);
#pragma empty_line
#pragma empty_line
xip_fpo_exc_t xip_fpo_add (xip_fpo_ptr, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_add_flt (float *, float, float);
xip_fpo_exc_t xip_fpo_add_d (double *, double, double);
xip_fpo_exc_t xip_fpo_sub (xip_fpo_ptr, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_sub_flt (float *, float, float);
xip_fpo_exc_t xip_fpo_sub_d (double *, double, double);
xip_fpo_exc_t xip_fpo_mul (xip_fpo_ptr, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_mul_flt (float *, float, float);
xip_fpo_exc_t xip_fpo_mul_d (double *, double, double);
xip_fpo_exc_t xip_fpo_fma (xip_fpo_ptr, xip_fpo_srcptr, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_fma_flt (float *, float, float, float);
xip_fpo_exc_t xip_fpo_fma_d (double *, double, double, double);
xip_fpo_exc_t xip_fpo_fms (xip_fpo_ptr, xip_fpo_srcptr, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_fms_flt (float *, float, float, float);
xip_fpo_exc_t xip_fpo_fms_d (double *, double, double, double);
xip_fpo_exc_t xip_fpo_div (xip_fpo_ptr, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_div_flt (float *, float, float);
xip_fpo_exc_t xip_fpo_div_d (double *, double, double);
xip_fpo_exc_t xip_fpo_rec (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_rec_flt (float *, float);
xip_fpo_exc_t xip_fpo_rec_d (double *, double);
xip_fpo_exc_t xip_fpo_abs (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_abs_flt (float *, float);
xip_fpo_exc_t xip_fpo_abs_d (double *, double);
xip_fpo_exc_t xip_fpo_log (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_log_flt (float *, float);
xip_fpo_exc_t xip_fpo_log_d (double *, double);
int xip_fpo_exp_array (xip_fpo_t * , xip_fpo_t * , xip_fpo_exc_t *, unsigned long long);
void xip_fpo_exp_flt_array (float * , float * , xip_fpo_exc_t *, unsigned long long);
void xip_fpo_exp_d_array (double * , double * , xip_fpo_exc_t *, unsigned long long);
xip_fpo_exc_t xip_fpo_exp (xip_fpo_ptr , xip_fpo_srcptr );
xip_fpo_exc_t xip_fpo_exp_flt (float * , float );
xip_fpo_exc_t xip_fpo_exp_d (double * , double );
struct xil_fpo_accum_state * xip_fpo_accum_create_state (int , int , int , int , int);
void xip_fpo_accum_reset_state (struct xil_fpo_accum_state *);
void xip_fpo_accum_destroy_state (struct xil_fpo_accum_state *);
xip_fpo_exc_t xip_fpo_accum_sample (xip_fpo_t, xip_fpo_t, bool, struct xil_fpo_accum_state *);
xip_fpo_exc_t xip_fpo_accum_sample_flt (float *, float , bool, struct xil_fpo_accum_state *);
xip_fpo_exc_t xip_fpo_accum_sample_d (double *, double , bool, struct xil_fpo_accum_state *);
xip_fpo_exc_t xip_fpo_sqrt (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_sqrt_flt (float *, float);
xip_fpo_exc_t xip_fpo_sqrt_d (double *, double);
xip_fpo_exc_t xip_fpo_recsqrt (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_recsqrt_flt (float *, float);
xip_fpo_exc_t xip_fpo_recsqrt_d (double *, double);
xip_fpo_exc_t xip_fpo_unordered (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_unordered_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_unordered_d (int *, double, double);
xip_fpo_exc_t xip_fpo_equal (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_equal_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_equal_d (int *, double, double);
xip_fpo_exc_t xip_fpo_less (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_less_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_less_d (int *, double, double);
xip_fpo_exc_t xip_fpo_lessequal (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_lessequal_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_lessequal_d (int *, double, double);
xip_fpo_exc_t xip_fpo_greater (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_greater_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_greater_d (int *, double, double);
xip_fpo_exc_t xip_fpo_greaterequal (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_greaterequal_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_greaterequal_d (int *, double, double);
xip_fpo_exc_t xip_fpo_notequal (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_notequal_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_notequal_d (int *, double, double);
xip_fpo_exc_t xip_fpo_condcode (int *, xip_fpo_srcptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_condcode_flt (int *, float, float);
xip_fpo_exc_t xip_fpo_condcode_d (int *, double, double);
xip_fpo_exc_t xip_fpo_flttofix (xip_fpo_fix_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_flttofix_int_flt (int *, float);
xip_fpo_exc_t xip_fpo_flttofix_int_d (int *, double);
xip_fpo_exc_t xip_fpo_fixtoflt (xip_fpo_ptr, xip_fpo_fix_srcptr);
xip_fpo_exc_t xip_fpo_fixtoflt_flt_int (float *, int);
xip_fpo_exc_t xip_fpo_fixtoflt_d_int (double *, int);
xip_fpo_exc_t xip_fpo_flttoflt (xip_fpo_ptr, xip_fpo_srcptr);
xip_fpo_exc_t xip_fpo_flttoflt_flt_flt (float *, float);
xip_fpo_exc_t xip_fpo_flttoflt_flt_d (float *, double);
xip_fpo_exc_t xip_fpo_flttoflt_d_flt (double *, float);
xip_fpo_exc_t xip_fpo_flttoflt_d_d (double *, double);
#pragma empty_line
#pragma empty_line
}
#pragma line 41 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 2
#pragma line 117 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/utility" 1 3
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/utility" 3
#pragma empty_line
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/utility" 3
#pragma line 70 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/utility" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_relops.h" 1 3
#pragma line 68 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_relops.h" 3
namespace std
{
namespace rel_ops
{
#pragma empty_line
#pragma line 86 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator!=(const _Tp& __x, const _Tp& __y)
{ return !(__x == __y); }
#pragma line 99 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator>(const _Tp& __x, const _Tp& __y)
{ return __y < __x; }
#pragma line 112 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator<=(const _Tp& __x, const _Tp& __y)
{ return !(__y < __x); }
#pragma line 125 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_relops.h" 3
template <class _Tp>
inline bool
operator>=(const _Tp& __x, const _Tp& __y)
{ return !(__x < __y); }
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
}
#pragma line 71 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/utility" 2 3
#pragma line 118 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 2
#pragma line 198 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/algorithm" 1 3
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/algorithm" 3
#pragma empty_line
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/algorithm" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 1 3
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstdlib" 3
#pragma line 62 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 1 3
#pragma line 33 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
#pragma empty_line
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 201 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _FIter, typename _Tp>
bool
binary_search(_FIter, _FIter, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Tp, typename _Compare>
bool
binary_search(_FIter, _FIter, const _Tp&, _Compare);
#pragma empty_line
template<typename _IIter, typename _OIter>
_OIter
copy(_IIter, _IIter, _OIter);
#pragma empty_line
template<typename _BIter1, typename _BIter2>
_BIter2
copy_backward(_BIter1, _BIter1, _BIter2);
#pragma line 230 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _FIter, typename _Tp>
pair<_FIter, _FIter>
equal_range(_FIter, _FIter, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Tp, typename _Compare>
pair<_FIter, _FIter>
equal_range(_FIter, _FIter, const _Tp&, _Compare);
#pragma empty_line
template<typename _FIter, typename _Tp>
void
fill(_FIter, _FIter, const _Tp&);
#pragma empty_line
template<typename _OIter, typename _Size, typename _Tp>
_OIter
fill_n(_OIter, _Size, const _Tp&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _FIter1, typename _FIter2>
_FIter1
find_end(_FIter1, _FIter1, _FIter2, _FIter2);
#pragma empty_line
template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
_FIter1
find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
#pragma line 269 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _IIter1, typename _IIter2>
bool
includes(_IIter1, _IIter1, _IIter2, _IIter2);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _Compare>
bool
includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
#pragma empty_line
template<typename _BIter>
void
inplace_merge(_BIter, _BIter, _BIter);
#pragma empty_line
template<typename _BIter, typename _Compare>
void
inplace_merge(_BIter, _BIter, _BIter, _Compare);
#pragma line 332 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _FIter1, typename _FIter2>
void
iter_swap(_FIter1, _FIter2);
#pragma empty_line
template<typename _FIter, typename _Tp>
_FIter
lower_bound(_FIter, _FIter, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Tp, typename _Compare>
_FIter
lower_bound(_FIter, _FIter, const _Tp&, _Compare);
#pragma empty_line
template<typename _RAIter>
void
make_heap(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
make_heap(_RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _Tp>
const _Tp&
max(const _Tp&, const _Tp&);
#pragma empty_line
template<typename _Tp, typename _Compare>
const _Tp&
max(const _Tp&, const _Tp&, _Compare);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
const _Tp&
min(const _Tp&, const _Tp&);
#pragma empty_line
template<typename _Tp, typename _Compare>
const _Tp&
min(const _Tp&, const _Tp&, _Compare);
#pragma line 417 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _BIter>
bool
next_permutation(_BIter, _BIter);
#pragma empty_line
template<typename _BIter, typename _Compare>
bool
next_permutation(_BIter, _BIter, _Compare);
#pragma line 434 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _IIter, typename _RAIter>
_RAIter
partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
#pragma empty_line
template<typename _IIter, typename _RAIter, typename _Compare>
_RAIter
partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
#pragma line 455 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _RAIter>
void
pop_heap(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
pop_heap(_RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _BIter>
bool
prev_permutation(_BIter, _BIter);
#pragma empty_line
template<typename _BIter, typename _Compare>
bool
prev_permutation(_BIter, _BIter, _Compare);
#pragma empty_line
template<typename _RAIter>
void
push_heap(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
push_heap(_RAIter, _RAIter, _Compare);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _FIter, typename _Tp>
_FIter
remove(_FIter, _FIter, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Predicate>
_FIter
remove_if(_FIter, _FIter, _Predicate);
#pragma empty_line
template<typename _IIter, typename _OIter, typename _Tp>
_OIter
remove_copy(_IIter, _IIter, _OIter, const _Tp&);
#pragma empty_line
template<typename _IIter, typename _OIter, typename _Predicate>
_OIter
remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _IIter, typename _OIter, typename _Tp>
_OIter
replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
#pragma empty_line
template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
_OIter
replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _BIter>
void
reverse(_BIter, _BIter);
#pragma empty_line
template<typename _BIter, typename _OIter>
_OIter
reverse_copy(_BIter, _BIter, _OIter);
#pragma empty_line
template<typename _FIter>
void
rotate(_FIter, _FIter, _FIter);
#pragma empty_line
template<typename _FIter, typename _OIter>
_OIter
rotate_copy(_FIter, _FIter, _FIter, _OIter);
#pragma line 538 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/algorithmfwd.h" 3
template<typename _RAIter>
void
sort_heap(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
sort_heap(_RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _BIter, typename _Predicate>
_BIter
stable_partition(_BIter, _BIter, _Predicate);
#pragma empty_line
template<typename _Tp>
void
swap(_Tp&, _Tp&);
#pragma empty_line
template<typename _Tp, size_t _Nm>
void
swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
#pragma empty_line
template<typename _FIter1, typename _FIter2>
_FIter2
swap_ranges(_FIter1, _FIter1, _FIter2);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _FIter>
_FIter
unique(_FIter, _FIter);
#pragma empty_line
template<typename _FIter, typename _BinaryPredicate>
_FIter
unique(_FIter, _FIter, _BinaryPredicate);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _FIter, typename _Tp>
_FIter
upper_bound(_FIter, _FIter, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Tp, typename _Compare>
_FIter
upper_bound(_FIter, _FIter, const _Tp&, _Compare);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _FIter>
_FIter
adjacent_find(_FIter, _FIter);
#pragma empty_line
template<typename _FIter, typename _BinaryPredicate>
_FIter
adjacent_find(_FIter, _FIter, _BinaryPredicate);
#pragma empty_line
template<typename _IIter, typename _Tp>
typename iterator_traits<_IIter>::difference_type
count(_IIter, _IIter, const _Tp&);
#pragma empty_line
template<typename _IIter, typename _Predicate>
typename iterator_traits<_IIter>::difference_type
count_if(_IIter, _IIter, _Predicate);
#pragma empty_line
template<typename _IIter1, typename _IIter2>
bool
equal(_IIter1, _IIter1, _IIter2);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
bool
equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
#pragma empty_line
template<typename _IIter, typename _Tp>
_IIter
find(_IIter, _IIter, const _Tp&);
#pragma empty_line
template<typename _FIter1, typename _FIter2>
_FIter1
find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
#pragma empty_line
template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
_FIter1
find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
#pragma empty_line
template<typename _IIter, typename _Predicate>
_IIter
find_if(_IIter, _IIter, _Predicate);
#pragma empty_line
template<typename _IIter, typename _Funct>
_Funct
for_each(_IIter, _IIter, _Funct);
#pragma empty_line
template<typename _FIter, typename _Generator>
void
generate(_FIter, _FIter, _Generator);
#pragma empty_line
template<typename _OIter, typename _Size, typename _Generator>
_OIter
generate_n(_OIter, _Size, _Generator);
#pragma empty_line
template<typename _IIter1, typename _IIter2>
bool
lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _Compare>
bool
lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
#pragma empty_line
template<typename _FIter>
_FIter
max_element(_FIter, _FIter);
#pragma empty_line
template<typename _FIter, typename _Compare>
_FIter
max_element(_FIter, _FIter, _Compare);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter>
_OIter
merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter,
typename _Compare>
_OIter
merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
#pragma empty_line
template<typename _FIter>
_FIter
min_element(_FIter, _FIter);
#pragma empty_line
template<typename _FIter, typename _Compare>
_FIter
min_element(_FIter, _FIter, _Compare);
#pragma empty_line
template<typename _IIter1, typename _IIter2>
pair<_IIter1, _IIter2>
mismatch(_IIter1, _IIter1, _IIter2);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
pair<_IIter1, _IIter2>
mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
#pragma empty_line
template<typename _RAIter>
void
nth_element(_RAIter, _RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
nth_element(_RAIter, _RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _RAIter>
void
partial_sort(_RAIter, _RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _BIter, typename _Predicate>
_BIter
partition(_BIter, _BIter, _Predicate);
#pragma empty_line
template<typename _RAIter>
void
random_shuffle(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Generator>
void
random_shuffle(_RAIter, _RAIter,
#pragma empty_line
#pragma empty_line
#pragma empty_line
_Generator&);
#pragma empty_line
#pragma empty_line
template<typename _FIter, typename _Tp>
void
replace(_FIter, _FIter, const _Tp&, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Predicate, typename _Tp>
void
replace_if(_FIter, _FIter, _Predicate, const _Tp&);
#pragma empty_line
template<typename _FIter1, typename _FIter2>
_FIter1
search(_FIter1, _FIter1, _FIter2, _FIter2);
#pragma empty_line
template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
_FIter1
search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
#pragma empty_line
template<typename _FIter, typename _Size, typename _Tp>
_FIter
search_n(_FIter, _FIter, _Size, const _Tp&);
#pragma empty_line
template<typename _FIter, typename _Size, typename _Tp,
typename _BinaryPredicate>
_FIter
search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter>
_OIter
set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter,
typename _Compare>
_OIter
set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter>
_OIter
set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter,
typename _Compare>
_OIter
set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter>
_OIter
set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter,
typename _Compare>
_OIter
set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
_OIter, _Compare);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter>
_OIter
set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter,
typename _Compare>
_OIter
set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
#pragma empty_line
template<typename _RAIter>
void
sort(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
sort(_RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _RAIter>
void
stable_sort(_RAIter, _RAIter);
#pragma empty_line
template<typename _RAIter, typename _Compare>
void
stable_sort(_RAIter, _RAIter, _Compare);
#pragma empty_line
template<typename _IIter, typename _OIter, typename _UnaryOperation>
_OIter
transform(_IIter, _IIter, _OIter, _UnaryOperation);
#pragma empty_line
template<typename _IIter1, typename _IIter2, typename _OIter,
typename _BinaryOperation>
_OIter
transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
#pragma empty_line
template<typename _IIter, typename _OIter>
_OIter
unique_copy(_IIter, _IIter, _OIter);
#pragma empty_line
template<typename _IIter, typename _OIter, typename _BinaryPredicate>
_OIter
unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
#pragma empty_line
#pragma empty_line
}
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 1 3
#pragma line 62 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance>
_Distance
__is_heap_until(_RandomAccessIterator __first, _Distance __n)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child)
{
if (__first[__parent] < __first[__child])
return __child;
if ((__child & 1) == 0)
++__parent;
}
return __n;
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance,
typename _Compare>
_Distance
__is_heap_until(_RandomAccessIterator __first, _Distance __n,
_Compare __comp)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child)
{
if (__comp(__first[__parent], __first[__child]))
return __child;
if ((__child & 1) == 0)
++__parent;
}
return __n;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance>
inline bool
__is_heap(_RandomAccessIterator __first, _Distance __n)
{ return std::__is_heap_until(__first, __n) == __n; }
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare,
typename _Distance>
inline bool
__is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n)
{ return std::__is_heap_until(__first, __n, __comp) == __n; }
#pragma empty_line
template<typename _RandomAccessIterator>
inline bool
__is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ return std::__is_heap(__first, std::distance(__first, __last)); }
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
inline bool
__is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{ return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
void
__push_heap(_RandomAccessIterator __first,
_Distance __holeIndex, _Distance __topIndex, _Tp __value)
{
_Distance __parent = (__holeIndex - 1) / 2;
while (__holeIndex > __topIndex && *(__first + __parent) < __value)
{
*(__first + __holeIndex) = (*(__first + __parent));
__holeIndex = __parent;
__parent = (__holeIndex - 1) / 2;
}
*(__first + __holeIndex) = (__value);
}
#pragma line 154 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator>
inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
_ValueType __value = (*(__last - 1));
std::__push_heap(__first, _DistanceType((__last - __first) - 1),
_DistanceType(0), (__value));
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
typename _Compare>
void
__push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __topIndex, _Tp __value, _Compare __comp)
{
_Distance __parent = (__holeIndex - 1) / 2;
while (__holeIndex > __topIndex
&& __comp(*(__first + __parent), __value))
{
*(__first + __holeIndex) = (*(__first + __parent));
__holeIndex = __parent;
__parent = (__holeIndex - 1) / 2;
}
*(__first + __holeIndex) = (__value);
}
#pragma line 203 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator, typename _Compare>
inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
_ValueType __value = (*(__last - 1));
std::__push_heap(__first, _DistanceType((__last - __first) - 1),
_DistanceType(0), (__value), __comp);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
void
__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __len, _Tp __value)
{
const _Distance __topIndex = __holeIndex;
_Distance __secondChild = __holeIndex;
while (__secondChild < (__len - 1) / 2)
{
__secondChild = 2 * (__secondChild + 1);
if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
__secondChild--;
*(__first + __holeIndex) = (*(__first + __secondChild));
__holeIndex = __secondChild;
}
if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
{
__secondChild = 2 * (__secondChild + 1);
*(__first + __holeIndex) = (*(__first + (__secondChild - 1)))
;
__holeIndex = __secondChild - 1;
}
std::__push_heap(__first, __holeIndex, __topIndex,
(__value));
}
#pragma empty_line
template<typename _RandomAccessIterator>
inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
_ValueType __value = (*__result);
*__result = (*__first);
std::__adjust_heap(__first, _DistanceType(0),
_DistanceType(__last - __first),
(__value));
}
#pragma line 276 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator>
inline void
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
--__last;
std::__pop_heap(__first, __last, __last);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance,
typename _Tp, typename _Compare>
void
__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __len, _Tp __value, _Compare __comp)
{
const _Distance __topIndex = __holeIndex;
_Distance __secondChild = __holeIndex;
while (__secondChild < (__len - 1) / 2)
{
__secondChild = 2 * (__secondChild + 1);
if (__comp(*(__first + __secondChild),
*(__first + (__secondChild - 1))))
__secondChild--;
*(__first + __holeIndex) = (*(__first + __secondChild));
__holeIndex = __secondChild;
}
if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
{
__secondChild = 2 * (__secondChild + 1);
*(__first + __holeIndex) = (*(__first + (__secondChild - 1)))
;
__holeIndex = __secondChild - 1;
}
std::__push_heap(__first, __holeIndex, __topIndex,
(__value), __comp);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result, _Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
_ValueType __value = (*__result);
*__result = (*__first);
std::__adjust_heap(__first, _DistanceType(0),
_DistanceType(__last - __first),
(__value), __comp);
}
#pragma line 350 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator, typename _Compare>
inline void
pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
--__last;
std::__pop_heap(__first, __last, __last, __comp);
}
#pragma line 373 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator>
void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__last - __first < 2)
return;
#pragma empty_line
const _DistanceType __len = __last - __first;
_DistanceType __parent = (__len - 2) / 2;
while (true)
{
_ValueType __value = (*(__first + __parent));
std::__adjust_heap(__first, __parent, __len, (__value));
if (__parent == 0)
return;
__parent--;
}
}
#pragma line 413 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator, typename _Compare>
void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__last - __first < 2)
return;
#pragma empty_line
const _DistanceType __len = __last - __first;
_DistanceType __parent = (__len - 2) / 2;
while (true)
{
_ValueType __value = (*(__first + __parent));
std::__adjust_heap(__first, __parent, __len, (__value),
__comp);
if (__parent == 0)
return;
__parent--;
}
}
#pragma line 452 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator>
void
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__last - __first > 1)
{
--__last;
std::__pop_heap(__first, __last, __last);
}
}
#pragma line 481 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
template<typename _RandomAccessIterator, typename _Compare>
void
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__last - __first > 1)
{
--__last;
std::__pop_heap(__first, __last, __last, __comp);
}
}
#pragma line 578 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_heap.h" 3
#pragma empty_line
}
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_tempbuf.h" 1 3
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_tempbuf.h" 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_construct.h" 1 3
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_construct.h" 3
namespace std
{
#pragma empty_line
#pragma line 78 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_construct.h" 3
template<typename _T1, typename _T2>
inline void
_Construct(_T1* __p, const _T2& __value)
{
#pragma empty_line
#pragma empty_line
::new(static_cast<void*>(__p)) _T1(__value);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
inline void
_Destroy(_Tp* __pointer)
{ __pointer->~_Tp(); }
#pragma empty_line
template<bool>
struct _Destroy_aux
{
template<typename _ForwardIterator>
static void
__destroy(_ForwardIterator __first, _ForwardIterator __last)
{
for (; __first != __last; ++__first)
std::_Destroy(std::__addressof(*__first));
}
};
#pragma empty_line
template<>
struct _Destroy_aux<true>
{
template<typename _ForwardIterator>
static void
__destroy(_ForwardIterator, _ForwardIterator) { }
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
inline void
_Destroy(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_Value_type;
std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
__destroy(__first, __last);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <typename _Tp> class allocator;
#pragma empty_line
template<typename _ForwardIterator, typename _Allocator>
void
_Destroy(_ForwardIterator __first, _ForwardIterator __last,
_Allocator& __alloc)
{
for (; __first != __last; ++__first)
__alloc.destroy(std::__addressof(*__first));
}
#pragma empty_line
template<typename _ForwardIterator, typename _Tp>
inline void
_Destroy(_ForwardIterator __first, _ForwardIterator __last,
allocator<_Tp>&)
{
_Destroy(__first, __last);
}
#pragma empty_line
#pragma empty_line
}
#pragma line 62 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_tempbuf.h" 2 3
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 84 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_tempbuf.h" 3
template<typename _Tp>
pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __len)
{
const ptrdiff_t __max =
__gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
if (__len > __max)
__len = __max;
#pragma empty_line
while (__len > 0)
{
_Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
std::nothrow));
if (__tmp != 0)
return std::pair<_Tp*, ptrdiff_t>(__tmp, __len);
__len /= 2;
}
return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
}
#pragma line 111 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_tempbuf.h" 3
template<typename _Tp>
inline void
return_temporary_buffer(_Tp* __p)
{ ::operator delete(__p, std::nothrow); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _Tp>
class _Temporary_buffer
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef _Tp value_type;
typedef value_type* pointer;
typedef pointer iterator;
typedef ptrdiff_t size_type;
#pragma empty_line
protected:
size_type _M_original_len;
size_type _M_len;
pointer _M_buffer;
#pragma empty_line
public:
#pragma empty_line
size_type
size() const
{ return _M_len; }
#pragma empty_line
#pragma empty_line
size_type
requested_size() const
{ return _M_original_len; }
#pragma empty_line
#pragma empty_line
iterator
begin()
{ return _M_buffer; }
#pragma empty_line
#pragma empty_line
iterator
end()
{ return _M_buffer + _M_len; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last);
#pragma empty_line
~_Temporary_buffer()
{
std::_Destroy(_M_buffer, _M_buffer + _M_len);
std::return_temporary_buffer(_M_buffer);
}
#pragma empty_line
private:
#pragma empty_line
_Temporary_buffer(const _Temporary_buffer&);
#pragma empty_line
void
operator=(const _Temporary_buffer&);
};
#pragma empty_line
#pragma empty_line
template<bool>
struct __uninitialized_construct_buf_dispatch
{
template<typename _ForwardIterator, typename _Tp>
static void
__ucr(_ForwardIterator __first, _ForwardIterator __last,
_Tp& __value)
{
if(__first == __last)
return;
#pragma empty_line
_ForwardIterator __cur = __first;
try
{
std::_Construct(std::__addressof(*__first),
(__value));
_ForwardIterator __prev = __cur;
++__cur;
for(; __cur != __last; ++__cur, ++__prev)
std::_Construct(std::__addressof(*__cur),
(*__prev));
__value = (*__prev);
}
catch(...)
{
std::_Destroy(__first, __cur);
throw;
}
}
};
#pragma empty_line
template<>
struct __uninitialized_construct_buf_dispatch<true>
{
template<typename _ForwardIterator, typename _Tp>
static void
__ucr(_ForwardIterator, _ForwardIterator, _Tp&) { }
};
#pragma line 230 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_tempbuf.h" 3
template<typename _ForwardIterator, typename _Tp>
inline void
__uninitialized_construct_buf(_ForwardIterator __first,
_ForwardIterator __last,
_Tp& __value)
{
typedef typename std::iterator_traits<_ForwardIterator>::value_type
_ValueType;
#pragma empty_line
std::__uninitialized_construct_buf_dispatch<
__has_trivial_constructor(_ValueType)>::
__ucr(__first, __last, __value);
}
#pragma empty_line
template<typename _ForwardIterator, typename _Tp>
_Temporary_buffer<_ForwardIterator, _Tp>::
_Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
: _M_original_len(std::distance(__first, __last)),
_M_len(0), _M_buffer(0)
{
try
{
std::pair<pointer, size_type> __p(std::get_temporary_buffer<
value_type>(_M_original_len));
_M_buffer = __p.first;
_M_len = __p.second;
if(_M_buffer)
std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len,
*__first);
}
catch(...)
{
std::return_temporary_buffer(_M_buffer);
_M_buffer = 0;
_M_len = 0;
throw;
}
}
#pragma empty_line
#pragma empty_line
}
#pragma line 65 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 2 3
#pragma line 73 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Iterator>
void
__move_median_first(_Iterator __a, _Iterator __b, _Iterator __c)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (*__a < *__b)
{
if (*__b < *__c)
std::iter_swap(__a, __b);
else if (*__a < *__c)
std::iter_swap(__a, __c);
}
else if (*__a < *__c)
return;
else if (*__b < *__c)
std::iter_swap(__a, __c);
else
std::iter_swap(__a, __b);
}
#pragma empty_line
#pragma empty_line
template<typename _Iterator, typename _Compare>
void
__move_median_first(_Iterator __a, _Iterator __b, _Iterator __c,
_Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__comp(*__a, *__b))
{
if (__comp(*__b, *__c))
std::iter_swap(__a, __b);
else if (__comp(*__a, *__c))
std::iter_swap(__a, __c);
}
else if (__comp(*__a, *__c))
return;
else if (__comp(*__b, *__c))
std::iter_swap(__a, __c);
else
std::iter_swap(__a, __b);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _Tp>
inline _InputIterator
__find(_InputIterator __first, _InputIterator __last,
const _Tp& __val, input_iterator_tag)
{
while (__first != __last && !(*__first == __val))
++__first;
return __first;
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _Predicate>
inline _InputIterator
__find_if(_InputIterator __first, _InputIterator __last,
_Predicate __pred, input_iterator_tag)
{
while (__first != __last && !bool(__pred(*__first)))
++__first;
return __first;
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Tp>
_RandomAccessIterator
__find(_RandomAccessIterator __first, _RandomAccessIterator __last,
const _Tp& __val, random_access_iterator_tag)
{
typename iterator_traits<_RandomAccessIterator>::difference_type
__trip_count = (__last - __first) >> 2;
#pragma empty_line
for (; __trip_count > 0; --__trip_count)
{
if (*__first == __val)
return __first;
++__first;
#pragma empty_line
if (*__first == __val)
return __first;
++__first;
#pragma empty_line
if (*__first == __val)
return __first;
++__first;
#pragma empty_line
if (*__first == __val)
return __first;
++__first;
}
#pragma empty_line
switch (__last - __first)
{
case 3:
if (*__first == __val)
return __first;
++__first;
case 2:
if (*__first == __val)
return __first;
++__first;
case 1:
if (*__first == __val)
return __first;
++__first;
case 0:
default:
return __last;
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Predicate>
_RandomAccessIterator
__find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Predicate __pred, random_access_iterator_tag)
{
typename iterator_traits<_RandomAccessIterator>::difference_type
__trip_count = (__last - __first) >> 2;
#pragma empty_line
for (; __trip_count > 0; --__trip_count)
{
if (__pred(*__first))
return __first;
++__first;
#pragma empty_line
if (__pred(*__first))
return __first;
++__first;
#pragma empty_line
if (__pred(*__first))
return __first;
++__first;
#pragma empty_line
if (__pred(*__first))
return __first;
++__first;
}
#pragma empty_line
switch (__last - __first)
{
case 3:
if (__pred(*__first))
return __first;
++__first;
case 2:
if (__pred(*__first))
return __first;
++__first;
case 1:
if (__pred(*__first))
return __first;
++__first;
case 0:
default:
return __last;
}
}
#pragma line 326 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Integer, typename _Tp>
_ForwardIterator
__search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val,
std::forward_iterator_tag)
{
__first = std::find(__first, __last, __val);
while (__first != __last)
{
typename iterator_traits<_ForwardIterator>::difference_type
__n = __count;
_ForwardIterator __i = __first;
++__i;
while (__i != __last && __n != 1 && *__i == __val)
{
++__i;
--__n;
}
if (__n == 1)
return __first;
if (__i == __last)
return __last;
__first = std::find(++__i, __last, __val);
}
return __last;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIter, typename _Integer, typename _Tp>
_RandomAccessIter
__search_n(_RandomAccessIter __first, _RandomAccessIter __last,
_Integer __count, const _Tp& __val,
std::random_access_iterator_tag)
{
#pragma empty_line
typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
_DistanceType;
#pragma empty_line
_DistanceType __tailSize = __last - __first;
const _DistanceType __pattSize = __count;
#pragma empty_line
if (__tailSize < __pattSize)
return __last;
#pragma empty_line
const _DistanceType __skipOffset = __pattSize - 1;
_RandomAccessIter __lookAhead = __first + __skipOffset;
__tailSize -= __pattSize;
#pragma empty_line
while (1)
{
#pragma empty_line
#pragma empty_line
while (!(*__lookAhead == __val))
{
if (__tailSize < __pattSize)
return __last;
__lookAhead += __pattSize;
__tailSize -= __pattSize;
}
_DistanceType __remainder = __skipOffset;
for (_RandomAccessIter __backTrack = __lookAhead - 1;
*__backTrack == __val; --__backTrack)
{
if (--__remainder == 0)
return (__lookAhead - __skipOffset);
}
if (__remainder > __tailSize)
return __last;
__lookAhead += __remainder;
__tailSize -= __remainder;
}
}
#pragma line 411 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Integer, typename _Tp,
typename _BinaryPredicate>
_ForwardIterator
__search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val,
_BinaryPredicate __binary_pred, std::forward_iterator_tag)
{
while (__first != __last && !bool(__binary_pred(*__first, __val)))
++__first;
#pragma empty_line
while (__first != __last)
{
typename iterator_traits<_ForwardIterator>::difference_type
__n = __count;
_ForwardIterator __i = __first;
++__i;
while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val)))
{
++__i;
--__n;
}
if (__n == 1)
return __first;
if (__i == __last)
return __last;
__first = ++__i;
while (__first != __last
&& !bool(__binary_pred(*__first, __val)))
++__first;
}
return __last;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIter, typename _Integer, typename _Tp,
typename _BinaryPredicate>
_RandomAccessIter
__search_n(_RandomAccessIter __first, _RandomAccessIter __last,
_Integer __count, const _Tp& __val,
_BinaryPredicate __binary_pred, std::random_access_iterator_tag)
{
#pragma empty_line
typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
_DistanceType;
#pragma empty_line
_DistanceType __tailSize = __last - __first;
const _DistanceType __pattSize = __count;
#pragma empty_line
if (__tailSize < __pattSize)
return __last;
#pragma empty_line
const _DistanceType __skipOffset = __pattSize - 1;
_RandomAccessIter __lookAhead = __first + __skipOffset;
__tailSize -= __pattSize;
#pragma empty_line
while (1)
{
#pragma empty_line
#pragma empty_line
while (!bool(__binary_pred(*__lookAhead, __val)))
{
if (__tailSize < __pattSize)
return __last;
__lookAhead += __pattSize;
__tailSize -= __pattSize;
}
_DistanceType __remainder = __skipOffset;
for (_RandomAccessIter __backTrack = __lookAhead - 1;
__binary_pred(*__backTrack, __val); --__backTrack)
{
if (--__remainder == 0)
return (__lookAhead - __skipOffset);
}
if (__remainder > __tailSize)
return __last;
__lookAhead += __remainder;
__tailSize -= __remainder;
}
}
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator1
__find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
forward_iterator_tag, forward_iterator_tag)
{
if (__first2 == __last2)
return __last1;
else
{
_ForwardIterator1 __result = __last1;
while (1)
{
_ForwardIterator1 __new_result
= std::search(__first1, __last1, __first2, __last2);
if (__new_result == __last1)
return __result;
else
{
__result = __new_result;
__first1 = __new_result;
++__first1;
}
}
}
}
#pragma empty_line
template<typename _ForwardIterator1, typename _ForwardIterator2,
typename _BinaryPredicate>
_ForwardIterator1
__find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
forward_iterator_tag, forward_iterator_tag,
_BinaryPredicate __comp)
{
if (__first2 == __last2)
return __last1;
else
{
_ForwardIterator1 __result = __last1;
while (1)
{
_ForwardIterator1 __new_result
= std::search(__first1, __last1, __first2,
__last2, __comp);
if (__new_result == __last1)
return __result;
else
{
__result = __new_result;
__first1 = __new_result;
++__first1;
}
}
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
_BidirectionalIterator1
__find_end(_BidirectionalIterator1 __first1,
_BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2,
_BidirectionalIterator2 __last2,
bidirectional_iterator_tag, bidirectional_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
#pragma empty_line
_RevIterator1 __rlast1(__first1);
_RevIterator2 __rlast2(__first2);
_RevIterator1 __rresult = std::search(_RevIterator1(__last1),
__rlast1,
_RevIterator2(__last2),
__rlast2);
#pragma empty_line
if (__rresult == __rlast1)
return __last1;
else
{
_BidirectionalIterator1 __result = __rresult.base();
std::advance(__result, -std::distance(__first2, __last2));
return __result;
}
}
#pragma empty_line
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BinaryPredicate>
_BidirectionalIterator1
__find_end(_BidirectionalIterator1 __first1,
_BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2,
_BidirectionalIterator2 __last2,
bidirectional_iterator_tag, bidirectional_iterator_tag,
_BinaryPredicate __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
#pragma empty_line
_RevIterator1 __rlast1(__first1);
_RevIterator2 __rlast2(__first2);
_RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
_RevIterator2(__last2), __rlast2,
__comp);
#pragma empty_line
if (__rresult == __rlast1)
return __last1;
else
{
_BidirectionalIterator1 __result = __rresult.base();
std::advance(__result, -std::distance(__first2, __last2));
return __result;
}
}
#pragma line 649 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2>
inline _ForwardIterator1
find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
return std::__find_end(__first1, __last1, __first2, __last2,
std::__iterator_category(__first1),
std::__iterator_category(__first2));
}
#pragma line 695 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2,
typename _BinaryPredicate>
inline _ForwardIterator1
find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
_BinaryPredicate __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
return std::__find_end(__first1, __last1, __first2, __last2,
std::__iterator_category(__first1),
std::__iterator_category(__first2),
__comp);
}
#pragma line 874 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator, typename _Tp>
_OutputIterator
remove_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, const _Tp& __value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first)
if (!(*__first == __value))
{
*__result = *__first;
++__result;
}
return __result;
}
#pragma line 911 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator,
typename _Predicate>
_OutputIterator
remove_copy_if(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _Predicate __pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first)
if (!bool(__pred(*__first)))
{
*__result = *__first;
++__result;
}
return __result;
}
#pragma line 1086 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp>
_ForwardIterator
remove(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
__first = std::find(__first, __last, __value);
if(__first == __last)
return __first;
_ForwardIterator __result = __first;
++__first;
for(; __first != __last; ++__first)
if(!(*__first == __value))
{
*__result = (*__first);
++__result;
}
return __result;
}
#pragma line 1129 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Predicate>
_ForwardIterator
remove_if(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
__first = std::find_if(__first, __last, __pred);
if(__first == __last)
return __first;
_ForwardIterator __result = __first;
++__first;
for(; __first != __last; ++__first)
if(!bool(__pred(*__first)))
{
*__result = (*__first);
++__result;
}
return __result;
}
#pragma line 1169 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator>
_ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
#pragma empty_line
__first = std::adjacent_find(__first, __last);
if (__first == __last)
return __last;
#pragma empty_line
#pragma empty_line
_ForwardIterator __dest = __first;
++__first;
while (++__first != __last)
if (!(*__dest == *__first))
*++__dest = (*__first);
return ++__dest;
}
#pragma line 1209 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _BinaryPredicate>
_ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last,
_BinaryPredicate __binary_pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
#pragma empty_line
__first = std::adjacent_find(__first, __last, __binary_pred);
if (__first == __last)
return __last;
#pragma empty_line
#pragma empty_line
_ForwardIterator __dest = __first;
++__first;
while (++__first != __last)
if (!bool(__binary_pred(*__dest, *__first)))
*++__dest = (*__first);
return ++__dest;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _OutputIterator>
_OutputIterator
__unique_copy(_ForwardIterator __first, _ForwardIterator __last,
_OutputIterator __result,
forward_iterator_tag, output_iterator_tag)
{
#pragma empty_line
_ForwardIterator __next = __first;
*__result = *__first;
while (++__next != __last)
if (!(*__first == *__next))
{
__first = __next;
*++__result = *__first;
}
return ++__result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _OutputIterator>
_OutputIterator
__unique_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result,
input_iterator_tag, output_iterator_tag)
{
#pragma empty_line
typename iterator_traits<_InputIterator>::value_type __value = *__first;
*__result = __value;
while (++__first != __last)
if (!(__value == *__first))
{
__value = *__first;
*++__result = __value;
}
return ++__result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _ForwardIterator>
_ForwardIterator
__unique_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result,
input_iterator_tag, forward_iterator_tag)
{
#pragma empty_line
*__result = *__first;
while (++__first != __last)
if (!(*__result == *__first))
*++__result = *__first;
return ++__result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _OutputIterator,
typename _BinaryPredicate>
_OutputIterator
__unique_copy(_ForwardIterator __first, _ForwardIterator __last,
_OutputIterator __result, _BinaryPredicate __binary_pred,
forward_iterator_tag, output_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_ForwardIterator __next = __first;
*__result = *__first;
while (++__next != __last)
if (!bool(__binary_pred(*__first, *__next)))
{
__first = __next;
*++__result = *__first;
}
return ++__result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _OutputIterator,
typename _BinaryPredicate>
_OutputIterator
__unique_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryPredicate __binary_pred,
input_iterator_tag, output_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typename iterator_traits<_InputIterator>::value_type __value = *__first;
*__result = __value;
while (++__first != __last)
if (!bool(__binary_pred(__value, *__first)))
{
__value = *__first;
*++__result = __value;
}
return ++__result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _ForwardIterator,
typename _BinaryPredicate>
_ForwardIterator
__unique_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _BinaryPredicate __binary_pred,
input_iterator_tag, forward_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
*__result = *__first;
while (++__first != __last)
if (!bool(__binary_pred(*__result, *__first)))
*++__result = *__first;
return ++__result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator>
void
__reverse(_BidirectionalIterator __first, _BidirectionalIterator __last,
bidirectional_iterator_tag)
{
while (true)
if (__first == __last || __first == --__last)
return;
else
{
std::iter_swap(__first, __last);
++__first;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__reverse(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
if (__first == __last)
return;
--__last;
while (__first < __last)
{
std::iter_swap(__first, __last);
++__first;
--__last;
}
}
#pragma line 1437 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator>
inline void
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
std::__reverse(__first, __last, std::__iterator_category(__first));
}
#pragma line 1464 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator, typename _OutputIterator>
_OutputIterator
reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last,
_OutputIterator __result)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
while (__first != __last)
{
--__last;
*__result = *__last;
++__result;
}
return __result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _EuclideanRingElement>
_EuclideanRingElement
__gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
{
while (__n != 0)
{
_EuclideanRingElement __t = __m % __n;
__m = __n;
__n = __t;
}
return __m;
}
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
__rotate(_ForwardIterator __first,
_ForwardIterator __middle,
_ForwardIterator __last,
forward_iterator_tag)
{
if (__first == __middle || __last == __middle)
return;
#pragma empty_line
_ForwardIterator __first2 = __middle;
do
{
std::iter_swap(__first, __first2);
++__first;
++__first2;
if (__first == __middle)
__middle = __first2;
}
while (__first2 != __last);
#pragma empty_line
__first2 = __middle;
#pragma empty_line
while (__first2 != __last)
{
std::iter_swap(__first, __first2);
++__first;
++__first2;
if (__first == __middle)
__middle = __first2;
else if (__first2 == __last)
__first2 = __middle;
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator>
void
__rotate(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
bidirectional_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__first == __middle || __last == __middle)
return;
#pragma empty_line
std::__reverse(__first, __middle, bidirectional_iterator_tag());
std::__reverse(__middle, __last, bidirectional_iterator_tag());
#pragma empty_line
while (__first != __middle && __middle != __last)
{
std::iter_swap(__first, --__last);
++__first;
}
#pragma empty_line
if (__first == __middle)
std::__reverse(__middle, __last, bidirectional_iterator_tag());
else
std::__reverse(__first, __middle, bidirectional_iterator_tag());
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__rotate(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last,
random_access_iterator_tag)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if (__first == __middle || __last == __middle)
return;
#pragma empty_line
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance;
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
_Distance __n = __last - __first;
_Distance __k = __middle - __first;
#pragma empty_line
if (__k == __n - __k)
{
std::swap_ranges(__first, __middle, __middle);
return;
}
#pragma empty_line
_RandomAccessIterator __p = __first;
#pragma empty_line
for (;;)
{
if (__k < __n - __k)
{
if (__is_pod(_ValueType) && __k == 1)
{
_ValueType __t = (*__p);
std::copy(__p + 1, __p + __n, __p);
*(__p + __n - 1) = (__t);
return;
}
_RandomAccessIterator __q = __p + __k;
for (_Distance __i = 0; __i < __n - __k; ++ __i)
{
std::iter_swap(__p, __q);
++__p;
++__q;
}
__n %= __k;
if (__n == 0)
return;
std::swap(__n, __k);
__k = __n - __k;
}
else
{
__k = __n - __k;
if (__is_pod(_ValueType) && __k == 1)
{
_ValueType __t = (*(__p + __n - 1));
std::copy_backward(__p, __p + __n - 1, __p + __n);
*__p = (__t);
return;
}
_RandomAccessIterator __q = __p + __n;
__p = __q - __k;
for (_Distance __i = 0; __i < __n - __k; ++ __i)
{
--__p;
--__q;
std::iter_swap(__p, __q);
}
__n %= __k;
if (__n == 0)
return;
std::swap(__n, __k);
}
}
}
#pragma line 1668 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator>
inline void
rotate(_ForwardIterator __first, _ForwardIterator __middle,
_ForwardIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
typedef typename iterator_traits<_ForwardIterator>::iterator_category
_IterType;
std::__rotate(__first, __middle, __last, _IterType());
}
#pragma line 1702 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _OutputIterator>
_OutputIterator
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
_ForwardIterator __last, _OutputIterator __result)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
return std::copy(__first, __middle,
std::copy(__middle, __last, __result));
}
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _Predicate>
_ForwardIterator
__partition(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred, forward_iterator_tag)
{
if (__first == __last)
return __first;
#pragma empty_line
while (__pred(*__first))
if (++__first == __last)
return __first;
#pragma empty_line
_ForwardIterator __next = __first;
#pragma empty_line
while (++__next != __last)
if (__pred(*__next))
{
std::iter_swap(__first, __next);
++__first;
}
#pragma empty_line
return __first;
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator, typename _Predicate>
_BidirectionalIterator
__partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
_Predicate __pred, bidirectional_iterator_tag)
{
while (true)
{
while (true)
if (__first == __last)
return __first;
else if (__pred(*__first))
++__first;
else
break;
--__last;
while (true)
if (__first == __last)
return __first;
else if (!bool(__pred(*__last)))
--__last;
else
break;
std::iter_swap(__first, __last);
++__first;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _Predicate, typename _Distance>
_ForwardIterator
__inplace_stable_partition(_ForwardIterator __first,
_ForwardIterator __last,
_Predicate __pred, _Distance __len)
{
if (__len == 1)
return __pred(*__first) ? __last : __first;
_ForwardIterator __middle = __first;
std::advance(__middle, __len / 2);
_ForwardIterator __begin = std::__inplace_stable_partition(__first,
__middle,
__pred,
__len / 2);
_ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
__pred,
__len
- __len / 2);
std::rotate(__begin, __middle, __end);
std::advance(__begin, std::distance(__middle, __end));
return __begin;
}
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
typename _Distance>
_ForwardIterator
__stable_partition_adaptive(_ForwardIterator __first,
_ForwardIterator __last,
_Predicate __pred, _Distance __len,
_Pointer __buffer,
_Distance __buffer_size)
{
if (__len <= __buffer_size)
{
_ForwardIterator __result1 = __first;
_Pointer __result2 = __buffer;
for (; __first != __last; ++__first)
if (__pred(*__first))
{
*__result1 = (*__first);
++__result1;
}
else
{
*__result2 = (*__first);
++__result2;
}
std::copy(__buffer, __result2, __result1);
return __result1;
}
else
{
_ForwardIterator __middle = __first;
std::advance(__middle, __len / 2);
_ForwardIterator __begin =
std::__stable_partition_adaptive(__first, __middle, __pred,
__len / 2, __buffer,
__buffer_size);
_ForwardIterator __end =
std::__stable_partition_adaptive(__middle, __last, __pred,
__len - __len / 2,
__buffer, __buffer_size);
std::rotate(__begin, __middle, __end);
std::advance(__begin, std::distance(__middle, __end));
return __begin;
}
}
#pragma line 1860 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Predicate>
_ForwardIterator
stable_partition(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return __first;
else
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
_Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first,
__last);
if (__buf.size() > 0)
return
std::__stable_partition_adaptive(__first, __last, __pred,
_DistanceType(__buf.requested_size()),
__buf.begin(),
_DistanceType(__buf.size()));
else
return
std::__inplace_stable_partition(__first, __last, __pred,
_DistanceType(__buf.requested_size()));
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__heap_select(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last)
{
std::make_heap(__first, __middle);
for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
if (*__i < *__first)
std::__pop_heap(__first, __middle, __i);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
void
__heap_select(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last, _Compare __comp)
{
std::make_heap(__first, __middle, __comp);
for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
if (__comp(*__i, *__first))
std::__pop_heap(__first, __middle, __i, __comp);
}
#pragma line 1942 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _RandomAccessIterator>
_RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __result_first,
_RandomAccessIterator __result_last)
{
typedef typename iterator_traits<_InputIterator>::value_type
_InputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_OutputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
if (__result_first == __result_last)
return __result_last;
_RandomAccessIterator __result_real_last = __result_first;
while(__first != __last && __result_real_last != __result_last)
{
*__result_real_last = *__first;
++__result_real_last;
++__first;
}
std::make_heap(__result_first, __result_real_last);
while (__first != __last)
{
if (*__first < *__result_first)
std::__adjust_heap(__result_first, _DistanceType(0),
_DistanceType(__result_real_last
- __result_first),
_InputValueType(*__first));
++__first;
}
std::sort_heap(__result_first, __result_real_last);
return __result_real_last;
}
#pragma line 2008 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare>
_RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __result_first,
_RandomAccessIterator __result_last,
_Compare __comp)
{
typedef typename iterator_traits<_InputIterator>::value_type
_InputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_OutputValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
if (__result_first == __result_last)
return __result_last;
_RandomAccessIterator __result_real_last = __result_first;
while(__first != __last && __result_real_last != __result_last)
{
*__result_real_last = *__first;
++__result_real_last;
++__first;
}
std::make_heap(__result_first, __result_real_last, __comp);
while (__first != __last)
{
if (__comp(*__first, *__result_first))
std::__adjust_heap(__result_first, _DistanceType(0),
_DistanceType(__result_real_last
- __result_first),
_InputValueType(*__first),
__comp);
++__first;
}
std::sort_heap(__result_first, __result_real_last, __comp);
return __result_real_last;
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__unguarded_linear_insert(_RandomAccessIterator __last)
{
typename iterator_traits<_RandomAccessIterator>::value_type
__val = (*__last);
_RandomAccessIterator __next = __last;
--__next;
while (__val < *__next)
{
*__last = (*__next);
__last = __next;
--__next;
}
*__last = (__val);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
void
__unguarded_linear_insert(_RandomAccessIterator __last,
_Compare __comp)
{
typename iterator_traits<_RandomAccessIterator>::value_type
__val = (*__last);
_RandomAccessIterator __next = __last;
--__next;
while (__comp(__val, *__next))
{
*__last = (*__next);
__last = __next;
--__next;
}
*__last = (__val);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last)
{
if (__first == __last)
return;
#pragma empty_line
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
{
if (*__i < *__first)
{
typename iterator_traits<_RandomAccessIterator>::value_type
__val = (*__i);
std::copy_backward(__first, __i, __i + 1);
*__first = (__val);
}
else
std::__unguarded_linear_insert(__i);
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
void
__insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
if (__first == __last) return;
#pragma empty_line
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
{
if (__comp(*__i, *__first))
{
typename iterator_traits<_RandomAccessIterator>::value_type
__val = (*__i);
std::copy_backward(__first, __i, __i + 1);
*__first = (__val);
}
else
std::__unguarded_linear_insert(__i, __comp);
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
inline void
__unguarded_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
std::__unguarded_linear_insert(__i);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
inline void
__unguarded_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
std::__unguarded_linear_insert(__i, __comp);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum { _S_threshold = 16 };
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__final_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last)
{
if (__last - __first > int(_S_threshold))
{
std::__insertion_sort(__first, __first + int(_S_threshold));
std::__unguarded_insertion_sort(__first + int(_S_threshold), __last);
}
else
std::__insertion_sort(__first, __last);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
void
__final_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
if (__last - __first > int(_S_threshold))
{
std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
std::__unguarded_insertion_sort(__first + int(_S_threshold), __last,
__comp);
}
else
std::__insertion_sort(__first, __last, __comp);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Tp>
_RandomAccessIterator
__unguarded_partition(_RandomAccessIterator __first,
_RandomAccessIterator __last, const _Tp& __pivot)
{
while (true)
{
while (*__first < __pivot)
++__first;
--__last;
while (__pivot < *__last)
--__last;
if (!(__first < __last))
return __first;
std::iter_swap(__first, __last);
++__first;
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
_RandomAccessIterator
__unguarded_partition(_RandomAccessIterator __first,
_RandomAccessIterator __last,
const _Tp& __pivot, _Compare __comp)
{
while (true)
{
while (__comp(*__first, __pivot))
++__first;
--__last;
while (__comp(__pivot, *__last))
--__last;
if (!(__first < __last))
return __first;
std::iter_swap(__first, __last);
++__first;
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
inline _RandomAccessIterator
__unguarded_partition_pivot(_RandomAccessIterator __first,
_RandomAccessIterator __last)
{
_RandomAccessIterator __mid = __first + (__last - __first) / 2;
std::__move_median_first(__first, __mid, (__last - 1));
return std::__unguarded_partition(__first + 1, __last, *__first);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
inline _RandomAccessIterator
__unguarded_partition_pivot(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
_RandomAccessIterator __mid = __first + (__last - __first) / 2;
std::__move_median_first(__first, __mid, (__last - 1), __comp);
return std::__unguarded_partition(__first + 1, __last, *__first, __comp);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Size>
void
__introsort_loop(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Size __depth_limit)
{
while (__last - __first > int(_S_threshold))
{
if (__depth_limit == 0)
{
std::partial_sort(__first, __last, __last);
return;
}
--__depth_limit;
_RandomAccessIterator __cut =
std::__unguarded_partition_pivot(__first, __last);
std::__introsort_loop(__cut, __last, __depth_limit);
__last = __cut;
}
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Size, typename _Compare>
void
__introsort_loop(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Size __depth_limit, _Compare __comp)
{
while (__last - __first > int(_S_threshold))
{
if (__depth_limit == 0)
{
std::partial_sort(__first, __last, __last, __comp);
return;
}
--__depth_limit;
_RandomAccessIterator __cut =
std::__unguarded_partition_pivot(__first, __last, __comp);
std::__introsort_loop(__cut, __last, __depth_limit, __comp);
__last = __cut;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Size>
void
__introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
_RandomAccessIterator __last, _Size __depth_limit)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
while (__last - __first > 3)
{
if (__depth_limit == 0)
{
std::__heap_select(__first, __nth + 1, __last);
#pragma empty_line
#pragma empty_line
std::iter_swap(__first, __nth);
return;
}
--__depth_limit;
_RandomAccessIterator __cut =
std::__unguarded_partition_pivot(__first, __last);
if (__cut <= __nth)
__first = __cut;
else
__last = __cut;
}
std::__insertion_sort(__first, __last);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Size, typename _Compare>
void
__introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
_RandomAccessIterator __last, _Size __depth_limit,
_Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
while (__last - __first > 3)
{
if (__depth_limit == 0)
{
std::__heap_select(__first, __nth + 1, __last, __comp);
#pragma empty_line
std::iter_swap(__first, __nth);
return;
}
--__depth_limit;
_RandomAccessIterator __cut =
std::__unguarded_partition_pivot(__first, __last, __comp);
if (__cut <= __nth)
__first = __cut;
else
__last = __cut;
}
std::__insertion_sort(__first, __last, __comp);
}
#pragma line 2392 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp, typename _Compare>
_ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
_DistanceType __len = std::distance(__first, __last);
#pragma empty_line
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (__comp(*__middle, __val))
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else
__len = __half;
}
return __first;
}
#pragma line 2439 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp>
_ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
_DistanceType __len = std::distance(__first, __last);
#pragma empty_line
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (__val < *__middle)
__len = __half;
else
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
}
return __first;
}
#pragma line 2488 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp, typename _Compare>
_ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
_DistanceType __len = std::distance(__first, __last);
#pragma empty_line
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (__comp(__val, *__middle))
__len = __half;
else
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
}
return __first;
}
#pragma line 2541 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp>
pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
_DistanceType __len = std::distance(__first, __last);
#pragma empty_line
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (*__middle < __val)
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else if (__val < *__middle)
__len = __half;
else
{
_ForwardIterator __left = std::lower_bound(__first, __middle,
__val);
std::advance(__first, __len);
_ForwardIterator __right = std::upper_bound(++__middle, __first,
__val);
return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
}
}
return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
}
#pragma line 2603 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp, typename _Compare>
pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
;
#pragma empty_line
_DistanceType __len = std::distance(__first, __last);
#pragma empty_line
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (__comp(*__middle, __val))
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else if (__comp(__val, *__middle))
__len = __half;
else
{
_ForwardIterator __left = std::lower_bound(__first, __middle,
__val, __comp);
std::advance(__first, __len);
_ForwardIterator __right = std::upper_bound(++__middle, __first,
__val, __comp);
return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
}
}
return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
}
#pragma line 2663 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp>
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
_ForwardIterator __i = std::lower_bound(__first, __last, __val);
return __i != __last && !(__val < *__i);
}
#pragma line 2696 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp, typename _Compare>
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
;
#pragma empty_line
_ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp);
return __i != __last && !bool(__comp(__val, *__i));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
void
__move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
while (__first1 != __last1 && __first2 != __last2)
{
if (*__first2 < *__first1)
{
*__result = (*__first2);
++__first2;
}
else
{
*__result = (*__first1);
++__first1;
}
++__result;
}
if (__first1 != __last1)
std::copy(__first1, __last1, __result);
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
void
__move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
{
while (__first1 != __last1 && __first2 != __last2)
{
if (__comp(*__first2, *__first1))
{
*__result = (*__first2);
++__first2;
}
else
{
*__result = (*__first1);
++__first1;
}
++__result;
}
if (__first1 != __last1)
std::copy(__first1, __last1, __result);
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3>
void
__move_merge_adaptive_backward(_BidirectionalIterator1 __first1,
_BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2,
_BidirectionalIterator2 __last2,
_BidirectionalIterator3 __result)
{
if (__first1 == __last1)
{
std::copy_backward(__first2, __last2, __result);
return;
}
else if (__first2 == __last2)
return;
#pragma empty_line
--__last1;
--__last2;
while (true)
{
if (*__last2 < *__last1)
{
*--__result = (*__last1);
if (__first1 == __last1)
{
std::copy_backward(__first2, ++__last2, __result);
return;
}
--__last1;
}
else
{
*--__result = (*__last2);
if (__first2 == __last2)
return;
--__last2;
}
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3, typename _Compare>
void
__move_merge_adaptive_backward(_BidirectionalIterator1 __first1,
_BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2,
_BidirectionalIterator2 __last2,
_BidirectionalIterator3 __result,
_Compare __comp)
{
if (__first1 == __last1)
{
std::copy_backward(__first2, __last2, __result);
return;
}
else if (__first2 == __last2)
return;
#pragma empty_line
--__last1;
--__last2;
while (true)
{
if (__comp(*__last2, *__last1))
{
*--__result = (*__last1);
if (__first1 == __last1)
{
std::copy_backward(__first2, ++__last2, __result);
return;
}
--__last1;
}
else
{
*--__result = (*__last2);
if (__first2 == __last2)
return;
--__last2;
}
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _Distance>
_BidirectionalIterator1
__rotate_adaptive(_BidirectionalIterator1 __first,
_BidirectionalIterator1 __middle,
_BidirectionalIterator1 __last,
_Distance __len1, _Distance __len2,
_BidirectionalIterator2 __buffer,
_Distance __buffer_size)
{
_BidirectionalIterator2 __buffer_end;
if (__len1 > __len2 && __len2 <= __buffer_size)
{
if (__len2)
{
__buffer_end = std::copy(__middle, __last, __buffer);
std::copy_backward(__first, __middle, __last);
return std::copy(__buffer, __buffer_end, __first);
}
else
return __first;
}
else if (__len1 <= __buffer_size)
{
if (__len1)
{
__buffer_end = std::copy(__first, __middle, __buffer);
std::copy(__middle, __last, __first);
return std::copy_backward(__buffer, __buffer_end, __last);
}
else
return __last;
}
else
{
std::rotate(__first, __middle, __last);
std::advance(__first, std::distance(__middle, __last));
return __first;
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator, typename _Distance,
typename _Pointer>
void
__merge_adaptive(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size)
{
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
_Pointer __buffer_end = std::copy(__first, __middle, __buffer);
std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last,
__first);
}
else if (__len2 <= __buffer_size)
{
_Pointer __buffer_end = std::copy(__middle, __last, __buffer);
std::__move_merge_adaptive_backward(__first, __middle, __buffer,
__buffer_end, __last);
}
else
{
_BidirectionalIterator __first_cut = __first;
_BidirectionalIterator __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2)
{
__len11 = __len1 / 2;
std::advance(__first_cut, __len11);
__second_cut = std::lower_bound(__middle, __last,
*__first_cut);
__len22 = std::distance(__middle, __second_cut);
}
else
{
__len22 = __len2 / 2;
std::advance(__second_cut, __len22);
__first_cut = std::upper_bound(__first, __middle,
*__second_cut);
__len11 = std::distance(__first, __first_cut);
}
_BidirectionalIterator __new_middle =
std::__rotate_adaptive(__first_cut, __middle, __second_cut,
__len1 - __len11, __len22, __buffer,
__buffer_size);
std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
__len22, __buffer, __buffer_size);
std::__merge_adaptive(__new_middle, __second_cut, __last,
__len1 - __len11,
__len2 - __len22, __buffer, __buffer_size);
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator, typename _Distance,
typename _Pointer, typename _Compare>
void
__merge_adaptive(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size,
_Compare __comp)
{
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
_Pointer __buffer_end = std::copy(__first, __middle, __buffer);
std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last,
__first, __comp);
}
else if (__len2 <= __buffer_size)
{
_Pointer __buffer_end = std::copy(__middle, __last, __buffer);
std::__move_merge_adaptive_backward(__first, __middle, __buffer,
__buffer_end, __last, __comp);
}
else
{
_BidirectionalIterator __first_cut = __first;
_BidirectionalIterator __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2)
{
__len11 = __len1 / 2;
std::advance(__first_cut, __len11);
__second_cut = std::lower_bound(__middle, __last, *__first_cut,
__comp);
__len22 = std::distance(__middle, __second_cut);
}
else
{
__len22 = __len2 / 2;
std::advance(__second_cut, __len22);
__first_cut = std::upper_bound(__first, __middle, *__second_cut,
__comp);
__len11 = std::distance(__first, __first_cut);
}
_BidirectionalIterator __new_middle =
std::__rotate_adaptive(__first_cut, __middle, __second_cut,
__len1 - __len11, __len22, __buffer,
__buffer_size);
std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
__len22, __buffer, __buffer_size, __comp);
std::__merge_adaptive(__new_middle, __second_cut, __last,
__len1 - __len11,
__len2 - __len22, __buffer,
__buffer_size, __comp);
}
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator, typename _Distance>
void
__merge_without_buffer(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2)
{
if (__len1 == 0 || __len2 == 0)
return;
if (__len1 + __len2 == 2)
{
if (*__middle < *__first)
std::iter_swap(__first, __middle);
return;
}
_BidirectionalIterator __first_cut = __first;
_BidirectionalIterator __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2)
{
__len11 = __len1 / 2;
std::advance(__first_cut, __len11);
__second_cut = std::lower_bound(__middle, __last, *__first_cut);
__len22 = std::distance(__middle, __second_cut);
}
else
{
__len22 = __len2 / 2;
std::advance(__second_cut, __len22);
__first_cut = std::upper_bound(__first, __middle, *__second_cut);
__len11 = std::distance(__first, __first_cut);
}
std::rotate(__first_cut, __middle, __second_cut);
_BidirectionalIterator __new_middle = __first_cut;
std::advance(__new_middle, std::distance(__middle, __second_cut));
std::__merge_without_buffer(__first, __first_cut, __new_middle,
__len11, __len22);
std::__merge_without_buffer(__new_middle, __second_cut, __last,
__len1 - __len11, __len2 - __len22);
}
#pragma empty_line
#pragma empty_line
template<typename _BidirectionalIterator, typename _Distance,
typename _Compare>
void
__merge_without_buffer(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Compare __comp)
{
if (__len1 == 0 || __len2 == 0)
return;
if (__len1 + __len2 == 2)
{
if (__comp(*__middle, *__first))
std::iter_swap(__first, __middle);
return;
}
_BidirectionalIterator __first_cut = __first;
_BidirectionalIterator __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2)
{
__len11 = __len1 / 2;
std::advance(__first_cut, __len11);
__second_cut = std::lower_bound(__middle, __last, *__first_cut,
__comp);
__len22 = std::distance(__middle, __second_cut);
}
else
{
__len22 = __len2 / 2;
std::advance(__second_cut, __len22);
__first_cut = std::upper_bound(__first, __middle, *__second_cut,
__comp);
__len11 = std::distance(__first, __first_cut);
}
std::rotate(__first_cut, __middle, __second_cut);
_BidirectionalIterator __new_middle = __first_cut;
std::advance(__new_middle, std::distance(__middle, __second_cut));
std::__merge_without_buffer(__first, __first_cut, __new_middle,
__len11, __len22, __comp);
std::__merge_without_buffer(__new_middle, __second_cut, __last,
__len1 - __len11, __len2 - __len22, __comp);
}
#pragma line 3120 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator>
void
inplace_merge(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last)
{
typedef typename iterator_traits<_BidirectionalIterator>::value_type
_ValueType;
typedef typename iterator_traits<_BidirectionalIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
if (__first == __middle || __middle == __last)
return;
#pragma empty_line
_DistanceType __len1 = std::distance(__first, __middle);
_DistanceType __len2 = std::distance(__middle, __last);
#pragma empty_line
_Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
__last);
if (__buf.begin() == 0)
std::__merge_without_buffer(__first, __middle, __last, __len1, __len2);
else
std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
__buf.begin(), _DistanceType(__buf.size()));
}
#pragma line 3175 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator, typename _Compare>
void
inplace_merge(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Compare __comp)
{
typedef typename iterator_traits<_BidirectionalIterator>::value_type
_ValueType;
typedef typename iterator_traits<_BidirectionalIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
if (__first == __middle || __middle == __last)
return;
#pragma empty_line
const _DistanceType __len1 = std::distance(__first, __middle);
const _DistanceType __len2 = std::distance(__middle, __last);
#pragma empty_line
_Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
__last);
if (__buf.begin() == 0)
std::__merge_without_buffer(__first, __middle, __last, __len1,
__len2, __comp);
else
std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
__buf.begin(), _DistanceType(__buf.size()),
__comp);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
_OutputIterator
__move_merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
while (__first1 != __last1 && __first2 != __last2)
{
if (*__first2 < *__first1)
{
*__result = (*__first2);
++__first2;
}
else
{
*__result = (*__first1);
++__first1;
}
++__result;
}
return std::copy(__first2, __last2, std::copy(__first1, __last1, __result))
#pragma empty_line
;
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
_OutputIterator
__move_merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
{
while (__first1 != __last1 && __first2 != __last2)
{
if (__comp(*__first2, *__first1))
{
*__result = (*__first2);
++__first2;
}
else
{
*__result = (*__first1);
++__first1;
}
++__result;
}
return std::copy(__first2, __last2, std::copy(__first1, __last1, __result))
#pragma empty_line
;
}
#pragma empty_line
template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
typename _Distance>
void
__merge_sort_loop(_RandomAccessIterator1 __first,
_RandomAccessIterator1 __last,
_RandomAccessIterator2 __result,
_Distance __step_size)
{
const _Distance __two_step = 2 * __step_size;
#pragma empty_line
while (__last - __first >= __two_step)
{
__result = std::__move_merge(__first, __first + __step_size,
__first + __step_size,
__first + __two_step, __result);
__first += __two_step;
}
#pragma empty_line
__step_size = std::min(_Distance(__last - __first), __step_size);
std::__move_merge(__first, __first + __step_size,
__first + __step_size, __last, __result);
}
#pragma empty_line
template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
typename _Distance, typename _Compare>
void
__merge_sort_loop(_RandomAccessIterator1 __first,
_RandomAccessIterator1 __last,
_RandomAccessIterator2 __result, _Distance __step_size,
_Compare __comp)
{
const _Distance __two_step = 2 * __step_size;
#pragma empty_line
while (__last - __first >= __two_step)
{
__result = std::__move_merge(__first, __first + __step_size,
__first + __step_size,
__first + __two_step,
__result, __comp);
__first += __two_step;
}
__step_size = std::min(_Distance(__last - __first), __step_size);
#pragma empty_line
std::__move_merge(__first,__first + __step_size,
__first + __step_size, __last, __result, __comp);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance>
void
__chunk_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Distance __chunk_size)
{
while (__last - __first >= __chunk_size)
{
std::__insertion_sort(__first, __first + __chunk_size);
__first += __chunk_size;
}
std::__insertion_sort(__first, __last);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Distance,
typename _Compare>
void
__chunk_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Distance __chunk_size, _Compare __comp)
{
while (__last - __first >= __chunk_size)
{
std::__insertion_sort(__first, __first + __chunk_size, __comp);
__first += __chunk_size;
}
std::__insertion_sort(__first, __last, __comp);
}
#pragma empty_line
enum { _S_chunk_size = 7 };
#pragma empty_line
template<typename _RandomAccessIterator, typename _Pointer>
void
__merge_sort_with_buffer(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Pointer __buffer)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance;
#pragma empty_line
const _Distance __len = __last - __first;
const _Pointer __buffer_last = __buffer + __len;
#pragma empty_line
_Distance __step_size = _S_chunk_size;
std::__chunk_insertion_sort(__first, __last, __step_size);
#pragma empty_line
while (__step_size < __len)
{
std::__merge_sort_loop(__first, __last, __buffer, __step_size);
__step_size *= 2;
std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
__step_size *= 2;
}
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Pointer, typename _Compare>
void
__merge_sort_with_buffer(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Pointer __buffer, _Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_Distance;
#pragma empty_line
const _Distance __len = __last - __first;
const _Pointer __buffer_last = __buffer + __len;
#pragma empty_line
_Distance __step_size = _S_chunk_size;
std::__chunk_insertion_sort(__first, __last, __step_size, __comp);
#pragma empty_line
while (__step_size < __len)
{
std::__merge_sort_loop(__first, __last, __buffer,
__step_size, __comp);
__step_size *= 2;
std::__merge_sort_loop(__buffer, __buffer_last, __first,
__step_size, __comp);
__step_size *= 2;
}
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Pointer,
typename _Distance>
void
__stable_sort_adaptive(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Pointer __buffer, _Distance __buffer_size)
{
const _Distance __len = (__last - __first + 1) / 2;
const _RandomAccessIterator __middle = __first + __len;
if (__len > __buffer_size)
{
std::__stable_sort_adaptive(__first, __middle,
__buffer, __buffer_size);
std::__stable_sort_adaptive(__middle, __last,
__buffer, __buffer_size);
}
else
{
std::__merge_sort_with_buffer(__first, __middle, __buffer);
std::__merge_sort_with_buffer(__middle, __last, __buffer);
}
std::__merge_adaptive(__first, __middle, __last,
_Distance(__middle - __first),
_Distance(__last - __middle),
__buffer, __buffer_size);
}
#pragma empty_line
template<typename _RandomAccessIterator, typename _Pointer,
typename _Distance, typename _Compare>
void
__stable_sort_adaptive(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Pointer __buffer, _Distance __buffer_size,
_Compare __comp)
{
const _Distance __len = (__last - __first + 1) / 2;
const _RandomAccessIterator __middle = __first + __len;
if (__len > __buffer_size)
{
std::__stable_sort_adaptive(__first, __middle, __buffer,
__buffer_size, __comp);
std::__stable_sort_adaptive(__middle, __last, __buffer,
__buffer_size, __comp);
}
else
{
std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
}
std::__merge_adaptive(__first, __middle, __last,
_Distance(__middle - __first),
_Distance(__last - __middle),
__buffer, __buffer_size,
__comp);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator>
void
__inplace_stable_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last)
{
if (__last - __first < 15)
{
std::__insertion_sort(__first, __last);
return;
}
_RandomAccessIterator __middle = __first + (__last - __first) / 2;
std::__inplace_stable_sort(__first, __middle);
std::__inplace_stable_sort(__middle, __last);
std::__merge_without_buffer(__first, __middle, __last,
__middle - __first,
__last - __middle);
}
#pragma empty_line
#pragma empty_line
template<typename _RandomAccessIterator, typename _Compare>
void
__inplace_stable_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
if (__last - __first < 15)
{
std::__insertion_sort(__first, __last, __comp);
return;
}
_RandomAccessIterator __middle = __first + (__last - __first) / 2;
std::__inplace_stable_sort(__first, __middle, __comp);
std::__inplace_stable_sort(__middle, __last, __comp);
std::__merge_without_buffer(__first, __middle, __last,
__middle - __first,
__last - __middle,
__comp);
}
#pragma line 3513 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2>
bool
includes(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (*__first2 < *__first1)
return false;
else if(*__first1 < *__first2)
++__first1;
else
++__first1, ++__first2;
#pragma empty_line
return __first2 == __last2;
}
#pragma line 3562 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _Compare>
bool
includes(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first2, *__first1))
return false;
else if(__comp(*__first1, *__first2))
++__first1;
else
++__first1, ++__first2;
#pragma empty_line
return __first2 == __last2;
}
#pragma line 3617 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator>
bool
next_permutation(_BidirectionalIterator __first,
_BidirectionalIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return false;
_BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
#pragma empty_line
for(;;)
{
_BidirectionalIterator __ii = __i;
--__i;
if (*__i < *__ii)
{
_BidirectionalIterator __j = __last;
while (!(*__i < *--__j))
{}
std::iter_swap(__i, __j);
std::reverse(__ii, __last);
return true;
}
if (__i == __first)
{
std::reverse(__first, __last);
return false;
}
}
}
#pragma line 3674 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator, typename _Compare>
bool
next_permutation(_BidirectionalIterator __first,
_BidirectionalIterator __last, _Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return false;
_BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
#pragma empty_line
for(;;)
{
_BidirectionalIterator __ii = __i;
--__i;
if (__comp(*__i, *__ii))
{
_BidirectionalIterator __j = __last;
while (!bool(__comp(*__i, *--__j)))
{}
std::iter_swap(__i, __j);
std::reverse(__ii, __last);
return true;
}
if (__i == __first)
{
std::reverse(__first, __last);
return false;
}
}
}
#pragma line 3730 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator>
bool
prev_permutation(_BidirectionalIterator __first,
_BidirectionalIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return false;
_BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
#pragma empty_line
for(;;)
{
_BidirectionalIterator __ii = __i;
--__i;
if (*__ii < *__i)
{
_BidirectionalIterator __j = __last;
while (!(*--__j < *__i))
{}
std::iter_swap(__i, __j);
std::reverse(__ii, __last);
return true;
}
if (__i == __first)
{
std::reverse(__first, __last);
return false;
}
}
}
#pragma line 3787 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _BidirectionalIterator, typename _Compare>
bool
prev_permutation(_BidirectionalIterator __first,
_BidirectionalIterator __last, _Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return false;
_BidirectionalIterator __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
#pragma empty_line
for(;;)
{
_BidirectionalIterator __ii = __i;
--__i;
if (__comp(*__ii, *__i))
{
_BidirectionalIterator __j = __last;
while (!bool(__comp(*--__j, *__i)))
{}
std::iter_swap(__i, __j);
std::reverse(__ii, __last);
return true;
}
if (__i == __first)
{
std::reverse(__first, __last);
return false;
}
}
}
#pragma line 3847 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator, typename _Tp>
_OutputIterator
replace_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result,
const _Tp& __old_value, const _Tp& __new_value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first, ++__result)
if (*__first == __old_value)
*__result = __new_value;
else
*__result = *__first;
return __result;
}
#pragma line 3884 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator,
typename _Predicate, typename _Tp>
_OutputIterator
replace_copy_if(_InputIterator __first, _InputIterator __last,
_OutputIterator __result,
_Predicate __pred, const _Tp& __new_value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first, ++__result)
if (__pred(*__first))
*__result = __new_value;
else
*__result = *__first;
return __result;
}
#pragma line 4355 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 4371 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _Function>
_Function
for_each(_InputIterator __first, _InputIterator __last, _Function __f)
{
#pragma empty_line
#pragma empty_line
;
for (; __first != __last; ++__first)
__f(*__first);
return (__f);
}
#pragma line 4392 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _Tp>
inline _InputIterator
find(_InputIterator __first, _InputIterator __last,
const _Tp& __val)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
return std::__find(__first, __last, __val,
std::__iterator_category(__first));
}
#pragma line 4416 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _Predicate>
inline _InputIterator
find_if(_InputIterator __first, _InputIterator __last,
_Predicate __pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
return std::__find_if(__first, __last, __pred,
std::__iterator_category(__first));
}
#pragma line 4445 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _ForwardIterator>
_InputIterator
find_first_of(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2, _ForwardIterator __last2)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
for (; __first1 != __last1; ++__first1)
for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
if (*__first1 == *__iter)
return __first1;
return __last1;
}
#pragma line 4484 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _ForwardIterator,
typename _BinaryPredicate>
_InputIterator
find_first_of(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2, _ForwardIterator __last2,
_BinaryPredicate __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
for (; __first1 != __last1; ++__first1)
for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
if (__comp(*__first1, *__iter))
return __first1;
return __last1;
}
#pragma line 4516 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator>
_ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
if (__first == __last)
return __last;
_ForwardIterator __next = __first;
while(++__next != __last)
{
if (*__first == *__next)
return __first;
__first = __next;
}
return __last;
}
#pragma line 4548 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _BinaryPredicate>
_ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
_BinaryPredicate __binary_pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
if (__first == __last)
return __last;
_ForwardIterator __next = __first;
while(++__next != __last)
{
if (__binary_pred(*__first, *__next))
return __first;
__first = __next;
}
return __last;
}
#pragma line 4580 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _Tp>
typename iterator_traits<_InputIterator>::difference_type
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
typename iterator_traits<_InputIterator>::difference_type __n = 0;
for (; __first != __last; ++__first)
if (*__first == __value)
++__n;
return __n;
}
#pragma line 4605 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _Predicate>
typename iterator_traits<_InputIterator>::difference_type
count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
typename iterator_traits<_InputIterator>::difference_type __n = 0;
for (; __first != __last; ++__first)
if (__pred(*__first))
++__n;
return __n;
}
#pragma line 4645 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator1
search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
#pragma empty_line
if (__first1 == __last1 || __first2 == __last2)
return __first1;
#pragma empty_line
#pragma empty_line
_ForwardIterator2 __p1(__first2);
if (++__p1 == __last2)
return std::find(__first1, __last1, *__first2);
#pragma empty_line
#pragma empty_line
_ForwardIterator2 __p;
_ForwardIterator1 __current = __first1;
#pragma empty_line
for (;;)
{
__first1 = std::find(__first1, __last1, *__first2);
if (__first1 == __last1)
return __last1;
#pragma empty_line
__p = __p1;
__current = __first1;
if (++__current == __last1)
return __last1;
#pragma empty_line
while (*__current == *__p)
{
if (++__p == __last2)
return __first1;
if (++__current == __last1)
return __last1;
}
++__first1;
}
return __first1;
}
#pragma line 4716 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator1, typename _ForwardIterator2,
typename _BinaryPredicate>
_ForwardIterator1
search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
_BinaryPredicate __predicate)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
#pragma empty_line
if (__first1 == __last1 || __first2 == __last2)
return __first1;
#pragma empty_line
#pragma empty_line
_ForwardIterator2 __p1(__first2);
if (++__p1 == __last2)
{
while (__first1 != __last1
&& !bool(__predicate(*__first1, *__first2)))
++__first1;
return __first1;
}
#pragma empty_line
#pragma empty_line
_ForwardIterator2 __p;
_ForwardIterator1 __current = __first1;
#pragma empty_line
for (;;)
{
while (__first1 != __last1
&& !bool(__predicate(*__first1, *__first2)))
++__first1;
if (__first1 == __last1)
return __last1;
#pragma empty_line
__p = __p1;
__current = __first1;
if (++__current == __last1)
return __last1;
#pragma empty_line
while (__predicate(*__current, *__p))
{
if (++__p == __last2)
return __first1;
if (++__current == __last1)
return __last1;
}
++__first1;
}
return __first1;
}
#pragma line 4790 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Integer, typename _Tp>
_ForwardIterator
search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__count <= 0)
return __first;
if (__count == 1)
return std::find(__first, __last, __val);
return std::__search_n(__first, __last, __count, __val,
std::__iterator_category(__first));
}
#pragma line 4826 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Integer, typename _Tp,
typename _BinaryPredicate>
_ForwardIterator
search_n(_ForwardIterator __first, _ForwardIterator __last,
_Integer __count, const _Tp& __val,
_BinaryPredicate __binary_pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__count <= 0)
return __first;
if (__count == 1)
{
while (__first != __last && !bool(__binary_pred(*__first, __val)))
++__first;
return __first;
}
return std::__search_n(__first, __last, __count, __val, __binary_pred,
std::__iterator_category(__first));
}
#pragma line 4868 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator,
typename _UnaryOperation>
_OutputIterator
transform(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _UnaryOperation __unary_op)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first, ++__result)
*__result = __unary_op(*__first);
return __result;
}
#pragma line 4904 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _BinaryOperation>
_OutputIterator
transform(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _OutputIterator __result,
_BinaryOperation __binary_op)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first1 != __last1; ++__first1, ++__first2, ++__result)
*__result = __binary_op(*__first1, *__first2);
return __result;
}
#pragma line 4937 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Tp>
void
replace(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __old_value, const _Tp& __new_value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first)
if (*__first == __old_value)
*__first = __new_value;
}
#pragma line 4969 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Predicate, typename _Tp>
void
replace_if(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred, const _Tp& __new_value)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first)
if (__pred(*__first))
*__first = __new_value;
}
#pragma line 5001 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Generator>
void
generate(_ForwardIterator __first, _ForwardIterator __last,
_Generator __gen)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
for (; __first != __last; ++__first)
*__first = __gen();
}
#pragma line 5032 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _OutputIterator, typename _Size, typename _Generator>
_OutputIterator
generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __gen();
return __first;
}
#pragma line 5069 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator>
inline _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return __result;
return std::__unique_copy(__first, __last, __result,
std::__iterator_category(__first),
std::__iterator_category(__result));
}
#pragma line 5108 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator, typename _OutputIterator,
typename _BinaryPredicate>
inline _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result,
_BinaryPredicate __binary_pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return __result;
return std::__unique_copy(__first, __last, __result, __binary_pred,
std::__iterator_category(__first),
std::__iterator_category(__result));
}
#pragma line 5140 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator>
inline void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first != __last)
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
}
#pragma line 5168 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#pragma empty_line
#pragma empty_line
#pragma empty_line
_RandomNumberGenerator& __rand)
#pragma empty_line
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return;
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
std::iter_swap(__i, __first + __rand((__i - __first) + 1));
}
#pragma line 5204 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Predicate>
inline _ForwardIterator
partition(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
return std::__partition(__first, __last, __pred,
std::__iterator_category(__first));
}
#pragma line 5238 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator>
inline void
partial_sort(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
std::__heap_select(__first, __middle, __last);
std::sort_heap(__first, __middle);
}
#pragma line 5277 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator, typename _Compare>
inline void
partial_sort(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last,
_Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
std::__heap_select(__first, __middle, __last, __comp);
std::sort_heap(__first, __middle, __comp);
}
#pragma line 5315 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator>
inline void
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
_RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
if (__first == __last || __nth == __last)
return;
#pragma empty_line
std::__introselect(__first, __nth, __last,
std::__lg(__last - __first) * 2);
}
#pragma line 5354 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator, typename _Compare>
inline void
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
_RandomAccessIterator __last, _Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
if (__first == __last || __nth == __last)
return;
#pragma empty_line
std::__introselect(__first, __nth, __last,
std::__lg(__last - __first) * 2, __comp);
}
#pragma line 5392 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator>
inline void
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first != __last)
{
std::__introsort_loop(__first, __last,
std::__lg(__last - __first) * 2);
std::__final_insertion_sort(__first, __last);
}
}
#pragma line 5428 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator, typename _Compare>
inline void
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first != __last)
{
std::__introsort_loop(__first, __last,
std::__lg(__last - __first) * 2, __comp);
std::__final_insertion_sort(__first, __last, __comp);
}
}
#pragma line 5469 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
_OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
{
if (*__first2 < *__first1)
{
*__result = *__first2;
++__first2;
}
else
{
*__result = *__first1;
++__first1;
}
++__result;
}
return std::copy(__first2, __last2, std::copy(__first1, __last1,
__result));
}
#pragma line 5532 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
_OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
{
if (__comp(*__first2, *__first1))
{
*__result = *__first2;
++__first2;
}
else
{
*__result = *__first1;
++__first1;
}
++__result;
}
return std::copy(__first2, __last2, std::copy(__first1, __last1,
__result));
}
#pragma line 5592 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator>
inline void
stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
_Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
__last);
if (__buf.begin() == 0)
std::__inplace_stable_sort(__first, __last);
else
std::__stable_sort_adaptive(__first, __last, __buf.begin(),
_DistanceType(__buf.size()));
}
#pragma line 5634 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _RandomAccessIterator, typename _Compare>
inline void
stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::value_type
_ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
_DistanceType;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
_Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
__last);
if (__buf.begin() == 0)
std::__inplace_stable_sort(__first, __last, __comp);
else
std::__stable_sort_adaptive(__first, __last, __buf.begin(),
_DistanceType(__buf.size()), __comp);
}
#pragma line 5680 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
_OutputIterator
set_union(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
{
if (*__first1 < *__first2)
{
*__result = *__first1;
++__first1;
}
else if (*__first2 < *__first1)
{
*__result = *__first2;
++__first2;
}
else
{
*__result = *__first1;
++__first1;
++__first2;
}
++__result;
}
return std::copy(__first2, __last2, std::copy(__first1, __last1,
__result));
}
#pragma line 5747 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
_OutputIterator
set_union(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
{
if (__comp(*__first1, *__first2))
{
*__result = *__first1;
++__first1;
}
else if (__comp(*__first2, *__first1))
{
*__result = *__first2;
++__first2;
}
else
{
*__result = *__first1;
++__first1;
++__first2;
}
++__result;
}
return std::copy(__first2, __last2, std::copy(__first1, __last1,
__result));
}
#pragma line 5814 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
_OutputIterator
set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
++__first1;
else if (*__first2 < *__first1)
++__first2;
else
{
*__result = *__first1;
++__first1;
++__first2;
++__result;
}
return __result;
}
#pragma line 5871 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
_OutputIterator
set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
++__first1;
else if (__comp(*__first2, *__first1))
++__first2;
else
{
*__result = *__first1;
++__first1;
++__first2;
++__result;
}
return __result;
}
#pragma line 5929 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
_OutputIterator
set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
{
*__result = *__first1;
++__first1;
++__result;
}
else if (*__first2 < *__first1)
++__first2;
else
{
++__first1;
++__first2;
}
return std::copy(__first1, __last1, __result);
}
#pragma line 5990 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
_OutputIterator
set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
{
*__result = *__first1;
++__first1;
++__result;
}
else if (__comp(*__first2, *__first1))
++__first2;
else
{
++__first1;
++__first2;
}
return std::copy(__first1, __last1, __result);
}
#pragma line 6048 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator>
_OutputIterator
set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
{
*__result = *__first1;
++__first1;
++__result;
}
else if (*__first2 < *__first1)
{
*__result = *__first2;
++__first2;
++__result;
}
else
{
++__first1;
++__first2;
}
return std::copy(__first2, __last2, std::copy(__first1,
__last1, __result));
}
#pragma line 6114 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _OutputIterator, typename _Compare>
_OutputIterator
set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result,
_Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_InputIterator2>::value_type
_ValueType2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
;
#pragma empty_line
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
{
*__result = *__first1;
++__first1;
++__result;
}
else if (__comp(*__first2, *__first1))
{
*__result = *__first2;
++__first2;
++__result;
}
else
{
++__first1;
++__first2;
}
return std::copy(__first2, __last2,
std::copy(__first1, __last1, __result));
}
#pragma line 6171 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator>
_ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return __first;
_ForwardIterator __result = __first;
while (++__first != __last)
if (*__first < *__result)
__result = __first;
return __result;
}
#pragma line 6199 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Compare>
_ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last,
_Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return __first;
_ForwardIterator __result = __first;
while (++__first != __last)
if (__comp(*__first, *__result))
__result = __first;
return __result;
}
#pragma line 6227 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator>
_ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last)
return __first;
_ForwardIterator __result = __first;
while (++__first != __last)
if (*__result < *__first)
__result = __first;
return __result;
}
#pragma line 6255 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h" 3
template<typename _ForwardIterator, typename _Compare>
_ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last,
_Compare __comp)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
#pragma empty_line
if (__first == __last) return __first;
_ForwardIterator __result = __first;
while (++__first != __last)
if (__comp(*__result, *__first))
__result = __first;
return __result;
}
#pragma empty_line
#pragma empty_line
}
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/algorithm" 2 3
#pragma line 199 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 2
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/climits" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/climits" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/climits" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/limits.h" 1 3
#pragma line 44 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/climits" 2 3
#pragma line 202 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cmath" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cmath" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cmath" 3
#pragma line 77 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cmath" 3
namespace std
{
#pragma empty_line
#pragma empty_line
inline double
abs(double __x)
{ return __builtin_fabs(__x); }
#pragma empty_line
inline float
abs(float __x)
{ return __builtin_fabsf(__x); }
#pragma empty_line
inline long double
abs(long double __x)
{ return __builtin_fabsl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
abs(_Tp __x)
{ return __builtin_fabs(__x); }
#pragma empty_line
using ::acos;
#pragma empty_line
inline float
acos(float __x)
{ return __builtin_acosf(__x); }
#pragma empty_line
inline long double
acos(long double __x)
{ return __builtin_acosl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
acos(_Tp __x)
{ return __builtin_acos(__x); }
#pragma empty_line
using ::asin;
#pragma empty_line
inline float
asin(float __x)
{ return __builtin_asinf(__x); }
#pragma empty_line
inline long double
asin(long double __x)
{ return __builtin_asinl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
asin(_Tp __x)
{ return __builtin_asin(__x); }
#pragma empty_line
using ::atan;
#pragma empty_line
inline float
atan(float __x)
{ return __builtin_atanf(__x); }
#pragma empty_line
inline long double
atan(long double __x)
{ return __builtin_atanl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
atan(_Tp __x)
{ return __builtin_atan(__x); }
#pragma empty_line
using ::atan2;
#pragma empty_line
inline float
atan2(float __y, float __x)
{ return __builtin_atan2f(__y, __x); }
#pragma empty_line
inline long double
atan2(long double __y, long double __x)
{ return __builtin_atan2l(__y, __x); }
#pragma empty_line
template<typename _Tp, typename _Up>
inline
typename __gnu_cxx::__promote_2<
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
&& __is_arithmetic<_Up>::__value,
_Tp>::__type, _Up>::__type
atan2(_Tp __y, _Up __x)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
return atan2(__type(__y), __type(__x));
}
#pragma empty_line
using ::ceil;
#pragma empty_line
inline float
ceil(float __x)
{ return __builtin_ceilf(__x); }
#pragma empty_line
inline long double
ceil(long double __x)
{ return __builtin_ceill(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
ceil(_Tp __x)
{ return __builtin_ceil(__x); }
#pragma empty_line
using ::cos;
#pragma empty_line
inline float
cos(float __x)
{ return __builtin_cosf(__x); }
#pragma empty_line
inline long double
cos(long double __x)
{ return __builtin_cosl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
cos(_Tp __x)
{ return __builtin_cos(__x); }
#pragma empty_line
using ::cosh;
#pragma empty_line
inline float
cosh(float __x)
{ return __builtin_coshf(__x); }
#pragma empty_line
inline long double
cosh(long double __x)
{ return __builtin_coshl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
cosh(_Tp __x)
{ return __builtin_cosh(__x); }
#pragma empty_line
using ::exp;
#pragma empty_line
inline float
exp(float __x)
{ return __builtin_expf(__x); }
#pragma empty_line
inline long double
exp(long double __x)
{ return __builtin_expl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
exp(_Tp __x)
{ return __builtin_exp(__x); }
#pragma empty_line
using ::fabs;
#pragma empty_line
inline float
fabs(float __x)
{ return __builtin_fabsf(__x); }
#pragma empty_line
inline long double
fabs(long double __x)
{ return __builtin_fabsl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
fabs(_Tp __x)
{ return __builtin_fabs(__x); }
#pragma empty_line
using ::floor;
#pragma empty_line
inline float
floor(float __x)
{ return __builtin_floorf(__x); }
#pragma empty_line
inline long double
floor(long double __x)
{ return __builtin_floorl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
floor(_Tp __x)
{ return __builtin_floor(__x); }
#pragma empty_line
using ::fmod;
#pragma empty_line
inline float
fmod(float __x, float __y)
{ return __builtin_fmodf(__x, __y); }
#pragma empty_line
inline long double
fmod(long double __x, long double __y)
{ return __builtin_fmodl(__x, __y); }
#pragma empty_line
using ::frexp;
#pragma empty_line
inline float
frexp(float __x, int* __exp)
{ return __builtin_frexpf(__x, __exp); }
#pragma empty_line
inline long double
frexp(long double __x, int* __exp)
{ return __builtin_frexpl(__x, __exp); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
frexp(_Tp __x, int* __exp)
{ return __builtin_frexp(__x, __exp); }
#pragma empty_line
using ::ldexp;
#pragma empty_line
inline float
ldexp(float __x, int __exp)
{ return __builtin_ldexpf(__x, __exp); }
#pragma empty_line
inline long double
ldexp(long double __x, int __exp)
{ return __builtin_ldexpl(__x, __exp); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
ldexp(_Tp __x, int __exp)
{ return __builtin_ldexp(__x, __exp); }
#pragma empty_line
using ::log;
#pragma empty_line
inline float
log(float __x)
{ return __builtin_logf(__x); }
#pragma empty_line
inline long double
log(long double __x)
{ return __builtin_logl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
log(_Tp __x)
{ return __builtin_log(__x); }
#pragma empty_line
using ::log10;
#pragma empty_line
inline float
log10(float __x)
{ return __builtin_log10f(__x); }
#pragma empty_line
inline long double
log10(long double __x)
{ return __builtin_log10l(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
log10(_Tp __x)
{ return __builtin_log10(__x); }
#pragma empty_line
using ::modf;
#pragma empty_line
inline float
modf(float __x, float* __iptr)
{ return __builtin_modff(__x, __iptr); }
#pragma empty_line
inline long double
modf(long double __x, long double* __iptr)
{ return __builtin_modfl(__x, __iptr); }
#pragma empty_line
using ::pow;
#pragma empty_line
inline float
pow(float __x, float __y)
{ return __builtin_powf(__x, __y); }
#pragma empty_line
inline long double
pow(long double __x, long double __y)
{ return __builtin_powl(__x, __y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline double
pow(double __x, int __i)
{ return __builtin_powi(__x, __i); }
#pragma empty_line
inline float
pow(float __x, int __n)
{ return __builtin_powif(__x, __n); }
#pragma empty_line
inline long double
pow(long double __x, int __n)
{ return __builtin_powil(__x, __n); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Up>
inline
typename __gnu_cxx::__promote_2<
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
&& __is_arithmetic<_Up>::__value,
_Tp>::__type, _Up>::__type
pow(_Tp __x, _Up __y)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
return pow(__type(__x), __type(__y));
}
#pragma empty_line
using ::sin;
#pragma empty_line
inline float
sin(float __x)
{ return __builtin_sinf(__x); }
#pragma empty_line
inline long double
sin(long double __x)
{ return __builtin_sinl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sin(_Tp __x)
{ return __builtin_sin(__x); }
#pragma empty_line
using ::sinh;
#pragma empty_line
inline float
sinh(float __x)
{ return __builtin_sinhf(__x); }
#pragma empty_line
inline long double
sinh(long double __x)
{ return __builtin_sinhl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sinh(_Tp __x)
{ return __builtin_sinh(__x); }
#pragma empty_line
using ::sqrt;
#pragma empty_line
inline float
sqrt(float __x)
{ return __builtin_sqrtf(__x); }
#pragma empty_line
inline long double
sqrt(long double __x)
{ return __builtin_sqrtl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sqrt(_Tp __x)
{ return __builtin_sqrt(__x); }
#pragma empty_line
using ::tan;
#pragma empty_line
inline float
tan(float __x)
{ return __builtin_tanf(__x); }
#pragma empty_line
inline long double
tan(long double __x)
{ return __builtin_tanl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
tan(_Tp __x)
{ return __builtin_tan(__x); }
#pragma empty_line
using ::tanh;
#pragma empty_line
inline float
tanh(float __x)
{ return __builtin_tanhf(__x); }
#pragma empty_line
inline long double
tanh(long double __x)
{ return __builtin_tanhl(__x); }
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
tanh(_Tp __x)
{ return __builtin_tanh(__x); }
#pragma empty_line
#pragma empty_line
}
#pragma line 487 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cmath" 3
namespace std
{
#pragma empty_line
#pragma line 737 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cmath" 3
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
fpclassify(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400,
(0x0400 | 0x4000), 0x4000, __type(__f));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isfinite(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isfinite(__type(__f));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isinf(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isinf(__type(__f));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isnan(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isnan(__type(__f));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isnormal(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isnormal(__type(__f));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
signbit(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_signbit(__type(__f));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isgreater(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isgreater(__type(__f1), __type(__f2));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isgreaterequal(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isgreaterequal(__type(__f1), __type(__f2));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isless(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isless(__type(__f1), __type(__f2));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
islessequal(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_islessequal(__type(__f1), __type(__f2));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
islessgreater(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_islessgreater(__type(__f1), __type(__f2));
}
#pragma empty_line
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isunordered(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isunordered(__type(__f1), __type(__f2));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 203 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 1 3
#pragma line 41 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 3
#pragma empty_line
#pragma line 42 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cstring" 3
#pragma line 204 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h" 2
#pragma line 280 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
class half;
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace detail
{
#pragma line 299 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<bool,typename T,typename> struct conditional { typedef T type; };
template<typename T,typename F> struct conditional<false,T,F> { typedef F type; };
#pragma empty_line
#pragma empty_line
template<bool> struct bool_type {};
typedef bool_type<true> true_type;
typedef bool_type<false> false_type;
#pragma empty_line
#pragma empty_line
template<typename> struct is_float : false_type {};
template<typename T> struct is_float<const T> : is_float<T> {};
template<typename T> struct is_float<volatile T> : is_float<T> {};
template<typename T> struct is_float<const volatile T> : is_float<T> {};
template<> struct is_float<float> : true_type {};
template<> struct is_float<double> : true_type {};
template<> struct is_float<long double> : true_type {};
#pragma line 328 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
typedef unsigned short uint16;
#pragma empty_line
#pragma empty_line
typedef conditional<std::numeric_limits<unsigned int>::digits>=32,unsigned int,unsigned long>::type uint32;
#pragma empty_line
#pragma empty_line
typedef conditional<std::numeric_limits<int>::digits>=16,int,long>::type int17;
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct binary_t {};
#pragma empty_line
#pragma empty_line
const binary_t binary = binary_t();
#pragma empty_line
#pragma empty_line
#pragma empty_line
struct expr
{
#pragma empty_line
#pragma empty_line
explicit expr(float f) : value_(f) {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
operator float() const { return value_; }
#pragma empty_line
private:
#pragma empty_line
float value_;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename,typename=void,typename=void> struct enable {};
template<typename T> struct enable<T,half,void,void> { typedef T type; };
template<typename T> struct enable<T,expr,void,void> { typedef T type; };
#pragma empty_line
template<typename T> struct enable<T,half,half,void> { typedef half type; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> struct enable<T,half,expr,void> { typedef T type; };
template<typename T> struct enable<T,expr,half,void> { typedef T type; };
template<typename T> struct enable<T,expr,expr,void> { typedef T type; };
template<typename T> struct enable<T,half,half,half> { typedef T type; };
template<typename T> struct enable<T,half,half,expr> { typedef T type; };
template<typename T> struct enable<T,half,expr,half> { typedef T type; };
template<typename T> struct enable<T,half,expr,expr> { typedef T type; };
template<typename T> struct enable<T,expr,half,half> { typedef T type; };
template<typename T> struct enable<T,expr,half,expr> { typedef T type; };
template<typename T> struct enable<T,expr,expr,half> { typedef T type; };
template<typename T> struct enable<T,expr,expr,expr> { typedef T type; };
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> struct result : enable<expr,T,U> {};
template<> struct result<half,half> { typedef half type; };
#pragma line 400 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T> bool builtin_isinf(T arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return arg == std::numeric_limits<T>::infinity() || arg == -std::numeric_limits<T>::infinity();
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> bool builtin_isnan(T arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return arg != arg;
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> bool builtin_signbit(T arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return arg < T() || (arg == T() && T(1)/arg < T());
#pragma empty_line
}
#pragma line 450 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<std::float_round_style R> uint16 float2half_impl(float value, true_type)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const uint16 base_table[512] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100,
0x0200, 0x0400, 0x0800, 0x0C00, 0x1000, 0x1400, 0x1800, 0x1C00, 0x2000, 0x2400, 0x2800, 0x2C00, 0x3000, 0x3400, 0x3800, 0x3C00,
0x4000, 0x4400, 0x4800, 0x4C00, 0x5000, 0x5400, 0x5800, 0x5C00, 0x6000, 0x6400, 0x6800, 0x6C00, 0x7000, 0x7400, 0x7800, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00, 0x7C00,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8001, 0x8002, 0x8004, 0x8008, 0x8010, 0x8020, 0x8040, 0x8080, 0x8100,
0x8200, 0x8400, 0x8800, 0x8C00, 0x9000, 0x9400, 0x9800, 0x9C00, 0xA000, 0xA400, 0xA800, 0xAC00, 0xB000, 0xB400, 0xB800, 0xBC00,
0xC000, 0xC400, 0xC800, 0xCC00, 0xD000, 0xD400, 0xD800, 0xDC00, 0xE000, 0xE400, 0xE800, 0xEC00, 0xF000, 0xF400, 0xF800, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00,
0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00, 0xFC00 };
static const unsigned char shift_table[512] = {
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13 };
uint32 bits;
std::memcpy(&bits, &value, sizeof(float));
uint16 hbits = base_table[bits>>23] + static_cast<uint16>((bits&0x7FFFFF)>>shift_table[bits>>23]);
if(R == std::round_to_nearest)
hbits += (((bits&0x7FFFFF)>>(shift_table[bits>>23]-1))|(((bits>>23)&0xFF)==102)) & ((hbits&0x7C00)!=0x7C00)
#pragma empty_line
& (((((static_cast<uint32>(1)<<(shift_table[bits>>23]-1))-1)&bits)!=0)|hbits)
#pragma empty_line
;
else if(R == std::round_toward_zero)
hbits -= ((hbits&0x7FFF)==0x7C00) & ~shift_table[bits>>23];
else if(R == std::round_toward_infinity)
hbits += ((((bits&0x7FFFFF&((static_cast<uint32>(1)<<(shift_table[bits>>23]))-1))!=0)|(((bits>>23)<=102)&
((bits>>23)!=0)))&(hbits<0x7C00)) - ((hbits==0xFC00)&((bits>>23)!=511));
else if(R == std::round_toward_neg_infinity)
hbits += ((((bits&0x7FFFFF&((static_cast<uint32>(1)<<(shift_table[bits>>23]))-1))!=0)|(((bits>>23)<=358)&
((bits>>23)!=256)))&(hbits<0xFC00)&(hbits>>15)) - ((hbits==0x7C00)&((bits>>23)!=255));
return hbits;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R> uint16 float2half_impl(float value, false_type)
{
uint16 hbits = builtin_signbit(value) << 15;
if(value == 0.0f)
return hbits;
if(builtin_isnan(value))
return hbits | 0x7FFF;
if(builtin_isinf(value))
return hbits | 0x7C00;
int exp;
std::frexp(value, &exp);
if(exp > 16)
{
if(R == std::round_toward_zero)
return hbits | 0x7BFF;
else if(R == std::round_toward_infinity)
return hbits | 0x7C00 - (hbits>>15);
else if(R == std::round_toward_neg_infinity)
return hbits | 0x7BFF + (hbits>>15);
return hbits | 0x7C00;
}
if(exp < -13)
value = std::ldexp(value, 24);
else
{
value = std::ldexp(value, 11-exp);
hbits |= ((exp+14)<<10);
}
int ival = static_cast<int>(value);
hbits |= static_cast<uint16>(std::abs(ival)&0x3FF);
if(R == std::round_to_nearest)
{
float diff = std::abs(value-static_cast<float>(ival));
#pragma empty_line
hbits += (diff>0.5f) | ((diff==0.5f)&hbits);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
else if(R == std::round_toward_infinity)
hbits += value > static_cast<float>(ival);
else if(R == std::round_toward_neg_infinity)
hbits += value < static_cast<float>(ival);
return hbits;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R> uint16 float2half(float value)
{
return float2half_impl<R>(value, bool_type<std::numeric_limits<float>::is_iec559&&sizeof(uint32)==sizeof(float)>());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R,bool S,typename T> uint16 int2half_impl(T value)
{
if(S)
value = -value;
uint16 bits = S << 15;
if(value > 65504)
{
if(R == std::round_toward_infinity)
bits |= 0x7C00 - S;
else if(R == std::round_toward_neg_infinity)
bits |= 0x7BFF + S;
else
bits |= 0x7BFF + (R!=std::round_toward_zero);
}
else if(value)
{
unsigned int m = value, exp = 25;
for(; m<0x400; m<<=1,--exp) ;
for(; m>0x7FF; m>>=1,++exp) ;
bits |= (exp<<10) | (m&0x3FF);
if(exp > 25)
{
if(R == std::round_to_nearest)
bits += (value>>(exp-26)) & 1
#pragma empty_line
& (((((1<<(exp-26))-1)&value)!=0)|bits)
#pragma empty_line
;
else if(R == std::round_toward_infinity)
bits += ((value&((1<<(exp-25))-1))!=0) & !S;
else if(R == std::round_toward_neg_infinity)
bits += ((value&((1<<(exp-25))-1))!=0) & S;
}
}
return bits;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R,typename T> uint16 int2half(T value)
{
return (value<0) ? int2half_impl<R,true>(value) : int2half_impl<R,false>(value);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float half2float_impl(uint16 value, true_type)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const uint32 mantissa_table[2048] = {
0x00000000, 0x33800000, 0x34000000, 0x34400000, 0x34800000, 0x34A00000, 0x34C00000, 0x34E00000, 0x35000000, 0x35100000, 0x35200000, 0x35300000, 0x35400000, 0x35500000, 0x35600000, 0x35700000,
0x35800000, 0x35880000, 0x35900000, 0x35980000, 0x35A00000, 0x35A80000, 0x35B00000, 0x35B80000, 0x35C00000, 0x35C80000, 0x35D00000, 0x35D80000, 0x35E00000, 0x35E80000, 0x35F00000, 0x35F80000,
0x36000000, 0x36040000, 0x36080000, 0x360C0000, 0x36100000, 0x36140000, 0x36180000, 0x361C0000, 0x36200000, 0x36240000, 0x36280000, 0x362C0000, 0x36300000, 0x36340000, 0x36380000, 0x363C0000,
0x36400000, 0x36440000, 0x36480000, 0x364C0000, 0x36500000, 0x36540000, 0x36580000, 0x365C0000, 0x36600000, 0x36640000, 0x36680000, 0x366C0000, 0x36700000, 0x36740000, 0x36780000, 0x367C0000,
0x36800000, 0x36820000, 0x36840000, 0x36860000, 0x36880000, 0x368A0000, 0x368C0000, 0x368E0000, 0x36900000, 0x36920000, 0x36940000, 0x36960000, 0x36980000, 0x369A0000, 0x369C0000, 0x369E0000,
0x36A00000, 0x36A20000, 0x36A40000, 0x36A60000, 0x36A80000, 0x36AA0000, 0x36AC0000, 0x36AE0000, 0x36B00000, 0x36B20000, 0x36B40000, 0x36B60000, 0x36B80000, 0x36BA0000, 0x36BC0000, 0x36BE0000,
0x36C00000, 0x36C20000, 0x36C40000, 0x36C60000, 0x36C80000, 0x36CA0000, 0x36CC0000, 0x36CE0000, 0x36D00000, 0x36D20000, 0x36D40000, 0x36D60000, 0x36D80000, 0x36DA0000, 0x36DC0000, 0x36DE0000,
0x36E00000, 0x36E20000, 0x36E40000, 0x36E60000, 0x36E80000, 0x36EA0000, 0x36EC0000, 0x36EE0000, 0x36F00000, 0x36F20000, 0x36F40000, 0x36F60000, 0x36F80000, 0x36FA0000, 0x36FC0000, 0x36FE0000,
0x37000000, 0x37010000, 0x37020000, 0x37030000, 0x37040000, 0x37050000, 0x37060000, 0x37070000, 0x37080000, 0x37090000, 0x370A0000, 0x370B0000, 0x370C0000, 0x370D0000, 0x370E0000, 0x370F0000,
0x37100000, 0x37110000, 0x37120000, 0x37130000, 0x37140000, 0x37150000, 0x37160000, 0x37170000, 0x37180000, 0x37190000, 0x371A0000, 0x371B0000, 0x371C0000, 0x371D0000, 0x371E0000, 0x371F0000,
0x37200000, 0x37210000, 0x37220000, 0x37230000, 0x37240000, 0x37250000, 0x37260000, 0x37270000, 0x37280000, 0x37290000, 0x372A0000, 0x372B0000, 0x372C0000, 0x372D0000, 0x372E0000, 0x372F0000,
0x37300000, 0x37310000, 0x37320000, 0x37330000, 0x37340000, 0x37350000, 0x37360000, 0x37370000, 0x37380000, 0x37390000, 0x373A0000, 0x373B0000, 0x373C0000, 0x373D0000, 0x373E0000, 0x373F0000,
0x37400000, 0x37410000, 0x37420000, 0x37430000, 0x37440000, 0x37450000, 0x37460000, 0x37470000, 0x37480000, 0x37490000, 0x374A0000, 0x374B0000, 0x374C0000, 0x374D0000, 0x374E0000, 0x374F0000,
0x37500000, 0x37510000, 0x37520000, 0x37530000, 0x37540000, 0x37550000, 0x37560000, 0x37570000, 0x37580000, 0x37590000, 0x375A0000, 0x375B0000, 0x375C0000, 0x375D0000, 0x375E0000, 0x375F0000,
0x37600000, 0x37610000, 0x37620000, 0x37630000, 0x37640000, 0x37650000, 0x37660000, 0x37670000, 0x37680000, 0x37690000, 0x376A0000, 0x376B0000, 0x376C0000, 0x376D0000, 0x376E0000, 0x376F0000,
0x37700000, 0x37710000, 0x37720000, 0x37730000, 0x37740000, 0x37750000, 0x37760000, 0x37770000, 0x37780000, 0x37790000, 0x377A0000, 0x377B0000, 0x377C0000, 0x377D0000, 0x377E0000, 0x377F0000,
0x37800000, 0x37808000, 0x37810000, 0x37818000, 0x37820000, 0x37828000, 0x37830000, 0x37838000, 0x37840000, 0x37848000, 0x37850000, 0x37858000, 0x37860000, 0x37868000, 0x37870000, 0x37878000,
0x37880000, 0x37888000, 0x37890000, 0x37898000, 0x378A0000, 0x378A8000, 0x378B0000, 0x378B8000, 0x378C0000, 0x378C8000, 0x378D0000, 0x378D8000, 0x378E0000, 0x378E8000, 0x378F0000, 0x378F8000,
0x37900000, 0x37908000, 0x37910000, 0x37918000, 0x37920000, 0x37928000, 0x37930000, 0x37938000, 0x37940000, 0x37948000, 0x37950000, 0x37958000, 0x37960000, 0x37968000, 0x37970000, 0x37978000,
0x37980000, 0x37988000, 0x37990000, 0x37998000, 0x379A0000, 0x379A8000, 0x379B0000, 0x379B8000, 0x379C0000, 0x379C8000, 0x379D0000, 0x379D8000, 0x379E0000, 0x379E8000, 0x379F0000, 0x379F8000,
0x37A00000, 0x37A08000, 0x37A10000, 0x37A18000, 0x37A20000, 0x37A28000, 0x37A30000, 0x37A38000, 0x37A40000, 0x37A48000, 0x37A50000, 0x37A58000, 0x37A60000, 0x37A68000, 0x37A70000, 0x37A78000,
0x37A80000, 0x37A88000, 0x37A90000, 0x37A98000, 0x37AA0000, 0x37AA8000, 0x37AB0000, 0x37AB8000, 0x37AC0000, 0x37AC8000, 0x37AD0000, 0x37AD8000, 0x37AE0000, 0x37AE8000, 0x37AF0000, 0x37AF8000,
0x37B00000, 0x37B08000, 0x37B10000, 0x37B18000, 0x37B20000, 0x37B28000, 0x37B30000, 0x37B38000, 0x37B40000, 0x37B48000, 0x37B50000, 0x37B58000, 0x37B60000, 0x37B68000, 0x37B70000, 0x37B78000,
0x37B80000, 0x37B88000, 0x37B90000, 0x37B98000, 0x37BA0000, 0x37BA8000, 0x37BB0000, 0x37BB8000, 0x37BC0000, 0x37BC8000, 0x37BD0000, 0x37BD8000, 0x37BE0000, 0x37BE8000, 0x37BF0000, 0x37BF8000,
0x37C00000, 0x37C08000, 0x37C10000, 0x37C18000, 0x37C20000, 0x37C28000, 0x37C30000, 0x37C38000, 0x37C40000, 0x37C48000, 0x37C50000, 0x37C58000, 0x37C60000, 0x37C68000, 0x37C70000, 0x37C78000,
0x37C80000, 0x37C88000, 0x37C90000, 0x37C98000, 0x37CA0000, 0x37CA8000, 0x37CB0000, 0x37CB8000, 0x37CC0000, 0x37CC8000, 0x37CD0000, 0x37CD8000, 0x37CE0000, 0x37CE8000, 0x37CF0000, 0x37CF8000,
0x37D00000, 0x37D08000, 0x37D10000, 0x37D18000, 0x37D20000, 0x37D28000, 0x37D30000, 0x37D38000, 0x37D40000, 0x37D48000, 0x37D50000, 0x37D58000, 0x37D60000, 0x37D68000, 0x37D70000, 0x37D78000,
0x37D80000, 0x37D88000, 0x37D90000, 0x37D98000, 0x37DA0000, 0x37DA8000, 0x37DB0000, 0x37DB8000, 0x37DC0000, 0x37DC8000, 0x37DD0000, 0x37DD8000, 0x37DE0000, 0x37DE8000, 0x37DF0000, 0x37DF8000,
0x37E00000, 0x37E08000, 0x37E10000, 0x37E18000, 0x37E20000, 0x37E28000, 0x37E30000, 0x37E38000, 0x37E40000, 0x37E48000, 0x37E50000, 0x37E58000, 0x37E60000, 0x37E68000, 0x37E70000, 0x37E78000,
0x37E80000, 0x37E88000, 0x37E90000, 0x37E98000, 0x37EA0000, 0x37EA8000, 0x37EB0000, 0x37EB8000, 0x37EC0000, 0x37EC8000, 0x37ED0000, 0x37ED8000, 0x37EE0000, 0x37EE8000, 0x37EF0000, 0x37EF8000,
0x37F00000, 0x37F08000, 0x37F10000, 0x37F18000, 0x37F20000, 0x37F28000, 0x37F30000, 0x37F38000, 0x37F40000, 0x37F48000, 0x37F50000, 0x37F58000, 0x37F60000, 0x37F68000, 0x37F70000, 0x37F78000,
0x37F80000, 0x37F88000, 0x37F90000, 0x37F98000, 0x37FA0000, 0x37FA8000, 0x37FB0000, 0x37FB8000, 0x37FC0000, 0x37FC8000, 0x37FD0000, 0x37FD8000, 0x37FE0000, 0x37FE8000, 0x37FF0000, 0x37FF8000,
0x38000000, 0x38004000, 0x38008000, 0x3800C000, 0x38010000, 0x38014000, 0x38018000, 0x3801C000, 0x38020000, 0x38024000, 0x38028000, 0x3802C000, 0x38030000, 0x38034000, 0x38038000, 0x3803C000,
0x38040000, 0x38044000, 0x38048000, 0x3804C000, 0x38050000, 0x38054000, 0x38058000, 0x3805C000, 0x38060000, 0x38064000, 0x38068000, 0x3806C000, 0x38070000, 0x38074000, 0x38078000, 0x3807C000,
0x38080000, 0x38084000, 0x38088000, 0x3808C000, 0x38090000, 0x38094000, 0x38098000, 0x3809C000, 0x380A0000, 0x380A4000, 0x380A8000, 0x380AC000, 0x380B0000, 0x380B4000, 0x380B8000, 0x380BC000,
0x380C0000, 0x380C4000, 0x380C8000, 0x380CC000, 0x380D0000, 0x380D4000, 0x380D8000, 0x380DC000, 0x380E0000, 0x380E4000, 0x380E8000, 0x380EC000, 0x380F0000, 0x380F4000, 0x380F8000, 0x380FC000,
0x38100000, 0x38104000, 0x38108000, 0x3810C000, 0x38110000, 0x38114000, 0x38118000, 0x3811C000, 0x38120000, 0x38124000, 0x38128000, 0x3812C000, 0x38130000, 0x38134000, 0x38138000, 0x3813C000,
0x38140000, 0x38144000, 0x38148000, 0x3814C000, 0x38150000, 0x38154000, 0x38158000, 0x3815C000, 0x38160000, 0x38164000, 0x38168000, 0x3816C000, 0x38170000, 0x38174000, 0x38178000, 0x3817C000,
0x38180000, 0x38184000, 0x38188000, 0x3818C000, 0x38190000, 0x38194000, 0x38198000, 0x3819C000, 0x381A0000, 0x381A4000, 0x381A8000, 0x381AC000, 0x381B0000, 0x381B4000, 0x381B8000, 0x381BC000,
0x381C0000, 0x381C4000, 0x381C8000, 0x381CC000, 0x381D0000, 0x381D4000, 0x381D8000, 0x381DC000, 0x381E0000, 0x381E4000, 0x381E8000, 0x381EC000, 0x381F0000, 0x381F4000, 0x381F8000, 0x381FC000,
0x38200000, 0x38204000, 0x38208000, 0x3820C000, 0x38210000, 0x38214000, 0x38218000, 0x3821C000, 0x38220000, 0x38224000, 0x38228000, 0x3822C000, 0x38230000, 0x38234000, 0x38238000, 0x3823C000,
0x38240000, 0x38244000, 0x38248000, 0x3824C000, 0x38250000, 0x38254000, 0x38258000, 0x3825C000, 0x38260000, 0x38264000, 0x38268000, 0x3826C000, 0x38270000, 0x38274000, 0x38278000, 0x3827C000,
0x38280000, 0x38284000, 0x38288000, 0x3828C000, 0x38290000, 0x38294000, 0x38298000, 0x3829C000, 0x382A0000, 0x382A4000, 0x382A8000, 0x382AC000, 0x382B0000, 0x382B4000, 0x382B8000, 0x382BC000,
0x382C0000, 0x382C4000, 0x382C8000, 0x382CC000, 0x382D0000, 0x382D4000, 0x382D8000, 0x382DC000, 0x382E0000, 0x382E4000, 0x382E8000, 0x382EC000, 0x382F0000, 0x382F4000, 0x382F8000, 0x382FC000,
0x38300000, 0x38304000, 0x38308000, 0x3830C000, 0x38310000, 0x38314000, 0x38318000, 0x3831C000, 0x38320000, 0x38324000, 0x38328000, 0x3832C000, 0x38330000, 0x38334000, 0x38338000, 0x3833C000,
0x38340000, 0x38344000, 0x38348000, 0x3834C000, 0x38350000, 0x38354000, 0x38358000, 0x3835C000, 0x38360000, 0x38364000, 0x38368000, 0x3836C000, 0x38370000, 0x38374000, 0x38378000, 0x3837C000,
0x38380000, 0x38384000, 0x38388000, 0x3838C000, 0x38390000, 0x38394000, 0x38398000, 0x3839C000, 0x383A0000, 0x383A4000, 0x383A8000, 0x383AC000, 0x383B0000, 0x383B4000, 0x383B8000, 0x383BC000,
0x383C0000, 0x383C4000, 0x383C8000, 0x383CC000, 0x383D0000, 0x383D4000, 0x383D8000, 0x383DC000, 0x383E0000, 0x383E4000, 0x383E8000, 0x383EC000, 0x383F0000, 0x383F4000, 0x383F8000, 0x383FC000,
0x38400000, 0x38404000, 0x38408000, 0x3840C000, 0x38410000, 0x38414000, 0x38418000, 0x3841C000, 0x38420000, 0x38424000, 0x38428000, 0x3842C000, 0x38430000, 0x38434000, 0x38438000, 0x3843C000,
0x38440000, 0x38444000, 0x38448000, 0x3844C000, 0x38450000, 0x38454000, 0x38458000, 0x3845C000, 0x38460000, 0x38464000, 0x38468000, 0x3846C000, 0x38470000, 0x38474000, 0x38478000, 0x3847C000,
0x38480000, 0x38484000, 0x38488000, 0x3848C000, 0x38490000, 0x38494000, 0x38498000, 0x3849C000, 0x384A0000, 0x384A4000, 0x384A8000, 0x384AC000, 0x384B0000, 0x384B4000, 0x384B8000, 0x384BC000,
0x384C0000, 0x384C4000, 0x384C8000, 0x384CC000, 0x384D0000, 0x384D4000, 0x384D8000, 0x384DC000, 0x384E0000, 0x384E4000, 0x384E8000, 0x384EC000, 0x384F0000, 0x384F4000, 0x384F8000, 0x384FC000,
0x38500000, 0x38504000, 0x38508000, 0x3850C000, 0x38510000, 0x38514000, 0x38518000, 0x3851C000, 0x38520000, 0x38524000, 0x38528000, 0x3852C000, 0x38530000, 0x38534000, 0x38538000, 0x3853C000,
0x38540000, 0x38544000, 0x38548000, 0x3854C000, 0x38550000, 0x38554000, 0x38558000, 0x3855C000, 0x38560000, 0x38564000, 0x38568000, 0x3856C000, 0x38570000, 0x38574000, 0x38578000, 0x3857C000,
0x38580000, 0x38584000, 0x38588000, 0x3858C000, 0x38590000, 0x38594000, 0x38598000, 0x3859C000, 0x385A0000, 0x385A4000, 0x385A8000, 0x385AC000, 0x385B0000, 0x385B4000, 0x385B8000, 0x385BC000,
0x385C0000, 0x385C4000, 0x385C8000, 0x385CC000, 0x385D0000, 0x385D4000, 0x385D8000, 0x385DC000, 0x385E0000, 0x385E4000, 0x385E8000, 0x385EC000, 0x385F0000, 0x385F4000, 0x385F8000, 0x385FC000,
0x38600000, 0x38604000, 0x38608000, 0x3860C000, 0x38610000, 0x38614000, 0x38618000, 0x3861C000, 0x38620000, 0x38624000, 0x38628000, 0x3862C000, 0x38630000, 0x38634000, 0x38638000, 0x3863C000,
0x38640000, 0x38644000, 0x38648000, 0x3864C000, 0x38650000, 0x38654000, 0x38658000, 0x3865C000, 0x38660000, 0x38664000, 0x38668000, 0x3866C000, 0x38670000, 0x38674000, 0x38678000, 0x3867C000,
0x38680000, 0x38684000, 0x38688000, 0x3868C000, 0x38690000, 0x38694000, 0x38698000, 0x3869C000, 0x386A0000, 0x386A4000, 0x386A8000, 0x386AC000, 0x386B0000, 0x386B4000, 0x386B8000, 0x386BC000,
0x386C0000, 0x386C4000, 0x386C8000, 0x386CC000, 0x386D0000, 0x386D4000, 0x386D8000, 0x386DC000, 0x386E0000, 0x386E4000, 0x386E8000, 0x386EC000, 0x386F0000, 0x386F4000, 0x386F8000, 0x386FC000,
0x38700000, 0x38704000, 0x38708000, 0x3870C000, 0x38710000, 0x38714000, 0x38718000, 0x3871C000, 0x38720000, 0x38724000, 0x38728000, 0x3872C000, 0x38730000, 0x38734000, 0x38738000, 0x3873C000,
0x38740000, 0x38744000, 0x38748000, 0x3874C000, 0x38750000, 0x38754000, 0x38758000, 0x3875C000, 0x38760000, 0x38764000, 0x38768000, 0x3876C000, 0x38770000, 0x38774000, 0x38778000, 0x3877C000,
0x38780000, 0x38784000, 0x38788000, 0x3878C000, 0x38790000, 0x38794000, 0x38798000, 0x3879C000, 0x387A0000, 0x387A4000, 0x387A8000, 0x387AC000, 0x387B0000, 0x387B4000, 0x387B8000, 0x387BC000,
0x387C0000, 0x387C4000, 0x387C8000, 0x387CC000, 0x387D0000, 0x387D4000, 0x387D8000, 0x387DC000, 0x387E0000, 0x387E4000, 0x387E8000, 0x387EC000, 0x387F0000, 0x387F4000, 0x387F8000, 0x387FC000,
0x38000000, 0x38002000, 0x38004000, 0x38006000, 0x38008000, 0x3800A000, 0x3800C000, 0x3800E000, 0x38010000, 0x38012000, 0x38014000, 0x38016000, 0x38018000, 0x3801A000, 0x3801C000, 0x3801E000,
0x38020000, 0x38022000, 0x38024000, 0x38026000, 0x38028000, 0x3802A000, 0x3802C000, 0x3802E000, 0x38030000, 0x38032000, 0x38034000, 0x38036000, 0x38038000, 0x3803A000, 0x3803C000, 0x3803E000,
0x38040000, 0x38042000, 0x38044000, 0x38046000, 0x38048000, 0x3804A000, 0x3804C000, 0x3804E000, 0x38050000, 0x38052000, 0x38054000, 0x38056000, 0x38058000, 0x3805A000, 0x3805C000, 0x3805E000,
0x38060000, 0x38062000, 0x38064000, 0x38066000, 0x38068000, 0x3806A000, 0x3806C000, 0x3806E000, 0x38070000, 0x38072000, 0x38074000, 0x38076000, 0x38078000, 0x3807A000, 0x3807C000, 0x3807E000,
0x38080000, 0x38082000, 0x38084000, 0x38086000, 0x38088000, 0x3808A000, 0x3808C000, 0x3808E000, 0x38090000, 0x38092000, 0x38094000, 0x38096000, 0x38098000, 0x3809A000, 0x3809C000, 0x3809E000,
0x380A0000, 0x380A2000, 0x380A4000, 0x380A6000, 0x380A8000, 0x380AA000, 0x380AC000, 0x380AE000, 0x380B0000, 0x380B2000, 0x380B4000, 0x380B6000, 0x380B8000, 0x380BA000, 0x380BC000, 0x380BE000,
0x380C0000, 0x380C2000, 0x380C4000, 0x380C6000, 0x380C8000, 0x380CA000, 0x380CC000, 0x380CE000, 0x380D0000, 0x380D2000, 0x380D4000, 0x380D6000, 0x380D8000, 0x380DA000, 0x380DC000, 0x380DE000,
0x380E0000, 0x380E2000, 0x380E4000, 0x380E6000, 0x380E8000, 0x380EA000, 0x380EC000, 0x380EE000, 0x380F0000, 0x380F2000, 0x380F4000, 0x380F6000, 0x380F8000, 0x380FA000, 0x380FC000, 0x380FE000,
0x38100000, 0x38102000, 0x38104000, 0x38106000, 0x38108000, 0x3810A000, 0x3810C000, 0x3810E000, 0x38110000, 0x38112000, 0x38114000, 0x38116000, 0x38118000, 0x3811A000, 0x3811C000, 0x3811E000,
0x38120000, 0x38122000, 0x38124000, 0x38126000, 0x38128000, 0x3812A000, 0x3812C000, 0x3812E000, 0x38130000, 0x38132000, 0x38134000, 0x38136000, 0x38138000, 0x3813A000, 0x3813C000, 0x3813E000,
0x38140000, 0x38142000, 0x38144000, 0x38146000, 0x38148000, 0x3814A000, 0x3814C000, 0x3814E000, 0x38150000, 0x38152000, 0x38154000, 0x38156000, 0x38158000, 0x3815A000, 0x3815C000, 0x3815E000,
0x38160000, 0x38162000, 0x38164000, 0x38166000, 0x38168000, 0x3816A000, 0x3816C000, 0x3816E000, 0x38170000, 0x38172000, 0x38174000, 0x38176000, 0x38178000, 0x3817A000, 0x3817C000, 0x3817E000,
0x38180000, 0x38182000, 0x38184000, 0x38186000, 0x38188000, 0x3818A000, 0x3818C000, 0x3818E000, 0x38190000, 0x38192000, 0x38194000, 0x38196000, 0x38198000, 0x3819A000, 0x3819C000, 0x3819E000,
0x381A0000, 0x381A2000, 0x381A4000, 0x381A6000, 0x381A8000, 0x381AA000, 0x381AC000, 0x381AE000, 0x381B0000, 0x381B2000, 0x381B4000, 0x381B6000, 0x381B8000, 0x381BA000, 0x381BC000, 0x381BE000,
0x381C0000, 0x381C2000, 0x381C4000, 0x381C6000, 0x381C8000, 0x381CA000, 0x381CC000, 0x381CE000, 0x381D0000, 0x381D2000, 0x381D4000, 0x381D6000, 0x381D8000, 0x381DA000, 0x381DC000, 0x381DE000,
0x381E0000, 0x381E2000, 0x381E4000, 0x381E6000, 0x381E8000, 0x381EA000, 0x381EC000, 0x381EE000, 0x381F0000, 0x381F2000, 0x381F4000, 0x381F6000, 0x381F8000, 0x381FA000, 0x381FC000, 0x381FE000,
0x38200000, 0x38202000, 0x38204000, 0x38206000, 0x38208000, 0x3820A000, 0x3820C000, 0x3820E000, 0x38210000, 0x38212000, 0x38214000, 0x38216000, 0x38218000, 0x3821A000, 0x3821C000, 0x3821E000,
0x38220000, 0x38222000, 0x38224000, 0x38226000, 0x38228000, 0x3822A000, 0x3822C000, 0x3822E000, 0x38230000, 0x38232000, 0x38234000, 0x38236000, 0x38238000, 0x3823A000, 0x3823C000, 0x3823E000,
0x38240000, 0x38242000, 0x38244000, 0x38246000, 0x38248000, 0x3824A000, 0x3824C000, 0x3824E000, 0x38250000, 0x38252000, 0x38254000, 0x38256000, 0x38258000, 0x3825A000, 0x3825C000, 0x3825E000,
0x38260000, 0x38262000, 0x38264000, 0x38266000, 0x38268000, 0x3826A000, 0x3826C000, 0x3826E000, 0x38270000, 0x38272000, 0x38274000, 0x38276000, 0x38278000, 0x3827A000, 0x3827C000, 0x3827E000,
0x38280000, 0x38282000, 0x38284000, 0x38286000, 0x38288000, 0x3828A000, 0x3828C000, 0x3828E000, 0x38290000, 0x38292000, 0x38294000, 0x38296000, 0x38298000, 0x3829A000, 0x3829C000, 0x3829E000,
0x382A0000, 0x382A2000, 0x382A4000, 0x382A6000, 0x382A8000, 0x382AA000, 0x382AC000, 0x382AE000, 0x382B0000, 0x382B2000, 0x382B4000, 0x382B6000, 0x382B8000, 0x382BA000, 0x382BC000, 0x382BE000,
0x382C0000, 0x382C2000, 0x382C4000, 0x382C6000, 0x382C8000, 0x382CA000, 0x382CC000, 0x382CE000, 0x382D0000, 0x382D2000, 0x382D4000, 0x382D6000, 0x382D8000, 0x382DA000, 0x382DC000, 0x382DE000,
0x382E0000, 0x382E2000, 0x382E4000, 0x382E6000, 0x382E8000, 0x382EA000, 0x382EC000, 0x382EE000, 0x382F0000, 0x382F2000, 0x382F4000, 0x382F6000, 0x382F8000, 0x382FA000, 0x382FC000, 0x382FE000,
0x38300000, 0x38302000, 0x38304000, 0x38306000, 0x38308000, 0x3830A000, 0x3830C000, 0x3830E000, 0x38310000, 0x38312000, 0x38314000, 0x38316000, 0x38318000, 0x3831A000, 0x3831C000, 0x3831E000,
0x38320000, 0x38322000, 0x38324000, 0x38326000, 0x38328000, 0x3832A000, 0x3832C000, 0x3832E000, 0x38330000, 0x38332000, 0x38334000, 0x38336000, 0x38338000, 0x3833A000, 0x3833C000, 0x3833E000,
0x38340000, 0x38342000, 0x38344000, 0x38346000, 0x38348000, 0x3834A000, 0x3834C000, 0x3834E000, 0x38350000, 0x38352000, 0x38354000, 0x38356000, 0x38358000, 0x3835A000, 0x3835C000, 0x3835E000,
0x38360000, 0x38362000, 0x38364000, 0x38366000, 0x38368000, 0x3836A000, 0x3836C000, 0x3836E000, 0x38370000, 0x38372000, 0x38374000, 0x38376000, 0x38378000, 0x3837A000, 0x3837C000, 0x3837E000,
0x38380000, 0x38382000, 0x38384000, 0x38386000, 0x38388000, 0x3838A000, 0x3838C000, 0x3838E000, 0x38390000, 0x38392000, 0x38394000, 0x38396000, 0x38398000, 0x3839A000, 0x3839C000, 0x3839E000,
0x383A0000, 0x383A2000, 0x383A4000, 0x383A6000, 0x383A8000, 0x383AA000, 0x383AC000, 0x383AE000, 0x383B0000, 0x383B2000, 0x383B4000, 0x383B6000, 0x383B8000, 0x383BA000, 0x383BC000, 0x383BE000,
0x383C0000, 0x383C2000, 0x383C4000, 0x383C6000, 0x383C8000, 0x383CA000, 0x383CC000, 0x383CE000, 0x383D0000, 0x383D2000, 0x383D4000, 0x383D6000, 0x383D8000, 0x383DA000, 0x383DC000, 0x383DE000,
0x383E0000, 0x383E2000, 0x383E4000, 0x383E6000, 0x383E8000, 0x383EA000, 0x383EC000, 0x383EE000, 0x383F0000, 0x383F2000, 0x383F4000, 0x383F6000, 0x383F8000, 0x383FA000, 0x383FC000, 0x383FE000,
0x38400000, 0x38402000, 0x38404000, 0x38406000, 0x38408000, 0x3840A000, 0x3840C000, 0x3840E000, 0x38410000, 0x38412000, 0x38414000, 0x38416000, 0x38418000, 0x3841A000, 0x3841C000, 0x3841E000,
0x38420000, 0x38422000, 0x38424000, 0x38426000, 0x38428000, 0x3842A000, 0x3842C000, 0x3842E000, 0x38430000, 0x38432000, 0x38434000, 0x38436000, 0x38438000, 0x3843A000, 0x3843C000, 0x3843E000,
0x38440000, 0x38442000, 0x38444000, 0x38446000, 0x38448000, 0x3844A000, 0x3844C000, 0x3844E000, 0x38450000, 0x38452000, 0x38454000, 0x38456000, 0x38458000, 0x3845A000, 0x3845C000, 0x3845E000,
0x38460000, 0x38462000, 0x38464000, 0x38466000, 0x38468000, 0x3846A000, 0x3846C000, 0x3846E000, 0x38470000, 0x38472000, 0x38474000, 0x38476000, 0x38478000, 0x3847A000, 0x3847C000, 0x3847E000,
0x38480000, 0x38482000, 0x38484000, 0x38486000, 0x38488000, 0x3848A000, 0x3848C000, 0x3848E000, 0x38490000, 0x38492000, 0x38494000, 0x38496000, 0x38498000, 0x3849A000, 0x3849C000, 0x3849E000,
0x384A0000, 0x384A2000, 0x384A4000, 0x384A6000, 0x384A8000, 0x384AA000, 0x384AC000, 0x384AE000, 0x384B0000, 0x384B2000, 0x384B4000, 0x384B6000, 0x384B8000, 0x384BA000, 0x384BC000, 0x384BE000,
0x384C0000, 0x384C2000, 0x384C4000, 0x384C6000, 0x384C8000, 0x384CA000, 0x384CC000, 0x384CE000, 0x384D0000, 0x384D2000, 0x384D4000, 0x384D6000, 0x384D8000, 0x384DA000, 0x384DC000, 0x384DE000,
0x384E0000, 0x384E2000, 0x384E4000, 0x384E6000, 0x384E8000, 0x384EA000, 0x384EC000, 0x384EE000, 0x384F0000, 0x384F2000, 0x384F4000, 0x384F6000, 0x384F8000, 0x384FA000, 0x384FC000, 0x384FE000,
0x38500000, 0x38502000, 0x38504000, 0x38506000, 0x38508000, 0x3850A000, 0x3850C000, 0x3850E000, 0x38510000, 0x38512000, 0x38514000, 0x38516000, 0x38518000, 0x3851A000, 0x3851C000, 0x3851E000,
0x38520000, 0x38522000, 0x38524000, 0x38526000, 0x38528000, 0x3852A000, 0x3852C000, 0x3852E000, 0x38530000, 0x38532000, 0x38534000, 0x38536000, 0x38538000, 0x3853A000, 0x3853C000, 0x3853E000,
0x38540000, 0x38542000, 0x38544000, 0x38546000, 0x38548000, 0x3854A000, 0x3854C000, 0x3854E000, 0x38550000, 0x38552000, 0x38554000, 0x38556000, 0x38558000, 0x3855A000, 0x3855C000, 0x3855E000,
0x38560000, 0x38562000, 0x38564000, 0x38566000, 0x38568000, 0x3856A000, 0x3856C000, 0x3856E000, 0x38570000, 0x38572000, 0x38574000, 0x38576000, 0x38578000, 0x3857A000, 0x3857C000, 0x3857E000,
0x38580000, 0x38582000, 0x38584000, 0x38586000, 0x38588000, 0x3858A000, 0x3858C000, 0x3858E000, 0x38590000, 0x38592000, 0x38594000, 0x38596000, 0x38598000, 0x3859A000, 0x3859C000, 0x3859E000,
0x385A0000, 0x385A2000, 0x385A4000, 0x385A6000, 0x385A8000, 0x385AA000, 0x385AC000, 0x385AE000, 0x385B0000, 0x385B2000, 0x385B4000, 0x385B6000, 0x385B8000, 0x385BA000, 0x385BC000, 0x385BE000,
0x385C0000, 0x385C2000, 0x385C4000, 0x385C6000, 0x385C8000, 0x385CA000, 0x385CC000, 0x385CE000, 0x385D0000, 0x385D2000, 0x385D4000, 0x385D6000, 0x385D8000, 0x385DA000, 0x385DC000, 0x385DE000,
0x385E0000, 0x385E2000, 0x385E4000, 0x385E6000, 0x385E8000, 0x385EA000, 0x385EC000, 0x385EE000, 0x385F0000, 0x385F2000, 0x385F4000, 0x385F6000, 0x385F8000, 0x385FA000, 0x385FC000, 0x385FE000,
0x38600000, 0x38602000, 0x38604000, 0x38606000, 0x38608000, 0x3860A000, 0x3860C000, 0x3860E000, 0x38610000, 0x38612000, 0x38614000, 0x38616000, 0x38618000, 0x3861A000, 0x3861C000, 0x3861E000,
0x38620000, 0x38622000, 0x38624000, 0x38626000, 0x38628000, 0x3862A000, 0x3862C000, 0x3862E000, 0x38630000, 0x38632000, 0x38634000, 0x38636000, 0x38638000, 0x3863A000, 0x3863C000, 0x3863E000,
0x38640000, 0x38642000, 0x38644000, 0x38646000, 0x38648000, 0x3864A000, 0x3864C000, 0x3864E000, 0x38650000, 0x38652000, 0x38654000, 0x38656000, 0x38658000, 0x3865A000, 0x3865C000, 0x3865E000,
0x38660000, 0x38662000, 0x38664000, 0x38666000, 0x38668000, 0x3866A000, 0x3866C000, 0x3866E000, 0x38670000, 0x38672000, 0x38674000, 0x38676000, 0x38678000, 0x3867A000, 0x3867C000, 0x3867E000,
0x38680000, 0x38682000, 0x38684000, 0x38686000, 0x38688000, 0x3868A000, 0x3868C000, 0x3868E000, 0x38690000, 0x38692000, 0x38694000, 0x38696000, 0x38698000, 0x3869A000, 0x3869C000, 0x3869E000,
0x386A0000, 0x386A2000, 0x386A4000, 0x386A6000, 0x386A8000, 0x386AA000, 0x386AC000, 0x386AE000, 0x386B0000, 0x386B2000, 0x386B4000, 0x386B6000, 0x386B8000, 0x386BA000, 0x386BC000, 0x386BE000,
0x386C0000, 0x386C2000, 0x386C4000, 0x386C6000, 0x386C8000, 0x386CA000, 0x386CC000, 0x386CE000, 0x386D0000, 0x386D2000, 0x386D4000, 0x386D6000, 0x386D8000, 0x386DA000, 0x386DC000, 0x386DE000,
0x386E0000, 0x386E2000, 0x386E4000, 0x386E6000, 0x386E8000, 0x386EA000, 0x386EC000, 0x386EE000, 0x386F0000, 0x386F2000, 0x386F4000, 0x386F6000, 0x386F8000, 0x386FA000, 0x386FC000, 0x386FE000,
0x38700000, 0x38702000, 0x38704000, 0x38706000, 0x38708000, 0x3870A000, 0x3870C000, 0x3870E000, 0x38710000, 0x38712000, 0x38714000, 0x38716000, 0x38718000, 0x3871A000, 0x3871C000, 0x3871E000,
0x38720000, 0x38722000, 0x38724000, 0x38726000, 0x38728000, 0x3872A000, 0x3872C000, 0x3872E000, 0x38730000, 0x38732000, 0x38734000, 0x38736000, 0x38738000, 0x3873A000, 0x3873C000, 0x3873E000,
0x38740000, 0x38742000, 0x38744000, 0x38746000, 0x38748000, 0x3874A000, 0x3874C000, 0x3874E000, 0x38750000, 0x38752000, 0x38754000, 0x38756000, 0x38758000, 0x3875A000, 0x3875C000, 0x3875E000,
0x38760000, 0x38762000, 0x38764000, 0x38766000, 0x38768000, 0x3876A000, 0x3876C000, 0x3876E000, 0x38770000, 0x38772000, 0x38774000, 0x38776000, 0x38778000, 0x3877A000, 0x3877C000, 0x3877E000,
0x38780000, 0x38782000, 0x38784000, 0x38786000, 0x38788000, 0x3878A000, 0x3878C000, 0x3878E000, 0x38790000, 0x38792000, 0x38794000, 0x38796000, 0x38798000, 0x3879A000, 0x3879C000, 0x3879E000,
0x387A0000, 0x387A2000, 0x387A4000, 0x387A6000, 0x387A8000, 0x387AA000, 0x387AC000, 0x387AE000, 0x387B0000, 0x387B2000, 0x387B4000, 0x387B6000, 0x387B8000, 0x387BA000, 0x387BC000, 0x387BE000,
0x387C0000, 0x387C2000, 0x387C4000, 0x387C6000, 0x387C8000, 0x387CA000, 0x387CC000, 0x387CE000, 0x387D0000, 0x387D2000, 0x387D4000, 0x387D6000, 0x387D8000, 0x387DA000, 0x387DC000, 0x387DE000,
0x387E0000, 0x387E2000, 0x387E4000, 0x387E6000, 0x387E8000, 0x387EA000, 0x387EC000, 0x387EE000, 0x387F0000, 0x387F2000, 0x387F4000, 0x387F6000, 0x387F8000, 0x387FA000, 0x387FC000, 0x387FE000 };
static const uint32 exponent_table[64] = {
0x00000000, 0x00800000, 0x01000000, 0x01800000, 0x02000000, 0x02800000, 0x03000000, 0x03800000, 0x04000000, 0x04800000, 0x05000000, 0x05800000, 0x06000000, 0x06800000, 0x07000000, 0x07800000,
0x08000000, 0x08800000, 0x09000000, 0x09800000, 0x0A000000, 0x0A800000, 0x0B000000, 0x0B800000, 0x0C000000, 0x0C800000, 0x0D000000, 0x0D800000, 0x0E000000, 0x0E800000, 0x0F000000, 0x47800000,
0x80000000, 0x80800000, 0x81000000, 0x81800000, 0x82000000, 0x82800000, 0x83000000, 0x83800000, 0x84000000, 0x84800000, 0x85000000, 0x85800000, 0x86000000, 0x86800000, 0x87000000, 0x87800000,
0x88000000, 0x88800000, 0x89000000, 0x89800000, 0x8A000000, 0x8A800000, 0x8B000000, 0x8B800000, 0x8C000000, 0x8C800000, 0x8D000000, 0x8D800000, 0x8E000000, 0x8E800000, 0x8F000000, 0xC7800000 };
static const unsigned short offset_table[64] = {
0, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
0, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024 };
uint32 bits = mantissa_table[offset_table[value>>10]+(value&0x3FF)] + exponent_table[value>>10];
#pragma empty_line
#pragma empty_line
float out;
std::memcpy(&out, &bits, sizeof(float));
return out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float half2float_impl(uint16 value, false_type)
{
float out;
int abs = value & 0x7FFF;
if(abs > 0x7C00)
out = std::numeric_limits<float>::has_quiet_NaN ? std::numeric_limits<float>::quiet_NaN() : 0.0f;
else if(abs == 0x7C00)
out = std::numeric_limits<float>::has_infinity ? std::numeric_limits<float>::infinity() : std::numeric_limits<float>::max();
else if(abs > 0x3FF)
out = std::ldexp(static_cast<float>((value&0x3FF)|0x400), (abs>>10)-25);
else
out = std::ldexp(static_cast<float>(abs), -24);
return (value&0x8000) ? -out : out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float half2float(uint16 value)
{
return half2float_impl(value, bool_type<std::numeric_limits<float>::is_iec559&&sizeof(uint32)==sizeof(float)>());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R,bool E,typename T> T half2int_impl(uint16 value)
{
unsigned int e = value & 0x7FFF;
if(e >= 0x7C00)
return (value&0x8000) ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
if(e < 0x3800)
{
if(R == std::round_toward_infinity)
return T(~(value>>15)&(e!=0));
else if(R == std::round_toward_neg_infinity)
return -T(value>0x8000);
return T();
}
int17 m = (value&0x3FF) | 0x400;
e >>= 10;
if(e < 25)
{
if(R == std::round_indeterminate || R == std::round_toward_zero)
m >>= 25 - e;
else
{
if(R == std::round_to_nearest)
m += (1<<(24-e)) - (~(m>>(25-e))&E);
else if(R == std::round_toward_infinity)
m += ((value>>15)-1) & ((1<<(25-e))-1U);
else if(R == std::round_toward_neg_infinity)
m += -(value>>15) & ((1<<(25-e))-1U);
m >>= 25 - e;
}
}
else
m <<= e - 25;
#pragma empty_line
#pragma empty_line
return static_cast<T>((value&0x8000) ? -m : m);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R,typename T> T half2int(uint16 value) { return half2int_impl<R,1,T>(value); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> T half2int_up(uint16 value) { return half2int_impl<std::round_to_nearest,0,T>(value); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R,bool E> uint16 round_half_impl(uint16 value)
{
unsigned int e = value & 0x7FFF;
uint16 result = value;
if(e < 0x3C00)
{
result &= 0x8000;
if(R == std::round_to_nearest)
result |= 0x3C00U & -(e>=(0x3800+E));
else if(R == std::round_toward_infinity)
result |= 0x3C00U & -(~(value>>15)&(e!=0));
else if(R == std::round_toward_neg_infinity)
result |= 0x3C00U & -(value>0x8000);
}
else if(e < 0x6400)
{
e = 25 - (e>>10);
unsigned int mask = (1<<e) - 1;
if(R == std::round_to_nearest)
result += (1<<(e-1)) - (~(result>>e)&E);
else if(R == std::round_toward_infinity)
result += mask & ((value>>15)-1);
else if(R == std::round_toward_neg_infinity)
result += mask & -(value>>15);
result &= ~mask;
}
return result;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<std::float_round_style R> uint16 round_half(uint16 value) { return round_half_impl<R,1>(value); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline uint16 round_half_up(uint16 value) { return round_half_impl<std::round_to_nearest,0>(value); }
#pragma empty_line
#pragma empty_line
struct functions;
template<typename> struct unary_specialized;
template<typename,typename> struct binary_specialized;
template<typename,typename,std::float_round_style> struct half_caster;
}
#pragma line 945 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
class half
{
friend struct detail::functions;
friend struct detail::unary_specialized<half>;
friend struct detail::binary_specialized<half,half>;
template<typename,typename,std::float_round_style> friend struct detail::half_caster;
friend struct std::numeric_limits<half>;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
half() : data_() {}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half(detail::expr rhs) : data_(detail::float2half<round_style>(rhs)) {
#pragma empty_line
xip_fpo_half_set_flt(rhs);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
half(float rhs) : data_(detail::float2half<round_style>(rhs)) {
#pragma empty_line
xip_fpo_half_set_flt(rhs);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
operator float() const {
#pragma empty_line
#pragma empty_line
#pragma empty_line
return xip_fpo_half_get_flt();
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator=(detail::expr rhs) { return *this = static_cast<float>(rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> typename detail::enable<half&,T>::type operator+=(T rhs) { return *this += static_cast<float>(rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> typename detail::enable<half&,T>::type operator-=(T rhs) { return *this -= static_cast<float>(rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> typename detail::enable<half&,T>::type operator*=(T rhs) { return *this *= static_cast<float>(rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> typename detail::enable<half&,T>::type operator/=(T rhs) { return *this /= static_cast<float>(rhs); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator=(float rhs) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
xip_fpo_half_set_flt(rhs);
#pragma empty_line
return *this;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator+=(float rhs) { data_ = detail::float2half<round_style>(detail::half2float(data_)+rhs); return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator-=(float rhs) { data_ = detail::float2half<round_style>(detail::half2float(data_)-rhs); return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator*=(float rhs) { data_ = detail::float2half<round_style>(detail::half2float(data_)*rhs); return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator/=(float rhs) { data_ = detail::float2half<round_style>(detail::half2float(data_)/rhs); return *this; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator++() { return *this += 1.0f; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
half& operator--() { return *this -= 1.0f; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
half operator++(int) { half out(*this); ++*this; return out; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
half operator--(int) { half out(*this); --*this; return out; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
detail::uint16 get_bits() { return data_; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
void set_bits(detail::uint16 bits) { data_ = bits; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
xip_fpo_exc_t xip_fpo_get_data(xip_fpo_ptr op) const {
int exc = 0;
op->_xip_fpo_sign = ((data_ & 0x8000) ? -1 : 1);
op->_xip_fpo_exp = ((data_ & 0x7C00) >> 10) - 14;
*(op->_xip_fpo_d) = ((mp_limb_t)(data_ & 0x3FF) + (mp_limb_t)(0x400)) << (8*sizeof(*(op->_xip_fpo_d)) - 11);
if ((data_ & 0x7C00) == 0) {
exc |= 0x1;
xip_fpo_set_zero(op, op->_xip_fpo_sign);
} else if ((data_ & 0x7FFF) == 0x7C00) {
exc |= 0x2;
xip_fpo_set_inf(op, op->_xip_fpo_sign);
} else if ((data_ & 0x7FFF) > 0x7C00) {
exc |= 0x4;
xip_fpo_set_nan(op);
}
return exc;
}
#pragma empty_line
#pragma empty_line
float xip_fpo_half_get_flt() const {
xip_fpo_t op;
xip_fpo_init2(op, 5, 11);
xip_fpo_exc_t exc = xip_fpo_get_data(op);
float res;
if (exc & 0x1) {
res = (op->_xip_fpo_sign > 0 ? 0.0f : -0.0f);
} else if (exc & 0x2) {
res = (op->_xip_fpo_sign > 0 ? std::numeric_limits<float>::infinity() : -std::numeric_limits<float>::infinity());
} else if (exc & 0x4) {
res = std::numeric_limits<float>::quiet_NaN();
} else {
res = xip_fpo_get_flt(op);
}
xip_fpo_clear(op);
return res;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void xip_fpo_set_data(xip_fpo_ptr op) {
mpfr_t fr;
(fr)->_mpfr_prec = (op)->_xip_fpo_mant_prec; (fr)->_mpfr_sign = (op)->_xip_fpo_sign; (fr)->_mpfr_exp = (op)->_xip_fpo_exp; (fr)->_mpfr_d = (op)->_xip_fpo_d;;
data_ = 0;
data_ |= (op->_xip_fpo_sign == 1 ? 0 : 1) << 15;
if (((fr)->_mpfr_exp == ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+1)))) {
data_ &= 0x8000;
} else if (((fr)->_mpfr_exp == ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+3)))) {
data_ |= 0x7C00;
} else if (((fr)->_mpfr_exp == ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+2)))) {
data_ |= 0x7E00;
} else {
data_ |= (op->_xip_fpo_exp + 14) << 10;
data_ |= (*(op->_xip_fpo_d) << 1) >> (8*sizeof(*(op->_xip_fpo_d)) - 10);
}
}
#pragma empty_line
#pragma empty_line
void xip_fpo_half_set_flt(float rhs) {
xip_fpo_t op;
xip_fpo_init2(op, 5, 11);
xip_fpo_set_flt(op, rhs);
xip_fpo_set_data(op);
xip_fpo_clear(op);
}
#pragma empty_line
#pragma empty_line
private:
#pragma empty_line
static const std::float_round_style round_style = (std::float_round_style)(1);
#pragma empty_line
#pragma empty_line
#pragma empty_line
half(detail::binary_t, detail::uint16 bits) : data_(bits) {}
#pragma empty_line
#pragma empty_line
detail::uint16 data_;
};
#pragma line 1175 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
namespace detail
{
#pragma empty_line
struct functions
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr plus(float x, float y) { return expr(x+y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr minus(float x, float y) { return expr(x-y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr multiplies(float x, float y) { return expr(x*y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr divides(float x, float y) { return expr(x/y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename charT,typename traits> static std::basic_ostream<charT,traits>& write(std::basic_ostream<charT,traits> &out, float arg) { return out << arg; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename charT,typename traits> static std::basic_istream<charT,traits>& read(std::basic_istream<charT,traits> &in, half &arg)
{
float f;
if(in >> f)
arg = f;
return in;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr fmod(float x, float y) { return expr(std::fmod(x, y)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr remainder(float x, float y)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(builtin_isnan(x) || builtin_isnan(y))
return expr(std::numeric_limits<float>::quiet_NaN());
float ax = std::fabs(x), ay = std::fabs(y);
if(ax >= 65536.0f || ay < std::ldexp(1.0f, -24))
return expr(std::numeric_limits<float>::quiet_NaN());
if(ay >= 65536.0f)
return expr(x);
if(ax == ay)
return expr(builtin_signbit(x) ? -0.0f : 0.0f);
ax = std::fmod(ax, ay+ay);
float y2 = 0.5f * ay;
if(ax > y2)
{
ax -= ay;
if(ax >= y2)
ax -= ay;
}
return expr(builtin_signbit(x) ? -ax : ax);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr remquo(float x, float y, int *quo)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(builtin_isnan(x) || builtin_isnan(y))
return expr(std::numeric_limits<float>::quiet_NaN());
bool sign = builtin_signbit(x), qsign = static_cast<bool>(sign^builtin_signbit(y));
float ax = std::fabs(x), ay = std::fabs(y);
if(ax >= 65536.0f || ay < std::ldexp(1.0f, -24))
return expr(std::numeric_limits<float>::quiet_NaN());
if(ay >= 65536.0f)
return expr(x);
if(ax == ay)
return *quo = qsign ? -1 : 1, expr(sign ? -0.0f : 0.0f);
ax = std::fmod(ax, 8.0f*ay);
int cquo = 0;
if(ax >= 4.0f * ay)
{
ax -= 4.0f * ay;
cquo += 4;
}
if(ax >= 2.0f * ay)
{
ax -= 2.0f * ay;
cquo += 2;
}
float y2 = 0.5f * ay;
if(ax > y2)
{
ax -= ay;
++cquo;
if(ax >= y2)
{
ax -= ay;
++cquo;
}
}
return *quo = qsign ? -cquo : cquo, expr(sign ? -ax : ax);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr fdim(float x, float y)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr((x<=y) ? 0.0f : (x-y));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr fma(float x, float y, float z)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(x*y+z);
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half nanh(const char*) { return half(binary, 0x7FFF); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr exp(float arg) { return expr(std::exp(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr expm1(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(std::exp(static_cast<double>(arg))-1.0));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr exp2(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(std::exp(arg*0.69314718055994530941723212145818)));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr log(float arg) { return expr(std::log(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr log10(float arg) { return expr(std::log10(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr log1p(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(std::log(1.0+arg)));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr log2(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(std::log(static_cast<double>(arg))*1.4426950408889634073599246810019));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr sqrt(float arg) { return expr(std::sqrt(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr cbrt(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(builtin_isnan(arg) || builtin_isinf(arg))
return expr(arg);
return expr(builtin_signbit(arg) ? -static_cast<float>(std::pow(std::fabs(static_cast<double>(arg)), 1.0/3.0)) :
static_cast<float>(std::pow(static_cast<double>(arg), 1.0/3.0)));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr hypot(float x, float y)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr((builtin_isinf(x) || builtin_isinf(y)) ? std::numeric_limits<float>::infinity() :
static_cast<float>(std::sqrt(static_cast<double>(x)*x+static_cast<double>(y)*y)));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr pow(float base, float exp) { return expr(std::pow(base, exp)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr sin(float arg) { return expr(std::sin(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr cos(float arg) { return expr(std::cos(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr tan(float arg) { return expr(std::tan(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr asin(float arg) { return expr(std::asin(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr acos(float arg) { return expr(std::acos(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr atan(float arg) { return expr(std::atan(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr atan2(float x, float y) { return expr(std::atan2(x, y)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr sinh(float arg) { return expr(std::sinh(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr cosh(float arg) { return expr(std::cosh(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr tanh(float arg) { return expr(std::tanh(arg)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr asinh(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr((arg==-std::numeric_limits<float>::infinity()) ? arg : static_cast<float>(std::log(arg+std::sqrt(arg*arg+1.0))));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr acosh(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr((arg<-1.0f) ? std::numeric_limits<float>::quiet_NaN() : static_cast<float>(std::log(arg+std::sqrt(arg*arg-1.0))));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr atanh(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(0.5*std::log((1.0+arg)/(1.0-arg))));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr erf(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(erf(static_cast<double>(arg))));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr erfc(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return expr(static_cast<float>(1.0-erf(static_cast<double>(arg))));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr lgamma(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(builtin_isinf(arg))
return expr(std::numeric_limits<float>::infinity());
double z = static_cast<double>(arg);
if(z < 0)
{
double i, f = std::modf(-z, &i);
if(f == 0.0)
return expr(std::numeric_limits<float>::infinity());
return expr(static_cast<float>(1.1447298858494001741434273513531-std::log(std::abs(std::sin(3.1415926535897932384626433832795*f)))-lgamma(1.0-z)));
}
#pragma empty_line
return expr(static_cast<float>(lgamma(static_cast<double>(arg))));
return expr(static_cast<float>(0.5*(1.8378770664093454835606594728112-std::log(z))+z*(std::log(z+1.0/(12.0*z-1.0/(10.0*z)-1.0))-1.0)));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr tgamma(float arg)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
double z = static_cast<double>(arg);
if(z == 0.0)
return builtin_signbit(z) ? expr(-std::numeric_limits<float>::infinity()) : expr(std::numeric_limits<float>::infinity());
if(z < 0.0)
{
double i, f = std::modf(-z, &i);
if(f == 0.0)
return expr(std::numeric_limits<float>::quiet_NaN());
double sign = (std::fmod(i, 2.0)==0.0) ? -1.0 : 1.0;
return expr(static_cast<float>(sign*3.1415926535897932384626433832795/(std::sin(3.1415926535897932384626433832795*f)*std::exp(lgamma(1.0-z)))));
}
if(builtin_isinf(arg))
return expr(arg);
#pragma empty_line
return expr(static_cast<float>(std::exp(lgamma(z))));
return expr(static_cast<float>(std::sqrt(6.283185307179586476925286766559/z)*std::pow(0.36787944117144232159552377016146*(z+1.0/(12.0*z-1.0/(10.0*z))), z)));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half floor(half arg) { return half(binary, round_half<std::round_toward_neg_infinity>(arg.data_)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half ceil(half arg) { return half(binary, round_half<std::round_toward_infinity>(arg.data_)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half trunc(half arg) { return half(binary, round_half<std::round_toward_zero>(arg.data_)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half round(half arg) { return half(binary, round_half_up(arg.data_)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static long lround(half arg) { return detail::half2int_up<long>(arg.data_); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half rint(half arg) { return half(binary, round_half<half::round_style>(arg.data_)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static long lrint(half arg) { return detail::half2int<half::round_style,long>(arg.data_); }
#pragma line 1652 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
static half frexp(half arg, int *exp)
{
unsigned int m = arg.data_ & 0x7FFF;
if(m >= 0x7C00 || !m)
return *exp = 0, arg;
int e = m >> 10;
if(!e)
for(m<<=1; m<0x400; m<<=1,--e) ;
return *exp = e-14, half(binary, static_cast<uint16>((arg.data_&0x8000)|0x3800|(m&0x3FF)));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half modf(half arg, half *iptr)
{
unsigned int e = arg.data_ & 0x7C00;
if(e > 0x6000)
return *iptr = arg, (e==0x7C00&&(arg.data_&0x3FF)) ? arg : half(binary, arg.data_&0x8000);
if(e < 0x3C00)
return iptr->data_ = arg.data_ & 0x8000, arg;
e >>= 10;
unsigned int mask = (1<<(25-e)) - 1, m = arg.data_ & mask;
iptr->data_ = arg.data_ & ~mask;
if(!m)
return half(binary, arg.data_&0x8000);
for(; m<0x400; m<<=1,--e) ;
return half(binary, static_cast<uint16>((arg.data_&0x8000)|(e<<10)|(m&0x3FF)));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half scalbln(half arg, long exp)
{
long e = arg.data_ & 0x7C00;
if(e == 0x7C00)
return arg;
unsigned int m = arg.data_ & 0x3FF;
if(e >>= 10)
m |= 0x400;
else
{
if(!m)
return arg;
for(m<<=1; m<0x400; m<<=1,--e) ;
}
e += exp;
uint16 value = arg.data_ & 0x8000;
if(e > 30)
{
if(half::round_style == std::round_toward_zero)
value |= 0x7BFF;
else if(half::round_style == std::round_toward_infinity)
value |= 0x7C00 - (value>>15);
else if(half::round_style == std::round_toward_neg_infinity)
value |= 0x7BFF + (value>>15);
else
value |= 0x7C00;
}
else if(e > 0)
value |= (e<<10) | (m&0x3FF);
else if(e > -11)
{
if(half::round_style == std::round_to_nearest)
{
m += 1 << -e;
#pragma empty_line
m -= (m>>(1-e)) & 1;
#pragma empty_line
}
else if(half::round_style == std::round_toward_infinity)
m += ((value>>15)-1) & ((1<<(1-e))-1U);
else if(half::round_style == std::round_toward_neg_infinity)
m += -(value>>15) & ((1<<(1-e))-1U);
value |= m >> (1-e);
}
else if(half::round_style == std::round_toward_infinity)
value |= ((value>>15)-1) & 1;
else if(half::round_style == std::round_toward_neg_infinity)
value |= value >> 15;
return half(binary, value);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static int ilogb(half arg)
{
int exp = arg.data_ & 0x7FFF;
if(!exp)
return ((int)0x80000000);
if(exp < 0x7C00)
{
if(!(exp>>=10))
for(unsigned int m=(arg.data_&0x3FF); m<0x200; m<<=1,--exp) ;
return exp - 15;
}
if(exp > 0x7C00)
return ((int)0x80000000);
return 2147483647;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half logb(half arg)
{
int exp = arg.data_ & 0x7FFF;
if(!exp)
return half(binary, 0xFC00);
if(exp < 0x7C00)
{
if(!(exp>>=10))
for(unsigned int m=(arg.data_&0x3FF); m<0x200; m<<=1,--exp) ;
return half(static_cast<float>(exp-15));
}
if(exp > 0x7C00)
return arg;
return half(binary, 0x7C00);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half nextafter(half from, half to)
{
uint16 fabs = from.data_ & 0x7FFF, tabs = to.data_ & 0x7FFF;
if(fabs > 0x7C00)
return from;
if(tabs > 0x7C00 || from.data_ == to.data_ || !(fabs|tabs))
return to;
if(!fabs)
return half(binary, (to.data_&0x8000)+1);
bool lt = (signbit(from) ? (static_cast<int17>(0x8000)-from.data_) : static_cast<int17>(from.data_)) <
(signbit(to) ? (static_cast<int17>(0x8000)-to.data_) : static_cast<int17>(to.data_));
return half(binary, from.data_+(((from.data_>>15)^static_cast<uint16>(lt))<<1)-1);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half nexttoward(half from, long double to)
{
if(isnan(from))
return from;
long double lfrom = static_cast<long double>(from);
if(builtin_isnan(to) || lfrom == to)
return half(static_cast<float>(to));
if(!(from.data_&0x7FFF))
return half(binary, (static_cast<detail::uint16>(builtin_signbit(to))<<15)+1);
return half(binary, from.data_+(((from.data_>>15)^static_cast<uint16>(lfrom<to))<<1)-1);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half copysign(half x, half y) { return half(binary, x.data_^((x.data_^y.data_)&0x8000)); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static int fpclassify(half arg)
{
unsigned int abs = arg.data_ & 0x7FFF;
if(abs > 0x7C00)
return 0x0100;
if(abs == 0x7C00)
return (0x0100 | 0x0400);
if(abs > 0x3FF)
return 0x0400;
return abs ? (0x0400 | 0x4000) : 0x4000;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isfinite(half arg) { return (arg.data_&0x7C00) != 0x7C00; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isinf(half arg) { return (arg.data_&0x7FFF) == 0x7C00; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isnan(half arg) { return (arg.data_&0x7FFF) > 0x7C00; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isnormal(half arg) { return ((arg.data_&0x7C00)!=0) & ((arg.data_&0x7C00)!=0x7C00); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool signbit(half arg) { return (arg.data_&0x8000) != 0; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isequal(half x, half y) { return (x.data_==y.data_ || !((x.data_|y.data_)&0x7FFF)) && !isnan(x); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isnotequal(half x, half y) { return (x.data_!=y.data_ && ((x.data_|y.data_)&0x7FFF)) || isnan(x); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isgreater(half x, half y) { return !isnan(x) && !isnan(y) && ((signbit(x) ? (static_cast<int17>(0x8000)-x.data_) :
static_cast<int17>(x.data_)) > (signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_))); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isgreaterequal(half x, half y) { return !isnan(x) && !isnan(y) && ((signbit(x) ? (static_cast<int17>(0x8000)-x.data_) :
static_cast<int17>(x.data_)) >= (signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_))); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isless(half x, half y) { return !isnan(x) && !isnan(y) && ((signbit(x) ? (static_cast<int17>(0x8000)-x.data_) :
static_cast<int17>(x.data_)) < (signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_))); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool islessequal(half x, half y) { return !isnan(x) && !isnan(y) && ((signbit(x) ? (static_cast<int17>(0x8000)-x.data_) :
static_cast<int17>(x.data_)) <= (signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_))); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool islessgreater(half x, half y)
{
if(isnan(x) || isnan(y))
return false;
int17 a = signbit(x) ? (static_cast<int17>(0x8000)-x.data_) : static_cast<int17>(x.data_);
int17 b = signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_);
return a < b || a > b;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static bool isunordered(half x, half y) { return isnan(x) || isnan(y); }
#pragma empty_line
private:
static double erf(double arg)
{
if(builtin_isinf(arg))
return (arg<0.0) ? -1.0 : 1.0;
double x2 = static_cast<double>(arg) * static_cast<double>(arg), ax2 = 0.147 * x2;
double value = std::sqrt(1.0-std::exp(-x2*(1.2732395447351626861510701069801+ax2)/(1.0+ax2)));
return builtin_signbit(arg) ? -value : value;
}
#pragma empty_line
static double lgamma(double arg)
{
double v = 1.0;
for(; arg<8.0; ++arg) v *= arg;
double w = 1.0 / (arg * arg);
return (((((((-0.02955065359477124183006535947712*w+0.00641025641025641025641025641026)*w+
-0.00191752691752691752691752691753)*w+8.4175084175084175084175084175084e-4)*w+
-5.952380952380952380952380952381e-4)*w+7.9365079365079365079365079365079e-4)*w+
-0.00277777777777777777777777777778)*w+0.08333333333333333333333333333333)/arg +
0.91893853320467274178032973640562 - std::log(v) - arg + (arg-0.5) * std::log(arg);
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> struct unary_specialized
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half negate(half arg) { return half(binary, arg.data_^0x8000); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static half fabs(half arg) { return half(binary, arg.data_&0x7FFF); }
};
template<> struct unary_specialized<expr>
{
static expr negate(float arg) { return expr(-arg); }
static expr fabs(float arg) { return expr(std::fabs(arg)); }
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> struct binary_specialized
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr fmin(float x, float y)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(builtin_isnan(x))
return expr(y);
if(builtin_isnan(y))
return expr(x);
return expr(std::min(x, y));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static expr fmax(float x, float y)
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(builtin_isnan(x))
return expr(y);
if(builtin_isnan(y))
return expr(x);
return expr(std::max(x, y));
#pragma empty_line
}
};
template<> struct binary_specialized<half,half>
{
static half fmin(half x, half y)
{
if(functions::isnan(x))
return y;
if(functions::isnan(y))
return x;
return ((functions::signbit(x) ? (static_cast<int17>(0x8000)-x.data_) : static_cast<int17>(x.data_)) >
(functions::signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_))) ? y : x;
}
static half fmax(half x, half y)
{
if(functions::isnan(x))
return y;
if(functions::isnan(y))
return x;
return ((functions::signbit(x) ? (static_cast<int17>(0x8000)-x.data_) : static_cast<int17>(x.data_)) <
(functions::signbit(y) ? (static_cast<int17>(0x8000)-y.data_) : static_cast<int17>(y.data_))) ? y : x;
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U,std::float_round_style R=(std::float_round_style)(1)> struct half_caster {};
template<typename U,std::float_round_style R> struct half_caster<half,U,R>
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef half type;
static half cast(U arg) { return cast_impl(arg, is_float<U>()); };
#pragma empty_line
private:
static half cast_impl(U arg, true_type) { return half(binary, float2half<R>(static_cast<float>(arg))); }
static half cast_impl(U arg, false_type) { return half(binary, int2half<R>(arg)); }
};
template<typename T,std::float_round_style R> struct half_caster<T,half,R>
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef T type;
template<typename U> static T cast(U arg) { return cast_impl(arg, is_float<T>()); }
#pragma empty_line
private:
static T cast_impl(float arg, true_type) { return static_cast<T>(arg); }
static T cast_impl(half arg, false_type) { return half2int<R,T>(arg.data_); }
};
template<typename T,std::float_round_style R> struct half_caster<T,expr,R> : public half_caster<T,half,R> {};
template<std::float_round_style R> struct half_caster<half,half,R>
{
typedef half type;
static half cast(half arg) { return arg; }
};
template<std::float_round_style R> struct half_caster<half,expr,R> : public half_caster<half,half,R> {};
#pragma line 2082 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T,typename U> typename enable<bool,T,U>::type operator==(T x, U y) { return functions::isequal(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<bool,T,U>::type operator!=(T x, U y) { return functions::isnotequal(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<bool,T,U>::type operator<(T x, U y) { return functions::isless(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<bool,T,U>::type operator>(T x, U y) { return functions::isgreater(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<bool,T,U>::type operator<=(T x, U y) { return functions::islessequal(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<bool,T,U>::type operator>=(T x, U y) { return functions::isgreaterequal(x, y); }
#pragma line 2127 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T,typename U> typename enable<expr,T,U>::type operator+(T x, U y) { return functions::plus(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<expr,T,U>::type operator-(T x, U y) { return functions::minus(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<expr,T,U>::type operator*(T x, U y) { return functions::multiplies(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T,typename U> typename enable<expr,T,U>::type operator/(T x, U y) { return functions::divides(x, y); }
#pragma empty_line
#pragma empty_line
template<typename F>
half math_function_1arg(F f, half x) {
half res;
xip_fpo_t rop, xop;
xip_fpo_inits2(5, 11, rop, xop, (xip_fpo_ptr)0);
x.xip_fpo_get_data(xop);
f(rop, xop);
res.xip_fpo_set_data(rop);
xip_fpo_clears(rop, xop, (xip_fpo_ptr)0);
return res;
}
#pragma empty_line
template<typename F>
half binary_operator(F f, half x, half y) {
half res;
xip_fpo_t op, xop, yop;
xip_fpo_inits2(5, 11, op, xop, yop, (xip_fpo_ptr)0);
x.xip_fpo_get_data(xop);
y.xip_fpo_get_data(yop);
f(op, xop, yop);
res.xip_fpo_set_data(op);
xip_fpo_clears(op, xop, yop, (xip_fpo_ptr)0);
return res;
}
#pragma empty_line
template<> inline enable<expr, half, half>::type operator+<half, half>(half x, half y) { return binary_operator(xip_fpo_add, x, y); }
template<> inline enable<expr, half, half>::type operator-<half, half>(half x, half y) { return binary_operator(xip_fpo_sub, x, y); }
template<> inline enable<expr, half, half>::type operator*<half, half>(half x, half y) { return binary_operator(xip_fpo_mul, x, y); }
template<> inline enable<expr, half, half>::type operator/<half, half>(half x, half y) { return binary_operator(xip_fpo_div, x, y); }
#pragma line 2187 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T> typename enable<T,T>::type operator+(T arg) { return arg; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> typename enable<T,T>::type operator-(T arg) { return unary_specialized<T>::negate(arg); }
#pragma line 2202 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T,typename charT,typename traits> typename enable<std::basic_ostream<charT,traits>&,T>::type
operator<<(std::basic_ostream<charT,traits> &out, T arg) { return functions::write(out, arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename charT,typename traits> std::basic_istream<charT,traits>&
operator>>(std::basic_istream<charT,traits> &in, half &arg) { return functions::read(in, arg); }
#pragma line 2220 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline half abs(half arg) { return unary_specialized<half>::fabs(arg); }
inline expr abs(expr arg) { return unary_specialized<expr>::fabs(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half fabs(half arg) { return unary_specialized<half>::fabs(arg); }
inline expr fabs(expr arg) { return unary_specialized<expr>::fabs(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr fmod(half x, half y) { return functions::fmod(x, y); }
inline expr fmod(half x, expr y) { return functions::fmod(x, y); }
inline expr fmod(expr x, half y) { return functions::fmod(x, y); }
inline expr fmod(expr x, expr y) { return functions::fmod(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr remainder(half x, half y) { return functions::remainder(x, y); }
inline expr remainder(half x, expr y) { return functions::remainder(x, y); }
inline expr remainder(expr x, half y) { return functions::remainder(x, y); }
inline expr remainder(expr x, expr y) { return functions::remainder(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr remquo(half x, half y, int *quo) { return functions::remquo(x, y, quo); }
inline expr remquo(half x, expr y, int *quo) { return functions::remquo(x, y, quo); }
inline expr remquo(expr x, half y, int *quo) { return functions::remquo(x, y, quo); }
inline expr remquo(expr x, expr y, int *quo) { return functions::remquo(x, y, quo); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr fma(half x, half y, half z) { return functions::fma(x, y, z); }
inline expr fma(half x, half y, expr z) { return functions::fma(x, y, z); }
inline expr fma(half x, expr y, half z) { return functions::fma(x, y, z); }
inline expr fma(half x, expr y, expr z) { return functions::fma(x, y, z); }
inline expr fma(expr x, half y, half z) { return functions::fma(x, y, z); }
inline expr fma(expr x, half y, expr z) { return functions::fma(x, y, z); }
inline expr fma(expr x, expr y, half z) { return functions::fma(x, y, z); }
inline expr fma(expr x, expr y, expr z) { return functions::fma(x, y, z); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half fmax(half x, half y) { return binary_specialized<half,half>::fmax(x, y); }
inline expr fmax(half x, expr y) { return binary_specialized<half,expr>::fmax(x, y); }
inline expr fmax(expr x, half y) { return binary_specialized<expr,half>::fmax(x, y); }
inline expr fmax(expr x, expr y) { return binary_specialized<expr,expr>::fmax(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half fmin(half x, half y) { return binary_specialized<half,half>::fmin(x, y); }
inline expr fmin(half x, expr y) { return binary_specialized<half,expr>::fmin(x, y); }
inline expr fmin(expr x, half y) { return binary_specialized<expr,half>::fmin(x, y); }
inline expr fmin(expr x, expr y) { return binary_specialized<expr,expr>::fmin(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr fdim(half x, half y) { return functions::fdim(x, y); }
inline expr fdim(half x, expr y) { return functions::fdim(x, y); }
inline expr fdim(expr x, half y) { return functions::fdim(x, y); }
inline expr fdim(expr x, expr y) { return functions::fdim(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half nanh(const char *arg) { return functions::nanh(arg); }
#pragma line 2319 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline expr exp(half arg) { return functions::exp(arg); }
inline expr exp(expr arg) { return functions::exp(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr expm1(half arg) { return functions::expm1(arg); }
inline expr expm1(expr arg) { return functions::expm1(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr exp2(half arg) { return functions::exp2(arg); }
inline expr exp2(expr arg) { return functions::exp2(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr log(half arg) { return functions::log(arg); }
inline expr log(expr arg) { return functions::log(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr log10(half arg) { return functions::log10(arg); }
inline expr log10(expr arg) { return functions::log10(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr log1p(half arg) { return functions::log1p(arg); }
inline expr log1p(expr arg) { return functions::log1p(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr log2(half arg) { return functions::log2(arg); }
inline expr log2(expr arg) { return functions::log2(arg); }
#pragma line 2375 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline half sqrt(half arg) { return math_function_1arg(xip_fpo_sqrt, arg); }
#pragma empty_line
inline expr sqrt(expr arg) { return functions::sqrt(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr cbrt(half arg) { return functions::cbrt(arg); }
inline expr cbrt(expr arg) { return functions::cbrt(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr hypot(half x, half y) { return functions::hypot(x, y); }
inline expr hypot(half x, expr y) { return functions::hypot(x, y); }
inline expr hypot(expr x, half y) { return functions::hypot(x, y); }
inline expr hypot(expr x, expr y) { return functions::hypot(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr pow(half base, half exp) { return functions::pow(base, exp); }
inline expr pow(half base, expr exp) { return functions::pow(base, exp); }
inline expr pow(expr base, half exp) { return functions::pow(base, exp); }
inline expr pow(expr base, expr exp) { return functions::pow(base, exp); }
#pragma line 2414 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline expr sin(half arg) { return functions::sin(arg); }
inline expr sin(expr arg) { return functions::sin(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr cos(half arg) { return functions::cos(arg); }
inline expr cos(expr arg) { return functions::cos(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr tan(half arg) { return functions::tan(arg); }
inline expr tan(expr arg) { return functions::tan(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr asin(half arg) { return functions::asin(arg); }
inline expr asin(expr arg) { return functions::asin(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr acos(half arg) { return functions::acos(arg); }
inline expr acos(expr arg) { return functions::acos(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr atan(half arg) { return functions::atan(arg); }
inline expr atan(expr arg) { return functions::atan(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr atan2(half x, half y) { return functions::atan2(x, y); }
inline expr atan2(half x, expr y) { return functions::atan2(x, y); }
inline expr atan2(expr x, half y) { return functions::atan2(x, y); }
inline expr atan2(expr x, expr y) { return functions::atan2(x, y); }
#pragma line 2470 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline expr sinh(half arg) { return functions::sinh(arg); }
inline expr sinh(expr arg) { return functions::sinh(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr cosh(half arg) { return functions::cosh(arg); }
inline expr cosh(expr arg) { return functions::cosh(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr tanh(half arg) { return functions::tanh(arg); }
inline expr tanh(expr arg) { return functions::tanh(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr asinh(half arg) { return functions::asinh(arg); }
inline expr asinh(expr arg) { return functions::asinh(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr acosh(half arg) { return functions::acosh(arg); }
inline expr acosh(expr arg) { return functions::acosh(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr atanh(half arg) { return functions::atanh(arg); }
inline expr atanh(expr arg) { return functions::atanh(arg); }
#pragma line 2516 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline expr erf(half arg) { return functions::erf(arg); }
inline expr erf(expr arg) { return functions::erf(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr erfc(half arg) { return functions::erfc(arg); }
inline expr erfc(expr arg) { return functions::erfc(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr lgamma(half arg) { return functions::lgamma(arg); }
inline expr lgamma(expr arg) { return functions::lgamma(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline expr tgamma(half arg) { return functions::tgamma(arg); }
inline expr tgamma(expr arg) { return functions::tgamma(arg); }
#pragma line 2548 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline half ceil(half arg) { return functions::ceil(arg); }
inline half ceil(expr arg) { return functions::ceil(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half floor(half arg) { return functions::floor(arg); }
inline half floor(expr arg) { return functions::floor(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half trunc(half arg) { return functions::trunc(arg); }
inline half trunc(expr arg) { return functions::trunc(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half round(half arg) { return functions::round(arg); }
inline half round(expr arg) { return functions::round(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline long lround(half arg) { return functions::lround(arg); }
inline long lround(expr arg) { return functions::lround(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half nearbyint(half arg) { return functions::rint(arg); }
inline half nearbyint(expr arg) { return functions::rint(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half rint(half arg) { return functions::rint(arg); }
inline half rint(expr arg) { return functions::rint(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline long lrint(half arg) { return functions::lrint(arg); }
inline long lrint(expr arg) { return functions::lrint(arg); }
#pragma line 2624 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline half frexp(half arg, int *exp) { return functions::frexp(arg, exp); }
inline half frexp(expr arg, int *exp) { return functions::frexp(arg, exp); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half ldexp(half arg, int exp) { return functions::scalbln(arg, exp); }
inline half ldexp(expr arg, int exp) { return functions::scalbln(arg, exp); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half modf(half arg, half *iptr) { return functions::modf(arg, iptr); }
inline half modf(expr arg, half *iptr) { return functions::modf(arg, iptr); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half scalbn(half arg, int exp) { return functions::scalbln(arg, exp); }
inline half scalbn(expr arg, int exp) { return functions::scalbln(arg, exp); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half scalbln(half arg, long exp) { return functions::scalbln(arg, exp); }
inline half scalbln(expr arg, long exp) { return functions::scalbln(arg, exp); }
#pragma line 2666 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline int ilogb(half arg) { return functions::ilogb(arg); }
inline int ilogb(expr arg) { return functions::ilogb(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half logb(half arg) { return functions::logb(arg); }
inline half logb(expr arg) { return functions::logb(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half nextafter(half from, half to) { return functions::nextafter(from, to); }
inline half nextafter(half from, expr to) { return functions::nextafter(from, to); }
inline half nextafter(expr from, half to) { return functions::nextafter(from, to); }
inline half nextafter(expr from, expr to) { return functions::nextafter(from, to); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half nexttoward(half from, long double to) { return functions::nexttoward(from, to); }
inline half nexttoward(expr from, long double to) { return functions::nexttoward(from, to); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline half copysign(half x, half y) { return functions::copysign(x, y); }
inline half copysign(half x, expr y) { return functions::copysign(x, y); }
inline half copysign(expr x, half y) { return functions::copysign(x, y); }
inline half copysign(expr x, expr y) { return functions::copysign(x, y); }
#pragma line 2717 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline int fpclassify(half arg) { return functions::fpclassify(arg); }
inline int fpclassify(expr arg) { return functions::fpclassify(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isfinite(half arg) { return functions::isfinite(arg); }
inline bool isfinite(expr arg) { return functions::isfinite(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isinf(half arg) { return functions::isinf(arg); }
inline bool isinf(expr arg) { return functions::isinf(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isnan(half arg) { return functions::isnan(arg); }
inline bool isnan(expr arg) { return functions::isnan(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isnormal(half arg) { return functions::isnormal(arg); }
inline bool isnormal(expr arg) { return functions::isnormal(arg); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool signbit(half arg) { return functions::signbit(arg); }
inline bool signbit(expr arg) { return functions::signbit(arg); }
#pragma line 2770 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
inline bool isgreater(half x, half y) { return functions::isgreater(x, y); }
inline bool isgreater(half x, expr y) { return functions::isgreater(x, y); }
inline bool isgreater(expr x, half y) { return functions::isgreater(x, y); }
inline bool isgreater(expr x, expr y) { return functions::isgreater(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isgreaterequal(half x, half y) { return functions::isgreaterequal(x, y); }
inline bool isgreaterequal(half x, expr y) { return functions::isgreaterequal(x, y); }
inline bool isgreaterequal(expr x, half y) { return functions::isgreaterequal(x, y); }
inline bool isgreaterequal(expr x, expr y) { return functions::isgreaterequal(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isless(half x, half y) { return functions::isless(x, y); }
inline bool isless(half x, expr y) { return functions::isless(x, y); }
inline bool isless(expr x, half y) { return functions::isless(x, y); }
inline bool isless(expr x, expr y) { return functions::isless(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool islessequal(half x, half y) { return functions::islessequal(x, y); }
inline bool islessequal(half x, expr y) { return functions::islessequal(x, y); }
inline bool islessequal(expr x, half y) { return functions::islessequal(x, y); }
inline bool islessequal(expr x, expr y) { return functions::islessequal(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool islessgreater(half x, half y) { return functions::islessgreater(x, y); }
inline bool islessgreater(half x, expr y) { return functions::islessgreater(x, y); }
inline bool islessgreater(expr x, half y) { return functions::islessgreater(x, y); }
inline bool islessgreater(expr x, expr y) { return functions::islessgreater(x, y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline bool isunordered(half x, half y) { return functions::isunordered(x, y); }
inline bool isunordered(half x, expr y) { return functions::isunordered(x, y); }
inline bool isunordered(expr x, half y) { return functions::isunordered(x, y); }
inline bool isunordered(expr x, expr y) { return functions::isunordered(x, y); }
#pragma line 2847 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T,typename U> typename half_caster<T,U>::type half_cast(U arg) { return half_caster<T,U>::cast(arg); }
#pragma line 2864 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
template<typename T,std::float_round_style R,typename U> typename half_caster<T,U,R>::type half_cast(U arg)
{ return half_caster<T,U,R>::cast(arg); }
#pragma empty_line
}
#pragma empty_line
using detail::operator==;
using detail::operator!=;
using detail::operator<;
using detail::operator>;
using detail::operator<=;
using detail::operator>=;
using detail::operator+;
using detail::operator-;
using detail::operator*;
using detail::operator/;
using detail::operator<<;
using detail::operator>>;
#pragma empty_line
using detail::abs;
using detail::fabs;
using detail::fmod;
using detail::remainder;
using detail::remquo;
using detail::fma;
using detail::fmax;
using detail::fmin;
using detail::fdim;
using detail::nanh;
using detail::exp;
using detail::expm1;
using detail::exp2;
using detail::log;
using detail::log10;
using detail::log1p;
using detail::log2;
using detail::sqrt;
using detail::cbrt;
using detail::hypot;
#pragma empty_line
using detail::sin;
using detail::cos;
using detail::tan;
using detail::asin;
using detail::acos;
using detail::atan;
using detail::atan2;
using detail::sinh;
using detail::cosh;
using detail::tanh;
using detail::asinh;
using detail::acosh;
using detail::atanh;
using detail::erf;
using detail::erfc;
using detail::lgamma;
using detail::tgamma;
using detail::ceil;
using detail::floor;
using detail::trunc;
using detail::round;
using detail::lround;
using detail::nearbyint;
using detail::rint;
using detail::lrint;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
using detail::frexp;
using detail::ldexp;
using detail::modf;
using detail::scalbn;
using detail::scalbln;
using detail::ilogb;
using detail::logb;
using detail::nextafter;
using detail::nexttoward;
using detail::copysign;
using detail::fpclassify;
using detail::isfinite;
using detail::isinf;
using detail::isnan;
using detail::isnormal;
using detail::signbit;
using detail::isgreater;
using detail::isgreaterequal;
using detail::isless;
using detail::islessequal;
using detail::islessgreater;
using detail::isunordered;
#pragma empty_line
using detail::half_cast;
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<> struct numeric_limits<half> : public numeric_limits<float>
{
public:
#pragma empty_line
static const bool is_signed = true;
#pragma empty_line
#pragma empty_line
static const bool is_exact = false;
#pragma empty_line
#pragma empty_line
static const bool is_modulo = false;
#pragma empty_line
#pragma empty_line
static const bool is_iec559 = true;
#pragma empty_line
#pragma empty_line
static const bool has_infinity = true;
#pragma empty_line
#pragma empty_line
static const bool has_quiet_NaN = true;
#pragma empty_line
#pragma empty_line
static const float_denorm_style has_denorm = denorm_present;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const float_round_style round_style = (std::numeric_limits<float>::round_style==
half::round_style) ? half::round_style : round_indeterminate;
#pragma empty_line
#pragma empty_line
static const int digits = 11;
#pragma empty_line
#pragma empty_line
static const int digits10 = 3;
#pragma empty_line
#pragma empty_line
static const int max_digits10 = 5;
#pragma empty_line
#pragma empty_line
static const int radix = 2;
#pragma empty_line
#pragma empty_line
static const int min_exponent = -13;
#pragma empty_line
#pragma empty_line
static const int min_exponent10 = -4;
#pragma empty_line
#pragma empty_line
static const int max_exponent = 16;
#pragma empty_line
#pragma empty_line
static const int max_exponent10 = 4;
#pragma empty_line
#pragma empty_line
static half min() throw() { return half(detail::binary, 0x0400); }
#pragma empty_line
#pragma empty_line
static half lowest() throw() { return half(detail::binary, 0xFBFF); }
#pragma empty_line
#pragma empty_line
static half max() throw() { return half(detail::binary, 0x7BFF); }
#pragma empty_line
#pragma empty_line
static half epsilon() throw() { return half(detail::binary, 0x1400); }
#pragma empty_line
#pragma empty_line
static half round_error() throw()
{ return half(detail::binary, (round_style==std::round_to_nearest) ? 0x3800 : 0x3C00); }
#pragma empty_line
#pragma empty_line
static half infinity() throw() { return half(detail::binary, 0x7C00); }
#pragma empty_line
#pragma empty_line
static half quiet_NaN() throw() { return half(detail::binary, 0x7FFF); }
#pragma empty_line
#pragma empty_line
static half signaling_NaN() throw() { return half(detail::binary, 0x7DFF); }
#pragma empty_line
#pragma empty_line
static half denorm_min() throw() { return half(detail::binary, 0x0001); }
};
#pragma line 3066 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_half.h"
}
#pragma line 38 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h" 2
#pragma line 70 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
namespace hls {
#pragma empty_line
template<typename T>
class numeric_limits {
public:
static T max() { return std::numeric_limits<T>::max(); }
static T min() { return std::numeric_limits<T>::min(); }
static T epsilon() { return std::numeric_limits<T>::epsilon(); }
};
#pragma empty_line
template <int W, int I, ap_q_mode Q, ap_o_mode O>
class numeric_limits<ap_fixed<W,I,Q,O> > {
public:
static ap_fixed<W,I,Q,O> max() {
ap_int<W> m = ::hls::numeric_limits<ap_int<W> >::max();
ap_fixed<W,I,Q,O> x;
x(W-1,0) = m(W-1,0);
return x;
}
static ap_fixed<W,I,Q,O> min() {
ap_int<W> m = ::hls::numeric_limits<ap_int<W> >::min();
ap_fixed<W,I,Q,O> x;
x(W-1,0) = m(W-1,0);
return x;
}
static ap_fixed<W,I,Q,O> epsilon() {
ap_fixed<W,I,Q,O> x = 0;
x[0] = 1;
#pragma empty_line
return x;
}
};
#pragma empty_line
template <int W, int I, ap_q_mode Q, ap_o_mode O>
class numeric_limits<ap_ufixed<W,I,Q,O> > {
public:
static ap_ufixed<W,I,Q,O> max() {
ap_uint<W> m = ::hls::numeric_limits<ap_uint<W> >::max();
ap_ufixed<W,I,Q,O> x;
x(W-1,0) = m(W-1,0);
return x;
}
static ap_ufixed<W,I,Q,O> min() { return 0; }
static ap_ufixed<W,I,Q,O> epsilon() {
ap_ufixed<W,I,Q,O> x = 0;
x[0] = 1;
return x;
}
};
#pragma empty_line
template <int W>
class numeric_limits<ap_int<W> > {
public:
static ap_int<W> max() { ap_int<W> m = min(); return ~m; }
static ap_int<W> min() { ap_int<W> m = 0; m[W-1] = 1; return m; }
static ap_int<W> epsilon() {
ap_int<W> x = 0;
x[0] = 1;
return x;
}
};
#pragma empty_line
template <int W>
class numeric_limits<ap_uint<W> > {
public:
static ap_uint<W> max() { ap_uint<W> zero = 0; return ~zero; }
static ap_uint<W> min() { return 0; }
static ap_uint<W> epsilon() {
ap_uint<W> x = 0;
x[0] = 1;
return x;
}
};
#pragma empty_line
template <int W, int I>
ap_ufixed<W,I> abs(ap_ufixed<W,I> x) {
return x;
}
#pragma empty_line
template <int W, int I>
ap_ufixed<W,I> abs(ap_fixed<W,I> x) {
ap_ufixed<W,I> xw = x;
ap_ufixed<W,I> xn = -x;
return (x < 0) ? xn: xw;
}
#pragma empty_line
template <int W>
ap_uint<W> abs(ap_uint<W> x) {
return x;
}
template <int W>
ap_uint<W> abs(ap_int<W> x) {
ap_int<W+1> xw = x;
return (x < 0) ? -xw: xw;
}
static
float abs(float x) {
return fabsf(x);
}
static
double abs(double x) {
return fabs(x);
}
static
int abs(int x) {
return std::abs(x);
}
static
long int abs(long int x) {
return std::abs(x);
}
}
#pragma empty_line
static
const
uint32_t pow2(uint32_t e)
{
switch(e) {
case 0: return 1; break;
case 1: return 2; break;
case 2: return 4; break;
case 3: return 8; break;
case 4: return 16; break;
case 5: return 32; break;
case 6: return 64; break;
case 7: return 128; break;
case 8: return 256; break;
case 9: return 512; break;
case 10: return 1024; break;
case 11: return 2048; break;
default: return 0;
}
}
#pragma empty_line
template<class T>
T reg(T in)
{
#pragma empty_line
#pragma HLS INLINE self off
#pragma HLS INTERFACE ap_none port=return register
#pragma empty_line
return in;
}
#pragma line 227 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
static
float to_float(float v)
{
return v;
}
#pragma empty_line
template<int _W, int _I>
float to_float(ap_fixed<_W, _I> v)
{
return v.to_float();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<class _T>
void set_to_one(_T &a)
{
a = 1.0f;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int _W, int _I>
void set_to_one(ap_fixed<_W,_I> &a)
{
ap_int<_W> tmp_sat = pow((double)2,(double)(_W-_I))-1;
a.range() = tmp_sat;
}
#pragma line 270 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template<int _W, int _I>
void set_to_max(ap_fixed<_W,_I> &a)
{
ap_int<_W> tmp_sat = pow((double)2,(double)_W)-1;
a.range() = tmp_sat;
}
#pragma line 284 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template <typename T>
class fp_struct
{
};
#pragma empty_line
union single_cast {
float f;
uint32_t i;
};
#pragma empty_line
template <>
class fp_struct<float>
{
public:
const static unsigned int EXP_BIAS = 127;
const static unsigned int EXP_BITS = 8;
const static unsigned int SIG_BITS = 23;
#pragma empty_line
fp_struct() {
}
fp_struct(float f) {
#pragma empty_line
#pragma empty_line
union single_cast dc;
dc.f = f;
ap_uint<32> data = dc.i;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
sign[0] = data[31];
exp(7,0)= data(30,23);
sig(22,0)= data(22,0);
}
fp_struct(ap_uint<32> data) {
sign[0] = data[31];
exp(7,0)= data(30,23);
sig(22,0)= data(22,0);
}
fp_struct(uint32_t i) {
ap_uint<32> data = i;
sign[0] = data[31];
exp(7,0)= data(30,23);
sig(22,0)= data(22,0);
}
inline ap_uint<32> data() const {
ap_uint<32> t;
t[31] = sign[0];
t(30,23) = exp(7,0);
t(22,0) = sig(22,0);
return t;
}
inline int expv() const {
return exp-127;
}
inline int to_int() const {
return data().to_uint();
}
inline float to_float() const {
#pragma empty_line
#pragma empty_line
union single_cast ret;
ret.i = data().to_uint();
return ret.f;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
inline void set_mantissa(ap_ufixed<1+SIG_BITS,1> mantissa) {
ap_ufixed<SIG_BITS,0> significand = mantissa;
sig = significand(SIG_BITS-1,0);
}
inline ap_ufixed<1+SIG_BITS,1> mantissa() const {
ap_ufixed<1+SIG_BITS,1> y = 0;
y(y.wl()-1,0) = sig(SIG_BITS-1,0);
y[y.wl()-1] = 1;
return y;
}
inline float to_ieee() const {
return to_float();
}
inline int __signbit() const {
return sign.to_int();
}
#pragma empty_line
static float infinity() {
fp_struct<float> x;
x.sign = 0;
x.exp = -1;
x.sig = 0;
return x.to_ieee();
}
#pragma empty_line
static float minus_infinity() {
fp_struct<float> x;
x.sign = 1;
x.exp = -1;
x.sig = 0;
return x.to_ieee();
}
#pragma empty_line
typedef ap_uint<32> data_type;
ap_uint<1> sign;
ap_uint<EXP_BITS> exp;
ap_uint<SIG_BITS> sig;
};
#pragma empty_line
static
std::ostream &operator << (std::ostream &os, const fp_struct<float> &s)
{
#pragma empty_line
#pragma empty_line
os << s.to_float();
os << " (sign: " << s.sign << ", exp: " << s.exp << ", sig: ";
os << s.sig.to_string(8);
os << " " << s.sig.to_string(2);
os << ")";
#pragma empty_line
#pragma empty_line
return os;
}
#pragma empty_line
static
void
castSingle(
float din,
fp_struct<float> &dout)
{
fp_struct<float> t(din);
dout = t;
}
#pragma empty_line
static
float
castSingle(
fp_struct<float> din)
{
return din.to_float();
}
#pragma empty_line
static
void
dumpSingle(
float da,
fp_struct<float> ds)
{
#pragma line 444 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
union double_cast {
double d;
uint64_t i;
};
#pragma empty_line
template <>
class fp_struct<double>
{
public:
const static unsigned int EXP_BIAS = 1023;
const static unsigned int EXP_BITS = 11;
const static unsigned int SIG_BITS = 52;
fp_struct() {
}
fp_struct(double f) {
union double_cast dc;
dc.d = f;
ap_uint<64> data = dc.i;
sign[0] = data[63];
exp(10,0) = data(62,52);
sig(51,0) = data(51,0);
}
fp_struct(ap_uint<64> data) {
sign[0] = data[63];
exp(10,0) = data(62,52);
sig(51,0) = data(51,0);
}
fp_struct(uint64_t i) {
ap_uint<64> data = i;
sign[0] = data[EXP_BITS+SIG_BITS+1-1];
exp(EXP_BITS-1,0) = data(EXP_BITS-1+SIG_BITS,SIG_BITS);
sig(SIG_BITS-1,0) = data(SIG_BITS-1,0);
}
inline ap_uint<64> data() const {
ap_uint<64> t;
t[EXP_BITS+SIG_BITS+1-1] = sign[0];
t(EXP_BITS-1+SIG_BITS,SIG_BITS) = exp(EXP_BITS-1,0);
t(SIG_BITS-1,0) = sig(SIG_BITS-1,0);
return t;
}
inline long long to_int() const {
return data().to_uint64();
}
inline int expv() const {
return exp-1023;
}
inline ap_uint<20> sig_msb() const {
return sig(51,32);
}
inline ap_uint<32> sig_lsb() const {
return sig(31,0);
}
inline double to_double() const {
union double_cast ret;
ret.i = data().to_uint64();
return ret.d;
}
inline void set_mantissa(ap_ufixed<1+SIG_BITS,1> mantissa) {
ap_ufixed<SIG_BITS,0> significand = mantissa;
sig = significand(SIG_BITS-1,0);
}
inline ap_ufixed<1+SIG_BITS,1> mantissa() const {
ap_ufixed<1+SIG_BITS,1> y = 0;
y(y.wl()-1,0) = sig(SIG_BITS-1,0);
y[y.wl()-1] = 1;
return y;
}
inline double to_ieee() const {
return to_double();
}
inline int __signbit() const {
return sign.to_int();
}
#pragma empty_line
static double infinity() {
fp_struct<double> x;
x.sign = 0;
x.exp = -1;
x.sig = 0;
return x.to_ieee();
}
#pragma empty_line
static double minus_infinity() {
fp_struct<double> x;
x.sign = 1;
x.exp = -1;
x.sig = 0;
return x.to_ieee();
}
#pragma empty_line
typedef uint64_t inttype;
typedef ap_uint<64> data_type;
ap_uint<1> sign;
ap_uint<EXP_BITS> exp;
ap_uint<SIG_BITS> sig;
};
#pragma empty_line
static
std::ostream &operator << (std::ostream &os, const fp_struct<double> &s)
{
#pragma empty_line
#pragma empty_line
os << s.to_double() << " (sign: " << s.sign << ", exp: " << s.exp << ", sig: " << s.sig << " " << s.sig.to_string(2,true) << ")";
#pragma empty_line
#pragma empty_line
return os;
}
#pragma empty_line
static
void
castDouble(
double din,
fp_struct<double> &dout)
{
fp_struct<double> t(din);
dout = t;
}
#pragma empty_line
static
double
castDouble(
fp_struct<double> din)
{
return din.to_double();
}
#pragma empty_line
static
void
dumpDouble(
double da,
fp_struct<double> ds)
{
#pragma line 593 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
}
#pragma line 602 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template <>
class fp_struct<half>
{
public:
const static unsigned int EXP_BIAS = 15;
const static unsigned int EXP_BITS = 5;
const static unsigned int SIG_BITS = 10;
#pragma empty_line
fp_struct() {
}
fp_struct(half f) {
#pragma empty_line
ap_uint<16> data = (uint16_t)f.get_bits();
sign[0] = data[EXP_BITS+SIG_BITS+1-1];
exp(EXP_BITS-1,0) = data(EXP_BITS-1+SIG_BITS,SIG_BITS);
sig(SIG_BITS-1,0) = data(SIG_BITS-1,0);
}
fp_struct(ap_uint<16> data) {
sign[0] = data[EXP_BITS+SIG_BITS+1-1];
exp(EXP_BITS-1,0) = data(EXP_BITS-1+SIG_BITS,SIG_BITS);
sig(SIG_BITS-1,0) = data(SIG_BITS-1,0);
}
fp_struct(uint16_t i) {
ap_uint<16> data = i;
sign[0] = data[EXP_BITS+SIG_BITS+1-1];
exp(EXP_BITS-1,0) = data(EXP_BITS-1+SIG_BITS,SIG_BITS);
sig(SIG_BITS-1,0) = data(SIG_BITS-1,0);
}
inline ap_uint<16> data() const {
ap_uint<16> t;
t[EXP_BITS+SIG_BITS+1-1] = sign[0];
t(EXP_BITS-1+SIG_BITS,SIG_BITS) = exp(EXP_BITS-1,0);
t(SIG_BITS-1,0) = sig(SIG_BITS-1,0);
return t;
}
inline int expv() const {
return exp-EXP_BIAS;
}
inline uint16_t to_int() const {
return uint16_t(data().to_uint());
}
inline half to_half() const {
#pragma empty_line
half h;
h.set_bits(detail::uint16(data().to_uint()));
return h;
}
inline void set_mantissa(ap_ufixed<1+SIG_BITS,1> mantissa) {
ap_ufixed<SIG_BITS,0> significand = mantissa;
sig = significand(SIG_BITS-1,0);
}
inline ap_ufixed<1+SIG_BITS,1> mantissa() const {
ap_ufixed<1+SIG_BITS,1> y = 0;
y(y.wl()-1,0) = sig(SIG_BITS-1,0);
y[y.wl()-1] = 1;
return y;
}
inline half to_ieee() const {
return to_half();
}
inline int __signbit() const {
return sign.to_int();
}
#pragma empty_line
static half infinity() {
fp_struct<half> x;
x.sign = 0;
x.exp = -1;
x.sig = 0;
return x.to_ieee();
}
#pragma empty_line
static half minus_infinity() {
fp_struct<half> x;
x.sign = 1;
x.exp = -1;
x.sig = 0;
return x.to_ieee();
}
#pragma empty_line
typedef ap_uint<16> data_type;
ap_uint<1> sign;
ap_uint<EXP_BITS> exp;
ap_uint<SIG_BITS> sig;
};
#pragma empty_line
static
std::ostream &operator << (std::ostream &os, const fp_struct<half> &s)
{
#pragma empty_line
#pragma empty_line
os << s.to_half() << " (sign: " << s.sign << ", exp: " << s.exp << ", sig: " << s.sig << " " << s.sig.to_string(2,true) << ")";
#pragma empty_line
#pragma empty_line
return os;
}
#pragma empty_line
static
void
castHalf(
half din,
fp_struct<half> &dout)
{
fp_struct<half> t(din);
dout = t;
}
#pragma empty_line
static
half
castHalf(
fp_struct<half> din)
{
return din.to_half();
}
#pragma empty_line
static
void
dumpHalf(
half da,
fp_struct<half> ds)
{
#pragma line 732 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
}
#pragma line 747 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template < unsigned int _Base, unsigned int _Num >
class Power
{
public:
static const unsigned int Value = _Base * Power< _Base, _Num - 1 >::Value;
};
#pragma empty_line
template < unsigned int _Base >
class Power< _Base, 0 >
{
public:
static const unsigned int Value = 1;
};
#pragma line 769 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template < unsigned int _Num, unsigned int _I=_Num/2>
class BitWidth
{
public:
static const unsigned int Value = 1 + BitWidth<_Num,_I/2>::Value;
};
#pragma empty_line
template <unsigned int _Num>
class BitWidth<_Num, 0>
{
public:
static const unsigned int Value = 1;
};
#pragma line 790 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template < typename T >
class Type_BitWidth
{
public:
static const unsigned int Value = 8*sizeof(T);
};
#pragma empty_line
template <int W >
class Type_BitWidth< ap_uint<W> >
{
public:
static const unsigned int Value = W;
};
#pragma empty_line
template < int W >
class Type_BitWidth< ap_int<W> >
{
public:
static const unsigned int Value = W;
};
#pragma empty_line
template < int W, int I >
class Type_BitWidth< ap_ufixed<W, I> >
{
public:
static const unsigned int Value = W;
};
#pragma empty_line
template < int W, int I >
class Type_BitWidth< ap_fixed<W, I> >
{
public:
static const unsigned int Value = W;
};
#pragma line 845 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template < unsigned int _DIM, unsigned int _I=_DIM>
class LowerTri : public LowerTri<_DIM, _I-1>
{
public:
static const int dummy;
static const unsigned int Size = _I + LowerTri<_DIM,_I-1>::Size;
};
#pragma empty_line
template < unsigned int _DIM>
class LowerTri<_DIM, 0>
{
public:
static const int dummy;
static const unsigned int Size = 0;
};
#pragma empty_line
template <int _MAX, int _I>
class LowerTriApply
{
public:
static int rowApply() {
int max = _MAX;
int i = _I;
int index = 0;
int row[max];
int dim = (int)(sqrtf(0.25+2*max)-0.5);
for(int ii=0; ii<dim; ii++) {
for(int jj=0; jj<ii+1; jj++) {
row[index] = ii;
index++;
}
}
return row[i];
}
#pragma empty_line
static int colApply() {
int max = _MAX;
int i = _I;
int index = 0;
int col[max];
int dim = (int)(sqrtf(0.25+2*max)-0.5);
for(int ii=0; ii<dim; ii++) {
for(int jj=0; jj<ii+1; jj++) {
col[index] = jj;
index++;
}
}
return col[i];
}
#pragma empty_line
static int sizeApply() {
int max = _MAX;
int i = _I;
int size[max];
size[0] = 0;
for(int ii=1; ii<max; ii++) {
size[ii] = size[ii-1]+ii;
if(i == ii) { return size[i]; }
}
return size[i];
}
};
#pragma empty_line
template < int _DIM, int _Num=LowerTri<_DIM>::Size, int _I=_Num-1>
class LowerTriDim : public LowerTriDim<_DIM,_Num,_I-1>
{
public:
static const int dummy;
static const int dummy2;
static const int dummy3;
};
#pragma empty_line
template < int _DIM, int _Num>
class LowerTriDim<_DIM, _Num, 0>
{
public:
static const int dummy;
static const int dummy2;
static const int dummy3;
static int RowLookup[_Num];
static int ColLookup[_Num];
static int SizeLookup[_DIM];
};
#pragma empty_line
template < int _DIM, int _Num, int _I>
const int LowerTriDim<_DIM, _Num, _I>::dummy =
LowerTriDim<_DIM,_Num,0>::RowLookup[_I] = LowerTriApply<_Num,_I>::rowApply()
+ 0*LowerTriDim<_DIM,_Num,_I-1>::dummy;
#pragma empty_line
template < int _DIM, int _Num>
const int LowerTriDim<_DIM, _Num, 0>::dummy =
LowerTriDim<_DIM,_Num,0>::RowLookup[0] = LowerTriApply<_Num,0>::rowApply()
+ 0*LowerTriDim<_DIM,_Num,_Num>::dummy2;
#pragma empty_line
#pragma empty_line
template < int _DIM, int _Num, int _I>
const int LowerTriDim<_DIM, _Num, _I>::dummy2 =
LowerTriDim<_DIM,_Num,0>::ColLookup[_I] = LowerTriApply<_Num,_I>::colApply()
+ 0*LowerTriDim<_DIM,_Num,_I-1>::dummy2;
#pragma empty_line
template < int _DIM, int _Num>
const int LowerTriDim<_DIM, _Num, 0>::dummy2 =
LowerTriDim<_DIM,_Num,0>::ColLookup[0] = LowerTriApply<_Num,0>::colApply()
+ 0*LowerTriDim<_DIM,_Num,_Num>::dummy3;
#pragma empty_line
template < int _DIM, int _Num, int _I>
const int LowerTriDim<_DIM, _Num, _I>::dummy3 =
LowerTriDim<_DIM,_Num,0>::SizeLookup[_I] = LowerTriApply<_Num,_I>::sizeApply()
+ 0*LowerTriDim<_DIM,_Num,_I-1>::dummy3;
#pragma empty_line
template < int _DIM, int _Num>
const int LowerTriDim<_DIM, _Num, 0>::dummy3 =
LowerTriDim<_DIM,_Num,0>::SizeLookup[0] = LowerTriApply<_Num,0>::sizeApply();
#pragma empty_line
template<int _DIM, int _Num>
int LowerTriDim<_DIM, _Num, 0>::RowLookup[_Num];
#pragma empty_line
template<int _DIM, int _Num>
int LowerTriDim<_DIM, _Num, 0>::ColLookup[_Num];
#pragma empty_line
template<int _DIM, int _Num>
int LowerTriDim<_DIM, _Num, 0>::SizeLookup[_DIM];
#pragma line 981 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template <typename _T, int _Num, int _I=_Num-1>
class Table : public Table<_T, _Num, _I-1>
{
public:
typedef typename _T::TableType TableType;
static const typename _T::TableType dummy;
static const int size = _Num;
#pragma empty_line
};
#pragma empty_line
template <typename _T, int _Num>
class Table<_T, _Num, 0>
{
public:
static const typename _T::TableType dummy;
static typename _T::TableType array[_Num];
};
#pragma line 1008 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h"
template <typename _T, int _Num, int _I>
const typename _T::TableType Table<_T, _Num, _I>::dummy
= Table<_T, _Num, 0>::array[_I] = _T::apply(_I,_Num) + 0*Table<_T, _Num, _I-1>::dummy;
#pragma empty_line
template <typename _T, int _Num>
const typename _T::TableType Table<_T, _Num, 0>::dummy
= Table<_T, _Num, 0>::array[0] = _T::apply(0,_Num);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <typename _T, int _Num>
typename _T::TableType Table<_T, _Num, 0>::array[_Num];
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <class T>
struct is_fptype { static const bool value = false; };
template <> struct is_fptype<float> { static const bool value = true; };
template <> struct is_fptype<double> { static const bool value = true; };
#pragma empty_line
template <class T>
struct is_integraltype { static const bool value = false; };
template <> struct is_integraltype<int> { static const bool value = true; };
template <> struct is_integraltype<unsigned int> { static const bool value = true; };
template <> struct is_integraltype<char> { static const bool value = true; };
template <> struct is_integraltype<unsigned char> { static const bool value = true; };
template <> struct is_integraltype<short> { static const bool value = true; };
template <> struct is_integraltype<unsigned short> { static const bool value = true; };
template <> struct is_integraltype<long long> { static const bool value = true; };
template <> struct is_integraltype<unsigned long long> { static const bool value = true; };
template <int W> struct is_integraltype<ap_int<W> > { static const bool value = true; };
template <int W> struct is_integraltype<ap_uint<W> > { static const bool value = true; };
#pragma empty_line
template <class T>
struct is_fixedtype { static const bool value = false; };
template <int W, int I, ap_q_mode Q, ap_o_mode O> struct is_fixedtype<ap_fixed<W,I,Q,O> > { static const bool value = true; };
template <int W, int I, ap_q_mode Q, ap_o_mode O> struct is_fixedtype<ap_ufixed<W,I,Q,O> > { static const bool value = true; };
#pragma empty_line
template<bool B, class T = void>
struct enable_if {};
#pragma empty_line
template<class T>
struct enable_if<true, T> { typedef T type; };
#pragma empty_line
template<typename T1, typename T2>
struct enable_or { static const bool value = T1::value || T2::value; };
#pragma empty_line
template<typename T1, typename T2>
struct enable_and { static const bool value = T1::value && T2::value; };
#pragma line 41 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h" 2
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 1 3
#pragma line 23 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
extern "C" {
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _assert (const char*, const char*, int) __attribute__ ((__noreturn__));
#pragma line 48 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
}
#pragma line 42 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h" 2
#pragma empty_line
namespace hls {
#pragma empty_line
template<int W, typename T>
void AXIGetBitFields(ap_uint<W> pix, int start, int w, T& val) {
#pragma HLS inline
((start >= 0 && start+w <= W) ? (void)0 : _assert("start >= 0 && start+w <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h", 48));
val = (T)pix(start+w-1, start);
}
#pragma empty_line
template<int W>
void AXIGetBitFields(ap_uint<W> pix, int start, int w, float& val) {
#pragma HLS inline
((w == 32 && start >= 0 && start+w <= W) ? (void)0 : _assert("w == 32 && start >= 0 && start+w <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h", 55));
fp_struct<float> temp((ap_uint<32>)pix(start+w-1, start));
val = temp.to_float();
}
#pragma empty_line
template<int W>
void AXIGetBitFields(ap_uint<W> pix, int start, int w, double& val) {
#pragma HLS inline
((w == 64 && start >= 0 && start+w <= W) ? (void)0 : _assert("w == 64 && start >= 0 && start+w <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h", 63));
fp_struct<double> temp((ap_uint<64>)pix(start+w-1, start));
val = temp.to_double();
}
#pragma empty_line
template<int W, typename T>
void AXIGetBitFields(ap_axiu<W,1,1,1> axi, int start, int w, T& val) {
#pragma HLS inline
AXIGetBitFields(axi.data, start, w, val);
}
#pragma empty_line
template<int W, typename T>
void AXISetBitFields(ap_uint<W>& pix, int start, int w, T val) {
#pragma HLS inline
((start >= 0 && start+w <= W) ? (void)0 : _assert("start >= 0 && start+w <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h", 77));
pix(start+w-1, start) = val;
}
#pragma empty_line
template<int W>
void AXISetBitFields(ap_uint<W>& pix, int start, int w, float val) {
#pragma HLS inline
((w == 32 && start >= 0 && start+w <= W) ? (void)0 : _assert("w == 32 && start >= 0 && start+w <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h", 84));
fp_struct<float> temp(val);
pix(start+w-1, start) = temp.data();
}
#pragma empty_line
template<int W>
void AXISetBitFields(ap_uint<W>& pix, int start, int w, double val) {
#pragma HLS inline
((w == 64 && start >= 0 && start+w <= W) ? (void)0 : _assert("w == 64 && start >= 0 && start+w <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h", 92));
fp_struct<double> temp(val);
pix(start+w-1, start) = temp.data();
}
#pragma empty_line
template<int W, typename T>
void AXISetBitFields(ap_axiu<W,1,1,1>& axi, int start, int w, T val) {
#pragma HLS inline
AXISetBitFields(axi.data, start, w, val);
}
#pragma empty_line
}
#pragma line 49 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 1
#pragma line 44 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 1 3
#pragma line 23 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
extern "C" {
#pragma line 38 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _assert (const char*, const char*, int) __attribute__ ((__noreturn__));
#pragma line 48 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3
}
#pragma line 45 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_defines.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_defines.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_int.h" 1
#pragma line 40 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_defines.h" 2
#pragma line 105 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_defines.h"
template<int M, int E>
struct float_struct {
ap_uint<M> mant;
ap_uint<E> exp;
ap_uint<1> sign;
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int M, int E>
struct float_struct2 {
ap_int<M> mant;
ap_uint<E> exp;
};
#pragma line 48 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h" 1
#pragma line 49 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_traits.h" 1
#pragma line 35 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_traits.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_fixed.h" 1
#pragma line 36 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_traits.h" 2
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_utils.h" 1
#pragma line 38 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_traits.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_defines.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_traits.h" 2
#pragma empty_line
namespace hls
{
#pragma empty_line
template<typename T>
struct x_traits_default {
typedef T ADD_T;
typedef T SUB_T;
typedef T SAT_T;
typedef T MULT_T;
typedef T MADD_T;
};
#pragma empty_line
template<typename T1, typename T2>
struct x_traits {
#pragma line 65 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_traits.h"
};
#pragma empty_line
template<>
struct x_traits<double, double> : public x_traits_default<double> { };
#pragma empty_line
template<typename T2>
struct x_traits<double, T2> : public x_traits_default<double> { };
#pragma empty_line
template<typename T1>
struct x_traits<T1, double> : public x_traits_default<double> { };
#pragma empty_line
template<>
struct x_traits<float, float> : public x_traits_default<float> { };
#pragma empty_line
template<typename T2>
struct x_traits<float, T2> : public x_traits_default<float> { };
#pragma empty_line
template<typename T1>
struct x_traits<T1, float> : public x_traits_default<float> { };
#pragma empty_line
template<>
struct x_traits<half, half> : public x_traits_default<half> { };
#pragma empty_line
template<typename T2>
struct x_traits<half, T2> : public x_traits_default<float> { };
#pragma empty_line
template<typename T1>
struct x_traits<T1, half> : public x_traits_default<float> { };
#pragma empty_line
template<>
struct x_traits<double, float> : public x_traits_default<double> { };
#pragma empty_line
template<>
struct x_traits<float, double> : public x_traits_default<double> { };
#pragma empty_line
template<>
struct x_traits<double, half> : public x_traits_default<double> { };
#pragma empty_line
template<>
struct x_traits<half, double> : public x_traits_default<double> { };
#pragma empty_line
template<>
struct x_traits<int, int> : public x_traits_default<int> { };
#pragma empty_line
template<>
struct x_traits<unsigned int, unsigned int> : public x_traits_default<unsigned int> { };
#pragma empty_line
template<>
struct x_traits<int64_t, int64_t> : public x_traits_default<int64_t> { };
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_fixed<W1,I1,Q1,O1>,ap_fixed<W2,I2,Q2,O2> > {
typedef typename ap_fixed<W1,I1>::template RType<W2,I2,true> RTYPE;
typedef ap_fixed<RTYPE::plus_w, RTYPE::plus_i> ADD_T;
typedef ap_fixed<RTYPE::minus_w, RTYPE::minus_i> SUB_T;
typedef ap_fixed<RTYPE::mult_w, RTYPE::mult_i> MULT_T;
typedef ap_fixed<W1,I1,AP_RND,AP_SAT> SAT_T;
typedef ap_fixed<W1+W2+1,I1+I2+1> MADD_T;
typedef ap_fixed<W1+W2+2,I1+I2+2> CMADD_T;
typedef ap_fixed<(2*W1)+1,(2*I1)> CONJ_SQ_T;
typedef ap_fixed<(2*W1)+2,(2*I1)+1> CONJ_SQ_2_T;
typedef ap_fixed<2*(((I1) > (W1-I1) ? (I1) : (W1-I1))+1),(((I1) > (W1-I1) ? (I1) : (W1-I1))+1)> INV_T;
typedef int INT_T;
typedef float_struct<24,8> FLOAT_STRUCT_T;
};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_fixed<W1,I1,Q1,O1>,ap_ufixed<W2,I2,Q2,O2> > {
typedef typename ap_fixed<W1,I1>::template RType<W2,I2,false> RTYPE;
typedef ap_fixed<RTYPE::plus_w, RTYPE::plus_i> ADD_T;
typedef ap_fixed<RTYPE::minus_w, RTYPE::minus_i> SUB_T;
typedef ap_fixed<RTYPE::mult_w, RTYPE::mult_i> MULT_T;
};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_ufixed<W1,I1,Q1,O1>,ap_fixed<W2,I2,Q2,O2> > {
typedef typename ap_ufixed<W1,I1>::template RType<W2,I2,true> RTYPE;
typedef ap_fixed<RTYPE::plus_w, RTYPE::plus_i> ADD_T;
typedef ap_fixed<RTYPE::minus_w, RTYPE::minus_i> SUB_T;
typedef ap_fixed<RTYPE::mult_w, RTYPE::mult_i> MULT_T;
};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_ufixed<W1,I1,Q1,O1>,ap_ufixed<W2,I2,Q2,O2> > {
typedef typename ap_ufixed<W1,I1>::template RType<W2,I2,false> RTYPE;
typedef ap_ufixed<RTYPE::plus_w, RTYPE::plus_i> ADD_T;
typedef ap_fixed<RTYPE::minus_w, RTYPE::minus_i> SUB_T;
typedef ap_ufixed<RTYPE::mult_w, RTYPE::mult_i> MULT_T;
typedef ap_ufixed<W1,I1,AP_RND,AP_SAT> SAT_T;
typedef ap_ufixed<W1+W2+1,I1+I2+1> MADD_T;
typedef ap_ufixed<W1+W2+2,I1+I2+2> CMADD_T;
typedef ap_ufixed<(2*W1)+1,(2*I1)> CONJ_SQ_T;
typedef ap_ufixed<(2*W1)+2,(2*I1)+1> CONJ_SQ_2_T;
typedef ap_ufixed<2*(((I1) > (W1-I1) ? (I1) : (W1-I1))+1),(((I1) > (W1-I1) ? (I1) : (W1-I1))+1)> INV_T;
typedef int INT_T;
typedef float_struct<24,8> FLOAT_STRUCT_T;
};
#pragma empty_line
template<int W1, int W2>
struct x_traits<ap_int<W1>,ap_int<W2> > {
typedef ap_int<((W1) > (W2) ? (W1) : (W2)) + 1> ADD_T;
typedef ap_int<((W1) > (W2) ? (W1) : (W2)) + 1> SUB_T;
typedef ap_int<W1+W2> MULT_T;
typedef ap_int<(W1 > W2)? W1:W2> MADD_T;
};
#pragma empty_line
template<int W1, int W2>
struct x_traits<ap_int<W1>,ap_uint<W2> > {
typedef ap_int<((W1) > (W2+1) ? (W1) : (W2+1)) + 1> ADD_T;
typedef ap_int<((W1) > (W2+1) ? (W1) : (W2+1)) + 1> SUB_T;
typedef ap_int<W1+W2> MULT_T;
};
#pragma empty_line
template<int W1, int W2>
struct x_traits<ap_uint<W1>,ap_int<W2> > {
typedef ap_int<((W1+1) > (W2) ? (W1+1) : (W2)) + 1> ADD_T;
typedef ap_int<((W1+1) > (W2) ? (W1+1) : (W2)) + 1> SUB_T;
typedef ap_int<W1+W2> MULT_T;
};
#pragma empty_line
template<int W1, int W2>
struct x_traits<ap_uint<W1>,ap_uint<W2> > {
typedef ap_uint<((W1) > (W2) ? (W1) : (W2)) + 1> ADD_T;
typedef ap_int<((W1) > (W2) ? (W1) : (W2)) + 1> SUB_T;
typedef ap_uint<W1+W2> MULT_T;
};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2>
struct x_traits<ap_fixed<W1,I1,Q1,O1>,ap_int<W2> > : public x_traits<ap_fixed<W1,I1>, ap_fixed<W2,W2> > {};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2>
struct x_traits<ap_fixed<W1,I1,Q1,O1>,ap_uint<W2> > : public x_traits<ap_fixed<W1,I1>, ap_ufixed<W2,W2> > {};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2>
struct x_traits<ap_ufixed<W1,I1,Q1,O1>,ap_int<W2> > : public x_traits<ap_ufixed<W1,I1>, ap_fixed<W2,W2> > {};
#pragma empty_line
template<int W1, int I1, ap_q_mode Q1, ap_o_mode O1, int W2>
struct x_traits<ap_ufixed<W1,I1,Q1,O1>,ap_uint<W2> > : public x_traits<ap_ufixed<W1,I1>, ap_ufixed<W2,W2> > {};
#pragma empty_line
template<int W1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_int<W1>, ap_fixed<W2,I2,Q2,O2> > : public x_traits<ap_fixed<W1,W1>, ap_fixed<W2,I2> > {};
#pragma empty_line
template<int W1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_int<W1>, ap_ufixed<W2,I2,Q2,O2> > : public x_traits<ap_fixed<W1,W1>, ap_ufixed<W2,I2> > {};
#pragma empty_line
template<int W1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_uint<W1>, ap_fixed<W2,I2,Q2,O2> > : public x_traits<ap_ufixed<W1,W1>, ap_fixed<W2,I2> > {};
#pragma empty_line
template<int W1, int W2, int I2, ap_q_mode Q2, ap_o_mode O2>
struct x_traits<ap_uint<W1>, ap_ufixed<W2,I2,Q2,O2> > : public x_traits<ap_ufixed<W1,W1>, ap_ufixed<W2,I2> > {};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T> struct fixed_type { };
template<> struct fixed_type<char> { typedef ap_fixed<8,8> T; };
template<> struct fixed_type<unsigned char> { typedef ap_ufixed<8,8> T; };
template<> struct fixed_type<short> { typedef ap_fixed<16,16> T; };
template<> struct fixed_type<unsigned short> { typedef ap_ufixed<16,16> T; };
template<> struct fixed_type<int> { typedef ap_fixed<32,32> T; };
template<> struct fixed_type<unsigned int> { typedef ap_ufixed<32,32> T; };
template<> struct fixed_type<float> { typedef ap_ufixed<64,32> T; };
template<int W> struct fixed_type<ap_int<W> > { typedef ap_fixed<W,W> T; };
template<int W> struct fixed_type<ap_uint<W> > { typedef ap_ufixed<W,W> T; };
template<int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O> struct fixed_type<ap_fixed<W,I, _AP_Q, _AP_O> > { typedef ap_fixed<W,I> T; };
template<int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O> struct fixed_type<ap_ufixed<W,I, _AP_Q, _AP_O> > { typedef ap_ufixed<W,I> T; };
#pragma empty_line
template<typename T1, int DIM>
struct x_traits_d_default {
typedef T1 ACCUM_T;
typedef T1 ACCUM2_T;
typedef T1 ADD_TREE_T;
};
#pragma empty_line
template<typename T1, int DIM>
struct x_traits_d {};
#pragma empty_line
template<int DIM>
struct x_traits_d <float,DIM>:x_traits_d_default<float, DIM> {};
#pragma empty_line
template<int DIM>
struct x_traits_d <double,DIM>:x_traits_d_default<double, DIM> {};
#pragma empty_line
template<int DIM>
struct x_traits_d <half,DIM>:x_traits_d_default<half, DIM> {};
#pragma empty_line
template<int W, int DIM>
struct x_traits_d <ap_int<W>,DIM> {
typedef ap_int<W> ACCUM_T;
typedef ap_int<2*W> ACCUM2_T;
typedef ap_int<25+W> ADD_TREE_T;
};
#pragma empty_line
template<int W, int DIM>
struct x_traits_d <ap_uint<W>,DIM> {
typedef ap_uint<W> ACCUM_T;
typedef ap_uint<2*W> ACCUM2_T;
typedef ap_uint<25+W> ADD_TREE_T;
};
#pragma empty_line
template<int W, int I, ap_q_mode Q, ap_o_mode O, int DIM>
struct x_traits_d <ap_fixed<W,I,Q,O>,DIM> {
typedef ap_fixed<W+BitWidth<DIM>::Value,I+BitWidth<DIM>::Value,Q,O> ACCUM_T;
typedef ap_fixed<(2*W)+BitWidth<DIM>::Value,(2*I)+BitWidth<DIM>::Value,Q,O> ACCUM2_T;
typedef ap_fixed<25+W+BitWidth<DIM>::Value,25+I+BitWidth<DIM>::Value,Q,O> ADD_TREE_T;
};
#pragma empty_line
template<int W, int I, ap_q_mode Q, ap_o_mode O, int DIM>
struct x_traits_d <ap_ufixed<W,I,Q,O>,DIM> {
typedef ap_ufixed<W+BitWidth<DIM>::Value,I+BitWidth<DIM>::Value,Q,O> ACCUM_T;
typedef ap_ufixed<(2*W)+BitWidth<DIM>::Value,(2*I)+BitWidth<DIM>::Value,Q,O> ACCUM2_T;
typedef ap_ufixed<25+W+BitWidth<DIM>::Value,25+I+BitWidth<DIM>::Value,Q,O> ADD_TREE_T;
};
#pragma empty_line
}
#pragma line 50 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_fpo.h" 1
#pragma line 169 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_fpo.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/gmp.h" 1
#pragma line 170 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_fpo.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/mpfr.h" 1
#pragma line 171 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_fpo.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_add_flt(float a, float b)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_add_flt(&res_flt, a, b);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_add_d(double a, double b)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_add_d(&res_d, a, b);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_sub_flt(float a, float b)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_sub_flt(&res_flt, a, b);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_sub_d(double a, double b)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_sub_d(&res_d, a, b);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_mul_flt(float a, float b)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_mul_flt(&res_flt, a, b);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_mul_d(double a, double b)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_mul_d(&res_d, a, b);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_div_flt(float a, float b)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_div_flt(&res_flt, a, b);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_div_d(double a, double b)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_div_d(&res_d, a, b);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_rec_flt(float a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_rec_flt(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_rec_d(double a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_rec_d(&res_d, a);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_sqrt_flt(float a)
{
#pragma empty_line
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_sqrt_flt(&res_flt, a);
#pragma empty_line
return res_flt;
}
#pragma empty_line
inline double xil_fpo_sqrt_d(double a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_sqrt_d(&res_d, a);
#pragma empty_line
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_recsqrt_flt(float a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_recsqrt_flt(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_recsqrt_d(double a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_recsqrt_d(&res_d, a);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_abs_flt(float a)
{
float res_flt;
#pragma empty_line
xip_fpo_abs_flt(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_abs_d(double a)
{
double res_d;
#pragma empty_line
xip_fpo_abs_d(&res_d, a);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_log_flt(float a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_log_flt(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_log_d(double a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_log_d(&res_d, a);
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline float xil_fpo_exp_flt(float a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
#pragma empty_line
xip_fpo_exp_flt(&res_flt, a);
#pragma empty_line
#pragma empty_line
#pragma empty_line
return res_flt;
}
#pragma empty_line
inline double xil_fpo_exp_d(double a)
{
double res_d;
#pragma empty_line
#pragma empty_line
#pragma empty_line
xip_fpo_exp_d(&res_d, a);
#pragma empty_line
#pragma empty_line
#pragma empty_line
return res_d;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_unordered_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_unordered_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_unordered_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_unordered_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_equal_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_equal_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_equal_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_equal_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_less_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_less_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_less_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_less_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_lessequal_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_lessequal_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_lessequal_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_lessequal_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_greater_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_greater_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_greater_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_greater_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_greaterequal_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_greaterequal_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_greaterequal_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_greaterequal_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_notequal_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_notequal_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_notequal_d(double a, double b)
{
int res_int;
#pragma empty_line
xip_fpo_notequal_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_condcode_flt(float a, float b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_condcode_flt(&res_int, a, b);
return res_int;
}
#pragma empty_line
inline int xil_fpo_condcode_d(double a, double b)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_condcode_d(&res_int, a, b);
return res_int;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline int xil_fpo_flttofix_int_flt(float a)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_flttofix_int_flt(&res_int, a);
return res_int;
}
#pragma empty_line
inline int xil_fpo_flttofix_int_d(double a)
{
int res_int;
#pragma empty_line
#pragma empty_line
xip_fpo_flttofix_int_d(&res_int, a);
return res_int;
}
#pragma empty_line
inline float xil_fpo_fixtoflt_flt_int(int a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_fixtoflt_flt_int(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_fixtoflt_d_int(int a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_fixtoflt_d_int(&res_d, a);
return res_d;
}
#pragma empty_line
inline float xil_fpo_flttoflt_flt_flt(float a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_flttoflt_flt_flt(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline float xil_fpo_flttoflt_flt_d(double a)
{
float res_flt;
#pragma empty_line
#pragma empty_line
xip_fpo_flttoflt_flt_d(&res_flt, a);
return res_flt;
}
#pragma empty_line
inline double xil_fpo_flttoflt_d_flt(float a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_flttoflt_d_flt(&res_d, a);
return res_d;
}
#pragma empty_line
inline double xil_fpo_flttoflt_d_d(double a)
{
double res_d;
#pragma empty_line
#pragma empty_line
xip_fpo_flttoflt_d_d(&res_d, a);
return res_d;
}
#pragma line 51 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma empty_line
namespace hls
{
#pragma line 63 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static int __signbit(float a_re)
{
fp_struct<float> s(a_re);
return s.__signbit();
}
#pragma empty_line
static int __signbit(double a_re)
{
fp_struct<double> s(a_re);
return s.__signbit();
}
#pragma empty_line
static double nan(const char *tagp) {
fp_struct<double> nan;
nan.sig = -1;
nan.exp = -1;
nan.sign = 0;
return nan.to_ieee();
}
#pragma empty_line
static float nanf(const char *tagp) {
fp_struct<float> nan;
nan.sig = -1;
nan.exp = -1;
nan.sign = 0;
return nan.to_ieee();
}
#pragma line 99 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static
int
__isfinite(float t_in)
{
fp_struct<float> fs = t_in;
int ret = (fs.exp == 0xFF) ? 0 : 1;
return ret;
}
#pragma empty_line
static
int
__isfinite(double t_in)
{
fp_struct<double> fs = t_in;
int ret = (fs.exp == 0x7FF) ? 0 : 1;
return ret;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
int
__isinf(float t_in)
{
fp_struct<float> fs = t_in;
int ret = ((fs.exp == 0xFF) && (fs.sig == 0x0)) ? 1 : 0;
return ret;
}
#pragma empty_line
static
int
__isinf(double t_in)
{
fp_struct<double> fs = t_in;
int ret = ((fs.exp == 0x7FF) && (fs.sig == 0x0)) ? 1 : 0;
return ret;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
int
__isnan(float t_in)
{
fp_struct<float> fs = t_in;
int ret = ((fs.exp == 0xFF) && (fs.sig != 0x0)) ? 1 : 0;
return ret;
}
#pragma empty_line
static
int
__isnan(double t_in)
{
fp_struct<double> fs = t_in;
int ret = ((fs.exp == 0x7FF) && (fs.sig != 0x0)) ? 1 : 0;
return ret;
}
#pragma line 174 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static
int
__isnormal(float t_in)
{
fp_struct<float> fs = t_in;
int ret = ((fs.exp != 0xFF) && (fs.exp != 0x0)) ? 1 : 0;
return ret;
}
#pragma empty_line
static
int
__isnormal(double t_in)
{
fp_struct<double> fs = t_in;
int ret = ((fs.exp != 0x7FF) && (fs.exp != 0x0)) ? 1 : 0;
return ret;
}
#pragma line 219 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static
int
__fpclassifyf(float t_in)
{
fp_struct<float> fs = t_in;
int ret;
if(fs.exp == 0x0) {
ret = (fs.sig == 0x0) ? 0x4000 : (0x0400 | 0x4000);
} else if(fs.exp == 0xFF) {
ret = (fs.sig == 0x0) ? (0x0100 | 0x0400) : 0x0100;
} else {
ret = 0x0400;
}
return ret;
}
#pragma empty_line
static
int
__fpclassify(double t_in)
{
fp_struct<double> fs = t_in;
int ret;
if(fs.exp == 0x0) {
ret = (fs.sig == 0x0) ? 0x4000 : (0x0400 | 0x4000);
} else if(fs.exp == 0x7FF) {
ret = (fs.sig == 0x0) ? (0x0100 | 0x0400) : 0x0100;
} else {
ret = 0x0400;
}
return ret;
}
#pragma empty_line
static
double copysign(double x, double y)
{
fp_struct<double> xs(x), ys(y);
xs.sign = ys.sign;
return xs.to_ieee();
}
#pragma empty_line
static
float copysignf(float x, float y)
{
fp_struct<float> xs(x), ys(y);
xs.sign = ys.sign;
return xs.to_ieee();
}
#pragma empty_line
#pragma empty_line
static
float copysign(float x, float y)
{
return copysignf(x, y);
}
#pragma empty_line
#pragma empty_line
static
double fabs(double x)
{
return copysign(x, 0.0);
}
#pragma empty_line
static
float fabsf(float x)
{
return copysignf(x, 0.0f);
}
#pragma empty_line
#pragma empty_line
static
float fabs(float x)
{
return fabsf(x);
}
#pragma empty_line
#pragma empty_line
static double frexp (double x, int* exp) {
fp_struct<double> xs = x;
bool zero = (xs.exp == 0x0);
bool nan = (xs.exp == 0x7FF);
*exp = (zero || nan) ? 0 : xs.expv()+1;
if(zero) {
#pragma empty_line
return 0.0;
} else if(xs.exp == 0x7FF) {
#pragma empty_line
return x;
} else {
xs.exp = fp_struct<double>::EXP_BIAS-1;
return xs.to_ieee();
}
}
#pragma empty_line
static float frexpf (float x, int* exp) {
fp_struct<float> xs = x;
bool zero = (xs.exp == 0x0);
bool nan = (xs.exp == 0xFF);
*exp = (zero || nan) ? 0 : xs.expv()+1;
if(zero) {
#pragma empty_line
return 0.0f;
} else if(nan) {
#pragma empty_line
return x;
} else {
xs.exp = fp_struct<float>::EXP_BIAS-1;
return xs.to_ieee();
}
}
#pragma empty_line
static double ldexp (double x, int exp) {
fp_struct<double> xs = x;
exp += xs.exp;
bool ininf = (xs.exp == 0x7FF);
bool zero = (xs.exp == 0) || (exp <= 0);
bool inf = ininf || (exp >= 0x7FF);
if(__isnan(x)) {
return x;
} else if(zero && !ininf) {
return copysign(0.0,x);
} else if(inf) {
#pragma empty_line
xs.sig = 0x0;
xs.exp = 0x7FF;
} else {
xs.exp = exp;
}
return xs.to_ieee();
}
#pragma empty_line
static float ldexpf (float x, int exp) {
fp_struct<float> xs = x;
exp += xs.exp;
bool ininf = (xs.exp == 0xFF);
bool zero = (xs.exp == 0) || (exp <= 0);
bool inf = ininf || (exp >= 0xFF);
if(__isnan(x)) {
return x;
} else if(zero && !ininf) {
return copysignf(0.0f,x);
} else if(inf) {
#pragma empty_line
xs.sig = 0x0;
xs.exp = 0xFF;
} else {
xs.exp = exp;
}
return xs.to_ieee();
}
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h" 1
#pragma line 43 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_big_mult.h" 1
#pragma line 35 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_big_mult.h"
template<int W1, int W2>
void
big_mult_v1(ap_uint<W1> a, ap_uint<W2> b, ap_uint<W1+W2> &c)
{
c = a * b;
}
#pragma empty_line
template<int M>
void
aca(
ap_uint<M> a0,
ap_uint<M> a1,
ap_uint<M> b0,
ap_uint<M> b1,
ap_uint<2*M> c,
ap_uint<1> cin,
ap_uint<2*M> &p,
ap_uint<2> &out)
{
ap_uint<2*M> p0;
ap_uint<2*M> p1;
ap_uint<(2*M)+2> pp0;
ap_uint<(2*M)+2> pp1;
#pragma empty_line
p0 = a0 * b0;
pp0 = p0 + c + cin;
p1 = a1 * b1;
pp1 = pp0 + p1;
p = pp1((2*M)-1,0);
out = pp1(((2*M)+1),(2*M));
}
#pragma empty_line
template<int M>
void
acb(
ap_uint<2> x,
ap_uint<M> y,
ap_uint<M> &r)
{
r = x + y;
}
#pragma empty_line
template<int M>
void
cr(
ap_uint<M> din,
ap_uint<M> &dout)
{
dout = din;
}
#pragma empty_line
#pragma empty_line
template<int W, int M>
void
big_mult_v2(
ap_uint<W> a,
ap_uint<W> b,
ap_uint<2*W> &m)
{
const int N = (W/M)-1;
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<2*M> z[N+1][N+1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<2> ci[N][N+1];
#pragma empty_line
for(int i=0; i<N+1; i++) {
z[0][i] = a(M*(i+1)-1,M*i) * b(M*(i+1)-1,M*i);
#pragma line 121 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_big_mult.h"
}
#pragma empty_line
#pragma empty_line
for(int i=0; i<N; i++) {
ci[i][0] = 0;
#pragma empty_line
ap_uint<M> a0, a1, b0, b1;
ap_uint<2*M> c, p;
ap_uint<1> cin;
ap_uint<2> out;
#pragma empty_line
for(int j=0; j<N; j++) {
if(j>=i) {
a0 = a(M*(j-i+1)-1,M*(j-i));
b0 = b(M*(j+2)-1,M*(j+1));
a1 = a(M*(j+2)-1,M*(j+1));
b1 = b(M*(j-i+1)-1,M*(j-i));
c = (ap_uint<W>(z[i][j-i+1](M-1,0)),
ap_uint<M>(z[i][j-i]((2*M)-1,M)));
#pragma empty_line
cin = ci[i][j-i][0];
aca<M>(a0,a1,b0,b1,c,cin,p,out);
ci[i][j-i+1] = out;
z[i+1][j-i] = p;
#pragma line 161 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_big_mult.h"
}
}
#pragma empty_line
#pragma empty_line
if(i == N-1) {
#pragma empty_line
#pragma empty_line
m(M*(N+2)-1,M*(N)) = p;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
ap_uint<2> x;
ap_uint<M> y, r;
x = ci[i][N-i];
y = z[i][N-i]((2*M)-1,M);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
acb<M>(x,y,r);
m((M*((2*N)+2-i))-1,M*((2*N)+1-i)) = r;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<M> din, dout;
din = z[i][0];
#pragma empty_line
cr<M>(din,dout);
#pragma empty_line
m((M*(i+1))-1,M*i) = dout;
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
}
#pragma empty_line
template<int W, int M>
void
big_mult_v3(
ap_uint<W> a,
ap_uint<W> b,
ap_uint<2*W> &m)
{
const int N = (W+M-1)/M;
#pragma empty_line
ap_uint<2*M> pp[N][N];
int i, j;
for (i = 0; i < N; ++i)
for (j = 0; j < N; ++j) {
unsigned Ui = (i == N-1) ? W-1 : M*(i+1)-1;
unsigned Uj = (j == N-1) ? W-1 : M*(j+1)-1;
pp[i][j] = a(Ui,M*i) * b(Uj,M*j);
}
#pragma empty_line
#pragma empty_line
ap_uint<48> pps[2*N];
pps[0] = pp[0][0];
#pragma empty_line
for (i = 1; i < 2*N; ++i) {
pps[i] = pps[i-1] >> M;
for (j = 0; j < N; ++j)
if ((j <= i) && (i-j < N)) {
pps[i] += pp[j][i-j];
}
}
#pragma empty_line
#pragma empty_line
for (i = 0; i < 2*N; ++i) {
unsigned Li = M*i;
if (Li < 2*W) {
unsigned Ui = M*(i+1)-1;
if (Ui >= 2*W) { Ui = 2*W-1; }
m(Ui,Li) = pps[i](M-1, 0);
}
}
}
#pragma empty_line
#pragma empty_line
template<int W, int W2, int M>
void
big_mult_v3small(
ap_uint<W> a,
ap_uint<W2> b,
ap_uint<W+W2> &m)
{
const int N = (W+M-1)/M;
#pragma empty_line
ap_uint<M+W2> pp[N];
int i;
for (i = 0; i < N; ++i) {
unsigned Ui = (i == N-1) ? W-1 : M*(i+1)-1;
pp[i] = a(Ui,M*i) * b;
}
#pragma empty_line
#pragma empty_line
ap_uint<M+W2> pps[N];
pps[0] = pp[0];
#pragma empty_line
for (i = 1; i < N; ++i) {
pps[i] = pps[i-1] >> M;
pps[i] += pp[i];
}
#pragma empty_line
#pragma empty_line
for (i = 0; i < N-1; ++i) {
unsigned Li = M*i;
if (Li < W+W2) {
unsigned Ui = M*(i+1)-1;
if (Ui >= W+W2) { Ui = W+W2-1; }
m(Ui,Li) = pps[i](M-1, 0);
}
}
unsigned Li = M*i;
if (Li < W+W2) {
#pragma empty_line
unsigned Ui = W+W2-1;
m(Ui,Li) = pps[i];
}
}
#pragma empty_line
template<int SELECT, int W, int M>
void
big_mult(
ap_uint<W> a,
ap_uint<W> b,
ap_uint<2*W> &m)
{
switch(SELECT) {
case 1:
big_mult_v1(a,b,m);
break;
case 2:
big_mult_v2<W,M>(a,b,m);
break;
default:
big_mult_v3<W,M>(a,b,m);
break;
};
}
#pragma empty_line
template<int W, int M>
void
big_mult(
ap_uint<W> a,
ap_uint<W> b,
ap_uint<2*W> &m)
{
big_mult<3,W,M>(a,b,m);
}
#pragma empty_line
#pragma empty_line
template<int W1, int W2>
void
big_mult(
ap_uint<W1> a,
ap_uint<W2> b,
ap_uint<W1+W2> &m)
{
if(W2 <= 64) {
#pragma empty_line
big_mult_v3small<W1,W2,17>(a,b,m);
} else {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<(17*(((W1 > W2) ? W1 : W2)+ 16)/17)> a_m = a;
ap_uint<(17*(((W1 > W2) ? W1 : W2)+ 16)/17)> b_m = b;
ap_uint<2*(17*(((W1 > W2) ? W1 : W2)+ 16)/17)> m_m;
big_mult<(17*(((W1 > W2) ? W1 : W2)+ 16)/17),17>(a_m,b_m,m_m);
#pragma empty_line
m = m_m;
}
}
#pragma empty_line
template <int W1, int I1, int W2, int I2>
void
big_mult(
ap_ufixed<W1,I1> a,
ap_ufixed<W2,I2> b,
ap_ufixed<W1+W2,I1+I2> &m)
{
ap_uint<W1> ai;
ap_uint<W2> bi;
ap_uint<W1+W2> mi;
ai(W1-1, 0) = a(W1-1, 0);
bi(W2-1, 0) = b(W2-1, 0);
big_mult(ai,bi,mi);
m(W1+W2-1,0) = mi(W1+W2-1,0);
}
#pragma line 44 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h" 1
#pragma line 35 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_float_utils.h" 1
#pragma line 35 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_float_utils.h"
static const ap_uint<100> ref_cordic("9b74eda8435e5a67f5f9092c6",16);
#pragma empty_line
#pragma empty_line
static const ap_uint<512> ref_4oPi_512("000000000000000000000000000028BE60DB9391054A7F09D5F47D4D377036D8A5664F10E4107F9458EAF7AEF1586DC91B8E909374B801924BBA827464873FBF",16);
#pragma line 62 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_float_utils.h"
static const ap_uint<256> ref_4oPi_table_256[10] = {
"0x0000000000000000000000000000000028be60db9391054a7f09d5f47d4d3770",
"0x28be60db9391054a7f09d5f47d4d377036d8a5664f10e4107f9458eaf7aef158",
"0x36d8a5664f10e4107f9458eaf7aef1586dc91b8e909374b801924bba82746487",
"0x6dc91b8e909374b801924bba827464873f877ac72c4a69cfba208d7d4baed121",
"0x3f877ac72c4a69cfba208d7d4baed1213a671c09ad17df904e64758e60d4ce7d",
"0x3a671c09ad17df904e64758e60d4ce7d272117e2ef7e4a0ec7fe25fff7816603",
"0x272117e2ef7e4a0ec7fe25fff7816603fbcbc462d6829b47db4d9fb3c9f2c26d",
"0xfbcbc462d6829b47db4d9fb3c9f2c26dd3d18fd9a797fa8b5d49eeb1faf97c5e",
"0xd3d18fd9a797fa8b5d49eeb1faf97c5ecf41ce7de294a4ba9afed7ec47e35742",
"0xcf41ce7de294a4ba9afed7ec47e357421580cc11bf1edaeafc33ef0826bd0d87",
};
#pragma empty_line
static const ap_uint<100> ref_4oPi_table_100[13] = {
"0x000000000000000000000028B",
"0x00000000000000000028BE60D",
"0x0000000000000028BE60DB939",
"0x000000000028BE60DB9391054",
"0x00000028BE60DB9391054A7F0",
"0x0028BE60DB9391054A7F09D5F",
"0xBE60DB9391054A7F09D5F47D4",
"0xDB9391054A7F09D5F47D4D377",
"0x91054A7F09D5F47D4D377036D",
"0x4A7F09D5F47D4D377036D8A56",
"0x09D5F47D4D377036D8A5664F1",
"0xF47D4D377036D8A5664F10E41",
"0x4D377036D8A5664F10E417F94",
};
#pragma empty_line
static const ap_uint<80> ref_4oPi_table_80[9] = {
"0x00000028BE60DB939105",
"0x0028BE60DB9391054A7F",
"0xBE60DB9391054A7F09D5",
"0xDB9391054A7F09D5F47D",
"0x91054A7F09D5F47D4D37",
"0x4A7F09D5F47D4D377036",
"0x09D5F47D4D377036D8A5",
"0xF47D4D377036D8A5664F",
"0x4D377036D8A5664F10E4",
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const ap_uint<400> ref_Pio4_400("3243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89452821E638D01377BE5466CF34E90C6CC0A",16);
#pragma empty_line
static const ap_uint<256> ref_Pio4_table[10] = {
"0x000000000000000000000000000000003243f6a8885a308d313198a2e0370734",
"0x3243f6a8885a308d313198a2e03707344a4093822299f31d0082efa98ec4e6c8",
"0x4a4093822299f31d0082efa98ec4e6c89452821e638d01377be5466cf34e90c6",
"0x9452821e638d01377be5466cf34e90c6cc0ac29b7c97c50dd3f84d5b5b547091",
"0xcc0ac29b7c97c50dd3f84d5b5b54709179216d5d98979fb1bd1310ba698dfb5a",
"0x79216d5d98979fb1bd1310ba698dfb5ac2ffd72dbd01adfb7b8e1afed6a267e9",
"0xc2ffd72dbd01adfb7b8e1afed6a267e96ba7c9045f12c7f9924a19947b3916cf",
"0x6ba7c9045f12c7f9924a19947b3916cf70801f2e2858efc16636920d871574e6",
"0x70801f2e2858efc16636920d871574e69a458fea3f4933d7e0d95748f728eb65",
"0x9a458fea3f4933d7e0d95748f728eb658718bcd5882154aee7b54a41dc25a59b",
};
#pragma line 36 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h" 2
#pragma line 47 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int W>
float
convToFloat(
ap_uint<W> din)
{
ap_ufixed<W,1> d;
d(W-1,0) = din(W-1,0);
int prescale = 0;
fp_struct<float> out;
out.sign[0] = 0;
#pragma empty_line
ap_ufixed<W,1> ain = d;
#pragma empty_line
ap_uint<32> out_bits_1 = 0, out_bits_2 = 0, out_bits_3 = 0;
out_bits_1(31, 16) = ain(ain.wl()-1,ain.wl()-16); out_bits_1[15] = 1;
out_bits_2(31, 16) = ain(ain.wl()-16-1,ain.wl()-32); out_bits_2[15] = 1;
if(ain.wl() > 48) {
out_bits_3(31, 16) = ain(ain.wl()-32-1,ain.wl()-48);
} else {
out_bits_3(31, 16) = 0xFFFF;
}
out_bits_3[15] = 1;
#pragma empty_line
int c1 = __builtin_clz(out_bits_1.to_uint());
int c2 = __builtin_clz(out_bits_2.to_uint());
int c3 = __builtin_clz(out_bits_3.to_uint());
int shift = c1;
#pragma empty_line
ap_ufixed<W,1> in_shift = ain << c1;
if(c1 == 16) {
shift += c2;
in_shift = in_shift << c2;
if(c2 == 16) {
#pragma empty_line
shift += c3;
in_shift = in_shift << c3;
}
}
out.sig(fp_struct<float>::SIG_BITS-1,0) =
in_shift(in_shift.wl()-1-1,
in_shift.wl()-fp_struct<float>::SIG_BITS-1);
out.exp = (din == 0) ? 0 : (fp_struct<float>::EXP_BIAS+in_shift.iwl())-prescale-shift-1;
#pragma empty_line
return out.to_ieee();
}
#pragma line 101 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int W, int I>
float
convToFloat(
ap_ufixed<W,I> din)
{
ap_ufixed<W,1> d;
d = din;
ap_uint<W> di;
di(W-1,0) = d(W-1,0);
return convToFloat<W>(di);
}
#pragma line 120 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int W>
ap_uint<W>
convToInt(
float din)
{
fp_struct<float> fps(din);
#pragma empty_line
ap_uint<W> dout = ((ap_uint<W>)0x1 << 23) | fps.sig;
dout = dout << (W-24);
dout = dout >> (-1-fps.expv());
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return dout;
}
#pragma line 146 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int W>
double
convToDouble(
ap_uint<W> din)
{
ap_ufixed<W,1> d;
d(W-1,0) = din(W-1,0);
int prescale = 0;
fp_struct<double> out;
out.sign[0] = 0;
#pragma empty_line
ap_ufixed<W,1> ain = d;
#pragma empty_line
ap_uint<32> out_bits_1 = 0, out_bits_2 = 0, out_bits_3 = 0, out_bits_4 = 0;
out_bits_1(31, 16) = ain(ain.wl()-1,ain.wl()-16); out_bits_1[15] = 1;
out_bits_2(31, 16) = ain(ain.wl()-16-1,ain.wl()-32); out_bits_2[15] = 1;
out_bits_3(31, 16) = ain(ain.wl()-32-1,ain.wl()-48); out_bits_3[15] = 1;
out_bits_4(31, 16) = ain(ain.wl()-48-1,ain.wl()-64); out_bits_4[15] = 1;
#pragma empty_line
int c1 = __builtin_clz(out_bits_1.to_uint());
int c2 = __builtin_clz(out_bits_2.to_uint());
int c3 = __builtin_clz(out_bits_3.to_uint());
int c4 = __builtin_clz(out_bits_4.to_uint());
int shift = c1;
#pragma empty_line
ap_ufixed<W,1> in_shift = ain << c1;
if(c1 == 16) {
shift += c2;
in_shift = in_shift << c2;
if(c2 == 16) {
#pragma empty_line
shift += c3;
in_shift = in_shift << c3;
if(c3 == 16) {
shift += c4;
in_shift = in_shift << c4;
}
}
}
out.sig(fp_struct<double>::SIG_BITS-1,0) =
in_shift(in_shift.wl()-1-1,
in_shift.wl()-fp_struct<double>::SIG_BITS-1);
out.exp = (din == 0) ? 0 : (fp_struct<double>::EXP_BIAS+in_shift.iwl())-prescale-shift-1;
#pragma empty_line
return out.to_ieee();
}
#pragma line 201 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int W, int I>
double
convToDouble(
ap_ufixed<W,I> din)
{
ap_ufixed<W,1> d;
d = din;
ap_uint<W> di;
di(W-1,0) = d(W-1,0);
return convToDouble<W>(di);
}
#pragma line 220 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int W>
ap_uint<W>
convToInt(
double din)
{
fp_struct<double> fps(din);
#pragma empty_line
ap_uint<W> dout = ((ap_uint<W>)0x1 << 52) | fps.sig;
dout = dout << (W-53);
dout = dout >> (-1-fps.expv());
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return dout;
}
#pragma line 248 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int SB, int p1>
ap_uint<2*(SB+1)+p1+3>
table_lookup_4oPi(int exp, float dummy)
{
#pragma HLS RESOURCE variable=ref_4oPi_table_100 core=ROM_1P_LUTRAM
ap_int<9> addr = exp+(1+4*16);
((addr >= 0) ? (void)0 : _assert("addr >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h", 254));
ap_uint<100> table_100 = ref_4oPi_table_100[addr >> 4];
return (table_100 << (ap_uint<4>)(addr(3,0)))(99,100-((2*(SB+1)+p1+3)));
}
#pragma line 268 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int SB, int p1>
ap_uint<2*(SB+1)+p1+3>
table_lookup_4oPi(int exp, double dummy)
{
ap_uint<2*(SB+1)+p1+3> ret;
ap_int<12> addr = exp+76;
ap_uint<256> table_256 = ref_4oPi_table_256[addr(10,7)];
ret = (table_256 << (ap_uint<7>)(addr(6,0)))(255,256-((2*(SB+1))+p1+3));
if(addr < 0) {
ret = 0;
}
return ret;
}
#pragma line 293 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_range_redux.h"
template<int p1, int CW, class T>
void
range_redux_payne_hanek(
T din,
ap_uint<3> &k,
ap_uint<CW> &dout)
{
const int EB = fp_struct<T>::EXP_BIAS;
const int SB = fp_struct<T>::SIG_BITS;
#pragma empty_line
fp_struct<T> fps1(din);
int exp = fps1.exp - EB;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(exp > -1) {
ap_uint<CW> Pio4_i1;
ap_uint<CW+1> Pio4_i2;
ap_uint<SB+1> X;
ap_uint<2*(SB+1)+p1+3> Med;
ap_uint<3*(SB+1)+p1+3> h;
ap_uint<(SB+1)+3> h_int;
ap_uint<CW> h_fract;
ap_uint<2*CW> prod;
ap_uint<CW+1> prod_adj;
#pragma empty_line
Pio4_i1 = ref_Pio4_400(400-1-2,400-1-2-CW+1);
Pio4_i2 = ref_Pio4_400(400-1-2,400-1-2-(CW+1)+1);
#pragma empty_line
X = ((ap_uint<SB+1>)0x1 << SB) | (fps1.sig);
Med = table_lookup_4oPi<SB,p1>(exp,din);
#pragma empty_line
big_mult(Med, X, h);
#pragma empty_line
h_int = h >> (2*(SB+1)+p1);
h_fract = h(2*(SB+1)+p1-1,2*(SB+1)+p1-CW);
k = h_int(2,0);
#pragma empty_line
big_mult(h_fract, Pio4_i1, prod);
#pragma empty_line
prod_adj = prod((2*CW)-1,CW-1);
prod_adj = (k[0] == 1) ? (ap_uint<CW+1>)(Pio4_i2 - prod_adj) : prod_adj;
#pragma empty_line
dout = prod_adj(CW,1);
} else {
k = 0;
dout = convToInt<CW>(din);
}
}
#pragma line 45 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic_tables.h" 1
#pragma line 37 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic_tables.h"
const ap_uint<128> cordic_ctab_table_int_128[128] = {
"0x3243F6A8885A308D313198A2E0370734",
"0x1DAC670561BB4F68ADFC88BD978751A0",
"0xFADBAFC96406EB156DC79EF5F7A217E",
"0x7F56EA6AB0BDB719644BCC4F9F44477",
"0x3FEAB76E59FBD38DB2C9E4B7038B835",
"0x1FFD55BBA97624A84EF3AEEDBB518C4",
"0xFFFAAADDDB94D5BBE78C564015F760",
"0x7FFF5556EEEA5CB40311A8FDDF3057",
"0x3FFFEAAAB7776E52EC4ABEDADB53DF",
"0x1FFFFD5555BBBBA9729AB7AAC08947",
"0xFFFFFAAAAADDDDDB94B968067EF3A",
"0x7FFFFF555556EEEEEA5CA5D895892",
"0x3FFFFFEAAAAAB777776E52E5356F5",
"0x1FFFFFFD555555BBBBBBA972972D0",
"0xFFFFFFFAAAAAAADDDDDDDB94B94B",
"0x7FFFFFFF55555556EEEEEEEA5CA5",
"0x3FFFFFFFEAAAAAAAB77777776E52",
"0x1FFFFFFFFD55555555BBBBBBBBA9",
"0xFFFFFFFFFAAAAAAAAADDDDDDDDD",
"0x7FFFFFFFFF5555555556EEEEEEE",
"0x3FFFFFFFFFEAAAAAAAAAB777777",
"0x1FFFFFFFFFFD5555555555BBBBB",
"0xFFFFFFFFFFFAAAAAAAAAAADDDD",
"0x7FFFFFFFFFFF555555555556EE",
"0x3FFFFFFFFFFFEAAAAAAAAAAAB7",
"0x1FFFFFFFFFFFFD555555555555",
"0xFFFFFFFFFFFFFAAAAAAAAAAAA",
"0x7FFFFFFFFFFFFF55555555555",
"0x3FFFFFFFFFFFFFEAAAAAAAAAA",
"0x1FFFFFFFFFFFFFFD555555555",
"0xFFFFFFFFFFFFFFFAAAAAAAAA",
"0x7FFFFFFFFFFFFFFF55555555",
"0x3FFFFFFFFFFFFFFFEAAAAAAA",
"0x1FFFFFFFFFFFFFFFFD555555",
"0xFFFFFFFFFFFFFFFFFAAAAAA",
"0x7FFFFFFFFFFFFFFFFF55555",
"0x3FFFFFFFFFFFFFFFFFEAAAA",
"0x1FFFFFFFFFFFFFFFFFFD555",
"0xFFFFFFFFFFFFFFFFFFFAAA",
"0x7FFFFFFFFFFFFFFFFFFF55",
"0x3FFFFFFFFFFFFFFFFFFFEA",
"0x1FFFFFFFFFFFFFFFFFFFFD",
"0xFFFFFFFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFFF",
"0xFFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFFF",
"0x3FFFFFFFFFFFFF",
"0x1FFFFFFFFFFFFF",
"0xFFFFFFFFFFFFF",
"0x7FFFFFFFFFFFF",
"0x3FFFFFFFFFFFF",
"0x1FFFFFFFFFFFF",
"0xFFFFFFFFFFFF",
"0x7FFFFFFFFFFF",
"0x3FFFFFFFFFFF",
"0x1FFFFFFFFFFF",
"0xFFFFFFFFFFF",
"0x7FFFFFFFFFF",
"0x3FFFFFFFFFF",
"0x1FFFFFFFFFF",
"0xFFFFFFFFFF",
"0x7FFFFFFFFF",
"0x3FFFFFFFFF",
"0x1FFFFFFFFF",
"0xFFFFFFFFF",
"0x7FFFFFFFF",
"0x3FFFFFFFF",
"0x1FFFFFFFF",
"0xFFFFFFFF",
"0x7FFFFFFF",
"0x3FFFFFFF",
"0x1FFFFFFF",
"0xFFFFFFF",
"0x7FFFFFF",
"0x3FFFFFF",
"0x1FFFFFF",
"0xFFFFFF",
"0x7FFFFF",
"0x3FFFFF",
"0x1FFFFF",
"0xFFFFF",
"0x7FFFF",
"0x3FFFF",
"0x1FFFF",
"0xFFFF",
"0x7FFF",
"0x3FFF",
"0x1FFF",
"0xFFF",
"0x7FF",
"0x3FF",
"0x1FF",
"0xFF",
"0x7F",
"0x3F",
"0x1F",
"0xF",
"0x7",
"0x3",
"0x1",
"0x0",
"0x0",
};
#pragma empty_line
const ap_ufixed<128,2> cordic_ctab_table_128[128] = {
"0x0.C90FDAA22168C234C4C6628B80DC1CD0",
"0x0.76B19C1586ED3DA2B7F222F65E1D4680",
"0x0.3EB6EBF25901BAC55B71E7BD7DE885F8",
"0x0.1FD5BA9AAC2F6DC65912F313E7D111DC",
"0x0.0FFAADDB967EF4E36CB2792DC0E2E0D4",
"0x0.07FF556EEA5D892A13BCEBBB6ED46310",
"0x0.03FFEAAB776E5356EF9E31590057DD80",
"0x0.01FFFD555BBBA972D00C46A3F77CC15C",
"0x0.00FFFFAAAADDDDB94BB12AFB6B6D4F7C",
"0x0.007FFFF55556EEEEA5CA6ADEAB02251C",
"0x0.003FFFFEAAAAB77776E52E5A019FBCE8",
"0x0.001FFFFFD55555BBBBBA972976256248",
"0x0.000FFFFFFAAAAAADDDDDDB94B94D5BD4",
"0x0.0007FFFFFF5555556EEEEEEA5CA5CB40",
"0x0.0003FFFFFFEAAAAAAB7777776E52E52C",
"0x0.0001FFFFFFFD5555555BBBBBBBA97294",
"0x0.0000FFFFFFFFAAAAAAAADDDDDDDDB948",
"0x0.00007FFFFFFFF555555556EEEEEEEEA4",
"0x0.00003FFFFFFFFEAAAAAAAAB777777774",
"0x0.00001FFFFFFFFFD555555555BBBBBBB8",
"0x0.00000FFFFFFFFFFAAAAAAAAAADDDDDDC",
"0x0.000007FFFFFFFFFF55555555556EEEEC",
"0x0.000003FFFFFFFFFFEAAAAAAAAAAB7774",
"0x0.000001FFFFFFFFFFFD55555555555BB8",
"0x0.000000FFFFFFFFFFFFAAAAAAAAAAAADC",
"0x0.0000007FFFFFFFFFFFF5555555555554",
"0x0.0000003FFFFFFFFFFFFEAAAAAAAAAAA8",
"0x0.0000001FFFFFFFFFFFFFD55555555554",
"0x0.0000000FFFFFFFFFFFFFFAAAAAAAAAA8",
"0x0.00000007FFFFFFFFFFFFFF5555555554",
"0x0.00000003FFFFFFFFFFFFFFEAAAAAAAA8",
"0x0.00000001FFFFFFFFFFFFFFFD55555554",
"0x0.00000000FFFFFFFFFFFFFFFFAAAAAAA8",
"0x0.000000007FFFFFFFFFFFFFFFF5555554",
"0x0.000000003FFFFFFFFFFFFFFFFEAAAAA8",
"0x0.000000001FFFFFFFFFFFFFFFFFD55554",
"0x0.000000000FFFFFFFFFFFFFFFFFFAAAA8",
"0x0.0000000007FFFFFFFFFFFFFFFFFF5554",
"0x0.0000000003FFFFFFFFFFFFFFFFFFEAA8",
"0x0.0000000001FFFFFFFFFFFFFFFFFFFD54",
"0x0.0000000000FFFFFFFFFFFFFFFFFFFFA8",
"0x0.00000000007FFFFFFFFFFFFFFFFFFFF4",
"0x0.00000000003FFFFFFFFFFFFFFFFFFFFC",
"0x0.00000000001FFFFFFFFFFFFFFFFFFFFC",
"0x0.00000000000FFFFFFFFFFFFFFFFFFFFC",
"0x0.000000000007FFFFFFFFFFFFFFFFFFFC",
"0x0.000000000003FFFFFFFFFFFFFFFFFFFC",
"0x0.000000000001FFFFFFFFFFFFFFFFFFFC",
"0x0.000000000000FFFFFFFFFFFFFFFFFFFC",
"0x0.0000000000007FFFFFFFFFFFFFFFFFFC",
"0x0.0000000000003FFFFFFFFFFFFFFFFFFC",
"0x0.0000000000001FFFFFFFFFFFFFFFFFFC",
"0x0.0000000000000FFFFFFFFFFFFFFFFFFC",
"0x0.00000000000007FFFFFFFFFFFFFFFFFC",
"0x0.00000000000003FFFFFFFFFFFFFFFFFC",
"0x0.00000000000001FFFFFFFFFFFFFFFFFC",
"0x0.00000000000000FFFFFFFFFFFFFFFFFC",
"0x0.000000000000007FFFFFFFFFFFFFFFFC",
"0x0.000000000000003FFFFFFFFFFFFFFFFC",
"0x0.000000000000001FFFFFFFFFFFFFFFFC",
"0x0.000000000000000FFFFFFFFFFFFFFFFC",
"0x0.0000000000000007FFFFFFFFFFFFFFFC",
"0x0.0000000000000003FFFFFFFFFFFFFFFC",
"0x0.0000000000000001FFFFFFFFFFFFFFFC",
"0x0.0000000000000000FFFFFFFFFFFFFFFC",
"0x0.00000000000000007FFFFFFFFFFFFFFC",
"0x0.00000000000000003FFFFFFFFFFFFFFC",
"0x0.00000000000000001FFFFFFFFFFFFFFC",
"0x0.00000000000000000FFFFFFFFFFFFFFC",
"0x0.000000000000000007FFFFFFFFFFFFFC",
"0x0.000000000000000003FFFFFFFFFFFFFC",
"0x0.000000000000000001FFFFFFFFFFFFFC",
"0x0.000000000000000000FFFFFFFFFFFFFC",
"0x0.0000000000000000007FFFFFFFFFFFFC",
"0x0.0000000000000000003FFFFFFFFFFFFC",
"0x0.0000000000000000001FFFFFFFFFFFFC",
"0x0.0000000000000000000FFFFFFFFFFFFC",
"0x0.00000000000000000007FFFFFFFFFFFC",
"0x0.00000000000000000003FFFFFFFFFFFC",
"0x0.00000000000000000001FFFFFFFFFFFC",
"0x0.00000000000000000000FFFFFFFFFFFC",
"0x0.000000000000000000007FFFFFFFFFFC",
"0x0.000000000000000000003FFFFFFFFFFC",
"0x0.000000000000000000001FFFFFFFFFFC",
"0x0.000000000000000000000FFFFFFFFFFC",
"0x0.0000000000000000000007FFFFFFFFFC",
"0x0.0000000000000000000003FFFFFFFFFC",
"0x0.0000000000000000000001FFFFFFFFFC",
"0x0.0000000000000000000000FFFFFFFFFC",
"0x0.00000000000000000000007FFFFFFFFC",
"0x0.00000000000000000000003FFFFFFFFC",
"0x0.00000000000000000000001FFFFFFFFC",
"0x0.00000000000000000000000FFFFFFFFC",
"0x0.000000000000000000000007FFFFFFFC",
"0x0.000000000000000000000003FFFFFFFC",
"0x0.000000000000000000000001FFFFFFFC",
"0x0.000000000000000000000000FFFFFFFC",
"0x0.0000000000000000000000007FFFFFFC",
"0x0.0000000000000000000000003FFFFFFC",
"0x0.0000000000000000000000001FFFFFFC",
"0x0.0000000000000000000000000FFFFFFC",
"0x0.00000000000000000000000007FFFFFC",
"0x0.00000000000000000000000003FFFFFC",
"0x0.00000000000000000000000001FFFFFC",
"0x0.00000000000000000000000000FFFFFC",
"0x0.000000000000000000000000007FFFFC",
"0x0.000000000000000000000000003FFFFC",
"0x0.000000000000000000000000001FFFFC",
"0x0.000000000000000000000000000FFFFC",
"0x0.0000000000000000000000000007FFFC",
"0x0.0000000000000000000000000003FFFC",
"0x0.0000000000000000000000000001FFFC",
"0x0.0000000000000000000000000000FFFC",
"0x0.00000000000000000000000000007FFC",
"0x0.00000000000000000000000000003FFC",
"0x0.00000000000000000000000000001FFC",
"0x0.00000000000000000000000000000FFC",
"0x0.000000000000000000000000000007FC",
"0x0.000000000000000000000000000003FC",
"0x0.000000000000000000000000000001FC",
"0x0.000000000000000000000000000000FC",
"0x0.0000000000000000000000000000007C",
"0x0.0000000000000000000000000000003C",
"0x0.0000000000000000000000000000001C",
"0x0.0000000000000000000000000000000C",
"0x0.00000000000000000000000000000004",
"0x0.00000000000000000000000000000000",
"0x0.00000000000000000000000000000000",
};
#pragma empty_line
#pragma empty_line
const float cordic_ctab_table_floatdouble_128[128] = {
7.853982e-01,
4.636476e-01,
2.449787e-01,
1.243550e-01,
6.241881e-02,
3.123983e-02,
1.562373e-02,
7.812341e-03,
3.906230e-03,
1.953123e-03,
9.765622e-04,
4.882812e-04,
2.441406e-04,
1.220703e-04,
6.103516e-05,
3.051758e-05,
1.525879e-05,
7.629395e-06,
3.814697e-06,
1.907349e-06,
9.536743e-07,
4.768372e-07,
2.384186e-07,
1.192093e-07,
5.960464e-08,
2.980232e-08,
1.490116e-08,
7.450581e-09,
3.725290e-09,
1.862645e-09,
9.313226e-10,
4.656613e-10,
2.328306e-10,
1.164153e-10,
5.820766e-11,
2.910383e-11,
1.455192e-11,
7.275958e-12,
3.637979e-12,
1.818989e-12,
9.094947e-13,
4.547474e-13,
2.273737e-13,
1.136868e-13,
5.684342e-14,
2.842171e-14,
1.421085e-14,
7.105427e-15,
3.552714e-15,
1.776357e-15,
8.881784e-16,
4.440892e-16,
2.220446e-16,
1.110223e-16,
5.551115e-17,
2.775558e-17,
1.387779e-17,
6.938894e-18,
3.469447e-18,
1.734723e-18,
8.673617e-19,
4.336809e-19,
2.168404e-19,
1.084202e-19,
5.421011e-20,
2.710505e-20,
1.355253e-20,
6.776264e-21,
3.388132e-21,
1.694066e-21,
8.470329e-22,
4.235165e-22,
2.117582e-22,
1.058791e-22,
5.293956e-23,
2.646978e-23,
1.323489e-23,
6.617445e-24,
3.308722e-24,
1.654361e-24,
8.271806e-25,
4.135903e-25,
2.067952e-25,
1.033976e-25,
5.169879e-26,
2.584939e-26,
1.292470e-26,
6.462349e-27,
3.231174e-27,
1.615587e-27,
8.077936e-28,
4.038968e-28,
2.019484e-28,
1.009742e-28,
5.048710e-29,
2.524355e-29,
1.262177e-29,
6.310887e-30,
3.155444e-30,
1.577722e-30,
7.888609e-31,
3.944305e-31,
1.972152e-31,
9.860761e-32,
4.930381e-32,
2.465190e-32,
1.232595e-32,
6.162976e-33,
3.081488e-33,
1.540744e-33,
7.703720e-34,
3.851860e-34,
1.925930e-34,
9.629650e-35,
4.814825e-35,
2.407412e-35,
1.203706e-35,
6.018531e-36,
3.009266e-36,
1.504633e-36,
7.523164e-37,
3.761582e-37,
1.880791e-37,
9.403955e-38,
4.701977e-38,
2.350989e-38,
1.175494e-38,
5.877472e-39,
};
#pragma empty_line
const float cordic_hyperb_table_floatdouble_128[128] = {
5.493061e-01,
2.554128e-01,
1.256572e-01,
6.258157e-02,
3.126018e-02,
1.562627e-02,
7.812659e-03,
3.906270e-03,
1.953127e-03,
9.765628e-04,
4.882813e-04,
2.441406e-04,
1.220703e-04,
6.103516e-05,
3.051758e-05,
1.525879e-05,
7.629395e-06,
3.814697e-06,
1.907349e-06,
9.536743e-07,
4.768372e-07,
2.384186e-07,
1.192093e-07,
5.960464e-08,
2.980232e-08,
1.490116e-08,
7.450581e-09,
3.725290e-09,
1.862645e-09,
9.313226e-10,
4.656613e-10,
2.328306e-10,
1.164153e-10,
5.820766e-11,
2.910383e-11,
1.455192e-11,
7.275958e-12,
3.637979e-12,
1.818989e-12,
9.094947e-13,
4.547474e-13,
2.273737e-13,
1.136868e-13,
5.684342e-14,
2.842171e-14,
1.421085e-14,
7.105427e-15,
3.552714e-15,
1.776357e-15,
8.881784e-16,
4.440892e-16,
2.220446e-16,
1.110223e-16,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
0.000000e+00,
};
#pragma empty_line
#pragma empty_line
const ap_ufixed<128,4> cordic_hyperb_table_128[128] = {
"0x0.8c9f53d5681854bb520cc6aa829dbe5",
"0x0.4162bbea0451469c9daf0be0810eda9",
"0x0.202b12393d5deed328cf41ed722d8c9",
"0x0.1005588ad375acdcb1312a563c68525",
"0x0.0800aac448d77125a4ee9fee2db3774",
"0x0.04001556222b47263834e958ab3b4ca",
"0x0.020002aab111235a6e87a29f88bb425",
"0x0.01000055558888ad1aee1ef93404079",
"0x0.0080000aaaac44448d68e4c64f4d811",
"0x0.004000015555622222b46b4dd0dd6ae",
"0x0.002000002aaaab11111235a35dc3dc4",
"0x0.001000000555555888888ad1ad1c98c",
"0x0.0008000000aaaaaac4444448d68d69b",
"0x0.0004000000155555562222222b46b46",
"0x0.000200000002aaaaaab1111111235a3",
"0x0.0001000000005555555588888888ad1",
"0x0.0000800000000aaaaaaaac444444448",
"0x0.0000400000000155555555622222222",
"0x0.000020000000002aaaaaaaab1111111",
"0x0.0000100000000005555555555888888",
"0x0.0000080000000000aaaaaaaaaac4444",
"0x0.0000040000000000155555555556222",
"0x0.000002000000000002aaaaaaaaaab11",
"0x0.0000010000000000005555555555558",
"0x0.0000008000000000000aaaaaaaaaaaa",
"0x0.0000004000000000000155555555555",
"0x0.000000200000000000002aaaaaaaaaa",
"0x0.0000001000000000000005555555555",
"0x0.0000000800000000000000aaaaaaaaa",
"0x0.0000000400000000000000155555555",
"0x0.000000020000000000000002aaaaaaa",
"0x0.0000000100000000000000005555555",
"0x0.0000000080000000000000000aaaaaa",
"0x0.0000000040000000000000000155555",
"0x0.000000002000000000000000002aaaa",
"0x0.0000000010000000000000000005555",
"0x0.0000000008000000000000000000aaa",
"0x0.0000000004000000000000000000155",
"0x0.000000000200000000000000000002a",
"0x0.0000000001000000000000000000005",
"0x0.0000000000800000000000000000000",
"0x0.0000000000400000000000000000000",
"0x0.00000000001ffffffffffffffffffff",
"0x0.00000000000ffffffffffffffffffff",
"0x0.000000000007fffffffffffffffffff",
"0x0.000000000003fffffffffffffffffff",
"0x0.000000000001fffffffffffffffffff",
"0x0.000000000000fffffffffffffffffff",
"0x0.0000000000007ffffffffffffffffff",
"0x0.0000000000003ffffffffffffffffff",
"0x0.0000000000001ffffffffffffffffff",
"0x0.0000000000000ffffffffffffffffff",
"0x0.00000000000007fffffffffffffffff",
"0x0.00000000000003fffffffffffffffff",
"0x0.00000000000001fffffffffffffffff",
"0x0.00000000000000fffffffffffffffff",
"0x0.000000000000007ffffffffffffffff",
"0x0.000000000000003ffffffffffffffff",
"0x0.000000000000001ffffffffffffffff",
"0x0.000000000000000ffffffffffffffff",
"0x0.0000000000000007fffffffffffffff",
"0x0.0000000000000003fffffffffffffff",
"0x0.0000000000000001fffffffffffffff",
"0x0.0000000000000000fffffffffffffff",
"0x0.00000000000000007ffffffffffffff",
"0x0.00000000000000003ffffffffffffff",
"0x0.00000000000000001ffffffffffffff",
"0x0.00000000000000000ffffffffffffff",
"0x0.000000000000000007fffffffffffff",
"0x0.000000000000000003fffffffffffff",
"0x0.000000000000000001fffffffffffff",
"0x0.000000000000000000fffffffffffff",
"0x0.0000000000000000007ffffffffffff",
"0x0.0000000000000000003ffffffffffff",
"0x0.0000000000000000001ffffffffffff",
"0x0.0000000000000000000ffffffffffff",
"0x0.00000000000000000007fffffffffff",
"0x0.00000000000000000003fffffffffff",
"0x0.00000000000000000001fffffffffff",
"0x0.00000000000000000000fffffffffff",
"0x0.000000000000000000007ffffffffff",
"0x0.000000000000000000003ffffffffff",
"0x0.000000000000000000001ffffffffff",
"0x0.000000000000000000000ffffffffff",
"0x0.0000000000000000000007fffffffff",
"0x0.0000000000000000000003fffffffff",
"0x0.0000000000000000000001fffffffff",
"0x0.0000000000000000000000fffffffff",
"0x0.00000000000000000000007ffffffff",
"0x0.00000000000000000000003ffffffff",
"0x0.00000000000000000000001ffffffff",
"0x0.00000000000000000000000ffffffff",
"0x0.000000000000000000000007fffffff",
"0x0.000000000000000000000003fffffff",
"0x0.000000000000000000000001fffffff",
"0x0.000000000000000000000000fffffff",
"0x0.0000000000000000000000007ffffff",
"0x0.0000000000000000000000003ffffff",
"0x0.0000000000000000000000001ffffff",
"0x0.0000000000000000000000000ffffff",
"0x0.00000000000000000000000007fffff",
"0x0.00000000000000000000000003fffff",
"0x0.00000000000000000000000001fffff",
"0x0.00000000000000000000000000fffff",
"0x0.000000000000000000000000007ffff",
"0x0.000000000000000000000000003ffff",
"0x0.000000000000000000000000001ffff",
"0x0.000000000000000000000000000ffff",
"0x0.0000000000000000000000000007fff",
"0x0.0000000000000000000000000003fff",
"0x0.0000000000000000000000000001fff",
"0x0.0000000000000000000000000000fff",
"0x0.00000000000000000000000000007ff",
"0x0.00000000000000000000000000003ff",
"0x0.00000000000000000000000000001ff",
"0x0.00000000000000000000000000000ff",
"0x0.000000000000000000000000000007f",
"0x0.000000000000000000000000000003f",
"0x0.000000000000000000000000000001f",
"0x0.000000000000000000000000000000f",
"0x0.0000000000000000000000000000007",
"0x0.0000000000000000000000000000003",
"0x0.0000000000000000000000000000001",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
};
#pragma empty_line
#pragma empty_line
const ap_ufixed<128,4> cordic_hyperb_table_128_160[170] = {
"0x0.8c9f53d5681854bb520cc6aa829dbe5",
"0x0.4162bbea0451469c9daf0be0810eda9",
"0x0.202b12393d5deed328cf41ed722d8c9",
"0x0.1005588ad375acdcb1312a563c68525",
"0x0.1005588ad375acdcb1312a563c68525",
"0x0.0800aac448d77125a4ee9fee2db3774",
"0x0.04001556222b47263834e958ab3b4ca",
"0x0.020002aab111235a6e87a29f88bb425",
"0x0.020002aab111235a6e87a29f88bb425",
"0x0.01000055558888ad1aee1ef93404079",
"0x0.0080000aaaac44448d68e4c64f4d811",
"0x0.004000015555622222b46b4dd0dd6ae",
"0x0.004000015555622222b46b4dd0dd6ae",
"0x0.002000002aaaab11111235a35dc3dc4",
"0x0.001000000555555888888ad1ad1c98c",
"0x0.0008000000aaaaaac4444448d68d69b",
"0x0.0008000000aaaaaac4444448d68d69b",
"0x0.0004000000155555562222222b46b46",
"0x0.000200000002aaaaaab1111111235a3",
"0x0.0001000000005555555588888888ad1",
"0x0.0001000000005555555588888888ad1",
"0x0.0000800000000aaaaaaaac444444448",
"0x0.0000400000000155555555622222222",
"0x0.000020000000002aaaaaaaab1111111",
"0x0.000020000000002aaaaaaaab1111111",
"0x0.0000100000000005555555555888888",
"0x0.0000080000000000aaaaaaaaaac4444",
"0x0.0000040000000000155555555556222",
"0x0.0000040000000000155555555556222",
"0x0.000002000000000002aaaaaaaaaab11",
"0x0.0000010000000000005555555555558",
"0x0.0000008000000000000aaaaaaaaaaaa",
"0x0.0000008000000000000aaaaaaaaaaaa",
"0x0.0000004000000000000155555555555",
"0x0.000000200000000000002aaaaaaaaaa",
"0x0.0000001000000000000005555555555",
"0x0.0000001000000000000005555555555",
"0x0.0000000800000000000000aaaaaaaaa",
"0x0.0000000400000000000000155555555",
"0x0.000000020000000000000002aaaaaaa",
"0x0.000000020000000000000002aaaaaaa",
"0x0.0000000100000000000000005555555",
"0x0.0000000080000000000000000aaaaaa",
"0x0.0000000040000000000000000155555",
"0x0.0000000040000000000000000155555",
"0x0.000000002000000000000000002aaaa",
"0x0.0000000010000000000000000005555",
"0x0.0000000008000000000000000000aaa",
"0x0.0000000008000000000000000000aaa",
"0x0.0000000004000000000000000000155",
"0x0.000000000200000000000000000002a",
"0x0.0000000001000000000000000000005",
"0x0.0000000001000000000000000000005",
"0x0.0000000000800000000000000000000",
"0x0.0000000000400000000000000000000",
"0x0.00000000001ffffffffffffffffffff",
"0x0.00000000001ffffffffffffffffffff",
"0x0.00000000000ffffffffffffffffffff",
"0x0.000000000007fffffffffffffffffff",
"0x0.000000000003fffffffffffffffffff",
"0x0.000000000003fffffffffffffffffff",
"0x0.000000000001fffffffffffffffffff",
"0x0.000000000000fffffffffffffffffff",
"0x0.0000000000007ffffffffffffffffff",
"0x0.0000000000007ffffffffffffffffff",
"0x0.0000000000003ffffffffffffffffff",
"0x0.0000000000001ffffffffffffffffff",
"0x0.0000000000000ffffffffffffffffff",
"0x0.0000000000000ffffffffffffffffff",
"0x0.00000000000007fffffffffffffffff",
"0x0.00000000000003fffffffffffffffff",
"0x0.00000000000001fffffffffffffffff",
"0x0.00000000000001fffffffffffffffff",
"0x0.00000000000000fffffffffffffffff",
"0x0.000000000000007ffffffffffffffff",
"0x0.000000000000003ffffffffffffffff",
"0x0.000000000000003ffffffffffffffff",
"0x0.000000000000001ffffffffffffffff",
"0x0.000000000000000ffffffffffffffff",
"0x0.0000000000000007fffffffffffffff",
"0x0.0000000000000007fffffffffffffff",
"0x0.0000000000000003fffffffffffffff",
"0x0.0000000000000001fffffffffffffff",
"0x0.0000000000000000fffffffffffffff",
"0x0.0000000000000000fffffffffffffff",
"0x0.00000000000000007ffffffffffffff",
"0x0.00000000000000003ffffffffffffff",
"0x0.00000000000000001ffffffffffffff",
"0x0.00000000000000001ffffffffffffff",
"0x0.00000000000000000ffffffffffffff",
"0x0.000000000000000007fffffffffffff",
"0x0.000000000000000003fffffffffffff",
"0x0.000000000000000003fffffffffffff",
"0x0.000000000000000001fffffffffffff",
"0x0.000000000000000000fffffffffffff",
"0x0.0000000000000000007ffffffffffff",
"0x0.0000000000000000007ffffffffffff",
"0x0.0000000000000000003ffffffffffff",
"0x0.0000000000000000001ffffffffffff",
"0x0.0000000000000000000ffffffffffff",
"0x0.0000000000000000000ffffffffffff",
"0x0.00000000000000000007fffffffffff",
"0x0.00000000000000000003fffffffffff",
"0x0.00000000000000000001fffffffffff",
"0x0.00000000000000000001fffffffffff",
"0x0.00000000000000000000fffffffffff",
"0x0.000000000000000000007ffffffffff",
"0x0.000000000000000000003ffffffffff",
"0x0.000000000000000000003ffffffffff",
"0x0.000000000000000000001ffffffffff",
"0x0.000000000000000000000ffffffffff",
"0x0.0000000000000000000007fffffffff",
"0x0.0000000000000000000007fffffffff",
"0x0.0000000000000000000003fffffffff",
"0x0.0000000000000000000001fffffffff",
"0x0.0000000000000000000000fffffffff",
"0x0.0000000000000000000000fffffffff",
"0x0.00000000000000000000007ffffffff",
"0x0.00000000000000000000003ffffffff",
"0x0.00000000000000000000001ffffffff",
"0x0.00000000000000000000001ffffffff",
"0x0.00000000000000000000000ffffffff",
"0x0.000000000000000000000007fffffff",
"0x0.000000000000000000000003fffffff",
"0x0.000000000000000000000003fffffff",
"0x0.000000000000000000000001fffffff",
"0x0.000000000000000000000000fffffff",
"0x0.0000000000000000000000007ffffff",
"0x0.0000000000000000000000007ffffff",
"0x0.0000000000000000000000003ffffff",
"0x0.0000000000000000000000001ffffff",
"0x0.0000000000000000000000000ffffff",
"0x0.0000000000000000000000000ffffff",
"0x0.00000000000000000000000007fffff",
"0x0.00000000000000000000000003fffff",
"0x0.00000000000000000000000001fffff",
"0x0.00000000000000000000000001fffff",
"0x0.00000000000000000000000000fffff",
"0x0.000000000000000000000000007ffff",
"0x0.000000000000000000000000003ffff",
"0x0.000000000000000000000000003ffff",
"0x0.000000000000000000000000001ffff",
"0x0.000000000000000000000000000ffff",
"0x0.0000000000000000000000000007fff",
"0x0.0000000000000000000000000007fff",
"0x0.0000000000000000000000000003fff",
"0x0.0000000000000000000000000001fff",
"0x0.0000000000000000000000000000fff",
"0x0.0000000000000000000000000000fff",
"0x0.00000000000000000000000000007ff",
"0x0.00000000000000000000000000003ff",
"0x0.00000000000000000000000000001ff",
"0x0.00000000000000000000000000001ff",
"0x0.00000000000000000000000000000ff",
"0x0.000000000000000000000000000007f",
"0x0.000000000000000000000000000003f",
"0x0.000000000000000000000000000003f",
"0x0.000000000000000000000000000001f",
"0x0.000000000000000000000000000000f",
"0x0.0000000000000000000000000000007",
"0x0.0000000000000000000000000000007",
"0x0.0000000000000000000000000000003",
"0x0.0000000000000000000000000000001",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
"0x0.0000000000000000000000000000000",
};
#pragma line 46 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h" 2
#pragma line 57 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
namespace cordic
{
#pragma empty_line
template <typename T>
class _const
{
};
#pragma empty_line
template <>
class _const<float>
{
public:
static const uint32_t zero = 0x00000000;
static const uint32_t pi_4 = 0x3F490FDB;
static const uint32_t pi_2 = 0x3FC90FDB;
static const uint32_t _3pi_4 = 0x4016CBE4;
static const uint32_t pi = 0x40490FDB;
};
#pragma empty_line
template <>
class _const<double>
{
public:
static const uint64_t zero = 0x0000000000000000;
static const uint64_t pi_4 = 0x3FE921FB54442D18;
static const uint64_t pi_2 = 0x3FF921FB54442D18;
static const uint64_t _3pi_4 = 0x4002D97C7F3321D2;
static const uint64_t pi = 0x400921FB54442D18;
};
#pragma line 96 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
template<int II1, int LAT1, class T2, class T3, class T4>
typename x_traits<T2,T3>::ADD_T addsub(
T2 a,
T3 b,
T4 add)
{
if(II1 == 0) {
if(LAT1 == 1) {
#pragma HLS INTERFACE ap_none port=return register
}
}
#pragma HLS LATENCY MAX=LAT1
#pragma empty_line
typename x_traits<T2,T3>::ADD_T tmp;
if(add) {
tmp = a + b;
} else {
tmp = a - b;
}
return tmp;
}
#pragma line 127 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
template<class T2, class T3, class T4>
typename x_traits<T2, T3>::ADD_T addsub_floatdouble(
T2 a,
T3 b,
T4 add)
{
typename x_traits<T2, T3>::ADD_T tmp;
fp_struct<T3> b_mod(b);
b_mod.sign = !(add^b_mod.sign);
#pragma empty_line
tmp = a + b_mod.to_ieee();
return tmp;
}
#pragma line 149 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
template<bool SHIFT_RIGHT, class T1, class T2>
T1 shift_floatdouble(
T1 a,
T2 b)
{
(((b>=0) && "number of shift bits must be non-negative, use bool value SHIFT_RIGHT for left-shift or right-shift") ? (void)0 : _assert("(b>=0) && \"number of shift bits must be non-negative, use bool value SHIFT_RIGHT for left-shift or right-shift\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h", 154));
if (a == 0)
return a;
fp_struct<T1> tmp(a);
if(SHIFT_RIGHT) {
if (tmp.exp == 0) {
tmp.sig = (tmp.sig >> b);
} else {
int new_exp = (int)(tmp.exp) - b;
int min_bias = 1;
if(new_exp < min_bias) {
tmp.exp = 0;
tmp.sig = tmp.sig >> 1;
tmp.sig[tmp.SIG_BITS-1] = 1;
tmp.sig = (tmp.sig >> (-new_exp));
} else {
tmp.exp = new_exp;
}
}
} else {
int new_exp = (int)(tmp.exp) + b;
int max_bias = 2*tmp.EXP_BIAS;
if(new_exp > max_bias) {
tmp.exp = 2*tmp.EXP_BIAS+1;
tmp.sig = 0;
} else {
tmp.exp = new_exp;
#pragma line 201 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
}
}
return tmp.to_ieee();
}
#pragma line 214 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
template<int N, int MODE, int II1, int LAT1, int W, int I, int W2, int I2>
void cordic_circ_v1(
ap_fixed<W,I> &x,
ap_fixed<W,I> &y,
ap_fixed<W2,I2> &z)
{
#pragma HLS INLINE SELF
typedef ap_fixed<W,I> T;
#pragma empty_line
const int n = (N>W) ? W : N;
const int LAT2 = LAT1/N;
#pragma empty_line
int k;
T tx, ty;
ap_fixed<W2,I2> tz;
ap_uint<1> d;
#pragma empty_line
for (k=0; k<n; ++k) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(MODE == 1) {
d = ~y[N-1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
} else {
d = z[n-1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
T y_s = y >> k;
tx = addsub<II1,LAT2>(x, y_s, d);
T x_s = x >> k;
ty = addsub<II1,LAT2>(y, x_s, !d);
ap_fixed<W2,I2,AP_RND> z_s; z_s = cordic_ctab_table_128[k];
tz = addsub<II1,LAT2>(z, z_s, d);
x = tx; y = ty; z = tz;
}
}
#pragma line 270 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
template<int N, int MODE, class T>
void cordic_circ_floatdouble_v1(
T &x,
T &y,
T &z)
{
#pragma HLS INLINE SELF
#pragma empty_line
int k;
T tx, ty, tz;
ap_uint<1> d;
#pragma empty_line
for (k=0; k<N; ++k) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
fp_struct<T> y_tmp(y);
fp_struct<T> z_tmp(z);
#pragma empty_line
if(MODE == 1) {
d = ~y_tmp.sign;
#pragma empty_line
#pragma empty_line
#pragma empty_line
} else {
d = z_tmp.sign;
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
T y_s = shift_floatdouble<true,T>(y,k);
tx = addsub_floatdouble(x, y_s, d);
T x_s = shift_floatdouble<true,T>(x,k);
ty = addsub_floatdouble(y, x_s, !d);
T z_s = cordic_ctab_table_floatdouble_128[k];
tz = addsub_floatdouble(z, z_s, d);
#pragma empty_line
x = tx; y = ty; z = tz;
}
}
#pragma empty_line
template<int W, int N, int MODE, int II1, int LAT1, class T>
void cordic_hyperb_v1(
T &x,
T &y,
T &z)
{
#pragma HLS INLINE SELF
#pragma empty_line
const int n = (N>W) ? W : N;
const int n1 = n + n/4;
const int LAT2 = LAT1/N;
#pragma empty_line
#pragma empty_line
int k1;
T tx, ty, tz;
ap_uint<1> d;
#pragma empty_line
#pragma empty_line
for (k1=0; k1<n1; ++k1) {
int k = k1 - (k1/4) + 1;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(MODE == 1) {
d = ~y[n-1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
} else {
d = z[n-1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
T y_s = y >> k;
tx = addsub<II1,LAT2>(x, y_s, !d);
#pragma empty_line
#pragma empty_line
#pragma empty_line
T x_s = x >> k;
ty = addsub<II1,LAT2>(y, x_s, !d);
#pragma empty_line
T z_s = cordic_hyperb_table_128_160[k1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
tz = addsub<II1,LAT2>(z, z_s, d);
#pragma empty_line
x = tx; y = ty; z = tz;
}
}
#pragma empty_line
template<int N, int MODE, class T>
void cordic_hyperb_floatdouble_v1(
T &x,
T &y,
T &z)
{
#pragma HLS INLINE SELF
#pragma empty_line
int k, k1;
T tx, ty, tz;
ap_uint<1> d;
#pragma empty_line
k=1;
int cnt = 0;
const int n1 = N + N/4;
for (k1=0; k1<n1; ++k1) {
fp_struct<T> y_tmp(y);
fp_struct<T> z_tmp(z);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(MODE == 1) {
d = ~y_tmp.sign;
#pragma empty_line
#pragma empty_line
#pragma empty_line
} else {
d = z_tmp.sign;
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
T y_s = shift_floatdouble<true,T>(y,k);
tx = addsub_floatdouble(x, y_s, !d);
T x_s = shift_floatdouble<true,T>(x,k);
ty = addsub_floatdouble(y, x_s, !d);
T z_s = cordic_hyperb_table_floatdouble_128[k-1];
tz = addsub_floatdouble(z, z_s, d);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
x = tx; y = ty; z = tz;
#pragma empty_line
if(cnt == 3) {
cnt = 0;
} else {
cnt = cnt + 1;
k++;
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
int
sin_cos_range_redux_cordic(
float t_in,
float &s_out,
float &c_out)
{
const int p1 = 20;
const int CW = 38;
#pragma empty_line
fp_struct<float> din(t_in);
#pragma empty_line
ap_uint<3> k;
ap_int<CW> dina1, souta, couta;
#pragma empty_line
ap_uint<CW> dout;
range_redux_payne_hanek<p1,CW,float>(t_in,k,dout);
dina1 = dout >> 2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_fixed<CW+1,3> x, y, z;
x.range() = ref_cordic(99,100-CW) >> 2;
y = 0;
z.range() = dina1;
cordic_circ_v1<CW,0,0,0>(x,y,z);
couta = x.range();
souta = y.range();
#pragma line 494 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
if(dina1 != 0) {
souta = souta << 1;
couta = couta << 1;
} else {
#pragma empty_line
#pragma empty_line
#pragma empty_line
souta = 0;
couta = ((ap_uint<CW>)0x1 << (CW-1)) - dina1;
}
float tmp_s_out, tmp_c_out;
tmp_s_out = convToFloat<CW>(souta);
tmp_c_out = convToFloat<CW>(couta);
#pragma line 516 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
int sel = (din.__signbit()) ? 7 - k.to_uint() : k.to_uint();
switch(sel) {
case 0:
s_out = tmp_s_out;
c_out = tmp_c_out;
break;
case 1:
s_out = tmp_c_out;
c_out = tmp_s_out;
break;
case 2:
s_out = tmp_c_out;
c_out = -tmp_s_out;
break;
case 3:
s_out = tmp_s_out;
c_out = -tmp_c_out;
break;
case 4:
s_out = -tmp_s_out;
c_out = -tmp_c_out;
break;
case 5:
s_out = -tmp_c_out;
c_out = -tmp_s_out;
break;
case 6:
s_out = -tmp_c_out;
c_out = tmp_s_out;
break;
case 7:
s_out = -tmp_s_out;
c_out = tmp_c_out;
break;
default:
s_out = tmp_s_out;
c_out = tmp_c_out;
}
#pragma empty_line
if(din.exp == 0xFF) {
s_out = hls::nan("");
c_out = hls::nan("");
} else if(din.exp < (127-11)) {
s_out = t_in;
}
#pragma empty_line
return 1;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
int
sin_cos_range_redux_cordic(
double t_in,
double &s_out,
double &c_out)
{
const int p1 = 16;
const int CW = 78;
#pragma empty_line
fp_struct<double> din(t_in);
#pragma empty_line
ap_uint<3> k;
ap_uint<CW> dout;
#pragma empty_line
range_redux_payne_hanek<p1,CW,double>(t_in,k,dout);
#pragma empty_line
ap_int<CW> dina1, souta, couta;
dina1 = dout >> 2;
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_fixed<CW+1,3> x, y, z;
x.range() = ref_cordic(99,100-CW) >> 2;
y = 0;
z.range() = dina1;
cordic_circ_v1<CW,0,0,0>(x,y,z);
couta = x.range();
souta = y.range();
#pragma line 612 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
if(dina1 != 0) {
souta = souta << 1;
couta = couta << 1;
} else {
#pragma empty_line
#pragma empty_line
#pragma empty_line
souta = 0;
couta = ((ap_uint<CW>)0x1 << (CW-1)) - dina1;
}
double tmp_s_out, tmp_c_out;
tmp_s_out = convToDouble<CW>(souta);
tmp_c_out = convToDouble<CW>(couta);
#pragma empty_line
int sel = (din.__signbit()) ? 7 - k.to_uint() : k.to_uint();
switch(sel) {
case 0:
s_out = tmp_s_out;
c_out = tmp_c_out;
break;
case 1:
s_out = tmp_c_out;
c_out = tmp_s_out;
break;
case 2:
s_out = tmp_c_out;
c_out = -tmp_s_out;
break;
case 3:
s_out = tmp_s_out;
c_out = -tmp_c_out;
break;
case 4:
s_out = -tmp_s_out;
c_out = -tmp_c_out;
break;
case 5:
s_out = -tmp_c_out;
c_out = -tmp_s_out;
break;
case 6:
s_out = -tmp_c_out;
c_out = tmp_s_out;
break;
case 7:
s_out = -tmp_s_out;
c_out = tmp_c_out;
break;
default:
s_out = tmp_s_out;
c_out = tmp_c_out;
}
#pragma empty_line
if(din.exp == 0x7FF) {
s_out = hls::nan("");
c_out = hls::nan("");
} else if(din.exp < (1023-24)) {
#pragma empty_line
s_out = t_in;
}
return 1;
}
#pragma empty_line
static
void
sincos(
double t_in,
double *s_out,
double *c_out)
{
sin_cos_range_redux_cordic(t_in,*s_out,*c_out);
}
#pragma empty_line
static float
sinf(float t_in)
{
float s_out, c_out;
sin_cos_range_redux_cordic(t_in, s_out, c_out);
return s_out;
}
#pragma empty_line
static double
sin(double t_in)
{
double s_out, c_out;
sin_cos_range_redux_cordic(t_in, s_out, c_out);
return s_out;
}
#pragma empty_line
static float
cosf(float t_in)
{
float s_out, c_out;
sin_cos_range_redux_cordic(t_in, s_out, c_out);
return c_out;
}
#pragma empty_line
static double
cos(double t_in)
{
double s_out, c_out;
sin_cos_range_redux_cordic(t_in, s_out, c_out);
return c_out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
void
atan_range_redux_cordic(
float t_in,
float &t_out)
{
const int p1 = 18;
const int CW = 40;
#pragma empty_line
ap_uint<3> k;
ap_uint<2*24+p1> dout;
#pragma empty_line
fp_struct<float> fps1(t_in);
int exp = fp_struct<float>::EXP_BIAS - fps1.exp;
const int SB = fp_struct<float>::SIG_BITS;
ap_uint<SB+1> X = ((ap_uint<SB+1>)0x1 << SB) | (fps1.sig);
dout = 0;
dout((2*24)+p1-1,(2*24)+p1-(SB+1)) = X;
dout = dout >> (exp-1);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<CW> dtmp;
ap_fixed<CW+1,3> dina1, x, y, z;
dtmp = dout((2*24)+p1-1,(2*24)+p1-CW);
dina1.range() = (dtmp >> 2);
#pragma line 759 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
x = 1;
y = dina1;
z = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
cordic_circ_v1<CW,1,0,0>(x,y,z);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
t_out = convToFloat<CW,3>(z);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
void sincosf(
float t_in,
float *s,
float *c)
{
float s_out, c_out;
sin_cos_range_redux_cordic(t_in, s_out, c_out);
*s = s_out;
*c = c_out;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
float
atan_cordic_floatdouble(
float t_in)
{
const int N = 23;
float x = 1.0;
float y = t_in;
float z = 0.0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
cordic_circ_floatdouble_v1<N,1>(x,y,z);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return z;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
float
atan_cordic(
float t_in)
{
fp_struct<float> tmpin(t_in);
ap_uint<1> neg = tmpin.sign;
tmpin.sign = 0;
float pos = tmpin.to_ieee();
#pragma empty_line
float one_over_x = (float)1.0/pos;
float din = (pos > (float)1.0) ? one_over_x : pos;
float res;
atan_range_redux_cordic(din, res);
res = (din < (float)4e-4) ? din : res;
float pi_over_2 = fp_struct<float>(_const<float>::pi_2).to_ieee();
float pi_over_4 = fp_struct<float>(_const<float>::pi_4).to_ieee();
res = (pos > (float)1.0) ? pi_over_2 - res : res;
res = (pos == (float)1.0) ? pi_over_4 : res;
fp_struct<float> tmpout(res);
tmpout.sign = neg;
#pragma empty_line
if(tmpin.exp == 0xFF) {
if(tmpin.sig == 0) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
fp_struct<float> res_tmp(_const<float>::pi_2);
res_tmp.sign = neg;
res = res_tmp.to_ieee();
} else {
#pragma empty_line
#pragma empty_line
#pragma empty_line
res = hls::nan("");
}
} else {
res = tmpout.to_ieee();
}
#pragma empty_line
return res;
}
#pragma empty_line
static float
atanf(float t_in) {
return atan_cordic(t_in);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
float
atan2_range_redux_cordic(float y_in,
float x_in) {
#pragma empty_line
fp_struct<float> fps_x(x_in);
fp_struct<float> fps_y(y_in);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if ( fps_y.exp + 11 < fps_x.exp) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
return xil_fpo_div_flt(y_in,x_in);
}
#pragma empty_line
int d_exp = fps_x.exp - fps_y.exp;
#pragma line 905 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
const int CW = 40;
#pragma empty_line
const int SB = fp_struct<float>::SIG_BITS;
ap_fixed<CW+1, 2> x, y;
ap_fixed<CW+1, 2> z;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
y=0;
y(CW+1-5-1, CW+1-5-SB) = fps_y.sig;
y[CW+1-5] = 1;
x=0;
x(CW+1-5-1, CW+1-5-SB) = fps_x.sig;
x[CW+1-5] = 1;
#pragma empty_line
y >>= d_exp;
#pragma empty_line
#pragma empty_line
#pragma empty_line
z = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
cordic_circ_v1<CW+1,1,0,0>(x,y,z);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return z;
}
#pragma empty_line
static
double
atan2_range_redux_cordic(double y_in,
double x_in) {
#pragma empty_line
fp_struct<double> fps_x(x_in);
fp_struct<double> fps_y(y_in);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
if ( fps_y.exp + 26 < fps_x.exp) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
return xil_fpo_div_d(y_in,x_in);
}
#pragma empty_line
int d_exp = fps_x.exp - fps_y.exp;
#pragma line 972 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
const int CW = 86;
#pragma empty_line
const int SB = fp_struct<double>::SIG_BITS;
ap_fixed<CW+1, 2> x, y;
ap_fixed<CW+1, 2> z;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
y=0;
y(CW+1-5-1, CW+1-5-SB) = fps_y.sig;
y[CW+1-5] = 1;
x=0;
x(CW+1-5-1, CW+1-5-SB) = fps_x.sig;
x[CW+1-5] = 1;
#pragma empty_line
y >>= d_exp;
#pragma empty_line
z = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
cordic_circ_v1<CW,1,0,0>(x,y,z);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return convToDouble<CW,3>(z);
}
#pragma empty_line
#pragma empty_line
template<class T>
static T
atan2_cordic_floatdouble(
T y_in,
T x_in)
{
#pragma HLS ALLOCATION instances=atan2_range_redux_cordic limit=1 function
fp_struct<T> fpsx(x_in);
fp_struct<T> fpsy(y_in);
if (fpsx.data() == fpsy.data())
return fp_struct<T>(_const<T>::pi_4).to_ieee();
else if (y_in > x_in)
return fp_struct<T>(_const<T>::pi_2).to_ieee() - atan2_range_redux_cordic(x_in, y_in);
else
return atan2_range_redux_cordic(y_in, x_in);
}
#pragma empty_line
#pragma empty_line
template<class T>
static T
atan2_cordic(
T y_in,
T x_in)
{
fp_struct<T> fpsx(x_in);
fp_struct<T> fpsy(y_in);
if ( hls::__isnan(y_in) || hls::__isnan(x_in) ) {
return hls::nan("");
}
#pragma empty_line
int m = ( (fpsx.sign.to_int() << 1) | fpsy.sign.to_int() );
#pragma empty_line
if ( fpsy.exp == 0 ) {
switch(m) {
case 0: return fp_struct<T>(_const<T>::zero).to_ieee();
case 1: return -fp_struct<T>(_const<T>::zero).to_ieee();
case 2: return fp_struct<T>(_const<T>::pi).to_ieee();
case 3: return -fp_struct<T>(_const<T>::pi).to_ieee();
}
} else if ( fpsx.exp == 0 ) {
switch(m&1) {
case 0: return fp_struct<T>(_const<T>::pi_2).to_ieee();
case 1: return -fp_struct<T>(_const<T>::pi_2).to_ieee();
}
} else if ( hls::__isinf(x_in) && hls::__isinf(y_in) ) {
switch(m) {
case 0: return fp_struct<T>(_const<T>::pi_4).to_ieee();
case 1: return -fp_struct<T>(_const<T>::pi_4).to_ieee();
case 2: return fp_struct<T>(_const<T>::_3pi_4).to_ieee();
case 3: return -fp_struct<T>(_const<T>::_3pi_4).to_ieee();
}
} else if ( hls::__isinf(x_in) ) {
switch(m) {
case 0: return fp_struct<T>(_const<T>::zero).to_ieee();
case 1: return -fp_struct<T>(_const<T>::zero).to_ieee();
case 2: return fp_struct<T>(_const<T>::pi).to_ieee();
case 3: return -fp_struct<T>(_const<T>::pi).to_ieee();
}
} else if ( hls::__isinf(y_in) ) {
switch(m&1) {
case 0: return fp_struct<T>(_const<T>::pi_2).to_ieee();
case 1: return -fp_struct<T>(_const<T>::pi_2).to_ieee();
}
} else {
switch(m) {
case 0:
return atan2_cordic_floatdouble(y_in, x_in);
case 1:
return -atan2_cordic_floatdouble(-y_in, x_in);
case 2:
return fp_struct<T>(_const<T>::pi).to_ieee() - atan2_cordic_floatdouble(y_in, -x_in);
case 3:
return atan2_cordic_floatdouble(-y_in, -x_in) - fp_struct<T>(_const<T>::pi).to_ieee();
}
}
return 0;
}
#pragma empty_line
#pragma empty_line
static float
atan2f(float y_in, float x_in) {
return atan2_cordic(y_in, x_in);
}
#pragma empty_line
static double
atan2(double y_in, double x_in) {
return atan2_cordic(y_in, x_in);
}
#pragma line 1116 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
template<int H_INT_MAX, int H_DEC_MIN, typename T>
void hyperb_range_redux(
T t_in,
ap_uint<H_INT_MAX+1> &k,
ap_ufixed<fp_struct<T>::SIG_BITS+H_DEC_MIN,0> &t_out)
{
fp_struct<T> fp_in(t_in);
#pragma empty_line
const int W1 = H_INT_MAX+fp_struct<T>::SIG_BITS+H_DEC_MIN;
const int I1 = H_INT_MAX;
#pragma empty_line
#pragma empty_line
ap_ufixed<W1,I1> t_in_f = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
t_in_f(fp_struct<T>::SIG_BITS-1,0) = fp_in.sig;
t_in_f[fp_struct<T>::SIG_BITS] = 1;
#pragma line 1145 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
int left_shift = (fp_in.expv() > H_INT_MAX-1) ? H_DEC_MIN+H_INT_MAX-1 :
((fp_in.expv() < -H_DEC_MIN) ? 0 : (fp_in.expv() + H_DEC_MIN));
t_in_f = t_in_f << left_shift;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_ufixed<W1-I1,1> inv_ln2 = 1.4426950408889634073599246810019;
ap_ufixed<W1-I1,0> ln2 = 0.69314718055994530941723212145818;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_ufixed<2*W1-I1,I1+1> prod;
big_mult<W1,I1,W1-I1,1>(t_in_f, inv_ln2, prod);
#pragma empty_line
k = (fp_in.expv() > H_INT_MAX-1) ? pow(2.0,H_INT_MAX) : (int)prod;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_ufixed<W1-I1,0> prod_dec = prod;
#pragma empty_line
ap_ufixed<2*(W1-I1),0> tmp_t_out;
big_mult<W1-I1,0,W1-I1,0>(prod_dec, ln2, tmp_t_out);
t_out = tmp_t_out;
#pragma line 1189 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
}
#pragma empty_line
#pragma empty_line
static
void
sinh_cosh_range_redux_cordic(
float t_in,
float &s_out,
float &c_out)
{
fp_struct<float> din(t_in);
#pragma empty_line
ap_uint<7+1> k;
ap_ufixed<23+12,0> r_tmp;
hyperb_range_redux<7,12,float>(t_in, k, r_tmp);
#pragma empty_line
const int N = 34;
float x = 1.0/8.28133692173427360395e-01;
float y = 0.0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_fixed<N,2> tmp_x = x;
ap_fixed<N,2> tmp_y = 0;
ap_fixed<N,2> tmp_z = r_tmp;
cordic_hyperb_v1<N,N,0,0,0>(tmp_x,tmp_y,tmp_z);
x = tmp_x; y = tmp_y;
#pragma line 1251 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
float two_p_plus_k, two_p_minus_k;
#pragma empty_line
unsigned int pos_exp = ((int)k > pow(2.0,7)-1) ? 255 : (int)(k-1+127);
unsigned int neg_exp = ((int)k < -126) ? 255 : (int)(-k-1+127);
fp_struct<float> two_p_plus_s((uint32_t)0u);
fp_struct<float> two_p_minus_s((uint32_t)0u);
two_p_plus_s.exp = pos_exp;
two_p_minus_s.exp = neg_exp;
two_p_plus_k = two_p_plus_s.to_ieee();
two_p_minus_k = two_p_minus_s.to_ieee();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
float sinhkln2 = two_p_plus_k - two_p_minus_k;
float coshkln2 = two_p_plus_k + two_p_minus_k;
#pragma empty_line
float s_out_tmp = (k > 0) ? coshkln2*y + sinhkln2*x : y;
float c_out_tmp = (k > 0) ? coshkln2*x + sinhkln2*y : x;
#pragma empty_line
fp_struct<float> s_fp(s_out_tmp);
fp_struct<float> c_fp(c_out_tmp);
s_fp.sign = din.sign;
c_fp.sign = 0;
#pragma empty_line
s_out = s_fp.to_ieee();
c_out = c_fp.to_ieee();
#pragma empty_line
if(din.exp == 0xFF) {
s_out = t_in;
din.sign = 0;
c_out = din.to_ieee();
} else if(din.exp < (127-11)) {
s_out = t_in;
c_out = 1.0f;
}
}
#pragma empty_line
#pragma empty_line
static
float
sinhf(
float t_in)
{
float s_out, c_out;
sinh_cosh_range_redux_cordic(t_in,s_out,c_out);
return s_out;
}
#pragma empty_line
static
float
coshf(
float t_in)
{
float s_out, c_out;
sinh_cosh_range_redux_cordic(t_in,s_out,c_out);
return c_out;
}
#pragma line 1335 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_cordic.h"
}
#pragma line 370 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h" 1
#pragma line 48 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h"
static
unsigned int clrsb(int value)
{
#pragma HLS INLINE SELF
int x;
if(value < 0) {
x = ~value;
} else {
x = value;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
x = x << 1 | 0x1;
((__builtin_clz((unsigned int) x) <= 31) ? (void)0 : _assert("__builtin_clz((unsigned int) x) <= 31", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h", 62));
((__builtin_clz((unsigned int) x) >= 0) ? (void)0 : _assert("__builtin_clz((unsigned int) x) >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h", 63));
return __builtin_clz((unsigned int) x);
}
#pragma line 74 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h"
template <int W, int I, ap_q_mode Q, ap_o_mode O>
unsigned int clrsb(ap_fixed<W,I,Q,O> value) {
ap_uint<W> x = value(W-1,0);
if(value[W-1]) {
x = ~x;
}
x = x << 1 | 0x1;
(((int)x.countLeadingZeros() <= W) ? (void)0 : _assert("(int)x.countLeadingZeros() <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h", 81));
(((int)x.countLeadingZeros() >= 0) ? (void)0 : _assert("(int)x.countLeadingZeros() >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h", 82));
return x.countLeadingZeros();
}
#pragma line 93 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h"
template <int W>
unsigned int clrsb(ap_int<W> value) {
ap_uint<W> x = value(W-1,0);
if(value[W-1]) {
x = ~x;
}
x = x << 1 | 0x1;
(((int)x.countLeadingZeros() <= W) ? (void)0 : _assert("(int)x.countLeadingZeros() <= W", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h", 100));
(((int)x.countLeadingZeros() >= 0) ? (void)0 : _assert("(int)x.countLeadingZeros() >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h", 101));
return x.countLeadingZeros();
}
#pragma line 113 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h"
static
unsigned int find_normalization(int x)
{
return clrsb(x);
}
#pragma line 127 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_normalize.h"
static
unsigned int find_normalization(short x)
{
#pragma empty_line
#pragma empty_line
int bits;
if(x < 0) {
bits = 0;
} else {
bits = 0xFFFF;
}
return clrsb(((int)x) << 16 | bits);
}
#pragma line 371 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_round.h" 1
#pragma line 38 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_round.h"
static
void init_mask_table_double(uint64_t mask_table[64])
{
#pragma empty_line
#pragma empty_line
const uint64_t t = (1LL << fp_struct<double>::SIG_BITS)-1;
for(int i = 0; i < 62; i++) {
mask_table[i] = t >> (i+1);
}
mask_table[62] = t;
mask_table[63] = t;
}
#pragma empty_line
static
void init_mask_table_float(uint32_t mask_table[32])
{
#pragma empty_line
#pragma empty_line
const uint32_t t = (1 << fp_struct<float>::SIG_BITS)-1;
for(int i = 0; i < 30; i++) {
mask_table[i] = t >> (i+1);
}
mask_table[30] = t;
mask_table[31] = t;
}
#pragma empty_line
static
void init_one_half_table_double(uint64_t mask_table[64])
{
#pragma empty_line
#pragma empty_line
const uint64_t t = 1LL << (fp_struct<double>::SIG_BITS-1);
for(int i = 0; i < 62; i++) {
mask_table[i] = t >> (i+1);
}
mask_table[62] = t << 1;
mask_table[63] = t;
}
#pragma empty_line
static
void init_one_half_table_float(uint32_t mask_table[32])
{
#pragma empty_line
#pragma empty_line
const uint32_t t = 1 << (fp_struct<float>::SIG_BITS-1);
for(int i = 0; i < 30; i++) {
mask_table[i] = t >> (i+1);
}
mask_table[30] = t << 1;
mask_table[31] = t;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
static
double floor(double x)
{
uint64_t mask_table[64];
init_mask_table_double(mask_table);
fp_struct<double> xs(x);
if(xs.exp < fp_struct<double>::EXP_BIAS) {
if(xs.__signbit() && !(xs.sig == 0 && xs.exp == 0)) {
return -1.0;
} else {
return ::hls::copysign(0.0, x);
}
} else if((xs.exp > fp_struct<double>::EXP_BIAS+fp_struct<double>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint64_t mask;
#pragma empty_line
ap_uint<6> index = xs.exp(5,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
if(xs.__signbit()) {
xs = ap_uint<64>(xs.data() + mask);
}
#pragma empty_line
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
static
float floorf(float x)
{
uint32_t mask_table[32];
init_mask_table_float(mask_table);
fp_struct<float> xs(x);
if(xs.exp < fp_struct<float>::EXP_BIAS) {
if(xs.__signbit() && !(xs.sig == 0 && xs.exp == 0)) {
return -1.0f;
} else {
return ::hls::copysignf(0.0f, x);
}
} else if((xs.exp > fp_struct<float>::EXP_BIAS+fp_struct<float>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint32_t mask;
#pragma empty_line
ap_uint<5> index = xs.exp(4,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
if(xs.__signbit()) {
xs = ap_uint<32>(xs.data() + mask);
}
#pragma empty_line
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
#pragma empty_line
static
float floor(float x)
{
return floorf(x);
}
#pragma empty_line
#pragma empty_line
static
double ceil(double x)
{
uint64_t mask_table[64];
init_mask_table_double(mask_table);
fp_struct<double> xs(x);
#pragma empty_line
if(xs.exp < fp_struct<double>::EXP_BIAS) {
if(!xs.__signbit() && !(xs.sig == 0 && xs.exp == 0)) {
return 1.0;
} else {
return ::hls::copysign(0.0, x);
}
} else if((xs.exp > fp_struct<double>::EXP_BIAS+fp_struct<double>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint64_t mask;
#pragma empty_line
ap_uint<6> index = xs.exp(5,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
if(!xs.__signbit()) {
xs = ap_uint<64>(xs.data() + mask);
}
#pragma empty_line
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
static
float ceilf(float x)
{
uint32_t mask_table[32];
init_mask_table_float(mask_table);
fp_struct<float> xs(x);
#pragma empty_line
if(xs.exp < fp_struct<float>::EXP_BIAS) {
if(!xs.__signbit() && !(xs.sig == 0 && xs.exp == 0)) {
return 1.0f;
} else {
return ::hls::copysignf(0.0f, x);
}
} else if((xs.exp > fp_struct<float>::EXP_BIAS+fp_struct<float>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint32_t mask;
#pragma empty_line
ap_uint<5> index = xs.exp(4,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
if(!xs.__signbit()) {
xs = ap_uint<32>(xs.data() + mask);
}
#pragma empty_line
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
#pragma empty_line
static
float ceil(float x)
{
return ceilf(x);
}
#pragma empty_line
#pragma empty_line
static
double trunc(double x)
{
uint64_t mask_table[64];
init_mask_table_double(mask_table);
fp_struct<double> xs(x);
#pragma empty_line
if(xs.exp < fp_struct<double>::EXP_BIAS) {
return ::hls::copysign(0.0, x);
} else if((xs.exp > fp_struct<double>::EXP_BIAS+fp_struct<double>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint64_t mask;
#pragma empty_line
ap_uint<6> index = xs.exp(5,0);
mask = mask_table[index];
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
static
float truncf(float x)
{
uint32_t mask_table[32];
init_mask_table_float(mask_table);
fp_struct<float> xs(x);
if(xs.exp < fp_struct<float>::EXP_BIAS) {
return ::hls::copysignf(0.0f, x);
} else if((xs.exp > fp_struct<float>::EXP_BIAS+fp_struct<float>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint32_t mask;
#pragma empty_line
ap_uint<5> index = xs.exp(4,0);
mask = mask_table[index];
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
#pragma empty_line
static
float trunc(float x)
{
return truncf(x);
}
#pragma empty_line
#pragma empty_line
static
double round(double x)
{
uint64_t mask_table[64];
init_mask_table_double(mask_table);
uint64_t one_half_table[64];
init_one_half_table_double(one_half_table);
#pragma empty_line
fp_struct<double> xs(x);
if(xs.exp < fp_struct<double>::EXP_BIAS - 1) {
#pragma empty_line
return ::hls::copysign(0.0, x);
} else if((xs.exp > fp_struct<double>::EXP_BIAS+fp_struct<double>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint64_t mask;
uint64_t one_half;
#pragma empty_line
ap_uint<6> index = xs.exp(5,0);
mask = mask_table[index];
one_half = one_half_table[index];
#pragma empty_line
xs = ap_uint<64>(xs.data() + one_half);
#pragma empty_line
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma line 325 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_round.h"
static
float roundf(float x)
{
uint32_t mask_table[32];
init_mask_table_float(mask_table);
uint32_t one_half_table[32];
init_one_half_table_float(one_half_table);
#pragma empty_line
fp_struct<float> xs(x);
#pragma empty_line
if(xs.exp < fp_struct<float>::EXP_BIAS - 1) {
return ::hls::copysignf(0.0f, x);
} else if((xs.exp > fp_struct<float>::EXP_BIAS+fp_struct<float>::SIG_BITS)) {
#pragma empty_line
return x;
} else {
uint32_t mask;
uint32_t one_half;
#pragma empty_line
ap_uint<5> index = xs.exp(4,0);
mask = mask_table[index];
one_half = one_half_table[index];
#pragma empty_line
xs = ap_uint<32>(xs.data() + one_half);
#pragma empty_line
xs.sig = xs.sig & (~mask);
return xs.to_ieee();
}
}
#pragma empty_line
#pragma empty_line
static
float round(float x)
{
return roundf(x);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <typename T, typename FP>
T cast_IEEE754(FP x, bool detect_overflow = false, typename enable_if<std::numeric_limits<T>::is_signed, bool>::type dummy = true) {
fp_struct<FP> xs(x);
ap_ufixed<2*fp_struct<FP>::SIG_BITS + 8 * sizeof(T),
fp_struct<FP>::SIG_BITS + 8 * sizeof(T)> mantissa = xs.mantissa();
#pragma empty_line
ap_ufixed< fp_struct<FP>::SIG_BITS + 8 * sizeof(T),
fp_struct<FP>::SIG_BITS + 8 * sizeof(T)> smantissa = mantissa << xs.expv();
#pragma empty_line
ap_ufixed<1 ,1 + 8 * sizeof(T), AP_TRN,AP_SAT> overflow_bits = smantissa;
ap_ufixed<8 * sizeof(T), 8 * sizeof(T)> val = smantissa;
#pragma empty_line
bool overflow = xs.expv() > (signed)(2*fp_struct<FP>::SIG_BITS) || overflow_bits != 0;
ap_int<8*sizeof(T)> minval = 0;
minval[8*sizeof(T)-1] = 1;
if(overflow && detect_overflow) return minval;
#pragma empty_line
#pragma empty_line
ap_fixed<8 * sizeof(T),8 * sizeof(T)> result = val;
if(xs.__signbit()) result = -val;
#pragma empty_line
return result;
}
#pragma empty_line
template <typename T, typename FP>
T cast_IEEE754(FP x, bool detect_overflow = false, typename enable_if<!std::numeric_limits<T>::is_signed, bool>::type dummy = true) {
fp_struct<FP> xs(x);
ap_ufixed<2*fp_struct<FP>::SIG_BITS + 8 * sizeof(T),
fp_struct<FP>::SIG_BITS + 8 * sizeof(T)> mantissa = xs.mantissa();
#pragma empty_line
ap_ufixed< fp_struct<FP>::SIG_BITS + 8 * sizeof(T),
fp_struct<FP>::SIG_BITS + 8 * sizeof(T)> smantissa = mantissa << xs.expv();
#pragma empty_line
ap_ufixed<1 ,1 + 8 * sizeof(T), AP_TRN,AP_SAT> overflow_bits = smantissa;
ap_ufixed<8 * sizeof(T), 8 * sizeof(T)> val = smantissa;
#pragma empty_line
bool overflow = xs.expv() > (signed)(2*fp_struct<FP>::SIG_BITS) || overflow_bits != 0;
ap_uint<8*sizeof(T)> minval = 0;
if((overflow || xs.__signbit()) && detect_overflow) return minval;
#pragma empty_line
#pragma empty_line
ap_ufixed<8 * sizeof(T),8 * sizeof(T)> result = val;
#pragma empty_line
return result;
}
#pragma empty_line
#pragma empty_line
static
long int lrint(double x) {
#pragma empty_line
return cast_IEEE754<long int>(x);
}
#pragma empty_line
static
long long int llrint(double x) {
return cast_IEEE754<long long int>(x);
}
#pragma empty_line
static
long int lrintf(float x) {
#pragma empty_line
return cast_IEEE754<long int>(x);
}
#pragma empty_line
static
long long int llrintf(float x) {
return cast_IEEE754<long long int>(x);
}
#pragma empty_line
static
double modf(double x, double *intpart)
{
uint64_t mask_table[64];
init_mask_table_double(mask_table);
fp_struct<double> xs(x);
#pragma empty_line
if(xs.exp < fp_struct<double>::EXP_BIAS) {
*intpart = ::hls::copysign(0.0, x);
return x;
} else if((xs.exp > fp_struct<double>::EXP_BIAS+fp_struct<double>::SIG_BITS)) {
#pragma empty_line
*intpart = x;
if(::hls::__isnan(x)) {
fp_struct<double> nan;
nan.sig = -1;
nan.exp = -1;
nan.sign = 0;
return nan.to_ieee();
} else {
return ::hls::copysign(0.0, x);
}
} else {
uint64_t mask;
#pragma empty_line
ap_uint<6> index = xs.exp(5,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
fp_struct<double> xf;
xf.sig = xs.sig & mask;
#pragma empty_line
int zeros = xf.sig.countLeadingZeros();;
#pragma empty_line
#pragma empty_line
xf.exp = (xf.sig == 0) ? 0 : (unsigned short)(xs.exp-zeros-1);
#pragma empty_line
xf.sig = (xf.sig << 1) << zeros;
xf.sign = xs.sign;
#pragma empty_line
#pragma empty_line
xs.sig = xs.sig & (~mask);
*intpart = xs.to_ieee();
#pragma empty_line
return xf.to_ieee();
}
}
#pragma empty_line
static
float modff(float x, float *intpart)
{
uint32_t mask_table[32];
init_mask_table_float(mask_table);
fp_struct<float> xs(x);
if(xs.exp < fp_struct<float>::EXP_BIAS) {
*intpart = ::hls::copysignf(0.0f, x);
return x;
} else if((xs.exp > fp_struct<float>::EXP_BIAS+fp_struct<float>::SIG_BITS)) {
#pragma empty_line
*intpart = x;
if(::hls::__isnan(x)) {
fp_struct<float> nan;
nan.sig = -1;
nan.exp = -1;
nan.sign = 0;
return nan.to_ieee();
} else {
return ::hls::copysignf(0.0f, x);
}
} else {
uint32_t mask;
#pragma empty_line
ap_uint<5> index = xs.exp(4,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
fp_struct<float> xf;
xf.sig = xs.sig & mask;
#pragma empty_line
int zeros = xf.sig.countLeadingZeros();;
#pragma empty_line
#pragma empty_line
xf.exp = (xf.sig == 0) ? 0 : (unsigned short)(xs.exp-zeros-1);
#pragma empty_line
xf.sig = (xf.sig << 1) << zeros;
xf.sign = xs.sign;
#pragma empty_line
#pragma empty_line
xs.sig = xs.sig & (~mask);
*intpart = xs.to_ieee();
#pragma empty_line
return xf.to_ieee();
}
}
#pragma empty_line
static
double fract(double x, double *intpart)
{
uint64_t mask_table[64];
init_mask_table_double(mask_table);
fp_struct<double> xs(x);
#pragma empty_line
if(xs.exp < fp_struct<double>::EXP_BIAS) {
*intpart = ::hls::copysign(0.0, x);
return x;
} else if((xs.exp > fp_struct<double>::EXP_BIAS+fp_struct<double>::SIG_BITS)) {
#pragma empty_line
*intpart = x;
if(::hls::__isnan(x)) {
fp_struct<double> nan;
nan.sig = -1;
nan.exp = -1;
nan.sign = 0;
return nan.to_ieee();
} else {
return ::hls::copysign(0.0, x);
}
} else {
uint64_t mask;
#pragma empty_line
ap_uint<6> index = xs.exp(5,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
fp_struct<double> xf;
xf.sig = xs.sig & mask;
#pragma empty_line
int zeros = xf.sig.countLeadingZeros();;
#pragma empty_line
#pragma empty_line
xf.exp = (xf.sig == 0) ? 0 : (unsigned short)(xs.exp-zeros-1);
#pragma empty_line
xf.sig = (xf.sig << 1) << zeros;
xf.sign = xs.sign;
#pragma empty_line
#pragma empty_line
xs.sig = xs.sig & (~mask);
*intpart = xs.to_ieee();
#pragma empty_line
return xf.to_ieee();
}
}
#pragma empty_line
static
float fractf(float x, float *intpart)
{
uint32_t mask_table[32];
init_mask_table_float(mask_table);
fp_struct<float> xs(x);
if(xs.exp < fp_struct<float>::EXP_BIAS) {
if(xs.__signbit() && !(xs.sig == 0 && xs.exp == 0)) {
*intpart = -1.0f;
float f = 1.0f + x;
fp_struct<float> xf(f);
bool is_one = xf.exp == fp_struct<float>::EXP_BIAS &&
xf.sig == 0;
#pragma line 611 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_round.h"
if(is_one) {
return 0x1.fffffep-1f;
} else {
return xf.to_ieee();
}
} else {
#pragma empty_line
*intpart = ::hls::copysignf(0.0f, x);
return x;
}
} else if(xs.exp == 255) {
*intpart = x;
return 0x1.fffffep-1f;
} else if((xs.exp > fp_struct<float>::EXP_BIAS+fp_struct<float>::SIG_BITS)) {
#pragma empty_line
*intpart = x;
return ::hls::copysignf(0.0f, x);
} else {
uint32_t mask;
#pragma empty_line
ap_uint<5> index = xs.exp(4,0);
mask = mask_table[index];
#pragma empty_line
#pragma empty_line
fp_struct<float> xf;
if(xs.__signbit())
xf.sig = -xs.sig;
else
xf.sig = xs.sig;
xf.sig = xf.sig & mask;
#pragma empty_line
int zeros = xf.sig.countLeadingZeros();
#pragma empty_line
#pragma empty_line
xf.exp = (xf.sig == 0) ? 0 : (unsigned short)(xs.exp-zeros-1);
#pragma empty_line
xf.sig = (xf.sig << 1) << zeros;
xf.sign = 0;
#pragma empty_line
#pragma empty_line
if(xs.__signbit()) {
xs = ap_uint<32>(xs.data() + mask);
}
#pragma empty_line
xs.sig = xs.sig & (~mask);
*intpart = xs.to_ieee();
return xf.to_ieee();
}
}
#pragma empty_line
#pragma empty_line
static
float modf(float x, float *intpart)
{
return modff(x, intpart);
}
#pragma line 372 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 380 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static
double fmax(double x, double y)
{
fp_struct<double> x_fp(x);
fp_struct<double> y_fp(y);
double res;
if(x_fp.exp == 0 && x_fp.sig == 0 && y_fp.exp == 0 && y_fp.sig == 0) {
res = y;
} else if(x_fp.exp == 0x7FF && x_fp.sig != 0) {
if(y_fp.exp == 0x7FF && y_fp.sig != 0) {
x_fp.sig = 0x8000000000000ULL | x_fp.sig;
res = x_fp.to_ieee();
} else {
res = y;
}
} else if(y_fp.exp == 0x7FF && y_fp.sig != 0) {
res = x;
} else {
#pragma empty_line
res = (x_fp.sign==1 && y_fp.sign==1) ? ((x_fp.to_int() > y_fp.to_int()) ? y : x)
: ((x_fp.to_int() > y_fp.to_int()) ? x : y);
}
return res;
}
#pragma empty_line
static
float fmaxf(float x, float y)
{
fp_struct<float> x_fp(x);
fp_struct<float> y_fp(y);
float res;
if(x_fp.exp == 0 && x_fp.sig == 0 && y_fp.exp == 0 && y_fp.sig == 0) {
res = y;
} else if(x_fp.exp == 0xFF && x_fp.sig != 0) {
if(y_fp.exp == 0xFF && y_fp.sig != 0) {
x_fp.sig = 0x400000 | x_fp.sig;
res = x_fp.to_ieee();
} else {
res = y;
}
} else if(y_fp.exp == 0xFF && y_fp.sig != 0) {
res = x;
} else {
#pragma empty_line
res = (x_fp.sign==1 && y_fp.sign==1) ? ((x_fp.to_int() > y_fp.to_int()) ? y : x)
: ((x_fp.to_int() > y_fp.to_int()) ? x : y);
}
return res;
}
#pragma empty_line
#pragma empty_line
static
float fmax(float x, float y)
{
return fmaxf(x,y);
}
#pragma line 445 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static
double fmin(double x, double y)
{
fp_struct<double> x_fp(x);
fp_struct<double> y_fp(y);
double res;
if(x_fp.exp == 0 && x_fp.sig == 0 && y_fp.exp == 0 && y_fp.sig == 0) {
res = y;
} else if(x_fp.exp == 0x7FF && x_fp.sig != 0) {
if(y_fp.exp == 0x7FF && y_fp.sig != 0) {
x_fp.sig = 0x8000000000000ULL | x_fp.sig;
res = x_fp.to_ieee();
} else {
res = y;
}
} else if(y_fp.exp == 0x7FF && y_fp.sig != 0) {
res = x;
} else {
#pragma empty_line
res = (x_fp.sign==1 && y_fp.sign==1) ? ((x_fp.to_int() < y_fp.to_int()) ? y : x)
: ((x_fp.to_int() < y_fp.to_int()) ? x : y);
}
return res;
}
#pragma empty_line
#pragma empty_line
static
float fminf(float x, float y)
{
fp_struct<float> x_fp(x);
fp_struct<float> y_fp(y);
float res;
if(x_fp.exp == 0 && x_fp.sig == 0 && y_fp.exp == 0 && y_fp.sig == 0) {
res = y;
} else if(x_fp.exp == 0xFF && x_fp.sig != 0) {
if(y_fp.exp == 0xFF && y_fp.sig != 0) {
x_fp.sig = 0x400000 | x_fp.sig;
res = x_fp.to_ieee();
} else {
res = y;
}
} else if(y_fp.exp == 0xFF && y_fp.sig != 0) {
res = x;
} else {
#pragma empty_line
res = (x_fp.sign==1 && y_fp.sign==1) ? ((x_fp.to_int() < y_fp.to_int()) ? y : x)
: ((x_fp.to_int() < y_fp.to_int()) ? x : y);
}
return res;
}
#pragma empty_line
#pragma empty_line
static
float fmin(float x, float y)
{
return fminf(x,y);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
namespace log_reduce {
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_tables.h" 1
#pragma line 32 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_tables.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_fixed.h" 1
#pragma line 33 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_tables.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_reference_tables.h" 1
#pragma line 32 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_reference_tables.h"
template< class out, class in>
out reference_log(in x)
{
double x_MS = x;
in x_MS2 = x_MS;
in x_diff = (x-(in)x_MS);
long double x_ld = (long double)x_MS + (long double)(double)x_diff;
long double ll = logl(x_ld);
#pragma line 49 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_reference_tables.h"
double ll_MS = ll;
out y = ll_MS;
double ll_LS = ll - (double)y;
y += (out)ll_LS;
#pragma empty_line
#pragma empty_line
return y;
}
#pragma empty_line
template<int p, int alpha, class T>
class log_lut_initializer
{
public:
typedef T TableType;
static T f(int i, int n) {
ap_uint<alpha> t = i;
ap_ufixed<alpha, -p> a = 0;
a(alpha-1,0) = t(alpha-1,0);
#pragma empty_line
int e_shift = a[a.wl()-1] ? 2*p : 2*p+1;
ap_fixed<1+2*p+alpha, 2> one = 1;
ap_fixed<1+2*p+alpha, 2> y_tilde_inverse = one - a + (one >> e_shift);
#pragma empty_line
return -reference_log<T>(y_tilde_inverse);
}
static T apply(int i, int n) {
ap_uint<alpha> t = i;
ap_ufixed<alpha, -p> a = 0;
a(alpha-1,0) = t(alpha-1,0);
#pragma empty_line
int e_shift = a[a.wl()-1] ? 2*p : 2*p+1;
ap_fixed<1+2*p+alpha, 2> one = 1;
ap_fixed<1+2*p+alpha, 2> y_tilde_inverse = one - a + (one >> e_shift);
T tmp;
#pragma empty_line
#pragma empty_line
#pragma empty_line
tmp = f(i,n)-f(0,n);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return tmp;
}
};
#pragma empty_line
template<int p0, int alpha0, class T>
class log0_inverse_lut_initializer
{
public:
typedef T TableType;
static T apply(int i, int n) {
ap_uint<1+alpha0> t = i;
ap_ufixed<1+alpha0,1> a;
a(1+alpha0-1,0) = t(1+alpha0-1,0);
#pragma empty_line
double d = ::ceil((1 << alpha0)/a.to_double())/(1 << alpha0);
T tmp = d;
return tmp;
}
};
#pragma empty_line
template<class LOG_TYPE, class T>
class log0_table_traits {};
#pragma empty_line
template<class LOG_TYPE>
class log0_table_traits<LOG_TYPE, float>
{
public:
#pragma empty_line
const static int p0 = 0;
const static int alpha0 = 5;
const static int p1 = (alpha0 == 5) ? 4 : (alpha0-2);
const static int alpha1 = 4;
const static int p2 = p1 + alpha1 - 1;
const static int alpha2 = 6;
const static int p3 = p2 + alpha2 - 1;
const static int alpha3 = 6;
const static int p4 = p3 + alpha3 - 1;
const static int alpha4 = 6;
const static int p5 = p4 + alpha4 - 1;
const static int alpha5 = 6;
static LOG_TYPE log0_offset() {
return log_lut_initializer<log0_table_traits<LOG_TYPE, float>::p1, log0_table_traits<LOG_TYPE, float>::alpha1, LOG_TYPE>::f(0,0) +
log_lut_initializer<log0_table_traits<LOG_TYPE, float>::p2, log0_table_traits<LOG_TYPE, float>::alpha2, LOG_TYPE>::f(0,0);
}
};
#pragma empty_line
template<class LOG_TYPE>
class log0_table_traits<LOG_TYPE, double>
{
public:
#pragma empty_line
const static int p0 = 0;
const static int alpha0 = 5;
const static int p1 = (alpha0 == 5) ? 4 : (alpha0-2);
const static int alpha1 = 4;
const static int p2 = p1 + alpha1 - 1;
const static int alpha2 = 6;
const static int p3 = p2 + alpha2 - 1;
const static int alpha3 = 6;
const static int p4 = p3 + alpha3 - 1;
const static int alpha4 = 6;
const static int p5 = p4 + alpha4 - 1;
const static int alpha5 = 6;
static LOG_TYPE log0_offset() {
return log_lut_initializer<log0_table_traits<LOG_TYPE, double>::p1, log0_table_traits<LOG_TYPE, double>::alpha1, LOG_TYPE>::f(0,0) +
log_lut_initializer<log0_table_traits<LOG_TYPE, double>::p2, log0_table_traits<LOG_TYPE, double>::alpha2, LOG_TYPE>::f(0,0) +
log_lut_initializer<log0_table_traits<LOG_TYPE, double>::p3, log0_table_traits<LOG_TYPE, double>::alpha3, LOG_TYPE>::f(0,0) +
log_lut_initializer<log0_table_traits<LOG_TYPE, double>::p4, log0_table_traits<LOG_TYPE, double>::alpha4, LOG_TYPE>::f(0,0) +
log_lut_initializer<log0_table_traits<LOG_TYPE, double>::p5, log0_table_traits<LOG_TYPE, double>::alpha5, LOG_TYPE>::f(0,0);
};
};
#pragma empty_line
template<int p0, int alpha0, class LOG_TYPE, class T>
class log0_lut_initializer
{
public:
typedef LOG_TYPE TableType;
static LOG_TYPE apply(int i, int n) {
ap_ufixed<1+alpha0,1> y_tilde_inverse = log0_inverse_lut_initializer<p0, alpha0, ap_ufixed<1+alpha0,1> > ::apply(i,n);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
LOG_TYPE tmp = -reference_log<LOG_TYPE>(y_tilde_inverse) + log0_table_traits<LOG_TYPE, T>::log0_offset();
#pragma line 187 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_reference_tables.h"
return tmp;
}
};
#pragma line 34 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log_tables.h" 2
namespace {
template <typename T, int p, int alpha, int size> class log_lut_table {
#pragma empty_line
#pragma empty_line
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <typename T, typename T2, int p, int alpha, int size> class log0_lut_table {
#pragma empty_line
#pragma empty_line
#pragma empty_line
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <> class log0_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,float,0,5,64> { public:
log0_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,float,0,5,64>();
static const ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0> log0_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,float,0,5,64>::array [64] = {
"-0x0.0081e008a6p0",
"-0x0.0081e008a6p0",
"-0x0.0081e008a6p0",
"0x0.5f6a08e6bcp0",
"-0x0.0081e008a6p0",
"0x0.e618126842p0",
"-0x0.4c256af42ap0",
"0x0.84f1d70ddep0",
"-0x0.0081e008a6p0",
"-0x0.72c1bf2710p0",
"-0x0.332695428ep0",
"0x0.1003b8acfap0",
"0x0.5f6a08e6bcp0",
"0x0.c175d0a4ccp0",
"0x1.29426057cap0",
"0x1.dab4784f9cp0",
"-0x0.0081e008a6p0",
"-0x0.a5a9a2f626p0",
"-0x0.944cd09cf2p0",
"-0x0.86757729cep0",
"-0x0.7ccc1d8762p0",
"-0x0.6d95bdf7d8p0",
"-0x0.62eaae23aap0",
"-0x0.57c8d70606p0",
"-0x0.4c256af42ap0",
"-0x0.3ff410e362p0",
"-0x0.39a1cf97dap0",
"-0x0.2c8040e9f4p0",
"-0x0.25ac85f8e4p0",
"-0x0.1ea8e776d0p0",
"-0x0.1772b2938ap0",
"-0x0.1006f868aep0",
"-0x0.0081e008a6p0",
"-0x0.0081e008a6p0",
"0x0.079ecebc4ep0",
"0x0.1003b8acfap0",
"0x0.18b17e54b4p0",
"0x0.21ad3cfbaap0",
"0x0.2afca0ce04p0",
"0x0.2afca0ce04p0",
"0x0.34a5fa7070p0",
"0x0.3eb058d0c2p0",
"0x0.3eb058d0c2p0",
"0x0.4923a83c2ep0",
"0x0.4923a83c2ep0",
"0x0.5408d8143ep0",
"0x0.5408d8143ep0",
"0x0.5f6a08e6bcp0",
"0x0.5f6a08e6bcp0",
"0x0.6b52c5407ep0",
"0x0.6b52c5407ep0",
"0x0.6b52c5407ep0",
"0x0.77d0485ff8p0",
"0x0.77d0485ff8p0",
"0x0.84f1d70ddep0",
"0x0.84f1d70ddep0",
"0x0.84f1d70ddep0",
"0x0.92c9308102p0",
"0x0.92c9308102p0",
"0x0.92c9308102p0",
"0x0.92c9308102p0",
"0x0.a16b1f8f24p0",
"0x0.a16b1f8f24p0",
"0x0.a16b1f8f24p0",
};
template <> class log_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,4,4,16> { public:
log_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,4,4,16>();
static const ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,4,4,16>::array [16] = {
"0x0",
"0x0.0100001556p0",
"0x0.0201012becp0",
"0x0.03030549d4p0",
"0x0.04060e7b40p0",
"0x0.050a1ed2a2p0",
"0x0.060f3868c2p0",
"0x0.07155d5cd8p0",
"0x0.0798d4c5acp0",
"0x0.08a08ecf9ap0",
"0x0.09a959a26ep0",
"0x0.0ab33774bep0",
"0x0.0bbe2a8412p0",
"0x0.0cca3514f6p0",
"0x0.0dd7597324p0",
"0x0.0ee599f196p0",
};
template <> class log_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,7,6,64> { public:
log_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,7,6,64>();
static const ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<48, 9, (ap_q_mode)5, (ap_o_mode)3, 0>,7,6,64>::array [64] = {
"0x0",
"0x0.0008001002p0",
"0x0.0010006004p0",
"0x0.001800f00ep0",
"0x0.002001c024p0",
"0x0.002802d048p0",
"0x0.0030042080p0",
"0x0.003805b0cep0",
"0x0.0040078138p0",
"0x0.00480991c0p0",
"0x0.00500be26cp0",
"0x0.00580e733ep0",
"0x0.006011443cp0",
"0x0.0068145568p0",
"0x0.007017a6c8p0",
"0x0.00781b3860p0",
"0x0.00801f0a32p0",
"0x0.0088231c42p0",
"0x0.0090276e98p0",
"0x0.00982c0134p0",
"0x0.00a030d41ap0",
"0x0.00a835e750p0",
"0x0.00b03b3adap0",
"0x0.00b840cebcp0",
"0x0.00c046a2f8p0",
"0x0.00c84cb794p0",
"0x0.00d0530c92p0",
"0x0.00d859a1fap0",
"0x0.00e06077ccp0",
"0x0.00e8678e0ep0",
"0x0.00f06ee4c2p0",
"0x0.00f8767bf0p0",
"0x0.00fe7c57a2p0",
"0x0.0106845faap0",
"0x0.010e8ca836p0",
"0x0.0116953148p0",
"0x0.011e9dfae4p0",
"0x0.0126a70510p0",
"0x0.012eb04fcep0",
"0x0.0136b9db24p0",
"0x0.013ec3a714p0",
"0x0.0146cdb3a4p0",
"0x0.014ed800d8p0",
"0x0.0156e28eb2p0",
"0x0.015eed5d38p0",
"0x0.0166f86c6cp0",
"0x0.016f03bc56p0",
"0x0.01770f4cf6p0",
"0x0.017f1b1e52p0",
"0x0.018727306cp0",
"0x0.018f33834cp0",
"0x0.01974016f2p0",
"0x0.019f4ceb66p0",
"0x0.01a75a00a8p0",
"0x0.01af6756bep0",
"0x0.01b774edaep0",
"0x0.01bf82c578p0",
"0x0.01c790de24p0",
"0x0.01cf9f37b4p0",
"0x0.01d7add22cp0",
"0x0.01dfbcad90p0",
"0x0.01e7cbc9e6p0",
"0x0.01efdb2730p0",
"0x0.01f7eac572p0",
};
template <> class log0_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,double,0,5,64> { public:
log0_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,double,0,5,64>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log0_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,double,0,5,64>::array [64] = {
"-0x0.0081e088c6b6ce408b3c9p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"0x0.5f6a0866999da176f4c37p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"0x0.e61811e820cc724974c37p0",
"-0x0.4c256b744b2b90b18b3c9p0",
"0x0.84f1d68dbbf103da74c37p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"-0x0.72c1bfa7311f54f10b3c9p0",
"-0x0.332695c2af64372d0b3c9p0",
"0x0.1003b82cd783384814c37p0",
"0x0.5f6a0866999da176f4c37p0",
"0x0.c175d024a952b1f374c37p0",
"0x1.29425fd7a7b3e1bf74c37p0",
"0x1.dab477cf79835b6b74c37p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"-0x0.a5a9a37648aca6518b3c9p0",
"-0x0.944cd11d143fa59c8b3c9p0",
"-0x0.867577a9f00ae3f58b3c9p0",
"-0x0.7ccc1e0782d2810e0b3c9p0",
"-0x0.6d95be77f8f458738b3c9p0",
"-0x0.62eaaea3cbc039170b3c9p0",
"-0x0.57c8d78626ddf7830b3c9p0",
"-0x0.4c256b744b2b90b18b3c9p0",
"-0x0.3ff411638333235b4b3c9p0",
"-0x0.39a1d017fbeb1198cb3c9p0",
"-0x0.2c80416a15de75d18b3c9p0",
"-0x0.25ac867906a114d88b3c9p0",
"-0x0.1ea8e7f6f1a9b42a6b3c9p0",
"-0x0.1772b313ac2219dc6b3c9p0",
"-0x0.1006f8e8cf6821714b3c9p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"-0x0.0081e088c6b6ce408b3c9p0",
"0x0.079ece3c2ceb53f784c37p0",
"0x0.1003b82cd783384814c37p0",
"0x0.18b17dd49292ba6d94c37p0",
"0x0.21ad3c7b8912297bf4c37p0",
"0x0.2afca04de1c495b674c37p0",
"0x0.2afca04de1c495b674c37p0",
"0x0.34a5f9f04efcf89df4c37p0",
"0x0.3eb05850a0b024bab4c37p0",
"0x0.3eb05850a0b024bab4c37p0",
"0x0.4923a7bc0cb77ba074c37p0",
"0x0.4923a7bc0cb77ba074c37p0",
"0x0.5408d7941bd890f7f4c37p0",
"0x0.5408d7941bd890f7f4c37p0",
"0x0.5f6a0866999da176f4c37p0",
"0x0.5f6a0866999da176f4c37p0",
"0x0.6b52c4c05c80735cf4c37p0",
"0x0.6b52c4c05c80735cf4c37p0",
"0x0.6b52c4c05c80735cf4c37p0",
"0x0.77d047dfd5e46812f4c37p0",
"0x0.77d047dfd5e46812f4c37p0",
"0x0.84f1d68dbbf103da74c37p0",
"0x0.84f1d68dbbf103da74c37p0",
"0x0.84f1d68dbbf103da74c37p0",
"0x0.92c93000e025c58174c37p0",
"0x0.92c93000e025c58174c37p0",
"0x0.92c93000e025c58174c37p0",
"0x0.92c93000e025c58174c37p0",
"0x0.a16b1f0f0267583a74c37p0",
"0x0.a16b1f0f0267583a74c37p0",
"0x0.a16b1f0f0267583a74c37p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,4,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,4,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,4,4,16>::array [16] = {
"0x0",
"0x0.01000015555888891a800p0",
"0x0.0201012bec32f8dac2800p0",
"0x0.03030549d3b2a18bb6800p0",
"0x0.04060e7b3f982465e6800p0",
"0x0.050a1ed2a137cd8b7a800p0",
"0x0.060f3868c0ef391852800p0",
"0x0.07155d5cd81d536192800p0",
"0x0.0798d4c5abd6fffd02800p0",
"0x0.08a08ecf9a4e65d1f2800p0",
"0x0.09a959a26d3862e752800p0",
"0x0.0ab33774bd9e386022800p0",
"0x0.0bbe2a841109efba62800p0",
"0x0.0cca3514f685e53472800p0",
"0x0.0dd759732434c1a702800p0",
"0x0.0ee599f19585a95d52800p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,7,6,64> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,7,6,64>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,7,6,64>::array [64] = {
"0x0",
"0x0.00080010004aabeab0c20p0",
"0x0.0010006003957ad6f9a20p0",
"0x0.001800f00de0e4cfbb720p0",
"0x0.002001c0232dc1f4da520p0",
"0x0.002802d0477d4a8741b20p0",
"0x0.003004207ed116f4eab20p0",
"0x0.003805b0cd2b1fe4e3f20p0",
"0x0.00400781368dbe435af20p0",
"0x0.00480991befbab4da8b20p0",
"0x0.00500be26a78009e5f320p0",
"0x0.00580e733d06383958320p0",
"0x0.006011443aaa2c97c6b20p0",
"0x0.00681455676818b44c320p0",
"0x0.007017a6c74498170b320p0",
"0x0.00781b385e44a6e1beb20p0",
"0x0.00801f0a306da1dbd5320p0",
"0x0.0088231c41c5467e89b20p0",
"0x0.0090276e9651b30101b20p0",
"0x0.00982c013219666468b20p0",
"0x0.00a030d41923408016b20p0",
"0x0.00a835e74f76820dabb20p0",
"0x0.00b03b3ad91accb539b20p0",
"0x0.00b840ceba18231968b20p0",
"0x0.00c046a2f676e8e39db20p0",
"0x0.00c84cb7923fe2d026b20p0",
"0x0.00d0530c917c36ba64b20p0",
"0x0.00d859a1f8356ba8fdb20p0",
"0x0.00e06077ca7569da05b20p0",
"0x0.00e8678e0c467acf37b20p0",
"0x0.00f06ee4c1b3495a24b20p0",
"0x0.00f8767beec6e1a867b20p0",
"0x0.00fe7c57a189e48d92b20p0",
"0x0.0106845fa9bd1841f4b20p0",
"0x0.010e8ca834b76d9d82b20p0",
"0x0.0116953146855e53e8b20p0",
"0x0.011e9dfae333c5aef6b20p0",
"0x0.0126a7050ecfe09ae0b20p0",
"0x0.012eb04fcd674db284b20p0",
"0x0.0136b9db23080d4bacb20p0",
"0x0.013ec3a713c0818352b20p0",
"0x0.0146cdb3a39f6e49f0b20p0",
"0x0.014ed800d6b3f96fc4b20p0",
"0x0.0156e28eb10daab11ab20p0",
"0x0.015eed5d36bc6bc2a2b20p0",
"0x0.0166f86c6bd0885db6b20p0",
"0x0.016f03bc545aae4cb8b20p0",
"0x0.01770f4cf46bed775cb20p0",
"0x0.017f1b1e5015b7eefeb20p0",
"0x0.018727306b69e1fb00b20p0",
"0x0.018f33834a7aa22522b20p0",
"0x0.01974016f15a9145d6b20p0",
"0x0.019f4ceb641caa90aab20p0",
"0x0.01a75a00a6d44ba09eb20p0",
"0x0.01af6756bd95348486b20p0",
"0x0.01b774edac7387cb76b20p0",
"0x0.01bf82c57783ca911ab20p0",
"0x0.01c790de22dae48a2ab20p0",
"0x0.01cf9f37b28e2010cab20p0",
"0x0.01d7add22ab32a30feb20p0",
"0x0.01dfbcad8f6012b50ab20p0",
"0x0.01e7cbc9e4ab4c31f0b20p0",
"0x0.01efdb272eabac13d6b20p0",
"0x0.01f7eac571786aaa82b20p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,12,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,12,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,12,4,16>::array [16] = {
"0x0",
"0x0.000100007f8054d5d4d5ap0",
"0x0.00020001ff02a8af26b2ap0",
"0x0.000300047e88fb94f2b2ap0",
"0x0.00040007fe154d963626ap0",
"0x0.0005000c7da99ec7eea2ap0",
"0x0.00060011fd47ef451a1aap0",
"0x0.000700187cf23f2eb702ap0",
"0x0.0007ff9ff8aaceb0c44aap0",
"0x0.0008ffa877f3156e953aap0",
"0x0.0009ffb1f74d5b1fbb9aap0",
"0x0.000affbc76bb9ffd35baap0",
"0x0.000bffc7f63fe44602aaap0",
"0x0.000cffd475dc283f22baap0",
"0x0.000dffe1f5926c33972aap0",
"0x0.000efff07564b074629aap0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,15,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,15,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,15,4,16>::array [16] = {
"0x0",
"0x0.0000200001ffc02aa2af2p0",
"0x0.0000400007ff815535964p0",
"0x0.0000600011ff447fb9458p0",
"0x0.000080001fff0aaa2eac8p0",
"0x0.0000a00031fed4d4971b0p0",
"0x0.0000c00047fea3fef4420p0",
"0x0.0000e00061fe792948310p0",
"0x0.0000fffe7ffc555795610p0",
"0x0.00011ffea1fbf98156900p0",
"0x0.00013ffec7fba6ab06f80p0",
"0x0.00015ffef1fb5dd4aa260p0",
"0x0.00017fff1ffb1ffe440c0p0",
"0x0.00019fff51faee27d8fa0p0",
"0x0.0001bfff87fac9516da00p0",
"0x0.0001dfffc1fab27b070c0p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,18,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,18,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,18,4,16>::array [16] = {
"0x0",
"0x0.000004000007ffe01554ep0",
"0x0.00000800001fffc0aaa8bp0",
"0x0.00000c000047ffa23ffb9p0",
"0x0.00001000007fff85554dap0",
"0x0.0000140000c7ff6a6a9ecp0",
"0x0.00001800011fff51ffef4p0",
"0x0.00001c000187ff3c953f4p0",
"0x0.00001ffff9fffe2aaaceap0",
"0x0.000023fffa87fdfcc0158p0",
"0x0.000027fffb1ffdd3555b0p0",
"0x0.00002bfffbc7fdaeeaa00p0",
"0x0.00002ffffc7ffd8fffe44p0",
"0x0.000033fffd47fd7715284p0",
"0x0.000037fffe1ffd64aa6c4p0",
"0x0.00003bffff07fd593fb08p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,21,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,21,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,21,4,16>::array [16] = {
"0x0",
"0x0.0000008000001ffff00aap0",
"0x0.0000010000007fffe0555p0",
"0x0.0000018000011fffd1200p0",
"0x0.000002000001ffffc2aaap0",
"0x0.0000028000031fffb5355p0",
"0x0.0000030000047fffa8fffp0",
"0x0.0000038000061fff9e4aap0",
"0x0.000003ffffe7ffff15555p0",
"0x0.0000047fffea1ffefe5ffp0",
"0x0.000004ffffec7ffee9aaap0",
"0x0.0000057fffef1ffed7755p0",
"0x0.000005fffff1fffec7fffp0",
"0x0.0000067ffff51ffebb8aap0",
"0x0.000006fffff87ffeb2555p0",
"0x0.0000077ffffc1ffeac9ffp0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,24,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,24,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,24,4,16>::array [16] = {
"0x0",
"0x0.000000100000007ffff80p0",
"0x0.00000020000001fffff02p0",
"0x0.000000300000047fffe88p0",
"0x0.00000040000007ffffe15p0",
"0x0.0000005000000c7fffda9p0",
"0x0.00000060000011ffffd47p0",
"0x0.000000700000187fffcf2p0",
"0x0.0000007fffff9fffff8aap0",
"0x0.0000008fffffa87fff7f2p0",
"0x0.0000009fffffb1ffff74dp0",
"0x0.000000afffffbc7fff6bbp0",
"0x0.000000bfffffc7ffff63fp0",
"0x0.000000cfffffd47fff5dcp0",
"0x0.000000dfffffe1ffff592p0",
"0x0.000000effffff07fff564p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,27,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,27,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,27,4,16>::array [16] = {
"0x0",
"0x0.0000000200000001fffffp0",
"0x0.0000000400000007fffffp0",
"0x0.0000000600000011fffffp0",
"0x0.000000080000001ffffffp0",
"0x0.0000000a00000031ffffep0",
"0x0.0000000c00000047ffffep0",
"0x0.0000000e00000061ffffep0",
"0x0.0000000ffffffe7fffffcp0",
"0x0.00000011fffffea1ffffbp0",
"0x0.00000013fffffec7ffffbp0",
"0x0.00000015fffffef1ffffbp0",
"0x0.00000017ffffff1fffffbp0",
"0x0.00000019ffffff51ffffap0",
"0x0.0000001bffffff87ffffap0",
"0x0.0000001dffffffc1ffffap0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,30,4,16> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,30,4,16>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [16];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,30,4,16>::array [16] = {
"0x0",
"0x0.000000004000000007fffp0",
"0x0.00000000800000001ffffp0",
"0x0.00000000c000000047fffp0",
"0x0.00000001000000007ffffp0",
"0x0.0000000140000000c7fffp0",
"0x0.00000001800000011ffffp0",
"0x0.00000001c000000187fffp0",
"0x0.00000001fffffff9fffffp0",
"0x0.000000023ffffffa87fffp0",
"0x0.000000027ffffffb1ffffp0",
"0x0.00000002bffffffbc7fffp0",
"0x0.00000002fffffffc7ffffp0",
"0x0.000000033ffffffd47fffp0",
"0x0.000000037ffffffe1ffffp0",
"0x0.00000003bfffffff07fffp0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,12,6,64> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,12,6,64>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,12,6,64>::array [64] = {
"0x0",
"0x0.0000400007e0014d65936p0",
"0x0.000080001fc00a8ace9aap0",
"0x0.0000c00047a023b8440aap0",
"0x0.000100007f8054d5d4d5ap0",
"0x0.00014000c760a5e395f2ap0",
"0x0.000180011f411ee1a252ap0",
"0x0.0001c0018721c7d01aecap0",
"0x0.00020001ff02a8af26b2ap0",
"0x0.0002400286e3c97ef29aap0",
"0x0.000280031ec5323fb19aap0",
"0x0.0002c003c6a6eaf19ca6ap0",
"0x0.000300047e88fb94f2b2ap0",
"0x0.00034005466b6c29f8b6ap0",
"0x0.000380061e4e44b0f9a6ap0",
"0x0.0003c00706318d2a467aap0",
"0x0.00040007fe154d963626ap0",
"0x0.0004400905f98df525a2ap0",
"0x0.0004800a1dde564777eaap0",
"0x0.0004c00b45c3ae8d95eaap0",
"0x0.0005000c7da99ec7eea2ap0",
"0x0.0005400dc5902ef6f70aap0",
"0x0.0005800f1d77671b2a1aap0",
"0x0.0005c010855f4f3508d2ap0",
"0x0.00060011fd47ef451a1aap0",
"0x0.0006401385314f4beb02ap0",
"0x0.000680151d1b774a0e7aap0",
"0x0.0006c016c5066f401d7aap0",
"0x0.000700187cf23f2eb702ap0",
"0x0.0007401a44deef168012ap0",
"0x0.0007801c1ccc86f823aaap0",
"0x0.0007c01e04bb0ed452c2ap0",
"0x0.0007ff9ff8aaceb0c44aap0",
"0x0.00083fa2007b4c7c4caaap0",
"0x0.00087fa4184cd23495eaap0",
"0x0.0008bfa6401f67da692aap0",
"0x0.0008ffa877f3156e953aap0",
"0x0.00093faabfc7e2f1ef2aap0",
"0x0.00097fad179dd86551daap0",
"0x0.0009bfaf7f74fdc99e5aap0",
"0x0.0009ffb1f74d5b1fbb9aap0",
"0x0.000a3fb47f26f868969aap0",
"0x0.000a7fb71701dda5224aap0",
"0x0.000abfb9bede12d657aaap0",
"0x0.000affbc76bb9ffd35baap0",
"0x0.000b3fbf3e9a8d1ac16aap0",
"0x0.000b7fc2167ae23005daap0",
"0x0.000bbfc4fe5ca73e13eaap0",
"0x0.000bffc7f63fe44602aaap0",
"0x0.000c3fcafe24a148ef1aap0",
"0x0.000c7fce160ae647fc3aap0",
"0x0.000cbfd13df2bb44531aap0",
"0x0.000cffd475dc283f22baap0",
"0x0.000d3fd7bdc73539a01aap0",
"0x0.000d7fdb15b3ea35064aap0",
"0x0.000dbfde7da24f32964aap0",
"0x0.000dffe1f5926c33972aap0",
"0x0.000e3fe57d844939560aap0",
"0x0.000e7fe91577ee4525caap0",
"0x0.000ebfecbd6d63585faaap0",
"0x0.000efff07564b074629aap0",
"0x0.000f3ff43d5ddd9a93baap0",
"0x0.000f7ff81558f2cc5e1aap0",
"0x0.000fbffbfd55f80b32daap0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,17,6,64> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,17,6,64>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,17,6,64>::array [64] = {
"0x0",
"0x0.000002000001ffc002aa3p0",
"0x0.000004000007ff8015536p0",
"0x0.000006000011ff4047fb8p0",
"0x0.00000800001fff00aaa2bp0",
"0x0.00000a000031fec14d48ep0",
"0x0.00000c000047fe823fee1p0",
"0x0.00000e000061fe4392925p0",
"0x0.00001000007ffe0555359p0",
"0x0.0000120000a1fdc797d7ep0",
"0x0.0000140000c7fd8a6a794p0",
"0x0.0000160000f1fd4ddd19cp0",
"0x0.00001800011ffd11ffb94p0",
"0x0.00001a000151fcd6e257ep0",
"0x0.00001c000187fc9c94f5ap0",
"0x0.00001e0001c1fc632792ap0",
"0x0.0000200001fffc2aaa2eap0",
"0x0.000022000241fbf32cca0p0",
"0x0.000024000287fbbcbf648p0",
"0x0.0000260002d1fb8771fe4p0",
"0x0.00002800031ffb5354970p0",
"0x0.00002a000371fb20772f4p0",
"0x0.00002c0003c7faeee9c70p0",
"0x0.00002e000421fabebc5e0p0",
"0x0.00003000047ffa8ffef44p0",
"0x0.0000320004e1fa62c18a0p0",
"0x0.000034000547fa37141f4p0",
"0x0.0000360005b1fa0d06b40p0",
"0x0.00003800061ff9e4a9484p0",
"0x0.00003a000691f9be0bdc0p0",
"0x0.00003c000707f9993e6f8p0",
"0x0.00003e000781f97651028p0",
"0x0.00003fffe7fff15557954p0",
"0x0.000041ffe881f0f65a078p0",
"0x0.000043ffe907f0996c788p0",
"0x0.000045ffe991f03e9ee80p0",
"0x0.000047ffea1fefe601568p0",
"0x0.000049ffeab1ef8fa3c40p0",
"0x0.00004bffeb47ef3b96308p0",
"0x0.00004dffebe1eee9e89c8p0",
"0x0.00004fffec7fee9aab070p0",
"0x0.000051ffed21ee4ded710p0",
"0x0.000053ffedc7ee03bfda0p0",
"0x0.000055ffee71edbc32428p0",
"0x0.000057ffef1fed7754aa0p0",
"0x0.000059ffefd1ed3537118p0",
"0x0.00005bfff087ecf5e9780p0",
"0x0.00005dfff141ecb97bde0p0",
"0x0.00005ffff1ffec7ffe440p0",
"0x0.000061fff2c1ec4980a98p0",
"0x0.000063fff387ec16130f0p0",
"0x0.000065fff451ebe5c5740p0",
"0x0.000067fff51febb8a7d90p0",
"0x0.000069fff5f1eb8eca3e0p0",
"0x0.00006bfff6c7eb683ca30p0",
"0x0.00006dfff7a1eb450f088p0",
"0x0.00006ffff87feb25516d8p0",
"0x0.000071fff961eb0913d38p0",
"0x0.000073fffa47eaf066398p0",
"0x0.000075fffb31eadb58a00p0",
"0x0.000077fffc1feac9fb070p0",
"0x0.000079fffd11eabc5d6e8p0",
"0x0.00007bfffe07eab28fd70p0",
"0x0.00007dffff01eaaca2408p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,22,6,64> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,22,6,64>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,22,6,64>::array [64] = {
"0x0",
"0x0.000000100000007fff800p0",
"0x0.00000020000001ffff002p0",
"0x0.000000300000047ffe808p0",
"0x0.00000040000007fffe015p0",
"0x0.0000005000000c7ffd829p0",
"0x0.00000060000011fffd047p0",
"0x0.000000700000187ffc872p0",
"0x0.0000008000001ffffc0aap0",
"0x0.000000900000287ffb8f2p0",
"0x0.000000a0000031fffb14dp0",
"0x0.000000b000003c7ffa9bbp0",
"0x0.000000c0000047fffa23fp0",
"0x0.000000d00000547ff9adcp0",
"0x0.000000e0000061fff9392p0",
"0x0.000000f00000707ff8c64p0",
"0x0.0000010000007ffff8555p0",
"0x0.000001100000907ff7e65p0",
"0x0.000001200000a1fff7797p0",
"0x0.000001300000b47ff70eep0",
"0x0.000001400000c7fff6a6ap0",
"0x0.000001500000dc7ff640ep0",
"0x0.000001600000f1fff5dddp0",
"0x0.000001700001087ff57d7p0",
"0x0.0000018000011ffff51ffp0",
"0x0.000001900001387ff4c58p0",
"0x0.000001a0000151fff46e2p0",
"0x0.000001b000016c7ff41a0p0",
"0x0.000001c0000187fff3c95p0",
"0x0.000001d00001a47ff37c1p0",
"0x0.000001e00001c1fff3327p0",
"0x0.000001f00001e07ff2ecap0",
"0x0.000001fffff9ffffe2aaap0",
"0x0.0000020ffffa207fe1ecap0",
"0x0.0000021ffffa41ffe132dp0",
"0x0.0000022ffffa647fe07d3p0",
"0x0.0000023ffffa87ffdfcbfp0",
"0x0.0000024ffffaac7fdf1f4p0",
"0x0.0000025ffffad1ffde772p0",
"0x0.0000026ffffaf87fddd3cp0",
"0x0.0000027ffffb1fffdd355p0",
"0x0.0000028ffffb487fdc9bdp0",
"0x0.0000029ffffb71ffdc077p0",
"0x0.000002affffb9c7fdb786p0",
"0x0.000002bffffbc7ffdaeeap0",
"0x0.000002cffffbf47fda6a6p0",
"0x0.000002dffffc21ffd9ebdp0",
"0x0.000002effffc507fd972fp0",
"0x0.000002fffffc7fffd8fffp0",
"0x0.0000030ffffcb07fd8930p0",
"0x0.0000031ffffce1ffd82c2p0",
"0x0.0000032ffffd147fd7cb8p0",
"0x0.0000033ffffd47ffd7715p0",
"0x0.0000034ffffd7c7fd71d9p0",
"0x0.0000035ffffdb1ffd6d07p0",
"0x0.0000036ffffde87fd68a2p0",
"0x0.0000037ffffe1fffd64aap0",
"0x0.0000038ffffe587fd6122p0",
"0x0.0000039ffffe91ffd5e0dp0",
"0x0.000003affffecc7fd5b6bp0",
"0x0.000003bfffff07ffd593fp0",
"0x0.000003cfffff447fd578cp0",
"0x0.000003dfffff81ffd5652p0",
"0x0.000003efffffc07fd5594p0",
};
template <> class log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,27,6,64> { public:
log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,27,6,64>();
static const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0> log_lut_table<ap_fixed<96, 12, (ap_q_mode)5, (ap_o_mode)3, 0>,27,6,64>::array [64] = {
"0x0",
"0x0.00000000800000001ffffp0",
"0x0.00000001000000007ffffp0",
"0x0.00000001800000011ffffp0",
"0x0.0000000200000001fffffp0",
"0x0.00000002800000031ffffp0",
"0x0.00000003000000047ffffp0",
"0x0.00000003800000061ffffp0",
"0x0.0000000400000007fffffp0",
"0x0.000000048000000a1ffffp0",
"0x0.000000050000000c7ffffp0",
"0x0.000000058000000f1ffffp0",
"0x0.0000000600000011fffffp0",
"0x0.00000006800000151ffffp0",
"0x0.00000007000000187ffffp0",
"0x0.000000078000001c1ffffp0",
"0x0.000000080000001ffffffp0",
"0x0.00000008800000241fffep0",
"0x0.00000009000000287fffep0",
"0x0.000000098000002d1fffep0",
"0x0.0000000a00000031ffffep0",
"0x0.0000000a800000371fffep0",
"0x0.0000000b0000003c7fffep0",
"0x0.0000000b800000421fffep0",
"0x0.0000000c00000047ffffep0",
"0x0.0000000c8000004e1fffep0",
"0x0.0000000d000000547fffep0",
"0x0.0000000d8000005b1fffep0",
"0x0.0000000e00000061ffffep0",
"0x0.0000000e800000691fffep0",
"0x0.0000000f000000707fffep0",
"0x0.0000000f800000781fffep0",
"0x0.0000000ffffffe7fffffcp0",
"0x0.000000107ffffe881fffcp0",
"0x0.00000010fffffe907fffcp0",
"0x0.000000117ffffe991fffcp0",
"0x0.00000011fffffea1ffffbp0",
"0x0.000000127ffffeab1fffbp0",
"0x0.00000012fffffeb47fffbp0",
"0x0.000000137ffffebe1fffbp0",
"0x0.00000013fffffec7ffffbp0",
"0x0.000000147ffffed21fffbp0",
"0x0.00000014fffffedc7fffbp0",
"0x0.000000157ffffee71fffbp0",
"0x0.00000015fffffef1ffffbp0",
"0x0.000000167ffffefd1fffbp0",
"0x0.00000016ffffff087fffbp0",
"0x0.000000177fffff141fffbp0",
"0x0.00000017ffffff1fffffbp0",
"0x0.000000187fffff2c1fffbp0",
"0x0.00000018ffffff387fffbp0",
"0x0.000000197fffff451fffap0",
"0x0.00000019ffffff51ffffap0",
"0x0.0000001a7fffff5f1fffap0",
"0x0.0000001affffff6c7fffap0",
"0x0.0000001b7fffff7a1fffap0",
"0x0.0000001bffffff87ffffap0",
"0x0.0000001c7fffff961fffap0",
"0x0.0000001cffffffa47fffap0",
"0x0.0000001d7fffffb31fffap0",
"0x0.0000001dffffffc1ffffap0",
"0x0.0000001e7fffffd11fffap0",
"0x0.0000001effffffe07fffap0",
"0x0.0000001f7ffffff01fffap0",
};
template <int p, int alpha, int size> class log_inverse_lut_table {};
template <> class log_inverse_lut_table<0,5,64> { public:
log_inverse_lut_table<0,5,64>();
static const ap_ufixed<6, 1, (ap_q_mode)5, (ap_o_mode)3, 0> array [64];};
const ap_ufixed<6, 1, (ap_q_mode)5, (ap_o_mode)3, 0> log_inverse_lut_table<0,5,64>::array [64] = {
"0x0",
"0x0",
"0x0",
"0x0.b0p0",
"0x0",
"0x0.68p0",
"0x1.58p0",
"0x0.98p0",
"0x0",
"0x1.90p0",
"0x1.38p0",
"0x0.f0p0",
"0x0.b0p0",
"0x0.78p0",
"0x0.50p0",
"0x0.28p0",
"0x0",
"0x1.e8p0",
"0x1.c8p0",
"0x1.b0p0",
"0x1.a0p0",
"0x1.88p0",
"0x1.78p0",
"0x1.68p0",
"0x1.58p0",
"0x1.48p0",
"0x1.40p0",
"0x1.30p0",
"0x1.28p0",
"0x1.20p0",
"0x1.18p0",
"0x1.10p0",
"0x1",
"0x1",
"0x0.f8p0",
"0x0.f0p0",
"0x0.e8p0",
"0x0.e0p0",
"0x0.d8p0",
"0x0.d8p0",
"0x0.d0p0",
"0x0.c8p0",
"0x0.c8p0",
"0x0.c0p0",
"0x0.c0p0",
"0x0.b8p0",
"0x0.b8p0",
"0x0.b0p0",
"0x0.b0p0",
"0x0.a8p0",
"0x0.a8p0",
"0x0.a8p0",
"0x0.a0p0",
"0x0.a0p0",
"0x0.98p0",
"0x0.98p0",
"0x0.98p0",
"0x0.90p0",
"0x0.90p0",
"0x0.90p0",
"0x0.90p0",
"0x0.88p0",
"0x0.88p0",
"0x0.88p0",
};
}
#pragma line 43 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h" 2
#pragma empty_line
#pragma empty_line
template <typename LOG_TYPE, int p, int alpha, int size, int sizeout>
void range_reduce(ap_ufixed<size, -p> zN, LOG_TYPE &log, ap_ufixed<sizeout, -(p+alpha-1)> &zN1)
{
#pragma empty_line
const int T1size = 1 << alpha;
#pragma line 72 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
ap_ufixed<alpha, -p> a = zN;
ap_ufixed<size-alpha, -p-alpha> b = zN;
ap_ufixed<size+p+2*p+1, 1> zNext = 1+zN;
int e_shift = a[a.wl()-1] ? 2*p : 2*p+1;
ap_ufixed<size+p+1, 1-2*p> eZ = zNext >> e_shift;
#pragma empty_line
zN1 = ((b + eZ) - a*zN);
ap_uint<alpha> index = a(alpha-1,0);
log = log_lut_table<LOG_TYPE, p,alpha,T1size>::array[index];
#pragma line 105 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
}
#pragma empty_line
template <typename T>
void my_to_float(T in, float &result, int prescale)
{
#pragma empty_line
fp_struct<float> out;
out.sign[0] = in[in.wl()-1];
#pragma empty_line
T ain = in;
#pragma empty_line
if(out.__signbit()) {
ain = -in;
}
#pragma empty_line
ap_uint<32> out_bits_1 = 0, out_bits_2 = 0, out_bits_3 = 0;
out_bits_1(31, 16) = ain(ain.wl()-1,ain.wl()-16); out_bits_1[15] = 1;
out_bits_2(31, 16) = ain(ain.wl()-16-1,ain.wl()-32); out_bits_2[15] = 1;
out_bits_3(31, 31-(ain.wl()-32)+1) = ain(ain.wl()-32-1, 0); out_bits_3[15] = 1;
#pragma empty_line
int c1 = __builtin_clz(out_bits_1.to_uint());
int c2 = __builtin_clz(out_bits_2.to_uint());
int c3 = __builtin_clz(out_bits_3.to_uint());
int shift = c1;
#pragma empty_line
T in_shift = ain << c1;
if(c1 == 16) {
shift += c2;
in_shift = in_shift << c2;
if(c2 == 16) {
#pragma empty_line
shift += c3;
in_shift = in_shift << c3;
}
}
out.sig(fp_struct<float>::SIG_BITS-1,0) =
in_shift(in_shift.wl()-1-1,
in_shift.wl()-fp_struct<float>::SIG_BITS-1);
out.exp = (in == 0) ? 0 : (fp_struct<float>::EXP_BIAS+in_shift.iwl())-prescale-shift-1;
#pragma empty_line
result = out.to_ieee();
}
#pragma empty_line
template <typename T>
void my_to_float(T in, double &result, int prescale)
{
#pragma empty_line
fp_struct<double> out;
out.sign[0] = in[in.wl()-1];
#pragma empty_line
T ain = in;
#pragma empty_line
if(out.__signbit()) {
ain = -in;
}
#pragma empty_line
ap_uint<32> out_bits_1 = 0, out_bits_2 = 0, out_bits_3 = 0, out_bits_4 = 0;
out_bits_1(31, 16) = ain(ain.wl()-1,ain.wl()-16); out_bits_1[15] = 1;
out_bits_2(31, 16) = ain(ain.wl()-16-1,ain.wl()-32); out_bits_2[15] = 1;
out_bits_3(31, 16) = ain(ain.wl()-32-1,ain.wl()-48); out_bits_3[15] = 1;
out_bits_4(31, 16) = ain(ain.wl()-48-1,ain.wl()-64); out_bits_4[15] = 1;
#pragma empty_line
int c1 = __builtin_clz(out_bits_1.to_uint());
int c2 = __builtin_clz(out_bits_2.to_uint());
int c3 = __builtin_clz(out_bits_3.to_uint());
int c4 = __builtin_clz(out_bits_4.to_uint());
int shift = c1;
#pragma empty_line
T in_shift = ain << c1;
if(c1 == 16) {
shift += c2;
in_shift = in_shift << c2;
if(c2 == 16) {
#pragma empty_line
shift += c3;
in_shift = in_shift << c3;
if(c3 == 16) {
shift += c4;
in_shift = in_shift << c4;
}
}
}
out.sig(fp_struct<double>::SIG_BITS-1,0) =
in_shift(in_shift.wl()-1-1,
in_shift.wl()-fp_struct<double>::SIG_BITS-1);
out.exp = (in == 0) ? 0 : (fp_struct<double>::EXP_BIAS+in_shift.iwl())-prescale-shift-1;
#pragma empty_line
result = out.to_ieee();
}
#pragma empty_line
#pragma empty_line
const int p0 = 0;
const int alpha0 = 5;
const int p1 = (alpha0 == 5) ? 4 : (alpha0-2);
const int alpha1 = 4;
const int p2 = p1 + alpha1 - 1;
const int alpha2 = 6;
const int p3 = p2 + alpha2 - 1;
const int alpha3 = 6;
const int p4 = p3 + alpha3 - 1;
const int alpha4 = 6;
const int p5 = p4 + alpha4 - 1;
const int alpha5 = 6;
const int p6 = p5 + alpha5 - 1;
const int alpha6 = 6;
const int p7 = p6 + alpha6 - 1;
const int alpha7 = 6;
const int p8 = p7 + alpha7 - 1;
const int alpha8 = 6;
const int p9 = p8 + alpha8 - 1;
const int alpha9 = 6;
const int p10 = p9 + alpha9 - 1;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T>
class log_traits {};
#pragma empty_line
template <> class log_traits<float>
{
public:
const static int bypass_threshold = 12;
const static int Wf = fp_struct<float>::SIG_BITS;
const static int We = fp_struct<float>::EXP_BITS;
const static int guard_bits = 4;
const static int MaxPrecision = (Wf*3)/2+1+guard_bits;
const static int SquarerExtraBits = 4;
typedef ap_fixed<1+We+MaxPrecision,1+We> LOG_TYPE;
#pragma empty_line
const static int w1 = Wf+1;
const static int w2 = w1+2*p1+1-(alpha1-1);
const static int w3 = w2+2*p2+1-(alpha2-1);
#pragma empty_line
template <int size>
static ap_ufixed<MaxPrecision-p3, -p3> range_reduction(ap_ufixed<size, -p1> z1, LOG_TYPE &log_sum) {
ap_ufixed<(w2 < MaxPrecision-p2) ? w2 : (MaxPrecision-p2), -p2> z2;
ap_ufixed<(w3 < MaxPrecision-p3) ? w3 : (MaxPrecision-p3), -p3> z3;
LOG_TYPE logn;
range_reduce<LOG_TYPE, p1, alpha1> (z1, logn, z2);
log_sum += logn;
range_reduce<LOG_TYPE, p2, alpha2> (z2, logn, z3);
log_sum += logn;
return z3;
}
};
#pragma empty_line
template <> class log_traits<double>
{
public:
const static int bypass_threshold = p6;
const static int Wf = fp_struct<double>::SIG_BITS;
const static int We = fp_struct<double>::EXP_BITS;
const static int guard_bits = 5 ;
const static int MaxPrecision = (Wf*3)/2+1+guard_bits;
const static int SquarerExtraBits = 8 ;
typedef ap_fixed<1+We+MaxPrecision,1+We> LOG_TYPE;
#pragma empty_line
const static int w1 = Wf+1;
const static int w2 = w1+2*p1+1-(alpha1-1);
const static int w3 = w2+2*p2+1-(alpha2-1);
const static int w4 = w3+2*p3+1-(alpha3-1);
const static int w5 = w4+2*p4+1-(alpha4-1);
const static int w6 = w5+2*p5+1-(alpha5-1);
#pragma empty_line
template <int size>
static ap_ufixed<MaxPrecision-p6, -p6> range_reduction(ap_ufixed<size, -p1> z1, LOG_TYPE &log_sum) {
ap_ufixed<(w2 < MaxPrecision-p2) ? w2 : (MaxPrecision-p2), -p2> z2;
ap_ufixed<(w3 < MaxPrecision-p3) ? w3 : (MaxPrecision-p3), -p3> z3;
ap_ufixed<(w4 < MaxPrecision-p4) ? w4 : (MaxPrecision-p4), -p4> z4;
ap_ufixed<(w5 < MaxPrecision-p5) ? w5 : (MaxPrecision-p5), -p5> z5;
ap_ufixed<(w6 < MaxPrecision-p6) ? w6 : (MaxPrecision-p6), -p6> z6;
LOG_TYPE logn;
range_reduce<LOG_TYPE, p1, alpha1> (z1, logn, z2);
log_sum += logn;
range_reduce<LOG_TYPE, p2, alpha2> (z2, logn, z3);
log_sum += logn;
range_reduce<LOG_TYPE, p3, alpha3> (z3, logn, z4);
log_sum += logn;
range_reduce<LOG_TYPE, p4, alpha4> (z4, logn, z5);
log_sum += logn;
range_reduce<LOG_TYPE, p5, alpha5> (z5, logn, z6);
log_sum += logn;
return z6;
}
};
#pragma empty_line
template<typename T>
T log_generic(T z)
{
typedef typename log_traits<T>::LOG_TYPE LOG_TYPE;
#pragma empty_line
const int T0size = 1 << (1+alpha0);
#pragma line 335 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
#pragma HLS pipeline
#pragma empty_line
T logz;
LOG_TYPE sum;
LOG_TYPE log_sum;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
fp_struct<T> zs(z);
#pragma empty_line
#pragma empty_line
if(zs.exp == 0) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
return fp_struct<T>::minus_infinity();
} else if(zs.sign != 0 || ::hls::__isnan(z)) {
return ::hls::nan("");
} else if(::hls::__isinf(z)) {
return fp_struct<T>::infinity();
}
#pragma empty_line
int exponent = zs.expv();
fp_struct<T> ns = zs;
#pragma line 380 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
int FirstBit = ns.sig[log_traits<T>::Wf-1];
#pragma empty_line
#pragma empty_line
ap_ufixed<1+log_traits<T>::Wf+1,1> y = 0;
y[y.wl()-1] = 1;
y(y.wl()-1-y.iwl(),1) = ns.sig(log_traits<T>::Wf-1,0);
if(FirstBit) {
y = y >> 1;
exponent += 1;
}
#pragma empty_line
#pragma empty_line
const ap_ufixed<log_traits<T>::Wf+log_traits<T>::We+2,0>
LOG2 = 0.69314718055994530941723212145;
ap_ufixed<log_traits<T>::We+1+log_traits<T>::Wf+log_traits<T>::We+2,log_traits<T>::We+1>
Elog2 = LOG2 * exponent;
#pragma line 404 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
ap_uint<fp_struct<T>::SIG_BITS> t;
if(FirstBit) {
t = -ns.sig;
} else {
t = ns.sig;
}
#pragma empty_line
ap_fixed<1+-log_traits<T>::bypass_threshold+1+log_traits<T>::MaxPrecision, -log_traits<T>::bypass_threshold+1> zk;
unsigned int prescale;
int bits = log_traits<T>::bypass_threshold;
if((exponent == 0) && ((t >> (log_traits<T>::Wf-bits)) == 0)) {
#pragma empty_line
ap_uint<fp_struct<T>::SIG_BITS> t2 = t << bits;
t2.reverse();
prescale = __builtin_ctzl(t2);
#pragma empty_line
zk = y << prescale;
log_sum = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
} else {
prescale = 0;
ap_uint<1+alpha0> index0 = y(y.wl()-1, y.wl()-(1+alpha0));
ap_ufixed<1+alpha0,1> y_tilde_inverse = log_inverse_lut_table<p0,alpha0, T0size>::array[index0];
log_sum = log0_lut_table<LOG_TYPE,T,p0,alpha0,T0size>::array[index0];
#pragma empty_line
#pragma empty_line
ap_ufixed<1+log_traits<T>::Wf+1+(1+alpha0),1> y1 = y * y_tilde_inverse;
#pragma line 447 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
((y1( y1.wl()-y1.iwl()-1, y1.wl()-y1.iwl()-p1) == 0) ? (void)0 : _assert("y1( y1.wl()-y1.iwl()-1, y1.wl()-y1.iwl()-p1) == 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h", 447));
#pragma empty_line
const int z1_width = 1+log_traits<T>::Wf+1+(1+alpha0)-p1+1;
ap_ufixed<z1_width, -p1> z1 = y1;
#pragma empty_line
zk = log_traits<T>::range_reduction(z1,log_sum);
}
#pragma empty_line
ap_fixed<1+-log_traits<T>::bypass_threshold+1+log_traits<T>::MaxPrecision/2+log_traits<T>::SquarerExtraBits, -log_traits<T>::bypass_threshold+1> zk_trunc = zk;
sum = zk-((zk_trunc*zk_trunc/2) >> prescale);
#pragma line 468 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
LOG_TYPE log_out = Elog2 + log_sum + sum;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
my_to_float(log_out, logz, prescale);
#pragma empty_line
#pragma empty_line
#pragma empty_line
return logz;
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
static
float logf(float x)
{
return log_generic(x);
}
#pragma empty_line
#pragma empty_line
static
float log(float x)
{
return logf(x);
}
#pragma empty_line
static
float log10f(float x)
{
return logf(x) * 0.434294481903251827651128918916605082294397005f;
}
#pragma empty_line
static
float log10(float x)
{
return log10f(x);
}
#pragma line 631 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_log.h"
static
double log(double x)
{
return log_generic(x);
}
#pragma empty_line
static
double log10(double x)
{
return log(x) * 0.434294481903251827651128918916605082294397005;
}
#pragma empty_line
}
#pragma line 507 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h" 1
#pragma line 46 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/utils/x_hls_defines.h" 1
#pragma line 47 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm_tables.h" 1
#pragma line 32 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm_tables.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_fixed.h" 1
#pragma line 33 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm_tables.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const ap_fixed< 29 , 0 > cos_K0 [ 128 ] = {
"0", "0x1.3bdp-16", "0x4.ef48p-16", "0xb.1a6p-16", "0x1.3bcf8p-12", "0x1.ed71p-12", "0x2.c688p-12", "0x3.c7128p-12",
"0x4.ef0ep-12", "0x6.3e78p-12", "0x7.b54dp-12", "0x9.53898p-12", "0xb.19298p-12", "0xd.06288p-12", "0xf.1a818p-12", "0x1.1563p-8",
"0x1.3b92ep-8", "0x1.64376p-8", "0x1.8f501p-8", "0x1.bcdc98p-8", "0x1.ecdc78p-8", "0x2.1f4f4p-8", "0x2.54347p-8", "0x2.8b8b9p-8",
"0x2.c55408p-8", "0x3.018d5p-8", "0x3.4036d8p-8", "0x3.815p-8", "0x3.c4d828p-8", "0x4.0acebp-8", "0x4.5332ep-8", "0x4.9e041p-8",
"0x4.eb418p-8", "0x5.3aea7p-8", "0x5.8cfe28p-8", "0x5.e17bdp-8", "0x6.386298p-8", "0x6.91b1b8p-8", "0x6.ed684p-8", "0x7.4b856p-8",
"0x7.ac082p-8", "0x8.0eefap-8", "0x8.743aep-8", "0x8.dbe8e8p-8", "0x9.45f8cp-8", "0x9.b2696p-8", "0xa.2139b8p-8", "0xa.9268b8p-8",
"0xb.05f548p-8", "0xb.7bde5p-8", "0xb.f422a8p-8", "0xc.6ec12p-8", "0xc.ebb8ap-8", "0xd.6b07d8p-8", "0xd.ecada8p-8", "0xe.70a8b8p-8",
"0xe.f6f7d8p-8", "0xf.7f99bp-8", "0x1.00a8cfp-4", "0x1.097d04p-4", "0x1.1276248p-4", "0x1.1b941a8p-4", "0x1.24d6cfp-4", "0x1.2e3e2bp-4",
"0x1.37ca188p-4", "0x1.417a7e8p-4", "0x1.4b4f46p-4", "0x1.5548568p-4", "0x1.5f6597p-4", "0x1.69a6ef8p-4", "0x1.740c458p-4", "0x1.7e95808p-4",
"0x1.8942858p-4", "0x1.94133bp-4", "0x1.9f0786p-4", "0x1.aa1f4bp-4", "0x1.b55a6f8p-4", "0x1.c0b8d7p-4", "0x1.cc3a658p-4", "0x1.d7deff8p-4",
"0x1.e3a687p-4", "0x1.ef90ep-4", "0x1.fb9dec8p-4", "0x2.07cd8fp-4", "0x2.141fa98p-4", "0x2.20941d8p-4", "0x2.2d2accp-4", "0x2.39e3968p-4",
"0x2.46be5d8p-4", "0x2.53bb008p-4", "0x2.60d9608p-4", "0x2.6e195c8p-4", "0x2.7b7ad4p-4", "0x2.88fda58p-4", "0x2.96a1b1p-4", "0x2.a466d38p-4",
"0x2.b24ceb8p-4", "0x2.c053d68p-4", "0x2.ce7b728p-4", "0x2.dcc39cp-4", "0x2.eb2c2f8p-4", "0x2.f9b50a8p-4", "0x3.085e08p-4", "0x3.172705p-4",
"0x3.260fdcp-4", "0x3.3518688p-4", "0x3.4440858p-4", "0x3.53880d8p-4", "0x3.62eedbp-4", "0x3.7274c8p-4", "0x3.8219aep-4", "0x3.91dd668p-4",
"0x3.a1bfca8p-4", "0x3.b1c0b28p-4", "0x3.c1dff8p-4", "0x3.d21d728p-4", "0x3.e278fap-4", "0x3.f2f266p-4", "0x4.03898ep-4", "0x4.143e498p-4",
"0x4.25106e8p-4", "0x4.35ffd4p-4", "0x4.470c508p-4", "0x4.5835b9p-4", "0x4.697be4p-4", "0x4.7adea6p-4", "0x4.8c5dd58p-4", "0x4.9df946p-4",
};
#pragma empty_line
static const ap_fixed< 23 , 1 > cos_K1 [ 128 ] = {
"0x4.p-24", "0x1.3bdcp-8", "0x2.77a8p-8", "0x3.b36cp-8", "0x4.ef38p-8", "0x6.2ae4p-8", "0x7.668cp-8", "0x8.a21cp-8",
"0x9.dda8p-8", "0xb.190cp-8", "0xc.5454p-8", "0xd.8f7cp-8", "0xe.ca84p-8", "0x1.00568p-4", "0x1.1402cp-4", "0x1.27acp-4",
"0x1.3b524p-4", "0x1.4ef54p-4", "0x1.62964p-4", "0x1.76328p-4", "0x1.89cbcp-4", "0x1.9d614p-4", "0x1.b0f28p-4", "0x1.c47f4p-4",
"0x1.d8084p-4", "0x1.eb8ccp-4", "0x1.ff0c4p-4", "0x2.1286cp-4", "0x2.25fc8p-4", "0x2.396c8p-4", "0x2.4cd74p-4", "0x2.603cp-4",
"0x2.739bp-4", "0x2.86f4cp-4", "0x2.9a47p-4", "0x2.ad934p-4", "0x2.c0d9cp-4", "0x2.d4184p-4", "0x2.e751p-4", "0x2.fa81p-4",
"0x3.0dab4p-4", "0x3.20cdp-4", "0x3.33e74p-4", "0x3.46fap-4", "0x3.5a048p-4", "0x3.6d064p-4", "0x3.7fffcp-4", "0x3.92f0cp-4",
"0x3.a5d8cp-4", "0x3.b8b78p-4", "0x3.cb8d4p-4", "0x3.de5acp-4", "0x3.f11ccp-4", "0x4.03d7p-4", "0x4.1685cp-4", "0x4.292cp-4",
"0x4.3bc64p-4", "0x4.4e56cp-4", "0x4.60ddp-4", "0x4.73588p-4", "0x4.85c88p-4", "0x4.982dp-4", "0x4.aa86cp-4", "0x4.bcd5cp-4",
"0x4.cf174p-4", "0x4.e14ecp-4", "0x4.f3794p-4", "0x5.05974p-4", "0x5.17aap-4", "0x5.29aecp-4", "0x5.3ba84p-4", "0x5.4d938p-4",
"0x5.5f728p-4", "0x5.7143cp-4", "0x5.83074p-4", "0x5.94bep-4", "0x5.a6664p-4", "0x5.b800cp-4", "0x5.c98ep-4", "0x5.db0bcp-4",
"0x5.ec7cp-4", "0x5.fddd4p-4", "0x6.0f3p-4", "0x6.20738p-4", "0x6.31a7cp-4", "0x6.42cccp-4", "0x6.53e2cp-4", "0x6.64e8cp-4",
"0x6.75de4p-4", "0x6.86c54p-4", "0x6.979bp-4", "0x6.a861p-4", "0x6.b9164p-4", "0x6.c9bcp-4", "0x6.da4f8p-4", "0x6.ead2cp-4",
"0x6.fb44cp-4", "0x7.0ba68p-4", "0x7.1bf5cp-4", "0x7.2c338p-4", "0x7.3c608p-4", "0x7.4c7acp-4", "0x7.5c84p-4", "0x7.6c798p-4",
"0x7.7c5d4p-4", "0x7.8c2ecp-4", "0x7.9beep-4", "0x7.ab9a4p-4", "0x7.bb338p-4", "0x7.cab94p-4", "0x7.da2c8p-4", "0x7.e98bcp-4",
"0x7.f8d7cp-4", "0x8.0810cp-4", "0x8.1734cp-4", "0x8.26458p-4", "0x8.3541cp-4", "0x8.442a4p-4", "0x8.52fe4p-4", "0x8.61bd4p-4",
"0x8.70684p-4", "0x8.7efe4p-4", "0x8.8d7e4p-4", "0x8.9beap-4", "0x8.aa40cp-4", "0x8.b882cp-4", "0x8.c6adp-4", "0x8.d4c34p-4",
};
#pragma empty_line
static const ap_fixed< 15 , 0 > cos_K2 [ 128 ] = {
"0x4.ef2p-4", "0x4.efp-4", "0x4.ef2p-4", "0x4.efp-4", "0x4.eeap-4", "0x4.eeap-4", "0x4.ee4p-4", "0x4.ee2p-4",
"0x4.ed4p-4", "0x4.ecep-4", "0x4.ec8p-4", "0x4.ec2p-4", "0x4.ebap-4", "0x4.ebp-4", "0x4.ea4p-4", "0x4.e98p-4",
"0x4.e8ep-4", "0x4.e84p-4", "0x4.e7p-4", "0x4.e64p-4", "0x4.e54p-4", "0x4.e42p-4", "0x4.e34p-4", "0x4.e24p-4",
"0x4.e1p-4", "0x4.dfcp-4", "0x4.de8p-4", "0x4.dd6p-4", "0x4.dbep-4", "0x4.da8p-4", "0x4.d92p-4", "0x4.d7cp-4",
"0x4.d66p-4", "0x4.d48p-4", "0x4.d32p-4", "0x4.d1ap-4", "0x4.cfap-4", "0x4.ce2p-4", "0x4.ccp-4", "0x4.caap-4",
"0x4.c86p-4", "0x4.c68p-4", "0x4.c4ap-4", "0x4.c28p-4", "0x4.c04p-4", "0x4.be4p-4", "0x4.bc2p-4", "0x4.b9ep-4",
"0x4.b7cp-4", "0x4.b5ap-4", "0x4.b36p-4", "0x4.b0ap-4", "0x4.aeap-4", "0x4.abcp-4", "0x4.a98p-4", "0x4.a68p-4",
"0x4.a44p-4", "0x4.a1ap-4", "0x4.9ecp-4", "0x4.9bep-4", "0x4.994p-4", "0x4.96ap-4", "0x4.93cp-4", "0x4.908p-4",
"0x4.8ep-4", "0x4.8a8p-4", "0x4.878p-4", "0x4.84ap-4", "0x4.812p-4", "0x4.7e4p-4", "0x4.7aap-4", "0x4.77ap-4",
"0x4.744p-4", "0x4.70ep-4", "0x4.6dcp-4", "0x4.6a2p-4", "0x4.66cp-4", "0x4.636p-4", "0x4.5f8p-4", "0x4.5c2p-4",
"0x4.586p-4", "0x4.54ap-4", "0x4.50cp-4", "0x4.4dp-4", "0x4.494p-4", "0x4.456p-4", "0x4.416p-4", "0x4.3d6p-4",
"0x4.39cp-4", "0x4.356p-4", "0x4.318p-4", "0x4.2d6p-4", "0x4.296p-4", "0x4.24ep-4", "0x4.20ep-4", "0x4.1cap-4",
"0x4.188p-4", "0x4.13cp-4", "0x4.0f8p-4", "0x4.0b4p-4", "0x4.06ap-4", "0x4.022p-4", "0x3.fd4p-4", "0x3.f9p-4",
"0x3.f4ap-4", "0x3.fp-4", "0x3.eb2p-4", "0x3.e66p-4", "0x3.e1ap-4", "0x3.ddp-4", "0x3.d7ep-4", "0x3.d32p-4",
"0x3.ce4p-4", "0x3.c92p-4", "0x3.c46p-4", "0x3.bf2p-4", "0x3.ba4p-4", "0x3.b5p-4", "0x3.afep-4", "0x3.aacp-4",
"0x3.a56p-4", "0x3.ap-4", "0x3.9b2p-4", "0x3.95ep-4", "0x3.904p-4", "0x3.8a8p-4", "0x3.85cp-4", "0x3.802p-4",
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const ap_fixed< 30 , 1 > sin_K0 [ 128 ] = {
"0xc.90fdaap-4", "0xc.90f87fp-4", "0xc.90e8fe8p-4", "0xc.90cf28p-4", "0xc.90aafcp-4", "0xc.907c7a8p-4", "0xc.9043a4p-4", "0xc.9000788p-4",
"0xc.8fb2f88p-4", "0xc.8f5b25p-4", "0xc.8ef8fd8p-4", "0xc.8e8c838p-4", "0xc.8e15b7p-4", "0xc.8d94998p-4", "0xc.8d092a8p-4", "0xc.8c736cp-4",
"0xc.8bd35ep-4", "0xc.8b2902p-4", "0xc.8a74588p-4", "0xc.89b563p-4", "0xc.88ec228p-4", "0xc.881898p-4", "0xc.873ac5p-4", "0xc.8652aa8p-4",
"0xc.8560498p-4", "0xc.8463a48p-4", "0xc.835cbcp-4", "0xc.824b918p-4", "0xc.813027p-4", "0xc.800a7e8p-4", "0xc.7eda988p-4", "0xc.7da078p-4",
"0xc.7c5c1ep-4", "0xc.7b0d8dp-4", "0xc.79b4c68p-4", "0xc.7851cc8p-4", "0xc.76e4a1p-4", "0xc.756d468p-4", "0xc.73ebbfp-4", "0xc.72600c8p-4",
"0xc.70ca318p-4", "0xc.6f2a3p-4", "0xc.6d800bp-4", "0xc.6bcbc48p-4", "0xc.6a0d5fp-4", "0xc.6844dd8p-4", "0xc.6672428p-4", "0xc.64959p-4",
"0xc.62aecap-4", "0xc.60bdf2p-4", "0xc.5ec30cp-4", "0xc.5cbe1a8p-4", "0xc.5aaf2p-4", "0xc.58962p-4", "0xc.56731ep-4", "0xc.54461c8p-4",
"0xc.520f1e8p-4", "0xc.4fce28p-4", "0xc.4d833c8p-4", "0xc.4b2e5e8p-4", "0xc.48cf918p-4", "0xc.4666dap-4", "0xc.43f43a8p-4", "0xc.4177b7p-4",
"0xc.3ef1538p-4", "0xc.3c6113p-4", "0xc.39c6fap-4", "0xc.37230cp-4", "0xc.34754dp-4", "0xc.31bdc1p-4", "0xc.2efc6b8p-4", "0xc.2c31518p-4",
"0xc.295c76p-4", "0xc.267dde8p-4", "0xc.23958ep-4", "0xc.20a389p-4", "0xc.1da7d48p-4", "0xc.1aa275p-4", "0xc.17936ep-4", "0xc.147ac48p-4",
"0xc.11587dp-4", "0xc.0e2c9cp-4", "0xc.0af7268p-4", "0xc.07b8218p-4", "0xc.046f91p-4", "0xc.011d7ap-4", "0xb.fdc1e18p-4", "0xb.fa5ccdp-4",
"0xb.f6ee41p-4", "0xb.f376428p-4", "0xb.eff4d68p-4", "0xb.ec6a028p-4", "0xb.e8d5cbp-4", "0xb.e538368p-4", "0xb.e191498p-4", "0xb.dde1098p-4",
"0xb.da277cp-4", "0xb.d664a6p-4", "0xb.d2988ep-4", "0xb.cec3388p-4", "0xb.cae4acp-4", "0xb.c6fceep-4", "0xb.c30c04p-4", "0xb.bf11f38p-4",
"0xb.bb0ec3p-4", "0xb.b70278p-4", "0xb.b2ed19p-4", "0xb.aeceabp-4", "0xb.aaa735p-4", "0xb.a676bc8p-4", "0xb.a23d48p-4", "0xb.9dfaddp-4",
"0xb.99af83p-4", "0xb.955b3fp-4", "0xb.90fe188p-4", "0xb.8c9815p-4", "0xb.88293b8p-4", "0xb.83b1928p-4", "0xb.7f312p-4", "0xb.7aa7ebp-4",
"0xb.7615fap-4", "0xb.717b54p-4", "0xb.6cd7ffp-4", "0xb.682c03p-4", "0xb.637766p-4", "0xb.5eba2e8p-4", "0xb.59f4648p-4", "0xb.55260e8p-4",
};
#pragma empty_line
static const ap_fixed< 21 , -1 > sin_K1 [ 128 ] = {
"0x8.p-24", "-0x5.2a8p-12", "-0xa.56p-12", "-0xf.81p-12", "-0x1.4acp-8", "-0x1.9d64p-8", "-0x1.f014p-8", "-0x2.42b4p-8",
"-0x2.955p-8", "-0x2.e7f4p-8", "-0x3.3a84p-8", "-0x3.8d18p-8", "-0x3.dfa8p-8", "-0x4.3238p-8", "-0x4.84b4p-8", "-0x4.d734p-8",
"-0x5.29a8p-8", "-0x5.7c14p-8", "-0x5.ce74p-8", "-0x6.20dp-8", "-0x6.7328p-8", "-0x6.c574p-8", "-0x7.17bcp-8", "-0x7.69fp-8",
"-0x7.bc18p-8", "-0x8.0e4p-8", "-0x8.6054p-8", "-0x8.b254p-8", "-0x9.044cp-8", "-0x9.564p-8", "-0x9.a814p-8", "-0x9.f9e8p-8",
"-0xa.4ba8p-8", "-0xa.9d64p-8", "-0xa.ef08p-8", "-0xb.4098p-8", "-0xb.9218p-8", "-0xb.e39p-8", "-0xc.34f4p-8", "-0xc.8644p-8",
"-0xc.d78p-8", "-0xd.28a4p-8", "-0xd.79bcp-8", "-0xd.cab8p-8", "-0xe.1bap-8", "-0xe.6c7cp-8", "-0xe.bd4p-8", "-0xf.0de4p-8",
"-0xf.5e7cp-8", "-0xf.aef4p-8", "-0xf.ff64p-8", "-0x1.04fb8p-4", "-0x1.09fecp-4", "-0x1.0f00cp-4", "-0x1.1401cp-4", "-0x1.19008p-4",
"-0x1.1dfdp-4", "-0x1.22f88p-4", "-0x1.27f38p-4", "-0x1.2ceb8p-4", "-0x1.31e14p-4", "-0x1.36d6cp-4", "-0x1.3bc94p-4", "-0x1.40ba4p-4",
"-0x1.45a9cp-4", "-0x1.4a968p-4", "-0x1.4f82p-4", "-0x1.546b8p-4", "-0x1.59538p-4", "-0x1.5e39p-4", "-0x1.631c4p-4", "-0x1.67fep-4",
"-0x1.6cdccp-4", "-0x1.71bb4p-4", "-0x1.7696p-4", "-0x1.7b6e4p-4", "-0x1.8045p-4", "-0x1.851bp-4", "-0x1.89ed4p-4", "-0x1.8ebd8p-4",
"-0x1.938bp-4", "-0x1.9856p-4", "-0x1.9d1fp-4", "-0x1.a1e6cp-4", "-0x1.a6abp-4", "-0x1.ab6c4p-4", "-0x1.b02b8p-4", "-0x1.b4e9p-4",
"-0x1.b9a38p-4", "-0x1.be5cp-4", "-0x1.c310cp-4", "-0x1.c7c3cp-4", "-0x1.cc734p-4", "-0x1.d1214p-4", "-0x1.d5cc4p-4", "-0x1.da748p-4",
"-0x1.df19cp-4", "-0x1.e3bc4p-4", "-0x1.e85c4p-4", "-0x1.ecf8cp-4", "-0x1.f1938p-4", "-0x1.f62acp-4", "-0x1.fabfcp-4", "-0x1.ff51p-4",
"-0x2.03df8p-4", "-0x2.086bp-4", "-0x2.0cf48p-4", "-0x2.117ap-4", "-0x2.15fdp-4", "-0x2.1a7c4p-4", "-0x2.1ef9p-4", "-0x2.2371cp-4",
"-0x2.27e84p-4", "-0x2.2c5bp-4", "-0x2.30cb4p-4", "-0x2.3537cp-4", "-0x2.39a14p-4", "-0x2.3e088p-4", "-0x2.426b4p-4", "-0x2.46cacp-4",
"-0x2.4b268p-4", "-0x2.4f7fcp-4", "-0x2.53d5p-4", "-0x2.58274p-4", "-0x2.5c764p-4", "-0x2.60c0cp-4", "-0x2.6509p-4", "-0x2.694d4p-4",
};
#pragma empty_line
static const ap_fixed< 13 , -2 > sin_K2 [ 128 ] = {
"-0x1.4bp-4", "-0x1.4aep-4", "-0x1.4aap-4", "-0x1.4a8p-4", "-0x1.4a6p-4", "-0x1.4aap-4", "-0x1.4a4p-4", "-0x1.4a6p-4",
"-0x1.4a6p-4", "-0x1.4a4p-4", "-0x1.4a6p-4", "-0x1.4a6p-4", "-0x1.4a2p-4", "-0x1.4ap-4", "-0x1.4ap-4", "-0x1.49ep-4",
"-0x1.49cp-4", "-0x1.49cp-4", "-0x1.49cp-4", "-0x1.49ap-4", "-0x1.496p-4", "-0x1.492p-4", "-0x1.48cp-4", "-0x1.48cp-4",
"-0x1.488p-4", "-0x1.482p-4", "-0x1.48p-4", "-0x1.48p-4", "-0x1.47cp-4", "-0x1.478p-4", "-0x1.478p-4", "-0x1.474p-4",
"-0x1.47p-4", "-0x1.468p-4", "-0x1.464p-4", "-0x1.462p-4", "-0x1.45ep-4", "-0x1.456p-4", "-0x1.45p-4", "-0x1.44ap-4",
"-0x1.446p-4", "-0x1.442p-4", "-0x1.43cp-4", "-0x1.43ap-4", "-0x1.436p-4", "-0x1.42ep-4", "-0x1.42ap-4", "-0x1.426p-4",
"-0x1.422p-4", "-0x1.41ep-4", "-0x1.414p-4", "-0x1.40ep-4", "-0x1.40ap-4", "-0x1.402p-4", "-0x1.3f8p-4", "-0x1.3f4p-4",
"-0x1.3f2p-4", "-0x1.3ecp-4", "-0x1.3dcp-4", "-0x1.3d8p-4", "-0x1.3d6p-4", "-0x1.3c8p-4", "-0x1.3c4p-4", "-0x1.3bcp-4",
"-0x1.3b4p-4", "-0x1.3bp-4", "-0x1.3a8p-4", "-0x1.3ap-4", "-0x1.394p-4", "-0x1.38ep-4", "-0x1.386p-4", "-0x1.37ep-4",
"-0x1.37ap-4", "-0x1.368p-4", "-0x1.364p-4", "-0x1.36p-4", "-0x1.358p-4", "-0x1.344p-4", "-0x1.33cp-4", "-0x1.332p-4",
"-0x1.32cp-4", "-0x1.326p-4", "-0x1.31ep-4", "-0x1.30cp-4", "-0x1.304p-4", "-0x1.3p-4", "-0x1.2f6p-4", "-0x1.2e8p-4",
"-0x1.2ep-4", "-0x1.2dp-4", "-0x1.2ccp-4", "-0x1.2cp-4", "-0x1.2b8p-4", "-0x1.2aap-4", "-0x1.29ep-4", "-0x1.292p-4",
"-0x1.28ap-4", "-0x1.27ep-4", "-0x1.274p-4", "-0x1.26cp-4", "-0x1.25cp-4", "-0x1.254p-4", "-0x1.244p-4", "-0x1.23ap-4",
"-0x1.23p-4", "-0x1.226p-4", "-0x1.214p-4", "-0x1.208p-4", "-0x1.1fap-4", "-0x1.1f2p-4", "-0x1.1e4p-4", "-0x1.1dap-4",
"-0x1.1cep-4", "-0x1.1c2p-4", "-0x1.1b4p-4", "-0x1.1a8p-4", "-0x1.19cp-4", "-0x1.186p-4", "-0x1.17ap-4", "-0x1.16ep-4",
"-0x1.166p-4", "-0x1.156p-4", "-0x1.148p-4", "-0x1.13cp-4", "-0x1.12cp-4", "-0x1.122p-4", "-0x1.11p-4", "-0x1.104p-4",
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
static const ap_ufixed< 30 , 1 > sin_cos_K0 [ 256 ] = {
0x1.p0 ,
0xf.ffec43p-4 ,
0xf.ffb10b8p-4 ,
0xf.ff4e5ap-4 ,
0xf.fec4308p-4 ,
0xf.fe128fp-4 ,
0xf.fd3978p-4 ,
0xf.fc38ed8p-4 ,
0xf.fb10f2p-4 ,
0xf.f9c188p-4 ,
0xf.f84ab3p-4 ,
0xf.f6ac768p-4 ,
0xf.f4e6d68p-4 ,
0xf.f2f9d78p-4 ,
0xf.f0e57e8p-4 ,
0xf.eea9dp-4 ,
0xf.ec46d2p-4 ,
0xf.e9bc8ap-4 ,
0xf.e70affp-4 ,
0xf.e432368p-4 ,
0xf.e132388p-4 ,
0xf.de0b0cp-4 ,
0xf.dabcb9p-4 ,
0xf.d74747p-4 ,
0xf.d3aabf8p-4 ,
0xf.cfe72bp-4 ,
0xf.cbfc928p-4 ,
0xf.c7ebp-4 ,
0xf.c3b27d8p-4 ,
0xf.bf5315p-4 ,
0xf.baccd2p-4 ,
0xf.b61fbfp-4 ,
0xf.b14be8p-4 ,
0xf.ac5159p-4 ,
0xf.a7301d8p-4 ,
0xf.a1e843p-4 ,
0xf.9c79d68p-4 ,
0xf.96e4e48p-4 ,
0xf.91297cp-4 ,
0xf.8b47aap-4 ,
0xf.853f7ep-4 ,
0xf.7f1106p-4 ,
0xf.78bc52p-4 ,
0xf.7241718p-4 ,
0xf.6ba074p-4 ,
0xf.64d96ap-4 ,
0xf.5dec648p-4 ,
0xf.56d9748p-4 ,
0xf.4fa0ab8p-4 ,
0xf.48421bp-4 ,
0xf.40bdd58p-4 ,
0xf.3913eep-4 ,
0xf.314476p-4 ,
0xf.294f828p-4 ,
0xf.2135258p-4 ,
0xf.18f5748p-4 ,
0xf.1090828p-4 ,
0xf.080665p-4 ,
0xe.ff5731p-4 ,
0xe.f682fcp-4 ,
0xe.ed89db8p-4 ,
0xe.e46be58p-4 ,
0xe.db2931p-4 ,
0xe.d1c1d5p-4 ,
0xe.c835e78p-4 ,
0xe.be85818p-4 ,
0xe.b4b0bap-4 ,
0xe.aab7a98p-4 ,
0xe.a09a69p-4 ,
0xe.9659108p-4 ,
0xe.8bf3ba8p-4 ,
0xe.816a7f8p-4 ,
0xe.76bd7a8p-4 ,
0xe.6becc5p-4 ,
0xe.60f87ap-4 ,
0xe.55e0b5p-4 ,
0xe.4aa5908p-4 ,
0xe.3f4729p-4 ,
0xe.33c59a8p-4 ,
0xe.2821008p-4 ,
0xe.1c5979p-4 ,
0xe.106f2p-4 ,
0xe.0462138p-4 ,
0xd.f83271p-4 ,
0xd.ebe0568p-4 ,
0xd.df6be28p-4 ,
0xd.d2d534p-4 ,
0xd.c61c698p-4 ,
0xd.b941a28p-4 ,
0xd.ac44ff8p-4 ,
0xd.9f269f8p-4 ,
0xd.91e6a38p-4 ,
0xd.84852cp-4 ,
0xd.77025a8p-4 ,
0xd.695e4fp-4 ,
0xd.5b992c8p-4 ,
0xd.4db3148p-4 ,
0xd.3fac298p-4 ,
0xd.31848d8p-4 ,
0xd.233c64p-4 ,
0xd.14d3d08p-4 ,
0xd.064af58p-4 ,
0xc.f7a1f8p-4 ,
0xc.e8d8fbp-4 ,
0xc.d9f024p-4 ,
0xc.cae7978p-4 ,
0xc.bbbf7a8p-4 ,
0xc.ac77f28p-4 ,
0xc.9d1125p-4 ,
0xc.8d8b38p-4 ,
0xc.7de652p-4 ,
0xc.6e22998p-4 ,
0xc.5e40358p-4 ,
0xc.4e3f4d8p-4 ,
0xc.3e2008p-4 ,
0xc.2de28d8p-4 ,
0xc.1d8706p-4 ,
0xc.0d0d9ap-4 ,
0xb.fc7672p-4 ,
0xb.ebc1b68p-4 ,
0xb.daef918p-4 ,
0xb.ca002cp-4 ,
0xb.b8f3af8p-4 ,
0xb.a7ca47p-4 ,
0xb.96841cp-4 ,
0xb.85215ap-4 ,
0xb.73a22a8p-4 ,
0xb.6206bap-4 ,
#pragma empty_line
0xc.90fdaap-4 ,
0xc.90f87fp-4 ,
0xc.90e8fe8p-4 ,
0xc.90cf28p-4 ,
0xc.90aafcp-4 ,
0xc.907c7a8p-4 ,
0xc.9043a4p-4 ,
0xc.9000788p-4 ,
0xc.8fb2f88p-4 ,
0xc.8f5b25p-4 ,
0xc.8ef8fd8p-4 ,
0xc.8e8c838p-4 ,
0xc.8e15b7p-4 ,
0xc.8d94998p-4 ,
0xc.8d092a8p-4 ,
0xc.8c736cp-4 ,
0xc.8bd35ep-4 ,
0xc.8b2902p-4 ,
0xc.8a74588p-4 ,
0xc.89b563p-4 ,
0xc.88ec228p-4 ,
0xc.881898p-4 ,
0xc.873ac5p-4 ,
0xc.8652aa8p-4 ,
0xc.8560498p-4 ,
0xc.8463a48p-4 ,
0xc.835cbcp-4 ,
0xc.824b918p-4 ,
0xc.813027p-4 ,
0xc.800a7e8p-4 ,
0xc.7eda988p-4 ,
0xc.7da078p-4 ,
0xc.7c5c1ep-4 ,
0xc.7b0d8dp-4 ,
0xc.79b4c68p-4 ,
0xc.7851cc8p-4 ,
0xc.76e4a1p-4 ,
0xc.756d468p-4 ,
0xc.73ebbfp-4 ,
0xc.72600c8p-4 ,
0xc.70ca318p-4 ,
0xc.6f2a3p-4 ,
0xc.6d800bp-4 ,
0xc.6bcbc48p-4 ,
0xc.6a0d5fp-4 ,
0xc.6844dd8p-4 ,
0xc.6672428p-4 ,
0xc.64959p-4 ,
0xc.62aecap-4 ,
0xc.60bdf2p-4 ,
0xc.5ec30cp-4 ,
0xc.5cbe1a8p-4 ,
0xc.5aaf2p-4 ,
0xc.58962p-4 ,
0xc.56731ep-4 ,
0xc.54461c8p-4 ,
0xc.520f1e8p-4 ,
0xc.4fce28p-4 ,
0xc.4d833c8p-4 ,
0xc.4b2e5e8p-4 ,
0xc.48cf918p-4 ,
0xc.4666dap-4 ,
0xc.43f43a8p-4 ,
0xc.4177b7p-4 ,
0xc.3ef1538p-4 ,
0xc.3c6113p-4 ,
0xc.39c6fap-4 ,
0xc.37230cp-4 ,
0xc.34754dp-4 ,
0xc.31bdc1p-4 ,
0xc.2efc6b8p-4 ,
0xc.2c31518p-4 ,
0xc.295c76p-4 ,
0xc.267dde8p-4 ,
0xc.23958ep-4 ,
0xc.20a389p-4 ,
0xc.1da7d48p-4 ,
0xc.1aa275p-4 ,
0xc.17936ep-4 ,
0xc.147ac48p-4 ,
0xc.11587dp-4 ,
0xc.0e2c9cp-4 ,
0xc.0af7268p-4 ,
0xc.07b8218p-4 ,
0xc.046f91p-4 ,
0xc.011d7ap-4 ,
0xb.fdc1e18p-4 ,
0xb.fa5ccdp-4 ,
0xb.f6ee41p-4 ,
0xb.f376428p-4 ,
0xb.eff4d68p-4 ,
0xb.ec6a028p-4 ,
0xb.e8d5cbp-4 ,
0xb.e538368p-4 ,
0xb.e191498p-4 ,
0xb.dde1098p-4 ,
0xb.da277cp-4 ,
0xb.d664a6p-4 ,
0xb.d2988ep-4 ,
0xb.cec3388p-4 ,
0xb.cae4acp-4 ,
0xb.c6fceep-4 ,
0xb.c30c04p-4 ,
0xb.bf11f38p-4 ,
0xb.bb0ec3p-4 ,
0xb.b70278p-4 ,
0xb.b2ed19p-4 ,
0xb.aeceabp-4 ,
0xb.aaa735p-4 ,
0xb.a676bc8p-4 ,
0xb.a23d48p-4 ,
0xb.9dfaddp-4 ,
0xb.99af83p-4 ,
0xb.955b3fp-4 ,
0xb.90fe188p-4 ,
0xb.8c9815p-4 ,
0xb.88293b8p-4 ,
0xb.83b1928p-4 ,
0xb.7f312p-4 ,
0xb.7aa7ebp-4 ,
0xb.7615fap-4 ,
0xb.717b54p-4 ,
0xb.6cd7ffp-4 ,
0xb.682c03p-4 ,
0xb.637766p-4 ,
0xb.5eba2e8p-4 ,
0xb.59f4648p-4 ,
0xb.55260e8p-4 ,
};
#pragma empty_line
static const ap_fixed< 23 , 1 > sin_cos_K1 [ 256 ] = {
-0x4.p-24 ,
-0x1.3bdcp-8 ,
-0x2.77a8p-8 ,
-0x3.b36cp-8 ,
-0x4.ef38p-8 ,
-0x6.2ae4p-8 ,
-0x7.668cp-8 ,
-0x8.a21cp-8 ,
-0x9.dda8p-8 ,
-0xb.190cp-8 ,
-0xc.5454p-8 ,
-0xd.8f7cp-8 ,
-0xe.ca84p-8 ,
-0x1.00568p-4 ,
-0x1.1402cp-4 ,
-0x1.27acp-4 ,
-0x1.3b524p-4 ,
-0x1.4ef54p-4 ,
-0x1.62964p-4 ,
-0x1.76328p-4 ,
-0x1.89cbcp-4 ,
-0x1.9d614p-4 ,
-0x1.b0f28p-4 ,
-0x1.c47f4p-4 ,
-0x1.d8084p-4 ,
-0x1.eb8ccp-4 ,
-0x1.ff0c4p-4 ,
-0x2.1286cp-4 ,
-0x2.25fc8p-4 ,
-0x2.396c8p-4 ,
-0x2.4cd74p-4 ,
-0x2.603cp-4 ,
-0x2.739bp-4 ,
-0x2.86f4cp-4 ,
-0x2.9a47p-4 ,
-0x2.ad934p-4 ,
-0x2.c0d9cp-4 ,
-0x2.d4184p-4 ,
-0x2.e751p-4 ,
-0x2.fa81p-4 ,
-0x3.0dab4p-4 ,
-0x3.20cdp-4 ,
-0x3.33e74p-4 ,
-0x3.46fap-4 ,
-0x3.5a048p-4 ,
-0x3.6d064p-4 ,
-0x3.7fffcp-4 ,
-0x3.92f0cp-4 ,
-0x3.a5d8cp-4 ,
-0x3.b8b78p-4 ,
-0x3.cb8d4p-4 ,
-0x3.de5acp-4 ,
-0x3.f11ccp-4 ,
-0x4.03d7p-4 ,
-0x4.1685cp-4 ,
-0x4.292cp-4 ,
-0x4.3bc64p-4 ,
-0x4.4e56cp-4 ,
-0x4.60ddp-4 ,
-0x4.73588p-4 ,
-0x4.85c88p-4 ,
-0x4.982dp-4 ,
-0x4.aa86cp-4 ,
-0x4.bcd5cp-4 ,
-0x4.cf174p-4 ,
-0x4.e14ecp-4 ,
-0x4.f3794p-4 ,
-0x5.05974p-4 ,
-0x5.17aap-4 ,
-0x5.29aecp-4 ,
-0x5.3ba84p-4 ,
-0x5.4d938p-4 ,
-0x5.5f728p-4 ,
-0x5.7143cp-4 ,
-0x5.83074p-4 ,
-0x5.94bep-4 ,
-0x5.a6664p-4 ,
-0x5.b800cp-4 ,
-0x5.c98ep-4 ,
-0x5.db0bcp-4 ,
-0x5.ec7cp-4 ,
-0x5.fddd4p-4 ,
-0x6.0f3p-4 ,
-0x6.20738p-4 ,
-0x6.31a7cp-4 ,
-0x6.42cccp-4 ,
-0x6.53e2cp-4 ,
-0x6.64e8cp-4 ,
-0x6.75de4p-4 ,
-0x6.86c54p-4 ,
-0x6.979bp-4 ,
-0x6.a861p-4 ,
-0x6.b9164p-4 ,
-0x6.c9bcp-4 ,
-0x6.da4f8p-4 ,
-0x6.ead2cp-4 ,
-0x6.fb44cp-4 ,
-0x7.0ba68p-4 ,
-0x7.1bf5cp-4 ,
-0x7.2c338p-4 ,
-0x7.3c608p-4 ,
-0x7.4c7acp-4 ,
-0x7.5c84p-4 ,
-0x7.6c798p-4 ,
-0x7.7c5d4p-4 ,
-0x7.8c2ecp-4 ,
-0x7.9beep-4 ,
-0x7.ab9a4p-4 ,
-0x7.bb338p-4 ,
-0x7.cab94p-4 ,
-0x7.da2c8p-4 ,
-0x7.e98bcp-4 ,
-0x7.f8d7cp-4 ,
-0x8.0810cp-4 ,
-0x8.1734cp-4 ,
-0x8.26458p-4 ,
-0x8.3541cp-4 ,
-0x8.442a4p-4 ,
-0x8.52fe4p-4 ,
-0x8.61bd4p-4 ,
-0x8.70684p-4 ,
-0x8.7efe4p-4 ,
-0x8.8d7e4p-4 ,
-0x8.9beap-4 ,
-0x8.aa40cp-4 ,
-0x8.b882cp-4 ,
-0x8.c6adp-4 ,
-0x8.d4c34p-4 ,
#pragma empty_line
0x8.p-24 ,
-0x5.2a8p-12 ,
-0xa.56p-12 ,
-0xf.81p-12 ,
-0x1.4acp-8 ,
-0x1.9d64p-8 ,
-0x1.f014p-8 ,
-0x2.42b4p-8 ,
-0x2.955p-8 ,
-0x2.e7f4p-8 ,
-0x3.3a84p-8 ,
-0x3.8d18p-8 ,
-0x3.dfa8p-8 ,
-0x4.3238p-8 ,
-0x4.84b4p-8 ,
-0x4.d734p-8 ,
-0x5.29a8p-8 ,
-0x5.7c14p-8 ,
-0x5.ce74p-8 ,
-0x6.20dp-8 ,
-0x6.7328p-8 ,
-0x6.c574p-8 ,
-0x7.17bcp-8 ,
-0x7.69fp-8 ,
-0x7.bc18p-8 ,
-0x8.0e4p-8 ,
-0x8.6054p-8 ,
-0x8.b254p-8 ,
-0x9.044cp-8 ,
-0x9.564p-8 ,
-0x9.a814p-8 ,
-0x9.f9e8p-8 ,
-0xa.4ba8p-8 ,
-0xa.9d64p-8 ,
-0xa.ef08p-8 ,
-0xb.4098p-8 ,
-0xb.9218p-8 ,
-0xb.e39p-8 ,
-0xc.34f4p-8 ,
-0xc.8644p-8 ,
-0xc.d78p-8 ,
-0xd.28a4p-8 ,
-0xd.79bcp-8 ,
-0xd.cab8p-8 ,
-0xe.1bap-8 ,
-0xe.6c7cp-8 ,
-0xe.bd4p-8 ,
-0xf.0de4p-8 ,
-0xf.5e7cp-8 ,
-0xf.aef4p-8 ,
-0xf.ff64p-8 ,
-0x1.04fb8p-4 ,
-0x1.09fecp-4 ,
-0x1.0f00cp-4 ,
-0x1.1401cp-4 ,
-0x1.19008p-4 ,
-0x1.1dfdp-4 ,
-0x1.22f88p-4 ,
-0x1.27f38p-4 ,
-0x1.2ceb8p-4 ,
-0x1.31e14p-4 ,
-0x1.36d6cp-4 ,
-0x1.3bc94p-4 ,
-0x1.40ba4p-4 ,
-0x1.45a9cp-4 ,
-0x1.4a968p-4 ,
-0x1.4f82p-4 ,
-0x1.546b8p-4 ,
-0x1.59538p-4 ,
-0x1.5e39p-4 ,
-0x1.631c4p-4 ,
-0x1.67fep-4 ,
-0x1.6cdccp-4 ,
-0x1.71bb4p-4 ,
-0x1.7696p-4 ,
-0x1.7b6e4p-4 ,
-0x1.8045p-4 ,
-0x1.851bp-4 ,
-0x1.89ed4p-4 ,
-0x1.8ebd8p-4 ,
-0x1.938bp-4 ,
-0x1.9856p-4 ,
-0x1.9d1fp-4 ,
-0x1.a1e6cp-4 ,
-0x1.a6abp-4 ,
-0x1.ab6c4p-4 ,
-0x1.b02b8p-4 ,
-0x1.b4e9p-4 ,
-0x1.b9a38p-4 ,
-0x1.be5cp-4 ,
-0x1.c310cp-4 ,
-0x1.c7c3cp-4 ,
-0x1.cc734p-4 ,
-0x1.d1214p-4 ,
-0x1.d5cc4p-4 ,
-0x1.da748p-4 ,
-0x1.df19cp-4 ,
-0x1.e3bc4p-4 ,
-0x1.e85c4p-4 ,
-0x1.ecf8cp-4 ,
-0x1.f1938p-4 ,
-0x1.f62acp-4 ,
-0x1.fabfcp-4 ,
-0x1.ff51p-4 ,
-0x2.03df8p-4 ,
-0x2.086bp-4 ,
-0x2.0cf48p-4 ,
-0x2.117ap-4 ,
-0x2.15fdp-4 ,
-0x2.1a7c4p-4 ,
-0x2.1ef9p-4 ,
-0x2.2371cp-4 ,
-0x2.27e84p-4 ,
-0x2.2c5bp-4 ,
-0x2.30cb4p-4 ,
-0x2.3537cp-4 ,
-0x2.39a14p-4 ,
-0x2.3e088p-4 ,
-0x2.426b4p-4 ,
-0x2.46cacp-4 ,
-0x2.4b268p-4 ,
-0x2.4f7fcp-4 ,
-0x2.53d5p-4 ,
-0x2.58274p-4 ,
-0x2.5c764p-4 ,
-0x2.60c0cp-4 ,
-0x2.6509p-4 ,
-0x2.694d4p-4 ,
};
#pragma empty_line
static const ap_fixed< 15 , 0 > sin_cos_K2 [ 256 ] = {
-0x4.ef2p-4 ,
-0x4.efp-4 ,
-0x4.ef2p-4 ,
-0x4.efp-4 ,
-0x4.eeap-4 ,
-0x4.eeap-4 ,
-0x4.ee4p-4 ,
-0x4.ee2p-4 ,
-0x4.ed4p-4 ,
-0x4.ecep-4 ,
-0x4.ec8p-4 ,
-0x4.ec2p-4 ,
-0x4.ebap-4 ,
-0x4.ebp-4 ,
-0x4.ea4p-4 ,
-0x4.e98p-4 ,
-0x4.e8ep-4 ,
-0x4.e84p-4 ,
-0x4.e7p-4 ,
-0x4.e64p-4 ,
-0x4.e54p-4 ,
-0x4.e42p-4 ,
-0x4.e34p-4 ,
-0x4.e24p-4 ,
-0x4.e1p-4 ,
-0x4.dfcp-4 ,
-0x4.de8p-4 ,
-0x4.dd6p-4 ,
-0x4.dbep-4 ,
-0x4.da8p-4 ,
-0x4.d92p-4 ,
-0x4.d7cp-4 ,
-0x4.d66p-4 ,
-0x4.d48p-4 ,
-0x4.d32p-4 ,
-0x4.d1ap-4 ,
-0x4.cfap-4 ,
-0x4.ce2p-4 ,
-0x4.ccp-4 ,
-0x4.caap-4 ,
-0x4.c86p-4 ,
-0x4.c68p-4 ,
-0x4.c4ap-4 ,
-0x4.c28p-4 ,
-0x4.c04p-4 ,
-0x4.be4p-4 ,
-0x4.bc2p-4 ,
-0x4.b9ep-4 ,
-0x4.b7cp-4 ,
-0x4.b5ap-4 ,
-0x4.b36p-4 ,
-0x4.b0ap-4 ,
-0x4.aeap-4 ,
-0x4.abcp-4 ,
-0x4.a98p-4 ,
-0x4.a68p-4 ,
-0x4.a44p-4 ,
-0x4.a1ap-4 ,
-0x4.9ecp-4 ,
-0x4.9bep-4 ,
-0x4.994p-4 ,
-0x4.96ap-4 ,
-0x4.93cp-4 ,
-0x4.908p-4 ,
-0x4.8ep-4 ,
-0x4.8a8p-4 ,
-0x4.878p-4 ,
-0x4.84ap-4 ,
-0x4.812p-4 ,
-0x4.7e4p-4 ,
-0x4.7aap-4 ,
-0x4.77ap-4 ,
-0x4.744p-4 ,
-0x4.70ep-4 ,
-0x4.6dcp-4 ,
-0x4.6a2p-4 ,
-0x4.66cp-4 ,
-0x4.636p-4 ,
-0x4.5f8p-4 ,
-0x4.5c2p-4 ,
-0x4.586p-4 ,
-0x4.54ap-4 ,
-0x4.50cp-4 ,
-0x4.4dp-4 ,
-0x4.494p-4 ,
-0x4.456p-4 ,
-0x4.416p-4 ,
-0x4.3d6p-4 ,
-0x4.39cp-4 ,
-0x4.356p-4 ,
-0x4.318p-4 ,
-0x4.2d6p-4 ,
-0x4.296p-4 ,
-0x4.24ep-4 ,
-0x4.20ep-4 ,
-0x4.1cap-4 ,
-0x4.188p-4 ,
-0x4.13cp-4 ,
-0x4.0f8p-4 ,
-0x4.0b4p-4 ,
-0x4.06ap-4 ,
-0x4.022p-4 ,
-0x3.fd4p-4 ,
-0x3.f9p-4 ,
-0x3.f4ap-4 ,
-0x3.fp-4 ,
-0x3.eb2p-4 ,
-0x3.e66p-4 ,
-0x3.e1ap-4 ,
-0x3.ddp-4 ,
-0x3.d7ep-4 ,
-0x3.d32p-4 ,
-0x3.ce4p-4 ,
-0x3.c92p-4 ,
-0x3.c46p-4 ,
-0x3.bf2p-4 ,
-0x3.ba4p-4 ,
-0x3.b5p-4 ,
-0x3.afep-4 ,
-0x3.aacp-4 ,
-0x3.a56p-4 ,
-0x3.ap-4 ,
-0x3.9b2p-4 ,
-0x3.95ep-4 ,
-0x3.904p-4 ,
-0x3.8a8p-4 ,
-0x3.85cp-4 ,
-0x3.802p-4 ,
#pragma empty_line
-0x1.4bp-4 ,
-0x1.4aep-4 ,
-0x1.4aap-4 ,
-0x1.4a8p-4 ,
-0x1.4a6p-4 ,
-0x1.4aap-4 ,
-0x1.4a4p-4 ,
-0x1.4a6p-4 ,
-0x1.4a6p-4 ,
-0x1.4a4p-4 ,
-0x1.4a6p-4 ,
-0x1.4a6p-4 ,
-0x1.4a2p-4 ,
-0x1.4ap-4 ,
-0x1.4ap-4 ,
-0x1.49ep-4 ,
-0x1.49cp-4 ,
-0x1.49cp-4 ,
-0x1.49cp-4 ,
-0x1.49ap-4 ,
-0x1.496p-4 ,
-0x1.492p-4 ,
-0x1.48cp-4 ,
-0x1.48cp-4 ,
-0x1.488p-4 ,
-0x1.482p-4 ,
-0x1.48p-4 ,
-0x1.48p-4 ,
-0x1.47cp-4 ,
-0x1.478p-4 ,
-0x1.478p-4 ,
-0x1.474p-4 ,
-0x1.47p-4 ,
-0x1.468p-4 ,
-0x1.464p-4 ,
-0x1.462p-4 ,
-0x1.45ep-4 ,
-0x1.456p-4 ,
-0x1.45p-4 ,
-0x1.44ap-4 ,
-0x1.446p-4 ,
-0x1.442p-4 ,
-0x1.43cp-4 ,
-0x1.43ap-4 ,
-0x1.436p-4 ,
-0x1.42ep-4 ,
-0x1.42ap-4 ,
-0x1.426p-4 ,
-0x1.422p-4 ,
-0x1.41ep-4 ,
-0x1.414p-4 ,
-0x1.40ep-4 ,
-0x1.40ap-4 ,
-0x1.402p-4 ,
-0x1.3f8p-4 ,
-0x1.3f4p-4 ,
-0x1.3f2p-4 ,
-0x1.3ecp-4 ,
-0x1.3dcp-4 ,
-0x1.3d8p-4 ,
-0x1.3d6p-4 ,
-0x1.3c8p-4 ,
-0x1.3c4p-4 ,
-0x1.3bcp-4 ,
-0x1.3b4p-4 ,
-0x1.3bp-4 ,
-0x1.3a8p-4 ,
-0x1.3ap-4 ,
-0x1.394p-4 ,
-0x1.38ep-4 ,
-0x1.386p-4 ,
-0x1.37ep-4 ,
-0x1.37ap-4 ,
-0x1.368p-4 ,
-0x1.364p-4 ,
-0x1.36p-4 ,
-0x1.358p-4 ,
-0x1.344p-4 ,
-0x1.33cp-4 ,
-0x1.332p-4 ,
-0x1.32cp-4 ,
-0x1.326p-4 ,
-0x1.31ep-4 ,
-0x1.30cp-4 ,
-0x1.304p-4 ,
-0x1.3p-4 ,
-0x1.2f6p-4 ,
-0x1.2e8p-4 ,
-0x1.2ep-4 ,
-0x1.2dp-4 ,
-0x1.2ccp-4 ,
-0x1.2cp-4 ,
-0x1.2b8p-4 ,
-0x1.2aap-4 ,
-0x1.29ep-4 ,
-0x1.292p-4 ,
-0x1.28ap-4 ,
-0x1.27ep-4 ,
-0x1.274p-4 ,
-0x1.26cp-4 ,
-0x1.25cp-4 ,
-0x1.254p-4 ,
-0x1.244p-4 ,
-0x1.23ap-4 ,
-0x1.23p-4 ,
-0x1.226p-4 ,
-0x1.214p-4 ,
-0x1.208p-4 ,
-0x1.1fap-4 ,
-0x1.1f2p-4 ,
-0x1.1e4p-4 ,
-0x1.1dap-4 ,
-0x1.1cep-4 ,
-0x1.1c2p-4 ,
-0x1.1b4p-4 ,
-0x1.1a8p-4 ,
-0x1.19cp-4 ,
-0x1.186p-4 ,
-0x1.17ap-4 ,
-0x1.16ep-4 ,
-0x1.166p-4 ,
-0x1.156p-4 ,
-0x1.148p-4 ,
-0x1.13cp-4 ,
-0x1.12cp-4 ,
-0x1.122p-4 ,
-0x1.11p-4 ,
-0x1.104p-4 ,
};
#pragma line 52 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h" 2
#pragma empty_line
namespace hotbm
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int W, int I>
void my_to_float(ap_fixed<W, I> in, float &result, int prescale)
{
#pragma empty_line
fp_struct<float> out;
out.sign[0] = in[in.wl()-1];
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_ufixed<W,I> ain = in;
#pragma empty_line
if(out.__signbit()) {
ain = -in;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
(((W - (((W+15)/16)-1)*16) > 0) ? (void)0 : _assert("rem > 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h", 75));
(((W - (((W+15)/16)-1)*16) <= 16) ? (void)0 : _assert("rem <= 16", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h", 76));
#pragma empty_line
#pragma empty_line
ap_uint<32> out_bits[((W+15)/16)] = {};
for(int i = 0; i < ((W+15)/16)-1; i++) {
out_bits[i](31, 16) = ain(ain.wl()-16*i-1,ain.wl()-16*i-16);
out_bits[i][15] = 1;
}
out_bits[((W+15)/16)-1](31,31-(W - (((W+15)/16)-1)*16)) = ain(ain.wl()-16*(((W+15)/16)-1)-(W - (((W+15)/16)-1)*16));
out_bits[((W+15)/16)-1][31-(W - (((W+15)/16)-1)*16)-1] = 1;
#pragma empty_line
#pragma empty_line
int c[((W+15)/16)];
for(int i = 0; i < ((W+15)/16); i++) {
c[i] = __builtin_clz(out_bits[i].to_uint());
}
#pragma empty_line
int shift = 0;
ap_ufixed<W, I> in_shift = ain;
#pragma empty_line
for(int i = 0; i < ((W+15)/16); i++) {
shift += c[i];
in_shift = in_shift << c[i];
if(c[i] != 16) {
break;
}
}
#pragma empty_line
#pragma empty_line
ap_ufixed<W,1> result_mantissa;
result_mantissa(W-1,0) = in_shift(W-1,0);
#pragma empty_line
#pragma empty_line
out.sig = result_mantissa;
((((int)fp_struct<float>::EXP_BIAS+in_shift.iwl()-prescale-shift)<255) ? (void)0 : _assert("((int)fp_struct<float>::EXP_BIAS+in_shift.iwl()-prescale-shift)<255", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h", 110));
((((int)fp_struct<float>::EXP_BIAS+in_shift.iwl()-prescale-shift)>0) ? (void)0 : _assert("((int)fp_struct<float>::EXP_BIAS+in_shift.iwl()-prescale-shift)>0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h", 111));
out.exp = (in == 0) ? 0 : (fp_struct<float>::EXP_BIAS+in_shift.iwl())-prescale-shift;
#pragma empty_line
result = out.to_ieee();
}
#pragma empty_line
template <int W, int I>
void my_to_float(ap_ufixed<W, I> in, float &result, int prescale)
{
#pragma empty_line
fp_struct<float> out;
out.sign[0] = 0;
ap_ufixed<W,I> ain = in;
#pragma empty_line
#pragma empty_line
#pragma empty_line
(((W - (((W+15)/16)-1)*16) > 0) ? (void)0 : _assert("rem > 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h", 127));
(((W - (((W+15)/16)-1)*16) <= 16) ? (void)0 : _assert("rem <= 16", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h", 128));
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<32> out_bits[((W+15)/16)] = {};
for(int i = 0; i < ((W+15)/16)-1; i++) {
out_bits[i](31, 16) = ain(ain.wl()-16*i-1,
ain.wl()-16*i-16);
out_bits[i][15] = 1;
#pragma empty_line
}
out_bits[((W+15)/16)-1](32-1,32-(W - (((W+15)/16)-1)*16)) = ain(ain.wl()-16*(((W+15)/16)-1)-1,
ain.wl()-16*(((W+15)/16)-1)-(W - (((W+15)/16)-1)*16));
out_bits[((W+15)/16)-1][32-(W - (((W+15)/16)-1)*16)-1] = 1;
#pragma empty_line
#pragma empty_line
#pragma empty_line
int c[((W+15)/16)];
for(int i = 0; i < ((W+15)/16); i++) {
c[i] = __builtin_clz(out_bits[i].to_uint());
#pragma empty_line
}
#pragma empty_line
int shift = 0;
ap_fixed<W, I> in_shift = ain;
#pragma empty_line
for(int i = 0; i < ((W+15)/16); i++) {
shift += c[i];
in_shift = in_shift << c[i];
if(c[i] != 16) {
break;
}
}
#pragma empty_line
#pragma empty_line
ap_ufixed<W,1> result_mantissa;
result_mantissa(W-1,0) = in_shift(W-1,0);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
out.set_mantissa(result_mantissa);
#pragma empty_line
out.exp = (in == 0) ? 0 : (fp_struct<float>::EXP_BIAS+in_shift.iwl()-1)-prescale-shift;
#pragma empty_line
result = out.to_ieee();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int Z, int W, int I>
unsigned int clz(ap_ufixed<W,I> x)
{
ap_uint<Z+1> t;
t(Z,1) = x(x.wl()-1,x.wl()-Z);
t[0] = 1;
#pragma empty_line
return t.countLeadingZeros();
}
#pragma line 212 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
template<int p1, class T, int W_dout, int W_Mx>
void
range_redux_payne_hanek_hotbm(
T din,
ap_uint<3> &k,
ap_ufixed<W_dout, 0> &dout,
ap_ufixed<W_Mx, 0> &Mx,
ap_int<fp_struct<T>::EXP_BITS> &Ex)
{
const int SB = fp_struct<T>::SIG_BITS;
#pragma empty_line
fp_struct<T> fps1(din);
int expv = fps1.expv();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_ufixed<3*(SB+1)+p1+3,SB+1+3> h_fixed;
#pragma empty_line
bool closepath = ((fps1.exp) < fp_struct<T>::EXP_BIAS-1);
#pragma empty_line
if(closepath) {
Ex = expv+2;
expv = -2;
} else {
Ex = 0;
}
#pragma empty_line
{
ap_uint<SB+1> X;
ap_uint<2*(SB+1)+p1+3> Med;
ap_uint<3*(SB+1)+p1+3> h;
#pragma empty_line
X(fp_struct<T>::SIG_BITS-1,0) = fps1.sig(fp_struct<T>::SIG_BITS-1,0);
X[fp_struct<T>::SIG_BITS] = 1;
#pragma empty_line
Med = table_lookup_4oPi<SB,p1>(expv,din);
#pragma empty_line
big_mult(Med, X, h);
#pragma empty_line
h_fixed(h_fixed.wl()-1, 0) = h(h_fixed.wl()-1, 0);
#pragma line 262 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
}
#pragma empty_line
ap_ufixed<W_Mx+18, 0> Mx_bits = h_fixed;
#pragma empty_line
if(closepath) {
k = 0;
} else {
k = h_fixed;
}
#pragma empty_line
#pragma empty_line
if(k[0] == 1) {
Mx_bits = 1-Mx_bits;
}
#pragma empty_line
ap_uint<5> Mx_zeros = clz<18>(Mx_bits);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
Mx = ap_ufixed<W_Mx, 0,AP_RND>(Mx_bits << Mx_zeros);
Ex -= Mx_zeros;
#pragma empty_line
dout = ap_ufixed<W_dout, 0, AP_RND>(Mx << Ex);
#pragma line 297 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
}
#pragma line 323 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
template<int p1, class T, int W_dout, int W_Mx>
void
range_redux_payne_hanek_hotbm_pi(
T din,
ap_uint<3> &k,
ap_ufixed<W_dout, 0> &dout,
ap_ufixed<W_Mx, 0> &Mx,
ap_int<fp_struct<T>::EXP_BITS> &Ex,
int &exactly_pi_over_2)
{
const int SB = fp_struct<T>::SIG_BITS;
#pragma empty_line
fp_struct<T> fps1(din);
int expv = fps1.expv();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_ufixed<3*(SB+1)+p1+3,SB+1+3> h_fixed;
#pragma empty_line
bool closepath = ((fps1.exp) < fp_struct<T>::EXP_BIAS-3);
#pragma empty_line
if(closepath) {
Ex = expv+4;
expv = -4;
} else {
Ex = 0;
}
#pragma empty_line
{
ap_uint<SB+1> X;
ap_uint<2*(SB+1)+p1+3> Med;
ap_uint<3*(SB+1)+p1+3> h;
#pragma empty_line
X(fp_struct<T>::SIG_BITS-1,0) = fps1.sig(fp_struct<T>::SIG_BITS-1,0);
X[fp_struct<T>::SIG_BITS] = 1;
#pragma empty_line
h = X;
h <<= SB+p1+2;
h <<= 2;
h <<= expv;
#pragma empty_line
#pragma empty_line
h_fixed(h_fixed.wl()-1, 0) = h(h_fixed.wl()-1, 0);
#pragma line 376 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
}
#pragma empty_line
ap_ufixed<W_Mx+18, 1> Mx_bits_extended = h_fixed;
exactly_pi_over_2 = (Mx_bits_extended == 1);
#pragma empty_line
ap_ufixed<W_Mx+18, 0> Mx_bits = h_fixed;
#pragma empty_line
if(closepath) {
k = 0;
} else {
k = h_fixed;
}
#pragma empty_line
#pragma empty_line
if(k[0] == 1) {
Mx_bits = 1-Mx_bits;
}
#pragma empty_line
ap_uint<5> Mx_zeros = clz<18>(Mx_bits);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
Mx = ap_ufixed<W_Mx, 0,AP_RND>(Mx_bits << Mx_zeros);
Ex -= Mx_zeros;
#pragma empty_line
dout = ap_ufixed<W_dout, 0, AP_RND>(Mx << Ex);
#pragma line 414 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
}
#pragma empty_line
static
void sincosf(
float t_in,
float *s,
float *c)
{
const int g = 7;
const int p1 = 20;
#pragma empty_line
const int alpha = 7;
const int beta1 = 7;
const int beta2 = 15;
#pragma empty_line
const bool swap_table[8] = {0,1,1,0,0,1,1,0};
const bool neg_sin_table[16] = {0,0,1,0,1,1,0,1, 1,0,1,1,0,1,0,0};
const bool neg_cos_table[16] = {0,0,0,1,1,1,1,0, 0,1,1,1,1,0,0,0};
#pragma HLS array_partition variable=swap_table complete
#pragma HLS array_partition variable=neg_sin_table complete
#pragma HLS array_partition variable=neg_cos_table complete
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma HLS RESOURCE variable=cos_K0 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=cos_K1 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=cos_K2 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_K0 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_K1 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_K2 core=ROM_1P_LUTRAM
#pragma empty_line
fp_struct<float> din(t_in);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<3> k;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 0> x;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 0> Mx;
ap_int<fp_struct<float>::EXP_BITS> Ex;
#pragma empty_line
range_redux_payne_hanek_hotbm<p1,float>(t_in,k,x,Mx,Ex);
#pragma empty_line
ap_uint<alpha> A = x(x.wl()-x.iwl()-1,
x.wl()-x.iwl()-alpha);
ap_ufixed<fp_struct<float>::SIG_BITS+1+g-alpha-beta1, -alpha> B = x;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g-alpha-beta2, -alpha> B_trunc = B;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g-2*alpha, -2*alpha> B_squared = B_trunc*B_trunc;
#pragma line 473 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 1> cos_t1 = cos_K0[A];
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 1> cos_t2 = B*cos_K1[A];
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 1> cos_t3 = B_squared*cos_K2[A];
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 1> cos_result =
1-(cos_t1+cos_t2+cos_t3);
float cos_resultf;
my_to_float(cos_result, cos_resultf, 0);
fp_struct<float> cos_results(cos_resultf);
#pragma empty_line
ap_fixed<fp_struct<float>::SIG_BITS+1+g, 1> sin_t1 = sin_K0[A];
ap_fixed<fp_struct<float>::SIG_BITS+1+g, 1> sin_t2 = B*sin_K1[A];
ap_fixed<fp_struct<float>::SIG_BITS+1+g, 1> sin_t3 = B_squared*sin_K2[A];
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 1> sin_result =
(sin_t1 + sin_t2 + sin_t3) * Mx;
float sin_resultf;
my_to_float(sin_result, sin_resultf, -Ex);
fp_struct<float> sin_results(sin_resultf);
#pragma line 508 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
ap_uint<4> index = k;
index[3] = din.sign;
#pragma empty_line
if(neg_sin_table[index]) { sin_results.sign = 1; }
if(neg_cos_table[index]) { cos_results.sign = 1; }
#pragma empty_line
float s_out, c_out;
if(din.exp == 0 && din.sig == 0) {
s_out = copysignf(0.0f, t_in);
c_out = 1.0f;
} else if(::hls::__isinf(t_in) || ::hls::__isnan(t_in)) {
s_out = ::hls::nan("");
c_out = ::hls::nan("");
} else {
if(swap_table[k]) {
s_out = cos_results.to_ieee();
c_out = sin_results.to_ieee();
} else {
s_out = sin_results.to_ieee();
c_out = cos_results.to_ieee();
}
}
*s = s_out;
*c = c_out;
}
#pragma empty_line
static
float
sinf_or_cosf(float t_in, bool do_cos, bool do_pi)
{
const int g = 7;
const int p1 = 20;
#pragma empty_line
const int alpha = 7;
const int beta1 = 7;
const int beta2 = 15;
#pragma empty_line
const bool swap_table[8] = {0,1,1,0,0,1,1,0};
const bool neg_sin_table[16] = {0,0,1,0,1,1,0,1, 1,0,1,1,0,1,0,0};
const bool neg_cos_table[16] = {0,0,0,1,1,1,1,0, 0,1,1,1,1,0,0,0};
#pragma HLS array_partition variable=swap_table complete
#pragma HLS array_partition variable=neg_sin_table complete
#pragma HLS array_partition variable=neg_cos_table complete
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma HLS RESOURCE variable=sin_cos_K0 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_cos_K1 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_cos_K2 core=ROM_1P_LUTRAM
#pragma empty_line
fp_struct<float> din(t_in);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<3> k;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 0> x;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 0> Mx;
ap_int<fp_struct<float>::EXP_BITS> Ex;
#pragma empty_line
int exactly_pi_over_2 = 0;
if(do_pi) {
range_redux_payne_hanek_hotbm_pi<p1,float>(t_in,k,x,Mx,Ex,exactly_pi_over_2);
} else {
range_redux_payne_hanek_hotbm<p1,float>(t_in,k,x,Mx,Ex);
}
ap_uint<alpha+1> A = x(x.wl()-x.iwl()-1,
x.wl()-x.iwl()-alpha);
ap_ufixed<fp_struct<float>::SIG_BITS+1+g-alpha-beta1, -alpha> B = x;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g-alpha-beta2, -alpha> B_trunc = B;
ap_ufixed<fp_struct<float>::SIG_BITS+1+g-2*alpha, -2*alpha> B_squared = B_trunc*B_trunc;
#pragma line 590 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
bool cos_basis = do_cos?!swap_table[k]: swap_table[k];
bool sin_basis = do_cos? swap_table[k]:!swap_table[k];
#pragma empty_line
A[alpha] = sin_basis;
#pragma empty_line
if(cos_basis) {
#pragma empty_line
#pragma empty_line
Mx = ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 0, AP_RND, AP_SAT>(1);
Ex = 0;
}
#pragma empty_line
ap_fixed<fp_struct<float>::SIG_BITS+1+g, 1> t1 = sin_cos_K0[A];
ap_fixed<fp_struct<float>::SIG_BITS+1+g, 1> t2 = B*sin_cos_K1[A];
ap_fixed<fp_struct<float>::SIG_BITS+1+g, 1> t3 = B_squared*sin_cos_K2[A];
ap_ufixed<fp_struct<float>::SIG_BITS+1+g, 1> result =
(t1+t2+t3) * Mx;
float resultf;
if(exactly_pi_over_2) {
resultf = 0.70710678118;
} else {
my_to_float(result, resultf, -Ex);
}
fp_struct<float> results(resultf);
#pragma line 629 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
ap_uint<4> index = k;
index[3] = din.sign;
if(cos_basis ? neg_cos_table[index] : neg_sin_table[index]) {
results.sign = 1;
}
#pragma empty_line
if(din.exp == 0 && (do_pi ? 1 : din.sig == 0)) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
return do_cos ? 1.0f : copysignf(0.0f, t_in);
} else if(::hls::__isinf(t_in) || ::hls::__isnan(t_in)) {
return ::hls::nan("");
} else {
return results.to_ieee();
}
}
#pragma empty_line
#pragma empty_line
template<int WO, int WI>
ap_fixed<WO,2>
sinf_or_cosf(ap_fixed<32, WI> t_in, bool do_cos, bool do_pi)
{
const int g = 7;
#pragma empty_line
#pragma empty_line
const int alpha = 7;
const int beta1 = 7;
const int beta2 = 15;
#pragma empty_line
const bool swap_table[8] = {0,1,1,0,0,1,1,0};
const bool neg_sin_table[16] = {0,0,1,0,1,1,0,1, 1,0,1,1,0,1,0,0};
const bool neg_cos_table[16] = {0,0,0,1,1,1,1,0, 0,1,1,1,1,0,0,0};
#pragma HLS array_partition variable=swap_table complete
#pragma HLS array_partition variable=neg_sin_table complete
#pragma HLS array_partition variable=neg_cos_table complete
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma HLS RESOURCE variable=sin_cos_K0 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_cos_K1 core=ROM_1P_LUTRAM
#pragma HLS RESOURCE variable=sin_cos_K2 core=ROM_1P_LUTRAM
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<3> k;
ap_ufixed<WO+1+g, 0> x;
ap_ufixed<WO+1+g, 0> Mx;
#pragma empty_line
int exactly_pi_over_2 = 0;
bool is_negative = t_in[32-1];
ap_ufixed<32, WI> din = is_negative ? ap_fixed<32, WI>(-t_in) : t_in;
if(do_pi) {
k = din*4;
x = din*4;
ap_ufixed<32, 1> Mx_bits_extended = din*4;
#pragma empty_line
#pragma empty_line
#pragma empty_line
exactly_pi_over_2 = (Mx_bits_extended == 1);
} else {
k = din * ap_ufixed<32,2>(4/3.14159265358979323846);
x = din * ap_ufixed<32,2>(4/3.14159265358979323846);
}
#pragma empty_line
if(k[0] == 1) {
x = 1-x;
}
#pragma empty_line
ap_uint<alpha+1> A = x(x.wl()-x.iwl()-1,
x.wl()-x.iwl()-alpha);
ap_ufixed<WO+1+g-alpha-beta1, -alpha> B = x;
ap_ufixed<WO+1+g-alpha-beta2, -alpha> B_trunc = B;
ap_ufixed<WO+1+g-2*alpha, -2*alpha> B_squared = B_trunc*B_trunc;
#pragma line 716 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
bool cos_basis = do_cos?!swap_table[k]: swap_table[k];
bool sin_basis = do_cos? swap_table[k]:!swap_table[k];
#pragma empty_line
A[alpha] = sin_basis;
#pragma empty_line
if(cos_basis) {
#pragma empty_line
#pragma empty_line
Mx = ap_ufixed<WO+1+g, 0, AP_RND, AP_SAT>(1);
} else {
Mx = x;
}
#pragma empty_line
ap_ufixed<WO+1+g, 1> t1 = sin_cos_K0[A];
ap_fixed<WO+1+g, 1> t2 = B*sin_cos_K1[A];
ap_fixed<WO+1+g, 1> t3 = B_squared*sin_cos_K2[A];
ap_fixed<WO+1+g, 1> result =
(t1+t2+t3) * Mx;
if(exactly_pi_over_2) {
result = 0.70710678118;
}
#pragma line 750 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_hotbm.h"
ap_uint<4> index = k;
index[3] = is_negative;
if(cos_basis ? neg_cos_table[index] : neg_sin_table[index]) {
result = -result;
}
return result;
}
#pragma empty_line
static
float
cosf(float t_in)
{
return sinf_or_cosf(t_in, 1, 0);
}
#pragma empty_line
static
float
sinf(float t_in)
{
return sinf_or_cosf(t_in, 0, 0);
}
#pragma empty_line
static
float
cospif(float t_in)
{
return sinf_or_cosf(t_in, 1, 1);
}
#pragma empty_line
static
float
sinpif(float t_in)
{
return sinf_or_cosf(t_in, 0, 1);
}
#pragma empty_line
#pragma empty_line
template<int WI>
ap_fixed<32,2>
cosf(ap_fixed<32, WI> t_in)
{
return sinf_or_cosf<32>(t_in, 1, 0);
}
template<int WI>
ap_fixed<32,2>
sinf(ap_fixed<32, WI> t_in)
{
return sinf_or_cosf<32>(t_in, 0, 0);
}
#pragma empty_line
template<int WI>
ap_fixed<32,2>
cospif(ap_fixed<32, WI> t_in)
{
return sinf_or_cosf<32>(t_in, 1, 1);
}
template<int WI>
ap_fixed<32,2>
sinpif(ap_fixed<32, WI> t_in)
{
return sinf_or_cosf<32>(t_in, 0, 1);
}
#pragma empty_line
}
#pragma line 508 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma empty_line
static
float
sinf(float t_in)
{
return hotbm::sinf(t_in);
}
#pragma empty_line
static
float
sinpif(float t_in)
{
return hotbm::sinpif(t_in);
}
#pragma empty_line
static
float
sin(float t_in)
{
return sinf(t_in);
}
#pragma empty_line
static
double
sin(double t_in)
{
return cordic::sin(t_in);
}
#pragma empty_line
static
float
cosf(float t_in)
{
return hotbm::cosf(t_in);
}
#pragma empty_line
static
float
cospif(float t_in)
{
return hotbm::cospif(t_in);
}
#pragma empty_line
static
float
cos(float t_in)
{
return cosf(t_in);
}
#pragma empty_line
static
double
cos(double t_in)
{
return cordic::cos(t_in);
}
#pragma empty_line
template<int WI>
ap_fixed<32,2>
cosf(ap_fixed<32, WI> t_in)
{
return hotbm::cosf(t_in);
}
template<int WI>
ap_fixed<32,2>
sinf(ap_fixed<32, WI> t_in)
{
return hotbm::sinf(t_in);
}
#pragma empty_line
template<int WI>
ap_fixed<32,2>
cospif(ap_fixed<32, WI> t_in)
{
return hotbm::cospif(t_in);
}
template<int WI>
ap_fixed<32,2>
sinpif(ap_fixed<32, WI> t_in)
{
return hotbm::sinpif(t_in);
}
#pragma empty_line
template<int WI>
ap_fixed<32,2>
cos(ap_fixed<32, WI> t_in)
{
return hotbm::cosf(t_in);
}
template<int WI>
ap_fixed<32,2>
sin(ap_fixed<32, WI> t_in)
{
return hotbm::sinf(t_in);
}
#pragma empty_line
template<int WI>
ap_fixed<32,2>
cospi(ap_fixed<32, WI> t_in)
{
return hotbm::cospif(t_in);
}
template<int WI>
ap_fixed<32,2>
sinpi(ap_fixed<32, WI> t_in)
{
return hotbm::sinpif(t_in);
}
#pragma empty_line
#pragma empty_line
static
void sincos(double x, double *sin, double *cos)
{
cordic::sincos(x, sin, cos);
}
#pragma empty_line
static
void sincosf(float x, float *sin, float *cos)
{
hotbm::sincosf(x, sin, cos);
}
#pragma empty_line
static
float
atanf(float t_in)
{
return cordic::atanf(t_in);
}
#pragma empty_line
static
double
atan2(double y_in, double x_in)
{
return cordic::atan2(y_in, x_in);
}
#pragma empty_line
static
float
atan2f(float y_in, float x_in)
{
return cordic::atan2f(y_in, x_in);
}
#pragma empty_line
static
float
sinhf(float t_in)
{
return cordic::sinhf(t_in);
}
#pragma empty_line
static
float
coshf(float t_in)
{
return cordic::coshf(t_in);
}
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern "C" {
#pragma empty_line
double _ssdm_op_DRecip(double) __attribute__ ((nothrow));
float _ssdm_op_FRecip(float) __attribute__ ((nothrow));
double _ssdm_op_DRSqrt(double) __attribute__ ((nothrow));
float _ssdm_op_FRSqrt(float) __attribute__ ((nothrow));
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
namespace hls {
#pragma empty_line
static
float
tanf(float t_in)
{
float s_out, c_out;
fp_struct<float> fs = t_in;
if(fs.exp == 0x0) {
#pragma empty_line
return t_in;
} else {
sincosf(t_in, &s_out, &c_out);
return xil_fpo_div_flt(s_out,c_out);
}
}
#pragma empty_line
static
double
tan(double t_in)
{
double s_out, c_out;
fp_struct<double> fs = t_in;
if(fs.exp == 0x0) {
#pragma empty_line
return t_in;
} else {
sincos(t_in, &s_out, &c_out);
return xil_fpo_div_d(s_out,c_out);
}
}
#pragma empty_line
static
float logf(float x)
{
return ::xil_fpo_log_flt(x);
}
#pragma empty_line
#pragma empty_line
static
float log10f(float x)
{
return xil_fpo_mul_flt(logf(x),0.434294481903251827651128918916605082294397005f);
}
#pragma empty_line
static
double log(double x)
{
return ::xil_fpo_log_d(x);
}
#pragma empty_line
#pragma empty_line
static
double log10(double x)
{
return xil_fpo_mul_d(log(x),0.434294481903251827651128918916605082294397005);
}
#pragma line 763 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static
double recip(double x)
{
return xil_fpo_rec_d(x);
}
#pragma empty_line
static
float recipf(float x)
{
return xil_fpo_rec_flt(x);
}
#pragma empty_line
static
double rsqrt(double x)
{
return xil_fpo_recsqrt_d(x);
}
#pragma empty_line
static
float rsqrtf(float x)
{
return xil_fpo_recsqrt_flt(x);
}
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_sqrt.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_sqrt.h"
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
ap_ufixed<W,I> sqrt(ap_ufixed<W,I, _AP_Q, _AP_O> x) {
((I >= 0 && "Number of integer bits for sqrt() must be greater than zero") ? (void)0 : _assert("I >= 0 && \"Number of integer bits for sqrt() must be greater than zero\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_sqrt.h", 41));
((W >= I && "Number of integer bits for sqrt() must be less than or equal to total width") ? (void)0 : _assert("W >= I && \"Number of integer bits for sqrt() must be less than or equal to total width\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_sqrt.h", 42));
ap_ufixed<W+1,I> factor = 0;
int offset;
#pragma empty_line
#pragma empty_line
#pragma empty_line
if(I%2 == 0) {
offset = 1;
} else {
offset = 0;
}
factor[W+1 -1-offset] = 1;
ap_ufixed<W+1 +1,I+1> result = 0;
ap_ufixed<W+1 +2,I+2> x2 = x;
for(int i = W+1 -offset; i > (I-1)/2; i -= 1 ) {
#pragma empty_line
ap_ufixed<W+2+1,I+2> t = (result << 1) + factor;
#pragma empty_line
ap_ufixed<W+1,I> thisfactor = 0;
if(x2 >= t) {
x2 -= t;
thisfactor = factor;
}
result = result + thisfactor;
factor >>= 1;
x2 <<= 1;
}
#pragma empty_line
return result >> ((I-1) >> 1);
#pragma empty_line
}
#pragma empty_line
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
ap_fixed<W,I> sqrt(ap_fixed<W,I, _AP_Q, _AP_O> x) {
ap_ufixed<W-1,I-1> x2 = x;
if(x < 0) return 0; else return ::hls::sqrt(x2);
}
#pragma line 789 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 2
#pragma empty_line
static
double sqrt(double x)
{
return ::xil_fpo_sqrt_d(x);
}
#pragma empty_line
static
float sqrtf(float x)
{
return ::xil_fpo_sqrt_flt(x);
}
#pragma empty_line
static
double exp(double x)
{
return ::xil_fpo_exp_d(x);
}
#pragma empty_line
static
float expf(float x)
{
return ::xil_fpo_exp_flt(x);
}
#pragma empty_line
#pragma empty_line
template <typename T>
struct hls_filter_traits {
typedef T T_data;
typedef T T_accum;
static T_data shift(T_accum in) {
return in;
}
};
#pragma empty_line
struct hls_filter_traits_Q15 {
typedef short T_data;
typedef int T_accum;
static T_data shift(T_accum in) {
return (T_data)(in >> 15);
}
};
#pragma line 839 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
template <typename T_accum, typename T>
T_accum dot(T *x, T *y, int n)
{
#pragma empty_line
volatile T_accum r = 0;
T_accum result = r;
dot_foreach_tap:
for(int i = 0; i < n; i++) {
result += x[i] * y[i];
}
return result;
}
#pragma line 866 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
template <typename T, typename TRAITS>
void fir_blocksrl(T *in, T *taps, T *out, T *state, int incount, int numtaps)
{
#pragma HLS inline self
fir_blocksrl_foreach_data:
for(int n = 0; n < incount; n++) {
#pragma HLS expression_balance off
for(int i = numtaps-1; i > 0; i--) {
state[i] = state[i-1];
}
state[0] = in[n];
out[n] = TRAITS::shift( dot<typename TRAITS::T_accum>(state, taps, numtaps));
}
}
#pragma line 895 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
template <typename T>
void fir_blocksrl(T *in, T *taps, T *out, T *state, int incount, int numtaps)
{
fir_blocksrl<T, hls_filter_traits<T> >(in, taps, out, state, incount, numtaps);
}
#pragma line 914 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h"
static void fir_blocksrl_Q15(short *in, short *taps, short *out, short *state, int incount, int numtaps)
{
fir_blocksrl<short, hls_filter_traits_Q15>(in, taps, out, state, incount, numtaps);
}
#pragma empty_line
}
#pragma line 50 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h" 1
#pragma line 79 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/queue" 1 3
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/queue" 3
#pragma empty_line
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/queue" 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/deque" 1 3
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/deque" 3
#pragma empty_line
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/deque" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 1 3
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
template<bool _TrivialValueTypes>
struct __uninitialized_copy
{
template<typename _InputIterator, typename _ForwardIterator>
static _ForwardIterator
__uninit_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{
_ForwardIterator __cur = __result;
try
{
for (; __first != __last; ++__first, ++__cur)
std::_Construct(std::__addressof(*__cur), *__first);
return __cur;
}
catch(...)
{
std::_Destroy(__result, __cur);
throw;
}
}
};
#pragma empty_line
template<>
struct __uninitialized_copy<true>
{
template<typename _InputIterator, typename _ForwardIterator>
static _ForwardIterator
__uninit_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{ return std::copy(__first, __last, __result); }
};
#pragma line 107 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 3
template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIterator
uninitialized_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{
typedef typename iterator_traits<_InputIterator>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType2;
#pragma empty_line
return std::__uninitialized_copy<(__is_trivial(_ValueType1)
&& __is_trivial(_ValueType2))>::
__uninit_copy(__first, __last, __result);
}
#pragma empty_line
#pragma empty_line
template<bool _TrivialValueType>
struct __uninitialized_fill
{
template<typename _ForwardIterator, typename _Tp>
static void
__uninit_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{
_ForwardIterator __cur = __first;
try
{
for (; __cur != __last; ++__cur)
std::_Construct(std::__addressof(*__cur), __x);
}
catch(...)
{
std::_Destroy(__first, __cur);
throw;
}
}
};
#pragma empty_line
template<>
struct __uninitialized_fill<true>
{
template<typename _ForwardIterator, typename _Tp>
static void
__uninit_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{ std::fill(__first, __last, __x); }
};
#pragma line 164 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 3
template<typename _ForwardIterator, typename _Tp>
inline void
uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
#pragma empty_line
std::__uninitialized_fill<__is_trivial(_ValueType)>::
__uninit_fill(__first, __last, __x);
}
#pragma empty_line
#pragma empty_line
template<bool _TrivialValueType>
struct __uninitialized_fill_n
{
template<typename _ForwardIterator, typename _Size, typename _Tp>
static void
__uninit_fill_n(_ForwardIterator __first, _Size __n,
const _Tp& __x)
{
_ForwardIterator __cur = __first;
try
{
for (; __n > 0; --__n, ++__cur)
std::_Construct(std::__addressof(*__cur), __x);
}
catch(...)
{
std::_Destroy(__first, __cur);
throw;
}
}
};
#pragma empty_line
template<>
struct __uninitialized_fill_n<true>
{
template<typename _ForwardIterator, typename _Size, typename _Tp>
static void
__uninit_fill_n(_ForwardIterator __first, _Size __n,
const _Tp& __x)
{ std::fill_n(__first, __n, __x); }
};
#pragma line 218 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 3
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline void
uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
#pragma empty_line
std::__uninitialized_fill_n<__is_trivial(_ValueType)>::
__uninit_fill_n(__first, __n, __x);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
_ForwardIterator
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _Allocator& __alloc)
{
_ForwardIterator __cur = __result;
try
{
for (; __first != __last; ++__first, ++__cur)
__alloc.construct(std::__addressof(*__cur), *__first);
return __cur;
}
catch(...)
{
std::_Destroy(__result, __cur, __alloc);
throw;
}
}
#pragma empty_line
template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
inline _ForwardIterator
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, allocator<_Tp>&)
{ return std::uninitialized_copy(__first, __last, __result); }
#pragma empty_line
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
inline _ForwardIterator
__uninitialized_move_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _Allocator& __alloc)
{
return std::__uninitialized_copy_a((__first),
(__last),
__result, __alloc);
}
#pragma empty_line
template<typename _ForwardIterator, typename _Tp, typename _Allocator>
void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
try
{
for (; __cur != __last; ++__cur)
__alloc.construct(std::__addressof(*__cur), __x);
}
catch(...)
{
std::_Destroy(__first, __cur, __alloc);
throw;
}
}
#pragma empty_line
template<typename _ForwardIterator, typename _Tp, typename _Tp2>
inline void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, allocator<_Tp2>&)
{ std::uninitialized_fill(__first, __last, __x); }
#pragma empty_line
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Allocator>
void
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
try
{
for (; __n > 0; --__n, ++__cur)
__alloc.construct(std::__addressof(*__cur), __x);
}
catch(...)
{
std::_Destroy(__first, __cur, __alloc);
throw;
}
}
#pragma empty_line
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Tp2>
inline void
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x, allocator<_Tp2>&)
{ std::uninitialized_fill_n(__first, __n, __x); }
#pragma line 332 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 3
template<typename _InputIterator1, typename _InputIterator2,
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
__uninitialized_copy_move(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_ForwardIterator __result,
_Allocator& __alloc)
{
_ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
__result,
__alloc);
try
{
return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
}
catch(...)
{
std::_Destroy(__result, __mid, __alloc);
throw;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator1, typename _InputIterator2,
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
__uninitialized_move_copy(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_ForwardIterator __result,
_Allocator& __alloc)
{
_ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
__result,
__alloc);
try
{
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
}
catch(...)
{
std::_Destroy(__result, __mid, __alloc);
throw;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
typename _Allocator>
inline _ForwardIterator
__uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid,
const _Tp& __x, _InputIterator __first,
_InputIterator __last, _Allocator& __alloc)
{
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
try
{
return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
}
catch(...)
{
std::_Destroy(__result, __mid, __alloc);
throw;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
typename _Allocator>
inline void
__uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2,
_ForwardIterator __last2, const _Tp& __x,
_Allocator& __alloc)
{
_ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
__first2,
__alloc);
try
{
std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
}
catch(...)
{
std::_Destroy(__first2, __mid2, __alloc);
throw;
}
}
#pragma line 637 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_uninitialized.h" 3
#pragma empty_line
}
#pragma line 65 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/deque" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 1 3
#pragma line 65 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
namespace std
{
#pragma empty_line
#pragma line 87 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
inline size_t
__deque_buf_size(size_t __size)
{ return (__size < 512
? size_t(512 / __size) : size_t(1)); }
#pragma line 104 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Tp, typename _Ref, typename _Ptr>
struct _Deque_iterator
{
typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
#pragma empty_line
static size_t _S_buffer_size()
{ return __deque_buf_size(sizeof(_Tp)); }
#pragma empty_line
typedef std::random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Ptr pointer;
typedef _Ref reference;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp** _Map_pointer;
typedef _Deque_iterator _Self;
#pragma empty_line
_Tp* _M_cur;
_Tp* _M_first;
_Tp* _M_last;
_Map_pointer _M_node;
#pragma empty_line
_Deque_iterator(_Tp* __x, _Map_pointer __y)
: _M_cur(__x), _M_first(*__y),
_M_last(*__y + _S_buffer_size()), _M_node(__y) { }
#pragma empty_line
_Deque_iterator()
: _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { }
#pragma empty_line
_Deque_iterator(const iterator& __x)
: _M_cur(__x._M_cur), _M_first(__x._M_first),
_M_last(__x._M_last), _M_node(__x._M_node) { }
#pragma empty_line
reference
operator*() const
{ return *_M_cur; }
#pragma empty_line
pointer
operator->() const
{ return _M_cur; }
#pragma empty_line
_Self&
operator++()
{
++_M_cur;
if (_M_cur == _M_last)
{
_M_set_node(_M_node + 1);
_M_cur = _M_first;
}
return *this;
}
#pragma empty_line
_Self
operator++(int)
{
_Self __tmp = *this;
++*this;
return __tmp;
}
#pragma empty_line
_Self&
operator--()
{
if (_M_cur == _M_first)
{
_M_set_node(_M_node - 1);
_M_cur = _M_last;
}
--_M_cur;
return *this;
}
#pragma empty_line
_Self
operator--(int)
{
_Self __tmp = *this;
--*this;
return __tmp;
}
#pragma empty_line
_Self&
operator+=(difference_type __n)
{
const difference_type __offset = __n + (_M_cur - _M_first);
if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
_M_cur += __n;
else
{
const difference_type __node_offset =
__offset > 0 ? __offset / difference_type(_S_buffer_size())
: -difference_type((-__offset - 1)
/ _S_buffer_size()) - 1;
_M_set_node(_M_node + __node_offset);
_M_cur = _M_first + (__offset - __node_offset
* difference_type(_S_buffer_size()));
}
return *this;
}
#pragma empty_line
_Self
operator+(difference_type __n) const
{
_Self __tmp = *this;
return __tmp += __n;
}
#pragma empty_line
_Self&
operator-=(difference_type __n)
{ return *this += -__n; }
#pragma empty_line
_Self
operator-(difference_type __n) const
{
_Self __tmp = *this;
return __tmp -= __n;
}
#pragma empty_line
reference
operator[](difference_type __n) const
{ return *(*this + __n); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_set_node(_Map_pointer __new_node)
{
_M_node = __new_node;
_M_first = *__new_node;
_M_last = _M_first + difference_type(_S_buffer_size());
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline bool
operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{ return __x._M_cur == __y._M_cur; }
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline bool
operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{ return __x._M_cur == __y._M_cur; }
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline bool
operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{ return !(__x == __y); }
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline bool
operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{ return !(__x == __y); }
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline bool
operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{ return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
: (__x._M_node < __y._M_node); }
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline bool
operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{ return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
: (__x._M_node < __y._M_node); }
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline bool
operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{ return __y < __x; }
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline bool
operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{ return __y < __x; }
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline bool
operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{ return !(__y < __x); }
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline bool
operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{ return !(__y < __x); }
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline bool
operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{ return !(__x < __y); }
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline bool
operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{ return !(__x < __y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
{
return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
(_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size())
* (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+ (__y._M_last - __y._M_cur);
}
#pragma empty_line
template<typename _Tp, typename _RefL, typename _PtrL,
typename _RefR, typename _PtrR>
inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
{
return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
(_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size())
* (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+ (__y._M_last - __y._M_cur);
}
#pragma empty_line
template<typename _Tp, typename _Ref, typename _Ptr>
inline _Deque_iterator<_Tp, _Ref, _Ptr>
operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
{ return __x + __n; }
#pragma empty_line
template<typename _Tp>
void
fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&,
const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&);
#pragma empty_line
template<typename _Tp>
_Deque_iterator<_Tp, _Tp&, _Tp*>
copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
_Deque_iterator<_Tp, _Tp&, _Tp*>);
#pragma empty_line
template<typename _Tp>
inline _Deque_iterator<_Tp, _Tp&, _Tp*>
copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
_Deque_iterator<_Tp, _Tp&, _Tp*> __last,
_Deque_iterator<_Tp, _Tp&, _Tp*> __result)
{ return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first),
_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last),
__result); }
#pragma empty_line
template<typename _Tp>
_Deque_iterator<_Tp, _Tp&, _Tp*>
copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
_Deque_iterator<_Tp, _Tp&, _Tp*>);
#pragma empty_line
template<typename _Tp>
inline _Deque_iterator<_Tp, _Tp&, _Tp*>
copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
_Deque_iterator<_Tp, _Tp&, _Tp*> __last,
_Deque_iterator<_Tp, _Tp&, _Tp*> __result)
{ return std::copy_backward(_Deque_iterator<_Tp,
const _Tp&, const _Tp*>(__first),
_Deque_iterator<_Tp,
const _Tp&, const _Tp*>(__last),
__result); }
#pragma line 437 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Tp, typename _Alloc>
class _Deque_base
{
public:
typedef _Alloc allocator_type;
#pragma empty_line
allocator_type
get_allocator() const
{ return allocator_type(_M_get_Tp_allocator()); }
#pragma empty_line
typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
#pragma empty_line
_Deque_base()
: _M_impl()
{ _M_initialize_map(0); }
#pragma empty_line
_Deque_base(size_t __num_elements)
: _M_impl()
{ _M_initialize_map(__num_elements); }
#pragma empty_line
_Deque_base(const allocator_type& __a, size_t __num_elements)
: _M_impl(__a)
{ _M_initialize_map(__num_elements); }
#pragma empty_line
_Deque_base(const allocator_type& __a)
: _M_impl(__a)
{ }
#pragma line 481 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
~_Deque_base();
#pragma empty_line
protected:
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
#pragma empty_line
typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
#pragma empty_line
struct _Deque_impl
: public _Tp_alloc_type
{
_Tp** _M_map;
size_t _M_map_size;
iterator _M_start;
iterator _M_finish;
#pragma empty_line
_Deque_impl()
: _Tp_alloc_type(), _M_map(0), _M_map_size(0),
_M_start(), _M_finish()
{ }
#pragma empty_line
_Deque_impl(const _Tp_alloc_type& __a)
: _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
_M_start(), _M_finish()
{ }
};
#pragma empty_line
_Tp_alloc_type&
_M_get_Tp_allocator()
{ return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
#pragma empty_line
const _Tp_alloc_type&
_M_get_Tp_allocator() const
{ return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
#pragma empty_line
_Map_alloc_type
_M_get_map_allocator() const
{ return _Map_alloc_type(_M_get_Tp_allocator()); }
#pragma empty_line
_Tp*
_M_allocate_node()
{
return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
}
#pragma empty_line
void
_M_deallocate_node(_Tp* __p)
{
_M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
}
#pragma empty_line
_Tp**
_M_allocate_map(size_t __n)
{ return _M_get_map_allocator().allocate(__n); }
#pragma empty_line
void
_M_deallocate_map(_Tp** __p, size_t __n)
{ _M_get_map_allocator().deallocate(__p, __n); }
#pragma empty_line
protected:
void _M_initialize_map(size_t);
void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
enum { _S_initial_map_size = 8 };
#pragma empty_line
_Deque_impl _M_impl;
};
#pragma empty_line
template<typename _Tp, typename _Alloc>
_Deque_base<_Tp, _Alloc>::
~_Deque_base()
{
if (this->_M_impl._M_map)
{
_M_destroy_nodes(this->_M_impl._M_start._M_node,
this->_M_impl._M_finish._M_node + 1);
_M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
}
}
#pragma line 571 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Tp, typename _Alloc>
void
_Deque_base<_Tp, _Alloc>::
_M_initialize_map(size_t __num_elements)
{
const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp))
+ 1);
#pragma empty_line
this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size,
size_t(__num_nodes + 2));
this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
_Tp** __nstart = (this->_M_impl._M_map
+ (this->_M_impl._M_map_size - __num_nodes) / 2);
_Tp** __nfinish = __nstart + __num_nodes;
#pragma empty_line
try
{ _M_create_nodes(__nstart, __nfinish); }
catch(...)
{
_M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
this->_M_impl._M_map = 0;
this->_M_impl._M_map_size = 0;
throw;
}
#pragma empty_line
this->_M_impl._M_start._M_set_node(__nstart);
this->_M_impl._M_finish._M_set_node(__nfinish - 1);
this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first;
this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first
+ __num_elements
% __deque_buf_size(sizeof(_Tp)));
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
void
_Deque_base<_Tp, _Alloc>::
_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
{
_Tp** __cur;
try
{
for (__cur = __nstart; __cur < __nfinish; ++__cur)
*__cur = this->_M_allocate_node();
}
catch(...)
{
_M_destroy_nodes(__nstart, __cur);
throw;
}
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
void
_Deque_base<_Tp, _Alloc>::
_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
{
for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
_M_deallocate_node(*__n);
}
#pragma line 718 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
class deque : protected _Deque_base<_Tp, _Alloc>
{
#pragma empty_line
typedef typename _Alloc::value_type _Alloc_value_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _Deque_base<_Tp, _Alloc> _Base;
typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
#pragma empty_line
public:
typedef _Tp value_type;
typedef typename _Tp_alloc_type::pointer pointer;
typedef typename _Tp_alloc_type::const_pointer const_pointer;
typedef typename _Tp_alloc_type::reference reference;
typedef typename _Tp_alloc_type::const_reference const_reference;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Alloc allocator_type;
#pragma empty_line
protected:
typedef pointer* _Map_pointer;
#pragma empty_line
static size_t _S_buffer_size()
{ return __deque_buf_size(sizeof(_Tp)); }
#pragma empty_line
#pragma empty_line
using _Base::_M_initialize_map;
using _Base::_M_create_nodes;
using _Base::_M_destroy_nodes;
using _Base::_M_allocate_node;
using _Base::_M_deallocate_node;
using _Base::_M_allocate_map;
using _Base::_M_deallocate_map;
using _Base::_M_get_Tp_allocator;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
using _Base::_M_impl;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
deque()
: _Base() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
deque(const allocator_type& __a)
: _Base(__a, 0) { }
#pragma line 816 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
explicit
deque(size_type __n, const value_type& __value = value_type(),
const allocator_type& __a = allocator_type())
: _Base(__a, __n)
{ _M_fill_initialize(__value); }
#pragma line 830 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
deque(const deque& __x)
: _Base(__x._M_get_Tp_allocator(), __x.size())
{ std::__uninitialized_copy_a(__x.begin(), __x.end(),
this->_M_impl._M_start,
_M_get_Tp_allocator()); }
#pragma line 882 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _InputIterator>
deque(_InputIterator __first, _InputIterator __last,
const allocator_type& __a = allocator_type())
: _Base(__a)
{
#pragma empty_line
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_initialize_dispatch(__first, __last, _Integral());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
~deque()
{ _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
#pragma line 907 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
deque&
operator=(const deque& __x);
#pragma line 957 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
assign(size_type __n, const value_type& __val)
{ _M_fill_assign(__n, __val); }
#pragma line 973 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _InputIterator>
void
assign(_InputIterator __first, _InputIterator __last)
{
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_assign_dispatch(__first, __last, _Integral());
}
#pragma line 999 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
allocator_type
get_allocator() const
{ return _Base::get_allocator(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
begin()
{ return this->_M_impl._M_start; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_iterator
begin() const
{ return this->_M_impl._M_start; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
end()
{ return this->_M_impl._M_finish; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_iterator
end() const
{ return this->_M_impl._M_finish; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
rbegin()
{ return reverse_iterator(this->_M_impl._M_finish); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reverse_iterator
rbegin() const
{ return const_reverse_iterator(this->_M_impl._M_finish); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
rend()
{ return reverse_iterator(this->_M_impl._M_start); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reverse_iterator
rend() const
{ return const_reverse_iterator(this->_M_impl._M_start); }
#pragma line 1113 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
size_type
size() const
{ return this->_M_impl._M_finish - this->_M_impl._M_start; }
#pragma empty_line
#pragma empty_line
size_type
max_size() const
{ return _M_get_Tp_allocator().max_size(); }
#pragma line 1176 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
resize(size_type __new_size, value_type __x = value_type())
{
const size_type __len = size();
if (__new_size > __len)
insert(this->_M_impl._M_finish, __new_size - __len, __x);
else if (__new_size < __len)
_M_erase_at_end(this->_M_impl._M_start
+ difference_type(__new_size));
}
#pragma line 1199 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
bool
empty() const
{ return this->_M_impl._M_finish == this->_M_impl._M_start; }
#pragma line 1215 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
reference
operator[](size_type __n)
{ return this->_M_impl._M_start[difference_type(__n)]; }
#pragma line 1230 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
const_reference
operator[](size_type __n) const
{ return this->_M_impl._M_start[difference_type(__n)]; }
#pragma empty_line
protected:
#pragma empty_line
void
_M_range_check(size_type __n) const
{
if (__n >= this->size())
__throw_out_of_range(("deque::_M_range_check"));
}
#pragma empty_line
public:
#pragma line 1255 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
reference
at(size_type __n)
{
_M_range_check(__n);
return (*this)[__n];
}
#pragma line 1273 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
const_reference
at(size_type __n) const
{
_M_range_check(__n);
return (*this)[__n];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
front()
{ return *begin(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
front() const
{ return *begin(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
back()
{
iterator __tmp = end();
--__tmp;
return *__tmp;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
back() const
{
const_iterator __tmp = end();
--__tmp;
return *__tmp;
}
#pragma line 1330 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
push_front(const value_type& __x)
{
if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
{
this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x);
--this->_M_impl._M_start._M_cur;
}
else
_M_push_front_aux(__x);
}
#pragma line 1361 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
push_back(const value_type& __x)
{
if (this->_M_impl._M_finish._M_cur
!= this->_M_impl._M_finish._M_last - 1)
{
this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x);
++this->_M_impl._M_finish._M_cur;
}
else
_M_push_back_aux(__x);
}
#pragma line 1392 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
pop_front()
{
if (this->_M_impl._M_start._M_cur
!= this->_M_impl._M_start._M_last - 1)
{
this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
++this->_M_impl._M_start._M_cur;
}
else
_M_pop_front_aux();
}
#pragma line 1413 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
pop_back()
{
if (this->_M_impl._M_finish._M_cur
!= this->_M_impl._M_finish._M_first)
{
--this->_M_impl._M_finish._M_cur;
this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
}
else
_M_pop_back_aux();
}
#pragma line 1450 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
iterator
insert(iterator __position, const value_type& __x);
#pragma line 1490 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
insert(iterator __position, size_type __n, const value_type& __x)
{ _M_fill_insert(__position, __n, __x); }
#pragma line 1504 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _InputIterator>
void
insert(iterator __position, _InputIterator __first,
_InputIterator __last)
{
#pragma empty_line
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_insert_dispatch(__position, __first, __last, _Integral());
}
#pragma line 1527 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
iterator
erase(iterator __position);
#pragma line 1546 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
iterator
erase(iterator __first, iterator __last);
#pragma line 1558 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
swap(deque& __x)
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
#pragma empty_line
#pragma empty_line
#pragma empty_line
std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
__x._M_get_Tp_allocator());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
clear()
{ _M_erase_at_end(begin()); }
#pragma empty_line
protected:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
_M_initialize_map(static_cast<size_type>(__n));
_M_fill_initialize(__x);
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename std::iterator_traits<_InputIterator>::
iterator_category _IterCategory;
_M_range_initialize(__first, __last, _IterCategory());
}
#pragma line 1620 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _InputIterator>
void
_M_range_initialize(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag);
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag);
#pragma line 1642 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
_M_fill_initialize(const value_type& __value);
#pragma line 1658 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{ _M_fill_assign(__n, __val); }
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename std::iterator_traits<_InputIterator>::
iterator_category _IterCategory;
_M_assign_aux(__first, __last, _IterCategory());
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_assign_aux(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag);
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag)
{
const size_type __len = std::distance(__first, __last);
if (__len > size())
{
_ForwardIterator __mid = __first;
std::advance(__mid, size());
std::copy(__first, __mid, begin());
insert(end(), __mid, __last);
}
else
_M_erase_at_end(std::copy(__first, __last, begin()));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_fill_assign(size_type __n, const value_type& __val)
{
if (__n > size())
{
std::fill(begin(), end(), __val);
insert(end(), __n - size(), __val);
}
else
{
_M_erase_at_end(begin() + difference_type(__n));
std::fill(begin(), end(), __val);
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void _M_push_back_aux(const value_type&);
#pragma empty_line
void _M_push_front_aux(const value_type&);
#pragma line 1729 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void _M_pop_back_aux();
#pragma empty_line
void _M_pop_front_aux();
#pragma line 1741 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos,
_Integer __n, _Integer __x, __true_type)
{ _M_fill_insert(__pos, __n, __x); }
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_insert_dispatch(iterator __pos,
_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename std::iterator_traits<_InputIterator>::
iterator_category _IterCategory;
_M_range_insert_aux(__pos, __first, __last, _IterCategory());
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_range_insert_aux(iterator __pos, _InputIterator __first,
_InputIterator __last, std::input_iterator_tag);
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_range_insert_aux(iterator __pos, _ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
_M_insert_aux(iterator __pos, const value_type& __x);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_insert_aux(iterator __pos,
_ForwardIterator __first, _ForwardIterator __last,
size_type __n);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_destroy_data_aux(iterator __first, iterator __last);
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Alloc1>
void
_M_destroy_data(iterator __first, iterator __last, const _Alloc1&)
{ _M_destroy_data_aux(__first, __last); }
#pragma empty_line
void
_M_destroy_data(iterator __first, iterator __last,
const std::allocator<_Tp>&)
{
if (!__has_trivial_destructor(value_type))
_M_destroy_data_aux(__first, __last);
}
#pragma empty_line
#pragma empty_line
void
_M_erase_at_begin(iterator __pos)
{
_M_destroy_data(begin(), __pos, _M_get_Tp_allocator());
_M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node);
this->_M_impl._M_start = __pos;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_erase_at_end(iterator __pos)
{
_M_destroy_data(__pos, end(), _M_get_Tp_allocator());
_M_destroy_nodes(__pos._M_node + 1,
this->_M_impl._M_finish._M_node + 1);
this->_M_impl._M_finish = __pos;
}
#pragma line 1847 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
iterator
_M_reserve_elements_at_front(size_type __n)
{
const size_type __vacancies = this->_M_impl._M_start._M_cur
- this->_M_impl._M_start._M_first;
if (__n > __vacancies)
_M_new_elements_at_front(__n - __vacancies);
return this->_M_impl._M_start - difference_type(__n);
}
#pragma empty_line
iterator
_M_reserve_elements_at_back(size_type __n)
{
const size_type __vacancies = (this->_M_impl._M_finish._M_last
- this->_M_impl._M_finish._M_cur) - 1;
if (__n > __vacancies)
_M_new_elements_at_back(__n - __vacancies);
return this->_M_impl._M_finish + difference_type(__n);
}
#pragma empty_line
void
_M_new_elements_at_front(size_type __new_elements);
#pragma empty_line
void
_M_new_elements_at_back(size_type __new_elements);
#pragma line 1883 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
void
_M_reserve_map_at_back(size_type __nodes_to_add = 1)
{
if (__nodes_to_add + 1 > this->_M_impl._M_map_size
- (this->_M_impl._M_finish._M_node - this->_M_impl._M_map))
_M_reallocate_map(__nodes_to_add, false);
}
#pragma empty_line
void
_M_reserve_map_at_front(size_type __nodes_to_add = 1)
{
if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node
- this->_M_impl._M_map))
_M_reallocate_map(__nodes_to_add, true);
}
#pragma empty_line
void
_M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
#pragma empty_line
};
#pragma line 1915 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Tp, typename _Alloc>
inline bool
operator==(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
{ return __x.size() == __y.size()
&& std::equal(__x.begin(), __x.end(), __y.begin()); }
#pragma line 1933 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_deque.h" 3
template<typename _Tp, typename _Alloc>
inline bool
operator<(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
{ return std::lexicographical_compare(__x.begin(), __x.end(),
__y.begin(), __y.end()); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator!=(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
{ return !(__x == __y); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator>(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
{ return __y < __x; }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator<=(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
{ return !(__y < __x); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator>=(const deque<_Tp, _Alloc>& __x,
const deque<_Tp, _Alloc>& __y)
{ return !(__x < __y); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline void
swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
{ __x.swap(__y); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/deque" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 1 3
#pragma line 61 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
namespace std
{
#pragma empty_line
#pragma line 92 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
template <typename _Tp, typename _Alloc>
deque<_Tp, _Alloc>&
deque<_Tp, _Alloc>::
operator=(const deque& __x)
{
const size_type __len = size();
if (&__x != this)
{
if (__len >= __x.size())
_M_erase_at_end(std::copy(__x.begin(), __x.end(),
this->_M_impl._M_start));
else
{
const_iterator __mid = __x.begin() + difference_type(__len);
std::copy(__x.begin(), __mid, this->_M_impl._M_start);
insert(this->_M_impl._M_finish, __mid, __x.end());
}
}
return *this;
}
#pragma line 148 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
template <typename _Tp, typename _Alloc>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
insert(iterator __position, const value_type& __x)
{
if (__position._M_cur == this->_M_impl._M_start._M_cur)
{
push_front(__x);
return this->_M_impl._M_start;
}
else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
{
push_back(__x);
iterator __tmp = this->_M_impl._M_finish;
--__tmp;
return __tmp;
}
else
return _M_insert_aux(__position, __x);
}
#pragma line 193 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
template <typename _Tp, typename _Alloc>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
erase(iterator __position)
{
iterator __next = __position;
++__next;
const difference_type __index = __position - begin();
if (static_cast<size_type>(__index) < (size() >> 1))
{
if (__position != begin())
std::copy_backward(begin(), __position, __next);
pop_front();
}
else
{
if (__next != end())
std::copy(__next, end(), __position);
pop_back();
}
return begin() + __index;
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
erase(iterator __first, iterator __last)
{
if (__first == __last)
return __first;
else if (__first == begin() && __last == end())
{
clear();
return end();
}
else
{
const difference_type __n = __last - __first;
const difference_type __elems_before = __first - begin();
if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
{
if (__first != begin())
std::copy_backward(begin(), __first, __last);
_M_erase_at_begin(begin() + __n);
}
else
{
if (__last != end())
std::copy(__last, end(), __first);
_M_erase_at_end(end() - __n);
}
return begin() + __elems_before;
}
}
#pragma empty_line
template <typename _Tp, class _Alloc>
template <typename _InputIterator>
void
deque<_Tp, _Alloc>::
_M_assign_aux(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{
iterator __cur = begin();
for (; __first != __last && __cur != end(); ++__cur, ++__first)
*__cur = *__first;
if (__first == __last)
_M_erase_at_end(__cur);
else
insert(end(), __first, __last);
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
{
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
try
{
std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
__x, _M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
}
catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
throw;
}
}
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
try
{
std::__uninitialized_fill_a(this->_M_impl._M_finish,
__new_finish, __x,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
}
catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
throw;
}
}
else
_M_insert_aux(__pos, __n, __x);
}
#pragma line 332 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_fill_initialize(const value_type& __value)
{
_Map_pointer __cur;
try
{
for (__cur = this->_M_impl._M_start._M_node;
__cur < this->_M_impl._M_finish._M_node;
++__cur)
std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
__value, _M_get_Tp_allocator());
std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
this->_M_impl._M_finish._M_cur,
__value, _M_get_Tp_allocator());
}
catch(...)
{
std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
_M_get_Tp_allocator());
throw;
}
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
template <typename _InputIterator>
void
deque<_Tp, _Alloc>::
_M_range_initialize(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{
this->_M_initialize_map(0);
try
{
for (; __first != __last; ++__first)
push_back(*__first);
}
catch(...)
{
clear();
throw;
}
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
deque<_Tp, _Alloc>::
_M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag)
{
const size_type __n = std::distance(__first, __last);
this->_M_initialize_map(__n);
#pragma empty_line
_Map_pointer __cur_node;
try
{
for (__cur_node = this->_M_impl._M_start._M_node;
__cur_node < this->_M_impl._M_finish._M_node;
++__cur_node)
{
_ForwardIterator __mid = __first;
std::advance(__mid, _S_buffer_size());
std::__uninitialized_copy_a(__first, __mid, *__cur_node,
_M_get_Tp_allocator());
__first = __mid;
}
std::__uninitialized_copy_a(__first, __last,
this->_M_impl._M_finish._M_first,
_M_get_Tp_allocator());
}
catch(...)
{
std::_Destroy(this->_M_impl._M_start,
iterator(*__cur_node, __cur_node),
_M_get_Tp_allocator());
throw;
}
}
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
deque<_Tp, _Alloc>::
_M_push_back_aux(const value_type& __t)
#pragma empty_line
{
_M_reserve_map_at_back();
*(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
try
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t);
#pragma empty_line
this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
+ 1);
this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
}
catch(...)
{
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
throw;
}
}
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
deque<_Tp, _Alloc>::
_M_push_front_aux(const value_type& __t)
#pragma empty_line
{
_M_reserve_map_at_front();
*(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
try
{
this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
- 1);
this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
#pragma empty_line
}
catch(...)
{
++this->_M_impl._M_start;
_M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
throw;
}
}
#pragma empty_line
#pragma empty_line
template <typename _Tp, typename _Alloc>
void deque<_Tp, _Alloc>::
_M_pop_back_aux()
{
_M_deallocate_node(this->_M_impl._M_finish._M_first);
this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <typename _Tp, typename _Alloc>
void deque<_Tp, _Alloc>::
_M_pop_front_aux()
{
this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
_M_deallocate_node(this->_M_impl._M_start._M_first);
this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
template <typename _InputIterator>
void
deque<_Tp, _Alloc>::
_M_range_insert_aux(iterator __pos,
_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{ std::copy(__first, __last, std::inserter(*this, __pos)); }
#pragma empty_line
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
deque<_Tp, _Alloc>::
_M_range_insert_aux(iterator __pos,
_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag)
{
const size_type __n = std::distance(__first, __last);
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
try
{
std::__uninitialized_copy_a(__first, __last, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
}
catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
throw;
}
}
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
try
{
std::__uninitialized_copy_a(__first, __last,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
}
catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
throw;
}
}
else
_M_insert_aux(__pos, __first, __last, __n);
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
#pragma line 572 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
_M_insert_aux(iterator __pos, const value_type& __x)
{
value_type __x_copy = __x;
#pragma empty_line
difference_type __index = __pos - this->_M_impl._M_start;
if (static_cast<size_type>(__index) < size() / 2)
{
push_front((front()));
iterator __front1 = this->_M_impl._M_start;
++__front1;
iterator __front2 = __front1;
++__front2;
__pos = this->_M_impl._M_start + __index;
iterator __pos1 = __pos;
++__pos1;
std::copy(__front2, __pos1, __front1);
}
else
{
push_back((back()));
iterator __back1 = this->_M_impl._M_finish;
--__back1;
iterator __back2 = __back1;
--__back2;
__pos = this->_M_impl._M_start + __index;
std::copy_backward(__pos, __back2, __back1);
}
*__pos = (__x_copy);
return __pos;
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
{
const difference_type __elems_before = __pos - this->_M_impl._M_start;
const size_type __length = this->size();
value_type __x_copy = __x;
if (__elems_before < difference_type(__length / 2))
{
iterator __new_start = _M_reserve_elements_at_front(__n);
iterator __old_start = this->_M_impl._M_start;
__pos = this->_M_impl._M_start + __elems_before;
try
{
if (__elems_before >= difference_type(__n))
{
iterator __start_n = (this->_M_impl._M_start
+ difference_type(__n));
std::__uninitialized_move_a(this->_M_impl._M_start,
__start_n, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
std::copy(__start_n, __pos, __old_start);
std::fill(__pos - difference_type(__n), __pos, __x_copy);
}
else
{
std::__uninitialized_move_fill(this->_M_impl._M_start,
__pos, __new_start,
this->_M_impl._M_start,
__x_copy,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
std::fill(__old_start, __pos, __x_copy);
}
}
catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
throw;
}
}
else
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
iterator __old_finish = this->_M_impl._M_finish;
const difference_type __elems_after =
difference_type(__length) - __elems_before;
__pos = this->_M_impl._M_finish - __elems_after;
try
{
if (__elems_after > difference_type(__n))
{
iterator __finish_n = (this->_M_impl._M_finish
- difference_type(__n));
std::__uninitialized_move_a(__finish_n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
std::copy_backward(__pos, __finish_n, __old_finish);
std::fill(__pos, __pos + difference_type(__n), __x_copy);
}
else
{
std::__uninitialized_fill_move(this->_M_impl._M_finish,
__pos + difference_type(__n),
__x_copy, __pos,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
std::fill(__pos, __old_finish, __x_copy);
}
}
catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
throw;
}
}
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
deque<_Tp, _Alloc>::
_M_insert_aux(iterator __pos,
_ForwardIterator __first, _ForwardIterator __last,
size_type __n)
{
const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
const size_type __length = size();
if (static_cast<size_type>(__elemsbefore) < __length / 2)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
iterator __old_start = this->_M_impl._M_start;
__pos = this->_M_impl._M_start + __elemsbefore;
try
{
if (__elemsbefore >= difference_type(__n))
{
iterator __start_n = (this->_M_impl._M_start
+ difference_type(__n));
std::__uninitialized_move_a(this->_M_impl._M_start,
__start_n, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
std::copy(__start_n, __pos, __old_start);
std::copy(__first, __last, __pos - difference_type(__n));
}
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, difference_type(__n) - __elemsbefore);
std::__uninitialized_move_copy(this->_M_impl._M_start,
__pos, __first, __mid,
__new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
std::copy(__mid, __last, __old_start);
}
}
catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
throw;
}
}
else
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
iterator __old_finish = this->_M_impl._M_finish;
const difference_type __elemsafter =
difference_type(__length) - __elemsbefore;
__pos = this->_M_impl._M_finish - __elemsafter;
try
{
if (__elemsafter > difference_type(__n))
{
iterator __finish_n = (this->_M_impl._M_finish
- difference_type(__n));
std::__uninitialized_move_a(__finish_n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
std::copy_backward(__pos, __finish_n, __old_finish);
std::copy(__first, __last, __pos);
}
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, __elemsafter);
std::__uninitialized_copy_move(__mid, __last, __pos,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
std::copy(__first, __mid, __pos);
}
}
catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
throw;
}
}
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_destroy_data_aux(iterator __first, iterator __last)
{
for (_Map_pointer __node = __first._M_node + 1;
__node < __last._M_node; ++__node)
std::_Destroy(*__node, *__node + _S_buffer_size(),
_M_get_Tp_allocator());
#pragma empty_line
if (__first._M_node != __last._M_node)
{
std::_Destroy(__first._M_cur, __first._M_last,
_M_get_Tp_allocator());
std::_Destroy(__last._M_first, __last._M_cur,
_M_get_Tp_allocator());
}
else
std::_Destroy(__first._M_cur, __last._M_cur,
_M_get_Tp_allocator());
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_new_elements_at_front(size_type __new_elems)
{
if (this->max_size() - this->size() < __new_elems)
__throw_length_error(("deque::_M_new_elements_at_front"));
#pragma empty_line
const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
/ _S_buffer_size());
_M_reserve_map_at_front(__new_nodes);
size_type __i;
try
{
for (__i = 1; __i <= __new_nodes; ++__i)
*(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
}
catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
_M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
throw;
}
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_new_elements_at_back(size_type __new_elems)
{
if (this->max_size() - this->size() < __new_elems)
__throw_length_error(("deque::_M_new_elements_at_back"));
#pragma empty_line
const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
/ _S_buffer_size());
_M_reserve_map_at_back(__new_nodes);
size_type __i;
try
{
for (__i = 1; __i <= __new_nodes; ++__i)
*(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
}
catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
throw;
}
}
#pragma empty_line
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
_M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
{
const size_type __old_num_nodes
= this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
#pragma empty_line
_Map_pointer __new_nstart;
if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
{
__new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
- __new_num_nodes) / 2
+ (__add_at_front ? __nodes_to_add : 0);
if (__new_nstart < this->_M_impl._M_start._M_node)
std::copy(this->_M_impl._M_start._M_node,
this->_M_impl._M_finish._M_node + 1,
__new_nstart);
else
std::copy_backward(this->_M_impl._M_start._M_node,
this->_M_impl._M_finish._M_node + 1,
__new_nstart + __old_num_nodes);
}
else
{
size_type __new_map_size = this->_M_impl._M_map_size
+ std::max(this->_M_impl._M_map_size,
__nodes_to_add) + 2;
#pragma empty_line
_Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
__new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+ (__add_at_front ? __nodes_to_add : 0);
std::copy(this->_M_impl._M_start._M_node,
this->_M_impl._M_finish._M_node + 1,
__new_nstart);
_M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
#pragma empty_line
this->_M_impl._M_map = __new_map;
this->_M_impl._M_map_size = __new_map_size;
}
#pragma empty_line
this->_M_impl._M_start._M_set_node(__new_nstart);
this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp>
void
fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value)
{
typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
#pragma empty_line
for (typename _Self::_Map_pointer __node = __first._M_node + 1;
__node < __last._M_node; ++__node)
std::fill(*__node, *__node + _Self::_S_buffer_size(), __value);
#pragma empty_line
if (__first._M_node != __last._M_node)
{
std::fill(__first._M_cur, __first._M_last, __value);
std::fill(__last._M_first, __last._M_cur, __value);
}
else
std::fill(__first._M_cur, __last._M_cur, __value);
}
#pragma empty_line
template<typename _Tp>
_Deque_iterator<_Tp, _Tp&, _Tp*>
copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
_Deque_iterator<_Tp, const _Tp&, const _Tp*> __last,
_Deque_iterator<_Tp, _Tp&, _Tp*> __result)
{
typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
typedef typename _Self::difference_type difference_type;
#pragma empty_line
difference_type __len = __last - __first;
while (__len > 0)
{
const difference_type __clen
= std::min(__len, std::min(__first._M_last - __first._M_cur,
__result._M_last - __result._M_cur));
std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur);
__first += __clen;
__result += __clen;
__len -= __clen;
}
return __result;
}
#pragma empty_line
template<typename _Tp>
_Deque_iterator<_Tp, _Tp&, _Tp*>
copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
_Deque_iterator<_Tp, const _Tp&, const _Tp*> __last,
_Deque_iterator<_Tp, _Tp&, _Tp*> __result)
{
typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
typedef typename _Self::difference_type difference_type;
#pragma empty_line
difference_type __len = __last - __first;
while (__len > 0)
{
difference_type __llen = __last._M_cur - __last._M_first;
_Tp* __lend = __last._M_cur;
#pragma empty_line
difference_type __rlen = __result._M_cur - __result._M_first;
_Tp* __rend = __result._M_cur;
#pragma empty_line
if (!__llen)
{
__llen = _Self::_S_buffer_size();
__lend = *(__last._M_node - 1) + __llen;
}
if (!__rlen)
{
__rlen = _Self::_S_buffer_size();
__rend = *(__result._M_node - 1) + __rlen;
}
#pragma empty_line
const difference_type __clen = std::min(__len,
std::min(__llen, __rlen));
std::copy_backward(__lend - __clen, __lend, __rend);
__last -= __clen;
__result -= __clen;
__len -= __clen;
}
return __result;
}
#pragma line 1045 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/deque.tcc" 3
#pragma empty_line
}
#pragma line 68 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/deque" 2 3
#pragma line 62 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/queue" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/vector" 1 3
#pragma line 59 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/vector" 3
#pragma empty_line
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/vector" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 1 3
#pragma line 65 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
struct _Vector_base
{
typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
#pragma empty_line
struct _Vector_impl
: public _Tp_alloc_type
{
typename _Tp_alloc_type::pointer _M_start;
typename _Tp_alloc_type::pointer _M_finish;
typename _Tp_alloc_type::pointer _M_end_of_storage;
#pragma empty_line
_Vector_impl()
: _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0)
{ }
#pragma empty_line
_Vector_impl(_Tp_alloc_type const& __a)
: _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
{ }
};
#pragma empty_line
public:
typedef _Alloc allocator_type;
#pragma empty_line
_Tp_alloc_type&
_M_get_Tp_allocator()
{ return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
#pragma empty_line
const _Tp_alloc_type&
_M_get_Tp_allocator() const
{ return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
#pragma empty_line
allocator_type
get_allocator() const
{ return allocator_type(_M_get_Tp_allocator()); }
#pragma empty_line
_Vector_base()
: _M_impl() { }
#pragma empty_line
_Vector_base(const allocator_type& __a)
: _M_impl(__a) { }
#pragma empty_line
_Vector_base(size_t __n)
: _M_impl()
{
this->_M_impl._M_start = this->_M_allocate(__n);
this->_M_impl._M_finish = this->_M_impl._M_start;
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
}
#pragma empty_line
_Vector_base(size_t __n, const allocator_type& __a)
: _M_impl(__a)
{
this->_M_impl._M_start = this->_M_allocate(__n);
this->_M_impl._M_finish = this->_M_impl._M_start;
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
}
#pragma line 141 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
~_Vector_base()
{ _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
- this->_M_impl._M_start); }
#pragma empty_line
public:
_Vector_impl _M_impl;
#pragma empty_line
typename _Tp_alloc_type::pointer
_M_allocate(size_t __n)
{ return __n != 0 ? _M_impl.allocate(__n) : 0; }
#pragma empty_line
void
_M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n)
{
if (__p)
_M_impl.deallocate(__p, __n);
}
};
#pragma line 179 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
class vector : protected _Vector_base<_Tp, _Alloc>
{
#pragma empty_line
typedef typename _Alloc::value_type _Alloc_value_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef _Vector_base<_Tp, _Alloc> _Base;
typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
#pragma empty_line
public:
typedef _Tp value_type;
typedef typename _Tp_alloc_type::pointer pointer;
typedef typename _Tp_alloc_type::const_pointer const_pointer;
typedef typename _Tp_alloc_type::reference reference;
typedef typename _Tp_alloc_type::const_reference const_reference;
typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
const_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Alloc allocator_type;
#pragma empty_line
protected:
using _Base::_M_allocate;
using _Base::_M_deallocate;
using _Base::_M_impl;
using _Base::_M_get_Tp_allocator;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
vector()
: _Base() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
vector(const allocator_type& __a)
: _Base(__a) { }
#pragma line 262 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
explicit
vector(size_type __n, const value_type& __value = value_type(),
const allocator_type& __a = allocator_type())
: _Base(__n, __a)
{ _M_fill_initialize(__n, __value); }
#pragma line 278 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
vector(const vector& __x)
: _Base(__x.size(), __x._M_get_Tp_allocator())
{ this->_M_impl._M_finish =
std::__uninitialized_copy_a(__x.begin(), __x.end(),
this->_M_impl._M_start,
_M_get_Tp_allocator());
}
#pragma line 333 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _InputIterator>
vector(_InputIterator __first, _InputIterator __last,
const allocator_type& __a = allocator_type())
: _Base(__a)
{
#pragma empty_line
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_initialize_dispatch(__first, __last, _Integral());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
~vector()
{ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator()); }
#pragma line 361 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
vector&
operator=(const vector& __x);
#pragma line 411 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
assign(size_type __n, const value_type& __val)
{ _M_fill_assign(__n, __val); }
#pragma line 427 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _InputIterator>
void
assign(_InputIterator __first, _InputIterator __last)
{
#pragma empty_line
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_assign_dispatch(__first, __last, _Integral());
}
#pragma line 454 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
using _Base::get_allocator;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
begin()
{ return iterator(this->_M_impl._M_start); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_iterator
begin() const
{ return const_iterator(this->_M_impl._M_start); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
end()
{ return iterator(this->_M_impl._M_finish); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_iterator
end() const
{ return const_iterator(this->_M_impl._M_finish); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
rbegin()
{ return reverse_iterator(end()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reverse_iterator
rbegin() const
{ return const_reverse_iterator(end()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reverse_iterator
rend()
{ return reverse_iterator(begin()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reverse_iterator
rend() const
{ return const_reverse_iterator(begin()); }
#pragma line 569 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
size_type
size() const
{ return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
#pragma empty_line
#pragma empty_line
size_type
max_size() const
{ return _M_get_Tp_allocator().max_size(); }
#pragma line 628 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
resize(size_type __new_size, value_type __x = value_type())
{
if (__new_size > size())
insert(end(), __new_size - size(), __x);
else if (__new_size < size())
_M_erase_at_end(this->_M_impl._M_start + __new_size);
}
#pragma line 649 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
size_type
capacity() const
{ return size_type(this->_M_impl._M_end_of_storage
- this->_M_impl._M_start); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool
empty() const
{ return begin() == end(); }
#pragma line 679 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
reserve(size_type __n);
#pragma line 694 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
reference
operator[](size_type __n)
{ return *(this->_M_impl._M_start + __n); }
#pragma line 709 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
const_reference
operator[](size_type __n) const
{ return *(this->_M_impl._M_start + __n); }
#pragma empty_line
protected:
#pragma empty_line
void
_M_range_check(size_type __n) const
{
if (__n >= this->size())
__throw_out_of_range(("vector::_M_range_check"));
}
#pragma empty_line
public:
#pragma line 734 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
reference
at(size_type __n)
{
_M_range_check(__n);
return (*this)[__n];
}
#pragma line 752 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
const_reference
at(size_type __n) const
{
_M_range_check(__n);
return (*this)[__n];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
front()
{ return *begin(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
front() const
{ return *begin(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
back()
{ return *(end() - 1); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
back() const
{ return *(end() - 1); }
#pragma line 801 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
pointer
#pragma empty_line
data()
{ return std::__addressof(front()); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_pointer
#pragma empty_line
data() const
{ return std::__addressof(front()); }
#pragma line 825 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
push_back(const value_type& __x)
{
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
this->_M_impl.construct(this->_M_impl._M_finish, __x);
++this->_M_impl._M_finish;
}
else
_M_insert_aux(end(), __x);
}
#pragma line 856 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
pop_back()
{
--this->_M_impl._M_finish;
this->_M_impl.destroy(this->_M_impl._M_finish);
}
#pragma line 892 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
iterator
insert(iterator __position, const value_type& __x);
#pragma line 942 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
insert(iterator __position, size_type __n, const value_type& __x)
{ _M_fill_insert(__position, __n, __x); }
#pragma line 960 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _InputIterator>
void
insert(iterator __position, _InputIterator __first,
_InputIterator __last)
{
#pragma empty_line
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_insert_dispatch(__position, __first, __last, _Integral());
}
#pragma line 985 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
iterator
erase(iterator __position);
#pragma line 1006 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
iterator
erase(iterator __first, iterator __last);
#pragma line 1018 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
swap(vector& __x)
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
std::swap(this->_M_impl._M_end_of_storage,
__x._M_impl._M_end_of_storage);
#pragma empty_line
#pragma empty_line
#pragma empty_line
std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
__x._M_get_Tp_allocator());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
clear()
{ _M_erase_at_end(this->_M_impl._M_start); }
#pragma empty_line
protected:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
pointer
_M_allocate_and_copy(size_type __n,
_ForwardIterator __first, _ForwardIterator __last)
{
pointer __result = this->_M_allocate(__n);
try
{
std::__uninitialized_copy_a(__first, __last, __result,
_M_get_Tp_allocator());
return __result;
}
catch(...)
{
_M_deallocate(__result, __n);
throw;
}
}
#pragma line 1073 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
{
this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n));
this->_M_impl._M_end_of_storage =
this->_M_impl._M_start + static_cast<size_type>(__n);
_M_fill_initialize(static_cast<size_type>(__n), __value);
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename std::iterator_traits<_InputIterator>::
iterator_category _IterCategory;
_M_range_initialize(__first, __last, _IterCategory());
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_range_initialize(_InputIterator __first,
_InputIterator __last, std::input_iterator_tag)
{
for (; __first != __last; ++__first)
push_back(*__first);
}
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_range_initialize(_ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag)
{
const size_type __n = std::distance(__first, __last);
this->_M_impl._M_start = this->_M_allocate(__n);
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
this->_M_impl._M_finish =
std::__uninitialized_copy_a(__first, __last,
this->_M_impl._M_start,
_M_get_Tp_allocator());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_fill_initialize(size_type __n, const value_type& __value)
{
std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
_M_get_Tp_allocator());
this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
}
#pragma line 1147 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{ _M_fill_assign(__n, __val); }
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{
typedef typename std::iterator_traits<_InputIterator>::
iterator_category _IterCategory;
_M_assign_aux(__first, __last, _IterCategory());
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_assign_aux(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag);
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_fill_assign(size_type __n, const value_type& __val);
#pragma line 1187 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
__true_type)
{ _M_fill_insert(__pos, __n, __val); }
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_insert_dispatch(iterator __pos, _InputIterator __first,
_InputIterator __last, __false_type)
{
typedef typename std::iterator_traits<_InputIterator>::
iterator_category _IterCategory;
_M_range_insert(__pos, __first, __last, _IterCategory());
}
#pragma empty_line
#pragma empty_line
template<typename _InputIterator>
void
_M_range_insert(iterator __pos, _InputIterator __first,
_InputIterator __last, std::input_iterator_tag);
#pragma empty_line
#pragma empty_line
template<typename _ForwardIterator>
void
_M_range_insert(iterator __pos, _ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag);
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
#pragma line 1229 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
void
_M_insert_aux(iterator __position, const value_type& __x);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
size_type
_M_check_len(size_type __n, const char* __s) const
{
if (max_size() - size() < __n)
__throw_length_error((__s));
#pragma empty_line
const size_type __len = size() + std::max(size(), __n);
return (__len < size() || __len > max_size()) ? max_size() : __len;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
_M_erase_at_end(pointer __pos)
{
std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator());
this->_M_impl._M_finish = __pos;
}
};
#pragma line 1271 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _Tp, typename _Alloc>
inline bool
operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
{ return (__x.size() == __y.size()
&& std::equal(__x.begin(), __x.end(), __y.begin())); }
#pragma line 1288 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_vector.h" 3
template<typename _Tp, typename _Alloc>
inline bool
operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
{ return std::lexicographical_compare(__x.begin(), __x.end(),
__y.begin(), __y.end()); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
{ return !(__x == __y); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
{ return __y < __x; }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
{ return !(__y < __x); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline bool
operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
{ return !(__x < __y); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
inline void
swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
{ __x.swap(__y); }
#pragma empty_line
#pragma empty_line
}
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/vector" 2 3
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 1 3
#pragma line 62 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 3
namespace std
{
#pragma empty_line
#pragma empty_line
typedef unsigned long _Bit_type;
enum { _S_word_bit = int(8 * sizeof(_Bit_type)) };
#pragma empty_line
struct _Bit_reference
{
_Bit_type * _M_p;
_Bit_type _M_mask;
#pragma empty_line
_Bit_reference(_Bit_type * __x, _Bit_type __y)
: _M_p(__x), _M_mask(__y) { }
#pragma empty_line
_Bit_reference() : _M_p(0), _M_mask(0) { }
#pragma empty_line
operator bool() const
{ return !!(*_M_p & _M_mask); }
#pragma empty_line
_Bit_reference&
operator=(bool __x)
{
if (__x)
*_M_p |= _M_mask;
else
*_M_p &= ~_M_mask;
return *this;
}
#pragma empty_line
_Bit_reference&
operator=(const _Bit_reference& __x)
{ return *this = bool(__x); }
#pragma empty_line
bool
operator==(const _Bit_reference& __x) const
{ return bool(*this) == bool(__x); }
#pragma empty_line
bool
operator<(const _Bit_reference& __x) const
{ return !bool(*this) && bool(__x); }
#pragma empty_line
void
flip()
{ *_M_p ^= _M_mask; }
};
#pragma empty_line
struct _Bit_iterator_base
: public std::iterator<std::random_access_iterator_tag, bool>
{
_Bit_type * _M_p;
unsigned int _M_offset;
#pragma empty_line
_Bit_iterator_base(_Bit_type * __x, unsigned int __y)
: _M_p(__x), _M_offset(__y) { }
#pragma empty_line
void
_M_bump_up()
{
if (_M_offset++ == int(_S_word_bit) - 1)
{
_M_offset = 0;
++_M_p;
}
}
#pragma empty_line
void
_M_bump_down()
{
if (_M_offset-- == 0)
{
_M_offset = int(_S_word_bit) - 1;
--_M_p;
}
}
#pragma empty_line
void
_M_incr(ptrdiff_t __i)
{
difference_type __n = __i + _M_offset;
_M_p += __n / int(_S_word_bit);
__n = __n % int(_S_word_bit);
if (__n < 0)
{
__n += int(_S_word_bit);
--_M_p;
}
_M_offset = static_cast<unsigned int>(__n);
}
#pragma empty_line
bool
operator==(const _Bit_iterator_base& __i) const
{ return _M_p == __i._M_p && _M_offset == __i._M_offset; }
#pragma empty_line
bool
operator<(const _Bit_iterator_base& __i) const
{
return _M_p < __i._M_p
|| (_M_p == __i._M_p && _M_offset < __i._M_offset);
}
#pragma empty_line
bool
operator!=(const _Bit_iterator_base& __i) const
{ return !(*this == __i); }
#pragma empty_line
bool
operator>(const _Bit_iterator_base& __i) const
{ return __i < *this; }
#pragma empty_line
bool
operator<=(const _Bit_iterator_base& __i) const
{ return !(__i < *this); }
#pragma empty_line
bool
operator>=(const _Bit_iterator_base& __i) const
{ return !(*this < __i); }
};
#pragma empty_line
inline ptrdiff_t
operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
{
return (int(_S_word_bit) * (__x._M_p - __y._M_p)
+ __x._M_offset - __y._M_offset);
}
#pragma empty_line
struct _Bit_iterator : public _Bit_iterator_base
{
typedef _Bit_reference reference;
typedef _Bit_reference* pointer;
typedef _Bit_iterator iterator;
#pragma empty_line
_Bit_iterator() : _Bit_iterator_base(0, 0) { }
#pragma empty_line
_Bit_iterator(_Bit_type * __x, unsigned int __y)
: _Bit_iterator_base(__x, __y) { }
#pragma empty_line
reference
operator*() const
{ return reference(_M_p, 1UL << _M_offset); }
#pragma empty_line
iterator&
operator++()
{
_M_bump_up();
return *this;
}
#pragma empty_line
iterator
operator++(int)
{
iterator __tmp = *this;
_M_bump_up();
return __tmp;
}
#pragma empty_line
iterator&
operator--()
{
_M_bump_down();
return *this;
}
#pragma empty_line
iterator
operator--(int)
{
iterator __tmp = *this;
_M_bump_down();
return __tmp;
}
#pragma empty_line
iterator&
operator+=(difference_type __i)
{
_M_incr(__i);
return *this;
}
#pragma empty_line
iterator&
operator-=(difference_type __i)
{
*this += -__i;
return *this;
}
#pragma empty_line
iterator
operator+(difference_type __i) const
{
iterator __tmp = *this;
return __tmp += __i;
}
#pragma empty_line
iterator
operator-(difference_type __i) const
{
iterator __tmp = *this;
return __tmp -= __i;
}
#pragma empty_line
reference
operator[](difference_type __i) const
{ return *(*this + __i); }
};
#pragma empty_line
inline _Bit_iterator
operator+(ptrdiff_t __n, const _Bit_iterator& __x)
{ return __x + __n; }
#pragma empty_line
struct _Bit_const_iterator : public _Bit_iterator_base
{
typedef bool reference;
typedef bool const_reference;
typedef const bool* pointer;
typedef _Bit_const_iterator const_iterator;
#pragma empty_line
_Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
#pragma empty_line
_Bit_const_iterator(_Bit_type * __x, unsigned int __y)
: _Bit_iterator_base(__x, __y) { }
#pragma empty_line
_Bit_const_iterator(const _Bit_iterator& __x)
: _Bit_iterator_base(__x._M_p, __x._M_offset) { }
#pragma empty_line
const_reference
operator*() const
{ return _Bit_reference(_M_p, 1UL << _M_offset); }
#pragma empty_line
const_iterator&
operator++()
{
_M_bump_up();
return *this;
}
#pragma empty_line
const_iterator
operator++(int)
{
const_iterator __tmp = *this;
_M_bump_up();
return __tmp;
}
#pragma empty_line
const_iterator&
operator--()
{
_M_bump_down();
return *this;
}
#pragma empty_line
const_iterator
operator--(int)
{
const_iterator __tmp = *this;
_M_bump_down();
return __tmp;
}
#pragma empty_line
const_iterator&
operator+=(difference_type __i)
{
_M_incr(__i);
return *this;
}
#pragma empty_line
const_iterator&
operator-=(difference_type __i)
{
*this += -__i;
return *this;
}
#pragma empty_line
const_iterator
operator+(difference_type __i) const
{
const_iterator __tmp = *this;
return __tmp += __i;
}
#pragma empty_line
const_iterator
operator-(difference_type __i) const
{
const_iterator __tmp = *this;
return __tmp -= __i;
}
#pragma empty_line
const_reference
operator[](difference_type __i) const
{ return *(*this + __i); }
};
#pragma empty_line
inline _Bit_const_iterator
operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
{ return __x + __n; }
#pragma empty_line
inline void
__fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x)
{
for (; __first != __last; ++__first)
*__first = __x;
}
#pragma empty_line
inline void
fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x)
{
if (__first._M_p != __last._M_p)
{
std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0);
__fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x);
__fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x);
}
else
__fill_bvector(__first, __last, __x);
}
#pragma empty_line
template<typename _Alloc>
struct _Bvector_base
{
typedef typename _Alloc::template rebind<_Bit_type>::other
_Bit_alloc_type;
#pragma empty_line
struct _Bvector_impl
: public _Bit_alloc_type
{
_Bit_iterator _M_start;
_Bit_iterator _M_finish;
_Bit_type* _M_end_of_storage;
#pragma empty_line
_Bvector_impl()
: _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0)
{ }
#pragma empty_line
_Bvector_impl(const _Bit_alloc_type& __a)
: _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
{ }
};
#pragma empty_line
public:
typedef _Alloc allocator_type;
#pragma empty_line
_Bit_alloc_type&
_M_get_Bit_allocator()
{ return *static_cast<_Bit_alloc_type*>(&this->_M_impl); }
#pragma empty_line
const _Bit_alloc_type&
_M_get_Bit_allocator() const
{ return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
#pragma empty_line
allocator_type
get_allocator() const
{ return allocator_type(_M_get_Bit_allocator()); }
#pragma empty_line
_Bvector_base()
: _M_impl() { }
#pragma empty_line
_Bvector_base(const allocator_type& __a)
: _M_impl(__a) { }
#pragma line 431 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 3
~_Bvector_base()
{ this->_M_deallocate(); }
#pragma empty_line
protected:
_Bvector_impl _M_impl;
#pragma empty_line
_Bit_type*
_M_allocate(size_t __n)
{ return _M_impl.allocate((__n + int(_S_word_bit) - 1)
/ int(_S_word_bit)); }
#pragma empty_line
void
_M_deallocate()
{
if (_M_impl._M_start._M_p)
_M_impl.deallocate(_M_impl._M_start._M_p,
_M_impl._M_end_of_storage - _M_impl._M_start._M_p);
}
};
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace std
{
#pragma empty_line
#pragma line 478 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 3
template<typename _Alloc>
class vector<bool, _Alloc> : protected _Bvector_base<_Alloc>
{
typedef _Bvector_base<_Alloc> _Base;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef bool value_type;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Bit_reference reference;
typedef bool const_reference;
typedef _Bit_reference* pointer;
typedef const bool* const_pointer;
typedef _Bit_iterator iterator;
typedef _Bit_const_iterator const_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef _Alloc allocator_type;
#pragma empty_line
allocator_type get_allocator() const
{ return _Base::get_allocator(); }
#pragma empty_line
protected:
using _Base::_M_allocate;
using _Base::_M_deallocate;
using _Base::_M_get_Bit_allocator;
#pragma empty_line
public:
vector()
: _Base() { }
#pragma empty_line
explicit
vector(const allocator_type& __a)
: _Base(__a) { }
#pragma empty_line
explicit
vector(size_type __n, const bool& __value = bool(),
const allocator_type& __a = allocator_type())
: _Base(__a)
{
_M_initialize(__n);
std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage,
__value ? ~0 : 0);
}
#pragma empty_line
vector(const vector& __x)
: _Base(__x._M_get_Bit_allocator())
{
_M_initialize(__x.size());
_M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start);
}
#pragma line 547 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 3
template<typename _InputIterator>
vector(_InputIterator __first, _InputIterator __last,
const allocator_type& __a = allocator_type())
: _Base(__a)
{
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_initialize_dispatch(__first, __last, _Integral());
}
#pragma empty_line
~vector() { }
#pragma empty_line
vector&
operator=(const vector& __x)
{
if (&__x == this)
return *this;
if (__x.size() > capacity())
{
this->_M_deallocate();
_M_initialize(__x.size());
}
this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(),
begin());
return *this;
}
#pragma line 596 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 3
void
assign(size_type __n, const bool& __x)
{ _M_fill_assign(__n, __x); }
#pragma empty_line
template<typename _InputIterator>
void
assign(_InputIterator __first, _InputIterator __last)
{
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_assign_dispatch(__first, __last, _Integral());
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
iterator
begin()
{ return this->_M_impl._M_start; }
#pragma empty_line
const_iterator
begin() const
{ return this->_M_impl._M_start; }
#pragma empty_line
iterator
end()
{ return this->_M_impl._M_finish; }
#pragma empty_line
const_iterator
end() const
{ return this->_M_impl._M_finish; }
#pragma empty_line
reverse_iterator
rbegin()
{ return reverse_iterator(end()); }
#pragma empty_line
const_reverse_iterator
rbegin() const
{ return const_reverse_iterator(end()); }
#pragma empty_line
reverse_iterator
rend()
{ return reverse_iterator(begin()); }
#pragma empty_line
const_reverse_iterator
rend() const
{ return const_reverse_iterator(begin()); }
#pragma line 664 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_bvector.h" 3
size_type
size() const
{ return size_type(end() - begin()); }
#pragma empty_line
size_type
max_size() const
{
const size_type __isize =
__gnu_cxx::__numeric_traits<difference_type>::__max
- int(_S_word_bit) + 1;
const size_type __asize = _M_get_Bit_allocator().max_size();
return (__asize <= __isize / int(_S_word_bit)
? __asize * int(_S_word_bit) : __isize);
}
#pragma empty_line
size_type
capacity() const
{ return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
- begin()); }
#pragma empty_line
bool
empty() const
{ return begin() == end(); }
#pragma empty_line
reference
operator[](size_type __n)
{
return *iterator(this->_M_impl._M_start._M_p
+ __n / int(_S_word_bit), __n % int(_S_word_bit));
}
#pragma empty_line
const_reference
operator[](size_type __n) const
{
return *const_iterator(this->_M_impl._M_start._M_p
+ __n / int(_S_word_bit), __n % int(_S_word_bit));
}
#pragma empty_line
protected:
void
_M_range_check(size_type __n) const
{
if (__n >= this->size())
__throw_out_of_range(("vector<bool>::_M_range_check"));
}
#pragma empty_line
public:
reference
at(size_type __n)
{ _M_range_check(__n); return (*this)[__n]; }
#pragma empty_line
const_reference
at(size_type __n) const
{ _M_range_check(__n); return (*this)[__n]; }
#pragma empty_line
void
reserve(size_type __n);
#pragma empty_line
reference
front()
{ return *begin(); }
#pragma empty_line
const_reference
front() const
{ return *begin(); }
#pragma empty_line
reference
back()
{ return *(end() - 1); }
#pragma empty_line
const_reference
back() const
{ return *(end() - 1); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
data() { }
#pragma empty_line
void
push_back(bool __x)
{
if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
*this->_M_impl._M_finish++ = __x;
else
_M_insert_aux(end(), __x);
}
#pragma empty_line
void
swap(vector& __x)
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
std::swap(this->_M_impl._M_end_of_storage,
__x._M_impl._M_end_of_storage);
#pragma empty_line
#pragma empty_line
#pragma empty_line
std::__alloc_swap<typename _Base::_Bit_alloc_type>::
_S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator());
}
#pragma empty_line
#pragma empty_line
static void
swap(reference __x, reference __y)
{
bool __tmp = __x;
__x = __y;
__y = __tmp;
}
#pragma empty_line
iterator
insert(iterator __position, const bool& __x = bool())
{
const difference_type __n = __position - begin();
if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
&& __position == end())
*this->_M_impl._M_finish++ = __x;
else
_M_insert_aux(__position, __x);
return begin() + __n;
}
#pragma empty_line
template<typename _InputIterator>
void
insert(iterator __position,
_InputIterator __first, _InputIterator __last)
{
typedef typename std::__is_integer<_InputIterator>::__type _Integral;
_M_insert_dispatch(__position, __first, __last, _Integral());
}
#pragma empty_line
void
insert(iterator __position, size_type __n, const bool& __x)
{ _M_fill_insert(__position, __n, __x); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
pop_back()
{ --this->_M_impl._M_finish; }
#pragma empty_line
iterator
erase(iterator __position)
{
if (__position + 1 != end())
std::copy(__position + 1, end(), __position);
--this->_M_impl._M_finish;
return __position;
}
#pragma empty_line
iterator
erase(iterator __first, iterator __last)
{
if (__first != __last)
_M_erase_at_end(std::copy(__last, end(), __first));
return __first;
}
#pragma empty_line
void
resize(size_type __new_size, bool __x = bool())
{
if (__new_size < size())
_M_erase_at_end(begin() + difference_type(__new_size));
else
insert(end(), __new_size - size(), __x);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
void
flip()
{
for (_Bit_type * __p = this->_M_impl._M_start._M_p;
__p != this->_M_impl._M_end_of_storage; ++__p)
*__p = ~*__p;
}
#pragma empty_line
void
clear()
{ _M_erase_at_end(begin()); }
#pragma empty_line
#pragma empty_line
protected:
#pragma empty_line
iterator
_M_copy_aligned(const_iterator __first, const_iterator __last,
iterator __result)
{
_Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p);
return std::copy(const_iterator(__last._M_p, 0), __last,
iterator(__q, 0));
}
#pragma empty_line
void
_M_initialize(size_type __n)
{
_Bit_type* __q = this->_M_allocate(__n);
this->_M_impl._M_end_of_storage = (__q
+ ((__n + int(_S_word_bit) - 1)
/ int(_S_word_bit)));
this->_M_impl._M_start = iterator(__q, 0);
this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
_M_initialize(static_cast<size_type>(__n));
std::fill(this->_M_impl._M_start._M_p,
this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
}
#pragma empty_line
template<typename _InputIterator>
void
_M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{ _M_initialize_range(__first, __last,
std::__iterator_category(__first)); }
#pragma empty_line
template<typename _InputIterator>
void
_M_initialize_range(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{
for (; __first != __last; ++__first)
push_back(*__first);
}
#pragma empty_line
template<typename _ForwardIterator>
void
_M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag)
{
const size_type __n = std::distance(__first, __last);
_M_initialize(__n);
std::copy(__first, __last, this->_M_impl._M_start);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{ _M_fill_assign(__n, __val); }
#pragma empty_line
template<class _InputIterator>
void
_M_assign_dispatch(_InputIterator __first, _InputIterator __last,
__false_type)
{ _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
#pragma empty_line
void
_M_fill_assign(size_t __n, bool __x)
{
if (__n > size())
{
std::fill(this->_M_impl._M_start._M_p,
this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
insert(end(), __n - size(), __x);
}
else
{
_M_erase_at_end(begin() + __n);
std::fill(this->_M_impl._M_start._M_p,
this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
}
}
#pragma empty_line
template<typename _InputIterator>
void
_M_assign_aux(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{
iterator __cur = begin();
for (; __first != __last && __cur != end(); ++__cur, ++__first)
*__cur = *__first;
if (__first == __last)
_M_erase_at_end(__cur);
else
insert(end(), __first, __last);
}
#pragma empty_line
template<typename _ForwardIterator>
void
_M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag)
{
const size_type __len = std::distance(__first, __last);
if (__len < size())
_M_erase_at_end(std::copy(__first, __last, begin()));
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, size());
std::copy(__first, __mid, begin());
insert(end(), __mid, __last);
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
__true_type)
{ _M_fill_insert(__pos, __n, __x); }
#pragma empty_line
template<typename _InputIterator>
void
_M_insert_dispatch(iterator __pos,
_InputIterator __first, _InputIterator __last,
__false_type)
{ _M_insert_range(__pos, __first, __last,
std::__iterator_category(__first)); }
#pragma empty_line
void
_M_fill_insert(iterator __position, size_type __n, bool __x);
#pragma empty_line
template<typename _InputIterator>
void
_M_insert_range(iterator __pos, _InputIterator __first,
_InputIterator __last, std::input_iterator_tag)
{
for (; __first != __last; ++__first)
{
__pos = insert(__pos, *__first);
++__pos;
}
}
#pragma empty_line
template<typename _ForwardIterator>
void
_M_insert_range(iterator __position, _ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag);
#pragma empty_line
void
_M_insert_aux(iterator __position, bool __x);
#pragma empty_line
size_type
_M_check_len(size_type __n, const char* __s) const
{
if (max_size() - size() < __n)
__throw_length_error((__s));
#pragma empty_line
const size_type __len = size() + std::max(size(), __n);
return (__len < size() || __len > max_size()) ? max_size() : __len;
}
#pragma empty_line
void
_M_erase_at_end(iterator __pos)
{ this->_M_impl._M_finish = __pos; }
};
#pragma empty_line
#pragma empty_line
}
#pragma line 67 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/vector" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/vector.tcc" 1 3
#pragma line 60 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/vector.tcc" 3
namespace std
{
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Alloc>
void
vector<_Tp, _Alloc>::
reserve(size_type __n)
{
if (__n > this->max_size())
__throw_length_error(("vector::reserve"));
if (this->capacity() < __n)
{
const size_type __old_size = size();
pointer __tmp = _M_allocate_and_copy(__n,
(this->_M_impl._M_start),
(this->_M_impl._M_finish));
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __tmp;
this->_M_impl._M_finish = __tmp + __old_size;
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
}
}
#pragma line 106 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/vector.tcc" 3
template<typename _Tp, typename _Alloc>
typename vector<_Tp, _Alloc>::iterator
vector<_Tp, _Alloc>::
insert(iterator __position, const value_type& __x)
{
const size_type __n = __position - begin();
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
&& __position == end())
{
this->_M_impl.construct(this->_M_impl._M_finish, __x);
++this->_M_impl._M_finish;
}
else
{
#pragma line 128 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/vector.tcc" 3
_M_insert_aux(__position, __x);
}
return iterator(this->_M_impl._M_start + __n);
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
typename vector<_Tp, _Alloc>::iterator
vector<_Tp, _Alloc>::
erase(iterator __position)
{
if (__position + 1 != end())
std::copy(__position + 1, end(), __position);
--this->_M_impl._M_finish;
this->_M_impl.destroy(this->_M_impl._M_finish);
return __position;
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
typename vector<_Tp, _Alloc>::iterator
vector<_Tp, _Alloc>::
erase(iterator __first, iterator __last)
{
if (__first != __last)
{
if (__last != end())
std::copy(__last, end(), __first);
_M_erase_at_end(__first.base() + (end() - __last));
}
return __first;
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
vector<_Tp, _Alloc>&
vector<_Tp, _Alloc>::
operator=(const vector<_Tp, _Alloc>& __x)
{
if (&__x != this)
{
const size_type __xlen = __x.size();
if (__xlen > capacity())
{
pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
__x.end());
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __tmp;
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
}
else if (size() >= __xlen)
{
std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
end(), _M_get_Tp_allocator());
}
else
{
std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
this->_M_impl._M_start);
std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
__x._M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
}
this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
}
return *this;
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
void
vector<_Tp, _Alloc>::
_M_fill_assign(size_t __n, const value_type& __val)
{
if (__n > capacity())
{
vector __tmp(__n, __val, _M_get_Tp_allocator());
__tmp.swap(*this);
}
else if (__n > size())
{
std::fill(begin(), end(), __val);
std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
__n - size(), __val,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n - size();
}
else
_M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
template<typename _InputIterator>
void
vector<_Tp, _Alloc>::
_M_assign_aux(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{
pointer __cur(this->_M_impl._M_start);
for (; __first != __last && __cur != this->_M_impl._M_finish;
++__cur, ++__first)
*__cur = *__first;
if (__first == __last)
_M_erase_at_end(__cur);
else
insert(end(), __first, __last);
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
template<typename _ForwardIterator>
void
vector<_Tp, _Alloc>::
_M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
std::forward_iterator_tag)
{
const size_type __len = std::distance(__first, __last);
#pragma empty_line
if (__len > capacity())
{
pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __tmp;
this->_M_impl._M_finish = this->_M_impl._M_start + __len;
this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
}
else if (size() >= __len)
_M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, size());
std::copy(__first, __mid, this->_M_impl._M_start);
this->_M_impl._M_finish =
std::__uninitialized_copy_a(__mid, __last,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
}
}
#pragma line 298 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/vector.tcc" 3
template<typename _Tp, typename _Alloc>
void
vector<_Tp, _Alloc>::
_M_insert_aux(iterator __position, const _Tp& __x)
#pragma empty_line
{
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
this->_M_impl.construct(this->_M_impl._M_finish,
(*(this->_M_impl._M_finish - 1))
);
++this->_M_impl._M_finish;
#pragma empty_line
_Tp __x_copy = __x;
#pragma empty_line
std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1)
#pragma empty_line
;
#pragma empty_line
*__position = __x_copy;
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
else
{
const size_type __len =
_M_check_len(size_type(1), "vector::_M_insert_aux");
const size_type __elems_before = __position - begin();
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
try
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
this->_M_impl.construct(__new_start + __elems_before,
#pragma empty_line
#pragma empty_line
#pragma empty_line
__x);
#pragma empty_line
__new_finish = 0;
#pragma empty_line
__new_finish =
std::__uninitialized_move_a(this->_M_impl._M_start,
__position.base(), __new_start,
_M_get_Tp_allocator());
++__new_finish;
#pragma empty_line
__new_finish =
std::__uninitialized_move_a(__position.base(),
this->_M_impl._M_finish,
__new_finish,
_M_get_Tp_allocator());
}
catch(...)
{
if (!__new_finish)
this->_M_impl.destroy(__new_start + __elems_before);
else
std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
_M_deallocate(__new_start, __len);
throw;
}
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __new_start;
this->_M_impl._M_finish = __new_finish;
this->_M_impl._M_end_of_storage = __new_start + __len;
}
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
void
vector<_Tp, _Alloc>::
_M_fill_insert(iterator __position, size_type __n, const value_type& __x)
{
if (__n != 0)
{
if (size_type(this->_M_impl._M_end_of_storage
- this->_M_impl._M_finish) >= __n)
{
value_type __x_copy = __x;
const size_type __elems_after = end() - __position;
pointer __old_finish(this->_M_impl._M_finish);
if (__elems_after > __n)
{
std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n;
std::copy_backward(__position.base(), __old_finish - __n, __old_finish)
;
std::fill(__position.base(), __position.base() + __n,
__x_copy);
}
else
{
std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
__n - __elems_after,
__x_copy,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n - __elems_after;
std::__uninitialized_move_a(__position.base(), __old_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __elems_after;
std::fill(__position.base(), __old_finish, __x_copy);
}
}
else
{
const size_type __len =
_M_check_len(__n, "vector::_M_fill_insert");
const size_type __elems_before = __position - begin();
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
try
{
#pragma empty_line
std::__uninitialized_fill_n_a(__new_start + __elems_before,
__n, __x,
_M_get_Tp_allocator());
__new_finish = 0;
#pragma empty_line
__new_finish =
std::__uninitialized_move_a(this->_M_impl._M_start,
__position.base(),
__new_start,
_M_get_Tp_allocator());
__new_finish += __n;
#pragma empty_line
__new_finish =
std::__uninitialized_move_a(__position.base(),
this->_M_impl._M_finish,
__new_finish,
_M_get_Tp_allocator());
}
catch(...)
{
if (!__new_finish)
std::_Destroy(__new_start + __elems_before,
__new_start + __elems_before + __n,
_M_get_Tp_allocator());
else
std::_Destroy(__new_start, __new_finish,
_M_get_Tp_allocator());
_M_deallocate(__new_start, __len);
throw;
}
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __new_start;
this->_M_impl._M_finish = __new_finish;
this->_M_impl._M_end_of_storage = __new_start + __len;
}
}
}
#pragma line 519 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/vector.tcc" 3
template<typename _Tp, typename _Alloc>
template<typename _InputIterator>
void
vector<_Tp, _Alloc>::
_M_range_insert(iterator __pos, _InputIterator __first,
_InputIterator __last, std::input_iterator_tag)
{
for (; __first != __last; ++__first)
{
__pos = insert(__pos, *__first);
++__pos;
}
}
#pragma empty_line
template<typename _Tp, typename _Alloc>
template<typename _ForwardIterator>
void
vector<_Tp, _Alloc>::
_M_range_insert(iterator __position, _ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag)
{
if (__first != __last)
{
const size_type __n = std::distance(__first, __last);
if (size_type(this->_M_impl._M_end_of_storage
- this->_M_impl._M_finish) >= __n)
{
const size_type __elems_after = end() - __position;
pointer __old_finish(this->_M_impl._M_finish);
if (__elems_after > __n)
{
std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n;
std::copy_backward(__position.base(), __old_finish - __n, __old_finish)
;
std::copy(__first, __last, __position);
}
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, __elems_after);
std::__uninitialized_copy_a(__mid, __last,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n - __elems_after;
std::__uninitialized_move_a(__position.base(),
__old_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __elems_after;
std::copy(__first, __mid, __position);
}
}
else
{
const size_type __len =
_M_check_len(__n, "vector::_M_range_insert");
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
try
{
__new_finish =
std::__uninitialized_move_a(this->_M_impl._M_start,
__position.base(),
__new_start,
_M_get_Tp_allocator());
__new_finish =
std::__uninitialized_copy_a(__first, __last,
__new_finish,
_M_get_Tp_allocator());
__new_finish =
std::__uninitialized_move_a(__position.base(),
this->_M_impl._M_finish,
__new_finish,
_M_get_Tp_allocator());
}
catch(...)
{
std::_Destroy(__new_start, __new_finish,
_M_get_Tp_allocator());
_M_deallocate(__new_start, __len);
throw;
}
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
this->_M_impl._M_end_of_storage
- this->_M_impl._M_start);
this->_M_impl._M_start = __new_start;
this->_M_impl._M_finish = __new_finish;
this->_M_impl._M_end_of_storage = __new_start + __len;
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Alloc>
void
vector<bool, _Alloc>::
reserve(size_type __n)
{
if (__n > this->max_size())
__throw_length_error(("vector::reserve"));
if (this->capacity() < __n)
{
_Bit_type* __q = this->_M_allocate(__n);
this->_M_impl._M_finish = _M_copy_aligned(begin(), end(),
iterator(__q, 0));
this->_M_deallocate();
this->_M_impl._M_start = iterator(__q, 0);
this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
/ int(_S_word_bit));
}
}
#pragma empty_line
template<typename _Alloc>
void
vector<bool, _Alloc>::
_M_fill_insert(iterator __position, size_type __n, bool __x)
{
if (__n == 0)
return;
if (capacity() - size() >= __n)
{
std::copy_backward(__position, end(),
this->_M_impl._M_finish + difference_type(__n));
std::fill(__position, __position + difference_type(__n), __x);
this->_M_impl._M_finish += difference_type(__n);
}
else
{
const size_type __len =
_M_check_len(__n, "vector<bool>::_M_fill_insert");
_Bit_type * __q = this->_M_allocate(__len);
iterator __i = _M_copy_aligned(begin(), __position,
iterator(__q, 0));
std::fill(__i, __i + difference_type(__n), __x);
this->_M_impl._M_finish = std::copy(__position, end(),
__i + difference_type(__n));
this->_M_deallocate();
this->_M_impl._M_end_of_storage = (__q + ((__len
+ int(_S_word_bit) - 1)
/ int(_S_word_bit)));
this->_M_impl._M_start = iterator(__q, 0);
}
}
#pragma empty_line
template<typename _Alloc>
template<typename _ForwardIterator>
void
vector<bool, _Alloc>::
_M_insert_range(iterator __position, _ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag)
{
if (__first != __last)
{
size_type __n = std::distance(__first, __last);
if (capacity() - size() >= __n)
{
std::copy_backward(__position, end(),
this->_M_impl._M_finish
+ difference_type(__n));
std::copy(__first, __last, __position);
this->_M_impl._M_finish += difference_type(__n);
}
else
{
const size_type __len =
_M_check_len(__n, "vector<bool>::_M_insert_range");
_Bit_type * __q = this->_M_allocate(__len);
iterator __i = _M_copy_aligned(begin(), __position,
iterator(__q, 0));
__i = std::copy(__first, __last, __i);
this->_M_impl._M_finish = std::copy(__position, end(), __i);
this->_M_deallocate();
this->_M_impl._M_end_of_storage = (__q
+ ((__len
+ int(_S_word_bit) - 1)
/ int(_S_word_bit)));
this->_M_impl._M_start = iterator(__q, 0);
}
}
}
#pragma empty_line
template<typename _Alloc>
void
vector<bool, _Alloc>::
_M_insert_aux(iterator __position, bool __x)
{
if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
{
std::copy_backward(__position, this->_M_impl._M_finish,
this->_M_impl._M_finish + 1);
*__position = __x;
++this->_M_impl._M_finish;
}
else
{
const size_type __len =
_M_check_len(size_type(1), "vector<bool>::_M_insert_aux");
_Bit_type * __q = this->_M_allocate(__len);
iterator __i = _M_copy_aligned(begin(), __position,
iterator(__q, 0));
*__i++ = __x;
this->_M_impl._M_finish = std::copy(__position, end(), __i);
this->_M_deallocate();
this->_M_impl._M_end_of_storage = (__q + ((__len
+ int(_S_word_bit) - 1)
/ int(_S_word_bit)));
this->_M_impl._M_start = iterator(__q, 0);
}
}
#pragma empty_line
#pragma empty_line
}
#pragma line 71 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/vector" 2 3
#pragma line 63 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/queue" 2 3
#pragma empty_line
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 1 3
#pragma line 64 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
namespace std
{
#pragma empty_line
#pragma line 91 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
template<typename _Tp, typename _Sequence = deque<_Tp> >
class queue
{
#pragma empty_line
typedef typename _Sequence::value_type _Sequence_value_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename _Tp1, typename _Seq1>
friend bool
operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
#pragma empty_line
template<typename _Tp1, typename _Seq1>
friend bool
operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
#pragma empty_line
public:
typedef typename _Sequence::value_type value_type;
typedef typename _Sequence::reference reference;
typedef typename _Sequence::const_reference const_reference;
typedef typename _Sequence::size_type size_type;
typedef _Sequence container_type;
#pragma empty_line
protected:
#pragma line 125 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
_Sequence c;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
queue(const _Sequence& __c = _Sequence())
: c(__c) { }
#pragma line 148 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
bool
empty() const
{ return c.empty(); }
#pragma empty_line
#pragma empty_line
size_type
size() const
{ return c.size(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
front()
{
;
return c.front();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
front() const
{
;
return c.front();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
reference
back()
{
;
return c.back();
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
back() const
{
;
return c.back();
}
#pragma line 210 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
void
push(const value_type& __x)
{ c.push_back(__x); }
#pragma line 236 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
void
pop()
{
;
c.pop_front();
}
#pragma line 251 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
};
#pragma line 264 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
template<typename _Tp, typename _Seq>
inline bool
operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return __x.c == __y.c; }
#pragma line 282 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
template<typename _Tp, typename _Seq>
inline bool
operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return __x.c < __y.c; }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Seq>
inline bool
operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__x == __y); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Seq>
inline bool
operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return __y < __x; }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Seq>
inline bool
operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__y < __x); }
#pragma empty_line
#pragma empty_line
template<typename _Tp, typename _Seq>
inline bool
operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__x < __y); }
#pragma line 357 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
template<typename _Tp, typename _Sequence = vector<_Tp>,
typename _Compare = less<typename _Sequence::value_type> >
class priority_queue
{
#pragma empty_line
typedef typename _Sequence::value_type _Sequence_value_type;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
typedef typename _Sequence::value_type value_type;
typedef typename _Sequence::reference reference;
typedef typename _Sequence::const_reference const_reference;
typedef typename _Sequence::size_type size_type;
typedef _Sequence container_type;
#pragma empty_line
protected:
#pragma empty_line
_Sequence c;
_Compare comp;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
explicit
priority_queue(const _Compare& __x = _Compare(),
const _Sequence& __s = _Sequence())
: c(__s), comp(__x)
{ std::make_heap(c.begin(), c.end(), comp); }
#pragma line 422 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
template<typename _InputIterator>
priority_queue(_InputIterator __first, _InputIterator __last,
const _Compare& __x = _Compare(),
const _Sequence& __s = _Sequence())
: c(__s), comp(__x)
{
;
c.insert(c.end(), __first, __last);
std::make_heap(c.begin(), c.end(), comp);
}
#pragma line 459 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
bool
empty() const
{ return c.empty(); }
#pragma empty_line
#pragma empty_line
size_type
size() const
{ return c.size(); }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
const_reference
top() const
{
;
return c.front();
}
#pragma line 487 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
void
push(const value_type& __x)
{
c.push_back(__x);
std::push_heap(c.begin(), c.end(), comp);
}
#pragma line 522 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
void
pop()
{
;
std::pop_heap(c.begin(), c.end(), comp);
c.pop_back();
}
#pragma line 539 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
};
#pragma line 556 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_queue.h" 3
#pragma empty_line
}
#pragma line 66 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/queue" 2 3
#pragma line 80 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h" 2
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/typeinfo" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/typeinfo" 3
#pragma empty_line
#pragma line 35 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/typeinfo" 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma GCC visibility push(default)
#pragma empty_line
extern "C++" {
#pragma empty_line
namespace __cxxabiv1
{
class __class_type_info;
}
#pragma line 83 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/typeinfo" 3
namespace std
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class type_info
{
public:
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual ~type_info();
#pragma empty_line
#pragma empty_line
#pragma empty_line
const char* name() const
{ return __name[0] == '*' ? __name + 1 : __name; }
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool before(const type_info& __arg) const;
bool operator==(const type_info& __arg) const;
#pragma line 139 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/typeinfo" 3
bool operator!=(const type_info& __arg) const
{ return !operator==(__arg); }
#pragma line 155 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/typeinfo" 3
virtual bool __is_pointer_p() const;
#pragma empty_line
#pragma empty_line
virtual bool __is_function_p() const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
unsigned __outer) const;
#pragma empty_line
#pragma empty_line
virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
#pragma empty_line
protected:
const char *__name;
#pragma empty_line
explicit type_info(const char *__n): __name(__n) { }
#pragma empty_line
private:
#pragma empty_line
type_info& operator=(const type_info&);
type_info(const type_info&);
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class bad_cast : public exception
{
public:
bad_cast() throw() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual ~bad_cast() throw();
#pragma empty_line
#pragma empty_line
virtual const char* what() const throw();
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
class bad_typeid : public exception
{
public:
bad_typeid () throw() { }
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual ~bad_typeid() throw();
#pragma empty_line
#pragma empty_line
virtual const char* what() const throw();
};
}
#pragma empty_line
#pragma GCC visibility pop
#pragma empty_line
}
#pragma line 82 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h" 2
#pragma line 91 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h"
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 1 3
#pragma line 45 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
#pragma empty_line
#pragma line 46 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
#pragma empty_line
#pragma GCC visibility push(default)
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4
#pragma line 50 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 2 3
#pragma empty_line
#pragma line 1 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/cxxabi_tweaks.h" 1 3
#pragma line 34 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/cxxabi_tweaks.h" 3
namespace __cxxabiv1
{
extern "C"
{
#pragma line 46 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/mingw32/bits/cxxabi_tweaks.h" 3
__extension__ typedef int __guard __attribute__((mode (__DI__)));
#pragma empty_line
#pragma empty_line
typedef void __cxa_vec_ctor_return_type;
#pragma empty_line
#pragma empty_line
typedef void __cxa_cdtor_return_type;
#pragma empty_line
#pragma empty_line
}
}
#pragma line 52 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 2 3
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __cxxabiv1
{
extern "C"
{
#pragma empty_line
#pragma empty_line
typedef __cxa_cdtor_return_type (*__cxa_cdtor_type)(void *);
#pragma empty_line
#pragma empty_line
void*
__cxa_vec_new(size_t __element_count, size_t __element_size,
size_t __padding_size, __cxa_cdtor_type __constructor,
__cxa_cdtor_type __destructor);
#pragma empty_line
void*
__cxa_vec_new2(size_t __element_count, size_t __element_size,
size_t __padding_size, __cxa_cdtor_type __constructor,
__cxa_cdtor_type __destructor, void *(*__alloc) (size_t),
void (*__dealloc) (void*));
#pragma empty_line
void*
__cxa_vec_new3(size_t __element_count, size_t __element_size,
size_t __padding_size, __cxa_cdtor_type __constructor,
__cxa_cdtor_type __destructor, void *(*__alloc) (size_t),
void (*__dealloc) (void*, size_t));
#pragma empty_line
#pragma empty_line
__cxa_vec_ctor_return_type
__cxa_vec_ctor(void* __array_address, size_t __element_count,
size_t __element_size, __cxa_cdtor_type __constructor,
__cxa_cdtor_type __destructor);
#pragma empty_line
__cxa_vec_ctor_return_type
__cxa_vec_cctor(void* __dest_array, void* __src_array,
size_t __element_count, size_t __element_size,
__cxa_cdtor_return_type (*__constructor) (void*, void*),
__cxa_cdtor_type __destructor);
#pragma empty_line
#pragma empty_line
void
__cxa_vec_dtor(void* __array_address, size_t __element_count,
size_t __element_size, __cxa_cdtor_type __destructor);
#pragma empty_line
void
__cxa_vec_cleanup(void* __array_address, size_t __element_count, size_t __s,
__cxa_cdtor_type __destructor) throw();
#pragma empty_line
#pragma empty_line
void
__cxa_vec_delete(void* __array_address, size_t __element_size,
size_t __padding_size, __cxa_cdtor_type __destructor);
#pragma empty_line
void
__cxa_vec_delete2(void* __array_address, size_t __element_size,
size_t __padding_size, __cxa_cdtor_type __destructor,
void (*__dealloc) (void*));
#pragma empty_line
void
__cxa_vec_delete3(void* __array_address, size_t __element_size,
size_t __padding_size, __cxa_cdtor_type __destructor,
void (*__dealloc) (void*, size_t));
#pragma empty_line
int
__cxa_guard_acquire(__guard*);
#pragma empty_line
void
__cxa_guard_release(__guard*) throw();
#pragma empty_line
void
__cxa_guard_abort(__guard*) throw();
#pragma empty_line
#pragma empty_line
void
__cxa_pure_virtual(void) __attribute__ ((__noreturn__));
#pragma empty_line
#pragma empty_line
void
__cxa_bad_cast();
#pragma empty_line
void
__cxa_bad_typeid();
#pragma empty_line
#pragma empty_line
int
__cxa_atexit(void (*)(void*), void*, void*) throw();
#pragma empty_line
int
__cxa_finalize(void*);
#pragma line 185 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
char*
__cxa_demangle(const char* __mangled_name, char* __output_buffer,
size_t* __length, int* __status);
#pragma empty_line
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace __cxxabiv1
{
#pragma empty_line
class __fundamental_type_info : public std::type_info
{
public:
explicit
__fundamental_type_info(const char* __n) : std::type_info(__n) { }
#pragma empty_line
virtual
~__fundamental_type_info();
};
#pragma empty_line
#pragma empty_line
class __array_type_info : public std::type_info
{
public:
explicit
__array_type_info(const char* __n) : std::type_info(__n) { }
#pragma empty_line
virtual
~__array_type_info();
};
#pragma empty_line
#pragma empty_line
class __function_type_info : public std::type_info
{
public:
explicit
__function_type_info(const char* __n) : std::type_info(__n) { }
#pragma empty_line
virtual
~__function_type_info();
#pragma empty_line
protected:
#pragma empty_line
virtual bool
__is_function_p() const;
};
#pragma empty_line
#pragma empty_line
class __enum_type_info : public std::type_info
{
public:
explicit
__enum_type_info(const char* __n) : std::type_info(__n) { }
#pragma empty_line
virtual
~__enum_type_info();
};
#pragma empty_line
#pragma empty_line
class __pbase_type_info : public std::type_info
{
public:
unsigned int __flags;
const std::type_info* __pointee;
#pragma empty_line
explicit
__pbase_type_info(const char* __n, int __quals,
const std::type_info* __type)
: std::type_info(__n), __flags(__quals), __pointee(__type)
{ }
#pragma empty_line
virtual
~__pbase_type_info();
#pragma empty_line
#pragma empty_line
enum __masks
{
__const_mask = 0x1,
__volatile_mask = 0x2,
__restrict_mask = 0x4,
__incomplete_mask = 0x8,
__incomplete_class_mask = 0x10
};
#pragma empty_line
protected:
__pbase_type_info(const __pbase_type_info&);
#pragma empty_line
__pbase_type_info&
operator=(const __pbase_type_info&);
#pragma empty_line
#pragma empty_line
virtual bool
__do_catch(const std::type_info* __thr_type, void** __thr_obj,
unsigned int __outer) const;
#pragma empty_line
inline virtual bool
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
unsigned __outer) const;
};
#pragma empty_line
#pragma empty_line
class __pointer_type_info : public __pbase_type_info
{
public:
explicit
__pointer_type_info(const char* __n, int __quals,
const std::type_info* __type)
: __pbase_type_info (__n, __quals, __type) { }
#pragma empty_line
#pragma empty_line
virtual
~__pointer_type_info();
#pragma empty_line
protected:
#pragma empty_line
virtual bool
__is_pointer_p() const;
#pragma empty_line
virtual bool
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
unsigned __outer) const;
};
#pragma empty_line
class __class_type_info;
#pragma empty_line
#pragma empty_line
class __pointer_to_member_type_info : public __pbase_type_info
{
public:
__class_type_info* __context;
#pragma empty_line
explicit
__pointer_to_member_type_info(const char* __n, int __quals,
const std::type_info* __type,
__class_type_info* __klass)
: __pbase_type_info(__n, __quals, __type), __context(__klass) { }
#pragma empty_line
virtual
~__pointer_to_member_type_info();
#pragma empty_line
protected:
__pointer_to_member_type_info(const __pointer_to_member_type_info&);
#pragma empty_line
__pointer_to_member_type_info&
operator=(const __pointer_to_member_type_info&);
#pragma empty_line
#pragma empty_line
virtual bool
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
unsigned __outer) const;
};
#pragma empty_line
#pragma empty_line
class __base_class_type_info
{
public:
const __class_type_info* __base_type;
long __offset_flags;
#pragma empty_line
enum __offset_flags_masks
{
__virtual_mask = 0x1,
__public_mask = 0x2,
__hwm_bit = 2,
__offset_shift = 8
};
#pragma empty_line
#pragma empty_line
bool
__is_virtual_p() const
{ return __offset_flags & __virtual_mask; }
#pragma empty_line
bool
__is_public_p() const
{ return __offset_flags & __public_mask; }
#pragma empty_line
ptrdiff_t
__offset() const
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
return static_cast<ptrdiff_t>(__offset_flags) >> __offset_shift;
}
};
#pragma empty_line
#pragma empty_line
class __class_type_info : public std::type_info
{
public:
explicit
__class_type_info (const char *__n) : type_info(__n) { }
#pragma empty_line
virtual
~__class_type_info ();
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
enum __sub_kind
{
#pragma empty_line
__unknown = 0,
#pragma empty_line
#pragma empty_line
#pragma empty_line
__not_contained,
#pragma empty_line
#pragma empty_line
__contained_ambig,
#pragma empty_line
#pragma empty_line
__contained_virtual_mask = __base_class_type_info::__virtual_mask,
#pragma empty_line
#pragma empty_line
__contained_public_mask = __base_class_type_info::__public_mask,
#pragma empty_line
#pragma empty_line
__contained_mask = 1 << __base_class_type_info::__hwm_bit,
#pragma empty_line
__contained_private = __contained_mask,
__contained_public = __contained_mask | __contained_public_mask
};
#pragma empty_line
struct __upcast_result;
struct __dyncast_result;
#pragma empty_line
protected:
#pragma empty_line
virtual bool
__do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const;
#pragma empty_line
virtual bool
__do_catch(const type_info* __thr_type, void** __thr_obj,
unsigned __outer) const;
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
virtual bool
__do_upcast(const __class_type_info* __dst, const void* __obj,
__upcast_result& __restrict __result) const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
inline __sub_kind
__find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
const __class_type_info* __src_type,
const void* __src_ptr) const;
#pragma line 453 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
virtual bool
__do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
const __class_type_info* __dst_type, const void* __obj_ptr,
const __class_type_info* __src_type, const void* __src_ptr,
__dyncast_result& __result) const;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
virtual __sub_kind
__do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
const __class_type_info* __src_type,
const void* __src_ptr) const;
};
#pragma empty_line
#pragma empty_line
class __si_class_type_info : public __class_type_info
{
public:
const __class_type_info* __base_type;
#pragma empty_line
explicit
__si_class_type_info(const char *__n, const __class_type_info *__base)
: __class_type_info(__n), __base_type(__base) { }
#pragma empty_line
virtual
~__si_class_type_info();
#pragma empty_line
protected:
__si_class_type_info(const __si_class_type_info&);
#pragma empty_line
__si_class_type_info&
operator=(const __si_class_type_info&);
#pragma empty_line
#pragma empty_line
virtual bool
__do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
const __class_type_info* __dst_type, const void* __obj_ptr,
const __class_type_info* __src_type, const void* __src_ptr,
__dyncast_result& __result) const;
#pragma empty_line
virtual __sub_kind
__do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
const __class_type_info* __src_type,
const void* __sub_ptr) const;
#pragma empty_line
virtual bool
__do_upcast(const __class_type_info*__dst, const void*__obj,
__upcast_result& __restrict __result) const;
};
#pragma empty_line
#pragma empty_line
class __vmi_class_type_info : public __class_type_info
{
public:
unsigned int __flags;
unsigned int __base_count;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
__base_class_type_info __base_info[1];
#pragma empty_line
explicit
__vmi_class_type_info(const char* __n, int ___flags)
: __class_type_info(__n), __flags(___flags), __base_count(0) { }
#pragma empty_line
virtual
~__vmi_class_type_info();
#pragma empty_line
#pragma empty_line
enum __flags_masks
{
__non_diamond_repeat_mask = 0x1,
__diamond_shaped_mask = 0x2,
__flags_unknown_mask = 0x10
};
#pragma empty_line
protected:
#pragma empty_line
virtual bool
__do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
const __class_type_info* __dst_type, const void* __obj_ptr,
const __class_type_info* __src_type, const void* __src_ptr,
__dyncast_result& __result) const;
#pragma empty_line
virtual __sub_kind
__do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
const __class_type_info* __src_type,
const void* __src_ptr) const;
#pragma empty_line
virtual bool
__do_upcast(const __class_type_info* __dst, const void* __obj,
__upcast_result& __restrict __result) const;
};
#pragma line 557 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
extern "C" void*
__dynamic_cast(const void* __src_ptr,
const __class_type_info* __src_type,
const __class_type_info* __dst_type,
ptrdiff_t __src2dst);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
extern "C" std::type_info*
__cxa_current_exception_type() throw() __attribute__ ((__pure__));
#pragma empty_line
#pragma empty_line
#pragma empty_line
class __foreign_exception
{
virtual ~__foreign_exception() throw();
virtual void __pure_dummy() = 0;
};
#pragma empty_line
}
#pragma line 599 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
namespace abi = __cxxabiv1;
#pragma empty_line
namespace __gnu_cxx
{
#pragma line 615 "f:\\xilinx\\vivado_hls\\2015.4\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/c++/cxxabi.h" 3
class recursive_init_error: public std::exception
{
public:
recursive_init_error() throw() { }
virtual ~recursive_init_error() throw ();
};
}
#pragma empty_line
#pragma empty_line
#pragma GCC visibility pop
#pragma line 92 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
namespace hls {
#pragma empty_line
template<typename __STREAM_T__>
class stream
{
protected:
std::string _name;
std::deque<__STREAM_T__> _data;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
stream() {
static unsigned _counter = 1;
std::stringstream ss;
#pragma empty_line
char* _demangle_name = abi::__cxa_demangle(typeid(*this).name(), 0, 0, 0);
if (_demangle_name) {
_name = _demangle_name;
free(_demangle_name);
}
else {
_name = "hls_stream";
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ss << _counter++;
_name += "." + ss.str();
}
#pragma empty_line
stream(const std::string name) {
#pragma empty_line
#pragma empty_line
_name = name;
}
#pragma empty_line
#pragma empty_line
private:
stream(const stream< __STREAM_T__ >& chn):
_name(chn._name), _data(chn._data) {
}
#pragma empty_line
stream& operator = (const stream< __STREAM_T__ >& chn) {
_name = chn._name;
_data = chn._data;
return *this;
}
#pragma empty_line
public:
#pragma empty_line
void operator >> (__STREAM_T__& rdata) {
read(rdata);
}
#pragma empty_line
void operator << (const __STREAM_T__& wdata) {
write(wdata);
}
#pragma empty_line
#pragma empty_line
public:
#pragma empty_line
#pragma empty_line
virtual ~stream() {
if (!_data.empty())
{
std::cout << "WARNING: Hls::stream '"
<< _name
<< "' contains leftover data,"
<< " which may result in RTL simulation hanging."
<< std::endl;
}
}
#pragma empty_line
#pragma empty_line
bool empty() {
#pragma empty_line
#pragma empty_line
#pragma empty_line
return _data.empty();
}
#pragma empty_line
bool full() const { return false; }
#pragma empty_line
#pragma empty_line
void read(__STREAM_T__& head) {
head = read();
}
#pragma line 202 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_stream.h"
__STREAM_T__ read() {
__STREAM_T__ elem;
if (_data.empty()) {
std::cout << "WARNING: Hls::stream '"
<< _name
<< "' is read while empty,"
<< " which may result in RTL simulation hanging."
<< std::endl;
elem = __STREAM_T__();
} else {
elem = _data.front();
_data.pop_front();
}
return elem;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
void write(const __STREAM_T__& tail) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
_data.push_back(tail);
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
#pragma empty_line
#pragma empty_line
bool read_nb(__STREAM_T__& head) {
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool is_empty = _data.empty();
if (is_empty) {
head = __STREAM_T__();
} else {
__STREAM_T__ elem(_data.front());
_data.pop_front();
head = elem;
}
return !is_empty;
}
#pragma empty_line
#pragma empty_line
bool write_nb(const __STREAM_T__& tail) {
bool is_full = full();
write(tail);
return !is_full;
}
#pragma empty_line
#pragma empty_line
size_t size() {
return _data.size();
}
};
#pragma empty_line
}
#pragma line 51 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_types.h" 1
#pragma line 175 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_types.h"
template<int T> struct Type { };
template<> struct Type<0> { typedef unsigned char name; static const int bitdepth = 8; };
template<> struct Type<1> { typedef char name; static const int bitdepth = 8; };
template<> struct Type<8> { typedef ap_uint<10> name; static const int bitdepth = 10; };
template<> struct Type<9> { typedef ap_int<10> name; static const int bitdepth = 10; };
template<> struct Type<10> { typedef ap_uint<12> name; static const int bitdepth = 12; };
template<> struct Type<11> { typedef ap_int<12> name; static const int bitdepth = 12; };
template<> struct Type<2> { typedef unsigned short name; static const int bitdepth = 16; };
template<> struct Type<3> { typedef short name; static const int bitdepth = 16; };
template<> struct Type<4> { typedef int name; static const int bitdepth = 32; };
template<> struct Type<5> { typedef float name; static const int bitdepth = 32; };
template<> struct Type<6> { typedef double name; static const int bitdepth = 64; };
#pragma empty_line
template<typename PIXEL_T> struct pixel_op_type { typedef PIXEL_T T; };
template<> struct pixel_op_type<unsigned char> { typedef ap_uint<8> T; };
template<> struct pixel_op_type<char> { typedef ap_int<8> T; };
template<> struct pixel_op_type<unsigned short> { typedef ap_uint<16> T; };
template<> struct pixel_op_type<short> { typedef ap_int<16> T; };
template<> struct pixel_op_type<unsigned int> { typedef ap_uint<32> T; };
template<> struct pixel_op_type<int> { typedef ap_int<32> T; };
template<int W> struct pixel_op_type<ap_int<W> > { typedef ap_int<W> T; };
template<int W> struct pixel_op_type<ap_uint<W> > { typedef ap_uint<W> T; };
#pragma line 223 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_types.h"
template<typename T> struct Name
{ static const int _min = -2147483647; static const int _max = 2147483647; };
template<> struct Name<unsigned char>
{ static const int _min = 0; static const int _max = 255; };
template<> struct Name<char>
{ static const int _min = -127; static const int _max = 255; };
template<> struct Name<unsigned short>
{ static const int _min = 0; static const int _max = 65535; };
template<> struct Name<short>
{ static const int _min = -32767; static const int _max = 32767; };
template<> struct Name<int>
{ static const int _min = -2147483647; static const int _max = 2147483647; };
#pragma empty_line
template<typename T>
unsigned char Convert2uchar(T v)
{
unsigned char result=0;
if(v>=255)
{
result=255;
}
else if(v>=0&&v<255)
{
ap_fixed<9,9,AP_RND> temp=v;
result=temp;
}
return result;
}
template<typename T>
char Convert2char(T v)
{
char result=-127;
if(v>=127)
{
result=127;
}
else if(v>=-127&&v<127)
{
ap_fixed<9,9,AP_RND> temp=v;
result=temp;
}
return result;
}
template<typename T>
unsigned short Convert2ushort(T v)
{
unsigned short result=0;
if(v>=65535)
{
result=65535;
}
else if(v>=0&&v<65535)
{
ap_fixed<17,17,AP_RND> temp=v;
result=temp;
}
return result;
}
template<typename T>
short Convert2short(T v)
{
short result=-32767;
if(v>=32767)
{
result=32767;
}
else if(v>=-32767&&v<32767)
{
ap_fixed<17,17,AP_RND> temp=v;
result=temp;
}
return result;
}
template<typename T>
int Convert2int(T v)
{
int result=-2147483647;
if(v>=2147483647)
{
result=2147483647;
}
else if(v>=-2147483647&&v<2147483647)
{
ap_fixed<32,32,AP_RND> temp=v;
result=temp;
}
return result;
}
typedef ap_uint<12> HLS_SIZE_T;
typedef ap_uint<5> HLS_CHANNEL_T;
#pragma empty_line
namespace hls {
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T2> class sr_cast_class { };
#pragma empty_line
template<> class sr_cast_class<float> {
public:
template<typename T1>
inline float operator()(T1 v) { return v; }
inline float operator()(double v) { return xil_fpo_flttoflt_flt_d(v); }
};
#pragma empty_line
template<> class sr_cast_class<double> {
public:
template<typename T1>
inline double operator()(T1 v) { return v; }
inline double operator()(float v) { return xil_fpo_flttoflt_d_flt(v); }
};
#pragma empty_line
template<int N2> class sr_cast_class<ap_int<N2> > {
public:
template<int N1>
inline ap_int<N2> operator()(ap_int<N1> v) {
return ap_fixed<N2,N2,AP_TRN,AP_SAT>(v);
}
template<int N1>
inline ap_int<N2> operator()(ap_uint<N1> v) {
return ap_fixed<N2,N2,AP_TRN,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
inline ap_int<N2> operator()(ap_fixed<W,I, _AP_Q, _AP_O> v) {
return ap_fixed<N2,N2,AP_RND,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
inline ap_int<N2> operator()(ap_ufixed<W,I, _AP_Q, _AP_O> v) {
return ap_fixed<N2,N2,AP_RND,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O, int N>
inline ap_int<N2> operator()(ap_fixed_base<W,I, true, _AP_Q, _AP_O, N> v) {
return ap_fixed<N2,N2,AP_RND,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O, int N>
inline ap_int<N2> operator()(ap_fixed_base<W,I, false,_AP_Q, _AP_O, N> v) {
return ap_fixed<N2,N2,AP_RND,AP_SAT>(v);
}
inline ap_int<N2> operator()(float v) {
if(::hls::__isnan(v)) return 0;
else return ap_fixed<N2,N2,AP_RND,AP_SAT>(v);
}
inline ap_int<N2> operator()(double v) {
if(::hls::__isnan(v)) return 0;
else return ap_fixed<N2,N2,AP_RND,AP_SAT>(v);
}
inline ap_int<N2> operator()(unsigned char v) {
return operator()(ap_uint<8>(v));
}
inline ap_int<N2> operator()(char v) {
return operator()(ap_int<8>(v));
}
inline ap_int<N2> operator()(unsigned short v) {
return operator()(ap_uint<16>(v));
}
inline ap_int<N2> operator()(short v) {
return operator()(ap_int<16>(v));
}
inline ap_int<N2> operator()(unsigned int v) {
return operator()(ap_uint<32>(v));
}
inline ap_int<N2> operator()(int v) {
return operator()(ap_int<32>(v));
}
inline ap_int<N2> operator()(unsigned long long v) {
return operator()(ap_uint<64>(v));
}
inline ap_int<N2> operator()(long long v) {
return operator()(ap_int<64>(v));
}
};
#pragma empty_line
template<int N2> class sr_cast_class<ap_uint<N2> > {
public:
template<int N1>
inline ap_uint<N2> operator()(ap_int<N1> v) {
return ap_ufixed<N2,N2,AP_TRN,AP_SAT>(v);
}
template<int N1>
inline ap_uint<N2> operator()(ap_uint<N1> v) {
return ap_ufixed<N2,N2,AP_TRN,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
inline ap_uint<N2> operator()(ap_fixed<W,I, _AP_Q, _AP_O> v) {
return ap_ufixed<N2,N2,AP_RND,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
inline ap_uint<N2> operator()(ap_ufixed<W,I, _AP_Q, _AP_O> v) {
return ap_ufixed<N2,N2,AP_RND,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O, int N>
inline ap_uint<N2> operator()(ap_fixed_base<W,I, true, _AP_Q, _AP_O, N> v) {
return ap_ufixed<N2,N2,AP_RND,AP_SAT>(v);
}
template <int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O, int N>
inline ap_uint<N2> operator()(ap_fixed_base<W,I, false,_AP_Q, _AP_O, N> v) {
return ap_ufixed<N2,N2,AP_RND,AP_SAT>(v);
}
inline ap_uint<N2> operator()(float v) {
if(::hls::__isnan(v)) return 0;
else return ap_ufixed<N2,N2,AP_RND,AP_SAT>(v);
}
inline ap_uint<N2> operator()(double v) {
if(::hls::__isnan(v)) return 0;
else return ap_ufixed<N2,N2,AP_RND,AP_SAT>(v);
}
inline ap_uint<N2> operator()(unsigned char v) {
return operator()(ap_uint<8>(v));
}
inline ap_uint<N2> operator()(char v) {
return operator()(ap_int<8>(v));
}
inline ap_uint<N2> operator()(unsigned short v) {
return operator()(ap_uint<16>(v));
}
inline ap_uint<N2> operator()(short v) {
return operator()(ap_int<16>(v));
}
inline ap_uint<N2> operator()(unsigned int v) {
return operator()(ap_uint<32>(v));
}
inline ap_uint<N2> operator()(int v) {
return operator()(ap_int<32>(v));
}
inline ap_uint<N2> operator()(unsigned long long v) {
return operator()(ap_uint<64>(v));
}
inline ap_uint<N2> operator()(long long v) {
return operator()(ap_int<64>(v));
}
};
#pragma empty_line
template<> class sr_cast_class<unsigned char> : public sr_cast_class<ap_uint<8> > {
public:
using sr_cast_class<ap_uint<8> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<char> : public sr_cast_class<ap_int<8> > {
public:
using sr_cast_class<ap_int<8> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<unsigned short> : public sr_cast_class<ap_uint<16> > {
public:
using sr_cast_class<ap_uint<16> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<short> : public sr_cast_class<ap_int<16> > {
public:
using sr_cast_class<ap_int<16> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<unsigned int> : public sr_cast_class<ap_uint<32> > {
public:
using sr_cast_class<ap_uint<32> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<int> : public sr_cast_class<ap_int<32> > {
public:
using sr_cast_class<ap_int<32> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<unsigned long long> : public sr_cast_class<ap_uint<64> > {
public:
using sr_cast_class<ap_uint<64> >::operator();
};
#pragma empty_line
template<> class sr_cast_class<long long> : public sr_cast_class<ap_int<64> > {
public:
using sr_cast_class<ap_int<64> >::operator();
};
#pragma empty_line
template<typename T2, typename T1> inline T2 sr_cast(T1 v)
{
::hls::sr_cast_class<T2> V;
return V(v);
}
#pragma empty_line
#pragma empty_line
typedef struct{
unsigned char Y;
char UV;
}yuv422_8;
#pragma empty_line
typedef struct{
unsigned char Y;
char U;
char V;
}yuv444_8;
#pragma empty_line
typedef struct{
unsigned char R;
unsigned char G;
unsigned char B;
}rgb_8;
#pragma empty_line
typedef yuv422_8 yuv420_8;
#pragma empty_line
typedef struct{
char A;
unsigned char Y;
char UV;
}yuva422_8;
#pragma empty_line
typedef struct{
char A;
unsigned char Y;
char U;
char V;
}yuva444_8;
#pragma empty_line
typedef struct{
char A;
unsigned char R;
unsigned char G;
unsigned char B;
}rgba_8;
#pragma empty_line
typedef struct{
char AUV;
unsigned char Y;
}yuva420_8;
#pragma empty_line
typedef struct{
unsigned char D;
unsigned char Y;
char UV;
}yuvd422_8;
#pragma empty_line
typedef struct{
unsigned char D;
unsigned char Y;
char U;
char V;
}yuvd444_8;
#pragma empty_line
typedef struct{
unsigned char D;
unsigned char R;
unsigned char G;
unsigned char B;
}rgbd_8;
#pragma empty_line
typedef yuvd422_8 yuvd420_8;
#pragma empty_line
typedef struct{
unsigned char CMY;
}bayer_8;
#pragma empty_line
typedef struct{
unsigned char Y;
}luma_8;
#pragma empty_line
}
#pragma line 56 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h"
namespace hls {
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T>
class Window {
public:
Window() {
#pragma HLS ARRAY_PARTITION variable=val dim=1 complete
#pragma HLS ARRAY_PARTITION variable=val dim=2 complete
};
void shift_right();
void shift_left();
void shift_up();
void shift_down();
void insert(T value, int row, int col);
void insert_bottom(T value[COLS]);
void insert_top(T value[COLS]);
void insert_left(T value[ROWS]);
void insert_right(T value[ROWS]);
T& getval(int row, int col);
T& operator ()(int row, int col);
#pragma empty_line
T val[ROWS][COLS];
};
#pragma line 85 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h"
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::shift_left() {
#pragma HLS inline
HLS_SIZE_T i, j;
for(i = 0; i < ROWS; i++) {
#pragma HLS unroll
for(j = 0; j < COLS-1; j++) {
#pragma HLS unroll
val[i][j] = val[i][j+1];
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::shift_right() {
#pragma HLS inline
HLS_SIZE_T i, j;
for(i = 0; i < ROWS; i++) {
#pragma HLS unroll
for(j = COLS-1; j > 0; j--) {
#pragma HLS unroll
val[i][j] = val[i][j-1];
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::shift_up() {
#pragma HLS inline
HLS_SIZE_T i, j;
for(i = 0; i < ROWS-1; i++) {
#pragma HLS unroll
for(j = 0; j < COLS; j++) {
#pragma HLS unroll
val[i][j] = val[i+1][j];
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::shift_down() {
#pragma HLS inline
HLS_SIZE_T i, j;
for(i = ROWS-1; i > 0; i--) {
#pragma HLS unroll
for(j = 0; j < COLS; j++) {
#pragma HLS unroll
val[i][j] = val[i-1][j];
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::insert(T value, int row, int col) {
#pragma HLS inline
((row >= 0 && row < ROWS && col >= 0 && col < COLS) ? (void)0 : _assert("row >= 0 && row < ROWS && col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 150));
val[row][col] = value;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::insert_top(T value[COLS]) {
#pragma HLS inline
HLS_SIZE_T j;
for(j = 0; j < COLS; j++) {
#pragma HLS unroll
val[ROWS-1][j] = value[j];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::insert_bottom(T value[COLS]) {
#pragma HLS inline
HLS_SIZE_T j;
for(j = 0; j < COLS; j++) {
#pragma HLS unroll
val[0][j] = value[j];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::insert_left(T value[ROWS]) {
#pragma HLS inline
HLS_SIZE_T i;
for(i = 0; i < ROWS; i++) {
#pragma HLS unroll
val[i][COLS-1] = value[i];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void Window<ROWS, COLS, T>::insert_right(T value[ROWS]) {
#pragma HLS inline
HLS_SIZE_T i;
for(i = 0; i < ROWS; i++) {
#pragma HLS unroll
val[i][0] = value[i];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> T& Window<ROWS, COLS, T>::getval(int row, int col) {
#pragma HLS inline
((row >= 0 && row < ROWS && col >= 0 && col < COLS) ? (void)0 : _assert("row >= 0 && row < ROWS && col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 207));
return val[row][col];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> T& Window<ROWS, COLS, T>::operator ()(int row, int col) {
#pragma HLS inline
return getval(row, col);
}
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T, int RESHAPE=0>
class LineBuffer;
#pragma empty_line
template<int ROWS, int COLS, typename T>
class LineBuffer<ROWS, COLS, T, 0> {
public:
LineBuffer() {
#pragma HLS array_partition variable=val dim=1 complete
#pragma HLS dependence variable=val inter false
#pragma HLS dependence variable=val intra false
};
void shift_up(int col);
void shift_down(int col);
void insert_bottom(T value, int col);
void insert_top(T value, int col);
T& getval(int row, int col);
T& operator ()(int row, int col);
#pragma empty_line
T val[ROWS][COLS];
};
#pragma line 263 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h"
template<int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T>::shift_down(int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 265));
HLS_SIZE_T i;
for(i = ROWS-1; i > 0; i--) {
#pragma HLS unroll
val[i][col] = val[i-1][col];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T>::shift_up(int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 279));
HLS_SIZE_T i;
for(i = 0; i < ROWS-1; i++) {
#pragma HLS unroll
val[i][col] = val[i+1][col];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T>::insert_bottom(T value, int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 293));
val[0][col] = value;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T>::insert_top(T value, int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 303));
val[ROWS-1][col] = value;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int ROWS, int COLS, typename T> T& LineBuffer<ROWS, COLS, T>::getval(int row, int col) {
#pragma HLS inline
((row >= 0 && row < ROWS && col >= 0 && col < COLS) ? (void)0 : _assert("row >= 0 && row < ROWS && col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 312));
return val[row][col];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> T& LineBuffer<ROWS, COLS, T>::operator ()(int row, int col) {
#pragma HLS inline
return getval(row, col);
}
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T>
class LineBuffer<ROWS, COLS, T, 1> {
public:
LineBuffer() {
#pragma HLS array_reshape variable=val dim=1
#pragma HLS dependence variable=val inter false
#pragma HLS dependence variable=val intra false
};
void shift_up(int col);
void shift_down(int col);
void insert_bottom(T value, int col);
void insert_top(T value, int col);
T& getval(int row, int col);
T& operator ()(int row, int col);
#pragma empty_line
T val[ROWS][COLS];
};
#pragma line 365 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h"
template<int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T, 1>::shift_down(int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 367));
HLS_SIZE_T i;
for(i = ROWS-1; i > 0; i--) {
#pragma HLS unroll
val[i][col] = val[i-1][col];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T, 1>::shift_up(int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 381));
HLS_SIZE_T i;
for(i = 0; i < ROWS-1; i++) {
#pragma HLS unroll
val[i][col] = val[i+1][col];
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T, 1>::insert_bottom(T value, int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 395));
val[0][col] = value;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int ROWS, int COLS, typename T> void LineBuffer<ROWS, COLS, T, 1>::insert_top(T value, int col) {
#pragma HLS inline
((col >= 0 && col < COLS) ? (void)0 : _assert("col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 405));
val[ROWS-1][col] = value;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int ROWS, int COLS, typename T> T& LineBuffer<ROWS, COLS, T, 1>::getval(int row, int col) {
#pragma HLS inline
((row >= 0 && row < ROWS && col >= 0 && col < COLS) ? (void)0 : _assert("row >= 0 && row < ROWS && col >= 0 && col < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_mem.h", 414));
return val[row][col];
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, typename T> T& LineBuffer<ROWS, COLS, T, 1>::operator ()(int row, int col) {
#pragma HLS inline
return getval(row, col);
}
#pragma empty_line
}
#pragma line 57 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h" 1
#pragma line 84 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
namespace hls {
#pragma empty_line
#pragma empty_line
template<typename T>
class Point_ {
public:
Point_();
Point_(T _x, T _y);
Point_(const Point_& pt);
~Point_();
#pragma empty_line
T x, y;
};
#pragma empty_line
#pragma empty_line
template<typename T> inline Point_<T>::Point_() {}
template<typename T> inline Point_<T>::Point_(T _x, T _y) : x(_x), y(_y) {}
template<typename T> inline Point_<T>::Point_(const Point_<T>& pt) : x(pt.x), y(pt.y) {}
template<typename T> inline Point_<T>::~Point_() {}
#pragma empty_line
typedef Point_<int> Point;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T>
class Size_ {
public:
Size_();
Size_(T _width, T _height);
Size_(const Size_<T>& sz);
Size_(const Point_<T>& pt);
T area();
~Size_();
#pragma empty_line
T width, height;
};
#pragma empty_line
#pragma empty_line
template<typename T> inline Size_<T>::Size_() {}
template<typename T> inline Size_<T>::Size_(T _width, T _height) : width(_width), height(_height) {}
template<typename T> inline Size_<T>::Size_(const Size_<T>& sz) : width(sz.width), height(sz.height) {}
template<typename T> inline Size_<T>::Size_(const Point_<T>& pt) : width(pt.x), height(pt.y) {}
template<typename T> inline T Size_<T>::area() { return width*height; }
template<typename T> inline Size_<T>::~Size_() {}
#pragma empty_line
typedef Size_<int> Size;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T>
class Rect_ {
public:
Rect_();
Rect_(T _x, T _y, T _width, T _height);
Rect_(const Rect_& rect);
Rect_(const Point_<T>& pt, const Size_<T>& sz);
T area();
Size_<T> size();
Point_<T> tl();
Point_<T> tr();
Point_<T> bl();
Point_<T> br();
bool bContains(const Point_<T>& pt);
~Rect_();
#pragma empty_line
T x, y, width, height;
};
#pragma empty_line
#pragma empty_line
template<typename T> inline Rect_<T>::Rect_() {}
template<typename T> inline Rect_<T>::Rect_(T _x, T _y, T _width, T _height) : x(_x), y(_y), width(_width), height(_height) {}
template<typename T> inline Rect_<T>::Rect_(const Rect_<T>& rect) : x(rect.x), y(rect.y), width(rect.width), height(rect.height) {}
template<typename T> inline Rect_<T>::Rect_(const Point_<T>& pt, const Size_<T>& sz) : x(pt.x), y(pt.y), width(sz.width), height(sz.height) {}
template<typename T> inline T Rect_<T>::area() { return width*height; }
template<typename T> inline Size_<T> Rect_<T>::size() { return Size_<T>(width, height); }
template<typename T> inline Point_<T> Rect_<T>::tl() { return Point_<T>(x, y); }
template<typename T> inline Point_<T> Rect_<T>::tr() { return Point_<T>(x+width, y); }
template<typename T> inline Point_<T> Rect_<T>::bl() { return Point_<T>(x, y+height); }
template<typename T> inline Point_<T> Rect_<T>::br() { return Point_<T>(x+width, y+height); }
template<typename T> inline bool Rect_<T>::bContains(const Point_<T>& pt) { return (pt.x >= x && pt.x < x+width && pt.y >= y && pt.y < y+height); }
template<typename T> inline Rect_<T>::~Rect_() {}
#pragma empty_line
typedef Rect_<int> Rect;
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int N, typename T>
class Scalar {
public:
Scalar() {
#pragma HLS ARRAY_PARTITION variable=val dim=1 complete
((N > 0) ? (void)0 : _assert("N > 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h", 175));
}
Scalar(T v0) {
#pragma HLS ARRAY_PARTITION variable=val dim=1 complete
((N >= 1 && "Scalar must have enough channels for constructor.") ? (void)0 : _assert("N >= 1 && \"Scalar must have enough channels for constructor.\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h", 179));
val[0] = v0;
}
Scalar(T v0, T v1) {
#pragma HLS ARRAY_PARTITION variable=val dim=1 complete
((N >= 2 && "Scalar must have enough channels for constructor.") ? (void)0 : _assert("N >= 2 && \"Scalar must have enough channels for constructor.\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h", 184));
val[0] = v0; val[1] = v1;
}
Scalar(T v0, T v1, T v2) {
#pragma HLS ARRAY_PARTITION variable=val dim=1 complete
((N >= 3 && "Scalar must have enough channels for constructor.") ? (void)0 : _assert("N >= 3 && \"Scalar must have enough channels for constructor.\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h", 189));
val[0] = v0; val[1] = v1; val[2] = v2;
}
Scalar(T v0, T v1, T v2, T v3) {
#pragma HLS ARRAY_PARTITION variable=val dim=1 complete
((N >= 4 && "Scalar must have enough channels for constructor.") ? (void)0 : _assert("N >= 4 && \"Scalar must have enough channels for constructor.\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h", 194));
val[0] = v0; val[1] = v1; val[2] = v2; val[3] = v3;
}
#pragma empty_line
void operator = (T value);
Scalar<N, T> operator + (T value);
Scalar<N, T> operator + (Scalar<N, T> s);
Scalar<N, T> operator - (T value);
Scalar<N, T> operator - (Scalar<N, T> s);
Scalar<N, T> operator * (T value);
Scalar<N, T> operator * (Scalar<N, T> s);
Scalar<N, T> operator / (T value);
Scalar<N, T> operator / (Scalar<N, T> s);
#pragma empty_line
T val[N];
};
#pragma empty_line
template<int N, typename T>
void Scalar<N, T>::operator = (T value) {
#pragma HLS inline
for (int k = 0; k < N; k++) {
#pragma HLS unroll
val[k] = value;
}
}
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator + (T value) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] + value;
}
return res;
}
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator + (Scalar<N, T> s) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] + s.val[k];
}
return res;
}
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator - (T value) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] - value;
}
return res;
}
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator - (Scalar<N, T> s) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] - s.val[k];
}
return res;
}
#pragma empty_line
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator * (T value) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] * value;
}
return res;
}
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator * (Scalar<N, T> s) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] * s.val[k];
}
return res;
}
#pragma empty_line
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator / (T value) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] / value;
}
return res;
}
#pragma empty_line
template<int N, typename T>
Scalar<N, T> Scalar<N, T>::operator / (Scalar<N, T> s) {
#pragma HLS inline
Scalar<N, T> res;
for (int k = 0; k < N; k++) {
#pragma HLS unroll
res.val[k] = val[k] / s.val[k];
}
return res;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T>
yuv422_8 Scalar_to_yuv422_8(Scalar<2, T> scl) {
#pragma HLS inline
yuv422_8 pix;
pix.Y = (unsigned char)scl.val[0];
pix.UV = (char)scl.val[1];
return pix;
}
template<typename T>
Scalar<2, T> yuv422_8_to_Scalar(yuv422_8 pix) {
#pragma HLS inline
Scalar<2, T> scl;
scl.val[0] = (T)pix.Y;
scl.val[1] = (T)pix.UV;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
yuv444_8 Scalar_to_yuv444_8(Scalar<3, T> scl) {
#pragma HLS inline
yuv444_8 pix;
pix.Y = (unsigned char)scl.val[0];
pix.U = (char)scl.val[1];
pix.V = (char)scl.val[2];
return pix;
}
template<typename T>
Scalar<3, T> yuv444_8_to_Scalar(yuv444_8 pix) {
#pragma HLS inline
Scalar<3, T> scl;
scl.val[0] = (T)pix.Y;
scl.val[1] = (T)pix.U;
scl.val[2] = (T)pix.V;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
rgb_8 Scalar_to_rgb_8(Scalar<3, T> scl) {
#pragma HLS inline
rgb_8 pix;
pix.R = (unsigned char)scl.val[0];
pix.G = (unsigned char)scl.val[1];
pix.B = (unsigned char)scl.val[2];
return pix;
}
template<typename T>
Scalar<3, T> rgb_8_to_Scalar(rgb_8 pix) {
#pragma HLS inline
Scalar<3, T> scl;
scl.val[0] = (T)pix.R;
scl.val[1] = (T)pix.G;
scl.val[2] = (T)pix.B;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
yuva422_8 Scalar_to_yuva422_8(Scalar<3, T> scl) {
#pragma HLS inline
yuva422_8 pix;
pix.A = (char)scl.val[0];
pix.Y = (unsigned char)scl.val[1];
pix.UV = (char)scl.val[2];
return pix;
}
template<typename T>
Scalar<3, T> yuva422_8_to_Scalar(yuva422_8 pix) {
#pragma HLS inline
Scalar<3, T> scl;
scl.val[0] = (T)pix.A;
scl.val[1] = (T)pix.Y;
scl.val[2] = (T)pix.UV;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
yuva444_8 Scalar_to_yuva444_8(Scalar<4, T> scl) {
#pragma HLS inline
yuva444_8 pix;
pix.A = (char)scl.val[0];
pix.Y = (unsigned char)scl.val[1];
pix.U = (char)scl.val[2];
pix.V = (char)scl.val[3];
return pix;
}
template<typename T>
Scalar<4, T> yuva444_8_to_Scalar(yuva444_8 pix) {
#pragma HLS inline
Scalar<4, T> scl;
scl.val[0] = (T)pix.A;
scl.val[1] = (T)pix.Y;
scl.val[2] = (T)pix.U;
scl.val[3] = (T)pix.V;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
rgba_8 Scalar_to_rgba_8(Scalar<4, T> scl) {
#pragma HLS inline
rgba_8 pix;
pix.A = (char)scl.val[0];
pix.R = (unsigned char)scl.val[1];
pix.G = (unsigned char)scl.val[2];
pix.B = (unsigned char)scl.val[3];
return pix;
}
template<typename T>
Scalar<4, T> rgba_8_to_Scalar(rgba_8 pix) {
#pragma HLS inline
Scalar<4, T> scl;
scl.val[0] = (T)pix.A;
scl.val[1] = (T)pix.R;
scl.val[2] = (T)pix.G;
scl.val[3] = (T)pix.B;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
yuva420_8 Scalar_to_yuva420_8(Scalar<2, T> scl) {
#pragma HLS inline
yuva420_8 pix;
pix.AUV = (char)scl.val[0];
pix.Y = (unsigned char)scl.val[1];
return pix;
}
template<typename T>
Scalar<2, T> yuva420_8_to_Scalar(yuva420_8 pix) {
#pragma HLS inline
Scalar<2, T> scl;
scl.val[0] = (T)pix.AUV;
scl.val[1] = (T)pix.Y;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
yuvd422_8 Scalar_to_yuvd422_8(Scalar<3, T> scl) {
#pragma HLS inline
yuvd422_8 pix;
pix.D = (unsigned char)scl.val[0];
pix.Y = (unsigned char)scl.val[1];
pix.UV = (char)scl.val[2];
return pix;
}
template<typename T>
Scalar<3, T> yuvd422_8_to_Scalar(yuvd422_8 pix) {
#pragma HLS inline
Scalar<3, T> scl;
scl.val[0] = (T)pix.D;
scl.val[1] = (T)pix.Y;
scl.val[2] = (T)pix.UV;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
yuvd444_8 Scalar_to_yuvd444_8(Scalar<4, T> scl) {
#pragma HLS inline
yuvd444_8 pix;
pix.D = (unsigned char)scl.val[0];
pix.Y = (unsigned char)scl.val[1];
pix.U = (char)scl.val[2];
pix.V = (char)scl.val[3];
return pix;
}
template<typename T>
Scalar<4, T> yuvd444_8_to_Scalar(yuvd444_8 pix) {
#pragma HLS inline
Scalar<4, T> scl;
scl.val[0] = (T)pix.D;
scl.val[1] = (T)pix.Y;
scl.val[2] = (T)pix.U;
scl.val[3] = (T)pix.V;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
rgbd_8 Scalar_to_rgbd_8(Scalar<4, T> scl) {
#pragma HLS inline
rgbd_8 pix;
pix.D = (unsigned char)scl.val[0];
pix.R = (unsigned char)scl.val[1];
pix.G = (unsigned char)scl.val[2];
pix.B = (unsigned char)scl.val[3];
return pix;
}
template<typename T>
Scalar<4, T> rgbd_8_to_Scalar(rgbd_8 pix) {
#pragma HLS inline
Scalar<4, T> scl;
scl.val[0] = (T)pix.D;
scl.val[1] = (T)pix.R;
scl.val[2] = (T)pix.G;
scl.val[3] = (T)pix.B;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
bayer_8 Scalar_to_bayer_8(Scalar<1, T> scl) {
#pragma HLS inline
bayer_8 pix;
pix.CMY = (unsigned char)scl.val[0];
return pix;
}
template<typename T>
Scalar<1, T> bayer_8_to_Scalar(bayer_8 pix) {
#pragma HLS inline
Scalar<1, T> scl;
scl.val[0] = (T)pix.CMY;
return scl;
}
#pragma empty_line
#pragma empty_line
template<typename T>
luma_8 Scalar_to_luma_8(Scalar<1, T> scl) {
#pragma HLS inline
luma_8 pix;
pix.Y = (unsigned char)scl.val[0];
return pix;
}
template<typename T>
Scalar<1, T> luma_8_to_Scalar(luma_8 pix) {
#pragma HLS inline
Scalar<1, T> scl;
scl.val[0] = (T)pix.Y;
return scl;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, int T>
class Mat {
public:
Mat();
Mat(int _rows, int _cols);
Mat(Size _sz);
#pragma empty_line
void init(int _rows, int _cols);
void assignto(Mat<ROWS, COLS, T>& mat);
#pragma empty_line
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> read();
void read(Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name>& s);
void write(Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> s);
void operator >> (Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name>& s);
void operator << (Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> s);
bool empty();
#pragma empty_line
const int type() const;
const int depth() const;
const int channels() const;
#pragma empty_line
HLS_SIZE_T rows, cols;
#pragma empty_line
hls::stream<typename Type<((T) & ((1 << 4) - 1))>::name> data_stream[((((T) & ((512 - 1) << 4)) >> 4) + 1)];
};
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, int T>
inline Mat<ROWS, COLS, T>::Mat() {
#pragma HLS inline
init(ROWS, COLS);
}
#pragma empty_line
template<int ROWS, int COLS, int T>
inline Mat<ROWS, COLS, T>::Mat(int _rows, int _cols) {
#pragma HLS inline
init(_rows, _cols);
}
#pragma empty_line
template<int ROWS, int COLS, int T>
inline Mat<ROWS, COLS, T>::Mat(Size _sz) {
#pragma HLS inline
init(_sz.height, _sz.width);
}
#pragma empty_line
template<int ROWS, int COLS, int T>
inline void Mat<ROWS, COLS, T>::init(int _rows, int _cols) {
#pragma HLS inline
(((_rows > 0) && (_rows <= ROWS) && (_cols > 0) && (_cols <= COLS) && "The number of rows and columns must be less than the template arguments.") ? (void)0 : _assert("(_rows > 0) && (_rows <= ROWS) && (_cols > 0) && (_cols <= COLS) && \"The number of rows and columns must be less than the template arguments.\"",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
#pragma line 599 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
,
600
#pragma line 599 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
))
;
rows = _rows;
cols = _cols;
}
#pragma empty_line
template<int ROWS, int COLS, int T>
void Mat<ROWS, COLS, T>::assignto(Mat<ROWS, COLS, T>& mat) {
#pragma HLS inline
mat.rows = rows;
mat.cols = cols;
}
#pragma empty_line
template<int ROWS, int COLS, int T>
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> Mat<ROWS, COLS, T>::read() {
#pragma HLS inline
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> scl;
HLS_CHANNEL_T i;
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma HLS protocol floating
for (i = 0; i < ((((T) & ((512 - 1) << 4)) >> 4) + 1); i++) {
#pragma HLS unroll
data_stream[i] >> scl.val[i];
}
}
return scl;
}
#pragma empty_line
template<int ROWS, int COLS, int T>
void Mat<ROWS, COLS, T>::read(Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name>& s) {
#pragma HLS inline
s = read();
}
#pragma empty_line
template<int ROWS, int COLS, int T>
void Mat<ROWS, COLS, T>::write(Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> s) {
#pragma HLS inline
#pragma HLS data_pack variable=data_stream
HLS_CHANNEL_T i;
{
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma HLS protocol floating
for (i = 0; i < ((((T) & ((512 - 1) << 4)) >> 4) + 1); i++) {
#pragma HLS unroll
data_stream[i] << s.val[i];
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int T>
void Mat<ROWS, COLS, T>::operator >> (Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name>& s) {
#pragma HLS inline
s = read();
}
#pragma empty_line
template<int ROWS, int COLS, int T>
void Mat<ROWS, COLS, T>::operator << (Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> s) {
#pragma HLS inline
write(s);
}
#pragma empty_line
template<int ROWS, int COLS, int T>
bool Mat<ROWS, COLS, T>::empty() {
#pragma HLS inline
unsigned char flag = 0;
for (HLS_CHANNEL_T i = 0; i < ((((T) & ((512 - 1) << 4)) >> 4) + 1); i++) {
#pragma HLS unroll
flag += (data_stream[i].empty()) ? 1 : 0;
}
((flag == ((((T) & ((512 - 1) << 4)) >> 4) + 1) || flag == 0 && "Some channels are empty but others are not.") ? (void)0 : _assert("flag == HLS_MAT_CN(T) || flag == 0 && \"Some channels are empty but others are not.\"",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
#pragma line 673 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
,
674
#pragma line 673 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_core.h"
))
;
return ((flag == ((((T) & ((512 - 1) << 4)) >> 4) + 1)) ? true : false);
}
#pragma empty_line
template<int ROWS, int COLS, int T>
const int Mat<ROWS, COLS, T>::type() const {
#pragma HLS inline
return ((T) & ((1 << 4)*512 - 1));
}
#pragma empty_line
template<int ROWS, int COLS, int T>
const int Mat<ROWS, COLS, T>::depth() const {
#pragma HLS inline
return ((T) & ((1 << 4) - 1));
}
template<int ROWS, int COLS, int T>
const int Mat<ROWS, COLS, T>::channels() const {
#pragma HLS inline
return ((((T) & ((512 - 1) << 4)) >> 4) + 1);
}
#pragma empty_line
}
#pragma line 58 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h" 1
#pragma line 86 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h"
namespace hls {
#pragma empty_line
enum {MORPH_RECT,MORPH_CROSS,MORPH_ELLIPSE};
#pragma empty_line
class border_mode {
public:
enum values {BORDER_CONSTANT,BORDER_REPLICATE,BORDER_REFLECT,BORDER_WRAP,BORDER_REFLECT_101};
typedef void isBorderMode;
};
#pragma empty_line
class BORDER_CONSTANT : public border_mode { public: static const values value = border_mode::BORDER_CONSTANT; };
class BORDER_REPLICATE : public border_mode { public: static const values value = border_mode::BORDER_REPLICATE; };
class BORDER_REFLECT : public border_mode { public: static const values value = border_mode::BORDER_REFLECT; };
class BORDER_WRAP : public border_mode { public: static const values value = border_mode::BORDER_WRAP; };
class BORDER_REFLECT_101 : public border_mode { public: static const values value = border_mode::BORDER_REFLECT_101; };
class BORDER_DEFAULT : public border_mode { public: static const values value = border_mode::BORDER_REFLECT_101; };
#pragma line 113 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h"
static int borderInterpolate( int p, int len, int borderType )
{
#pragma HLS INLINE
((borderType != BORDER_WRAP::value && "BORDER_WRAP is not supported.") ? (void)0 : _assert("borderType != BORDER_WRAP::value && \"BORDER_WRAP is not supported.\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h", 116));
#pragma empty_line
if( p >= 0 && p < len )
return p;
else if( borderType == BORDER_REPLICATE::value )
p = p < 0 ? 0 : len - 1;
else if( borderType == BORDER_REFLECT::value)
{
if( len == 1 )
return 0;
if(p<0)
{
p=-p-1;
}
if( p >= len )
{
p=2*len-p-1;
}
}
else if(borderType == BORDER_REFLECT_101::value )
{
if( len == 1 )
return 0;
if(p<0)
{
#pragma empty_line
p=-p;
}
if( p >= len )
{
#pragma empty_line
p=2*len-p-2;
}
}
#pragma empty_line
else if( borderType == BORDER_CONSTANT::value )
p = -1;
return p;
}
#pragma empty_line
template <typename anchor_T,typename kernel_T>
inline void normalizeAnchor(
hls::Point_<anchor_T> &anchor,
hls::Size_<kernel_T> kernel_size)
{
#pragma HLS INLINE
if(anchor.x==-1)
anchor.x=kernel_size.width/2;
if(anchor.y==-1)
anchor.y=kernel_size.height/2;
#pragma empty_line
((anchor.x>=0) ? (void)0 : _assert("anchor.x>=0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h", 167));
((anchor.x<=kernel_size.width-1) ? (void)0 : _assert("anchor.x<=kernel_size.width-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h", 168));
((anchor.y>=0) ? (void)0 : _assert("anchor.y>=0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h", 169));
((anchor.y<=kernel_size.height-1) ? (void)0 : _assert("anchor.y<=kernel_size.height-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgbase.h", 170));
}
template<int SRC_T,int ROWS,int COLS>
void DuplicateImageN(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, SRC_T> _dst[],
int num
)
{
int cols=_src.cols;
int rows=_src.rows;
loop_size: for(int k=0;k<num;k++) {
_dst[k].rows=rows;
_dst[k].cols=cols;
}
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
loop_height: for(int i= 0;i<rows;i++)
{
#pragma HLS LOOP_TRIPCOUNT min=20 max=2000
loop_width: for (int j= 0;j<cols;j++)
#pragma HLS LOOP_TRIPCOUNT min=20 max=2000
{
#pragma HLS PIPELINE
_src >> s;
for(int k=0;k<num;k++)
_dst[k] << s;
}
}
}
}
#pragma line 59 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h"
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_axi_io.h" 1
#pragma line 40 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h" 2
#pragma empty_line
namespace hls {
#pragma line 50 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h"
template<int W, int ROWS, int COLS, int T>
int AXIvideo2Mat(stream<ap_axiu<W,1,1,1> >& AXI_video_strm,
Mat<ROWS, COLS, T>& img)
{
int res = 0;
ap_axiu<W,1,1,1> axi;
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> pix;
int depth = Type<((T) & ((1 << 4) - 1))>::bitdepth;
#pragma empty_line
((W >= depth*((((T) & ((512 - 1) << 4)) >> 4) + 1) && "Bit-Width of AXI stream must be greater than the total number of bits in a pixel") ? (void)0 : _assert("W >= depth*HLS_MAT_CN(T) && \"Bit-Width of AXI stream must be greater than the total number of bits in a pixel\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 59));
HLS_SIZE_T rows = img.rows;
HLS_SIZE_T cols = img.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 62));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 63));
bool sof = 0;
loop_wait_for_start: while (!sof) {
#pragma HLS pipeline II=1
#pragma HLS loop_tripcount avg=0 max=0
AXI_video_strm >> axi;
sof = axi.user.to_int();
}
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
bool eol = 0;
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
if (sof || eol) {
sof = 0;
eol = axi.last.to_int();
} else {
#pragma empty_line
AXI_video_strm >> axi;
eol = axi.last.to_int();
bool user = axi.user.to_int();
if(user) {
res |= (1 << 0);
}
}
if (eol && (j != cols-1)) {
res |= (1 << 0);
}
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
AXIGetBitFields(axi, k*depth, depth, pix.val[k]);
}
img << pix;
}
loop_wait_for_eol: while (!eol) {
#pragma HLS pipeline II=1
#pragma HLS loop_tripcount avg=0 max=0
#pragma empty_line
AXI_video_strm >> axi;
eol = axi.last.to_int();
res |= (1 << 1);
}
}
return res;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int W, int ROWS, int COLS, int T>
int Mat2AXIvideo(Mat<ROWS, COLS, T>& img,
stream<ap_axiu<W,1,1,1> >& AXI_video_strm)
{
int res = 0;
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> pix;
ap_axiu<W,1,1,1> axi;
int depth = Type<((T) & ((1 << 4) - 1))>::bitdepth;
#pragma empty_line
((W >= depth*((((T) & ((512 - 1) << 4)) >> 4) + 1) && "Bit-Width of AXI stream must be greater than the total number of bits in a pixel") ? (void)0 : _assert("W >= depth*HLS_MAT_CN(T) && \"Bit-Width of AXI stream must be greater than the total number of bits in a pixel\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 119));
HLS_SIZE_T rows = img.rows;
HLS_SIZE_T cols = img.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 122));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 123));
bool sof = 1;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
if (sof) {
axi.user = 1;
sof = 0;
} else {
axi.user = 0;
}
if (j == (cols-1)) {
axi.last = 1;
} else {
axi.last = 0;
}
img >> pix;
axi.data = -1;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
AXISetBitFields(axi, k*depth, depth, pix.val[k]);
}
axi.keep = -1;
AXI_video_strm << axi;
}
}
return res;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int Array2Mat(FB_T fb[ROWS*FB_COLS], int rowStride,
Mat<ROWS, COLS, T>& img)
{
int res = 0;
HLS_SIZE_T rows = img.rows;
HLS_SIZE_T cols = img.cols;
((cols <= rowStride) ? (void)0 : _assert("cols <= rowStride", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 162));
((rowStride <= FB_COLS) ? (void)0 : _assert("rowStride <= FB_COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 163));
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 164));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 165));
((COLS <= FB_COLS) ? (void)0 : _assert("COLS <= FB_COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 166));
int fb_BitWidth = Type_BitWidth<FB_T>::Value;
int depth = Type<((T) & ((1 << 4) - 1))>::bitdepth;
int ch = ((((T) & ((512 - 1) << 4)) >> 4) + 1);
((fb_BitWidth >= ch*depth && "Bit-Width of frame buffer must be greater than the total number of bits in a pixel") ? (void)0 : _assert("fb_BitWidth >= ch*depth && \"Bit-Width of frame buffer must be greater than the total number of bits in a pixel\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 170));
HLS_SIZE_T col = 0;
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> pix;
loop_pixel:
for (HLS_SIZE_T row = 0; row < rows; row++) {
for (HLS_SIZE_T col = 0; col < cols; col++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
FB_T fb_pix = fb[row*rowStride+col];
ap_uint<((((T) & ((512 - 1) << 4)) >> 4) + 1)*Type<((T) & ((1 << 4) - 1))>::bitdepth> pix_value;
AXISetBitFields(pix_value, 0, ((((T) & ((512 - 1) << 4)) >> 4) + 1)*Type<((T) & ((1 << 4) - 1))>::bitdepth, fb_pix);
loop_channels:
for (HLS_CHANNEL_T k = 0; k < ((((T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
AXIGetBitFields(pix_value, k*depth, depth, pix.val[k]);
}
img << pix;
}
}
return res;
}
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int Array2Mat(FB_T fb[ROWS*FB_COLS],
Mat<ROWS, COLS, T>& img)
{
int res = 0;
res=Array2Mat<FB_COLS>(fb, FB_COLS, img);
return res;
}
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int AXIM2Mat(FB_T fb[ROWS*FB_COLS],
Mat<ROWS, COLS, T>& img)
{
int res = 0;
res=Array2Mat<FB_COLS>(fb, FB_COLS, img);
return res;
}
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int AXIM2Mat(FB_T fb[ROWS*FB_COLS], int rowStride,
Mat<ROWS, COLS, T>& img)
{
int res = 0;
res=Array2Mat<FB_COLS>(fb, rowStride, img);
return res;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int Mat2Array(Mat<ROWS, COLS, T>& img,
FB_T fb[ROWS*FB_COLS], int rowStride)
{
int res = 0;
HLS_SIZE_T rows = img.rows;
HLS_SIZE_T cols = img.cols;
((cols <= rowStride) ? (void)0 : _assert("cols <= rowStride", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 228));
((rowStride <= FB_COLS) ? (void)0 : _assert("rowStride <= FB_COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 229));
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 230));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 231));
((COLS <= FB_COLS) ? (void)0 : _assert("COLS <= FB_COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 232));
int fb_BitWidth = Type_BitWidth<FB_T>::Value;
int depth = Type<((T) & ((1 << 4) - 1))>::bitdepth;
int ch = ((((T) & ((512 - 1) << 4)) >> 4) + 1);
((fb_BitWidth >= ch*depth && "Bit-Width of frame buffer must be greater than the total number of bits in a pixel") ? (void)0 : _assert("fb_BitWidth >= ch*depth && \"Bit-Width of frame buffer must be greater than the total number of bits in a pixel\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_io.h", 236));
HLS_SIZE_T col = 0;
Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> pix;
loop_pixel:
for (HLS_SIZE_T row = 0; row < rows; row++) {
for (HLS_SIZE_T col = 0; col < cols; col++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
ap_uint<((((T) & ((512 - 1) << 4)) >> 4) + 1)*Type<((T) & ((1 << 4) - 1))>::bitdepth> pix_value;
img >> pix;
loop_channels:
for (HLS_CHANNEL_T k = 0; k < ((((T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
AXISetBitFields(pix_value, k*depth, depth, pix.val[k]);
}
FB_T fb_pix;
AXIGetBitFields(pix_value, 0, ((((T) & ((512 - 1) << 4)) >> 4) + 1)*Type<((T) & ((1 << 4) - 1))>::bitdepth, fb_pix);
fb[row*rowStride+col] = fb_pix;
}
}
return res;
}
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int Mat2Array(Mat<ROWS, COLS, T>& img,
FB_T fb[ROWS*FB_COLS])
{
int res = 0;
res=Mat2Array<FB_COLS>(img, fb, FB_COLS);
return res;
}
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int Mat2AXIM(Mat<ROWS, COLS, T>& img,
FB_T fb[ROWS*FB_COLS])
{
int res = 0;
res=Mat2Array<FB_COLS>(img, fb, FB_COLS);
return res;
}
#pragma empty_line
template <int FB_COLS, typename FB_T, int ROWS, int COLS, int T>
int Mat2AXIM(Mat<ROWS, COLS, T>& img,
FB_T fb[ROWS*FB_COLS], int rowStride)
{
int res = 0;
res=Mat2Array<FB_COLS>(img, fb, rowStride);
return res;
}
#pragma empty_line
}
#pragma line 60 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma empty_line
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h" 1
#pragma line 88 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
namespace hls {
#pragma line 111 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
typedef ap_fixed<64,32,AP_RND> _AP_T;
typedef unsigned long long _SUM_T;
#pragma empty_line
class kernel_min {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
#pragma empty_line
if(src1<src2) {
dst=sr_cast<DST_T>(src1);
} else {
dst=sr_cast<DST_T>(src2);
}
}
};
#pragma empty_line
class kernel_max {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
#pragma empty_line
if(src1>src2) {
dst=sr_cast<DST_T>(src1);
} else {
dst=sr_cast<DST_T>(src2);
}
}
};
#pragma empty_line
class kernel_absdiff {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
typename pixel_op_type<SRC1_T>::T src1_cast = src1;
typename pixel_op_type<SRC2_T>::T src2_cast = src2;
typedef typename x_traits<typename pixel_op_type<SRC1_T>::T, typename pixel_op_type<SRC2_T>::T >::ADD_T TEMP_TYPE;
TEMP_TYPE diff = src1_cast-src2_cast;
TEMP_TYPE mdiff = src2_cast-src1_cast;
dst = sr_cast<DST_T>((src1_cast > src2_cast) ? diff : mdiff);
}
};
#pragma empty_line
class kernel_and {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
dst = (sr_cast<DST_T>(src1)) & (sr_cast<DST_T>(src2));
}
};
#pragma empty_line
class kernel_not {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src, SRC2_T& val, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
dst = ~(sr_cast<DST_T>(src));
}
};
#pragma empty_line
class kernel_set {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src, SRC2_T& val, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
dst = sr_cast<DST_T>(val);
}
};
#pragma empty_line
class kernel_scale {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src, SRC2_T& val, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
typedef typename x_traits<typename pixel_op_type<SRC1_T>::T, typename pixel_op_type<P_T>::T>::MULT_T MULT_T;
typedef typename x_traits<typename pixel_op_type<P_T>::T, MULT_T>::ADD_T ADD_T;
MULT_T mult_t=(typename pixel_op_type<SRC1_T>::T)src * (typename pixel_op_type<P_T>::T)p0;
ADD_T sum_t=mult_t + (typename pixel_op_type<P_T>::T)p1;
#pragma empty_line
dst = sr_cast<DST_T>(sum_t);
}
};
#pragma empty_line
class kernel_add {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
typename x_traits<typename pixel_op_type<SRC1_T>::T, typename pixel_op_type<SRC2_T>::T>::ADD_T t =
(typename pixel_op_type<SRC1_T>::T)src1 + (typename pixel_op_type<SRC2_T>::T)src2;
dst = sr_cast<DST_T>(t);
}
};
#pragma empty_line
class kernel_sub {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
typename x_traits<typename pixel_op_type<SRC1_T>::T, typename pixel_op_type<SRC2_T>::T>::SUB_T t =
(typename pixel_op_type<SRC1_T>::T)src1 - (typename pixel_op_type<SRC2_T>::T)src2;
dst = sr_cast<DST_T>(t);
}
};
#pragma empty_line
class kernel_subR {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
typename x_traits<typename pixel_op_type<SRC1_T>::T, typename pixel_op_type<SRC2_T>::T>::SUB_T t =
(typename pixel_op_type<SRC1_T>::T)src2 - (typename pixel_op_type<SRC2_T>::T)src1;
dst = sr_cast<DST_T>(t);
}
};
#pragma empty_line
class kernel_mul {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T, typename P2_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P2_T p1=0, P2_T p2=0) {
#pragma HLS inline
dst = sr_cast<DST_T>(p0*src1*src2);
}
};
#pragma empty_line
class kernel_mul2 {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
dst = sr_cast<DST_T>(src1*src2);
}
};
#pragma empty_line
class kernel_addWeighted {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
dst = sr_cast<DST_T>(p0*src1+p1*src2+p2);
}
};
#pragma empty_line
class kernel_cmp {
public:
template<typename SRC1_T, typename SRC2_T, typename DST_T, typename P_T>
static void apply(SRC1_T& src1, SRC2_T& src2, DST_T& dst, P_T p0=0, P_T p1=0, P_T p2=0) {
#pragma HLS inline
switch (p0) {
case 0:
dst = (src1==src2 ? 255 : 0);
break;
case 1:
dst = (src1 >src2 ? 255 : 0);
break;
case 2:
dst = (src1>=src2 ? 255 : 0);
break;
case 3:
dst = (src1 <src2 ? 255 : 0);
break;
case 4:
dst = (src1<=src2 ? 255 : 0);
break;
case 5:
dst = (src1!=src2 ? 255 : 0);
break;
default:
break;
}
}
};
#pragma empty_line
class kernel_sum {
public:
template<typename SRC_T>
static void apply(SRC_T& s, _SUM_T& sum, _SUM_T& sqsum) {
#pragma HLS inline
sum = sum+(_SUM_T)s;
}
};
#pragma empty_line
class kernel_avgsdv {
public:
template<typename SRC_T>
static void apply(SRC_T& s, _SUM_T& sum, _SUM_T& sqsum) {
#pragma HLS inline
sum=sum+ (_SUM_T)s;
sqsum=sqsum+ ((_SUM_T)s*(_SUM_T)s);
}
};
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T, typename P0_T, typename P1_T, typename P2_T>
void arithm_pro(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst,
P0_T p0=0,
P1_T p1=0,
P2_T p2=0)
{
KERNEL opr;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 320));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 321));
Scalar<((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC1_T) & ((1 << 4) - 1))>::name> s1;
Scalar<((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC2_T) & ((1 << 4) - 1))>::name> s2;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name > d;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src1 >> s1;
src2 >> s2;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
opr.template apply(s1.val[k], s2.val[k], d.val[k], p0, p1, p2);
}
dst << d;
}
}
}
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void arithm_pro(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask,
Mat<ROWS, COLS, DST_T>& dst_ref)
{
KERNEL opr;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 351));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 352));
Scalar<((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC1_T) & ((1 << 4) - 1))>::name> s1;
Scalar<((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC2_T) & ((1 << 4) - 1))>::name> s2;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d_ref, d;
Scalar<1, unsigned char> m;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src1 >> s1;
src2 >> s2;
mask >> m;
dst_ref >> d_ref;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
if (m.val[0] == 0) {
d.val[k] = d_ref.val[k];
} else {
opr.template apply(s1.val[k], s2.val[k], d.val[k]);
}
}
dst << d;
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, int SRC_T, typename _T, int DST_T, typename P0_T, typename P1_T, typename P2_T>
void arithm_pro(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst,
P0_T p0=0,
P1_T p1=0,
P2_T p2=0)
{
KERNEL opr;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 391));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 392));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> _s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
_s = scl;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma empty_line
opr.template apply(s.val[k], _s.val[k], d.val[k], p0, p1, p2);
#pragma empty_line
}
dst << d;
}
}
}
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, typename _T, int DST_T, typename P0_T, typename P1_T, typename P2_T>
void arithm_pro(
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst,
P0_T p0=0,
P1_T p1=0,
P2_T p2=0)
{
KERNEL opr;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 424));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 425));
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), _T> _s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
_s = scl;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
_T s = 0;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
opr.template apply(s, _s.val[k], d.val[k], p0, p1, p2);
}
dst << d;
}
}
}
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void arithm_pro(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask,
Mat<ROWS, COLS, DST_T>& dst_ref)
{
KERNEL opr;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 454));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 455));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> _s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d_ref, d;
Scalar<1, unsigned char> m;
_s = scl;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
mask >> m;
dst_ref >> d_ref;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
if (m.val[0] == 0) {
d.val[k] = d_ref.val[k];
} else {
#pragma empty_line
opr.template apply(s.val[k], _s.val[k], d.val[k]);
#pragma empty_line
}
}
dst << d;
}
}
}
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, int SRC_T>
void arithm_pro(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T>& sum,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T>& sqsum)
{
KERNEL opr;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 492));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 493));
loop_init: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
sum.val[k] = 0;
sqsum.val[k] = 0;
}
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
opr.template apply(s.val[k], sum.val[k], sqsum.val[k]);
}
}
}
}
#pragma empty_line
#pragma empty_line
template<typename KERNEL, int ROWS, int COLS, int SRC_T>
void arithm_pro(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T>& sum,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T>& sqsum,
int& ncount,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
KERNEL opr;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 524));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 525));
loop_init: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
sum.val[k] = 0;
sqsum.val[k] = 0;
}
ncount = 0;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<1, unsigned char> m;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
mask >> m;
if (m.val[0]) {
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
opr.template apply(s.val[k], sum.val[k], sqsum.val[k]);
}
ncount++;
}
}
}
}
#pragma empty_line
#pragma empty_line
template<typename INTER_SUM_T, int ROWS, int COLS, int SRC_T, int DST_ROWS, int DST_COLS, int DST_T>
void reduce_opr(
Mat<ROWS, COLS, SRC_T> &src,
Mat<DST_ROWS, DST_COLS, DST_T> &dst,
int dim,
int op=1)
{
LineBuffer<1,DST_COLS,INTER_SUM_T> dst_buffer[((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma HLS ARRAY_PARTITION variable=dst_buffer complete dim=1
#pragma HLS ARRAY_PARTITION variable=dst_buffer complete dim=2
HLS_SIZE_T rows=src.rows;
HLS_SIZE_T cols=src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 563));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 564));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),INTER_SUM_T> internal;
loop_init: for(HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
internal.val[k]=0;
}
loop_height: for(HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
loop_channels: for(HLS_CHANNEL_T k= 0;k< ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);k++) {
typename Type<((SRC_T) & ((1 << 4) - 1))>::name src_val;
src.data_stream[k]>>src_val;
if(dim==0) {
if(i!=0) {
internal.val[k]=(INTER_SUM_T)dst_buffer[k].val[i][0];
} else {
if(op==1||op==2)
internal.val[k]=0;
else if(op==3||op==4)
internal.val[k]=src_val;
}
}
switch (op) {
case 1:
internal.val[k]=internal.val[k]+src_val;
break;
case 2:
internal.val[k]=internal.val[k]+src_val;
break;
case 3:
internal.val[k]=(internal.val[k]>(INTER_SUM_T)src_val?internal.val[k]:src_val);
break;
case 4:
internal.val[k]=(internal.val[k]<(INTER_SUM_T)src_val?internal.val[k]:src_val);
break;
}
if(dim==0) {
if(i==rows-1) {
if(op==2)
dst.data_stream[k] << ((typename Type<((DST_T) & ((1 << 4) - 1))>::name)internal.val[k])/rows;
else
dst.data_stream[k]<< (typename Type<((DST_T) & ((1 << 4) - 1))>::name)internal.val[k];
} else {
dst_buffer[k].val[i][0]=internal.val[k];
}
}
}
if(dim==1&&j==cols-1) {
loop_output: for(HLS_CHANNEL_T k=0;k<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);k++) {
if(op==2) {
dst.data_stream[k] << ((typename Type<((DST_T) & ((1 << 4) - 1))>::name)internal.val[k])/cols;
} else {
dst.data_stream[k] << (typename Type<((DST_T) & ((1 << 4) - 1))>::name)internal.val[k];
}
internal.val[k]=0;
}
}
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void Min(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 634 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
636
#pragma line 634 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 637 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
639
#pragma line 637 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_min>(src1, src2, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void Max(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 649 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
651
#pragma line 649 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 652 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
654
#pragma line 652 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_max>(src1, src2, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void MinS(
Mat<ROWS, COLS, SRC_T>& src,
_T value,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 664 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
665
#pragma line 664 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 666 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
667
#pragma line 666 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
scl.val[k] = (value);
}
arithm_pro<kernel_min>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void MaxS(
Mat<ROWS, COLS, SRC_T>& src,
_T value,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 682 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
683
#pragma line 682 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 684 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
685
#pragma line 684 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
scl.val[k] = (value);
}
arithm_pro<kernel_max>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void AddS(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 700 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
701
#pragma line 700 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 702 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
703
#pragma line 702 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_add>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void AddS(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask,
Mat<ROWS, COLS, DST_T>& dst_ref)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 715 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
716
#pragma line 715 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 717 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
718
#pragma line 717 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_add>(src, scl, dst, mask, dst_ref);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void SubS(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 728 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
729
#pragma line 728 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 730 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
731
#pragma line 730 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_sub>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void SubS(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask,
Mat<ROWS, COLS, DST_T>& dst_ref)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 743 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
744
#pragma line 743 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 745 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
746
#pragma line 745 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_sub>(src, scl, dst, mask, dst_ref);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void SubRS(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 756 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
757
#pragma line 756 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 758 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
759
#pragma line 758 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_subR>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void SubRS(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask,
Mat<ROWS, COLS, DST_T>& dst_ref)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 771 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
772
#pragma line 771 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 773 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
774
#pragma line 773 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_subR>(src, scl, dst, mask, dst_ref);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T, typename P_T>
void Mul(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst,
P_T scale)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 785 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
787
#pragma line 785 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 788 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
790
#pragma line 788 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_mul>(src1, src2, dst, scale, (typename Type<((DST_T) & ((1 << 4) - 1))>::name)0, (typename Type<((DST_T) & ((1 << 4) - 1))>::name)0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void Mul(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 800 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
802
#pragma line 800 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 803 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
805
#pragma line 803 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_mul2>(src1, src2, dst, (typename Type<((DST_T) & ((1 << 4) - 1))>::name)0, (typename Type<((DST_T) & ((1 << 4) - 1))>::name)0, (typename Type<((DST_T) & ((1 << 4) - 1))>::name)0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T, typename P_T>
void AddWeighted(
Mat<ROWS, COLS, SRC1_T>& src1,
P_T alpha,
Mat<ROWS, COLS, SRC2_T>& src2,
P_T beta,
P_T gamma,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 818 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
820
#pragma line 818 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 821 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
823
#pragma line 821 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_addWeighted>(src1, src2, dst, alpha, beta, gamma);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T, typename P_T>
void Scale(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst,
P_T scale=1.0,
P_T shift=0.0)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 834 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
835
#pragma line 834 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 836 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
837
#pragma line 836 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> scl;
arithm_pro<kernel_scale>(src, scl, dst, scale, shift, (P_T)0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T, int DST_T>
void Set(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 848 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
849
#pragma line 848 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 850 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
851
#pragma line 850 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
arithm_pro<kernel_set>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, typename _T, int DST_T>
void Set(
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), _T> scl,
Mat<ROWS, COLS, DST_T>& dst)
{
arithm_pro<kernel_set>(scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Zero(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s0;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
s0.val[k] = 0;
}
arithm_pro<kernel_set>(src, s0, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int DST_T>
void Zero(
Mat<ROWS, COLS, DST_T>& dst)
{
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> s0;
loop_channels: for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
s0.val[k] = 0;
}
arithm_pro<kernel_set>(s0, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void AbsDiff(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 894 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
896
#pragma line 894 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 897 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
899
#pragma line 897 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_absdiff>(src1, src2, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Not(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 908 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
909
#pragma line 908 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 910 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
911
#pragma line 910 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> scl;
arithm_pro<kernel_not>(src, scl, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void Cmp(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst,
int cmp_op)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 923 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
925
#pragma line 923 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 926 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
928
#pragma line 926 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_cmp>(src1, src2, dst, cmp_op, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename P_T, int DST_T>
void CmpS(
Mat<ROWS, COLS, SRC_T>& src,
P_T value,
Mat<ROWS, COLS, DST_T>& dst,
int cmp_op)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 939 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
940
#pragma line 939 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 941 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
942
#pragma line 941 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), P_T> scl;
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
scl.val[k] = (value);
}
arithm_pro<kernel_cmp>(src, scl, dst, cmp_op, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void And(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 957 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
959
#pragma line 957 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 960 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
962
#pragma line 960 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_and>(src1, src2, dst, 0, 0, 0);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
void And(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask,
Mat<ROWS, COLS, DST_T>& dst_ref)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 974 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
976
#pragma line 974 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 977 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
979
#pragma line 977 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
arithm_pro<kernel_sub>(src1, src2, dst, mask, dst_ref);
}
#pragma empty_line
template<typename INTER_SUM_T, int ROWS, int COLS, int SRC_T, int DST_ROWS, int DST_COLS, int DST_T>
void Reduce(
Mat<ROWS, COLS, SRC_T> &src,
Mat<DST_ROWS, DST_COLS, DST_T> &dst,
int dim,
int op=1)
{
reduce_opr<INTER_SUM_T>(src, dst, dim, op);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T, typename P_T>
void Range(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst,
P_T start,
P_T end)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1000 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1001
#pragma line 1000 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1002 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1003
#pragma line 1002 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source must be single channel image" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source must be single channel image\" && HLS_MAT_CN(SRC_T) == 1",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1004 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1005
#pragma line 1004 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1008));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1009));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
_AP_T _dis = end-start;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
for (HLS_CHANNEL_T k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
d.val[k] = _dis*(i*cols+j)/(rows*cols);
}
dst << d;
}
}
}
#pragma empty_line
template<typename DST_T, int ROWS, int COLS, int SRC_T>
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> Sum(
Mat<ROWS, COLS, SRC_T>& src)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T> sum, sqsum;
int ncount = src.rows * src.cols;
arithm_pro<kernel_sum>(src, sum, sqsum);
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> res;
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
res.val[k] = sr_cast<DST_T>(sum.val[k]);
}
return res;
}
#pragma empty_line
template<typename DST_T, int ROWS, int COLS, int SRC_T>
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> Avg(
Mat<ROWS, COLS, SRC_T>& src)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T> sum, sqsum;
int ncount = src.rows * src.cols;
_AP_T _sum = 0;
arithm_pro<kernel_sum>(src, sum, sqsum);
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> avg;
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
_sum = sum.val[k];
avg.val[k] = _sum/ncount;
}
return avg;
}
#pragma empty_line
template<typename DST_T, int ROWS, int COLS, int SRC_T>
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> Avg(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T> sum, sqsum;
int ncount = 0;
_AP_T _sum = 0;
arithm_pro<kernel_sum>(src, sum, sqsum, ncount, mask);
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> avg;
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
#pragma HLS unroll
_sum = sum.val[k];
avg.val[k] = _sum/ncount;
}
return avg;
}
#pragma empty_line
template<typename DST_T, int ROWS, int COLS, int SRC_T>
DST_T Mean(
Mat<ROWS, COLS, SRC_T>& src)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> avg;
avg = Avg<DST_T>(src);
return avg.val[0];
}
#pragma empty_line
template<typename DST_T, int ROWS, int COLS, int SRC_T>
DST_T Mean(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), DST_T> avg;
avg = Avg<DST_T>(src, mask);
return avg.val[0];
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T>
void AvgSdv(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T>& avg,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T>& sdv)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T> sum, sqsum;
int ncount = src.rows * src.cols;
_AP_T _sum = 0;
ap_fixed<64,40,AP_RND> _sqsum = 0;
arithm_pro<kernel_avgsdv>(src, sum, sqsum);
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
_sum = sum.val[k];
_sqsum = sqsum.val[k];
avg.val[k] = _sum/ncount;
sdv.val[k] = sqrt((double)((_sqsum*ncount)-((_sum)*(_sum))))/ncount;
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename _T>
void AvgSdv(
Mat<ROWS, COLS, SRC_T>& src,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T>& avg,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _T>& sdv,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), _SUM_T> sum, sqsum;
int ncount = 0;
_AP_T _sum = 0;
ap_fixed<64,40,AP_RND> _sqsum = 0;
arithm_pro<kernel_avgsdv>(src, sum, sqsum, ncount, mask);
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
_sum = sum.val[k];
_sqsum = sqsum.val[k];
avg.val[k] = _sum/ncount;
sdv.val[k] = sqrt((double)((_sqsum*ncount)-((_sum)*(_sum))))/ncount;
}
}
#pragma empty_line
template<typename S_T>
class MinMaxLoc_opr
{
public:
template<int ROWS, int COLS, int SRC_T, typename P_T>
static void get_max_min(
Mat<ROWS, COLS, SRC_T>& src,
P_T* min_val,
P_T* max_val,
Point& min_loc,
Point& max_loc)
{
#pragma HLS inline
(("Source must be single channel image" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source must be single channel image\" && HLS_MAT_CN(SRC_T) == 1",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1147 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1148
#pragma line 1147 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1151));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1152));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Name<typename Type<((SRC_T) & ((1 << 4) - 1))>::name> type_val;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _min_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name) type_val._max;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _max_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name) type_val._min;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
if (s.val[0] < _min_val) {
_min_val = s.val[0];
min_loc.x = j;
min_loc.y = i;
}
if (s.val[0] > _max_val) {
_max_val = s.val[0];
max_loc.x = j;
max_loc.y = i;
}
}
}
*min_val = sr_cast<P_T>(_min_val);
*max_val = sr_cast<P_T>(_max_val);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename P_T>
static void get_max_min(
Mat<ROWS, COLS, SRC_T>& src,
P_T* min_val,
P_T* max_val,
Point& min_loc,
Point& max_loc,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
#pragma HLS inline
(("Source must be single channel image" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source must be single channel image\" && HLS_MAT_CN(SRC_T) == 1",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1188 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1189
#pragma line 1188 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1192));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1193));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<1, unsigned char> m;
Name<typename Type<((SRC_T) & ((1 << 4) - 1))>::name> type_val;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _min_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name)type_val._max;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _max_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name)type_val._min;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
mask >> m;
if (m.val[0]) {
if (s.val[0] < (_min_val)) {
_min_val = s.val[0];
min_loc.x = j;
min_loc.y = i;
}
if (s.val[0] > (_max_val)) {
_max_val = s.val[0];
max_loc.x = j;
max_loc.y = i;
}
}
}
}
*min_val = sr_cast<P_T>(_min_val);
*max_val = sr_cast<P_T>(_max_val);
}
#pragma empty_line
};
#pragma empty_line
template< >
class MinMaxLoc_opr<float>
{
public:
template<int ROWS, int COLS, int SRC_T, typename P_T>
static void get_max_min(
Mat<ROWS, COLS, SRC_T>& src,
P_T* min_val,
P_T* max_val,
Point& min_loc,
Point& max_loc)
{
#pragma HLS inline
(("Source must be single channel image" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source must be single channel image\" && HLS_MAT_CN(SRC_T) == 1",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1238 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1239
#pragma line 1238 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1242));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1243));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Name<typename Type<((SRC_T) & ((1 << 4) - 1))>::name> type_val;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _min_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name) type_val._max;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _max_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name) type_val._min;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
fp_struct<float> min_fp(_min_val);
fp_struct<float> max_fp(_max_val);
fp_struct<float> s_fp(s.val[0]);
if (min_fp.sign==1 && s_fp.sign==1) {
if(s_fp.to_int() > min_fp.to_int()) {
_min_val = s.val[0];
min_loc.x = j;
min_loc.y = i;
}
}
else {
if(s_fp.to_int() < min_fp.to_int()) {
_min_val = s.val[0];
min_loc.x = j;
min_loc.y = i;
}
}
#pragma empty_line
if (max_fp.sign==1 && s_fp.sign==1) {
if(s_fp.to_int() < max_fp.to_int()) {
_max_val = s.val[0];
max_loc.x = j;
max_loc.y = i;
}
}
else {
if(s_fp.to_int() > max_fp.to_int()) {
_max_val = s.val[0];
max_loc.x = j;
max_loc.y = i;
}
}
}
}
*min_val = sr_cast<P_T>(_min_val);
*max_val = sr_cast<P_T>(_max_val);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename P_T>
static void get_max_min(
Mat<ROWS, COLS, SRC_T>& src,
P_T* min_val,
P_T* max_val,
Point& min_loc,
Point& max_loc,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
#pragma HLS inline
(("Source must be single channel image" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source must be single channel image\" && HLS_MAT_CN(SRC_T) == 1",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1301 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1302
#pragma line 1301 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1305));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1306));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<1, unsigned char> m;
Name<typename Type<((SRC_T) & ((1 << 4) - 1))>::name> type_val;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _min_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name)type_val._max;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _max_val = (typename Type<((SRC_T) & ((1 << 4) - 1))>::name)type_val._min;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
mask >> m;
fp_struct<float> min_fp(_min_val);
fp_struct<float> max_fp(_max_val);
fp_struct<float> s_fp(s.val[0]);
if (m.val[0]) {
if (min_fp.sign==1 && s_fp.sign==1) {
if(s_fp.to_int() > min_fp.to_int()) {
_min_val = s.val[0];
min_loc.x = j;
min_loc.y = i;
}
}
else {
if(s_fp.to_int() < min_fp.to_int()) {
_min_val = s.val[0];
min_loc.x = j;
min_loc.y = i;
}
}
#pragma empty_line
if (max_fp.sign==1 && s_fp.sign==1) {
if(s_fp.to_int() < max_fp.to_int()) {
_max_val = s.val[0];
max_loc.x = j;
max_loc.y = i;
}
}
else {
if(s_fp.to_int() > max_fp.to_int()) {
_max_val = s.val[0];
max_loc.x = j;
max_loc.y = i;
}
}
}
}
}
*min_val = sr_cast<P_T>(_min_val);
*max_val = sr_cast<P_T>(_max_val);
}
#pragma empty_line
};
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename P_T>
void MinMaxLoc(
Mat<ROWS, COLS, SRC_T>& src,
P_T* min_val,
P_T* max_val,
Point& min_loc,
Point& max_loc)
{
MinMaxLoc_opr< typename Type<((SRC_T) & ((1 << 4) - 1))>::name >::get_max_min(src, min_val, max_val, min_loc, max_loc);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, typename P_T>
void MinMaxLoc(
Mat<ROWS, COLS, SRC_T>& src,
P_T* min_val,
P_T* max_val,
Point& min_loc,
Point& max_loc,
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))>& mask)
{
MinMaxLoc_opr< typename Type<((SRC_T) & ((1 << 4) - 1))>::name >::get_max_min(src, min_val, max_val, min_loc, max_loc, mask);
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Threshold(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst,
typename Type<((SRC_T) & ((1 << 4) - 1))>::name thresh,
typename Type<((DST_T) & ((1 << 4) - 1))>::name maxval,
int thresh_type)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1391 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1392
#pragma line 1391 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1393 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1394
#pragma line 1393 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source must be single channel image" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source must be single channel image\" && HLS_MAT_CN(SRC_T) == 1",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1395 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1396
#pragma line 1395 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1399));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1400));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _thresh = sr_cast<typename Type<((SRC_T) & ((1 << 4) - 1))>::name>(thresh);
typename Type<((DST_T) & ((1 << 4) - 1))>::name _maxval = sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(maxval);
typename Type<((DST_T) & ((1 << 4) - 1))>::name _zero = 0;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
for (HLS_CHANNEL_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
switch (thresh_type) {
case 0:
d.val[k] = (s.val[k] > _thresh) ? (_maxval) : _zero;
break;
case 1:
d.val[k] = (s.val[k] > _thresh) ? _zero : (_maxval);
break;
case 2:
d.val[k] = (s.val[k] > _thresh) ? (_thresh) : s.val[k];
break;
case 3:
d.val[k] = (s.val[k] > _thresh) ? (s.val[k]) : _zero;
break;
case 4:
d.val[k] = (s.val[k] > _thresh) ? _zero : (s.val[k]);
break;
default:
d.val[k] = s.val[k];
break;
}
}
dst << d;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T>
void Consume(
Mat<ROWS, COLS, SRC_T>& src)
{
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1444));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1445));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Duplicate(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst1,
Mat<ROWS, COLS, DST_T>& dst2)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1462 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
1463
#pragma line 1462 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
;
(("Source and destination images must have same sizes" && ((src).rows == (dst1).rows && (src).cols == (dst1).cols) && ((src).rows == (dst2).rows && (src).cols == (dst2).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst1) && HLS_ARE_SIZES_EQ(src, dst2)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1464 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1466
#pragma line 1464 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1469));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1470));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
dst1 << s;
dst2 << s;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Split(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst0,
Mat<ROWS, COLS, DST_T>& dst1)
{
(("Source and destination images must have required number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 2 && ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source and destination images must have required number of channels\" && HLS_MAT_CN(SRC_T) == 2 && HLS_MAT_CN(DST_T) == 1",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1489 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1491
#pragma line 1489 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src).rows == (dst0).rows && (src).cols == (dst0).cols) && ((src).rows == (dst1).rows && (src).cols == (dst1).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst0) && HLS_ARE_SIZES_EQ(src, dst1)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1492 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1494
#pragma line 1492 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1499));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1500));
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
d.val[0] = s.val[0]; dst0 << d;
d.val[0] = s.val[1]; dst1 << d;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Split(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst0,
Mat<ROWS, COLS, DST_T>& dst1,
Mat<ROWS, COLS, DST_T>& dst2)
{
(("Source and destination images must have required number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 3 && ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source and destination images must have required number of channels\" && HLS_MAT_CN(SRC_T) == 3 && HLS_MAT_CN(DST_T) == 1",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1519 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1521
#pragma line 1519 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src).rows == (dst0).rows && (src).cols == (dst0).cols) && ((src).rows == (dst1).rows && (src).cols == (dst1).cols) && ((src).rows == (dst2).rows && (src).cols == (dst2).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst0) && HLS_ARE_SIZES_EQ(src, dst1) && HLS_ARE_SIZES_EQ(src, dst2)",
#pragma empty_line
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1522 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
#pragma empty_line
1525
#pragma line 1522 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
#pragma empty_line
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1530));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1531));
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
d.val[0] = s.val[0]; dst0 << d;
d.val[0] = s.val[1]; dst1 << d;
d.val[0] = s.val[2]; dst2 << d;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Split(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst0,
Mat<ROWS, COLS, DST_T>& dst1,
Mat<ROWS, COLS, DST_T>& dst2,
Mat<ROWS, COLS, DST_T>& dst3)
{
(("Source and destination images must have required number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 4 && ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) == 1) ? (void)0 : _assert("\"Source and destination images must have required number of channels\" && HLS_MAT_CN(SRC_T) == 4 && HLS_MAT_CN(DST_T) == 1",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1552 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1554
#pragma line 1552 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src).rows == (dst0).rows && (src).cols == (dst0).cols) && ((src).rows == (dst1).rows && (src).cols == (dst1).cols) && ((src).rows == (dst2).rows && (src).cols == (dst2).cols) && ((src).rows == (dst3).rows && (src).cols == (dst3).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst0) && HLS_ARE_SIZES_EQ(src, dst1) && HLS_ARE_SIZES_EQ(src, dst2) && HLS_ARE_SIZES_EQ(src, dst3)",
#pragma empty_line
#pragma empty_line
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1555 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
#pragma empty_line
#pragma empty_line
1559
#pragma line 1555 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1564));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1565));
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src >> s;
d.val[0] = s.val[0]; dst0 << d;
d.val[0] = s.val[1]; dst1 << d;
d.val[0] = s.val[2]; dst2 << d;
d.val[0] = s.val[3]; dst3 << d;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Merge(
Mat<ROWS, COLS, SRC_T>& src0,
Mat<ROWS, COLS, SRC_T>& src1,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have required number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1 && ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) == 2) ? (void)0 : _assert("\"Source and destination images must have required number of channels\" && HLS_MAT_CN(SRC_T) == 1 && HLS_MAT_CN(DST_T) == 2",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1585 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1587
#pragma line 1585 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src0).rows == (dst).rows && (src0).cols == (dst).cols) && ((src1).rows == (dst).rows && (src1).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src0, dst) && HLS_ARE_SIZES_EQ(src1, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1588 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1590
#pragma line 1588 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1595));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1596));
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src0 >> s; d.val[0] = s.val[0];
src1 >> s; d.val[1] = s.val[0];
dst << d;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Merge(
Mat<ROWS, COLS, SRC_T>& src0,
Mat<ROWS, COLS, SRC_T>& src1,
Mat<ROWS, COLS, SRC_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have required number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1 && ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) == 3) ? (void)0 : _assert("\"Source and destination images must have required number of channels\" && HLS_MAT_CN(SRC_T) == 1 && HLS_MAT_CN(DST_T) == 3",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1615 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1617
#pragma line 1615 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src0).rows == (dst).rows && (src0).cols == (dst).cols) && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src0, dst) && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1618 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
#pragma empty_line
1621
#pragma line 1618 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
#pragma empty_line
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1626));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1627));
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src0 >> s; d.val[0] = s.val[0];
src1 >> s; d.val[1] = s.val[0];
src2 >> s; d.val[2] = s.val[0];
dst << d;
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Merge(
Mat<ROWS, COLS, SRC_T>& src0,
Mat<ROWS, COLS, SRC_T>& src1,
Mat<ROWS, COLS, SRC_T>& src2,
Mat<ROWS, COLS, SRC_T>& src3,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have required number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == 1 && ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) == 4) ? (void)0 : _assert("\"Source and destination images must have required number of channels\" && HLS_MAT_CN(SRC_T) == 1 && HLS_MAT_CN(DST_T) == 4",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1648 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
1650
#pragma line 1648 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
;
(("Source and destination images must have same sizes" && ((src0).rows == (dst).rows && (src0).cols == (dst).cols) && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols) && ((src3).rows == (dst).rows && (src3).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src0, dst) && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst) && HLS_ARE_SIZES_EQ(src3, dst)",
#pragma empty_line
#pragma empty_line
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
#pragma line 1651 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
,
#pragma empty_line
#pragma empty_line
#pragma empty_line
1655
#pragma line 1651 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h"
))
#pragma empty_line
#pragma empty_line
#pragma empty_line
;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
HLS_SIZE_T rows = dst.rows;
HLS_SIZE_T cols = dst.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1660));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_arithm.h", 1661));
loop_height: for (HLS_SIZE_T i = 0; i < rows; i++) {
loop_width: for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
src0 >> s; d.val[0] = s.val[0];
src1 >> s; d.val[1] = s.val[0];
src2 >> s; d.val[2] = s.val[0];
src3 >> s; d.val[3] = s.val[0];
dst << d;
}
}
}
#pragma empty_line
}
#pragma line 62 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h" 1
#pragma line 91 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
namespace hls {
#pragma empty_line
inline void assert_cn(int SRC_T,int DST_T)
{
(("Source and destination images must have same number of channels" && ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC_T) == HLS_MAT_CN(DST_T)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
#pragma line 95 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
,
96
#pragma line 95 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
))
;
}
inline void assert_cn(int SRC1_T,int SRC2_T,int DST_T)
{
(("Source and destination images must have same number of channels" && ((((SRC1_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1) && ((((SRC2_T) & ((512 - 1) << 4)) >> 4) + 1) == ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1)) ? (void)0 : _assert("\"Source and destination images must have same number of channels\" && HLS_MAT_CN(SRC1_T) == HLS_MAT_CN(DST_T) && HLS_MAT_CN(SRC2_T) == HLS_MAT_CN(DST_T)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
#pragma line 100 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
,
#pragma empty_line
102
#pragma line 100 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
))
#pragma empty_line
;
}
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
inline void assert_size(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
#pragma line 110 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
,
#pragma empty_line
112
#pragma line 110 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
))
#pragma empty_line
;
}
template<int ROWS, int COLS, int SRC1_T, int SRC2_T, int DST_T>
inline void assert_cn_size(
Mat<ROWS, COLS, SRC1_T>& src1,
Mat<ROWS, COLS, SRC2_T>& src2,
Mat<ROWS, COLS, DST_T>& dst)
{
assert_cn(SRC1_T,SRC2_T,DST_T);
(("Source and destination images must have same sizes" && ((src1).rows == (dst).rows && (src1).cols == (dst).cols) && ((src2).rows == (dst).rows && (src2).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src1, dst) && HLS_ARE_SIZES_EQ(src2, dst)",
#pragma empty_line
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
#pragma line 121 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
,
#pragma empty_line
123
#pragma line 121 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
))
#pragma empty_line
;
}
template<int ROWS, int COLS, int SRC_T, int DST_T>
inline void assert_size(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst)
{
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
#pragma line 130 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
,
131
#pragma line 130 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
))
;
}
template<int ROWS, int COLS, int SRC_T, int DST_T>
inline void assert_cn_size(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst)
{
assert_cn(SRC_T,DST_T);
(("Source and destination images must have same sizes" && ((src).rows == (dst).rows && (src).cols == (dst).cols)) ? (void)0 : _assert("\"Source and destination images must have same sizes\" && HLS_ARE_SIZES_EQ(src, dst)",
"F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
#pragma line 139 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
,
140
#pragma line 139 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h"
))
;
}
class erode_kernel
{
public:
template<int SRC, typename SRC_T,typename DST_T,typename FILTER_T, int F_HEIGHT, int F_WIDTH>
void apply(Window<F_HEIGHT,F_WIDTH,FILTER_T> &_kernel_filter,
Window<F_HEIGHT,F_WIDTH,SRC_T> &_kernel_pixel,
DST_T &out)
{
#pragma HLS INLINE
out = hls::numeric_limits<DST_T>::max();
loop_height: for( int m=0;m< F_HEIGHT;m++)
{
loop_width: for( int n=0;n<F_WIDTH;n++)
{
DST_T temp;
if(_kernel_filter.val[F_HEIGHT-m-1][F_WIDTH-1-n]>0)
{
temp=_kernel_pixel.val[F_HEIGHT-m-1][(F_WIDTH-1-n)];
if (temp<out)
out=temp;
}
}
}
}
};
#pragma empty_line
class dilate_kernel
{
public:
template<int SRC, typename SRC_T,typename DST_T,typename FILTER_T, int F_HEIGHT, int F_WIDTH>
void apply(Window<F_HEIGHT,F_WIDTH,FILTER_T> &_kernel_filter,
Window<F_HEIGHT,F_WIDTH,SRC_T> &_kernel_pixel,
DST_T &out)
{
#pragma HLS INLINE
out = hls::numeric_limits<DST_T>::min();
loop_height: for( int m=0;m< F_HEIGHT;m++)
{
loop_width: for( int n=0;n<F_WIDTH;n++)
{
DST_T temp;
if(_kernel_filter.val[F_HEIGHT-m-1][F_WIDTH-1-n]>0)
{
temp=_kernel_pixel.val[F_HEIGHT-m-1][(F_WIDTH-1-n)];
if (temp>out)
out=temp;
}
}
}
}
};
#pragma empty_line
#pragma empty_line
template <typename SRC_T, typename FILTER_T, int SIZE>
struct filter2d_traits {
typedef typename fixed_type<SRC_T>::T SRC_CAST_T;
typedef typename fixed_type<FILTER_T>::T FILTER_CAST_T;
typedef typename x_traits<SRC_CAST_T, FILTER_CAST_T >::MULT_T MULT_T;
typedef typename x_traits_d<MULT_T, SIZE>::ACCUM_T ACCUM_T;
};
#pragma empty_line
template <int SIZE , int W, int I, ap_q_mode _AP_Q, ap_o_mode _AP_O>
struct filter2d_traits<float, ap_fixed<W, I, _AP_Q, _AP_O>, SIZE> {
typedef float SRC_CAST_T;
typedef float FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
template <int SIZE , int W>
struct filter2d_traits<float, ap_int<W>, SIZE> {
typedef float SRC_CAST_T;
typedef ap_int<W> FILTER_CAST_T;
typedef float MULT_T;
typedef float ACCUM_T;
};
template <int SIZE>
struct filter2d_traits<unsigned char,float, SIZE> {
typedef unsigned char SRC_CAST_T;
typedef float FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
template <int SIZE>
struct filter2d_traits<float, unsigned char, SIZE> {
typedef float SRC_CAST_T;
typedef unsigned char FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
template <int SIZE>
struct filter2d_traits<float, float, SIZE> {
typedef float SRC_CAST_T;
typedef float FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
template <int SIZE>
struct filter2d_traits<double, double, SIZE> {
typedef double SRC_CAST_T;
typedef double FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
template <int SIZE>
struct filter2d_traits<float, double, SIZE> {
typedef float SRC_CAST_T;
typedef double FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
template <int SIZE>
struct filter2d_traits<double, float, SIZE> {
typedef double SRC_CAST_T;
typedef float FILTER_CAST_T;
typedef ap_fixed<64,32,AP_RND> MULT_T;
typedef ap_fixed<64,32,AP_RND> ACCUM_T;
};
#pragma empty_line
class filter2d_kernel
{
#pragma empty_line
public:
template<int SRC, typename SRC_T,typename DST_T,typename FILTER_T, int F_HEIGHT, int F_WIDTH>
void apply(Window<F_HEIGHT,F_WIDTH,FILTER_T> &_kernel_filter,
Window<F_HEIGHT,F_WIDTH,SRC_T> &_kernel_pixel,
DST_T &out) {
#pragma HLS INLINE
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::ACCUM_T sum=0;
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::ACCUM_T temp=0;
loop_height: for(int m = 0; m < F_HEIGHT; m++) {
loop_width: for(int n = 0; n < F_WIDTH; n++) {
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::SRC_CAST_T src_v =
_kernel_pixel.val[F_HEIGHT-m-1][F_WIDTH-1-n];
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::FILTER_CAST_T filter_v =
_kernel_filter.val[m][n];
temp = src_v * filter_v;
sum = sum + temp;
}
}
out=sr_cast<DST_T>(sum);
}
};
#pragma empty_line
#pragma empty_line
template <typename SRC_T,typename SIZE_T,typename POINT_T,int HEIGHT,int WIDTH>
void getStructuringElement(
int shape,
Size_<SIZE_T> ksize,
Point_<POINT_T> anchor,
Window<HEIGHT,WIDTH,SRC_T> &result)
{
#pragma HLS inline
int i, j;
int r = 0, c = 0;
ap_fixed<31,11,AP_RND> inv_r2 = 0;
#pragma empty_line
if( ksize.width==1&&ksize.height == 1 )
shape = MORPH_RECT;
#pragma empty_line
if( shape == MORPH_ELLIPSE )
{
r = ksize.height/2;
c = ksize.width/2;
if(r!=0)
{
inv_r2 =(ap_fixed<31,11,AP_RND>) 1/(r*r) ;
}
else
inv_r2=0;
}
loop_height: for( i = 0; i < ksize.height; i++ )
{
int j1 = 0, j2 = 0;
if( shape == MORPH_RECT || (shape ==MORPH_CROSS && i == anchor.y) )
j2 = ksize.width;
else if( shape == MORPH_CROSS ) {
j1 = anchor.x;
j2 = j1 + 1;
} else
{
int dy = i - r;
if( abs(dy) <= r )
{
ap_fixed<12,12,AP_RND> dxx = (c*::hls::sqrt(((r-dy)*(r+dy))*inv_r2));
int dx=dxx;
j1 = (c - dx)> 0?( c - dx):0;
j2 = (c + dx + 1)< ksize.width?(c + dx + 1):ksize.width;
}
}
loop_width: for( j = 0; j < ksize.width; j++ ) {
if(shape == MORPH_RECT || (j >= j1 && j < j2)) {
result.val[i][j] = 1;
} else {
result.val[i][j] = 0;
}
}
}
}
#pragma empty_line
#pragma empty_line
template<typename P_T,typename W_T,int W_HEIGHT, int W_WIDTH,typename BUF_T,int BUF_HEIGHT,int BUF_WIDTH >
void fill_pixelkernel(
LineBuffer<BUF_HEIGHT,BUF_WIDTH,BUF_T> &col_buf,
Window<W_HEIGHT,W_WIDTH,W_T> &kernel,
Point_<P_T> curp,
int borderType, int ref,
int imgheight,int constval=0, bool forceconst = false)
{
#pragma HLS INLINE
loop_fill: for(int buf_row= 0;buf_row<W_HEIGHT;buf_row++)
{
int locy;
int t = borderInterpolate(curp.y,imgheight,borderType);
locy = ref - t;
curp.y--;
kernel.val[buf_row][0] = (t < 0 || forceconst) ? constval : col_buf.val[locy][0];
}
}
#pragma empty_line
template<typename OPR_KERNEL, typename BORDERMODE>
class filter_opr {
public:
template<int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
static void filter(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &kernel,
Point_<POINT_T> _anchor,
int rows,int cols)
{
#pragma HLS inline
OPR_KERNEL fk_opr;
#pragma empty_line
Window<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> src_kernel_win[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
LineBuffer<2*K_HEIGHT,IMG_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> k_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
#pragma empty_line
Window<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> right_border_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
Window<K_HEIGHT,1,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> col_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
((rows >= 8) ? (void)0 : _assert("rows >= 8", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 385));
((cols >= 8) ? (void)0 : _assert("cols >= 8", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 386));
((rows <= IMG_HEIGHT) ? (void)0 : _assert("rows <= IMG_HEIGHT", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 387));
((cols <= IMG_WIDTH) ? (void)0 : _assert("cols <= IMG_WIDTH", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 388));
#pragma empty_line
#pragma HLS ARRAY_PARTITION variable=col_buf complete dim=0
#pragma HLS ARRAY_PARTITION variable=&kernel complete dim=0
#pragma HLS ARRAY_PARTITION variable=src_kernel_win complete dim=0
#pragma HLS ARRAY_PARTITION variable=k_buf complete dim=1
#pragma HLS ARRAY_PARTITION variable=right_border_buf complete dim=0
#pragma empty_line
Point_<POINT_T> anchor;
anchor.x=_anchor.x;
anchor.y=_anchor.y;
Size_<int> kernel_size;
kernel_size.width=K_WIDTH;
kernel_size.height=K_HEIGHT;
normalizeAnchor(anchor,kernel_size);
((anchor.x >= 0) ? (void)0 : _assert("anchor.x >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 403));
((anchor.x <= K_WIDTH-1) ? (void)0 : _assert("anchor.x <= K_WIDTH-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 404));
((anchor.y >= 0) ? (void)0 : _assert("anchor.y >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 405));
((anchor.y <= K_HEIGHT-1) ? (void)0 : _assert("anchor.y <= K_HEIGHT-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 406));
#pragma empty_line
int start_row;
int row_index;
int col_index;
int stop_row;
get_parameters<K_HEIGHT, K_WIDTH>(rows, anchor, start_row, stop_row, row_index, col_index);
((start_row >= 0) ? (void)0 : _assert("start_row >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 413));
((start_row <= K_HEIGHT-1) ? (void)0 : _assert("start_row <= K_HEIGHT-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 414));
#pragma empty_line
int heightloop= rows+start_row+1;
int widthloop = cols+K_WIDTH-1;
Point_<int> ImagLoc;
int channels=((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);
#pragma empty_line
loop_height: for(HLS_SIZE_T i= 0;i< heightloop;i++) {
loop_width: for (HLS_SIZE_T j= 0;j< widthloop;j++) {
#pragma empty_line
#pragma HLS DEPENDENCE array inter false
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
channelloop: for(HLS_CHANNEL_T k= 0; k < channels; k++)
{
ImagLoc.x=j-anchor.x;
int x = borderInterpolate(ImagLoc.x, cols, BORDERMODE::value);
((x < cols) ? (void)0 : _assert("x < cols", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 431));
#pragma empty_line
#pragma empty_line
for(int buf_row=0; buf_row<K_HEIGHT; buf_row++) {
if((i<stop_row) && (ImagLoc.x>=cols)) {
col_buf[k](buf_row,0)=right_border_buf[k](buf_row,cols-1-x);
} else {
col_buf[k](buf_row,0)=k_buf[k](K_HEIGHT+buf_row,x);
}
}
#pragma empty_line
#pragma empty_line
if(ImagLoc.x >= 0 && ImagLoc.x < cols) {
if(i<=start_row) {
typename Type<((SRC_T) & ((1 << 4) - 1))>::name src_temp;
_src.data_stream[k] >> src_temp;
for(int m=2*K_HEIGHT-1; m>=0; m--) {
int y = borderInterpolate(2*K_HEIGHT-1-anchor.y-m, rows, BORDERMODE::value);
if(y==i) {
k_buf[k](m,x)=src_temp;
}
}
} else if(i<stop_row) {
#pragma empty_line
#pragma empty_line
for(int buf_row=0; buf_row<K_HEIGHT; buf_row++) {
for(int buf_col=K_WIDTH-1; buf_col>0; buf_col--) {
if(buf_col <= col_index) {
right_border_buf[k](buf_row,buf_col)=right_border_buf[k](buf_row,buf_col-1);
}
}
right_border_buf[k](buf_row,0)=col_buf[k](buf_row,0);
}
#pragma empty_line
for(int row=2*K_HEIGHT-1; row>0; row--) {
if(row>row_index) {
k_buf[k](row,x)=k_buf[k](row-1,x);
}
}
if(i<rows) {
_src.data_stream[k] >> k_buf[k](row_index,x);
}
}
}
#pragma empty_line
#pragma empty_line
src_kernel_win[k].shift_right();
#pragma empty_line
for(int buf_row=0; buf_row<K_HEIGHT; buf_row++){
if(i<=stop_row) {
src_kernel_win[k](buf_row,0)=col_buf[k](buf_row,0);
}
else {
int y = borderInterpolate((i-(stop_row-rows+1)-buf_row), rows, BORDERMODE::value);
src_kernel_win[k](buf_row,0)=col_buf[k](rows-1-y,0);
}
}
#pragma empty_line
#pragma empty_line
if(i > start_row && j >= K_WIDTH-1) {
typename Type<((DST_T) & ((1 << 4) - 1))>::name temp;
fk_opr.template apply< SRC_T >(kernel,src_kernel_win[k],temp);
_dst.data_stream[k]<<temp;
}
}
}
}
}
#pragma empty_line
private:
template<int K_HEIGHT, int K_WIDTH, typename POINT_T>
static void get_parameters(int rows, Point_<POINT_T> anchor, int &start_row, int &stop_row, int &row_index, int &col_index)
{
#pragma HLS inline
if(BORDERMODE::value==BORDER_REPLICATE::value) {
start_row=K_HEIGHT-1-anchor.y;
row_index=K_HEIGHT;
col_index=0;
stop_row=rows;
} else if(BORDERMODE::value==BORDER_REFLECT::value) {
col_index=K_WIDTH-1-anchor.x-1;
if(anchor.y<=K_HEIGHT/2) {
start_row=K_HEIGHT-1-anchor.y;
row_index=K_HEIGHT;
stop_row=rows;
} else {
start_row=anchor.y-1;
row_index=2*K_HEIGHT-2*anchor.y;
stop_row=rows+K_HEIGHT-row_index;
}
} else if(BORDERMODE::value==BORDER_REFLECT_101::value) {
col_index=K_WIDTH-1-anchor.x;
if(anchor.y<=K_HEIGHT/2) {
start_row=K_HEIGHT-1-anchor.y;
row_index=K_HEIGHT;
stop_row=rows;
} else {
start_row=anchor.y;
row_index=2*K_HEIGHT-2*anchor.y-1;
stop_row=rows+K_HEIGHT-row_index;
}
}
}
#pragma empty_line
};
#pragma empty_line
template<typename OPR_KERNEL>
class filter_opr<OPR_KERNEL, BORDER_CONSTANT> {
public:
template<int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
static void filter(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &kernel,
Point_<POINT_T> _anchor,
int rows,int cols)
{
typename Type<((SRC_T) & ((1 << 4) - 1))>::name fillvalue = 0;
#pragma HLS inline
OPR_KERNEL fk_opr;
#pragma empty_line
Window<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> src_kernel_win[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
LineBuffer<K_HEIGHT,IMG_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> k_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
Window<1,K_HEIGHT,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> col_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
#pragma HLS ARRAY_PARTITION variable=&kernel complete dim=0
#pragma HLS ARRAY_PARTITION variable=src_kernel_win complete dim=0
#pragma HLS ARRAY_PARTITION variable=k_buf complete dim=1
#pragma HLS ARRAY_PARTITION variable=col_buf complete dim=0
#pragma empty_line
((rows <= IMG_HEIGHT) ? (void)0 : _assert("rows <= IMG_HEIGHT", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 564));
((cols <= IMG_WIDTH) ? (void)0 : _assert("cols <= IMG_WIDTH", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 565));
#pragma empty_line
#pragma empty_line
Point_<POINT_T> anchor;
anchor.x=_anchor.x;
anchor.y=_anchor.y;
Size_<int> kernel_size;
kernel_size.width=K_WIDTH;
kernel_size.height=K_HEIGHT;
normalizeAnchor(anchor,kernel_size);
((anchor.x >= 0) ? (void)0 : _assert("anchor.x >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 575));
((anchor.x <= K_WIDTH-1) ? (void)0 : _assert("anchor.x <= K_WIDTH-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 576));
((anchor.y >= 0) ? (void)0 : _assert("anchor.y >= 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 577));
((anchor.y <= K_HEIGHT-1) ? (void)0 : _assert("anchor.y <= K_HEIGHT-1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 578));
#pragma empty_line
int start_row=K_HEIGHT-1-anchor.y;
int start_col=K_WIDTH-1-anchor.x;
int heightloop= rows+start_row;
int widthloop = cols+start_col;
Point_<int> ImagLoc;
int channels=((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);
#pragma empty_line
loop_height: for(HLS_SIZE_T i= 0;i< heightloop;i++) {
loop_width: for (HLS_SIZE_T j= 0;j< widthloop;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
channelloop: for(HLS_CHANNEL_T k= 0; k < channels; k++)
{
typename Type<((SRC_T) & ((1 << 4) - 1))>::name src_temp;
if((j<cols) && (i<rows)) {
_src.data_stream[k] >> src_temp;
}
#pragma empty_line
if(j<cols) {
for(int buf_row=K_HEIGHT-1; buf_row>0; buf_row--) {
col_buf[k](0,buf_row)=k_buf[k](buf_row-1,j);
}
} else {
for(int buf_row=K_HEIGHT-1; buf_row>=0; buf_row--) {
col_buf[k](0,buf_row)=fillvalue;
}
}
#pragma empty_line
if(j<cols) {
if(i==0) {
for(int buf_row=K_HEIGHT-1; buf_row>0; buf_row--) {
k_buf[k](buf_row,j)=fillvalue;
col_buf[k](0,buf_row)=fillvalue;
}
k_buf[k](0,j)=src_temp;
col_buf[k](0,0)=src_temp;
} else {
if(i>=rows) {
src_temp=fillvalue;
}
k_buf[k].shift_down(j);
k_buf[k](0,j)=src_temp;
col_buf[k](0,0)=src_temp;
}
}
#pragma empty_line
if(j==0) {
for(int buf_row=K_HEIGHT-1; buf_row>=0; buf_row--) {
for(int buf_col=K_WIDTH-1; buf_col>0; buf_col--) {
src_kernel_win[k](buf_row,buf_col)=fillvalue;
}
}
} else {
src_kernel_win[k].shift_right();
}
src_kernel_win[k].insert_right(col_buf[k].val[0]);
#pragma empty_line
#pragma empty_line
if(i >= start_row && j >= start_col) {
typename Type<((DST_T) & ((1 << 4) - 1))>::name temp;
fk_opr.template apply< SRC_T >(kernel,src_kernel_win[k],temp);
_dst.data_stream[k]<<temp;
}
}
}
}
}
};
#pragma empty_line
template<typename OPR_KERNEL, typename BORDERMODE, int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void filter_opr_flow_more(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel,
Point_<POINT_T> &anchor,
int rows, int cols
)
{
filter_opr<OPR_KERNEL, BORDERMODE>::filter(_src,_dst,_kernel,anchor,rows,cols);
}
template<typename OPR_KERNEL, typename BORDERMODE, int ITERATIONS,int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void filter_opr_iter(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel,
Point_<POINT_T> &anchor,
int rows,int cols )
{
#pragma HLS INLINE
Mat<IMG_HEIGHT,IMG_WIDTH,DST_T> internal[ITERATIONS-1];
#pragma HLS array partition variable=internal dim=1
filter_opr_flow_more<OPR_KERNEL,BORDERMODE,SRC_T,DST_T,KN_T,POINT_T>(_src,internal[0],_kernel,anchor,rows,cols);
loop_iterations: for(int iter=0;iter<ITERATIONS-2;iter++)
{
#pragma HLS UNROLL
filter_opr_flow_more<OPR_KERNEL,BORDERMODE,SRC_T,DST_T,KN_T,POINT_T>(internal[iter],internal[iter+1],_kernel,anchor,rows, cols);
}
filter_opr_flow_more<OPR_KERNEL,BORDERMODE,SRC_T,DST_T,KN_T,POINT_T>(internal[ITERATIONS-2],_dst,_kernel,anchor,rows,cols);
}
template<typename OPR_KERNEL, typename BORDERMODE, int SRC_T, int DST_T,
int IMG_HEIGHT,int IMG_WIDTH>
void morp_opr(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst)
{
#pragma HLS inline
int rows=_src.rows;
int cols=_src.cols;
Size_<int> size;
Point_<int> anchor;
anchor.x=1;
anchor.y=1;
size.width=2*1+1;
size.height=2*1+1;
Window<2*1+1,2*1+1,unsigned char> temp_kernel;
getStructuringElement<unsigned char,int,int,2*1+1,2*1+1>(MORPH_RECT, size, anchor,temp_kernel);
#pragma empty_line
filter_opr<OPR_KERNEL, BORDERMODE>::filter(_src,_dst,temp_kernel,anchor,rows,cols);
}
template<typename OPR_KERNEL, typename BORDERMODE, int Shape_type, int ITERATIONS, int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void morp_opr(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel,
Point_<POINT_T> anchor)
{
#pragma HLS INLINE
int rows=_src.rows;
int cols=_src.cols;
if((Shape_type==MORPH_RECT)&&ITERATIONS>1)
{
Size_<int> size;
anchor.x=ITERATIONS*(anchor.x);
anchor.y=ITERATIONS*(anchor.y);
size.width=K_WIDTH+ITERATIONS*(K_WIDTH-1);
size.height=K_HEIGHT+ITERATIONS*(K_HEIGHT-1);
Window<K_WIDTH+ITERATIONS*(K_WIDTH-1),K_HEIGHT+ITERATIONS*(K_HEIGHT-1),KN_T> temp_kernel;
getStructuringElement<KN_T,int,int,K_WIDTH+ITERATIONS*(K_WIDTH-1),K_HEIGHT+ITERATIONS*(K_HEIGHT-1)>(MORPH_RECT, size, anchor,temp_kernel);
#pragma empty_line
filter_opr<OPR_KERNEL, BORDERMODE>::filter(_src,_dst,temp_kernel,anchor,rows,cols);
}
else if(ITERATIONS==1)
{
filter_opr<OPR_KERNEL, BORDERMODE>::filter(_src,_dst,_kernel,anchor,rows,cols);
}
else if(ITERATIONS>=2)
{
filter_opr_iter<OPR_KERNEL, BORDERMODE, ITERATIONS,SRC_T,DST_T,KN_T,POINT_T>(_src,_dst,_kernel,anchor,rows,cols);
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int SRC_T, int DST_T, int IMG_HEIGHT,int IMG_WIDTH>
void Erode(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst)
{
assert_cn(SRC_T,DST_T);
morp_opr<erode_kernel,BORDER_REPLICATE>(_src,_dst);
}
template<int Shape_type,int ITERATIONS,int SRC_T, int DST_T, typename KN_T,int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void Erode(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel)
{
#pragma HLS INLINE
assert_cn(SRC_T,DST_T);
Point_<int> anchor(K_WIDTH/2,K_HEIGHT/2);
morp_opr<erode_kernel,BORDER_REPLICATE,Shape_type,ITERATIONS>(_src,_dst,_kernel,anchor);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int SRC_T, int DST_T, int IMG_HEIGHT,int IMG_WIDTH>
void Dilate(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst)
{
assert_cn(SRC_T,DST_T);
morp_opr<dilate_kernel,BORDER_REPLICATE>(_src,_dst);
}
template<int Shape_type,int ITERATIONS,int SRC_T, int DST_T, typename KN_T,int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void Dilate(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel)
{
#pragma HLS INLINE
assert_cn(SRC_T,DST_T);
Point_<int> anchor(K_WIDTH/2,K_HEIGHT/2);
morp_opr<dilate_kernel,BORDER_REPLICATE,Shape_type,ITERATIONS>(_src,_dst,_kernel,anchor);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename BORDERMODE, int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void Filter2D(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel,
Point_<POINT_T> anchor)
{
assert_cn(SRC_T,DST_T);
int rows=_src.rows;
int cols=_src.cols;
filter_opr<filter2d_kernel, BORDERMODE>::filter(_src,_dst,_kernel,anchor,rows,cols);
}
#pragma empty_line
template<int SRC_T, int DST_T, typename KN_T, typename POINT_T,
int IMG_HEIGHT,int IMG_WIDTH,int K_HEIGHT,int K_WIDTH>
void Filter2D(
Mat<IMG_HEIGHT, IMG_WIDTH, SRC_T> &_src,
Mat<IMG_HEIGHT, IMG_WIDTH, DST_T> &_dst,
Window<K_HEIGHT,K_WIDTH,KN_T> &_kernel,
Point_<POINT_T> anchor)
{
assert_cn(SRC_T,DST_T);
int rows=_src.rows;
int cols=_src.cols;
filter_opr<filter2d_kernel, BORDER_DEFAULT>::filter(_src,_dst,_kernel,anchor,rows,cols);
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
class CvtColor_mode {
public:
enum values {RGB2GRAY,BGR2GRAY,GRAY2RGB,GRAY2BGR,
BGR2XYZ, RGB2XYZ, XYZ2BGR, XYZ2RGB,
BGR2YCrCb, RGB2YCrCb, YCrCb2BGR, YCrCb2RGB,
BGR2HSV, RGB2HSV, HSV2BGR, HSV2RGB,
BGR2HLS, RGB2HLS, HLS2BGR, HLS2RGB};
typedef void isCvtColorMode;
};
#pragma empty_line
}
#pragma empty_line
class HLS_RGB2GRAY : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::RGB2GRAY; };
class HLS_BGR2GRAY : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::BGR2GRAY; };
class HLS_GRAY2RGB : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::GRAY2RGB; };
class HLS_GRAY2BGR : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::GRAY2BGR; };
#pragma empty_line
class HLS_RGB2XYZ : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::RGB2XYZ; };
class HLS_BGR2XYZ : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::BGR2XYZ; };
class HLS_XYZ2RGB : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::XYZ2RGB; };
class HLS_XYZ2BGR : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::XYZ2BGR; };
#pragma empty_line
class HLS_RGB2YCrCb : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::RGB2YCrCb; };
class HLS_BGR2YCrCb : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::BGR2YCrCb; };
class HLS_YCrCb2RGB : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::YCrCb2RGB; };
class HLS_YCrCb2BGR : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::YCrCb2BGR; };
#pragma empty_line
class HLS_RGB2HSV : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::RGB2HSV; };
class HLS_BGR2HSV : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::BGR2HSV; };
class HLS_HSV2RGB : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::HSV2RGB; };
class HLS_HSV2BGR : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::HSV2BGR; };
#pragma empty_line
class HLS_RGB2HLS : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::RGB2HLS; };
class HLS_BGR2HLS : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::BGR2HLS; };
class HLS_HLS2RGB : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::HLS2RGB; };
class HLS_HLS2BGR : public hls::CvtColor_mode { public: static const values value = hls::CvtColor_mode::HLS2BGR; };
#pragma empty_line
namespace hls {
#pragma empty_line
template <typename T> class CvtColor_traits {
#pragma empty_line
};
#pragma empty_line
template <> class CvtColor_traits<unsigned char> {
public:
typedef unsigned char T;
typedef ap_fixed<25,3> COEFF_T;
typedef ap_ufixed<20,1,AP_RND> INV_T;
#pragma empty_line
const int delta;
const unsigned int hrange;
const unsigned int scale;
const INV_T inv_scale;
const INV_T inv_hrange;
typedef typename x_traits<COEFF_T, typename fixed_type<T>::T >::MULT_T MULT_T;
typedef typename x_traits_d<MULT_T, 3>::ACCUM_T ACCUM_T;
typedef typename x_traits<typename fixed_type<T>::T, typename fixed_type<T>::T>::SUB_T SUB_T;
typedef typename x_traits<typename fixed_type<T>::T, typename fixed_type<T>::T>::ADD_T ADD_T;
typedef typename x_traits<ap_fixed<17,17>, INV_T>::MULT_T H_MULT_T;
typedef typename x_traits<typename fixed_type<T>::T, INV_T>::MULT_T S_MULT_T;
CvtColor_traits() : delta(128), hrange(180), scale(255),
inv_scale(0.0039215686274509804), inv_hrange(0.0333333333333333333) {};
};
template <int N> class CvtColor_traits< ap_uint<N> > {
public:
typedef ap_uint<N> T;
typedef ap_fixed<25,3> COEFF_T;
typedef ap_ufixed<20,1,AP_RND> INV_T;
#pragma empty_line
const int delta;
const unsigned int hrange;
const unsigned int scale;
const INV_T inv_scale;
const INV_T inv_hrange;
typedef typename x_traits<COEFF_T, typename fixed_type<T>::T >::MULT_T MULT_T;
typedef typename x_traits_d<MULT_T, 3>::ACCUM_T ACCUM_T;
typedef typename x_traits<typename fixed_type<T>::T, typename fixed_type<T>::T>::SUB_T SUB_T;
typedef typename x_traits<typename fixed_type<T>::T, typename fixed_type<T>::T>::ADD_T ADD_T;
typedef typename x_traits<ap_fixed<17,17>, INV_T>::MULT_T H_MULT_T;
typedef typename x_traits<typename fixed_type<T>::T, INV_T>::MULT_T S_MULT_T;
CvtColor_traits() : delta(1 << (N-1)), hrange(180),
scale(::hls::numeric_limits<T>::max()),
inv_scale(1.0/::hls::numeric_limits<T>::max()),
inv_hrange(0.0333333333333333333) {};
};
template <> class CvtColor_traits<float> {
public:
typedef float T;
typedef float COEFF_T;
typedef float INV_T;
const float delta;
const float hrange;
const float scale;
const INV_T inv_scale;
const INV_T inv_hrange;
typedef float MULT_T;
typedef float ACCUM_T;
typedef float SUB_T;
typedef float ADD_T;
typedef float H_MULT_T;
typedef float S_MULT_T;
CvtColor_traits() : delta(0.5f), hrange(360), scale(1), inv_scale(1),
inv_hrange(0.0166666666666666667) {};
};
template <> class CvtColor_traits<double> {
public:
typedef double T;
typedef double COEFF_T;
typedef double INV_T;
const double delta;
const double hrange;
const double scale;
const INV_T inv_scale;
const INV_T inv_hrange;
typedef double MULT_T;
typedef double ACCUM_T;
typedef double SUB_T;
typedef double ADD_T;
typedef double H_MULT_T;
typedef double S_MULT_T;
CvtColor_traits() : delta(0.5f), hrange(360), scale(1), inv_scale(1),
inv_hrange(0.0166666666666666667) {};
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class ColorConverter {
public:
template <int CN1>
static void convert(Scalar<CN1,SRC_T>& _src, DST_T& result, Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > par) {
#pragma HLS inline
typename CvtColor_traits<SRC_T>::MULT_T b,g,r;
r=par.val[0]*_src.val[0];
b=par.val[1]*_src.val[1];
g=par.val[2]*_src.val[2];
typename CvtColor_traits<SRC_T>::ACCUM_T c;
c=r+g+b;
result=sr_cast<DST_T> (c);
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class MaxMin{
public:
template <int CN1>
static void max(Scalar<CN1,SRC_T>& _src, DST_T& result) {
#pragma HLS inline
#pragma empty_line
for(int i=0; i<CN1; i++) {
result=(_src.val[i]>result) ? _src.val[i] : result;
}
}
#pragma empty_line
template <int CN1>
static void min(Scalar<CN1,SRC_T>& _src, DST_T& result) {
#pragma HLS inline
#pragma empty_line
for(int i=0; i<CN1; i++) {
result=(_src.val[i]<result) ? _src.val[i] : result;
}
}
};
#pragma empty_line
template <typename CONVERSION, typename SRC_T, typename DST_T>
class kernel_CvtColor {};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_BGR2GRAY, SRC_T, DST_T> {
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > par;
public:
kernel_CvtColor() : par(0.114,0.587,0.299) {};
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[0], par);
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_RGB2GRAY, SRC_T, DST_T> {
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > par;
public:
kernel_CvtColor() : par(0.299,0.587,0.114) {};
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[0], par);
}
};
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_GRAY2RGB, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
#pragma HLS inline
_dst.val[0] = sr_cast<DST_T> (_src.val[0]);
_dst.val[1] = sr_cast<DST_T> (_src.val[0]);
_dst.val[2] = sr_cast<DST_T> (_src.val[0]);
}
};
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_GRAY2BGR, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
#pragma HLS inline
_dst.val[0] = sr_cast<DST_T> (_src.val[0]);
_dst.val[1] = sr_cast<DST_T> (_src.val[0]);
_dst.val[2] = sr_cast<DST_T> (_src.val[0]);
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_RGB2XYZ, SRC_T, DST_T> {
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > parX;
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > parY;
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > parZ;
public:
kernel_CvtColor() : parX(0.412453, 0.357580, 0.180423),
parY(0.212671, 0.715160, 0.072169),
parZ(0.019334, 0.119193, 0.950227) {};
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[0], parX);
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[1], parY);
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[2], parZ);
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_BGR2XYZ, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> src2;
src2.val[0] = _src.val[2];
src2.val[1] = _src.val[1];
src2.val[2] = _src.val[0];
kernel_CvtColor<HLS_RGB2XYZ,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(src2, _dst);
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_XYZ2RGB, SRC_T, DST_T> {
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > parR;
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > parG;
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > parB;
public:
kernel_CvtColor() : parR( 3.240479, -1.53715, -0.498535),
parG(-0.969256, 1.875991, 0.041556),
parB( 0.055648, -0.204043, 1.057311) {};
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[0], parR);
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[1], parG);
ColorConverter<SRC_T,DST_T>::convert(_src, _dst.val[2], parB);
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_XYZ2BGR, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> dst2;
kernel_CvtColor<HLS_XYZ2RGB,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(_src, dst2);
_dst.val[0] = dst2.val[2];
_dst.val[1] = dst2.val[1];
_dst.val[2] = dst2.val[0];
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_RGB2YCrCb, SRC_T, DST_T> {
Scalar<3, typename CvtColor_traits<SRC_T>::COEFF_T > par;
typename CvtColor_traits<SRC_T>::COEFF_T Cr;
typename CvtColor_traits<SRC_T>::COEFF_T Cb;
public:
kernel_CvtColor() : par(0.299,0.587,0.114),Cr(.713),Cb(.564) {};
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
SRC_T R = _src.val[0];
SRC_T G = _src.val[1];
SRC_T B = _src.val[2];
DST_T Y;
ColorConverter<SRC_T,DST_T>::convert(_src, Y, par);
_dst.val[0] = Y;
_dst.val[1] = sr_cast<DST_T>((R-Y)*Cr+ CvtColor_traits<SRC_T>().delta);
_dst.val[2] = sr_cast<DST_T>((B-Y)*Cb+ CvtColor_traits<SRC_T>().delta);
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_BGR2YCrCb, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> src2;
src2.val[0] = _src.val[2];
src2.val[1] = _src.val[1];
src2.val[2] = _src.val[0];
kernel_CvtColor<HLS_RGB2YCrCb,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(src2, _dst);
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_YCrCb2RGB, SRC_T, DST_T> {
typename CvtColor_traits<SRC_T>::COEFF_T parGr;
typename CvtColor_traits<SRC_T>::COEFF_T parGb;
typename CvtColor_traits<SRC_T>::COEFF_T parCr;
typename CvtColor_traits<SRC_T>::COEFF_T parCb;
public:
kernel_CvtColor() : parGr(-0.714), parGb(-0.344), parCr(1.403), parCb(1.773) {};
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
SRC_T Y = _src.val[0];
SRC_T Cr = _src.val[1];
SRC_T Cb = _src.val[2];
_dst.val[0] = sr_cast<DST_T> (Y + parCr * (Cr-CvtColor_traits<SRC_T>().delta));
_dst.val[1] = sr_cast<DST_T> (Y + parGr * (Cr-CvtColor_traits<SRC_T>().delta) + parGb * (Cb-CvtColor_traits<SRC_T>().delta));
_dst.val[2] = sr_cast<DST_T> (Y + parCb * (Cb-CvtColor_traits<SRC_T>().delta));
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_YCrCb2BGR, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> dst2;
kernel_CvtColor<HLS_YCrCb2RGB,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(_src, dst2);
_dst.val[0] = dst2.val[2];
_dst.val[1] = dst2.val[1];
_dst.val[2] = dst2.val[0];
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_RGB2HSV, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
#pragma HLS inline
SRC_T R = _src.val[0];
SRC_T G = _src.val[1];
SRC_T B = _src.val[2];
typename CvtColor_traits<DST_T>::H_MULT_T H;
typename CvtColor_traits<DST_T>::S_MULT_T S;
typename CvtColor_traits<DST_T>::SUB_T sub;
typename CvtColor_traits<DST_T>::INV_T inv_max = 0;
typename CvtColor_traits<DST_T>::INV_T inv_diff = 0;
DST_T max = B;
DST_T min = B;
DST_T diff;
#pragma empty_line
MaxMin<SRC_T,DST_T>::max(_src, max);
MaxMin<SRC_T,DST_T>::min(_src, min);
diff=max-min;
#pragma empty_line
if(max!=0)
inv_max = (typename CvtColor_traits<DST_T>::INV_T) 1/max;
else
inv_max = 0;
#pragma empty_line
S=inv_max*diff;
#pragma empty_line
if(diff!=0)
inv_diff = (typename CvtColor_traits<DST_T>::INV_T) 1/diff;
else
inv_diff = 0;
#pragma empty_line
sub=(max==R) ? (G-B) : (max==G) ? (B-R) : (R-G);
H=(max==R) ? 0 : (max==G) ? 120 : 240;
H+=60*sub*inv_diff;
#pragma empty_line
if(180==CvtColor_traits<SRC_T>().hrange) {
H=H/2;
H+=((H+(typename CvtColor_traits<DST_T>::H_MULT_T)0.5)<0) ? 180 : 0;
}
else
H+=(H<0) ? 360 :0;
#pragma empty_line
_dst.val[0] = sr_cast<DST_T>(H);
_dst.val[1] = (180==CvtColor_traits<SRC_T>().hrange) ? sr_cast<DST_T>(255*S) : sr_cast<DST_T>(S);
_dst.val[2] = max;
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_BGR2HSV, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> src2;
src2.val[0] = _src.val[2];
src2.val[1] = _src.val[1];
src2.val[2] = _src.val[0];
kernel_CvtColor<HLS_RGB2HSV,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(src2, _dst);
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_HSV2RGB, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
#pragma HLS inline
SRC_T H = _src.val[0];
SRC_T S = _src.val[1];
SRC_T V = _src.val[2];
typename CvtColor_traits<DST_T>::S_MULT_T tab[4];
typename CvtColor_traits<DST_T>::S_MULT_T f;
static const int sector_data[][3]=
{{0,3,1}, {2,0,1}, {1,0,3}, {1,2,0}, {3,1,0},{0,1,2}};
typename CvtColor_traits<DST_T>::S_MULT_T S_scale;
unsigned char h_i;
#pragma empty_line
#pragma HLS array_partition variable=tab dim=0 complete
#pragma empty_line
h_i = (unsigned char)(H*(CvtColor_traits<SRC_T>().inv_hrange));
f = H*(CvtColor_traits<SRC_T>().inv_hrange) - h_i;
if(h_i >= 6)
h_i -= 6;
#pragma empty_line
S_scale=S*(CvtColor_traits<SRC_T>().inv_scale);
#pragma empty_line
tab[0] = V;
tab[1] = V*(1-S_scale);
tab[2] = V*(1-f*S_scale);
tab[3] = V*(1-S_scale+f*S_scale);
#pragma empty_line
_dst.val[0] = sr_cast<DST_T>(tab[sector_data[h_i][0]]);
_dst.val[1] = sr_cast<DST_T>(tab[sector_data[h_i][1]]);
_dst.val[2] = sr_cast<DST_T>(tab[sector_data[h_i][2]]);
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_HSV2BGR, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> dst2;
kernel_CvtColor<HLS_HSV2RGB,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(_src, dst2);
_dst.val[0] = dst2.val[2];
_dst.val[1] = dst2.val[1];
_dst.val[2] = dst2.val[0];
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_RGB2HLS, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
#pragma HLS inline
SRC_T R = _src.val[0];
SRC_T G = _src.val[1];
SRC_T B = _src.val[2];
typename CvtColor_traits<DST_T>::H_MULT_T H;
typename CvtColor_traits<DST_T>::S_MULT_T S;
DST_T L;
typename CvtColor_traits<DST_T>::SUB_T sub;
typename CvtColor_traits<DST_T>::ADD_T add;
typename CvtColor_traits<DST_T>::INV_T inv_add = 0;
typename CvtColor_traits<DST_T>::INV_T inv_add_comp= 0;
typename CvtColor_traits<DST_T>::INV_T inv_diff = 0;
DST_T max = B;
DST_T min = B;
DST_T diff;
#pragma empty_line
MaxMin<SRC_T,DST_T>::max(_src, max);
MaxMin<SRC_T,DST_T>::min(_src, min);
diff=max-min;
add=max+min;
L=sr_cast<DST_T>((max+min)/2);
#pragma empty_line
if(add!=0)
inv_add = (typename CvtColor_traits<DST_T>::INV_T) 1/add;
else
inv_add = 0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
if((2*(CvtColor_traits<SRC_T>().scale)-add)!=0)
inv_add_comp = (typename CvtColor_traits<DST_T>::INV_T) 1/(2*(CvtColor_traits<SRC_T>().scale)-add);
else
inv_add_comp = 0;
#pragma empty_line
if(L<=CvtColor_traits<SRC_T>().delta)
S=inv_add*diff;
else
S=inv_add_comp*diff;
#pragma empty_line
if(diff!=0)
inv_diff = (typename CvtColor_traits<DST_T>::INV_T) 1/diff;
else
inv_diff = 0;
#pragma empty_line
sub=(max==R) ? (G-B) : (max==G) ? (B-R) : (R-G);
H=(max==R) ? 0 : (max==G) ? 120 : 240;
H+=60*sub*inv_diff;
#pragma empty_line
if(180==CvtColor_traits<SRC_T>().hrange) {
H=H/2;
H+=((H+(typename CvtColor_traits<DST_T>::H_MULT_T)0.5)<0) ? 180 : 0;
}
else
H+=(H<0) ? 360 :0;
#pragma empty_line
_dst.val[0] = sr_cast<DST_T>(H);
_dst.val[1] = L;
_dst.val[2] = (180==CvtColor_traits<SRC_T>().hrange) ?
sr_cast<DST_T>(CvtColor_traits<SRC_T>().scale*S) :
sr_cast<DST_T>(S);
#pragma empty_line
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_BGR2HLS, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> src2;
src2.val[0] = _src.val[2];
src2.val[1] = _src.val[1];
src2.val[2] = _src.val[0];
kernel_CvtColor<HLS_RGB2HLS,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(src2, _dst);
}
};
#pragma empty_line
template<typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_HLS2RGB, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
#pragma HLS inline
SRC_T H = _src.val[0];
SRC_T L = _src.val[1];
SRC_T S = _src.val[2];
typename CvtColor_traits<DST_T>::S_MULT_T tab[4];
typename CvtColor_traits<DST_T>::S_MULT_T f;
static const int sector_data[][3]=
{{0,3,1}, {2,0,1}, {1,0,3}, {1,2,0}, {3,1,0},{0,1,2}};
typename CvtColor_traits<DST_T>::S_MULT_T S_scale;
unsigned char h_i;
#pragma empty_line
#pragma HLS array_partition variable=tab dim=0 complete
#pragma empty_line
h_i = (unsigned char)(H*(CvtColor_traits<SRC_T>().inv_hrange));
f = H*(CvtColor_traits<SRC_T>().inv_hrange) - h_i;
if(h_i >= 6)
h_i -= 6;
#pragma empty_line
S_scale=S*(CvtColor_traits<SRC_T>().inv_scale);
#pragma empty_line
if(L<=0.5*CvtColor_traits<SRC_T>().scale)
tab[0] = L+L*S_scale;
#pragma empty_line
else
tab[0] = L+S-L*S_scale;
#pragma empty_line
tab[1] = 2*L-tab[0];
tab[2] = tab[0]-(tab[0]-tab[1])*f;
tab[3] = tab[1]+(tab[0]-tab[1])*f;
#pragma empty_line
_dst.val[0] = sr_cast<DST_T>(tab[sector_data[h_i][0]]);
_dst.val[1] = sr_cast<DST_T>(tab[sector_data[h_i][1]]);
_dst.val[2] = sr_cast<DST_T>(tab[sector_data[h_i][2]]);
}
};
#pragma empty_line
template <typename SRC_T, typename DST_T>
class kernel_CvtColor<HLS_HLS2BGR, SRC_T, DST_T> {
public:
template<int CN1,int CN2>
void apply(Scalar<CN1,SRC_T>& _src, Scalar<CN2,DST_T>& _dst) {
Scalar<CN1,SRC_T> dst2;
kernel_CvtColor<HLS_HLS2RGB,SRC_T,DST_T> kernel_opr;
kernel_opr.apply(_src, dst2);
_dst.val[0] = dst2.val[2];
_dst.val[1] = dst2.val[1];
_dst.val[2] = dst2.val[0];
}
};
#pragma empty_line
template<typename CONVERSION,int SRC_T, int DST_T,
int ROWS,int COLS>
void CvtColor(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst
)
{
kernel_CvtColor<CONVERSION,typename Type<((SRC_T) & ((1 << 4) - 1))>::name,typename Type<((DST_T) & ((1 << 4) - 1))>::name> kernel_opr;
int cols=_src.cols;
int rows=_src.rows;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1414));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1415));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> _s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> _d;
loop_height: for(int i= 0; i < rows; i++) {
loop_width: for (int j= 0; j < cols; j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
_src >> _s;
kernel_opr.apply(_s,_d);
_dst << _d;
}
}
}
#pragma empty_line
template<int SRC_T, int DST_T,
int ROWS,int COLS>
void Integral(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS+1, COLS+1, DST_T> &_sum
)
{
LineBuffer<1,COLS+1,typename Type<((DST_T) & ((1 << 4) - 1))>::name> k_buf;
int cols=_src.cols;
int rows=_src.rows;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1439));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1440));
Scalar<1,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> _s;
Scalar<1,typename Type<((DST_T) & ((1 << 4) - 1))>::name> _d;
int sqsum, sum=0;
#pragma empty_line
loop_height: for(int i= 0;i<rows+1;i++) {
loop_width: for (int j= 0;j<cols+1;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
if(i==0||(j==0&&i!=0))
{
k_buf.val[0][j]=0;
_d.val[0]=0;
sum=0;
}
else
{
_src>>_s;
sum=sum+_s.val[0];
_d.val[0]=sum+k_buf.val[0][j];
k_buf.val[0][j]=_d.val[0];
}
_sum<<_d;
}
}
}
template<int SRC_T, int DST_T,int DSTSQ_T,
int ROWS,int COLS>
void Integral(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS+1, COLS+1, DST_T> &_sum,
Mat<ROWS+1, COLS+1, DSTSQ_T> &_sqsum
)
{
LineBuffer<1,COLS+1,typename Type<((DST_T) & ((1 << 4) - 1))>::name> k_buf;
LineBuffer<1,COLS+1,typename Type<((DSTSQ_T) & ((1 << 4) - 1))>::name> k_sqbuf;
int cols=_src.cols;
int rows=_src.rows;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1478));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1479));
Scalar<1,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> _s;
Scalar<1,typename Type<((DST_T) & ((1 << 4) - 1))>::name> _d;
Scalar<1,typename Type<((DSTSQ_T) & ((1 << 4) - 1))>::name> _sqd;
int sqsum, sum=0;
#pragma empty_line
loop_height: for(int i= 0;i<rows+1;i++) {
loop_width: for (int j= 0;j<cols+1;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
if(i==0||(j==0&&i!=0))
{
k_buf.val[0][j]=0;
k_sqbuf.val[0][j]=0;
_d.val[0]=0;
_sqd.val[0]=0;
sum=0;
sqsum=0;
}
else
{
_src>>_s;
sum=sum+_s.val[0];
sqsum=sqsum+_s.val[0]*_s.val[0];
#pragma empty_line
_d.val[0]=sum+k_buf.val[0][j];
_sqd.val[0]=sqsum+k_sqbuf.val[0][j];
k_buf.val[0][j]=_d.val[0];
k_sqbuf.val[0][j]=_sqd.val[0];
}
_sum<<_d;
_sqsum<<_sqd;
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int NTAPS, int NPHASES, int COEFF_BITS,typename HT, typename VT>
void init_scale_coefficients(HT *Hcoefs, VT *Vcoefs) {
#pragma empty_line
#pragma HLS inline off
static const float A = -0.5;
double t;
double coeff[NPHASES][NTAPS];
int i,j;
#pragma empty_line
for (i=0; i<NPHASES; i++) {
t=((double) i)/NPHASES;
coeff[i][0] = A*(t*((2-t)*t-1));
coeff[i][1] = A*(t*t*(3*t-5)+2);
coeff[i][2] = A*(t*((4-3*t)*t+1));
coeff[i][3] = A*((t-1)*t*t);
}
for (i = 0; i < NPHASES; i++) {
for (j = 0; j < NTAPS; j++) {
Hcoefs[(NTAPS*i)+j] = (HT)coeff[i][j];
Vcoefs[(NTAPS*i)+j] = (VT)coeff[i][j];
}
}
}
#pragma empty_line
template<int NTAPS, int COEFF_BITS, int T,typename FILTER_T>
hls::Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> scale_operator(hls::Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> *samples, FILTER_T *coeffs) {
#pragma empty_line
typedef typename filter2d_traits<typename Type<((T) & ((1 << 4) - 1))>::name, FILTER_T, NTAPS>::SRC_CAST_T SRCT;
int i,j,ch;
hls::Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> pix_out;
CHAN_LOOP : for (ch =0; ch<((((T) & ((512 - 1) << 4)) >> 4) + 1); ch++) {
typename filter2d_traits<typename Type<((T) & ((1 << 4) - 1))>::name, FILTER_T, NTAPS>::ACCUM_T t=0;
typename filter2d_traits<typename Type<((T) & ((1 << 4) - 1))>::name, FILTER_T, NTAPS>::MULT_T temp;
TAPS_LOOP : for (i = 0,t=0.5; i < NTAPS; i++) {
#pragma HLS inline
typename Type<((T) & ((1 << 4) - 1))>::name sample = samples[i].val[ch];
temp = ((SRCT)sample)*coeffs[NTAPS-1-i];
t = t - temp ;
}
pix_out.val[ch] = sr_cast<typename Type<((T) & ((1 << 4) - 1))>::name> (t);
}
return pix_out;
}
#pragma empty_line
#pragma empty_line
template <int COLS, int ROWS,int DCOLS, int DROWS, int T>
void Resize_opr_bicubic(hls::Mat<ROWS, COLS, T>& _src, hls::Mat<DROWS, DCOLS, T>& _dst) {
typedef ap_fixed<32, 16, AP_RND> FT;
typedef short N16;
const int NTAPS = 4;
const int NPHASES = 16;
const int COEFF_BITS = 16;
const short ES = 2;
typename filter2d_traits<typename Type<((T) & ((1 << 4) - 1))>::name, ap_fixed<25, 5, AP_RND>, NTAPS>::FILTER_CAST_T hcoeffs[NPHASES][NTAPS];
typename filter2d_traits<typename Type<((T) & ((1 << 4) - 1))>::name, ap_fixed<25, 5, AP_RND>, NTAPS>::FILTER_CAST_T vcoeffs[NPHASES][NTAPS];
N16 row, col;
N16 rows, cols;
ap_uint<32> v_phase_acc;
ap_uint<32> h_phase_acc;
#pragma empty_line
hls::LineBuffer<NTAPS, (COLS>DCOLS?COLS:DCOLS) + 3, hls::Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> > linebuf;
hls::Window<1, NTAPS, hls::Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> > h_shreg;
hls::Scalar<((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name> pix_in, h_fir_out, pix_out, h_fir[NTAPS], v_fir[NTAPS];
hls::Scalar < ((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name > temp_in[NTAPS];
hls::Scalar < ((((T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((T) & ((1 << 4) - 1))>::name > temp_out[NTAPS];
typename Type<((T) & ((1 << 4) - 1))>::name pix_in_ch, pix_out_ch;
#pragma empty_line
N16 rows_rw = -1, cols_rw = -1;
bool col_rd_en;
bool row_rd_en;
bool col_wr_en;
bool row_wr_en;
ap_uint<4> v_phase;
ap_uint<4> h_phase;
#pragma HLS array_partition variable= temp_in dim=0 complete
#pragma HLS array_partition variable= temp_out dim=0 complete
#pragma HLS array_partition variable= h_fir dim=0 complete
#pragma HLS array_partition variable= v_fir dim=0 complete
#pragma HLS array_partition variable=hcoeffs dim=2 complete
#pragma HLS array_partition variable=vcoeffs dim=2 complete
#pragma empty_line
#pragma empty_line
init_scale_coefficients<NTAPS, NPHASES, COEFF_BITS>(hcoeffs[0], vcoeffs[0]);
#pragma empty_line
N16 rows_in = _src.rows;
N16 cols_in = _src.cols;
N16 rows_out = _dst.rows;
N16 cols_out = _dst.cols;
FT row_ratio = (FT(rows_out)) / (FT)rows_in;
FT col_ratio = (FT(cols_out)) / (FT)cols_in;
#pragma empty_line
int row_rate = (ap_fixed<4, 2, AP_RND>(0.5) + row_ratio * 65536);
int col_rate = (ap_fixed<4, 2, AP_RND>(0.5) + col_ratio * 65536);
rows = (rows_in > rows_out) ? rows_in : rows_out;
cols = (cols_in > cols_out) ? cols_in : cols_out;
v_phase_acc = 0;
#pragma empty_line
ROW_LOOP: for (row = 0; row < rows + 3; row++) {
COL_LOOP: for (col = 0; col < cols + 3; col++) {
#pragma HLS PIPELINE
#pragma HLS loop_flatten off
#pragma HLS DEPENDENCE array inter false
if (col == 0) {
v_phase = (v_phase_acc >> 12) & 15;
if (row_rate < 65536) {
row_rd_en = true;
N16 drow = row * row_ratio;
if (rows_rw != drow) {
row_wr_en = true;
rows_rw = drow;
} else
row_wr_en = false;
} else {
row_wr_en = true;
N16 drow = row / row_ratio;
if (rows_rw != drow) {
row_rd_en = true;
rows_rw = drow;
} else
row_rd_en = false;
}
if (row_rate < 65536 || row_rd_en)
v_phase_acc = v_phase_acc + row_rate;
}
#pragma empty_line
h_phase = (h_phase_acc >> 12) & 15;
if (col_rate < 65536) {
col_rd_en = true;
N16 dcol = col * col_ratio;
if (col == 0 || (col > 0 && cols_rw != dcol)) {
col_wr_en = true;
cols_rw = dcol;
} else
col_wr_en = false;
} else {
col_wr_en = true;
N16 dcol = col / col_ratio;
if (col == 0 || (col > 0 && cols_rw != dcol)) {
col_rd_en = true;
cols_rw = dcol;
} else
col_rd_en = false;
}
#pragma empty_line
if (col > 0 && (col_rate < 65536 || col_rd_en))
h_phase_acc = h_phase_acc + col_rate;
else
h_phase_acc = col_rate;
#pragma empty_line
if (col_rd_en) {
h_shreg.shift_left();
if (row_rd_en) {
if (row < rows && col < cols) {
pix_in = _src.read();
h_shreg.insert(pix_in, 0, NTAPS - 1);
} else if (col >= cols && row < rows) {
h_shreg.insert(pix_in, 0, NTAPS - 1);
} else if (row >= rows) {
for (int m = 0; m < ((((T) & ((512 - 1) << 4)) >> 4) + 1); m++)
pix_in.val[0] = 0;
h_shreg.insert(pix_in, 0, NTAPS - 1);
}
}
}
#pragma empty_line
for (int i = 0; i < NTAPS; i++) {
temp_in[i] = linebuf.val[i][col];
}
#pragma empty_line
if (col_wr_en) {
if ((row_rd_en) || (row < ES) || (row >= rows - ES)) {
for (int i = NTAPS - 1; i > 0; i--) {
temp_out[i] = temp_in[i - 1];
}
H_LOOP: for (int i = 0; i < NTAPS; i++) {
h_fir[i] =
(col > i) ?
h_shreg.getval(0, i) :
h_shreg.getval(0, NTAPS - 1 - col);
}
h_fir_out = scale_operator<NTAPS, COEFF_BITS, T>(h_fir,
hcoeffs[h_phase]);
temp_out[0] = h_fir_out;
v_fir[NTAPS - 1] = h_fir_out;
} else {
for (int i = NTAPS - 1; i >= 0; i--) {
temp_out[i] = temp_in[i];
}
v_fir[NTAPS - 1] = temp_in[0];
}
V_LOOP: for (int i = 0; i < NTAPS - 1; i++) {
v_fir[i] =
(row > 0) ? temp_out[NTAPS - 1 - i] : temp_out[0];
}
}
#pragma empty_line
for (int i = 0; i < NTAPS; i++) {
linebuf.val[i][col] = (row > 0) ? temp_out[i] : temp_out[0];
}
#pragma empty_line
if (row >= 3 && col >= 3 && row_wr_en && col_wr_en) {
pix_out = scale_operator<NTAPS, COEFF_BITS, T>(v_fir, vcoeffs[v_phase]);
_dst.write(pix_out);
}
}
}
}
#pragma empty_line
template<int SRC_T, int ROWS,int COLS,int DROWS,int DCOLS>
void Resize_opr_linear (
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, SRC_T> &_dst )
{
LineBuffer<2,(COLS>DCOLS?COLS:DCOLS)+1,Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> > k_buf;
Window<2,2,Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> > win;
short dcols=_dst.cols;
short drows=_dst.rows;
short srows=_src.rows;
short scols=_src.cols;
ap_fixed<32,16,AP_RND> row_rate=((ap_fixed<32,16,AP_RND> )srows)/(ap_fixed<32,16,AP_RND>)drows;
ap_fixed<32,16,AP_RND> col_rate=((ap_fixed<32,16,AP_RND> )scols)/(ap_fixed<32,16,AP_RND>)dcols;
typename filter2d_traits<typename Type<((SRC_T) & ((1 << 4) - 1))>::name, ap_fixed<20,2,AP_RND> ,4>::FILTER_CAST_T u,v, u1,v1;
#pragma empty_line
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s, temp, d;
ap_fixed<4,2,AP_RND> par=0.5;
ap_fixed<20,10,AP_RND> offset_row=row_rate/2-par;
ap_fixed<20,10,AP_RND> offset_col=col_rate/2-par;
ap_fixed<32,16,AP_RND> fx=0;
ap_fixed<32,16,AP_RND> fy=0;
#pragma empty_line
short rows=srows > drows ? srows : (drows+1);
short cols=scols > dcols ? scols : (dcols+1);
#pragma empty_line
short x=0;
short pre_fy=-10;
short pre_fx=-10;
bool row_rd=false;
bool row_wr=false;
#pragma empty_line
for(short i= 0;i<rows;i++) {
for(short j= 0;j<cols;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS DEPENDENCE array inter false
#pragma HLS PIPELINE
#pragma empty_line
bool col_rd=false;
bool col_wr=false;
#pragma empty_line
short dy = row_rate>1 ? (short)(i/row_rate):(i-1);
short dx = col_rate>1 ? (short)(j/col_rate):(j-1);
#pragma empty_line
fy =(dy)*row_rate+offset_row;
fx =(dx)*col_rate+offset_col;
#pragma empty_line
short sx=(short)fx;
short sy=(short)fy;
if(fx-sx>0)
u=fx-sx;
else
u=0;
if(fy-sy>0)
v=fy-sy;
else
v=0;
u1=1-u;
v1=1-v;
if(sx>scols-1)
{
sx=scols-1;
u=0;
}
if(sy>srows-1)
{
sy=srows-1;
v=0;
}
if(j==0)
{
x=0;
pre_fx=-10;
if(row_rate>1)
{
row_rd=true;
row_wr= (sy==(i-1)) ? true : false;
}
else
{
if(i==0){
row_rd=true;
}
else if(sy!=pre_fy)
{
row_rd=true;
pre_fy=sy;
}
else {
row_rd=false;
}
row_wr= i>0? true: false;
}
}
if(col_rate>1)
{
col_rd=true;
col_wr= (sx==(j-1)) ? true : false;
}else{
if(j==0){
col_rd=true;
}
else if(sx!=pre_fx)
{
col_rd=true;
pre_fx=sx;
}
else
col_rd=false;
col_wr= j>0? true: false;
}
if(col_rd)
{
for(int r= 0;r<2;r++)
{
win.val[r][1]=win.val[r][0];
}
if(row_rd)
{
#pragma empty_line
k_buf.val[1][x]=k_buf.val[0][x];
win.val[1][0]=k_buf.val[0][x];
if(sy<srows-1&&sx<scols-1)
{
_src >> s;
k_buf.val[0][x]=s;
win.val[0][0]=k_buf.val[0][x];
}
else if(sx>=scols-1&&sy<srows-1){
k_buf.val[0][x]=s;
}
else if(sy>=srows-1){
win.val[0][0]=k_buf.val[0][x];
}
}
else
{
for(int r= 0;r<2;r++)
{
win.val[r][0]=k_buf.val[r][x];
}
}
#pragma empty_line
x++;
}
if(row_wr && col_wr)
{
for(int k=0;k<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);k++)
{
typename filter2d_traits<typename Type<((SRC_T) & ((1 << 4) - 1))>::name, ap_fixed<15,1,AP_RND> ,4>::ACCUM_T t=0;
typedef typename fixed_type<typename Type<((SRC_T) & ((1 << 4) - 1))>::name>::T SRCT;
#pragma empty_line
t=((SRCT)win.val[1][1].val[k])*u1*v1+
((SRCT)win.val[1][0].val[k])*v1*u+
((SRCT)win.val[0][1].val[k])*u1*v+
((SRCT)win.val[0][0].val[k])*u*v;
d.val[k]=sr_cast<typename Type<((SRC_T) & ((1 << 4) - 1))>::name>(t);
}
_dst << d;
}
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int SRC_T, int ROWS,int COLS,int DROWS,int DCOLS>
void Resize (
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, SRC_T> &_dst,
int interpolation=1 )
{
switch(interpolation) {
case 0:
(("hls::Resize: HLS_INTER_NEAREST not supported") ? (void)0 : _assert("\"hls::Resize: HLS_INTER_NEAREST not supported\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1906));
break;
case 2:
(("hls::Resize: HLS_INTER_AREA not supported") ? (void)0 : _assert("\"hls::Resize: HLS_INTER_AREA not supported\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1909));
break;
case 4:
(("hls::Resize: HLS_INTER_LANCZOS4 not supported") ? (void)0 : _assert("\"hls::Resize: HLS_INTER_LANCZOS4 not supported\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1912));
break;
case 3:
Resize_opr_bicubic(_src,_dst);
break;
case 1:
Resize_opr_linear(_src,_dst);
break;
}
}
#pragma empty_line
template<int SRC_T, int DST_T,
int ROWS,int COLS>
void ConvertScale (
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
double alpha=1,
double beta=0
)
{
int cols=_src.cols;
int rows=_src.rows;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1934));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1935));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> _s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> _d;
loop_height: for(int i= 0;i<rows;i++) {
loop_width: for (int j= 0;j<cols;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
_src>>_s;
loop_channels: for(int k=0;k<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);k++)
{
_d.val[k]=sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(_s.val[k]*alpha+beta);
}
_dst<<_d;
}
}
}
#pragma empty_line
template<int SRC_T, int DST_T,
int ROWS,int COLS>
void ConvertScaleAbs (
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
double alpha=1,
double beta=0
)
{
int cols=_src.cols;
int rows=_src.rows;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1963));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 1964));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> _s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> _d;
loop_height: for(int i= 0;i<rows;i++) {
loop_width: for (int j= 0;j<cols;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS PIPELINE
_src>>_s;
loop_channels: for(int k=0;k<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);k++)
{
_d.val[k]=sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(abs(_s.val[k]*alpha+beta));
}
_dst<<_d;
}
}
}
template<int XORDER, int YORDER, int SIZE, typename T>
void Sobel_kernel(Window<SIZE,SIZE,T > &kernel)
{
int kerI[SIZE+1];
Window<1,SIZE,T> kernelX;
Window<SIZE,1,T> kernelY;
#pragma empty_line
for(int k=0; k<2; k++)
{
int order = k == 0 ? XORDER : YORDER;
#pragma empty_line
if( SIZE==3 )
{
if(order==0 )
kerI[0]=1, kerI[1]=2, kerI[2]=1;
else if( order == 1 )
kerI[0]=-1, kerI[1]=0, kerI[2]=1;
else
kerI[0]=1, kerI[1]=-2, kerI[2]=1;
}
else
{
int oldval, newval;
kerI[0] = 1;
for(int i=0; i<SIZE; i++)
kerI[i+1] = 0;
#pragma empty_line
for(int i=0; i<SIZE-order-1; i++)
{
oldval = kerI[0];
for(int j = 1; j <= SIZE; j++ )
{
newval = kerI[j]+kerI[j-1];
kerI[j-1] = oldval;
oldval = newval;
}
}
#pragma empty_line
for(int i = 0; i < order; i++ )
{
oldval = -kerI[0];
for(int j = 1; j <= SIZE; j++ )
{
newval = kerI[j-1] - kerI[j];
kerI[j-1] = oldval;
oldval = newval;
}
}
}
#pragma empty_line
for(int i=0; i<SIZE; i++) {
if(k==0)
kernelX(0,i)=kerI[i];
else
kernelY(i,0)=kerI[i];
}
}
#pragma empty_line
for(int i=0; i<SIZE; i++) {
for(int j=0; j<SIZE; j++) {
kernel(i,j)=kernelY(i,0)*kernelX(0,j);
}
}
#pragma empty_line
}
#pragma empty_line
template<int XORDER, int YORDER, int SIZE, typename BORDERMODE, int SRC_T, int DST_T, int ROWS,int COLS,int DROWS,int DCOLS>
void Sobel (
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, DST_T> &_dst)
{
(((SIZE==3 || SIZE==5||SIZE==7)) ? (void)0 : _assert("(SIZE==3 || SIZE==5||SIZE==7)", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2051));
#pragma empty_line
Window<SIZE,SIZE,ap_int<8> > kernel;
Sobel_kernel<XORDER, YORDER >(kernel);
Point_<int> c_point;
c_point.x=-1;
c_point.y=-1;
Filter2D<BORDERMODE>(_src,_dst,kernel, c_point);
}
#pragma empty_line
template<int XORDER, int YORDER, int SIZE, int SRC_T, int DST_T, int ROWS,int COLS,int DROWS,int DCOLS>
void Sobel (
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, DST_T> &_dst)
{
Sobel<XORDER,YORDER,SIZE,BORDER_DEFAULT>(_src, _dst);
}
#pragma empty_line
template<int KH,int KW,typename K_T,typename XT, typename YT>
void getGaussianKernel(
Window<KH,KW,K_T> &kernel,
XT sigmaX=0,
YT sigmaY=0
)
{
#pragma HLS INLINE off
float kval[KH][KW];
float sum=0;
if(sigmaX <= 0)
{
sigmaX=0.3*((KW-1)*0.5-1)+0.8;
}
if(sigmaY <= 0)
{
sigmaY=0.3*((KH-1)*0.5-1)+0.8;
}
for (int i = 0; i < KH; i++) {
for (int j = 0; j < KW; j++) {
float index1=pow( (i-(KH-1)/2),2)*1.0/(2*sigmaY*sigmaY);
float index2=pow( (j-(KW-1)/2),2)*1.0/(2*sigmaX*sigmaX);
float index= -index1-index2;
kval[i][j] = expf(index);
sum+=kval[i][j];
}
}
for (int i = 0; i < KH; i++) {
for (int j = 0; j < KW; j++) {
kval[i][j]=kval[i][j]/sum;
kernel.val[i][j]=kval[i][j];
}
}
#pragma empty_line
}
#pragma empty_line
template<int KH,int KW,typename BORDERMODE,int SRC_T,int DST_T,int ROWS,int COLS>
void GaussianBlur(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
double sigmaX=0,
double sigmaY=0)
{
Point_<int> anchor;
anchor.x = -1;
anchor.y = -1;
Window<KW, KH, ap_fixed<16,2,AP_RND> > kernel;
getGaussianKernel(kernel,sigmaX,sigmaY);
Filter2D<BORDERMODE>(_src, _dst, kernel, anchor);
}
#pragma empty_line
template<int KH,int KW,int SRC_T,int DST_T,int ROWS,int COLS>
void GaussianBlur(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
double sigmaX=0,
double sigmaY=0)
{
GaussianBlur<KH,KW,BORDER_DEFAULT>(_src, _dst, sigmaX, sigmaY);
}
template <bool NORMALIZE, typename T,int KH,int KW>
void Box_kernel(
Window<KH, KW, T>& kernel
)
{
if( NORMALIZE)
{
for (int i = 0; i < KH; i++) {
for (int j = 0; j < KW; j++) {
kernel.val[i][j] = 1.0/(KH*KW);
}
}
}
else
{
for (int i = 0; i < KH; i++) {
for (int j = 0; j < KW; j++) {
kernel.val[i][j] = 1;
}
}
}
}
template<int KH,int KW, bool NORMALIZE,typename BORDERMODE,int SRC_T,int DST_T,int ROWS,int COLS>
void BoxFilter(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
Point_<int> anchor=Point_<int>(-1,-1))
{
if( NORMALIZE)
{
Window<KH, KW, ap_fixed<21,1,AP_RND> > kernel;
Box_kernel<true>(kernel);
Filter2D<BORDERMODE>(_src, _dst, kernel, anchor);
}
else
{
Window<KH, KW, ap_int<2> > kernel;
Box_kernel<false>(kernel);
Filter2D<BORDERMODE>(_src, _dst, kernel, anchor);
}
}
#pragma empty_line
template<int KH,int KW, int SRC_T,int DST_T,int ROWS,int COLS>
void BoxFilter(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
Point_<int> anchor=Point_<int>(-1,-1))
{
BoxFilter<KH,KW,true, BORDER_DEFAULT>(_src, _dst, anchor);
}
#pragma empty_line
template <typename T,typename FT, int KH,int KW>
void Pyr_kernel(
Window<KH, KW, T>& kernel,
FT factor
)
{
int k[25]={1, 4, 6, 4, 1, 4, 16, 24, 16, 4, 6, 24, 36, 24, 6, 4, 16, 24, 16, 4, 1, 4, 6, 4, 1};
for(int i=0; i<5; i++)
for(int j=0; j<5; j++)
kernel.val[i][j]=k[i*5+j]*(1.0/256)*factor;
}
template<int K_HEIGHT,int K_WIDTH,int SRC_T, int DST_T, typename KN_T,
int ROWS,int COLS,int DROWS, int DCOLS>
void PyrUp_opr(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, DST_T> &_dst,
Window<5,5,KN_T> &kernel
)
{
HLS_SIZE_T rows=_src.rows;
HLS_SIZE_T cols=_src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2201));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2202));
#pragma HLS inline
#pragma empty_line
Window<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> src_kernel_win[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
LineBuffer<K_HEIGHT,COLS,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> k_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
#pragma empty_line
Window<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> right_border_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
Window<K_HEIGHT,1,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> col_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
#pragma HLS ARRAY_PARTITION variable=col_buf complete dim=0
#pragma HLS ARRAY_PARTITION variable=&kernel complete dim=0
#pragma HLS ARRAY_PARTITION variable=src_kernel_win complete dim=0
#pragma HLS ARRAY_PARTITION variable=k_buf complete dim=1
#pragma HLS ARRAY_PARTITION variable=right_border_buf complete dim=0
#pragma empty_line
Point_< ap_int<14> > anchor;
anchor.x=K_HEIGHT/2;
anchor.y=K_WIDTH/2;
ap_int<14> heightloop= 2*(rows+K_HEIGHT-1+K_HEIGHT);
ap_int<14> widthloop = 2*(cols+K_WIDTH-1);
Point_<ap_int<14> > ImagLoc;
#pragma empty_line
int channels=((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);
loop_height: for(HLS_SIZE_T i= 0;i< heightloop;i++) {
loop_width: for (HLS_SIZE_T j= 0;j< widthloop;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS DEPENDENCE array inter false
#pragma HLS PIPELINE
bool oddrow=(i+1)&1;
bool oddcol=(j+1)&1;
ImagLoc.x=j/2-anchor.x;
ImagLoc.y=i/2-K_HEIGHT-anchor.y;
int x= ImagLoc.x;
if(ImagLoc.x<0)
x= -ImagLoc.x;
else if( ImagLoc.x >= cols )
x=2*cols- ImagLoc.x-1;
channelloop: for(HLS_CHANNEL_T k= 0; k < channels; k++)
{
if(oddcol)
{
#pragma empty_line
for(int row= 0;row<K_HEIGHT;row++)
for(int col= K_WIDTH-1;col>=1;col--)
src_kernel_win[k](row,col) = src_kernel_win[k](row,col-1);
#pragma empty_line
for(int buf_row = 0; buf_row < K_HEIGHT; buf_row++)
{
#pragma empty_line
col_buf[k](buf_row,0) = k_buf[k](buf_row,x);
}
#pragma empty_line
if((ImagLoc.y < (-anchor.y)) ||
(ImagLoc.y >= K_HEIGHT-1 && ImagLoc.y < rows-1 )) {
#pragma empty_line
if(ImagLoc.x >= 0 && ImagLoc.x < cols) {
typename Type<((SRC_T) & ((1 << 4) - 1))>::name Toppixel = col_buf[k](K_HEIGHT-1,0);
src_kernel_win[k](K_HEIGHT-1,0) = Toppixel;
for(int buf_row= K_HEIGHT-1;buf_row >= 1;buf_row--)
{
typename Type<((SRC_T) & ((1 << 4) - 1))>::name temp = col_buf[k](buf_row-1,0);
src_kernel_win[k](buf_row-1,0)=temp;
}
if(oddrow)
{
if(ImagLoc.x >= cols - K_WIDTH)
{
right_border_buf[k](0,ImagLoc.x-(cols-K_WIDTH)) = Toppixel;
}
for(int buf_row= K_HEIGHT-1;buf_row >= 1;buf_row--)
{
typename Type<((SRC_T) & ((1 << 4) - 1))>::name temp = col_buf[k](buf_row-1,0);
k_buf[k](buf_row,x)=temp;
if(ImagLoc.x >= cols - K_WIDTH)
{
right_border_buf[k](K_HEIGHT-buf_row,ImagLoc.x-(cols-K_WIDTH)) = temp;
}
}
typename Type<((SRC_T) & ((1 << 4) - 1))>::name temp=0;
_src.data_stream[k] >> temp;
k_buf[k](0,x)=temp;
}
}
else if(ImagLoc.x < 0)
{
for(int buf_row = 0;buf_row < K_HEIGHT; buf_row++)
{
src_kernel_win[k](buf_row,0) = col_buf[k](buf_row,0);
}
}
else if (ImagLoc.x >= cols) {
for(int buf_row= 0;buf_row < K_HEIGHT; buf_row++)
{
src_kernel_win[k](buf_row,0) = right_border_buf[k](K_HEIGHT-1-buf_row,x-(cols-K_WIDTH));
}
if(!oddrow)
{
for(int buf_row= K_HEIGHT-1;buf_row>0;buf_row--)
src_kernel_win[k](buf_row,0)= src_kernel_win[k](buf_row-1,0);
}
#pragma empty_line
}
}
else if(ImagLoc.y > 0 )
{
ap_int<14> ref = K_HEIGHT-1;
if(ImagLoc.y >= rows-1)
ref = rows-1;
ap_int<14> y = ImagLoc.y;
for(int buf_row= 0;buf_row<K_HEIGHT;buf_row++)
{
ap_int<14> t=y;
if(y<0)
t=-y;
else if( y >= rows )
t=2*rows-y-1;
#pragma empty_line
ap_int<14> locy = ref - t;
src_kernel_win[k](buf_row,0) = col_buf[k](locy,0);
y--;
}
if(ImagLoc.y >= rows-1&&!oddrow)
{
for(int buf_row= K_HEIGHT-1;buf_row>0;buf_row--)
src_kernel_win[k](buf_row,0)= src_kernel_win[k](buf_row-1,0);
}
}
#pragma empty_line
}
#pragma empty_line
if(i >= 2*(K_HEIGHT + K_HEIGHT - 1) && j >= 2*(K_WIDTH-1))
{
typename filter2d_traits<typename Type<((SRC_T) & ((1 << 4) - 1))>::name, KN_T, K_HEIGHT*K_WIDTH>::ACCUM_T result=0;
if(oddrow)
{
if(oddcol)
{
for(int m=0; m<K_HEIGHT; m++)
for(int n=0; n<K_WIDTH; n++)
result= result + src_kernel_win[k](K_HEIGHT-1-m, K_WIDTH-1-n)* kernel.val[2*m][2*n];
}
else
{
for(int m=0; m<K_HEIGHT; m++)
for(int n=1; n<K_WIDTH; n++)
result= result + src_kernel_win[k](K_HEIGHT-1-m, K_WIDTH-1-n)* kernel.val[2*m][2*n-1];
}
}else
{
if(oddcol)
{
for(int m=0; m<K_HEIGHT-1; m++)
for(int n=0; n<K_WIDTH; n++)
result= result + src_kernel_win[k](K_HEIGHT-1-m, K_WIDTH-1-n)* kernel.val[2*m+1][2*n];
}
else
{
#pragma empty_line
for(int m=0; m<K_HEIGHT-1; m++)
for(int n=1; n<K_WIDTH; n++)
result= result + src_kernel_win[k](K_HEIGHT-1-m, K_WIDTH-1-n)* kernel.val[2*m+1][2*n-1];
}
}
_dst.data_stream[k]<< sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(result);
}
}
}
}
}
template<int SRC_T,int DST_T,int ROWS,int COLS, int DROWS, int DCOLS>
void PyrUp(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, DST_T> &_dst
)
{
((_src.rows*2== _dst.rows && _src.cols*2==_dst.cols) ? (void)0 : _assert("_src.rows*2== _dst.rows && _src.cols*2==_dst.cols", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2380));
Window<5, 5, ap_fixed<16,2,AP_RND> > kernel;
Pyr_kernel(kernel, 4);
PyrUp_opr<3,3>(_src, _dst, kernel);
}
#pragma empty_line
template<int K_HEIGHT,int K_WIDTH,int SRC_T, int DST_T, typename KN_T,
int ROWS,int COLS,int DROWS, int DCOLS>
void PyrDown_opr(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, DST_T> &_dst,
Window<5,5,KN_T> &kernel
)
{
(((_src.rows+1)/2== _dst.rows && (_src.cols+1)/2==_dst.cols) ? (void)0 : _assert("(_src.rows+1)/2== _dst.rows && (_src.cols+1)/2==_dst.cols", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2394));
#pragma HLS inline
#pragma empty_line
Window<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> src_kernel_win[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
LineBuffer<K_HEIGHT,COLS,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> k_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
#pragma empty_line
LineBuffer<K_HEIGHT,K_WIDTH,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> right_border_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
LineBuffer<K_HEIGHT,1,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> col_buf[((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1)];
#pragma empty_line
#pragma HLS ARRAY_PARTITION variable=col_buf complete dim=0
#pragma HLS ARRAY_PARTITION variable=&kernel complete dim=0
#pragma HLS ARRAY_PARTITION variable=src_kernel_win complete dim=0
#pragma HLS ARRAY_PARTITION variable=k_buf complete dim=1
#pragma HLS ARRAY_PARTITION variable=right_border_buf complete dim=0
#pragma empty_line
Point_< ap_int<4> > anchor;
anchor.x=K_WIDTH/2;
anchor.y=K_HEIGHT/2;
#pragma empty_line
HLS_SIZE_T rows=_src.rows;
HLS_SIZE_T cols=_src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2418));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2419));
HLS_SIZE_T heightloop= rows+K_HEIGHT-1+K_HEIGHT;
HLS_SIZE_T widthloop = cols+K_WIDTH-1;
Point_< ap_int<14> > ImagLoc;
#pragma empty_line
int channels=((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);
loop_height: for(HLS_SIZE_T i= 0;i< heightloop;i++) {
loop_width: for (HLS_SIZE_T j= 0;j< widthloop;j++) {
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS DEPENDENCE array inter false
#pragma HLS PIPELINE
bool oddrow=(i+1)&1;
bool oddcol=(j+1)&1;
#pragma empty_line
ImagLoc.x=j-anchor.x;
ImagLoc.y=i-K_HEIGHT-anchor.y;
int x=ImagLoc.x ;
if(ImagLoc.x<0)
x=-ImagLoc.x;
else if( ImagLoc.x >= cols )
x=2*cols-ImagLoc.x-2;
channelloop: for(HLS_CHANNEL_T k= 0; k < channels; k++)
{
#pragma empty_line
for(int row= 0;row<K_HEIGHT;row++)
for(int col= K_WIDTH-1;col>=1;col--)
src_kernel_win[k](row,col) = src_kernel_win[k](row,col-1);
#pragma empty_line
for(int buf_row = 0; buf_row < K_HEIGHT; buf_row++)
{
#pragma empty_line
col_buf[k](buf_row,0) = k_buf[k](buf_row,x);
}
if((ImagLoc.y < (-anchor.y)) ||
(ImagLoc.y >= K_HEIGHT-1 && ImagLoc.y < rows-1 ))
{
#pragma empty_line
if(ImagLoc.x >= 0 && ImagLoc.x < cols)
{
typename Type<((SRC_T) & ((1 << 4) - 1))>::name Toppixel = col_buf[k](K_HEIGHT-1,0);
src_kernel_win[k](K_HEIGHT-1,0) = Toppixel;
if(ImagLoc.x >= cols - K_WIDTH)
{
right_border_buf[k](0,ImagLoc.x-(cols-K_WIDTH)) = Toppixel;
}
for(int buf_row= K_HEIGHT-1;buf_row >= 1;buf_row--)
{
typename Type<((SRC_T) & ((1 << 4) - 1))>::name temp = col_buf[k](buf_row-1,0);
src_kernel_win[k](buf_row-1,0)=temp;
k_buf[k](buf_row,x)=temp;
if(ImagLoc.x >= cols - K_WIDTH)
{
right_border_buf[k](K_HEIGHT-buf_row,ImagLoc.x-(cols-K_WIDTH)) = temp;
}
}
typename Type<((SRC_T) & ((1 << 4) - 1))>::name temp=0;
_src.data_stream[k] >> temp;
k_buf[k](0,x)=temp;
}
else if(ImagLoc.x < 0)
{
for(int buf_row = 0;buf_row < K_HEIGHT; buf_row++)
{
src_kernel_win[k](buf_row,0) = col_buf[k](buf_row,0);
}
}
else if (ImagLoc.x >= cols)
{
for(int buf_row= 0;buf_row < K_HEIGHT; buf_row++)
{
src_kernel_win[k](buf_row,0) = right_border_buf[k](K_HEIGHT-1-buf_row,x-(cols-K_WIDTH));
}
}
}
else if(ImagLoc.y >= 0) {
#pragma empty_line
ap_int<14> ref = K_HEIGHT-1;
if(ImagLoc.y >= rows-1)
ref = rows-1;
ap_int<14> y = ImagLoc.y;
for(int buf_row= 0;buf_row<K_HEIGHT;buf_row++)
{
ap_int<14> t = y;
if(y<0)
t=-y;
else if( y>= rows )
t=2*rows-y-2;
ap_int<14> locy = ref - t;
((t < 0 || (locy >= 0 && locy < K_HEIGHT)) ? (void)0 : _assert("t < 0 || (locy >= 0 && locy < K_HEIGHT)", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_imgproc.h", 2507));
src_kernel_win[k](buf_row,0) = col_buf[k](locy,0);
y--;
}
}
#pragma empty_line
if(i >= (K_HEIGHT + K_HEIGHT - 1) && j >= (K_WIDTH-1))
{
typename filter2d_traits<typename Type<((SRC_T) & ((1 << 4) - 1))>::name, KN_T, 5*5>::ACCUM_T result=0;
if(!oddrow&&oddcol)
{
for(int m=0; m<K_HEIGHT; m++)
for(int n=0; n<K_WIDTH; n++)
result= result + src_kernel_win[k](K_HEIGHT-1-m, K_WIDTH-1-n)* kernel.val[m][n];
_dst.data_stream[k]<< sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(result);
}
}
}
}
}
}
template<int SRC_T,int DST_T,int ROWS,int COLS, int DROWS, int DCOLS>
void PyrDown(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<DROWS, DCOLS, DST_T> &_dst
)
{
Window<5, 5, ap_fixed<16,2,AP_RND> > kernel;
Pyr_kernel(kernel, 1);
PyrDown_opr<5,5>(_src, _dst, kernel);
}
#pragma empty_line
}
#pragma line 63 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_histogram.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_histogram.h"
namespace hls {
#pragma empty_line
template<int SRC_T, int DST_T,int ROW, int COL, int N>
void Equalize(
Mat<ROW, COL, SRC_T> &_src,
Mat<ROW, COL, DST_T> &_dst,
ap_uint<8> (&map)[N]
)
{
#pragma empty_line
ap_uint<8> addr=0;
#pragma empty_line
ap_uint<BitWidth<ROW*COL>::Value> hist_out[N];
ap_uint<BitWidth<ROW*COL>::Value> data[2];
#pragma HLS ARRAY_PARTITION variable= data complete dim=0
for(int i=0;i<N;i++)
hist_out[i]=0;
int cols=_src.cols;
int rows=_src.rows;
loop_height: for(int i=0;i<rows;i++)
{
loop_width: for(int j=0;j<cols;j++)
{
#pragma HLS PIPELINE
#pragma HLS LOOP_FLATTEN OFF
#pragma HLS DEPENDENCE array inter false
typename Type<((SRC_T) & ((1 << 4) - 1))>::name tempsrc=0;
typename Type<((DST_T) & ((1 << 4) - 1))>::name tempdst=0;
_src.data_stream[0].read(tempsrc);
#pragma empty_line
if(!(i==0&&j==0))
{
data[1]=data[0];
data[0]=hist_out[tempsrc];
if(tempsrc==addr)
data[0]++;
hist_out[addr]=data[1]+1;
addr=tempsrc;
#pragma empty_line
tempdst=map[tempsrc];
_dst.data_stream[0]<<tempdst;
}
else
{
addr=tempsrc;
data[0]=hist_out[tempsrc]+1;
}
}
}
hist_out[addr]=data[0]+1;
_dst.data_stream[0]<<map[addr];
#pragma empty_line
#pragma empty_line
#pragma empty_line
float scale = 255.0f/(cols*rows);
ap_uint<BitWidth<ROW*COL>::Value> sum=0;
loop_normalize: for(int i=0;i<N;i++)
{
#pragma HLS PIPELINE
sum+=hist_out[i];
ap_uint<8> val=sr_cast< ap_uint<8> > (sum*scale);
map[i]=val;
}
map[0]=0;
}
#pragma empty_line
static ap_uint<8> lut[256];
template<int SRC_T, int DST_T,int ROW, int COL>
void EqualizeHist(
Mat<ROW, COL, SRC_T> &_src,
Mat<ROW, COL, DST_T> &_dst)
{
#pragma HLS INLINE
Equalize(_src, _dst, lut);
}
}
#pragma line 64 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h" 1
#pragma line 39 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h"
namespace hls {
#pragma empty_line
template<int PSize,int KERNEL_SIZE,int NUM,typename SRC_T, typename DIFF_T>
int fast_pixel_diff(
Window<KERNEL_SIZE,KERNEL_SIZE,SRC_T> &win,
SRC_T _threshold,
ap_uint<2> (&flag_val)[NUM],
DIFF_T (&flag_d)[NUM],
int (&flag)[PSize][2])
{
#pragma HLS INLINE
DIFF_T d1,d2;
int vt1,vt2;
int x1,x2,y1,y2;
int result=3;
int K=PSize/2;
for(int index=0;index<K;index++) {
int kernel_half=KERNEL_SIZE/2;
x1=flag[index][0];
y1=flag[index][1];
x2=flag[index+K][0];
y2=flag[index+K][1];
d1=win.val[kernel_half][kernel_half]-win.val[ y1 ][ x1 ];
d2=win.val[kernel_half][kernel_half]-win.val[ y2 ][ x2 ];
flag_d[index]=d1;
flag_d[index+K]=d2;
flag_d[index+PSize]=d1;
if (d1 > _threshold)
vt1=1;
else if(d1 < -_threshold)
vt1=2;
else
vt1=0;
if (d2 > _threshold)
vt2=1;
else if(d2 < -_threshold)
vt2=2;
else
vt2=0;
result &= vt1 | vt2;
flag_val[index] = vt1;
flag_val[index+K] = vt2;
flag_val[index+PSize] = vt1;
}
flag_val[PSize/2+PSize] = flag_val[PSize/2];
flag_d[PSize/2+PSize] = flag_d[PSize/2];
return result;
}
#pragma empty_line
template<int PSize,int NUM, typename DIFF_T, typename SRC_T>
int coreScore(DIFF_T (&flag_d)[NUM], SRC_T _threshold)
{
#pragma HLS INLINE
#pragma empty_line
DIFF_T flag_d_min2[NUM-1];
DIFF_T flag_d_max2[NUM-1];
DIFF_T flag_d_min4[NUM-3];
DIFF_T flag_d_max4[NUM-3];
DIFF_T flag_d_min8[NUM-7];
DIFF_T flag_d_max8[NUM-7];
#pragma HLS ARRAY_PARTITION variable=flag_d_min2 dim=0
#pragma HLS ARRAY_PARTITION variable=flag_d_max2 dim=0
#pragma HLS ARRAY_PARTITION variable=flag_d_min4 dim=0
#pragma HLS ARRAY_PARTITION variable=flag_d_max4 dim=0
if(PSize == 16) {
for(int i=0;i<NUM-1;i++) {
flag_d_min2[i] = reg(((flag_d[i]) < (flag_d[i+1]) ? (flag_d[i]) : (flag_d[i+1])));
flag_d_max2[i] = reg(((flag_d[i]) > (flag_d[i+1]) ? (flag_d[i]) : (flag_d[i+1])));
}
for(int i=0;i<NUM-3;i++) {
flag_d_min4[i] = reg(((flag_d_min2[i]) < (flag_d_min2[i+2]) ? (flag_d_min2[i]) : (flag_d_min2[i+2])));
flag_d_max4[i] = reg(((flag_d_max2[i]) > (flag_d_max2[i+2]) ? (flag_d_max2[i]) : (flag_d_max2[i+2])));
}
#pragma empty_line
for(int i=0;i<NUM-7;i++) {
flag_d_min8[i] = reg(((flag_d_min4[i]) < (flag_d_min4[i+4]) ? (flag_d_min4[i]) : (flag_d_min4[i+4])));
flag_d_max8[i] = reg(((flag_d_max4[i]) > (flag_d_max4[i+4]) ? (flag_d_max4[i]) : (flag_d_max4[i+4])));
}
} else {
((false) ? (void)0 : _assert("false", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 118));
}
#pragma empty_line
DIFF_T a0 = _threshold;
for(int i=0;i<PSize;i+=2) {
DIFF_T a = hls::numeric_limits<DIFF_T>::max();
if(PSize == 16) {
a = flag_d_min8[i+1];
} else {
for(int j=1;j<PSize/2+1;j++) {
a=((a) < (flag_d[i+j]) ? (a) : (flag_d[i+j]));
}
}
a0 = ((a0) > (((a) < (flag_d[i]) ? (a) : (flag_d[i]))) ? (a0) : (((a) < (flag_d[i]) ? (a) : (flag_d[i]))));
a0 = ((a0) > (((a) < (flag_d[i+PSize/2+1]) ? (a) : (flag_d[i+PSize/2+1]))) ? (a0) : (((a) < (flag_d[i+PSize/2+1]) ? (a) : (flag_d[i+PSize/2+1]))));
}
DIFF_T b0 = -_threshold;
for(int i=0;i<PSize;i+=2) {
DIFF_T b = hls::numeric_limits<DIFF_T>::min();
if(PSize == 16) {
b = flag_d_max8[i+1];
} else {
for(int j=1;j<PSize/2+1;j++) {
b=((b) > (flag_d[i+j]) ? (b) : (flag_d[i+j]));
}
}
b0 = ((b0) < (((b) > (flag_d[i]) ? (b) : (flag_d[i]))) ? (b0) : (((b) > (flag_d[i]) ? (b) : (flag_d[i]))));
b0 = ((b0) < (((b) > (flag_d[i+PSize/2+1]) ? (b) : (flag_d[i+PSize/2+1]))) ? (b0) : (((b) > (flag_d[i+PSize/2+1]) ? (b) : (flag_d[i+PSize/2+1]))));
}
return ((a0) > ((DIFF_T)-b0) ? (a0) : ((DIFF_T)-b0))-1;
}
#pragma empty_line
template<int PSize,int KERNEL_SIZE,typename SRC_T, typename DIFF_T>
bool fast_judge(Window<KERNEL_SIZE,KERNEL_SIZE,SRC_T> & win,
SRC_T _threshold,
ap_uint<2> (&flag_val)[PSize+PSize/2+1],
DIFF_T (&flag_d)[PSize+PSize/2+1],
int (&flag)[PSize][2],
int &core,
bool _nonmax_supression) {
#pragma HLS ARRAY_PARTITION variable=flag_val dim=0
#pragma HLS ARRAY_PARTITION variable=flag_d dim=0
#pragma empty_line
#pragma HLS INLINE
bool iscorner=false;
int kernel_half=KERNEL_SIZE/2;
int result=fast_pixel_diff<PSize>(win,_threshold,flag_val,flag_d,flag);
int count=1;
for(int c=1;c<PSize+PSize/2+1;c++)
{
if(flag_val[c-1]==flag_val[c] && flag_val[c]>0)
{
count++;
if(count>PSize/2)
{
iscorner=true;
}
}
else
{
count=1;
}
}
if(_nonmax_supression && iscorner) {
core=coreScore<PSize>(flag_d,_threshold);
}
return iscorner;
}
template<int KERNEL_SIZE,typename SRC_T>
bool fast_nonmax(
Window<KERNEL_SIZE,KERNEL_SIZE,SRC_T> & core_win
)
{
#pragma HLS INLINE
bool iscorner=true;
for(int k=0;k<3;k++) {
if(core_win.val[1][1]>core_win.val[0][k])
iscorner=iscorner && true;
else
iscorner=iscorner && false;
}
for(int k=0;k<3;k++) {
if(core_win.val[1][1]>core_win.val[2][k])
iscorner=iscorner && true;
else
iscorner=iscorner && false;
}
if(core_win.val[1][1]>core_win.val[1][0]&&core_win.val[1][1]>core_win.val[1][2])
iscorner=iscorner && true;
else
iscorner=iscorner && false;
return iscorner;
}
#pragma empty_line
template<int PSize,int KERNEL_SIZE,int SRC_T,int ROWS,int COLS>
void FAST_t_opr(
Mat<ROWS,COLS,SRC_T> &_src,
Mat<ROWS,COLS,(((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> &_mask,
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _threshold,
bool _nonmax_supression,
int (&flag)[PSize][2]) {
typedef typename pixel_op_type<typename Type<((SRC_T) & ((1 << 4) - 1))>::name>::T INPUT_T;
LineBuffer<KERNEL_SIZE-1,COLS,INPUT_T> k_buf;
LineBuffer<2,COLS+KERNEL_SIZE,ap_int<16> > core_buf;
Window<3,3,ap_int<16> > core_win;
Window<KERNEL_SIZE,KERNEL_SIZE,INPUT_T> win;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<(((((((0) & ((1 << 4) - 1)) + (((1)-1) << 4))) & ((512 - 1) << 4)) >> 4) + 1),typename Type<(((((0) & ((1 << 4) - 1)) + (((1)-1) << 4))) & ((1 << 4) - 1))>::name> d;
int rows= _src.rows;
int cols= _src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 228));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 229));
int kernel_half=KERNEL_SIZE/2;
ap_uint<2> flag_val[PSize+PSize/2+1];
int flag_d[PSize+PSize/2+1];
#pragma HLS ARRAY_PARTITION variable=flag_val dim=0
#pragma HLS ARRAY_PARTITION variable=flag_d dim=0
#pragma empty_line
int index=0;
int offset=KERNEL_SIZE/2;
if(_nonmax_supression)
{
offset=offset+1;
}
loop_height: for(HLS_SIZE_T i=0;i<rows+offset;i++) {
loop_width: for(HLS_SIZE_T j=0;j<cols+offset;j++) {
#pragma HLS LOOP_FLATTEN off
#pragma HLS PIPELINE II=1
d.val[0]=0;
if((i<rows&&j<cols)) {
for(int r= 0;r<KERNEL_SIZE;r++) {
for(int c=0;c<KERNEL_SIZE-1;c++) {
win.val[r][c]=win.val[r][c+1];
}
}
win.val[0][KERNEL_SIZE-1]=k_buf.val[0][j];
for(int buf_row= 1;buf_row< KERNEL_SIZE-1;buf_row++) {
win.val[buf_row][KERNEL_SIZE-1]=k_buf.val[buf_row][j];
k_buf.val[buf_row-1][j]=k_buf.val[buf_row][j];
}
#pragma empty_line
_src>>s;
win.val[KERNEL_SIZE-1][KERNEL_SIZE-1]=s.val[0];
k_buf.val[KERNEL_SIZE-2][j]=s.val[0];
}
#pragma empty_line
for(int r= 0;r<3;r++)
{
for(int c=0;c<3-1;c++)
{
core_win.val[r][c]=core_win.val[r][c+1];
}
}
core_win.val[0][3-1]=core_buf.val[0][j];
for(int buf_row= 1;buf_row< 3-1;buf_row++)
{
core_win.val[buf_row][3-1]=core_buf.val[buf_row][j];
core_buf.val[buf_row-1][j]=core_buf.val[buf_row][j];
}
int core=0;
#pragma empty_line
if(i>=KERNEL_SIZE-1&&j>=KERNEL_SIZE-1)
{
#pragma empty_line
bool iscorner=fast_judge<PSize>(win,(INPUT_T)_threshold,flag_val,flag_d,flag,core,_nonmax_supression);
if(iscorner&&!_nonmax_supression)
{
d.val[0]=255;
}
}
if(i>=rows||j>=cols)
{
core=0;
}
if(_nonmax_supression)
{
core_win.val[3-1][3-1]=core;
core_buf.val[3-2][j]=core;
if(core_win.val[1][1]!=0&&i>=KERNEL_SIZE&&j>=KERNEL_SIZE)
{
bool iscorner=fast_nonmax(core_win);
if(iscorner)
{
d.val[0]=255;
}
}
}
#pragma empty_line
if(i>=offset&&j>=offset)
{
_mask<<d;
}
}
}
}
template<int SRC_T,int ROWS,int COLS>
void FASTX(
Mat<ROWS,COLS,SRC_T> &_src,
Mat<ROWS,COLS,(((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> &_mask,
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _threshold,
bool _nomax_supression
)
{
#pragma HLS INLINE
int flag[16][2]={{3,0},{4,0},{5,1},{6,2},{6,3},{6,4},{5,5},{4,6},
{3,6},{2,6},{1,5},{0,4},{0,3},{0,2},{1,1},{2,0}};
FAST_t_opr<16,7>(_src,_mask,_threshold,_nomax_supression,flag);
}
#pragma empty_line
template<int PSize,int KERNEL_SIZE,typename T, int N, int SRC_T,int ROWS,int COLS>
void FAST_t_opr(
Mat<ROWS,COLS,SRC_T> &_src,
Point_<T> (&_keypoints)[N],
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _threshold,
bool _nonmax_supression,
int (&flag)[PSize][2]
)
{
typedef typename pixel_op_type<typename Type<((SRC_T) & ((1 << 4) - 1))>::name>::T INPUT_T;
LineBuffer<KERNEL_SIZE-1,COLS,INPUT_T> k_buf;
LineBuffer<2,COLS+KERNEL_SIZE,ap_int<16> > core_buf;
Window<3,3,ap_int<16> > core_win;
Window<KERNEL_SIZE,KERNEL_SIZE,INPUT_T> win;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
int rows= _src.rows;
int cols= _src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 344));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 345));
int kernel_half=KERNEL_SIZE/2;
ap_uint<2> flag_val[PSize+PSize/2+1];
int flag_d[PSize+PSize/2+1];
#pragma HLS ARRAY_PARTITION variable=flag_val dim=0
#pragma HLS ARRAY_PARTITION variable=flag_d dim=0
int index=0;
int offset=KERNEL_SIZE/2;
#pragma empty_line
if(_nonmax_supression)
{
offset=offset+1;
}
loop_height: for(HLS_SIZE_T i=0;i<rows+offset;i++) {
loop_width: for(HLS_SIZE_T j=0;j<cols+offset;j++) {
#pragma HLS LOOP_FLATTEN off
#pragma HLS PIPELINE II=1
if(i<rows&&j<cols) {
for(int r= 0;r<KERNEL_SIZE;r++) {
for(int c=0;c<KERNEL_SIZE-1;c++) {
win.val[r][c]=win.val[r][c+1];
}
}
win.val[0][KERNEL_SIZE-1]=k_buf.val[0][j];
for(int buf_row= 1;buf_row< KERNEL_SIZE-1;buf_row++) {
win.val[buf_row][KERNEL_SIZE-1]=k_buf.val[buf_row][j];
k_buf.val[buf_row-1][j]=k_buf.val[buf_row][j];
}
#pragma empty_line
_src>>s;
win.val[KERNEL_SIZE-1][KERNEL_SIZE-1]=s.val[0];
k_buf.val[KERNEL_SIZE-2][j]=s.val[0];
}
#pragma empty_line
for(int r= 0;r<3;r++)
{
for(int c=0;c<3-1;c++)
{
core_win.val[r][c]=core_win.val[r][c+1];
}
}
core_win.val[0][3-1]=core_buf.val[0][j];
for(int buf_row= 1;buf_row< 3-1;buf_row++)
{
core_win.val[buf_row][3-1]=core_buf.val[buf_row][j];
core_buf.val[buf_row-1][j]=core_buf.val[buf_row][j];
}
int core=0;
#pragma empty_line
if(i>=KERNEL_SIZE-1&&j>=KERNEL_SIZE-1)
{
#pragma empty_line
bool iscorner=fast_judge<PSize>(win,(INPUT_T)_threshold,flag_val,flag_d,flag,core,_nonmax_supression);
if(iscorner&&!_nonmax_supression)
{
if(index<N)
{
_keypoints[index].x=j-offset;
_keypoints[index].y=i-offset;
index++;
}
}
}
if(i>=rows||j>=cols)
{
core=0;
}
if(_nonmax_supression)
{
core_win.val[3-1][3-1]=core;
core_buf.val[3-2][j]=core;
if(i>=KERNEL_SIZE&&j>=KERNEL_SIZE&&core_win.val[1][1]!=0)
{
bool iscorner=fast_nonmax(core_win);
if(iscorner)
{
if(index<N)
{
_keypoints[index].x=j-offset;
_keypoints[index].y=i-offset;
index++;
}
}
}
}
#pragma empty_line
}
}
}
template<typename T, int N, int SRC_T,int ROWS,int COLS>
void FASTX(
Mat<ROWS,COLS,SRC_T> &_src,
Point_<T> (&_keypoints)[N],
typename Type<((SRC_T) & ((1 << 4) - 1))>::name _threshold,
bool _nomax_supression
)
{
#pragma HLS INLINE
int flag[16][2]={{3,0},{4,0},{5,1},{6,2},{6,3},{6,4},{5,5},{4,6},
{3,6},{2,6},{1,5},{0,4},{0,3},{0,2},{1,1},{2,0}};
FAST_t_opr<16,7>(_src,_keypoints,_threshold,_nomax_supression,flag);
}
template<int SRC_T,int MASK_T,int ROWS,int COLS>
void PaintMask(
Mat<ROWS,COLS,SRC_T> &_src,
Mat<ROWS,COLS,MASK_T> &_mask,
Mat<ROWS,COLS,SRC_T> &_dst,
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> _color
)
{
((_src.rows == _mask.rows) ? (void)0 : _assert("_src.rows == _mask.rows", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 455));
((_src.rows == _dst.rows) ? (void)0 : _assert("_src.rows == _dst.rows", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 456));
((_src.cols == _mask.cols) ? (void)0 : _assert("_src.cols == _mask.cols", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 457));
((_src.cols == _dst.cols) ? (void)0 : _assert("_src.cols == _dst.cols", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 458));
int rows= _src.rows;
int cols= _src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 461));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_fast.h", 462));
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> d;
Scalar<((((MASK_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((MASK_T) & ((1 << 4) - 1))>::name> m;
loop_height: for(HLS_SIZE_T i=0;i<rows;i++) {
loop_width: for(HLS_SIZE_T j=0;j<cols;j++) {
#pragma HLS LOOP_FLATTEN off
#pragma HLS PIPELINE II=1
_src >> s;
_mask >> m;
if(m.val[0]!=0)
{
d = _color;
}
else
{
d = s;
}
_dst << d;
}
}
}
}
#pragma line 65 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h" 1
#pragma line 83 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
namespace hls {
#pragma empty_line
template <int N, typename T,typename PT>
void LU( T A[N][N], PT pos[N])
{
int imax = 0;
T lu[N] ;
for (int i = 0; i < N; i++)
{
lu[i]=0;
}
for (int i = 0; i < N; i++) {
T big = 0.0;
for (int j = 0; j < N; j++) {
T temp = ::hls::abs((double)A[i][j]);
if (temp > big) big = temp;
}
lu[i] = ((T)1.0)/big;
}
for (int j = 0; j < N; j++) {
for (int i = 0; i < j; i++) {
T sum = A[i][j];
for (int k = 0; k < i; k++) sum -= A[i][k] * A[k][j];
A[i][j] = sum;
}
T big = 0.0;
for (int i = j; i < N; i++) {
T sum = A[i][j];
for (int k = 0; k < j; k++) sum -= A[i][k] * A[k][j];
A[i][j] = sum;
T dum = lu[i] *((T) ::hls::abs((double)sum));
if (dum >= big) {
big = dum;
imax = i;
}
}
if (j != imax&&imax<N&&imax>=0) {
for (int i = 0; i < N; i++) {
T mid = A[imax][i];
A[imax][i] = A[j][i];
A[j][i] = mid;
}
T mid = lu[j];
lu[j] = lu[imax];
lu[imax] = mid;
}
pos[j] = imax;
if (j != N - 1) {
T dum = ((T)1.0)/(A[j][j]);
for (int i = j + 1; i < N; i++) A[i][j] *= dum;
}
}
}
template <int N, typename T, typename PT,typename BT>
void LUex(T A[N][N], PT pos[N],BT b[N])
{
int ii = 0;
for (int i = 0; i < N; i++) {
int ip = pos[i];
T sum=0;
if(ip<N&& ip>=0)
{
sum = b[ip];
b[ip] = b[i];
}
if (ii != 0)
for (int j = ii - 1; j < i; j++) sum -= A[i][j] * b[j];
else
ii = i + 1;
b[i] = sum;
}
for (int i = N - 1; i >= 0; i--) {
T sum = b[i];
for (int j = i + 1; j < N; j++) sum -= A[i][j]*b[j];
b[i] = (sum)*((T) 1.0/A[i][i]);
}
}
#pragma empty_line
#pragma empty_line
template <int N,typename T>
void Invert(T A[N][N],T Ar[N][N], int flags=0)
{
T b[N];
int pos[N];
for (int i = 0; i < N; i++) {
b[i]=0;
pos[i]=0;
}
LU<N>(A,pos);
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) b[j] = 0;
b[i] = 1.0;
LUex<N>(A,pos,b);
for (int j = 0; j < N; j++) Ar[j][i] = b[j];
}
}
template<int AROW, int ACOL, int BCOL, typename AT, typename BT, typename CT>
void mul(
AT A [AROW][ ACOL],
BT B [AROW][ BCOL],
CT C [AROW][ BCOL]
)
{
loop_i: for(int i=0; i<AROW; i++)
{
loop_j: for(int j=0; j<BCOL; j++)
{
CT sum=0;
loop_k: for(int k=0; k<ACOL; k++)
{
sum=sum+A[i][k]*B[k][j];
#pragma empty_line
}
C[i][j]=sum;
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <int WIN_ROW, int ROW, int COLS, int SRC_T, int DST_T, int MAP1_T, int MAP2_T>
void Remap_nearest(
Mat<ROW, COLS, SRC_T> &src,
Mat<ROW, COLS, DST_T> &dst,
Mat<ROW, COLS, MAP1_T> &map1,
Mat<ROW, COLS, MAP2_T> &map2
#pragma empty_line
#pragma empty_line
)
{
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> buf[WIN_ROW][COLS];
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
Scalar<((((MAP1_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((MAP1_T) & ((1 << 4) - 1))>::name> m1;
Scalar<((((MAP1_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((MAP2_T) & ((1 << 4) - 1))>::name> m2;
int rows=src.rows;
int cols=src.cols;
int ishift=WIN_ROW/2;
int r[WIN_ROW] = {};
#pragma empty_line
loop_height: for( int i=0; i< rows+ishift; i++)
{
#pragma HLS LOOP_FLATTEN OFF
loop_width: for( int j=0; j< cols; j++)
{
#pragma HLS PIPELINE II=1
#pragma HLS dependence array inter false
if(i<rows&& j<cols)
{
src >> s;
}
buf[i % WIN_ROW][j] = s;
r[i % WIN_ROW] = i;
#pragma empty_line
if(i>=ishift)
{
map1 >> m1;
map2 >> m2;
int x=m1.val[0]+1;
int y=m1.val[1]+1;
#pragma empty_line
bool in_range = (y>=0 && y<rows && r[y%WIN_ROW] == y && x>=0 && x<cols);
if(in_range) {
d = buf[y%WIN_ROW][x];
} else {
for(int k=0;k<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1);k++) {
d.val[k]=0;
}
}
dst<< d;
}
}
}
}
#pragma empty_line
template <int WIN_ROW, int ROW, int COLS, int SRC_T, int DST_T, int MAP1_T, int MAP2_T>
void Remap_linear(
Mat<ROW, COLS, SRC_T> &src,
Mat<ROW, COLS, DST_T> &dst,
Mat<ROW, COLS, MAP1_T> &map1,
Mat<ROW, COLS, MAP2_T> &map2
#pragma empty_line
#pragma empty_line
)
{
#pragma empty_line
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> buf[WIN_ROW/2+1][2][COLS/2+1][2];
#pragma HLS array_partition complete variable=buf dim=2
#pragma HLS array_partition complete variable=buf dim=4
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((MAP1_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((MAP1_T) & ((1 << 4) - 1))>::name> m1;
Scalar<((((MAP1_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((MAP2_T) & ((1 << 4) - 1))>::name> m2;
int rows=src.rows;
int cols=src.cols;
int ishift=WIN_ROW/2;
int r1[WIN_ROW] = {};
int r2[WIN_ROW] = {};
#pragma empty_line
loop_height: for( int i=0; i< rows+ishift; i++)
{
#pragma HLS LOOP_FLATTEN OFF
loop_width: for( int j=0; j< cols; j++)
{
#pragma HLS PIPELINE II=1
#pragma HLS dependence array inter false
if(i<rows&& j<cols)
{
src >> s;
}
if((i % WIN_ROW) % 2) {
buf[(i % WIN_ROW)/2][(i % WIN_ROW) % 2][j/2][j%2] = s;
} else {
buf[(i % WIN_ROW)/2][(i % WIN_ROW) % 2][j/2][j%2] = s;
}
r1[i % WIN_ROW] = i;
r2[i % WIN_ROW] = i;
#pragma empty_line
if(i>=ishift)
{
map1 >> m1;
map2 >> m2;
int x=m1.val[0];
int y=m1.val[1];
#pragma empty_line
int ynext = y+1;
#pragma empty_line
ap_ufixed<5, 0> iu, iv;
iu(5 -1, 0) = m2.val[0] & (32 -1);
iv(5 -1, 0) = (m2.val[0] >> 5) & (32 -1);
#pragma empty_line
#pragma empty_line
#pragma empty_line
bool in_range = (y>=0 && y<rows && r1[y%WIN_ROW] == y && r2[ynext%WIN_ROW] == ynext && x>=0 && x<cols);
#pragma empty_line
int xa0, xa1, ya0, ya1;
#pragma line 333 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
((((WIN_ROW & (WIN_ROW-1)) == 0) && "WIN_ROW must be a power of two") ? (void)0 : _assert("((WIN_ROW & (WIN_ROW-1)) == 0) && \"WIN_ROW must be a power of two\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 333));
xa0 = x/2 + x%2;
xa1 = x/2;
ya0 = (y/2 + y%2)%(WIN_ROW/2);
ya1 = (y/2)%(WIN_ROW/2);
#pragma empty_line
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> d00,d01,d10,d11;
d00=buf[ya0][0][xa0][0];
d01=buf[ya0][0][xa1][1];
d10=buf[ya1][1][xa0][0];
d11=buf[ya1][1][xa1][1];
#pragma empty_line
if(x%2) {
std::swap(d00,d01);
std::swap(d10,d11);
}
if(y%2) {
std::swap(d00,d10);
std::swap(d01,d11);
}
ap_ufixed<2*5 + 1, 1> k01 = (1-iv)*( iu);
ap_ufixed<2*5 + 1, 1> k10 = ( iv)*(1-iu);
ap_ufixed<2*5 + 1, 1> k11 = ( iv)*( iu);
ap_ufixed<2*5 + 1, 1> k00 = 1-iv-k01;
((k00 + k01 + k10 + k11 == 1) ? (void)0 : _assert("k00 + k01 + k10 + k11 == 1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 357));
#pragma empty_line
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
#pragma empty_line
for(int k = 0; k < ((((DST_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
if(in_range) {
d.val[k] =
d00.val[k] * k00 +
d01.val[k] * k01 +
d10.val[k] * k10 +
d11.val[k] * k11;
} else {
d.val[k] = 0;
}
}
dst<< d;
}
}
}
}
#pragma empty_line
template <int WIN_ROW, int ROW, int COLS, int SRC_T, int DST_T, int MAP1_T, int MAP2_T>
void Remap(
Mat<ROW, COLS, SRC_T> &src,
Mat<ROW, COLS, DST_T> &dst,
Mat<ROW, COLS, MAP1_T> &map1,
Mat<ROW, COLS, MAP2_T> &map2,
int interpolation=0
#pragma empty_line
#pragma empty_line
)
{
if(interpolation==0) {
Remap_nearest<WIN_ROW>(src, dst, map1, map2);
} else if(interpolation==1) {
Remap_linear<WIN_ROW>(src, dst, map1, map2);
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template <typename T>
class RangeAnalyzer {
public:
#pragma line 412 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
void operator ()(T x) {};
#pragma empty_line
#pragma empty_line
#pragma empty_line
};
#pragma line 435 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
template<typename T>
T one_over_x_approx(T x) {
return T(1.0)/x;
}
#pragma empty_line
#pragma empty_line
template <int W, int I, ap_q_mode Q, ap_o_mode O>
ap_fixed<W,I,Q,O> one_over_x_approx(ap_fixed<W,I,Q,O> x) {
return 2-x;
}
#pragma empty_line
template <int W, int I, ap_q_mode Q, ap_o_mode O>
ap_ufixed<W,I,Q,O> one_over_x_approx(ap_ufixed<W,I,Q,O> x) {
return 2-x;
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<typename T>
T one_over_one_plus_x_approx(T x) {
return T(1.0)/(T(1.0)+x);
}
#pragma empty_line
#pragma empty_line
template <int W, int I, ap_q_mode Q, ap_o_mode O>
ap_fixed<W,I,Q,O> one_over_one_plus_x_approx(ap_fixed<W,I,Q,O> x) {
return 1-x;
}
#pragma empty_line
template <int W, int I, ap_q_mode Q, ap_o_mode O>
ap_ufixed<W,I,Q,O> one_over_one_plus_x_approx(ap_ufixed<W,I,Q,O> x) {
return 1-x;
}
#pragma empty_line
template <typename FRAMET, typename FRAME2T, typename ROWT, typename COLT, typename ROWOUTT, typename COLOUTT, typename CMT, typename DT, typename ICMT, int N>
void computeUndistortCoordinates(Window<3,3, CMT> cameraMatrix,
DT (&distCoeffs)[N],
Window<3,3, ICMT> ir,
int noRotation,
ROWT i, COLT j,
ROWOUTT &u, COLOUTT &v) {
#pragma empty_line
DT zo=0;
DT k1=distCoeffs[0];
DT k2=distCoeffs[1];
DT p1=distCoeffs[2];
DT p2=distCoeffs[3];
DT k3= N>=5? distCoeffs[4] : zo;
DT k4= N>=8? distCoeffs[5] : zo;
DT k5= N>=8? distCoeffs[6] : zo;
DT k6= N>=8? distCoeffs[7] : zo;
CMT u0= cameraMatrix.val[0][2];
CMT v0= cameraMatrix.val[1][2];
CMT fx= cameraMatrix.val[0][0];
CMT fy= cameraMatrix.val[1][1];
#pragma line 501 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
FRAMET _x, _y, x, y;
_x=i*ir.val[0][1] + j * ir.val[0][0] + ir.val[0][2];
_y=i*ir.val[1][1] + j * ir.val[1][0] + ir.val[1][2];
#pragma empty_line
float x_gold = ((float)i*(float)ir.val[0][1] + (float)j*(float)ir.val[0][0] + (float)ir.val[0][2]);
if(noRotation) {
#pragma empty_line
x=_x;
y=_y;
} else {
FRAMET w=i*ir.val[2][1] + j * ir.val[2][0] + ir.val[2][2];
FRAMET winv = one_over_x_approx(w);
float winv_gold = 1.0f/((float)i*(float)ir.val[2][1] + (float)j*(float)ir.val[2][0] + (float)ir.val[2][2]);
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
x = (FRAMET)(_x*winv);
y = (FRAMET)(_y*winv);
x_gold = x_gold*winv_gold;
}
#pragma empty_line
typename x_traits<FRAMET,FRAMET>::MULT_T x2t = x*x, y2t = y*y;
FRAME2T _2xy = 2*x*y;
FRAME2T r2 = x2t + y2t;
FRAME2T x2 = x2t, y2 = y2t;
#pragma empty_line
FRAMET kr = (1 + FRAMET(FRAMET(k3*r2 + k2)*r2 + k1)*r2);
FRAME2T krd = FRAMET(FRAMET(k6*r2 + k5)*r2 + k4)*r2;
#pragma empty_line
if(N >5) kr = kr*one_over_one_plus_x_approx(krd);
#pragma empty_line
float kr_gold = (1 + (((float)k3*(float)r2 + (float)k2)*(float)r2 + (float)k1)*(float)r2)/
(1 + (((float)k6*(float)r2 + (float)k5)*(float)r2 + (float)k4)*(float)r2);
#pragma empty_line
u = fx*(FRAMET(x*kr) + FRAMET(p1*_2xy) + FRAMET(p2*(2*x2 + r2))) + u0;
v = fy*(FRAMET(y*kr) + FRAMET(p1*(r2 + 2*y2)) + FRAMET(p2*_2xy)) + v0;
#pragma line 552 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
}
#pragma empty_line
template <typename ROWT, typename COLT, typename ROWOUTT, typename COLOUTT, int N>
void computeUndistortCoordinatesRef(Window<3,3, float> cameraMatrix,
float (&distCoeffs)[N],
Window<3,3, float> ir,
int noRotation,
ROWT i, COLT j,
ROWOUTT &u, COLOUTT &v) {
typedef float DT;
typedef float CMT;
typedef float FRAMET;
typedef float FRAME2T;
#pragma empty_line
DT zo=0;
DT k1=distCoeffs[0];
DT k2=distCoeffs[1];
DT p1=distCoeffs[2];
DT p2=distCoeffs[3];
DT k3= N>=5? distCoeffs[4] : zo;
DT k4= N>=8? distCoeffs[5] : zo;
DT k5= N>=8? distCoeffs[6] : zo;
DT k6= N>=8? distCoeffs[7] : zo;
CMT u0= cameraMatrix.val[0][2];
CMT v0= cameraMatrix.val[1][2];
CMT fx= cameraMatrix.val[0][0];
CMT fy= cameraMatrix.val[1][1];
#pragma empty_line
#pragma empty_line
FRAMET _x, _y, x, y;
_x=i*ir.val[0][1] + j * ir.val[0][0] + ir.val[0][2];
_y=i*ir.val[1][1] + j * ir.val[1][0] + ir.val[1][2];
#pragma empty_line
if(noRotation) {
#pragma empty_line
((ir.val[2][0] == 0) ? (void)0 : _assert("ir.val[2][0] == 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 587));
((ir.val[2][1] == 0) ? (void)0 : _assert("ir.val[2][1] == 0", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 588));
((ir.val[2][1] == 1) ? (void)0 : _assert("ir.val[2][1] == 1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 589));
x=_x;
y=_y;
} else {
FRAMET w=i*ir.val[2][1] + j * ir.val[2][0] + ir.val[2][2];
float winv = 1.0f/w;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
x = (FRAMET)(_x*winv);
y = (FRAMET)(_y*winv);
}
#pragma empty_line
typename x_traits<FRAMET,FRAMET>::MULT_T x2t = x*x, y2t = y*y;
#pragma empty_line
FRAME2T _2xy = 2*x*y;
FRAME2T r2 = x2t + y2t;
FRAME2T x2 = x2t, y2 = y2t;
#pragma empty_line
FRAMET kr = (1 + FRAMET(FRAMET(k3*r2 + k2)*r2 + k1)*r2);
if(N >5) kr = kr/
(1 + FRAMET(FRAMET(k6*r2 + k5)*r2 + k4)*r2);
#pragma empty_line
u = fx*(FRAMET(x*kr) + FRAMET(p1*_2xy) + FRAMET(p2*(2*x2 + r2))) + u0;
v = fy*(FRAMET(y*kr) + FRAMET(p1*(r2 + 2*y2)) + FRAMET(p2*_2xy)) + v0;
#pragma line 628 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
}
#pragma empty_line
template<typename T>
struct InitUndistortRectifyMap_traits {
typedef T FRAMET;
typedef T FRAME2T;
};
#pragma empty_line
template<int W, int I>
struct InitUndistortRectifyMap_traits<ap_fixed<W,I> > {
typedef ap_fixed<18,2> FRAMET;
typedef ap_fixed<23,4,AP_RND,AP_SAT> FRAME2T;
};
template<typename CMT, typename DT, typename ICMT, int ROWS, int COLS, int MAP1_T, int MAP2_T, int N>
void InitUndistortRectifyMapInverse (
Window<3,3, CMT> cameraMatrix,
DT (&distCoeffs)[N],
Window<3,3, ICMT> ir,
Mat<ROWS, COLS, MAP1_T> &map1,
Mat<ROWS, COLS, MAP2_T> &map2,
int noRotation=false)
{
#pragma HLS array_partition variable=distCoeffs complete
int rows= map1.rows;
int cols= map1.cols;
Scalar<((((MAP1_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((MAP1_T) & ((1 << 4) - 1))>::name> m1;
Scalar<((((MAP2_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((MAP2_T) & ((1 << 4) - 1))>::name> m2;
#pragma empty_line
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 656));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 657));
#pragma empty_line
static RangeAnalyzer<float> rau, rav;
static RangeAnalyzer<float> rauerr, raverr;
#pragma empty_line
loop_height: for(int i=0; i< rows; i++) {
loop_width: for(int j=0; j< cols; j++) {
#pragma HLS PIPELINE II=1
typedef ap_uint<BitWidth<ROWS>::Value> ROWT;
typedef ap_uint<BitWidth<COLS>::Value> COLT;
ROWT ifixed = i;
COLT jfixed = j;
#pragma empty_line
ap_ufixed<BitWidth<COLS>::Value+5, BitWidth<COLS>::Value, AP_RND, AP_SAT> u;
ap_ufixed<BitWidth<ROWS>::Value+5, BitWidth<ROWS>::Value, AP_RND, AP_SAT> v;
computeUndistortCoordinates
<typename InitUndistortRectifyMap_traits<CMT>::FRAMET, typename InitUndistortRectifyMap_traits<CMT>::FRAME2T>
(cameraMatrix, distCoeffs, ir, noRotation,ifixed,jfixed,u,v);
#pragma line 696 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h"
((MAP1_T==(((3) & ((1 << 4) - 1)) + (((2)-1) << 4))) ? (void)0 : _assert("MAP1_T==HLS_16SC2", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_undistort.h", 696));
{
int iu = sr_cast<int>(u*32);
int iv = sr_cast<int>(v*32);
m1.val[0]=(iu >> 5);
m1.val[1]=(iv >> 5);
m2.val[0]=(unsigned short)((iv &(32 -1))*32 + (iu & (32 -1)));
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
map1<< m1;
map2<< m2;
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
template< typename CMT, typename RT, typename DT, int ROWS, int COL, int MAP1_T, int MAP2_T, int N>
void InitUndistortRectifyMap(
Window<3,3, CMT> cameraMatrix,
DT (&distCoeffs)[N],
Window<3,3, RT> R,
Window<3,3, CMT> newcameraMatrix,
Mat<ROWS, COL, MAP1_T> &map1,
Mat<ROWS, COL, MAP2_T> &map2
)
{
Window<3,3, RT> iR;
Window<3,3, RT> ir;
mul<3, 3, 3>(newcameraMatrix.val, R.val, iR.val);
Invert<3>(iR.val, ir.val);
InitUndistortRectifyMapInverse(cameraMatrix, distCoeffs,ir,map1,map2);
}
}
#pragma line 66 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_hough.h" 1
#pragma line 83 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_hough.h"
namespace hls {
#pragma empty_line
typedef ap_fixed<19,2,AP_RND> angleAccuracy_T;
#pragma empty_line
template<typename AT,typename RT>
struct Polar_
{
AT angle;
RT rho;
};
#pragma empty_line
template<unsigned int theta,unsigned int rho,typename ACCUMT,int SRC_T, int ROW,int COL, typename S_T>
void HoughPolar(
Mat<ROW,COL,SRC_T> &_src,
ACCUMT accum[][(2*(COL+ROW)+1)/rho+2],
S_T (&sinval)[180/theta],
S_T (&cosval)[180/theta]
)
{
ACCUMT addr[180/theta];
ACCUMT accbuf[2][180/theta];
#pragma HLS ARRAY_PARTITION variable=addr complete dim=0
#pragma HLS ARRAY_PARTITION variable=accbuf complete dim=0
int rows=_src.rows;
int cols=_src.cols;
unsigned int rhoN =(2*(COL+ROW)+1)/ rho;
unsigned int Half_rhoN=(rhoN-1)/2;
unsigned int AngleN= 180/theta;
#pragma HLS ARRAY_PARTITION variable=sinval complete dim=0
#pragma HLS ARRAY_PARTITION variable=cosval complete dim=0
loop_init_r: for(int r=0;r<rhoN+2;r++)
{
loop_init_n: for(int n=0;n<AngleN+2;n++)
{
#pragma HLS PIPELINE
accum[n][r]=0;
}
}
#pragma empty_line
loop_init: for(int n = 0; n < AngleN; n++ )
{
addr[n]=0;
accbuf[0][n]=accum[n+1][Half_rhoN+1];
sinval[n]=sinval[n]/rho;
cosval[n]=cosval[n]/rho;
}
#pragma empty_line
#pragma empty_line
loop_height: for( int i = 0; i < rows; i++ )
{
loop_width: for( int j = 0; j < cols; j++ )
{
#pragma HLS PIPELINE
#pragma HLS DEPENDENCE array inter false
typename Type<((SRC_T) & ((1 << 4) - 1))>::name temp;
_src.data_stream[0]>>temp;
if(temp!=0&&!(i==0&&j==0))
{
loop_angle: for(int n = 0; n < AngleN; n++ )
{
accbuf[1][n]=accbuf[0][n];
ACCUMT r=j*cosval[n]+i*sinval[n];
r+=Half_rhoN;
accbuf[0][n]=accum[n+1][r+1];
if(r==addr[n])
accbuf[0][n]=accbuf[0][n]+1;
#pragma empty_line
accum[n+1][addr[n]+1]=accbuf[1][n]+1;
addr[n]=r;
}
}
#pragma empty_line
}
}
loop_exit: for(int n = 0; n < AngleN; n++ )
{
accum[n+1][addr[n]+1]=accbuf[0][n]+1;
}
}
template<int rho,int ROW,int COL,typename ACCUMT, typename AT, typename RT,int linesMax>
void Sort_insert(
ACCUMT accum[][(2*(COL+ROW)+1)/rho+2],
Polar_<AT,RT> (&lines)[linesMax],
unsigned int threshold,
unsigned int theta,
unsigned int& storenum)
{
LineBuffer<2,((2*(COL+ROW)+1)/rho+2),ACCUMT> accum_buf;
Window<3,3,ACCUMT> accum_win;
ACCUMT lines_val[linesMax+1];
ap_uint<1> lines_flag[linesMax+1];
unsigned int rhoN =(2*(COL+ROW)+1)/ rho;
unsigned int AngleN= 180/theta;
unsigned int Half_rhoN=(rhoN-1)/2;
#pragma empty_line
#pragma HLS ARRAY_PARTITION variable=&accum_buf complete dim=1
#pragma HLS ARRAY_PARTITION variable=lines_val complete dim=1
#pragma HLS ARRAY_PARTITION variable=lines complete dim=0
#pragma HLS ARRAY_PARTITION variable=&accum_win complete dim=0
#pragma HLS ARRAY_PARTITION variable=lines_flag complete dim=0
#pragma empty_line
loop_init: for(int i=0;i<linesMax;i++)
{
lines[i].angle=0;
lines[i].rho=0;
lines_val[i]=0;
lines_flag[i]=0;
}
lines_val[linesMax]=0;
lines_flag[linesMax]=0;
#pragma empty_line
loop_n: for(int n=0;n<AngleN+2;n++)
{
loop_r: for(int r=0;r<rhoN+2;r++)
{
#pragma HLS DEPENDENCE array intra false
#pragma HLS DEPENDENCE array inter false
#pragma HLS PIPELINE
for(int row=2;row>=0;row--)
{
for(int col=2;col>=1;col--)
{
accum_win.val[row][col]=accum_win.val[row][col-1];
}
}
#pragma empty_line
ACCUMT temp=accum[n][r];
#pragma empty_line
ACCUMT accum_buf0=accum_buf.val[0][r];
#pragma empty_line
accum_win.val[2][0]=accum_buf.val[1][r];
accum_win.val[1][0]=accum_buf0;
accum_win.val[0][0]=temp;
#pragma empty_line
accum_buf.val[1][r]=accum_buf0;
#pragma empty_line
accum_buf.val[0][r]=temp;
#pragma empty_line
if(r>=2&&r!=Half_rhoN+2&&r<rhoN+2&&n>=2&&n<AngleN+2)
{
if((accum_win.val[1][1]>threshold)&&(accum_win.val[1][1]>accum_win.val[1][2])&&(accum_win.val[1][1]>=accum_win.val[1][0])&&(accum_win.val[1][1]>accum_win.val[2][1])&&(accum_win.val[1][1]>=accum_win.val[0][1] ))
{
#pragma empty_line
loop_lines: for(int i=linesMax-2;i>=0;i--)
{
ACCUMT max=lines_val[i];
if(accum_win.val[1][1]>max)
{
lines[i+1].rho=lines[i].rho;
lines[i+1].angle=lines[i].angle;
lines_val[i+1]=max;
lines_flag[i]=0;
}
else
{
lines_flag[i]=1;
}
}
int sum=0;
loop_sum: for(int i=0;i<linesMax;i++)
sum+=lines_flag[i];
#pragma empty_line
lines[sum].rho=r-1;
lines[sum].angle=n-1;
lines_val[sum]=accum_win.val[1][1];
storenum++;
}
}
}
}
}
template<typename _AT, typename _RT,typename AT, typename RT,int linesMax>
void inline GetTopLines(
Polar_<_AT,_RT> (&_lines)[linesMax],
Polar_<AT,RT> (&lines)[linesMax+1],
unsigned int storenum,
unsigned int theta,
unsigned int rho,
unsigned int Half_rhoN)
{
angleAccuracy_T Angle_accuracy=3.1415926*theta/180;
loop_lines: for(int i=0;i<linesMax;i++)
{
if(i<storenum)
{
RT r=lines[i].rho-1;
AT n=lines[i].angle-1;
_RT _rho = (r - Half_rhoN) * rho;
_AT _angle = n * Angle_accuracy;
_lines[i].rho=_rho;
_lines[i].angle=_angle;
}
else
{
_lines[i].rho=0;
_lines[i].angle=0;
}
}
}
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<unsigned int theta,unsigned int rho,typename AT,typename RT,typename ACCUMT,int SRC_T,int ROW,int COL,unsigned int linesMax, typename S_T>
void HoughLinesStandard(
Mat<ROW,COL,SRC_T> &_src,
Polar_<AT,RT> (&_lines)[linesMax],
ACCUMT _accum[][(2*(COL+ROW)+1)/rho+2],
unsigned int _threshold,
S_T (&sinval)[180/theta],
S_T (&cosval)[180/theta]
)
{
unsigned int storenum=0;
Polar_<ap_uint<10>,ACCUMT > lines[linesMax+1];
unsigned int rhoN =(2*(COL+ROW)+1)/ rho;
unsigned int Half_rhoN=(rhoN-1)/2;
#pragma empty_line
HoughPolar<theta,rho>(_src,_accum, sinval, cosval);
Sort_insert<rho,ROW,COL>(_accum,lines, _threshold,theta,storenum);
GetTopLines(_lines,lines,storenum,theta,rho,Half_rhoN);
}
#pragma line 312 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_hough.h"
template<unsigned int theta,unsigned int rho,typename AT,typename RT,int SRC_T,int ROW,int COL,unsigned int linesMax>
void HoughLines2(
Mat<ROW,COL,SRC_T> & _src,
Polar_<AT,RT> (&_lines)[linesMax],
unsigned int threshold
)
{
static ap_uint<12> _accum[180/theta+2][(2*(COL+ROW)+1)/rho+2];
#pragma HLS ARRAY_PARTITION variable=_accum complete dim=1
ap_fixed<19,2,AP_RND> sinval[180/theta];
ap_fixed<19,2,AP_RND> cosval[180/theta];
angleAccuracy_T Angle_accuracy=3.1415926*theta/180;
loop_init: for(int i=0;i<180/theta;i++)
{
sinval[i]=::hls::sinf((i*Angle_accuracy));
cosval[i]=::hls::cosf(i*Angle_accuracy);
}
HoughLinesStandard<theta,rho>(_src,_lines,_accum,threshold, sinval,cosval);
}
#pragma empty_line
}
#pragma line 67 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_harris.h" 1
#pragma line 83 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_harris.h"
namespace hls {
#pragma empty_line
template<int KH,int KW, typename SRC_T>
bool IsMax(Window<KH,KW,SRC_T> & core_win)
{
#pragma HLS INLINE
bool isMax=true;
for(int i=0;i<KH;i++) {
for(int j=0;j<KW;j++) {
if(((i!=KH/2)||(j!=KW/2))&&core_win.val[i][j]>core_win.val[KH/2][KW/2])
isMax=false;
}
}
return isMax;
}
template<int KH, int KW, int SRC_T,int DST_T,int ROWS,int COLS>
void FindMax(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
typename Type<((SRC_T) & ((1 << 4) - 1))>::name threshold
)
{
LineBuffer<KH-1,COLS,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> k_buf;
Window<KH,KW,typename Type<((SRC_T) & ((1 << 4) - 1))>::name> win;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
int rows= _src.rows;
int cols= _src.cols;
int ioffset=KH/2+1;
int joffset=KH/2+1;
for(HLS_SIZE_T i=0;i<rows+ioffset;i++)
{
#pragma HLS LOOP_TRIPCOUNT MAX=ROWS
for(HLS_SIZE_T j=0;j<cols+joffset;j++)
{
#pragma HLS DEPENDENCE ARRAY INTER FALSE
#pragma HLS LOOP_TRIPCOUNT MAX=COLS
#pragma HLS LOOP_FLATTEN off
#pragma HLS PIPELINE II=1
d.val[0]=0;
for(int r= 0;r<KH;r++)
{
for(int c=0;c<KW-1;c++)
{
win.val[r][c]=win.val[r][c+1];
}
}
if(i<rows&&j<cols)
{
win.val[0][KW-1]=k_buf.val[0][j];
for(int buf_row= 1;buf_row< KH-1;buf_row++)
{
win.val[buf_row][KW-1]=k_buf.val[buf_row][j];
k_buf.val[buf_row-1][j]=k_buf.val[buf_row][j];
}
#pragma empty_line
_src>>s;
win.val[KH-1][KW-1]=s.val[0];
k_buf.val[KH-2][j]=s.val[0];
}
else if(j>=cols)
{
#pragma empty_line
for(int i= 1;i< KW;i++)
win.val[i][KW-1]=0;
}
if(win.val[1][1]>=threshold&&i>=KH&&j>=KW)
{
bool _ismax=IsMax(win);
if(_ismax)
{
#pragma empty_line
d.val[0]=255;
}
}
#pragma empty_line
if(i>=ioffset&&j>=joffset)
{
_dst<<d;
}
}
}
}
template<typename KT, typename ST, int X2_T,int Y2_T,int XY_T,int DST_T,int ROWS,int COLS>
void CalCim(
Mat<ROWS, COLS, X2_T> &_gradx,
Mat<ROWS, COLS, Y2_T> &_grady,
Mat<ROWS, COLS, XY_T> &_gradxy,
Mat<ROWS, COLS, DST_T> &_dst,
KT k,
ST scale
)
{
Scalar<((((X2_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((X2_T) & ((1 << 4) - 1))>::name> gx;
Scalar<((((Y2_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((Y2_T) & ((1 << 4) - 1))>::name> gy;
Scalar<((((XY_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((XY_T) & ((1 << 4) - 1))>::name> gxy;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
int rows= _grady.rows;
int cols= _grady.cols;
for(HLS_SIZE_T i=0;i<rows;i++)
{
#pragma HLS LOOP_TRIPCOUNT MAX=ROWS
for(HLS_SIZE_T j=0;j<cols;j++)
{
#pragma HLS DEPENDENCE ARRAY INTER FALSE
#pragma HLS LOOP_TRIPCOUNT MAX=COLS
#pragma HLS LOOP_FLATTEN off
#pragma HLS PIPELINE II=1
d.val[0]=0;
_gradx>> gx;
_grady>> gy;
_gradxy>> gxy;
typename Type<((DST_T) & ((1 << 4) - 1))>::name lgx = sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(gx.val[0])*typename Type<((DST_T) & ((1 << 4) - 1))>::name(scale*scale);
typename Type<((DST_T) & ((1 << 4) - 1))>::name lgy = sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(gy.val[0])*typename Type<((DST_T) & ((1 << 4) - 1))>::name(scale*scale);
typename Type<((DST_T) & ((1 << 4) - 1))>::name lgxy= sr_cast<typename Type<((DST_T) & ((1 << 4) - 1))>::name>(gxy.val[0])*typename Type<((DST_T) & ((1 << 4) - 1))>::name(scale*scale);
typename Type<((DST_T) & ((1 << 4) - 1))>::name det = lgx*lgy - lgxy*lgxy;
typename Type<((DST_T) & ((1 << 4) - 1))>::name trac= lgx + lgy;
#pragma empty_line
typename Type<((DST_T) & ((1 << 4) - 1))>::name cim = det - k*(trac)*(trac);
d.val[0] = cim;
_dst<<d;
}
}
}
template<int blockSize,int Ksize, bool NORMALIZE, class BORDERMODEL, int GT, int G2T, typename ST, typename KT,int SRC_T,int DST_T,int ROWS,int COLS>
void Harris_opr(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
KT k,
ST scale)
{
#pragma HLS INLINE
#pragma HLS dataflow
((Ksize==3||Ksize==5) ? (void)0 : _assert("Ksize==3||Ksize==5", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_harris.h", 216));
int rows = _src.rows;
int cols = _src.cols;
Mat<ROWS,COLS,SRC_T> gray1(rows,cols);
Mat<ROWS,COLS,SRC_T> gray2(rows,cols);
#pragma empty_line
Mat<ROWS,COLS,GT> grad_x(rows,cols);
Mat<ROWS,COLS,GT> grad_x1(rows,cols);
Mat<ROWS,COLS,GT> grad_x2(rows,cols);
Mat<ROWS,COLS,GT> grad_x3(rows,cols);
Mat<ROWS,COLS,GT> grad_x4(rows,cols);
#pragma empty_line
Mat<ROWS,COLS,GT> grad_y(rows,cols);
Mat<ROWS,COLS,GT> grad_y1(rows,cols);
Mat<ROWS,COLS,GT> grad_y2(rows,cols);
Mat<ROWS,COLS,GT> grad_y3(rows,cols);
Mat<ROWS,COLS,GT> grad_y4(rows,cols);
#pragma empty_line
Mat<ROWS,COLS,G2T> grad_xx(rows,cols);
Mat<ROWS,COLS,G2T> grad_yy(rows,cols);
Mat<ROWS,COLS,G2T> grad_xy(rows,cols);
#pragma empty_line
Mat<ROWS,COLS,G2T> grad_gx(rows,cols);
Mat<ROWS,COLS,G2T> grad_gy(rows,cols);
Mat<ROWS,COLS,G2T> grad_gxy(rows,cols);
#pragma empty_line
Duplicate(_src,gray1,gray2);
#pragma empty_line
Sobel<1,0,Ksize,BORDERMODEL>(gray1,grad_x);
Duplicate(grad_x,grad_x1,grad_x2);
Duplicate(grad_x1,grad_x3,grad_x4);
Sobel<0,1,Ksize,BORDERMODEL>(gray2,grad_y);
Duplicate(grad_y,grad_y1,grad_y2);
Duplicate(grad_y1,grad_y3,grad_y4);
#pragma empty_line
Mul(grad_x3,grad_x4,grad_xx);
Mul(grad_y3,grad_y4,grad_yy);
Mul(grad_x2,grad_y2,grad_xy);
#pragma empty_line
BoxFilter<blockSize,blockSize,NORMALIZE,BORDERMODEL>(grad_xx,grad_gx);
BoxFilter<blockSize,blockSize,NORMALIZE,BORDERMODEL>(grad_yy,grad_gy);
BoxFilter<blockSize,blockSize,NORMALIZE,BORDERMODEL>(grad_xy,grad_gxy);
#pragma empty_line
CalCim(grad_gx,grad_gy,grad_gxy, _dst,k, scale);
}
#pragma empty_line
template<int blockSize,int Ksize,typename KT,int SRC_T,int DST_T,int ROWS,int COLS>
void CornerHarris(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
KT k)
{
#pragma HLS INLINE
#pragma empty_line
ap_uint<8> sc=(1 << ((Ksize>0 ? Ksize:3)-1))*blockSize;
((SRC_T==(((0) & ((1 << 4) - 1)) + (((1)-1) << 4))||SRC_T==(((8) & ((1 << 4) - 1)) + (((1)-1) << 4))||SRC_T==(((5) & ((1 << 4) - 1)) + (((1)-1) << 4))) ? (void)0 : _assert("SRC_T==HLS_8UC1||SRC_T==HLS_10UC1||SRC_T==HLS_32FC1", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_harris.h", 271));
if(SRC_T==(((0) & ((1 << 4) - 1)) + (((1)-1) << 4)))
{
ap_fixed<25,-7-Ksize> scale = (ap_fixed<25,2>(1.0f)/255) / sc;
Harris_opr<blockSize, Ksize,false,BORDER_REPLICATE, (((3) & ((1 << 4) - 1)) + (((1)-1) << 4)), (((4) & ((1 << 4) - 1)) + (((1)-1) << 4))>(_src, _dst, k,scale);
}
else
{
float scale = 1.0f / sc;
Harris_opr<blockSize, Ksize,false,BORDER_REPLICATE, (((5) & ((1 << 4) - 1)) + (((1)-1) << 4)), (((5) & ((1 << 4) - 1)) + (((1)-1) << 4))>(_src, _dst, k,scale);
}
}
#pragma empty_line
template<int blockSize,int Ksize,typename KT,int SRC_T,int DST_T,int ROWS,int COLS>
void Harris(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_dst,
KT k,
int threshold)
{
#pragma HLS INLINE
Mat<ROWS,COLS,(((5) & ((1 << 4) - 1)) + (((1)-1) << 4))> res(_src.rows,_src.cols);
CornerHarris<blockSize,Ksize>(_src, res, k);
FindMax<3,3>(res,_dst,threshold);
}
#pragma empty_line
}
#pragma line 68 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_haar.h" 1
#pragma line 41 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_haar.h"
namespace hls {
#pragma empty_line
typedef ap_fixed<12,6,AP_RND> VAR_T;
typedef ap_uint<3> WEIGHT_T;
typedef unsigned int STHRESHOLD_T;
typedef short CTHRESHOLD_T;
typedef unsigned short ALPHA_T;
#pragma empty_line
struct HaarRect
{
Rect_< ap_uint<6> > r;
WEIGHT_T weight;
};
struct HaarFeature
{
public:
HaarFeature()
{
#pragma HLS ARRAY_PARTITION variable=rect complete dim=1
};
HaarRect rect[3];
#pragma empty_line
};
template <int FEATURE_MAX>
struct HaarClassifier
{
public:
HaarClassifier()
{
#pragma HLS ARRAY_PARTITION variable=haar_feature complete dim=1
};
unsigned short count;
HaarFeature haar_feature[FEATURE_MAX];
CTHRESHOLD_T threshold[FEATURE_MAX];
ap_int<5> left[FEATURE_MAX];
ap_int<5> right[FEATURE_MAX];
ALPHA_T alpha[FEATURE_MAX+1];
};
template <int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX>
struct HaarStageClassifier
{
public:
HaarStageClassifier()
{
#pragma HLS ARRAY_PARTITION variable=classifier complete dim=1
};
unsigned char count[STAGE];
STHRESHOLD_T threshold[STAGE];
HaarClassifier<FEATURE_MAX> classifier[CLASSIFIER_ALL];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
};
template <int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX>
struct HaarClassifierCascade
{
public:
HaarClassifierCascade()
{
};
unsigned short count;
Size_<unsigned char> real_window_size;
HaarStageClassifier<STAGE,CLASSIFIER_ALL,FEATURE_MAX> stage_classifier;
};
#pragma empty_line
class HaarLoadData
{
public:
template <int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX>
HaarLoadData(HaarClassifierCascade<STAGE,CLASSIFIER_ALL,FEATURE_MAX> &cascade,
#pragma empty_line
const int ca_count,
#pragma empty_line
const Size_<unsigned char> ca_real_window_size,
const int s_count[],
const float s_threshold[],
const int c_left[][FEATURE_MAX],
const int c_right[][FEATURE_MAX],
const float c_threshold[][FEATURE_MAX],
const float c_alpha[][FEATURE_MAX+1],
const unsigned int haar_feature[][FEATURE_MAX][4*3],
const float haar_feature_weight[][FEATURE_MAX][3]
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
)
{
#pragma empty_line
cascade.count=ca_count;
#pragma empty_line
cascade.real_window_size=ca_real_window_size;
for(int i=0;i<STAGE;i++)
{
cascade.stage_classifier.count[i]=s_count[i];
cascade.stage_classifier.threshold[i]=s_threshold[i];
#pragma empty_line
#pragma empty_line
#pragma empty_line
}
for(int i=0;i<CLASSIFIER_ALL;i++)
{
#pragma empty_line
for(int j=0;j<FEATURE_MAX;j++)
{
cascade.stage_classifier.classifier[i].left[j]=c_left[i][j];
cascade.stage_classifier.classifier[i].right[j]=c_right[i][j];
cascade.stage_classifier.classifier[i].threshold[j]=c_threshold[i][j];
cascade.stage_classifier.classifier[i].alpha[j]=c_alpha[i][j];
cascade.stage_classifier.classifier[i].alpha[FEATURE_MAX]=c_alpha[i][FEATURE_MAX];
#pragma empty_line
for(int n=0;n<3;n++)
{
cascade.stage_classifier.classifier[i].haar_feature[j].rect[n].r.x=haar_feature[i][j][n*4+0];
cascade.stage_classifier.classifier[i].haar_feature[j].rect[n].r.y=haar_feature[i][j][n*4+1];
cascade.stage_classifier.classifier[i].haar_feature[j].rect[n].r.width=haar_feature[i][j][n*4+2];
cascade.stage_classifier.classifier[i].haar_feature[j].rect[n].r.height=haar_feature[i][j][n*4+3];
}
cascade.stage_classifier.classifier[i].haar_feature[j].rect[0].weight=-1;
cascade.stage_classifier.classifier[i].haar_feature[j].rect[1].weight=haar_feature_weight[i][j][1];
cascade.stage_classifier.classifier[i].haar_feature[j].rect[2].weight=haar_feature_weight[i][j][2];
}
}
}
};
#pragma empty_line
template<typename SUMT, typename VART,int ROWS,int COLS>
void intergral_win(
Window<ROWS,COLS,VART> &win_var,
SUMT &var
)
{
#pragma HLS INLINE
var=0;
for(int j=0;j<COLS;j++)
{
SUMT t = 0;
for(int i=0;i<ROWS;i++)
{
var=var+win_var.val[i][j];
t += win_var.val[i][j];
}
#pragma empty_line
}
}
#pragma empty_line
template< typename SRC_T,int ROWS,int COLS,int FEATURE_MAX>
ALPHA_T icvEvalHidHaarClassifier(HaarClassifier<FEATURE_MAX> & classifier,Window<ROWS,COLS,SRC_T>& win,VAR_T &variance )
{
#pragma HLS inline self off
#pragma HLS function_instantiate variable=&classifier
#pragma empty_line
#pragma empty_line
int m=0,i=0;
for(m=0;m<FEATURE_MAX;m++)
{
Rect_<ap_uint<6> > rr=classifier.haar_feature[i].rect[0].r;
if(i>0||(i==0&&m==0))
{
#pragma empty_line
CTHRESHOLD_T sum=-(win.val[rr.height][rr.width]-win.val[rr.height][rr.x]-win.val[rr.y][rr.width]+win.val[rr.y][rr.x]);
for(int j=1;j<3;j++)
{
WEIGHT_T weight=classifier.haar_feature[i].rect[j].weight;
Rect_< ap_uint<6> > rj=classifier.haar_feature[i].rect[j].r;
sum+=(win.val[rj.height][rj.width]-win.val[rj.height][rj.x]-win.val[rj.y][rj.width]+win.val[rj.y][rj.x])*weight;
}
if(sum<classifier.threshold[i]*variance)
{
i=classifier.left[i];
}
else
{
i=classifier.right[i];
}
}
#pragma empty_line
#pragma empty_line
}
return classifier.alpha[-i] ;
}
#pragma empty_line
template< typename SRC_T,int ROWS,int COLS,int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX>
bool RunHaarClassifierCascade(HaarClassifierCascade<STAGE,CLASSIFIER_ALL,FEATURE_MAX> &cascade,Window<ROWS,COLS,SRC_T>&win,VAR_T &variance )
{
#pragma HLS inline
ALPHA_T sum=0;
bool result=true;
unsigned char stage_index=0;
unsigned char stage_count=0;
for (int i=0;i<CLASSIFIER_ALL;i++)
{
sum+=icvEvalHidHaarClassifier(cascade.stage_classifier.classifier[i],win,variance);
stage_count++;
if(cascade.stage_classifier.count[stage_index]==stage_count)
{
if(sum < cascade.stage_classifier.threshold[stage_index])
{
result =false;
}
sum=0;
stage_count=0;
stage_index++;
}
}
return result;
}
template < typename T>
T TaylorExp(T &t)
{
return (1+((T)0.5)*(t)-((T)0.125)*(t)*(t));
}
#pragma empty_line
template< int K_H,int K_W,int S_T,int ROWS,int COLS,int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX, int DST_T>
void HaarClassifierObject_opr(
HaarClassifierCascade<STAGE,CLASSIFIER_ALL,FEATURE_MAX> &cascade,
Mat<ROWS, COLS, S_T> &_src,
Mat<ROWS, COLS, DST_T> &_mask
)
{
int storage_count=0;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
Window<1,K_W+1,ap_uint<16+16> > sqwin;
Window<K_H+1,K_W+1,ap_uint<8+16> > swin;
LineBuffer<K_H,COLS,typename Type<((S_T) & ((1 << 4) - 1))>::name> sbuf;
#pragma empty_line
int rows=_src.rows;
int cols=_src.cols;
((rows <= ROWS) ? (void)0 : _assert("rows <= ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_haar.h", 275));
((cols <= COLS) ? (void)0 : _assert("cols <= COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_haar.h", 276));
Scalar<1,typename Type<((DST_T) & ((1 << 4) - 1))>::name> m;
Scalar<((((S_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((S_T) & ((1 << 4) - 1))>::name> ss;
#pragma empty_line
for(int i=0;i<rows;i++)
{
for(int j=0;j<cols;j++)
{
#pragma HLS loop_flatten off
#pragma HLS PIPELINE
#pragma HLS DEPENDENCE array inter false
#pragma empty_line
{
#pragma HLS expression_balance off
sqwin.shift_left();
swin.shift_left();
swin.val[0][K_W]=(j == 0 ? ap_uint<24>(0) :swin.val[0][K_W-1])+sbuf.val[0][j];
ap_uint<16> col_sum=sbuf.val[0][j];
ap_uint<32> col_sum_sq=0;
for(int buf_row= 1;buf_row<K_H;buf_row++)
{
ss.val[0]=sbuf.val[buf_row][j];
sbuf.val[buf_row-1][j]=ss.val[0];
col_sum += ss.val[0];
col_sum_sq += ss.val[0] * ss.val[0];
swin.val[buf_row][K_W] = (j == 0 ? ap_uint<24>(0) :swin.val[buf_row][K_W-1]) + col_sum;
}
_src >> ss;
sbuf.val[K_H-1][j]=ss.val[0];
col_sum += ss.val[0];
col_sum_sq += ss.val[0] * ss.val[0];
swin.val[K_H][K_W] = (j == 0 ? ap_uint<24>(0) : swin.val[K_H][K_W-1]) + col_sum;
sqwin.val[0][K_W] = (j == 0 ? ap_uint<32>(0) : sqwin.val[0][K_W-1]) + col_sum_sq;
#pragma line 322 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_haar.h"
}
#pragma empty_line
m.val[0]=0;
if(i>=K_H && j>=K_W &&( (j & 1)==0 ))
{
int b=K_H,s=0;
#pragma empty_line
float inv_window_area=1.0/(K_H*K_W);
ap_uint<26> varsum=sqwin.val[0][K_W] - sqwin.val[0][0];
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
ap_uint<17> meansum=swin.val[b][b]-swin.val[b][s]-swin.val[s][b]+swin.val[s][s];
ap_fixed<32,18,AP_RND> mean=(meansum)*inv_window_area;
ap_fixed<32,18,AP_RND> meansq=mean*mean;
ap_fixed<32,18,AP_RND> var_a=varsum*inv_window_area;
ap_fixed<32,18,AP_RND> variance=var_a-meansq;
if(variance>0)
{
#pragma empty_line
variance = (variance/100);
ap_fixed<32,18,AP_RND> t=variance-1;
if(variance<=4)
variance= TaylorExp(t)+1;
else if(variance >4 && variance <=16)
{
ap_fixed<32,18,AP_RND> tt=t/4;
variance= 2*TaylorExp(tt)+1;
}
else if(variance >16 && variance <=64)
{
ap_fixed<32,18,AP_RND> tt=t/16;
variance= 4*TaylorExp(tt)+1;
}
else if(variance >64 && variance <=256)
{
ap_fixed<32,18,AP_RND> tt=t/64;
variance= 8*TaylorExp(tt)+1;
}
else
variance=16;
}
else
{
variance = 1;
}
#pragma empty_line
ap_fixed<12,6,AP_RND> var=variance;
bool Isface=RunHaarClassifierCascade(cascade,swin,var);
if(Isface)
{
if(variance>65)
{
variance=65;
}
variance=variance*1000;
storage_count++;
#pragma empty_line
m.val[0]=(unsigned char)variance;
}
}
_mask << m;
}
}
#pragma empty_line
}
template<int K_H,int K_W,int SRC_T,int DST_T,int ROWS,int COLS,int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX>
void HaarClassifierObject(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_mask,
HaarClassifierCascade<STAGE,CLASSIFIER_ALL,FEATURE_MAX> &_cascade
)
{
#pragma HLS inline
#pragma line 409 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_haar.h"
HaarClassifierObject_opr<K_H,K_W>(_cascade,_src, _mask);
}
#pragma empty_line
template<typename RECT_T>
void CombineStorage(Rect_<RECT_T> _storage_group[][300],int m, Rect_<RECT_T> _storage[],int num)
{
int count=0;
for(int i=0;i<m;i++)
{
for(int j=0;j<num;j++)
{
if(count<num&&_storage_group[i][j].width!=0&&_storage_group[i][j].height!=0)
{
_storage[count++]=_storage_group[i][j];
}
}
}
for(int i=0;i<num;i++)
{
if(i>=count)
{
_storage[count].x=0;
_storage[count].y=0;
_storage[count].width=0;
_storage[count].height=0;
#pragma empty_line
}
}
}
template<int SRC_T, int DST_T,int ROWS,int COLS>
void Combin_mask(
Mat<ROWS, COLS, SRC_T> &mask0,
Mat<ROWS/2, COLS/2, SRC_T> &mask1,
Mat<ROWS/4, COLS/4, SRC_T> &mask2,
Mat<ROWS/8, COLS/8, SRC_T> &mask3,
Mat<ROWS, COLS, DST_T> &dst
)
{
int rows =mask0.rows;
int cols =mask0.cols;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1),typename Type<((SRC_T) & ((1 << 4) - 1))>::name> m;
#pragma empty_line
int i1=0;
int i2=0;
int i3=0;
for(int i=0;i<rows;i++)
{
int j1=0;
int j2=0;
int j3=0;
for(int j=0;j<cols;j++)
{
#pragma HLS PIPELINE
s.val[0]=0;
mask0>> m;
if(m.val[0]!=0)
s.val[0]=255;
if(i==i1*2&&j==j1*2)
{
mask1>>m;
s.val[0]=s.val[0]|m.val[0];
j1++;
}
if(i==i2*4&&j==j2*4)
{
mask2>>m;
s.val[0]=s.val[0]|m.val[0];
j2++;
}
if(i==i3*8&&j==j3*8)
{
mask3>>m;
s.val[0]=s.val[0]|m.val[0];
j3++;
}
dst<<s;
}
if(i==i1*2)
i1++;
if(i==i2*4)
i2++;
if(i==i3*8)
i3++;
}
}
#pragma empty_line
template<int K_H,int K_W,int SRC_T,int DST_T,int ROWS,int COLS,int STAGE,int CLASSIFIER_ALL,int FEATURE_MAX>
void HaarClassifierObject_group(
Mat<ROWS, COLS, SRC_T> &_src,
Mat<ROWS, COLS, DST_T> &_mask,
HaarClassifierCascade<STAGE,CLASSIFIER_ALL,FEATURE_MAX> &_cascade
)
{
#pragma HLS inline
int rows =_src.rows;
int cols =_src.cols;
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> gray1(rows,cols);
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> gray2(rows,cols);
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> gray3(rows,cols);
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> gray4(rows,cols);
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> gray5(rows,cols);
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> gray6(rows,cols);
Duplicate(_src, gray1, gray2 );
Duplicate(gray1, gray3, gray4 );
Duplicate(gray2, gray5, gray6 );
Mat<ROWS/2, COLS/2, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> internal_1(rows/2,cols/2);
Mat<ROWS/4, COLS/4, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> internal_2(rows/4,cols/4);
Mat<ROWS/8, COLS/8, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> internal_3(rows/8,cols/8);
Mat<ROWS, COLS, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> mask_0(rows,cols);
Mat<ROWS/2, COLS/2, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> mask_1(rows/2,cols/2);
Mat<ROWS/4, COLS/4, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> mask_2(rows/4,cols/4);
Mat<ROWS/8, COLS/8, (((0) & ((1 << 4) - 1)) + (((1)-1) << 4))> mask_3(rows/8,cols/8);
Resize(gray4,internal_1);
Resize(gray5,internal_2);
Resize(gray6,internal_3);
HaarClassifierObject<K_H, K_W > ( gray3, mask_0, _cascade);
HaarClassifierObject<K_H, K_W > ( internal_1, mask_1, _cascade);
HaarClassifierObject<K_H, K_W > ( internal_2, mask_2, _cascade);
HaarClassifierObject<K_H, K_W > ( internal_3, mask_3, _cascade);
Combin_mask<DST_T,DST_T,ROWS,COLS>(mask_0,mask_1,mask_2,mask_3,_mask);
}
#pragma empty_line
}
#pragma line 69 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h" 1
#pragma line 100 "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h"
namespace hls {
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
template<int WSIZE, int NDISP, int NDISP_UNIT>
class StereoBMState {
public:
#pragma empty_line
int preFilterType;
int preFilterSize;
int preFilterCap;
#pragma empty_line
#pragma empty_line
int SADWindowSize;
int minDisparity;
int numberOfDisparities;
#pragma empty_line
#pragma empty_line
int textureThreshold;
#pragma empty_line
int uniquenessRatio;
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
int ndisp_unit;
int sweepFactor;
int remainder;
#pragma empty_line
StereoBMState() {
preFilterType = 1;
preFilterSize = WSIZE;
preFilterCap = 32;
SADWindowSize = WSIZE;
minDisparity = 0;
numberOfDisparities = NDISP;
textureThreshold = 10;
uniquenessRatio = 15;
sweepFactor = (NDISP/NDISP_UNIT) + ((NDISP%NDISP_UNIT) != 0);
ndisp_unit = NDISP_UNIT;
remainder = NDISP_UNIT*sweepFactor - NDISP;
}
};
#pragma empty_line
class normalize_kernel
{
public:
template<int SRC, typename SRC_T,typename DST_T,typename FILTER_T, int F_HEIGHT, int F_WIDTH>
void apply(Window<F_HEIGHT,F_WIDTH,FILTER_T> &_kernel_filter,
Window<F_HEIGHT,F_WIDTH,SRC_T> &_kernel_pixel,
DST_T &out) {
#pragma HLS inline
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::ACCUM_T sum=0;
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::ACCUM_T temp=0;
loop_kernel_height:
for(int m = 0; m < F_HEIGHT; m++) {
loop_kernel_width:
for(int n = 0; n < F_WIDTH; n++) {
typename filter2d_traits<SRC_T, FILTER_T, F_HEIGHT*F_WIDTH>::SRC_CAST_T src_v =
_kernel_pixel.val[F_HEIGHT-m-1][F_WIDTH-1-n];
sum = sum + src_v;
}
}
DST_T cap = sr_cast<DST_T>(_kernel_filter.val[0][0]);
DST_T center = sr_cast<DST_T>(_kernel_pixel.val[F_HEIGHT/2][F_WIDTH/2]);
DST_T avg = sr_cast<DST_T>(sum/(F_HEIGHT*F_WIDTH));
out = ((((center-avg) > (-cap) ? (center-avg) : (-cap))) < (cap) ? (((center-avg) > (-cap) ? (center-avg) : (-cap))) : (cap)) + cap;
}
};
#pragma empty_line
template<int PWSIZE, int SRC_T, int DST_T, int ROWS, int COLS>
void PreFilterNorm(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst,
int cap)
{
int rows = src.rows;
int cols = src.cols;
((rows < ROWS) ? (void)0 : _assert("rows < ROWS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 183));
((cols < COLS) ? (void)0 : _assert("cols < COLS", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 184));
#pragma empty_line
LineBuffer<PWSIZE, COLS+PWSIZE-1, Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> > buff;
Window<PWSIZE, PWSIZE, Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> > win;
#pragma empty_line
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> tmp[PWSIZE];
#pragma HLS array_partition variable=tmp complete dim=0
int sum_cols[PWSIZE];
#pragma HLS array_partition variable=tmp complete dim=0
int sum;
#pragma empty_line
loop_sum_row:
for (int row = 0; row < rows+PWSIZE-1; row++) {
loop_sum_init:
for (int i = 0; i < PWSIZE; i++) {
sum_cols[i] = 0;
}
sum = 0;
loop_sum_col:
for (int col = 0; col < cols+PWSIZE-1; col++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> pix_in(0);
buff.shift_down(col);
if (!(row < (PWSIZE-1)/2 || row >= rows+(PWSIZE-1)/2 || col < (PWSIZE-1)/2 || col >= cols+(PWSIZE-1)/2)) {
src >> pix_in;
}
buff.insert_bottom(pix_in, col);
for (int i = 0; i< PWSIZE; i++) {
tmp[i] = buff.val[i][col];
}
#pragma empty_line
#pragma empty_line
int a_sum = 0, b_sum = 0;
for (int i = 0; i < PWSIZE; i++) {
b_sum += tmp[i].val[0];
}
a_sum = sum_cols[PWSIZE-1];
for (int j = PWSIZE-1; j > 0; j--) {
sum_cols[j] = sum_cols[j-1];
}
sum_cols[0] = b_sum;
sum = sum - a_sum + b_sum;
win.shift_right();
win.insert_right(tmp);
#pragma empty_line
if (row >= PWSIZE-1 && col >= PWSIZE-1) {
int avg = sum / (PWSIZE*PWSIZE);
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> pix_out;
int center = win.val[PWSIZE/2][PWSIZE/2].val[0];
pix_out.val[0] = ((((center-avg) > (-cap) ? (center-avg) : (-cap))) < (cap) ? (((center-avg) > (-cap) ? (center-avg) : (-cap))) : (cap)) + cap;
dst << pix_out;
}
}
}
}
#pragma empty_line
template<int ROWS, int COLS, int SRC_T, int DST_T>
void Clip(
Mat<ROWS, COLS, SRC_T>& src,
Mat<ROWS, COLS, DST_T>& dst,
int cap)
{
HLS_SIZE_T rows = src.rows;
HLS_SIZE_T cols = src.cols;
Scalar<((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((SRC_T) & ((1 << 4) - 1))>::name> s;
Scalar<((((DST_T) & ((512 - 1) << 4)) >> 4) + 1), typename Type<((DST_T) & ((1 << 4) - 1))>::name> d;
for (HLS_SIZE_T i = 0; i < rows; i++) {
for (HLS_SIZE_T j = 0; j < cols; j++) {
#pragma HLS pipeline II=1
src >> s;
for (HLS_SIZE_T k = 0; k < ((((SRC_T) & ((512 - 1) << 4)) >> 4) + 1); k++) {
s.val[k] = s.val[k] < -cap ? 0 : s.val[k] > cap ? cap*2 : s.val[k] + cap;
d.val[k] = s.val[k];
}
dst << d;
}
}
}
#pragma empty_line
template<typename T>
T absdiff(T a, T b) {
#pragma HLS inline
long long x = a-b;
long long y = b-a;
T r;
if(x < 0) {
r = y; ((r == y) ? (void)0 : _assert("r == y", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 271));
} else {
r = x; ((r == x) ? (void)0 : _assert("r == x", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 273));
}
return r;
}
#pragma empty_line
template<int WSIZE, class T>
void UpdateTexture(
Window<WSIZE, WSIZE, T>& window,
T* col_tbi,
int& text_sum,
int row,
int col,
T cap)
{
#pragma HLS inline
for (int i = 0; i < WSIZE; i++) {
text_sum += (i > row? 0 : absdiff(col_tbi[i], cap)) - ((col < WSIZE || i > row) ? 0 : absdiff(window.val[i][WSIZE-1], cap));
}
}
#pragma empty_line
template<int WSIZE, int L_WIN_COLS, int R_WIN_COLS, typename T>
int SAD_compute_inc(
Window<WSIZE, L_WIN_COLS, T>& l_win,
Window<WSIZE, R_WIN_COLS, T>& r_win_s,
int d,
int col,
int sad_cols_d[WSIZE])
{
#pragma HLS inline
int a_sum = 0, b_sum = 0;
#pragma empty_line
for (int i = 0; i < WSIZE; i++) {
b_sum += absdiff(l_win.val[i][0], r_win_s.val[i][d]);
}
#pragma empty_line
if (col < d) b_sum = 0;
#pragma empty_line
a_sum = sad_cols_d[WSIZE-1];
#pragma empty_line
for (int j = WSIZE-1; j > 0; j--) {
sad_cols_d[j] = sad_cols_d[j-1];
}
#pragma empty_line
sad_cols_d[0] = b_sum;
#pragma empty_line
return (-a_sum+b_sum);
}
#pragma empty_line
template<int SIZE>
class MinSAD {
public:
template <typename T, typename T_idx>
static void find(T a[SIZE], T_idx &loc, T &val) {
#pragma HLS inline
#pragma HLS array_partition variable=a complete dim=0
T a1[SIZE/2];
T a2[SIZE-SIZE/2];
for(int i = 0; i < SIZE/2; i++) {
a1[i] = a[i];
}
for(int i = 0; i < SIZE-SIZE/2; i++) {
a2[i] = a[i+SIZE/2];
}
T_idx l1,l2;
T v1,v2;
MinSAD<SIZE/2>::find(a1,l1,v1);
MinSAD<SIZE-SIZE/2>::find(a2,l2,v2);
if(v1 >= v2) {
val = v2;
loc = l2+SIZE/2;
} else {
val = v1;
loc = l1;
}
}
};
#pragma empty_line
template<>
class MinSAD<1> {
public:
template <typename T, typename T_idx>
static void find(T a[1], T_idx &loc, T &val) {
#pragma HLS inline
#pragma HLS array_partition variable=a complete dim=0
loc = 0;
val = a[0];
}
};
#pragma empty_line
template<>
class MinSAD<2> {
public:
template <typename T, typename T_idx>
static void find(T a[2], T_idx &loc, T &val) {
#pragma HLS inline
#pragma HLS array_partition variable=a complete dim=0
T_idx l1=0, l2=1;
T v1=a[0], v2=a[1];
if(v1 >= v2) {
val = v2;
loc = l2;
} else {
val = v1;
loc = l1;
}
}
};
#pragma empty_line
template<int WSIZE, int NDISP, int NDISP_UNIT, int ROWS, int COLS, int SRC_T, int DST_T>
void SADBlockMatching(
Mat<ROWS, COLS, SRC_T>& left,
Mat<ROWS, COLS, SRC_T>& right,
Mat<ROWS, COLS, DST_T>& disp,
StereoBMState<WSIZE, NDISP, NDISP_UNIT>& state)
{
int rows = left.rows;
int cols = left.cols;
LineBuffer<WSIZE, COLS+WSIZE-1, typename Type<((SRC_T) & ((1 << 4) - 1))>::name> l_buff;
LineBuffer<WSIZE, COLS+WSIZE-1, typename Type<((SRC_T) & ((1 << 4) - 1))>::name> r_buff;
Window<WSIZE, WSIZE, typename Type<((SRC_T) & ((1 << 4) - 1))>::name> l_window;
Window<WSIZE, WSIZE+NDISP_UNIT-1, typename Type<((SRC_T) & ((1 << 4) - 1))>::name> r_window_search;
int ndisp = state.numberOfDisparities;
int mindisp = 0;
#pragma empty_line
typename Type<((DST_T) & ((1 << 4) - 1))>::name FILTERED = (typename Type<((DST_T) & ((1 << 4) - 1))>::name)((mindisp - 1) << 4);
typename Type<((SRC_T) & ((1 << 4) - 1))>::name cap = state.preFilterCap;
typename Type<((SRC_T) & ((1 << 4) - 1))>::name l_tmp[WSIZE];
#pragma HLS array_partition variable=l_tmp complete dim=0
typename Type<((SRC_T) & ((1 << 4) - 1))>::name r_tmp[WSIZE];
#pragma HLS array_partition variable=r_tmp complete dim=0
int text_sum = 0;
int sad[NDISP_UNIT];
#pragma HLS array_partition variable=sad complete dim=0
int sad_cols[NDISP_UNIT][WSIZE];
#pragma HLS array_partition variable=sad_cols complete dim=0
int minsad[COLS+WSIZE-1];
int mind[COLS+WSIZE-1];
int skip[COLS+WSIZE-1];
int skip_val[COLS+WSIZE-1];
int edge_neighbor[COLS+WSIZE-1];
int edge[COLS+WSIZE-1];
int minsad_p[COLS+WSIZE-1];
int minsad_n[COLS+WSIZE-1];
#pragma empty_line
int d = 0;
loop_row:
for (int row = 0; row < rows+WSIZE-1; row++) {
loop_mux:
for (int sweep = 0; sweep < state.sweepFactor; sweep++) {
loop_sad_init:
for (d = 0; d < NDISP_UNIT; d++) {
#pragma HLS unroll
sad[d] = 0;
for (int i = 0; i < WSIZE; i++) {
#pragma HLS unroll
sad_cols[d][i] = 0;
}
}
loop_col:
for (int col = 0; col < cols+WSIZE-1; col++) {
#pragma HLS loop_flatten off
#pragma HLS pipeline II=1
Scalar<1, typename Type<((SRC_T) & ((1 << 4) - 1))>::name> l_in(cap), r_in(cap);
if (sweep == 0) {
#pragma empty_line
l_buff.shift_down(col);
r_buff.shift_down(col);
if (!(row < (WSIZE-1)/2 || row >= rows+(WSIZE-1)/2 || col < (WSIZE-1)/2 || col >= cols+(WSIZE-1)/2)) {
left >> l_in;
right >> r_in;
}
l_buff.insert_bottom(l_in.val[0], col);
r_buff.insert_bottom(r_in.val[0], col);
loop_get_data_from_linebuff:
for (int i = 0; i < WSIZE; i++) {
l_tmp[i] = l_buff.val[i][col];
r_tmp[i] = r_buff.val[i][col];
}
} else {
int offset = sweep * NDISP_UNIT;
loop_get_data_from_linebuff_with_offset:
for (int i = 0; i < WSIZE; i++) {
l_tmp[i] = l_buff.val[i][col];
r_tmp[i] = r_buff.val[i][col-offset < 0 ? 0 : col-offset];
}
}
#pragma empty_line
UpdateTexture<WSIZE, typename Type<((SRC_T) & ((1 << 4) - 1))>::name>(l_window, l_tmp, text_sum, row, col, cap);
#pragma empty_line
l_window.shift_right();
r_window_search.shift_right();
l_window.insert_right(l_tmp);
r_window_search.insert_right(r_tmp);
#pragma empty_line
loop_sad_compute:
for (d = 0; d < NDISP_UNIT; d++) {
sad[d] += SAD_compute_inc<WSIZE, WSIZE, WSIZE+NDISP_UNIT-1, typename Type<((SRC_T) & ((1 << 4) - 1))>::name>(l_window, r_window_search, d, col, sad_cols[d]);
if (sweep == state.sweepFactor-1 && d >= (NDISP_UNIT-state.remainder)) sad[d] = 2147483647;
}
#pragma empty_line
#pragma empty_line
if (row >= WSIZE-1 && col >= WSIZE-1) {
int skip_flag = 0;
Scalar<1, typename Type<((DST_T) & ((1 << 4) - 1))>::name> out_pix;
if (text_sum < state.textureThreshold) skip_flag = 1;
if ((row - WSIZE+1) < (WSIZE-1)/2 || (row - WSIZE+1) >= rows - (WSIZE-1)/2) skip_flag = 1;
if ((col - WSIZE+1) < NDISP-1 + (WSIZE-1)/2 || (col - WSIZE+1) >= cols - (WSIZE-1)/2) skip_flag = 1;
int gminsad = ((sweep > 0) ? minsad[col] : 2147483647);
int gmind = ((sweep > 0) ? mind[col] : 0);
int gskip = ((sweep > 0) ? skip[col] : 0);
int gskip_val = ((sweep > 0) ? skip_val[col] : 2147483647);
int gedge_neighbor = ((sweep > 0) ? edge_neighbor[col] : 2147483647);
int gedge = ((sweep > 0) ? edge[col] : sad[1]);
int lminsad = 2147483647;
int lmind = 0;
int gminsad_p = ((sweep > 0) ? minsad_p[col] : 2147483647);
int gminsad_n = ((sweep > 0) ? (gmind == sweep*NDISP_UNIT-1 ? sad[0] : minsad_n[col]) : 2147483647);
MinSAD<NDISP_UNIT>::find(sad, lmind, lminsad);
#pragma empty_line
if (lminsad <= gminsad) {
gskip = 0;
if (state.uniquenessRatio > 0) {
int thresh = lminsad + (lminsad * state.uniquenessRatio / 100);
if (gminsad <= thresh && lmind+sweep*NDISP_UNIT > gmind+1) {
gskip = 1;
gskip_val = gminsad;
} else if (gminsad <= thresh && lmind+sweep*NDISP_UNIT == gmind+1 && gskip_val <= thresh) {
gskip = 1;
#pragma empty_line
} else if (gminsad <= thresh && lmind+sweep*NDISP_UNIT == gmind+1 && gedge_neighbor <= thresh) {
gskip = 1;
gskip_val = gedge_neighbor;
}
loop_unique_search_0:
for (d = 0; d < NDISP_UNIT; d++) {
if (sad[d] <= thresh && sad[d] < gskip_val && (d < lmind-1 || d > lmind+1)) {
gskip = 1;
gskip_val = sad[d];
}
}
}
#pragma empty_line
gminsad_p = (lmind == 0 ? gedge : sad[lmind-1]);
gminsad_n = sad[lmind == NDISP_UNIT-1 ? lmind-1 : lmind+1];
gminsad = lminsad;
gmind = lmind + sweep*NDISP_UNIT;
} else {
if (state.uniquenessRatio > 0) {
int thresh = gminsad + (gminsad * state.uniquenessRatio / 100);
loop_unique_search_1:
for (d = 0; d < NDISP_UNIT; d++) {
if (sad[d] <= thresh && sad[d] < gskip_val && ((gmind == (sweep*NDISP_UNIT-1)) ? (d > 0) : 1)) {
gskip = 1;
gskip_val = sad[d];
}
}
}
}
minsad[col] = gminsad;
mind[col] = gmind;
skip[col] = gskip;
skip_val[col] = gskip_val;
edge_neighbor[col] = sad[NDISP_UNIT-2];
edge[col] = sad[NDISP_UNIT-1];
minsad_p[col] = gminsad_p;
minsad_n[col] = gminsad_n;
#pragma empty_line
if (sweep == state.sweepFactor-1) {
ap_int<BitWidth<255*WSIZE*WSIZE>::Value> p = gminsad_p;
ap_int<BitWidth<255*WSIZE*WSIZE>::Value> n = gminsad_n;
ap_int<BitWidth<255*WSIZE*WSIZE>::Value> k = p + n - 2*gminsad + absdiff(p, n);
ap_int<BitWidth<255*WSIZE*WSIZE>::Value+8> num = p - n;
num = num << 8;
ap_int<10> delta = 0;
if (k != 0) delta = num/k;
out_pix.val[0] = ((gmind*256 + delta + 15) >> 4);
#pragma empty_line
skip_flag |= gskip;
if (skip_flag) out_pix.val[0] = FILTERED;
disp << out_pix;
}
}
}
}
}
}
#pragma empty_line
#pragma empty_line
template<int WSIZE, int NDISP, int NDISP_UNIT, int ROWS, int COLS, int SRC_T, int DST_T>
void FindStereoCorrespondenceBM(
Mat<ROWS, COLS, SRC_T>& left,
Mat<ROWS, COLS, SRC_T>& right,
Mat<ROWS, COLS, DST_T>& disp,
StereoBMState<WSIZE, NDISP, NDISP_UNIT>& state)
{
((left.rows == right.rows && left.cols == right.cols && "All the images must have the same size") ? (void)0 : _assert("left.rows == right.rows && left.cols == right.cols && \"All the images must have the same size\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 568));
((SRC_T == (((0) & ((1 << 4) - 1)) + (((1)-1) << 4)) && "Both input images must have HLS_8UC1 format") ? (void)0 : _assert("SRC_T == HLS_8UC1 && \"Both input images must have HLS_8UC1 format\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 569));
((DST_T == (((3) & ((1 << 4) - 1)) + (((1)-1) << 4)) && "Disparity image must have HLS_16SC1 format") ? (void)0 : _assert("DST_T == HLS_16SC1 && \"Disparity image must have HLS_16SC1 format\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 570));
((state.preFilterType == 0 || state.preFilterType == 1) ? (void)0 : _assert("state.preFilterType == HLS_STEREO_BM_NORMALIZED_RESPONSE || state.preFilterType == HLS_STEREO_BM_XSOBEL", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 571));
((state.preFilterSize >= 5 && state.preFilterSize <= 21 && (state.preFilterSize & 1) && "preFilterSize must be odd and be within 5..HLS_STEREO_BM_MAX_WIN_SIZE") ? (void)0 : _assert("state.preFilterSize >= 5 && state.preFilterSize <= HLS_STEREO_BM_MAX_WIN_SIZE && (state.preFilterSize & 1) && \"preFilterSize must be odd and be within 5..HLS_STEREO_BM_MAX_WIN_SIZE\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 572));
((state.preFilterCap >=1 && state.preFilterCap <= 63 && "preFilterCap must be within 1..63") ? (void)0 : _assert("state.preFilterCap >=1 && state.preFilterCap <= 63 && \"preFilterCap must be within 1..63\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 573));
((state.SADWindowSize >= 5 && state.SADWindowSize <= 21 && (state.SADWindowSize & 1) && state.SADWindowSize < ((left.rows) < (left.cols) ? (left.rows) : (left.cols)) && "SADWindowSize must be odd, be within 5..HLS_STEREO_BM_MAX_WIN_SIZE and be lesser than image width or height") ? (void)0 : _assert("state.SADWindowSize >= 5 && state.SADWindowSize <= HLS_STEREO_BM_MAX_WIN_SIZE && (state.SADWindowSize & 1) && state.SADWindowSize < __HLS_MIN(left.rows, left.cols) && \"SADWindowSize must be odd, be within 5..HLS_STEREO_BM_MAX_WIN_SIZE and be lesser than image width or height\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 574));
((NDISP > 1 && "numberOfDisparities must be greater than 1") ? (void)0 : _assert("NDISP > 1 && \"numberOfDisparities must be greater than 1\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 575));
((NDISP >= NDISP_UNIT && "numberOfDisparities must be not less than ndisp_unit") ? (void)0 : _assert("NDISP >= NDISP_UNIT && \"numberOfDisparities must be not less than ndisp_unit\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 576));
((state.textureThreshold >= 0 && "texture threshold must be non-negative") ? (void)0 : _assert("state.textureThreshold >= 0 && \"texture threshold must be non-negative\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 577));
((state.uniquenessRatio >= 0 && "uniqueness ratio must be non-negative") ? (void)0 : _assert("state.uniquenessRatio >= 0 && \"uniqueness ratio must be non-negative\"", "F:/Xilinx/Vivado_HLS/2015.4/include/hls/hls_video_stereobm.h", 578));
int rows = left.rows;
int cols = left.cols;
Mat<ROWS, COLS, SRC_T> _left_0(rows, cols);
Mat<ROWS, COLS, SRC_T> _right_0(rows, cols);
#pragma HLS dataflow
if (state.preFilterType == 0) {
PreFilterNorm<WSIZE>(left, _left_0, state.preFilterCap);
PreFilterNorm<WSIZE>(right, _right_0, state.preFilterCap);
} else {
Mat<ROWS, COLS, (((3) & ((1 << 4) - 1)) + (((1)-1) << 4))> left_sobel(rows, cols);
Mat<ROWS, COLS, (((3) & ((1 << 4) - 1)) + (((1)-1) << 4))> right_sobel(rows, cols);
Sobel<1, 0, 3>(left, left_sobel);
Sobel<1, 0, 3>(right, right_sobel);
Clip(left_sobel, _left_0, state.preFilterCap);
Clip(right_sobel, _right_0, state.preFilterCap);
}
SADBlockMatching(_left_0, _right_0, disp, state);
}
#pragma empty_line
}
#pragma line 70 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_video.h" 2
#pragma line 2 "F:/maxi/feature_maxi/feature.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/hls_math.h" 1
#pragma line 3 "F:/maxi/feature_maxi/feature.h" 2
#pragma line 1 "F:/Xilinx/Vivado_HLS/2015.4/include/ap_fixed.h" 1
#pragma line 4 "F:/maxi/feature_maxi/feature.h" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
#pragma empty_line
typedef ap_axiu<8,1,1,1> data_t;
typedef ap_axiu<32,1,1,1> data_l;
typedef hls::stream<ap_axiu<32,1,1,1> > AXI_STREAM;
typedef hls::stream<ap_axiu<8,1,1,1> > AXI_STREAM_OUT;
struct yuv{
uint8_t u;
uint8_t y1;
uint8_t v;
uint8_t y2;
};
#pragma empty_line
void feature(uint32_t * frame_in, uint16_t* bounding,uint16_t* featureh);
void tostruct(uint32_t val, yuv *yuv_struct);
void yuv2rgb(yuv in, uint8_t rgb[6]) ;
#pragma line 2 "F:/maxi/feature_maxi/feature.cpp" 2
#pragma empty_line
#pragma empty_line
#pragma empty_line
void yuv2rgb(yuv in, uint8_t rgb[6]) {
#pragma HLS INLINE
int im[6];
int E = in.v - 128;
int D = in.u - 128;
int C1 = in.y1 - 16;
int C2 = in.y2 - 16;
#pragma empty_line
im[0] = (298 * C1 + 409 * E + 128) >> 8;
im[1] = (298 * C1 - 100 * D - 208 * E + 128) >> 8;
im[2] = (298 * C1 + 516 * D + 128) >> 8;
#pragma empty_line
im[3] = (298 * C2 + 409 * E + 128) >> 8;
im[4] = (298 * C2 - 100 * D - 208 * E + 128) >> 8;
im[5] = (298 * C2 + 516 * D + 128) >> 8;
#pragma empty_line
for (int i = 0; i < 6; i++) {
#pragma HLS UNROLL
if (im[i] > 255)
rgb[i] = 255;
else if (im[i] < 0)
rgb[i] = 0;
else
rgb[i] = (uint8_t) im[i];
}
}
#pragma empty_line
#pragma empty_line
void tostruct(uint32_t val, yuv *yuv_struct) {
yuv_struct->y1 = 255 & val;
yuv_struct->u = 255 & (val >> 8);
yuv_struct->y2 = 255 & (val >> 16);
yuv_struct->v = 255 & (val >> 24);
}
#pragma empty_line
void feature(uint32_t * frame_in, uint16_t* bounding,uint16_t* featureh) {
#pragma HLS INTERFACE m_axi depth=38400 port=frame_in offset=slave
#pragma HLS INTERFACE s_axilite port=return bundle=CRTL_BUS
#pragma HLS INTERFACE m_axi port=featureh offset=slave bundle=CRTL_BUS
#pragma HLS INTERFACE m_axi port=bounding offset=slave bundle=CRTL_BUS
#pragma empty_line
uint16_t boundingBoxes[40];
uint32_t yuv_frame[76800/2];
#pragma HLS ARRAY_PARTITION variable=boundingBoxes complete dim=1
memcpy(boundingBoxes,bounding,sizeof(uint16_t)*40);
uint16_t featureHist[10 * 512];
memcpy(yuv_frame,frame_in,sizeof(uint32_t)*76800/2);
#pragma empty_line
#pragma empty_line
uint8_t rgb[6];
#pragma empty_line
int index1 =0;
int index2 =0;
for (int i = 0; i < 240; i++) {
for (int j = 0; j < 320/2; j++) {
#pragma HLS UNROLL factor=8
#pragma HLS PIPELINE
#pragma empty_line
yuv pix1;
tostruct(frame_in[i*320/2+240],&pix1);
yuv2rgb(pix1,rgb);
#pragma empty_line
#pragma empty_line
for (int h=0;h<10;h++){
#pragma HLS UNROLL
if ((boundingBoxes[h*4+0] <= i) && (boundingBoxes[h*4+1] <= j)
&& (boundingBoxes[h*4+2] >= i)
&& (boundingBoxes[h*4+3] >= j )) {
index1 = h * 512 + 64 * (rgb[2] >> 5) + 8 * (rgb[1] >> 5) + (rgb[0] >> 5);
index2 = h * 512 + 64 * (rgb[5] >> 5) + 8 * (rgb[4] >> 5) + (rgb[3] >> 5);
featureHist[index2] += 1;
featureHist[index1] += 1;
#pragma empty_line
}
}
#pragma empty_line
}
}
memcpy(featureh,featureHist,sizeof(uint16_t)*5120);
}
|
[
"chathura.abeyrathne.lk@gmail.com"
] |
chathura.abeyrathne.lk@gmail.com
|
278635a78ab70600c14865041967952a43d5aff6
|
02a249c0c48ad11f8b5476626e42a7a2af889637
|
/code/data_structure/FHQTreap2.cpp
|
84d27b6d9961d5e34308f5401765fc11a716e780
|
[] |
no_license
|
Kanaricc/MyICPC
|
3a3351fc02d7f36e7438eb1c92a87c9263028c8f
|
73e80b2263ae8e2fe87009743defb59ff36e38ca
|
refs/heads/master
| 2023-07-06T14:38:39.495821
| 2023-07-06T09:18:58
| 2023-07-06T09:18:58
| 186,849,167
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,108
|
cpp
|
//无旋Treap 版本2
struct Treap {
struct Node {
Node *son[2];
int v,add,size;
long long sum;
Node(int v):v(v),add(0),size(1),sum(v) {
son[0]=son[1]=null;
}
Node(void*):v(0),add(0),size(0),sum(0) {
son[0]=son[1]=this;
}
void Add(int d) {
add+=d;
sum+=(long long)d*size;
v+=d;
}
void Up() {
sum=son[0]->sum+v+son[1]->sum;
size=son[0]->size+1+son[1]->size;
}
void Down() {
if(add) {
if(son[0]!=null)
(son[0]=new Node(*son[0]))->Add(add);
if(son[1]!=null)
(son[1]=new Node(*son[1]))->Add(add);
add=0;
}
}
}*root;
static Node *null;
Treap(int a[],int n):root(Build(a,1,n)) {}
static Node *Build(int a[],int L,int R) {
if(L>R)
return null;
else {
int M=(L+R)/2;
Node *pos=new Node(a[M]);
pos->son[0]=Build(a,L,M-1);
pos->son[1]=Build(a,M+1,R);
pos->Up();
return pos;
}
}
static std::pair<Node*,Node*> Split(Node *pos,int k) {
if(k==0)
return std::pair<Node*,Node*>(null,pos);
else if(k==pos->size)
return std::pair<Node*,Node*>(pos,null);
else {
(pos=new Node(*pos))->Down();
std::pair<Node*,Node*> res;
if(k<=pos->son[0]->size) {
res=Split(pos->son[0],k);
pos->son[0]=res.second;
pos->Up();
res.second=pos;
} else {
res=Split(pos->son[1],k-pos->son[0]->size-1);
pos->son[1]=res.first;
pos->Up();
res.first=pos;
}
return res;
}
}
static Node *Merge(Node *p1,Node *p2) {
if(p1==null || p2==null)
return p1==null?p2:p1;
else {
Node *pos;
if(rand()%(p1->size+p2->size)+1<=p1->size) {
(pos=new Node(*p1))->Down();
pos->son[1]=Merge(pos->son[1],p2);
pos->Up();
} else {
(pos=new Node(*p2))->Down();
pos->son[0]=Merge(p1,pos->son[0]);
pos->Up();
}
return pos;
}
}
struct Triple {
Node *L,*M,*R;
};
static Triple Split(Node *root,int l,int r) {
std::pair<Node*,Node*> x=Split(root,r),y=Split(x.first,l-1);
return {y.first,y.second,x.second};
}
static Node *Merge(Triple t) {
return Merge(t.L,Merge(t.M,t.R));
}
};
Treap::Node *Treap::null=new Treap::Node((void*)0);
|
[
"iovo7c@gmail.com"
] |
iovo7c@gmail.com
|
205979a180a9696ed524db1aa9d3c982db7cbceb
|
ab01b7cc84d4bc73b176dade1e94f236d256fcb8
|
/opencv-lib/calib3d/src/levmarq.cpp
|
ffc074e8b190de45e03c7b85d1d4cc66e89b83f6
|
[
"Apache-2.0"
] |
permissive
|
h7ga40/PeachCam
|
097a0cecabe100c92fb61c63d17455ce22fb397f
|
1af2b041a4eb22b962183905ff81a2ee57babc3c
|
refs/heads/master
| 2023-09-05T02:46:02.335574
| 2023-08-07T13:15:22
| 2023-08-07T13:15:22
| 177,606,980
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,133
|
cpp
|
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
#include <stdio.h>
/*
This is translation to C++ of the Matlab's LMSolve package by Miroslav Balda.
Here is the original copyright:
============================================================================
Copyright (c) 2007, Miroslav Balda
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
namespace cv
{
class LMSolverImpl : public LMSolver
{
public:
LMSolverImpl() : maxIters(100) { init(); }
LMSolverImpl(const Ptr<LMSolver::Callback>& _cb, int _maxIters) : cb(_cb), maxIters(_maxIters) { init(); }
void init()
{
epsx = epsf = FLT_EPSILON;
printInterval = 0;
}
int run(InputOutputArray _param0) const
{
Mat param0 = _param0.getMat(), x, xd, r, rd, J, A, Ap, v, temp_d, d;
int ptype = param0.type();
CV_Assert( (param0.cols == 1 || param0.rows == 1) && (ptype == CV_32F || ptype == CV_64F));
CV_Assert( cb );
int lx = param0.rows + param0.cols - 1;
param0.convertTo(x, CV_64F);
if( x.cols != 1 )
transpose(x, x);
if( !cb->compute(x, r, J) )
return -1;
double S = norm(r, NORM_L2SQR);
int nfJ = 2;
mulTransposed(J, A, true);
gemm(J, r, 1, noArray(), 0, v, GEMM_1_T);
Mat D = A.diag().clone();
const double Rlo = 0.25, Rhi = 0.75;
double lambda = 1, lc = 0.75;
int i, iter = 0;
if( printInterval != 0 )
{
printf("************************************************************************************\n");
printf("\titr\tnfJ\t\tSUM(r^2)\t\tx\t\tdx\t\tl\t\tlc\n");
printf("************************************************************************************\n");
}
for( ;; )
{
CV_Assert( A.type() == CV_64F && A.rows == lx );
A.copyTo(Ap);
for( i = 0; i < lx; i++ )
Ap.at<double>(i, i) += lambda*D.at<double>(i);
solve(Ap, v, d, DECOMP_EIG);
subtract(x, d, xd);
if( !cb->compute(xd, rd, noArray()) )
return -1;
nfJ++;
double Sd = norm(rd, NORM_L2SQR);
gemm(A, d, -1, v, 2, temp_d);
double dS = d.dot(temp_d);
double R = (S - Sd)/(fabs(dS) > DBL_EPSILON ? dS : 1);
if( R > Rhi )
{
lambda *= 0.5;
if( lambda < lc )
lambda = 0;
}
else if( R < Rlo )
{
// find new nu if R too low
double t = d.dot(v);
double nu = (Sd - S)/(fabs(t) > DBL_EPSILON ? t : 1) + 2;
nu = std::min(std::max(nu, 2.), 10.);
if( lambda == 0 )
{
invert(A, Ap, DECOMP_EIG);
double maxval = DBL_EPSILON;
for( i = 0; i < lx; i++ )
maxval = std::max(maxval, std::abs(Ap.at<double>(i,i)));
lambda = lc = 1./maxval;
nu *= 0.5;
}
lambda *= nu;
}
if( Sd < S )
{
nfJ++;
S = Sd;
std::swap(x, xd);
if( !cb->compute(x, r, J) )
return -1;
mulTransposed(J, A, true);
gemm(J, r, 1, noArray(), 0, v, GEMM_1_T);
}
iter++;
bool proceed = iter < maxIters && norm(d, NORM_INF) >= epsx && norm(r, NORM_INF) >= epsf;
if( printInterval != 0 && (iter % printInterval == 0 || iter == 1 || !proceed) )
{
printf("%c%10d %10d %15.4e %16.4e %17.4e %16.4e %17.4e\n",
(proceed ? ' ' : '*'), iter, nfJ, S, x.at<double>(0), d.at<double>(0), lambda, lc);
}
if(!proceed)
break;
}
if( param0.size != x.size )
transpose(x, x);
x.convertTo(param0, ptype);
if( iter == maxIters )
iter = -iter;
return iter;
}
void setCallback(const Ptr<LMSolver::Callback>& _cb) { cb = _cb; }
Ptr<LMSolver::Callback> cb;
double epsx;
double epsf;
int maxIters;
int printInterval;
};
Ptr<LMSolver> createLMSolver(const Ptr<LMSolver::Callback>& cb, int maxIters)
{
return makePtr<LMSolverImpl>(cb, maxIters);
}
}
|
[
"hi6aki_7ga40@hotmail.com"
] |
hi6aki_7ga40@hotmail.com
|
c9a606b54660ade395f1cb794d80854dfc4206c7
|
90cd1f7f6ddc33b1bf2d0a6a1ac6fe4be760ead5
|
/include/boost/simd/arch/common/generic/function/negatenz.hpp
|
712678fbab10fbd79de0f79016359338657cf0db
|
[
"BSL-1.0"
] |
permissive
|
williammc/boost.simd
|
511f03857ee66178179daba6295533e316d61a94
|
b4310d441c7122f974498042ad604d559280431a
|
refs/heads/master
| 2021-01-17T23:56:44.708853
| 2016-08-16T07:14:57
| 2016-08-16T07:14:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,150
|
hpp
|
//==================================================================================================
/*!
@file
@copyright 2015 NumScale SAS
@copyright 2015 J.T. Lapreste
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//==================================================================================================
#ifndef BOOST_SIMD_ARCH_COMMON_GENERIC_FUNCTION_NEGATENZ_HPP_INCLUDED
#define BOOST_SIMD_ARCH_COMMON_GENERIC_FUNCTION_NEGATENZ_HPP_INCLUDED
#include <boost/simd/function/bitofsign.hpp>
#include <boost/simd/function/bitwise_xor.hpp>
#include <boost/simd/function/multiplies.hpp>
#include <boost/simd/function/signnz.hpp>
#include <boost/simd/detail/dispatch/function/overload.hpp>
#include <boost/config.hpp>
namespace boost { namespace simd { namespace ext
{
namespace bd = boost::dispatch;
BOOST_DISPATCH_OVERLOAD ( negatenz_
, (typename A0)
, bd::cpu_
, bd::generic_<bd::signed_<A0> >
, bd::generic_<bd::signed_<A0> >
)
{
BOOST_FORCEINLINE A0 operator() ( A0 const& a0, A0 const& a1) const BOOST_NOEXCEPT
{
return multiplies(a0, signnz(a1));
}
};
BOOST_DISPATCH_OVERLOAD ( negatenz_
, (typename A0)
, bd::cpu_
, bd::generic_<bd::unsigned_<A0> >
, bd::generic_<bd::unsigned_<A0> >
)
{
BOOST_FORCEINLINE A0 operator() ( A0 const& a0, A0) const BOOST_NOEXCEPT
{
return a0;
}
};
BOOST_DISPATCH_OVERLOAD ( negatenz_
, (typename A0)
, bd::cpu_
, bd::generic_<bd::floating_<A0> >
, bd::generic_<bd::floating_<A0> >
)
{
BOOST_FORCEINLINE A0 operator() ( A0 const& a0, A0 const& a1) const BOOST_NOEXCEPT
{
return bitwise_xor(bitofsign(a1), a0);
}
};
} } }
#endif
|
[
"charly.chevalier@numscale.com"
] |
charly.chevalier@numscale.com
|
a25be4402063fa1d450d0af86062893943ba2667
|
9402c9f35b6d895c3b6f7ddcfc87241e6b9145d8
|
/Codechef/iitk2/p01.cpp
|
a6c3f6c7ca7f73c92567a253391d751004a563a5
|
[] |
no_license
|
siddharth94/competitive
|
586d42679558dcd1dcca3457c2ca7be089cbda30
|
ecda01521a7a9908225771d9374d5c18fa646515
|
refs/heads/master
| 2021-07-06T05:27:13.395384
| 2017-09-29T10:16:20
| 2017-09-29T10:16:20
| 105,229,373
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,826
|
cpp
|
#include <bits/stdc++.h>
using namespace std;
#define R(i,a,b) for(int i=a;i<b;i++)
#define RE(i,a,b) for(int i=a;i<=b;i++)
#define RR(i,a,b) for(int i=a;i>b;i--)
#define RRE(i,a,b) for(int i=a;i>=b;i--)
#define F(i,n) for(int i=0;i<n;i++)
#define FE(i,n) for(int i=0;i<=n;i++)
#define FR(i,n) for(int i=n;i>0;i--)
#define FRE(i,n) for(int i=n;i>=0;i--)
#define mp(a,b) make_pair(a,b)
#define pii pair <int, int>
#define pb push_back
#define ft first
#define sd second
#define LL long long
#define gc getchar_unlocked
#define pc putchar_unlocked
inline void get(int &x)
{
register int c = gc();
x = 0;
int neg = 0;
for(;((c<48 || c>57) && c != '-');c = gc());
if(c=='-') {neg=1;c=gc();}
for(;c>47 && c<58;c = gc()) {x = (x<<1) + (x<<3) + c - 48;}
if(neg) x=-x;
}
inline void getll(LL &x)
{
register int c = gc();
x = 0;
int neg = 0;
for(;((c<48 || c>57) && c != '-');c = gc());
if(c=='-') {neg=1;c=gc();}
for(;c>47 && c<58;c = gc()) {x = (x<<1) + (x<<3) + c - 48;}
if(neg) x=-x;
}
LL power (LL b, LL p)
{
if (p==1)
return b;
else if (p==0)
return 1;
LL p1 = p,ans=1;
if (p%2 == 0)
{
ans = power(b,p/2);
ans = (ans * ans);
}
else if (p%2 == 1)
{
ans = power (b,p/2);
ans = (((ans * ans) ) *b);
}
return ans;
}
LL loga(LL k, LL b)
{
if (k==1 || b==)1
return 0;
else if (k < b)
return 0;
else
{
LL tmp = 1;
while (k >= pow(b,tmp))
tmp++;
tmp--;
return tmp;
}
}
int main()
{
int T;
get(T);
for (int __rep = 1; __rep <=T; __rep++)
{
LL n,k;
LL coins = 0;
getll(n);
getll(k);
// F(i,99)
// a[i] = k;
while (n>0)
{
LL l = (LL)(loga(n,k));
// cout << l << endl;
LL po = (LL)pow(k,l);
LL q = n/po;
// assert(q<=k);
coins += q;
n -= q*po;
}
printf("%lld\n",coins);
}
return 0;
}
|
[
"siddharthgg52@gmail.com"
] |
siddharthgg52@gmail.com
|
68e32aa1ef6e4b1d1686273150d4746f4b282d1a
|
2588ad590b4df910fa5477ee84101b56dba69144
|
/Tree/Tree/Same_Parents.hpp
|
e617f2c9525448f2fc58ecdf283e8eba932091f2
|
[] |
no_license
|
Mr-Jason-Sam/Algorithms
|
e6829cf55addb7a01c425f8f8c732dce1082901c
|
6f015cc63407cda1aae310aefd3b705fcc00a361
|
refs/heads/master
| 2021-01-19T10:53:22.400040
| 2019-05-23T17:06:42
| 2019-05-23T17:06:42
| 87,910,106
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 716
|
hpp
|
//
// Same_Parents.hpp
// Tree
//
// Created by Jason_Sam on 2017/4/5.
// Copyright © 2017年 Jason_Sam. All rights reserved.
//
#ifndef Same_Parents_hpp
#define Same_Parents_hpp
#include <stdio.h>
#include <iostream>
#include <vector>
#include "Bitree_Operation.hpp"
using namespace std;
//typedef struct BiTreeNode_ {
// char data;
// struct BiTreeNode_ *lchild;
// struct BiTreeNode_ *rchild;
//}BiTreeNode;
//
//typedef struct BiTree_{
// int size;
// void (*destroy)(void *data);
// BiTreeNode *root;
//}BiTree;
bool get_path(BiTNode *root, vector<BiTNode*> &path, BiTNode *node);
BiTNode *find_com_parent(BiTNode* root, BiTNode *a, BiTNode *b);
#endif /* Same_Parents_hpp */
|
[
"Mr.Jason_Sam@iCloud.com"
] |
Mr.Jason_Sam@iCloud.com
|
0952f2c5ffd6afedde03612c5f347bbfa3c52b8c
|
842a59c4bd78d259c8c7130ee216f6891f3307b1
|
/datawriter.cpp
|
489185dbc232f2c176e887bd19749a461fc1751a
|
[] |
no_license
|
zhangzhuo520/QtSerail
|
6cd07270f487e0d9a20ddd8d1e69ac6c9058aa03
|
8feacbecc629dfaf9bdbce0d8c3671803f43a532
|
refs/heads/master
| 2020-08-08T08:14:57.584655
| 2019-10-12T10:25:33
| 2019-10-12T10:25:33
| 213,789,583
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 302
|
cpp
|
#include "datawriter.h"
#include <QSettings>
#include <QDir>
DataWriter::DataWriter()
{
m_config_writer = new QSettings(QDir::currentPath() + "/config.data", QSettings::IniFormat);
}
void DataWriter::write(const QString & key, const QString & value)
{
m_config_writer->setValue(key, value);
}
|
[
"zhuo.zhang@dfjy-jx.com"
] |
zhuo.zhang@dfjy-jx.com
|
84669ca4d43877518d198f0ce08b25b82a22ccc0
|
7ba6bbfa2f27f2ff2b4af8c4ee4e08df29f95403
|
/PLEXSYS Homework/ioControl.h
|
80537deea871b9e3e859afffa375b4d495375c1f
|
[] |
no_license
|
Gabrielsonnn/Plexsys
|
e7f8310a95dc5ed1427e3ad68f722ff52ab3c8cf
|
95fb70670a8e81f79e6dd8ec48a6e397c965c38c
|
refs/heads/master
| 2022-12-25T11:05:31.399946
| 2020-10-08T19:46:38
| 2020-10-08T19:46:38
| 301,880,436
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,415
|
h
|
//Developer: Gabriel Johnson
#ifndef IOCONTROL_H
#define IOCONTROL_H
#include<string>
using namespace std;
class ioControl {//A class for handling output and input from a command line
public:
//constructor
ioControl();
//destructor
~ioControl();
void Output(string out, string extra = "");//outputs a string and any extra string data provided
void newLine(int in = 1);//creates x amount of new lines
void Pause();//pauses a program
//outputs a prompt and inputs a variable into various variable types
void Input(int *in, string lineOut = "");//into int
void Input(double *in, string lineOut = "");//into double
void Input(char *in, string lineOut = "");//into char
void Inputstr(string *in, string lineOut = "");//into string
//outputs a question and checks the string input against 3 options
void InputCheck(string *input, string question, string chk1 = "", string chk2 = "", string chk3 = "", string errorMessage = "\nError: please enter correct value\n\n");
//outputs a question and checks the integer input is within a range
void InputCheck(int *input, string question, int greaterThan = -999, int lessThan = -999, string errorMessage = "\nError: please enter correct value\n\n");
//prints an error message, and where the error was located in the specifed string
void printError(string error, int charLocation, string mathInput);
};
#include "ioControl.cpp"
#endif // !IOCONTROL_H
|
[
"grjbrown1@gmail.com"
] |
grjbrown1@gmail.com
|
af12847112efa1d962d866d26465afa9f6aed859
|
37cc3ea1dce0b0f9d903065c6e6c8cadab576ac6
|
/chapter9/9_38.cpp
|
c3c9ac8e2b78f3f2bcd6742356a4207cfc8739c3
|
[] |
no_license
|
jsntxzx/cpp_primer5
|
6f60d2caa016ea54e325961c08a95d232f7f73b1
|
7a949def40deee900bf8ebf51218888975104353
|
refs/heads/master
| 2021-01-23T12:17:35.260478
| 2015-03-24T06:53:36
| 2015-03-24T06:53:36
| 28,374,777
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 587
|
cpp
|
#include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<int > v;
cout << "size of vector is " << v.size() <<endl;
cout << "capacity of vector is " << v.capacity() <<endl;
for(int i = 0 ; i < 50 ; i++ )
v.push_back(i);
cout << "now size is " << v.size() << endl;
cout << "now capacity is " << v.capacity() << endl;
for(int j = 0 ; j < 10 ; j++)
{
while(v.size() < v.capacity())
v.push_back(0);
if(v.size() == v.capacity())
v.push_back(1);
cout << "size = " << v.size() <<endl;
cout << "capacity = " << v.capacity() << endl;
}
return 0;
}
|
[
"jsntxzx@sina.com"
] |
jsntxzx@sina.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.