blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1db051900033969a82565a71464101fb05091f7a
|
a51ddaafaf68ab8a7b92ed1642c325d7bf419bce
|
/2019Robot/2019Robot/src/Util.cpp
|
0262cd10100d9213a637a42131543b0a329f074e
|
[] |
no_license
|
1828Boxerbots/Unsorted-Code
|
1c6212399e46ee2c4b3bd6b327d4969edf05fb74
|
e3eeb19b66dfecf9d7b0110b99767d42aaf8e630
|
refs/heads/master
| 2023-01-21T17:36:53.153355
| 2023-01-10T01:58:48
| 2023-01-10T01:58:48
| 232,706,831
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,080
|
cpp
|
Util.cpp
|
#include "src/Util.h"
double Utility::ToggleSwitch(bool thirdToggle)
{
Utility::timer.Reset();
Utility::motorEncoder.SetDistancePerPulse(1.0 / 360 * 2.0 * Utility::pi * 29);
//double distance = Utility::motorEncoder.GetDistance();
//Control for Default Position; 90 degrees
while(Utility::controller.GetAButtonPressed() == true && thirdToggle == true)
{
Utility::timer.Start();
if(Utility::timer.Get() >= 10)
{
Utility::angle = 90;
Utility::var = 2;
}
}
//Control for Postion 2; 0 degrees
if(Utility::controller.GetAButtonPressed() == true && Utility::var == 2 && Utility::angle == 0)
{
Utility::angle = 0;
Utility::var = 1;
}
//Controlfor Postion 1; 45 degrees
if(Utility::controller.GetAButtonPressed() == true && Utility::var == 1 && Utility::angle == 0)
{
Utility::angle = 45;
Utility::var = 2;
}
//Converts the degrees to radians
double degrees = Utility::angle * (Utility::pi / 180);
return degrees;
}
|
32bcada288da7df845ffc6083f7298ff74f56d07
|
33543e5645e38ec6545c64f788331b34bd678e3f
|
/day8.cpp
|
002fa083f3f28adacde08508ad47c48d72485e88
|
[] |
no_license
|
BornaMajstorovic/Advent-of-code-2019
|
c92b77f397a1d2dd05a32d2ebafa8af4623f0e01
|
782b900d54bda36fc2ab459919f006781f574b2d
|
refs/heads/master
| 2020-09-23T09:02:38.779102
| 2019-12-20T19:39:16
| 2019-12-20T19:39:16
| 225,460,422
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,669
|
cpp
|
day8.cpp
|
//
// main.cpp
// day8
//
// Created by Borna on 08/12/2019.
// Copyright © 2019 Borna. All rights reserved.
//
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
int main(int argc, const char * argv[]) {
int width = 25;
int height = 6;
int img[height][width];
int rez = 0;
int min_0 = numeric_limits<int>::max();
char input[25000];
string line;
ifstream myfile;
myfile.open("day8.txt");
myfile >> input;
int i = 0;
while (i < strlen(input)) {
int digits[3] = {0};
for (int j = 0; j < width*height; j++) {
++digits[input[i+j] - '0'];
}
if (digits[0] < min_0) {
min_0 = digits[0];
rez = digits[1] * digits[2];
}
i += width * height;
}
cout << rez << endl; //first done
// 0 black 1 white 2 transperent
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
img[i][j] = 2;
}
}
int layer = 0;
while (layer < strlen(input)) {
for (int i = 0; i < height;i++) {
for (int j = 0; j < width; j++) {
if (img[i][j] == 2) {
img[i][j] = input[layer + i * width + j] - '0';
}
}
}
layer += width * height;
}
for (int i = 0; i < height; ++ i) {
for (int j = 0; j < width; ++ j) {
if (img[i][j])
cout << "1";
else
cout << ".";
}
cout << "\n";
}
return 0;
}
|
088ddfa647eada6b45830d9a4767dc5b84b0a97a
|
55816233b7aab55dc51f304ae09b0e00122c6e35
|
/MathStuff/Vector3f.h
|
8d3c8c56ec777a3aa6f40d20ab1cced2ad0c3a38
|
[] |
no_license
|
Compiler/LengineMath
|
c613b4d02ce86d6bba731ce290b47193eb475524
|
32d8edbe52ba73e7d17a831f51e093ba09246684
|
refs/heads/master
| 2021-01-11T03:13:48.942354
| 2016-11-04T07:44:24
| 2016-11-04T07:44:24
| 71,079,491
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 479
|
h
|
Vector3f.h
|
#pragma once
#include "iostream"
#include "math.h"
class Vector3f{
public:
Vector3f();
Vector3f(float xd, float yd, float zd);
float dot(Vector3f me, Vector3f you){
return (me.x * you.x) + (me.y * you.y) + (me.z * you.z);
}
float angleBetween(Vector3f vec);
float magnitude();
Vector3f getProjectionOnto(Vector3f vec);
Vector3f getNormalized();
void normalize();
void projectOnto(Vector3f vec);
//x and y components
float x, y, z;
~Vector3f();
};
|
b8dd7fc4cb79d65cb7a66a93e036b31aee0a4657
|
9a4586940dbb69863394d001c5e3bea3cd8f0c7a
|
/source/plugins/coreplugin/statusbarwidget.cpp
|
fd9e6fdefa4a43c52bcf87122ce8c47e98a30d10
|
[] |
no_license
|
519984307/moonlight-test
|
3db67d0ed70f68fd249e206a45823e972fe147dc
|
97b9ec762596e68fb65aee5a6d6fda021af6acd5
|
refs/heads/main
| 2023-05-29T06:53:10.132156
| 2021-05-14T12:02:12
| 2021-05-14T12:02:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,701
|
cpp
|
statusbarwidget.cpp
|
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "statusbarwidget.h"
using namespace Core;
StatusBarWidget::StatusBarWidget(QObject *parent)
: IContext(parent), m_defaultPosition(StatusBarWidget::First)
{
}
StatusBarWidget::~StatusBarWidget()
{
delete m_widget;
}
StatusBarWidget::StatusBarPosition StatusBarWidget::position() const
{
return m_defaultPosition;
}
void StatusBarWidget::setPosition(StatusBarWidget::StatusBarPosition position)
{
m_defaultPosition = position;
}
|
73e1c70fcd691047b88e1f068ef4f09936e862dc
|
78a90e91db6bc78331f0196951ece6d32028c853
|
/include/sgeroids/replay/object.hpp
|
ebe576611361ef94d456db62811eb8a766ea13df
|
[] |
no_license
|
pmiddend/sgeroids
|
16c0dd29a3a3b40e305b86e244611be7f93ff8f2
|
804a07b7e72141a54dedf851f4f197c7bd558c77
|
refs/heads/master
| 2020-05-22T02:52:33.372830
| 2017-07-02T11:06:55
| 2017-07-02T11:06:55
| 3,035,267
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 879
|
hpp
|
object.hpp
|
#ifndef SGEROIDS_REPLAY_OBJECT_HPP_INCLUDED
#define SGEROIDS_REPLAY_OBJECT_HPP_INCLUDED
#include <sgeroids/model/base_fwd.hpp>
#include <sgeroids/replay/call_object.hpp>
#include <sgeroids/replay/dispatcher.hpp>
#include <alda/call/object.hpp>
#include <fcppt/noncopyable.hpp>
#include <fcppt/strong_typedef.hpp>
#include <fcppt/config/external_begin.hpp>
#include <iosfwd>
#include <fcppt/config/external_end.hpp>
namespace sgeroids
{
namespace replay
{
class object
{
FCPPT_NONCOPYABLE(
object);
public:
object(
sgeroids::model::base &,
std::istream &);
void
update();
bool
done() const;
~object();
private:
FCPPT_MAKE_STRONG_TYPEDEF(
bool,
was_update_message);
std::istream &input_stream_;
sgeroids::replay::call_object call_object_;
sgeroids::replay::dispatcher dispatcher_;
was_update_message const
deserialize_single_message();
};
}
}
#endif
|
3eeaeab3ebcebceba9dd8cc1ca4c4dd29474d059
|
a3d6556180e74af7b555f8d47d3fea55b94bcbda
|
/third_party/blink/renderer/modules/csspaint/nativepaint/box_shadow_paint_definition.h
|
d9088ed24700f8005ccef8e5446ab5268ae9bf8f
|
[
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] |
permissive
|
chromium/chromium
|
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
|
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
|
refs/heads/main
| 2023-08-24T00:35:12.585945
| 2023-08-23T22:01:11
| 2023-08-23T22:01:11
| 120,360,765
| 17,408
| 7,102
|
BSD-3-Clause
| 2023-09-10T23:44:27
| 2018-02-05T20:55:32
| null |
UTF-8
|
C++
| false
| false
| 1,772
|
h
|
box_shadow_paint_definition.h
|
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_CSSPAINT_NATIVEPAINT_BOX_SHADOW_PAINT_DEFINITION_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_CSSPAINT_NATIVEPAINT_BOX_SHADOW_PAINT_DEFINITION_H_
#include "third_party/blink/renderer/core/animation/animation.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/graphics/image.h"
namespace blink {
class LocalFrame;
class MODULES_EXPORT BoxShadowPaintDefinition final
: public GarbageCollected<BoxShadowPaintDefinition>,
public NativeCssPaintDefinition {
public:
static BoxShadowPaintDefinition* Create(LocalFrame& local_root);
explicit BoxShadowPaintDefinition(LocalFrame& local_root);
~BoxShadowPaintDefinition() final = default;
BoxShadowPaintDefinition(const BoxShadowPaintDefinition&) = delete;
BoxShadowPaintDefinition& operator=(const BoxShadowPaintDefinition&) = delete;
static Animation* GetAnimationIfCompositable(const Element* element);
// PaintDefinition override
PaintRecord Paint(
const CompositorPaintWorkletInput*,
const CompositorPaintWorkletJob::AnimatedPropertyValues&) override;
scoped_refptr<Image> Paint();
void Trace(Visitor* visitor) const override;
private:
friend class BoxShadowPaintDefinitionTest;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_CSSPAINT_NATIVEPAINT_BOX_SHADOW_PAINT_DEFINITION_H_
|
5c965cd7a2edf3aea4d567794718c1efe36acb68
|
6584a3675663415fe0ed62c604e5fd383ac46e09
|
/Contest/CF 688/4.cpp
|
550aa774cae7a1a75dd8c14ee4e8c7d39c1d2eb3
|
[] |
no_license
|
lsiddiqsunny/Days-with-programming
|
753e1569a5a389fa05f39742d691707496557f1b
|
b9d8ce24065d775a8ce2be981d177b69dc4fede5
|
refs/heads/master
| 2021-06-25T02:49:50.931406
| 2021-01-23T12:14:23
| 2021-01-23T12:14:23
| 184,076,547
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,609
|
cpp
|
4.cpp
|
#include <bits/stdc++.h>
using namespace std;
#define mx 100005
int vis[mx];
int dis[mx];
vector<int> g[mx];
void dfs(int s)
{
vis[s] = 1;
for (auto u : g[s])
{
if (vis[u] == 0)
{
dis[u] = 1 + dis[s];
dfs(u);
}
}
}
int main()
{
int t;
cin >> t;
while (t--)
{
int n, a, b, da, db;
cin >> n >> a >> b >> da >> db;
for (int i = 0; i <= n; i++)
{
vis[i] = 0;
dis[i] = 0;
g[i].clear();
}
for (int i = 1; i < n; i++)
{
int x, y;
cin >> x >> y;
g[x].push_back(y);
g[y].push_back(x);
}
dfs(a);
if (dis[b] <= da)
{
cout << "Alice\n";
continue;
}
int maxi = 0, max_node = a;
for (int i = 1; i <= n; i++)
{
if (maxi <= dis[i])
{
maxi = dis[i];
max_node = i;
}
}
for (int i = 0; i <= n; i++)
{
vis[i] = 0;
dis[i] = 0;
}
dfs(max_node);
maxi = 0;
for (int i = 1; i <= n; i++)
{
if (maxi <= dis[i])
{
maxi = dis[i];
}
}
int dia = maxi;
// cout<<"Diameter: " <<dia<<endl;
if (2 * da >= min(dia,db))
{
cout << "Alice\n";
continue;
}
if (db > 2 * da)
{
cout << "Bob\n";
continue;
}
}
}
|
2170f5ff2d8de8729b7b815d4be4510b1b72eba2
|
1044f52e7fd27d66623182f44fa2c24caf5b039b
|
/src/redis_notification.cpp
|
b71e238738bde6af05d89a2ae5e5bd01cebd4ccf
|
[] |
no_license
|
anuragkh/storage-bench
|
f87a144524d1d2c326355b2f8ba7c9eb150afbbb
|
95b6fbf7a9b0ad912a051f14cfde57f148403583
|
refs/heads/master
| 2020-03-24T22:21:41.293125
| 2020-01-08T23:38:51
| 2020-01-08T23:38:51
| 143,081,038
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,629
|
cpp
|
redis_notification.cpp
|
#include <sstream>
#include "redis_notification.h"
#include "benchmark_utils.h"
void redis_notification::init(const property_map &conf, bool, size_t num_listeners) {
std::string endpoint = conf.get<std::string>("endpoint", "127.0.0.1:6379");
m_num_listeners = num_listeners;
std::cerr << "num listeners = " << m_num_listeners << std::endl;
m_notification_ts.resize(m_num_listeners);
m_sub.resize(m_num_listeners);
m_sub_msgs = new std::atomic<size_t>[m_num_listeners]();
m_pub = std::make_shared<cpp_redis::client>();
for (size_t i = 0; i < m_num_listeners; ++i) {
m_sub[i] = std::make_shared<cpp_redis::subscriber>();
}
std::vector<std::string> endpoint_parts;
benchmark_utils::split(endpoint, endpoint_parts, ':');
m_host = endpoint_parts.front();
m_port = std::stoull(endpoint_parts.back());
m_pub->connect(m_host, m_port, [](const std::string &host, size_t port, cpp_redis::client::connect_state s) {
if (s == cpp_redis::client::connect_state::dropped
|| s == cpp_redis::client::connect_state::failed
|| s == cpp_redis::client::connect_state::lookup_failed) {
std::cerr << "Redis client disconnected from " << host << ":" << port << std::endl;
exit(-1);
}
});
}
void redis_notification::subscribe(const std::string &channel) {
auto id = m_sub_count++;
m_sub[id]->connect(m_host, m_port, [](const std::string &host, size_t port, cpp_redis::subscriber::connect_state s) {
if (s == cpp_redis::subscriber::connect_state::dropped
|| s == cpp_redis::subscriber::connect_state::failed
|| s == cpp_redis::subscriber::connect_state::lookup_failed) {
std::cerr << "Redis client disconnected from " << host << ":" << port << std::endl;
exit(-1);
}
});
m_sub[id]->subscribe(channel, [id, this](const std::string &, const std::string &) {
m_notification_ts[id].push_back(benchmark_utils::now_us());
++m_sub_msgs[id];
}).commit();
}
void redis_notification::publish(const std::string &channel, const std::string &msg) {
m_publish_ts.push_back(benchmark_utils::now_us());
auto fut = m_pub->publish(channel, msg);
m_pub->commit();
auto reply = fut.get();
if (reply.is_error()) {
throw std::runtime_error("Publish failed: " + reply.error());
}
}
void redis_notification::destroy() {
m_pub->disconnect(true);
for (auto &sub: m_sub) {
sub->disconnect(true);
}
}
void redis_notification::wait(size_t i) {
while (m_sub_msgs[i].load() != m_publish_ts.size()) {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
}
REGISTER_NOTIFICATION_IFACE("redis", redis_notification);
|
eff8e08d5bc96240600e5e3882ee21b223cb36bd
|
b1b281d17572e71b7e1d4401a3ec6b780f46b43e
|
/BOJ/2252/2252.cpp
|
ff46e602d39bbd52bc3f1491c0a80c0b6a25ad61
|
[] |
no_license
|
sleepyjun/PS
|
dff771429a506d7ce90d89a3f7e4e184c51affed
|
70e77616205c352cc4a23b48fa2d7fde3d5786de
|
refs/heads/master
| 2022-12-21T23:25:38.854489
| 2022-12-12T07:55:26
| 2022-12-12T07:55:26
| 208,694,798
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 842
|
cpp
|
2252.cpp
|
// https://www.acmicpc.net/problem/2252
#include <iostream>
#include <algorithm>
#include <limits>
#include <vector>
#include <string>
#include <queue>
using std::cin; using std::cout;
using ull = unsigned long long;
using pii = std::pair<int, int>;
const int INF = std::numeric_limits<int>::max();
std::vector<int> next[32001];
int prev[32001];
int main()
{
std::ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int n,m; cin >> n >> m;
for(int i = 0; i < m; ++i)
{
int a,b; cin >> a >> b;
prev[b]++;
next[a].push_back(b);
}
std::queue<int> q;
for(int i = 1; i <= n; ++i)
if(prev[i] == 0) q.push(i);
while(!q.empty())
{
int curr = q.front(); q.pop();
for(int n : next[curr])
{
prev[n]--;
if(prev[n] == 0) q.push(n);
}
cout << curr << ' ';
}
cout << '\n';
}//g++ -o a -std=c++11 *.cpp
|
5041bb1b580256833918bcf749ff18b38d9e70c1
|
4962307050d356c50857160c9c93003307873587
|
/components/susi-core/sources/SusiServer.cpp
|
8bc1a10953ff9f1c772ccdfb6884f0853b666f43
|
[
"MIT"
] |
permissive
|
webvariants/susi
|
e6fc16989c23e554f49daa9b551d42802a4e1d66
|
9cf69b13379293b3af6b2dcde5bdf3241d2059bc
|
refs/heads/master
| 2020-05-30T07:15:50.094107
| 2016-08-26T06:42:27
| 2016-08-26T06:42:27
| 22,345,682
| 16
| 9
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,113
|
cpp
|
SusiServer.cpp
|
#include "susi/SusiServer.h"
Susi::SusiServer::SusiServer(short port, std::string keyFile, std::string certificateFile) :
Susi::FramingServer<LineFramer, Susi::SSLTCPServer> {port, keyFile, certificateFile} {}
Susi::SusiServer::~SusiServer() {}
void Susi::SusiServer::onConnect(int id) {
std::cout << "got new client " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
Susi::FramingServer<LineFramer, Susi::SSLTCPServer>::onConnect(id);
BSON::Value sessionNewEvent = BSON::Object{
{"topic", "core::session::new"},
{"payload", id}
};
publish(sessionNewEvent, 0);
}
void Susi::SusiServer::onClose(int id) {
std::cout << "lost client " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
Susi::FramingServer<LineFramer, Susi::SSLTCPServer>::onClose(id);
//remove all publish processes associated with this client
for (auto it = publishProcesses.cbegin(); it != publishProcesses.cend();) {
if (it->second->publisher == id) {
publishProcesses.erase(it++);
} else {
++it;
}
}
//remove all associated consumers
for (auto & kv : consumers) {
kv.second.erase(std::remove_if(kv.second.begin(), kv.second.end(),
[id](int currentId) { return currentId == id; }), kv.second.end());
}
//remove all associated processors
for (auto & kv : processors) {
kv.second.erase(std::remove_if(kv.second.begin(), kv.second.end(),
[id](int currentId) { return currentId == id; }), kv.second.end());
}
//cleanup publishProcesses
std::vector<std::shared_ptr<PublishProcess>> orphanedProcesses;
for (auto & kv : publishProcesses) {
auto process = kv.second;
std::cout << "process: " << process << std::endl;
// check if there are pending processorEvents for this client
if (process->nextProcessor - 1 < process->processors.size() && process->processors[process->nextProcessor - 1] == id) {
orphanedProcesses.push_back(process);
}
//remove all id occurences from the process
for (size_t i = process->nextProcessor; i < process->processors.size(); i++) {
if (process->processors[i] == id) {
process->processors.erase(process->processors.begin() + i);
break;
}
}
for (size_t i = 0; i < process->consumers.size(); i++) {
if (process->consumers[i] == id) {
process->consumers.erase(process->consumers.begin() + i);
break;
}
}
}
for (auto & p : orphanedProcesses) {
ack(p->lastState, 0);
}
BSON::Value sessionLostEvent = BSON::Object{
{"topic", "core::session::lost"},
{"payload", id}
};
publish(sessionLostEvent, 0);
}
void Susi::SusiServer::onFrame(int id, std::string & frame) {
auto doc = BSON::Value::fromJSON(frame);
if (!validateFrame(doc)) {
BSON::Value res = BSON::Object{
{"type", "error"},
{
"data", BSON::Object{
{"reason", "your request is invalid"}
}
}
};
send(id, res);
} else {
std::string & type = doc["type"];
BSON::Value & data = doc["data"];
if (type == "registerConsumer") {
registerConsumer(data["topic"], id);
}
if (type == "registerProcessor") {
registerProcessor(data["topic"], id);
}
if (type == "unregisterConsumer") {
unregisterConsumer(data["topic"], id);
}
if (type == "unregisterProcessor") {
unregisterProcessor(data["topic"], id);
}
if (type == "publish") {
publish(data, id);
}
if (type == "ack") {
ack(data, id);
}
if (type == "dismiss") {
dismiss(data, id);
}
}
}
bool Susi::SusiServer::validateFrame(BSON::Value & doc) {
if ( !doc.isObject() ||
!doc["type"].isString() ||
!doc["data"].isObject() ||
!doc["data"]["topic"].isString()) {
return false;
}
return true;
}
void Susi::SusiServer::send(int id, BSON::Value & doc) {
std::string frame = doc.toJSON() + "\n";
Susi::FramingServer<LineFramer, Susi::SSLTCPServer>::send(id, frame.c_str(), frame.size());
}
void Susi::SusiServer::registerConsumer(std::string & topic, int id) {
if (!contains(consumers[topic], id)) {
std::cout << "register consumer " + topic + " for " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
consumers[topic].push_back(id);
}
}
void Susi::SusiServer::registerProcessor(std::string & topic, int id) {
if (!contains(processors[topic], id)) {
std::cout << "register processor " + topic + " for " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
processors[topic].push_back(id);
}
}
void Susi::SusiServer::unregisterConsumer(std::string & topic, int id) {
for (size_t i = 0; i < consumers[topic].size(); i++) {
if (id == consumers[topic][i]) {
std::cout << "unregister consumer " + topic + " for " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
consumers[topic].erase(consumers[topic].begin() + i);
break;
}
}
}
void Susi::SusiServer::unregisterProcessor(std::string & topic, int id) {
for (size_t i = 0; i < processors[topic].size(); i++) {
if (id == processors[topic][i]) {
std::cout << "unregister processor " + topic + " for " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
processors[topic].erase(processors[topic].begin() + i);
break;
}
}
}
void Susi::SusiServer::publish(BSON::Value & event, int publisher) {
std::cout << "publish event " + event["topic"].getString() + " for " << Susi::SSLTCPServer::getPeerCertificateHash(publisher) << std::endl;
std::string & topic = event["topic"];
if (!event["id"].isString()) {
long id = std::chrono::system_clock::now().time_since_epoch().count();
event["id"] = std::to_string(id);
}
if (!event["sessionid"].isString()) {
event["sessionid"] = std::to_string(publisher);
}
auto peerCertHash = Susi::SSLTCPServer::getPeerCertificateHash(publisher);
if (peerCertHash != "") {
if (event["headers"].isArray()) {
event["headers"].push_back(BSON::Object{{"Cert-Hash", peerCertHash}});
} else {
event["headers"] = BSON::Array{BSON::Object{{"Cert-Hash", peerCertHash}}};
}
}
checkAndReactToSusiEvents(event);
auto process = std::make_shared<PublishProcess>(io_service);
int64_t timeout = checkForTimeoutHeader(event);
if(timeout){
process->timeout.expires_from_now(boost::posix_time::milliseconds(timeout));
process->timeout.async_wait([this,process](const boost::system::error_code & error){
if(!error){
process->lastState["headers"].push_back(BSON::Object{{"Error","Timeout"}});
dismiss(process->lastState,0);
}
});
}
process->publisher = publisher;
for (auto & kv : processors) {
std::regex e{kv.first};
if (std::regex_match(topic, e)) {
for (auto & id : kv.second) {
if (!contains(process->processors, id)) {
process->processors.push_back(id);
}
}
}
}
for (auto & kv : consumers) {
std::regex e{kv.first};
if (std::regex_match(topic, e)) {
for (auto & id : kv.second) {
if (!contains(process->consumers, id)) {
process->consumers.push_back(id);
}
}
}
}
publishProcesses[event["id"].getString()] = process;
ack(event, 0);
}
void Susi::SusiServer::ack(BSON::Value & event, int acker) {
if (acker != 0) {
std::cout << "got ack for event " + event["topic"].getString() + " from " << Susi::SSLTCPServer::getPeerCertificateHash(acker) << std::endl;
}
std::string & id = event["id"];
if (publishProcesses.count(id) == 0) {
return;
}
auto process = publishProcesses[id];
process->lastState = event;
if (process->nextProcessor >= process->processors.size()) {
//processor phase finished, send to all consumers and to publisher
if(!checkForNoConsumerHeader(event)){
BSON::Value consumerEvent = BSON::Object{
{"type", "consumerEvent"},
{"data", event}
};
for (auto & id : process->consumers) {
std::cout << "send consumer event " + event["topic"].getString() + " to " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
send(id, consumerEvent);
}
}
if (process->publisher != 0 && !checkForNoAckHeader(event)) {
BSON::Value publisherAck = BSON::Object{
{"type", "ack"},
{"data", event}
};
std::cout << "send ack for event " + event["topic"].getString() + " to publisher " << Susi::SSLTCPServer::getPeerCertificateHash(process->publisher) << std::endl;
send(process->publisher, publisherAck);
}
publishProcesses.erase(id);
} else {
if(!checkForNoProcessorHeader(event)){
std::cout << "forward event " + event["topic"].getString() + " to " << Susi::SSLTCPServer::getPeerCertificateHash(process->processors[process->nextProcessor]) << std::endl;
BSON::Value processorEvent = BSON::Object{
{"type", "processorEvent"},
{"data", event}
};
send(process->processors[process->nextProcessor++], processorEvent);
}else{
process->nextProcessor = process->processors.size();
ack(event,acker);
}
}
}
void Susi::SusiServer::dismiss(BSON::Value & event, int acker) {
if (acker != 0) {
std::cout << "got dismiss for event " + event["topic"].getString() + " from " << Susi::SSLTCPServer::getPeerCertificateHash(acker) << std::endl;
}
std::string & id = event["id"];
if (publishProcesses.count(id) == 0) {
return;
}
auto process = publishProcesses[id];
if(!checkForNoConsumerHeader(event)){
BSON::Value consumerEvent = BSON::Object{
{"type", "consumerEvent"},
{"data", event}
};
for (auto & id : process->consumers) {
std::cout << "send consumer event " + event["topic"].getString() + " to " << Susi::SSLTCPServer::getPeerCertificateHash(id) << std::endl;
send(id, consumerEvent);
}
}
if (process->publisher != 0 && !checkForNoAckHeader(event)) {
BSON::Value publisherAck = BSON::Object{
{"type", "dismiss"},
{"data", event}
};
std::cout << "send dismiss for event " + event["topic"].getString() + " to publisher " << Susi::SSLTCPServer::getPeerCertificateHash(process->publisher) << std::endl;
send(process->publisher, publisherAck);
}
publishProcesses.erase(id);
}
bool Susi::SusiServer::contains(std::vector<int> & vec, int elem) {
for (auto & id : vec) {
if (id == elem) {
return true;
}
}
return false;
}
void Susi::SusiServer::checkAndReactToSusiEvents(BSON::Value & event) {
std::regex susiEventTopic{"core::.*"};
if (std::regex_match(event["topic"].getString(), susiEventTopic)) {
if (event["topic"].getString() == "core::session::getCertificate") {
long long id = event["payload"].getInt64();
std::string cert = Susi::SSLTCPServer::getPeerCertificate(id);
event["payload"] = cert;
}
}
}
bool Susi::SusiServer::checkForHeader(BSON::Value & event, const std::string & key, const std::string & value){
if(event["headers"].isArray()){
for(auto & header : event["headers"].getArray()){
if(header[key].isString() && header[key].getString() == value ){
return true;
}
}
}
return false;
}
int64_t Susi::SusiServer::checkForTimeoutHeader(BSON::Value & event){
if(event["headers"].isArray()){
for(auto & header : event["headers"].getArray()){
if(header["Event-Timeout"].isString() && header["Event-Timeout"].isString() ){
return std::atoi(header["Event-Timeout"].getString().c_str());
}
}
}
return 0;
}
bool Susi::SusiServer::checkForNoAckHeader(BSON::Value & event){
return checkForHeader(event,"Event-Control","No-Ack");
}
bool Susi::SusiServer::checkForNoConsumerHeader(BSON::Value & event){
return checkForHeader(event,"Event-Control","No-Consumer");
}
bool Susi::SusiServer::checkForNoProcessorHeader(BSON::Value & event){
return checkForHeader(event,"Event-Control","No-Processor");
}
|
3f188097a1e9bdb1044f2202668cc6641edcd60f
|
23ff95db4a806c99c4aa757f2049f6a63e891247
|
/1A_3/test.cpp
|
e948b5b718e3ae60f734653fce5818a99069a476
|
[] |
no_license
|
AnshulBasia/google_problems
|
960570142c49ed6a4ddcefdb63ef9d1c22d0c888
|
da988a827f66d05fc8740148dc62b9075d71eeb4
|
refs/heads/master
| 2021-01-16T22:57:46.358289
| 2016-07-18T20:18:58
| 2016-07-18T20:18:58
| 62,531,063
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 380
|
cpp
|
test.cpp
|
#include <iostream>
#include <math.h>
#include <stack>
#include <fstream>
using namespace std;
#include <string.h>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <conio.h>
#include <string>
#include <stdlib.h>
#include <stdio.h>
int main()
{
ifstream file("in.in");
ofstream out("out.out");
string str;
while(getline(file,str,'\n'))
{
}
}
|
128c016ff5602d54290e56ec4482d461c88ef218
|
eef890f4f5e1294f64eba1a0481562e8eb049474
|
/BOJ/11504_돌려 돌려 돌림판!/11504_돌려 돌려 돌림판!(곽수빈).cpp
|
678b09f7c623a5c3e299a888af0c33dc58911bc7
|
[] |
no_license
|
dohitfast/Algorithm
|
773e99eb6db934ccc4e39e17f06ca0d018a68c61
|
318c0c3552749f7b1916191d610323954fd0a807
|
refs/heads/main
| 2023-02-01T21:04:28.294876
| 2020-12-15T12:33:49
| 2020-12-15T12:33:49
| 306,924,705
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 776
|
cpp
|
11504_돌려 돌려 돌림판!(곽수빈).cpp
|
#include <iostream>
using namespace std;
int main() {
int test_case;
cin >> test_case;
for (int i = 0; i < test_case; i++) {
int n, m;
cin >> n >> m;
int x[9];
int y[9];
int *arr = new int[n + 1];
for (int j = 0; j < m; j++)
cin >> x[j];
for (int j = 0; j < m; j++)
cin >> y[j];
for (int j = 0; j < n; j++)
cin >> arr[j];
int a = 0;
int b = 0;
int idx = 1;
for (int j = 0; j < m; j++) {
a += x[m - j - 1] * idx;
b += y[m - j - 1] * idx;
idx *= 10;
}
int answer = 0;
for (int j = 0; j < n; j++) {
int temp = idx / 10;
int sum = 0;
for (int k = 0; k < m; k++) {
sum += arr[(j + k) % n] * temp;
temp /= 10;
}
if (a <= sum && b >= sum)
answer++;
}
cout << answer << "\n";
}
return 0;
}
|
8c321a9d274f97ae7ff69f9cdd5c88f6e01ffffd
|
a087c85438d5f1e01ba9c3dd333fe1089fe69fb2
|
/Source/PUBG/Gun.h
|
f53bc4839f27aa61cc636f292417f138e8fb4ca1
|
[] |
no_license
|
0201jin/PUBG
|
cc60b7df42213ba63962ec81de234b2fa307c3ae
|
ab997d65ff96cdb88fee881813a836ab76625d40
|
refs/heads/master
| 2022-12-15T21:14:30.797074
| 2020-09-13T20:59:11
| 2020-09-13T20:59:11
| 295,236,403
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 899
|
h
|
Gun.h
|
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
/**
*
*/
class PUBG_API Gun
{
public:
Gun();
~Gun();
virtual void Init();
virtual UStaticMesh* GetStaticMesh();
virtual UClass* GetBullet();
virtual FVector GetBulletStart();
virtual FVector GetGunLocation();
virtual FVector GetZooomCameraLocation();
virtual void DeclineBullet();
virtual void AddBullet(int g_BulletCount);
virtual int GetBulletCount();
virtual int GetReloadBulletCount();
virtual bool GetCanReload();
virtual FString GetBulletName();
virtual void SetHoloGram(bool g_holo);
virtual bool GetHoloGram();
virtual FString GetGunName();
virtual FVector GetHologramLocation();
virtual float GetTimeBetweenShoot();
virtual void ChangeShootMode();
virtual int GetShootMode();
virtual UStaticMesh* GetScopeMesh();
virtual float GetDamage();
};
|
ac36de36e72960f727791cd94cd4bf7a5c517ed3
|
e99bae4e1c4ab2d3ec29ddceb1eee1207daa40e6
|
/GFG/asd.cpp
|
b5ec71968dadc2d4ecc2f4d4f60a5e2a0f12537c
|
[] |
no_license
|
ashmanmode/BitsAndBytes
|
083590c4ad22682d1156e090dc1f558ced9926de
|
6dffbb18ddbf04245d1cbe453ea975fed76a9969
|
refs/heads/master
| 2021-05-01T04:55:30.304918
| 2017-03-21T08:19:30
| 2017-03-21T08:19:30
| 70,502,359
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 155
|
cpp
|
asd.cpp
|
#include <iostream>
int main()
{
char array_1[] = "ab";
char array_2[2] = { 'a', 'b'};
cout << sizeof(array_1) << sizeof(array_2));
return 0;
}
|
e7d54e06fb0933cd8d9163897b0eac8ef8bdff3d
|
da528c593fc600a2cd7d2ff1a571eb2f091eab4b
|
/Naive based.cpp
|
037b438d059070a4c0265ffadda0d42a8f9d9ac5
|
[] |
no_license
|
priyankadholariya/ADA-assignment
|
2a0c831af9789fd24d65ea5a13beddb0bab38838
|
e65bca565d781d7a8f4f8857137bb9974c089c9c
|
refs/heads/main
| 2023-08-02T13:50:48.962484
| 2021-10-03T08:54:34
| 2021-10-03T08:54:34
| 413,022,673
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 637
|
cpp
|
Naive based.cpp
|
#include<stdio.h>
#include<string.h>
void naive_string_matcher(char text[],char pat[])
{
char temp[100];
int n=strlen(text);
int m=strlen(pat);
int i,j,s,k,count=0;
for(s=0;s<=n;s++)
{
for(j=s,k=0;j<m;j++,k++)
temp[k]=text[s+k];
temp[k]='\0';
if(strcmp(pat,temp)==0)
{
printf("\n Pattern Occurs With Shift : %d ",s);
count++;
}
m++;
}
printf("\n\n No Of Times Pattern Occurs %d:",count);
}
int main()
{
char text[100],pat[100];
printf("\n ENTER THE TEXT : ");
gets(text);
printf("\n ENTER THE PATTERN : ");
gets(pat);
naive_string_matcher(text,pat);
return 0;
}
|
29b181b32f54e0f4812c7d7bd90f9556f00405b9
|
61113cb212f5b2cbacc46506094c2ae814a2fc14
|
/Grafa-Nui/Headers/class_edge.h
|
7a7207ba560f066464691f2ff9c1676df6efc3ab
|
[] |
no_license
|
Asynchronousx/Grafa-Nui-Traveling-Salesman-Problem
|
8af23e10d66c1f16b9e0dc54cacc28abf08fc46e
|
fe5d64aa437614b55814ede800410dbfe22c9eeb
|
refs/heads/master
| 2020-04-01T13:49:46.227872
| 2018-10-16T13:04:46
| 2018-10-16T13:04:46
| 153,268,666
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,062
|
h
|
class_edge.h
|
#pragma once
#include <iostream>
#include "class_node.h"
class Edge {
private:
std::pair<Node*, Node*> normalEdge; //example : Edge between node: A - B \___ fully connected
std::pair<Node*, Node*> inverseEdge; // example: Edge between node: B - A /
float Weight;
public:
//Constructor
Edge() { ; } //Default
Edge(Node* firstNode, Node* secondNode, float inputWeight) : //Initialization parameter list
normalEdge(std::make_pair(firstNode,secondNode)), Weight(inputWeight) { ; }
~Edge() { ; } //Destructor
//Methods: Set
void setEdge(Node* firstNode, Node* secondNode, float Weight = 0) {
//Filling first edge pair
this->normalEdge.first = firstNode;
this->normalEdge.second = secondNode;
//Filling the inverse edge pair
this->inverseEdge.first = secondNode;
this->inverseEdge.second = firstNode;
//Filling the weight
this->Weight = Weight;
}
//Methods: Get
std::pair<Node*, Node*> getNormalEdge() { return normalEdge; }
std::pair<Node*, Node*> getInverseEdge() { return inverseEdge; }
int getWeight() { return Weight; }
};
|
fb2f042274dc26619f81e37d6eaf1dd97b37759f
|
e3f9e4b0da46a6c09cd2bec37b841ccce9ae55ce
|
/sort/가장큰수.cpp
|
a6b2ea1873984afd263b11a1c24a4d1733a5fcb9
|
[] |
no_license
|
us419/Programmers_algorithm_practice
|
6e3cab27fd2086c5c92c8f6df69bca21a8a0b0d1
|
06b52da8eccf9d97a9da0525dc47bde6f1e15749
|
refs/heads/master
| 2022-04-21T19:10:38.119281
| 2020-04-20T18:32:13
| 2020-04-20T18:32:13
| 257,369,972
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 912
|
cpp
|
가장큰수.cpp
|
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
string ab;
string ba;
int compare(string& a, string& b)
{
if (a == b)
return 1;
ab.clear();
ba.clear();
ab = a+b;
ba = b+a;
for (int i=0; i<ab.length(); i++)
{
if(ab[i] > ba[i])
return 1;
if(ab[i] < ba[i])
return 0;
}
return 0;
}
string solution(vector<int> numbers) {
string answer = "";
int sum = 0;
for (int i : numbers)
sum += i;
if (sum == 0)
{
answer = "0";
return answer;
}
vector<string> string_numbers(numbers.size());
for (int i=0; i<numbers.size(); i++)
{
string_numbers[i] = to_string(numbers[i]);
}
sort(string_numbers.begin(), string_numbers.end(), compare);
for (string i : string_numbers)
answer += i;
return answer;
}
|
bf213cd0408d2033a33fee1d92974ef1bc030fbc
|
f28fa9b2ca3bceacca2b463199dc93948c00566e
|
/NameServer.h
|
f48a95eadb133c1c11314438372690b2c8f519c6
|
[] |
no_license
|
nr2kim/StudentCardSim
|
6c080b978e9446a6602383872bda6c56dbe0a049
|
32c6b81b6873c9f2a3c85fc336518b79046971e8
|
refs/heads/master
| 2020-08-30T16:18:47.562569
| 2019-10-30T02:58:30
| 2019-10-30T02:58:30
| 218,430,976
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 530
|
h
|
NameServer.h
|
#ifndef __NAMESERVER_H
#define __NAMESERVER_H
#include "Printer.h"
_Task VendingMachine;
_Task NameServer {
Printer *serverPrinter;
unsigned int numVendingMachine;
VendingMachine ** serverManagement;
int *student;
void main();
public:
NameServer( Printer & prt, unsigned int numVendingMachines, unsigned int numStudents );
~NameServer();
void VMregister( VendingMachine * vendingmachine );
VendingMachine * getMachine( unsigned int id );
VendingMachine ** getMachineList();
};
#endif
|
51a9edfe48e5c8db8e83380ec076f66e555e5d4b
|
455ecd26f1439cd4a44856c743b01d711e3805b6
|
/java/src/android.opengl.cpp
|
591147f8501617f13ffaf0bf7bf77598bdc906e1
|
[] |
no_license
|
lbguilherme/duvidovc-app
|
00662bf024f82a842c808673109b30fe2b70e727
|
f7c86ea812d2ae8dd892918b65ea429e9906531c
|
refs/heads/master
| 2021-03-24T09:17:17.834080
| 2015-09-08T02:32:44
| 2015-09-08T02:32:44
| 33,072,192
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 319,851
|
cpp
|
android.opengl.cpp
|
#include "java-core.hpp"
#include <memory>
#include "android.content.Context.hpp"
#include "android.graphics.Bitmap.hpp"
#include "android.opengl.ETC1.hpp"
#include "android.opengl.ETC1Util.hpp"
#include "android.opengl.GLDebugHelper.hpp"
#include "android.opengl.GLES10.hpp"
#include "android.opengl.GLES10Ext.hpp"
#include "android.opengl.GLES11.hpp"
#include "android.opengl.GLES11Ext.hpp"
#include "android.opengl.GLES20.hpp"
#include "android.opengl.GLException.hpp"
#include "android.opengl.GLSurfaceView.hpp"
#include "android.opengl.GLU.hpp"
#include "android.opengl.GLUtils.hpp"
#include "android.opengl.Matrix.hpp"
#include "android.opengl.Visibility.hpp"
#include "android.util.AttributeSet.hpp"
#include "android.view.SurfaceHolder.hpp"
#include "java.io.InputStream.hpp"
#include "java.io.OutputStream.hpp"
#include "java.io.Writer.hpp"
#include "java.lang.Object.hpp"
#include "java.lang.Runnable.hpp"
#include "java.lang.String.hpp"
#include "java.nio.Buffer.hpp"
#include "java.nio.ByteBuffer.hpp"
#include "java.nio.FloatBuffer.hpp"
#include "java.nio.IntBuffer.hpp"
#include "java.nio.ShortBuffer.hpp"
#include "javax.microedition.khronos.egl.EGL.hpp"
#include "javax.microedition.khronos.egl.EGL10.hpp"
#include "javax.microedition.khronos.egl.EGLConfig.hpp"
#include "javax.microedition.khronos.egl.EGLContext.hpp"
#include "javax.microedition.khronos.egl.EGLDisplay.hpp"
#include "javax.microedition.khronos.egl.EGLSurface.hpp"
#include "javax.microedition.khronos.opengles.GL.hpp"
#include "javax.microedition.khronos.opengles.GL10.hpp"
jclass android::opengl::GLES10Ext::_class = nullptr;
jclass android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::_class = nullptr;
jclass android::opengl::GLES20::_class = nullptr;
jclass android::opengl::GLException::_class = nullptr;
jclass android::opengl::GLSurfaceView_EGLContextFactory::_class = nullptr;
jclass android::opengl::GLES11::_class = nullptr;
jclass android::opengl::GLSurfaceView_GLWrapper::_class = nullptr;
jclass android::opengl::ETC1::_class = nullptr;
jclass android::opengl::GLDebugHelper::_class = nullptr;
jclass android::opengl::Matrix::_class = nullptr;
jclass android::opengl::GLUtils::_class = nullptr;
jclass android::opengl::GLSurfaceView_EGLConfigChooser::_class = nullptr;
jclass android::opengl::GLES11Ext::_class = nullptr;
jclass android::opengl::Visibility::_class = nullptr;
jclass android::opengl::GLSurfaceView_Renderer::_class = nullptr;
jclass android::opengl::GLES10::_class = nullptr;
jclass android::opengl::GLSurfaceView::_class = nullptr;
jclass android::opengl::GLU::_class = nullptr;
jclass android::opengl::ETC1Util_ETC1Texture::_class = nullptr;
jclass android::opengl::ETC1Util::_class = nullptr;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLES10Ext::GLES10Ext() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::GLES10Ext::_class) ::android::opengl::GLES10Ext::_class = java::fetch_class("android/opengl/GLES10Ext");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
int32_t android::opengl::GLES10Ext::glQueryMatrixxOES(const std::vector< int32_t>& arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES10Ext::_class) ::android::opengl::GLES10Ext::_class = java::fetch_class("android/opengl/GLES10Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glQueryMatrixxOES", "([II[II)I");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
int32_t android::opengl::GLES10Ext::glQueryMatrixxOES(const ::java::nio::IntBuffer& arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES10Ext::_class) ::android::opengl::GLES10Ext::_class = java::fetch_class("android/opengl/GLES10Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glQueryMatrixxOES", "(Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)I");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1);
}
::javax::microedition::khronos::egl::EGLSurface android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::createWindowSurface(const ::javax::microedition::khronos::egl::EGL10& arg0, const ::javax::microedition::khronos::egl::EGLDisplay& arg1, const ::javax::microedition::khronos::egl::EGLConfig& arg2, const ::java::lang::Object& arg3) const {
if (!::android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::_class) ::android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::_class = java::fetch_class("android/opengl/GLSurfaceView$EGLWindowSurfaceFactory");
static jmethodID mid = java::jni->GetMethodID(_class, "createWindowSurface", "(Ljavax/microedition/khronos/egl/EGL10;Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLConfig;Ljava/lang/Object;)Ljavax/microedition/khronos/egl/EGLSurface;");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
jobject _arg2 = arg2.obj;
jobject _arg3 = arg3.obj;
jobject ret = java::jni->CallObjectMethod(obj, mid, _arg0, _arg1, _arg2, _arg3);
::javax::microedition::khronos::egl::EGLSurface _ret(ret);
return _ret;
}
void android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::destroySurface(const ::javax::microedition::khronos::egl::EGL10& arg0, const ::javax::microedition::khronos::egl::EGLDisplay& arg1, const ::javax::microedition::khronos::egl::EGLSurface& arg2) const {
if (!::android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::_class) ::android::opengl::GLSurfaceView_EGLWindowSurfaceFactory::_class = java::fetch_class("android/opengl/GLSurfaceView$EGLWindowSurfaceFactory");
static jmethodID mid = java::jni->GetMethodID(_class, "destroySurface", "(Ljavax/microedition/khronos/egl/EGL10;Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
jobject _arg2 = arg2.obj;
java::jni->CallVoidMethod(obj, mid, _arg0, _arg1, _arg2);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLES20::GLES20() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::GLES20::glActiveTexture(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glActiveTexture", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glAttachShader(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glAttachShader", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBindAttribLocation(int32_t arg0, int32_t arg1, const ::java::lang::String& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindAttribLocation", "(IILjava/lang/String;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glBindBuffer(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindBuffer", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBindFramebuffer(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindFramebuffer", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBindRenderbuffer(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindRenderbuffer", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBindTexture(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindTexture", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBlendColor(float arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendColor", "(FFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glBlendEquation(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendEquation", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glBlendEquationSeparate(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendEquationSeparate", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBlendFunc(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendFunc", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glBlendFuncSeparate(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendFuncSeparate", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glBufferData(int32_t arg0, int32_t arg1, const ::java::nio::Buffer& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBufferData", "(IILjava/nio/Buffer;I)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glBufferSubData(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBufferSubData", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
int32_t android::opengl::GLES20::glCheckFramebufferStatus(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCheckFramebufferStatus", "(I)I");
int32_t _arg0 = arg0;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glClear(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClear", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glClearColor(float arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearColor", "(FFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glClearDepthf(float arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearDepthf", "(F)V");
float _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glClearStencil(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearStencil", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glColorMask(bool arg0, bool arg1, bool arg2, bool arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColorMask", "(ZZZZ)V");
bool _arg0 = arg0;
bool _arg1 = arg1;
bool _arg2 = arg2;
bool _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glCompileShader(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCompileShader", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glCompressedTexImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, const ::java::nio::Buffer& arg7){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
jobject _arg7 = arg7.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::GLES20::glCompressedTexSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, const ::java::nio::Buffer& arg8){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
jobject _arg8 = arg8.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
void android::opengl::GLES20::glCopyTexImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCopyTexImage2D", "(IIIIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::GLES20::glCopyTexSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCopyTexSubImage2D", "(IIIIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
int32_t android::opengl::GLES20::glCreateProgram(){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCreateProgram", "()I");
return java::jni->CallStaticIntMethod(_class, mid);
}
int32_t android::opengl::GLES20::glCreateShader(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCreateShader", "(I)I");
int32_t _arg0 = arg0;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glCullFace(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCullFace", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDeleteBuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteBuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glDeleteBuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteBuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glDeleteFramebuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteFramebuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glDeleteFramebuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteFramebuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glDeleteProgram(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteProgram", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDeleteRenderbuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteRenderbuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glDeleteRenderbuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteRenderbuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glDeleteShader(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteShader", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDeleteTextures(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteTextures", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glDeleteTextures(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteTextures", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glDepthFunc(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthFunc", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDepthMask(bool arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthMask", "(Z)V");
bool _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDepthRangef(float arg0, float arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthRangef", "(FF)V");
float _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glDetachShader(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDetachShader", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glDisable(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDisable", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDisableVertexAttribArray(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDisableVertexAttribArray", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glDrawArrays(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawArrays", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glDrawElements(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawElements", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glDrawElements(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawElements", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glEnable(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glEnable", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glEnableVertexAttribArray(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glEnableVertexAttribArray", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glFinish(){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFinish", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES20::glFlush(){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFlush", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES20::glFramebufferRenderbuffer(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFramebufferRenderbuffer", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glFramebufferTexture2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFramebufferTexture2D", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glFrontFace(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFrontFace", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glGenBuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenBuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGenBuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenBuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGenerateMipmap(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenerateMipmap", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glGenFramebuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenFramebuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGenFramebuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenFramebuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGenRenderbuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenRenderbuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGenRenderbuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenRenderbuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGenTextures(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenTextures", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGenTextures(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenTextures", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGetActiveAttrib(int32_t arg0, int32_t arg1, int32_t arg2, const std::vector< int32_t>& arg3, int32_t arg4, const std::vector< int32_t>& arg5, int32_t arg6, const std::vector< int32_t>& arg7, int32_t arg8, const std::vector< int8_t>& arg9, int32_t arg10){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetActiveAttrib", "(III[II[II[II[BI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jintArray _arg3 = java::jni->NewIntArray(arg3.size());
java::jni->SetIntArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
jintArray _arg5 = java::jni->NewIntArray(arg5.size());
java::jni->SetIntArrayRegion(_arg5, 0, arg5.size(), arg5.data());
int32_t _arg6 = arg6;
jintArray _arg7 = java::jni->NewIntArray(arg7.size());
java::jni->SetIntArrayRegion(_arg7, 0, arg7.size(), arg7.data());
int32_t _arg8 = arg8;
jbyteArray _arg9 = java::jni->NewByteArray(arg9.size());
java::jni->SetByteArrayRegion(_arg9, 0, arg9.size(), arg9.data());
int32_t _arg10 = arg10;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
}
void android::opengl::GLES20::glGetActiveAttrib(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::IntBuffer& arg3, const ::java::nio::IntBuffer& arg4, const ::java::nio::IntBuffer& arg5, int8_t arg6){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetActiveAttrib", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
jobject _arg4 = arg4.obj;
jobject _arg5 = arg5.obj;
int8_t _arg6 = arg6;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
void android::opengl::GLES20::glGetActiveUniform(int32_t arg0, int32_t arg1, int32_t arg2, const std::vector< int32_t>& arg3, int32_t arg4, const std::vector< int32_t>& arg5, int32_t arg6, const std::vector< int32_t>& arg7, int32_t arg8, const std::vector< int8_t>& arg9, int32_t arg10){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetActiveUniform", "(III[II[II[II[BI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jintArray _arg3 = java::jni->NewIntArray(arg3.size());
java::jni->SetIntArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
jintArray _arg5 = java::jni->NewIntArray(arg5.size());
java::jni->SetIntArrayRegion(_arg5, 0, arg5.size(), arg5.data());
int32_t _arg6 = arg6;
jintArray _arg7 = java::jni->NewIntArray(arg7.size());
java::jni->SetIntArrayRegion(_arg7, 0, arg7.size(), arg7.data());
int32_t _arg8 = arg8;
jbyteArray _arg9 = java::jni->NewByteArray(arg9.size());
java::jni->SetByteArrayRegion(_arg9, 0, arg9.size(), arg9.data());
int32_t _arg10 = arg10;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
}
void android::opengl::GLES20::glGetActiveUniform(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::IntBuffer& arg3, const ::java::nio::IntBuffer& arg4, const ::java::nio::IntBuffer& arg5, int8_t arg6){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetActiveUniform", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
jobject _arg4 = arg4.obj;
jobject _arg5 = arg5.obj;
int8_t _arg6 = arg6;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
void android::opengl::GLES20::glGetAttachedShaders(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3, const std::vector< int32_t>& arg4, int32_t arg5){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetAttachedShaders", "(II[II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
jintArray _arg4 = java::jni->NewIntArray(arg4.size());
java::jni->SetIntArrayRegion(_arg4, 0, arg4.size(), arg4.data());
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES20::glGetAttachedShaders(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2, const ::java::nio::IntBuffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetAttachedShaders", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
int32_t android::opengl::GLES20::glGetAttribLocation(int32_t arg0, const ::java::lang::String& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetAttribLocation", "(ILjava/lang/String;)I");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGetBooleanv(int32_t arg0, const std::vector< bool>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBooleanv", "(I[ZI)V");
int32_t _arg0 = arg0;
jbooleanArray _arg1 = java::jni->NewBooleanArray(arg1.size());
unsigned arg1s = arg1.size();
std::unique_ptr<bool[]> arg1t(new bool[arg1s]);
for (unsigned arg1i = 0; arg1i < arg1s; ++arg1i) {
arg1t[arg1i] = arg1[arg1i];
}
java::jni->SetBooleanArrayRegion(_arg1, 0, arg1s, (const jboolean*)arg1t.get());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetBooleanv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBooleanv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGetBufferParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBufferParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetBufferParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
int32_t android::opengl::GLES20::glGetError(){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetError", "()I");
return java::jni->CallStaticIntMethod(_class, mid);
}
void android::opengl::GLES20::glGetFloatv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFloatv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetFloatv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFloatv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGetFramebufferAttachmentParameteriv(int32_t arg0, int32_t arg1, int32_t arg2, const std::vector< int32_t>& arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFramebufferAttachmentParameteriv", "(III[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jintArray _arg3 = java::jni->NewIntArray(arg3.size());
java::jni->SetIntArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glGetFramebufferAttachmentParameteriv(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::IntBuffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFramebufferAttachmentParameteriv", "(IIILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetIntegerv(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetIntegerv", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetIntegerv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetIntegerv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGetProgramiv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetProgramiv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetProgramiv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetProgramiv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
::java::lang::String android::opengl::GLES20::glGetProgramInfoLog(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetProgramInfoLog", "(I)Ljava/lang/String;");
int32_t _arg0 = arg0;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::java::lang::String _ret(ret);
return _ret;
}
void android::opengl::GLES20::glGetRenderbufferParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetRenderbufferParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetRenderbufferParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetRenderbufferParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetShaderiv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderiv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetShaderiv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderiv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
::java::lang::String android::opengl::GLES20::glGetShaderInfoLog(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderInfoLog", "(I)Ljava/lang/String;");
int32_t _arg0 = arg0;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::java::lang::String _ret(ret);
return _ret;
}
void android::opengl::GLES20::glGetShaderPrecisionFormat(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3, const std::vector< int32_t>& arg4, int32_t arg5){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderPrecisionFormat", "(II[II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
jintArray _arg4 = java::jni->NewIntArray(arg4.size());
java::jni->SetIntArrayRegion(_arg4, 0, arg4.size(), arg4.data());
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES20::glGetShaderPrecisionFormat(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2, const ::java::nio::IntBuffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderPrecisionFormat", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetShaderSource(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3, const std::vector< int8_t>& arg4, int32_t arg5){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderSource", "(II[II[BI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
jbyteArray _arg4 = java::jni->NewByteArray(arg4.size());
java::jni->SetByteArrayRegion(_arg4, 0, arg4.size(), arg4.data());
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES20::glGetShaderSource(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2, int8_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetShaderSource", "(IILjava/nio/IntBuffer;B)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
int8_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
::java::lang::String android::opengl::GLES20::glGetString(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetString", "(I)Ljava/lang/String;");
int32_t _arg0 = arg0;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::java::lang::String _ret(ret);
return _ret;
}
void android::opengl::GLES20::glGetTexParameterfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetTexParameterfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetTexParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetTexParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetUniformfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetUniformfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetUniformfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetUniformfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetUniformiv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetUniformiv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetUniformiv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetUniformiv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
int32_t android::opengl::GLES20::glGetUniformLocation(int32_t arg0, const ::java::lang::String& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetUniformLocation", "(ILjava/lang/String;)I");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glGetVertexAttribfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetVertexAttribfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetVertexAttribfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetVertexAttribfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glGetVertexAttribiv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetVertexAttribiv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glGetVertexAttribiv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetVertexAttribiv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glHint(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glHint", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
bool android::opengl::GLES20::glIsBuffer(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsBuffer", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES20::glIsEnabled(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsEnabled", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES20::glIsFramebuffer(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsFramebuffer", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES20::glIsProgram(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsProgram", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES20::glIsRenderbuffer(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsRenderbuffer", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES20::glIsShader(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsShader", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES20::glIsTexture(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsTexture", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glLineWidth(float arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLineWidth", "(F)V");
float _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glLinkProgram(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLinkProgram", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glPixelStorei(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPixelStorei", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glPolygonOffset(float arg0, float arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPolygonOffset", "(FF)V");
float _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glReadPixels(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, const ::java::nio::Buffer& arg6){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glReadPixels", "(IIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
jobject _arg6 = arg6.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
void android::opengl::GLES20::glReleaseShaderCompiler(){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glReleaseShaderCompiler", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES20::glRenderbufferStorage(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glRenderbufferStorage", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glSampleCoverage(float arg0, bool arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glSampleCoverage", "(FZ)V");
float _arg0 = arg0;
bool _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glScissor(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glScissor", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glShaderBinary(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2, int32_t arg3, const ::java::nio::Buffer& arg4, int32_t arg5){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glShaderBinary", "(I[IIILjava/nio/Buffer;I)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
jobject _arg4 = arg4.obj;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES20::glShaderBinary(int32_t arg0, const ::java::nio::IntBuffer& arg1, int32_t arg2, const ::java::nio::Buffer& arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glShaderBinary", "(ILjava/nio/IntBuffer;ILjava/nio/Buffer;I)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glShaderSource(int32_t arg0, const ::java::lang::String& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glShaderSource", "(ILjava/lang/String;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glStencilFunc(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilFunc", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glStencilFuncSeparate(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilFuncSeparate", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glStencilMask(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilMask", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glStencilMaskSeparate(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilMaskSeparate", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glStencilOp(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilOp", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glStencilOpSeparate(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilOpSeparate", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glTexImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, const ::java::nio::Buffer& arg8){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
jobject _arg8 = arg8.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
void android::opengl::GLES20::glTexParameterf(int32_t arg0, int32_t arg1, float arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterf", "(IIF)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glTexParameterfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glTexParameterfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glTexParameteri(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameteri", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glTexParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glTexParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glTexSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, const ::java::nio::Buffer& arg8){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
jobject _arg8 = arg8.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
void android::opengl::GLES20::glUniform1f(int32_t arg0, float arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform1f", "(IF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glUniform1fv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform1fv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform1fv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform1fv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform1i(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform1i", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glUniform1iv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform1iv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform1iv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform1iv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform2f(int32_t arg0, float arg1, float arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform2f", "(IFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform2fv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform2fv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform2fv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform2fv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform2i(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform2i", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform2iv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform2iv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform2iv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform2iv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform3f(int32_t arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform3f", "(IFFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform3fv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform3fv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform3fv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform3fv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform3i(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform3i", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform3iv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform3iv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform3iv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform3iv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform4f(int32_t arg0, float arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform4f", "(IFFFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glUniform4fv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform4fv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform4fv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform4fv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniform4i(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform4i", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glUniform4iv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform4iv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniform4iv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniform4iv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glUniformMatrix2fv(int32_t arg0, int32_t arg1, bool arg2, const std::vector< float>& arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniformMatrix2fv", "(IIZ[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
bool _arg2 = arg2;
jfloatArray _arg3 = java::jni->NewFloatArray(arg3.size());
java::jni->SetFloatArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glUniformMatrix2fv(int32_t arg0, int32_t arg1, bool arg2, const ::java::nio::FloatBuffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniformMatrix2fv", "(IIZLjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
bool _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniformMatrix3fv(int32_t arg0, int32_t arg1, bool arg2, const std::vector< float>& arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniformMatrix3fv", "(IIZ[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
bool _arg2 = arg2;
jfloatArray _arg3 = java::jni->NewFloatArray(arg3.size());
java::jni->SetFloatArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glUniformMatrix3fv(int32_t arg0, int32_t arg1, bool arg2, const ::java::nio::FloatBuffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniformMatrix3fv", "(IIZLjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
bool _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUniformMatrix4fv(int32_t arg0, int32_t arg1, bool arg2, const std::vector< float>& arg3, int32_t arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniformMatrix4fv", "(IIZ[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
bool _arg2 = arg2;
jfloatArray _arg3 = java::jni->NewFloatArray(arg3.size());
java::jni->SetFloatArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glUniformMatrix4fv(int32_t arg0, int32_t arg1, bool arg2, const ::java::nio::FloatBuffer& arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUniformMatrix4fv", "(IIZLjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
bool _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glUseProgram(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glUseProgram", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glValidateProgram(int32_t arg0){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glValidateProgram", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES20::glVertexAttrib1f(int32_t arg0, float arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib1f", "(IF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glVertexAttrib1fv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib1fv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glVertexAttrib1fv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib1fv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glVertexAttrib2f(int32_t arg0, float arg1, float arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib2f", "(IFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glVertexAttrib2fv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib2fv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glVertexAttrib2fv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib2fv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glVertexAttrib3f(int32_t arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib3f", "(IFFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES20::glVertexAttrib3fv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib3fv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glVertexAttrib3fv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib3fv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glVertexAttrib4f(int32_t arg0, float arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib4f", "(IFFFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES20::glVertexAttrib4fv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib4fv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES20::glVertexAttrib4fv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES20::glVertexAttribPointer(int32_t arg0, int32_t arg1, int32_t arg2, bool arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttribPointer", "(IIIZII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
bool _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES20::glVertexAttribPointer(int32_t arg0, int32_t arg1, int32_t arg2, bool arg3, int32_t arg4, const ::java::nio::Buffer& arg5){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexAttribPointer", "(IIIZILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
bool _arg3 = arg3;
int32_t _arg4 = arg4;
jobject _arg5 = arg5.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES20::glViewport(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES20::_class) ::android::opengl::GLES20::_class = java::fetch_class("android/opengl/GLES20");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glViewport", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLException::GLException(int32_t arg0) : ::java::lang::Object((jobject)0), ::java::io::Serializable((jobject)0), ::java::lang::Exception((jobject)0), ::java::lang::RuntimeException((jobject)0), ::java::lang::Throwable((jobject)0) {
if (!::android::opengl::GLException::_class) ::android::opengl::GLException::_class = java::fetch_class("android/opengl/GLException");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "(I)V");
int32_t _arg0 = arg0;
obj = java::jni->NewObject(_class, mid, _arg0);
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLException::GLException(int32_t arg0, const ::java::lang::String& arg1) : ::java::lang::Object((jobject)0), ::java::io::Serializable((jobject)0), ::java::lang::Exception((jobject)0), ::java::lang::RuntimeException((jobject)0), ::java::lang::Throwable((jobject)0) {
if (!::android::opengl::GLException::_class) ::android::opengl::GLException::_class = java::fetch_class("android/opengl/GLException");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "(ILjava/lang/String;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
obj = java::jni->NewObject(_class, mid, _arg0, _arg1);
}
#pragma GCC diagnostic pop
::javax::microedition::khronos::egl::EGLContext android::opengl::GLSurfaceView_EGLContextFactory::createContext(const ::javax::microedition::khronos::egl::EGL10& arg0, const ::javax::microedition::khronos::egl::EGLDisplay& arg1, const ::javax::microedition::khronos::egl::EGLConfig& arg2) const {
if (!::android::opengl::GLSurfaceView_EGLContextFactory::_class) ::android::opengl::GLSurfaceView_EGLContextFactory::_class = java::fetch_class("android/opengl/GLSurfaceView$EGLContextFactory");
static jmethodID mid = java::jni->GetMethodID(_class, "createContext", "(Ljavax/microedition/khronos/egl/EGL10;Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLConfig;)Ljavax/microedition/khronos/egl/EGLContext;");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
jobject _arg2 = arg2.obj;
jobject ret = java::jni->CallObjectMethod(obj, mid, _arg0, _arg1, _arg2);
::javax::microedition::khronos::egl::EGLContext _ret(ret);
return _ret;
}
void android::opengl::GLSurfaceView_EGLContextFactory::destroyContext(const ::javax::microedition::khronos::egl::EGL10& arg0, const ::javax::microedition::khronos::egl::EGLDisplay& arg1, const ::javax::microedition::khronos::egl::EGLContext& arg2) const {
if (!::android::opengl::GLSurfaceView_EGLContextFactory::_class) ::android::opengl::GLSurfaceView_EGLContextFactory::_class = java::fetch_class("android/opengl/GLSurfaceView$EGLContextFactory");
static jmethodID mid = java::jni->GetMethodID(_class, "destroyContext", "(Ljavax/microedition/khronos/egl/EGL10;Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLContext;)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
jobject _arg2 = arg2.obj;
java::jni->CallVoidMethod(obj, mid, _arg0, _arg1, _arg2);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLES11::GLES11() : ::java::lang::Object((jobject)0), ::android::opengl::GLES10((jobject)0) {
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::GLES11::glBindBuffer(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindBuffer", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glBufferData(int32_t arg0, int32_t arg1, const ::java::nio::Buffer& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBufferData", "(IILjava/nio/Buffer;I)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glBufferSubData(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBufferSubData", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glClipPlanef(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanef", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glClipPlanef(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanef", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glClipPlanex(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanex", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glClipPlanex(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanex", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glColor4ub(int8_t arg0, int8_t arg1, int8_t arg2, int8_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColor4ub", "(BBBB)V");
int8_t _arg0 = arg0;
int8_t _arg1 = arg1;
int8_t _arg2 = arg2;
int8_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glColorPointer(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColorPointer", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glDeleteBuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteBuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glDeleteBuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteBuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glDrawElements(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawElements", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGenBuffers(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenBuffers", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGenBuffers(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenBuffers", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glGetBooleanv(int32_t arg0, const std::vector< bool>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBooleanv", "(I[ZI)V");
int32_t _arg0 = arg0;
jbooleanArray _arg1 = java::jni->NewBooleanArray(arg1.size());
unsigned arg1s = arg1.size();
std::unique_ptr<bool[]> arg1t(new bool[arg1s]);
for (unsigned arg1i = 0; arg1i < arg1s; ++arg1i) {
arg1t[arg1i] = arg1[arg1i];
}
java::jni->SetBooleanArrayRegion(_arg1, 0, arg1s, (const jboolean*)arg1t.get());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetBooleanv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBooleanv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glGetBufferParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBufferParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetBufferParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetBufferParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetClipPlanef(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanef", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetClipPlanef(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanef", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glGetClipPlanex(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanex", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetClipPlanex(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanex", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glGetFixedv(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFixedv", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetFixedv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFixedv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glGetFloatv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFloatv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetFloatv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFloatv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glGetLightfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetLightfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetLightfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetLightfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetLightxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetLightxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetLightxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetLightxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetMaterialfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetMaterialfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetMaterialfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetMaterialfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetMaterialxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetMaterialxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetMaterialxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetMaterialxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetTexEnvfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnvfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetTexEnvfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnvfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetTexEnviv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnviv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetTexEnviv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnviv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetTexEnvxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnvxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetTexEnvxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnvxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetTexParameterfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetTexParameterfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetTexParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetTexParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glGetTexParameterxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glGetTexParameterxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
bool android::opengl::GLES11::glIsBuffer(int32_t arg0){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsBuffer", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES11::glIsEnabled(int32_t arg0){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsEnabled", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
bool android::opengl::GLES11::glIsTexture(int32_t arg0){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsTexture", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
void android::opengl::GLES11::glNormalPointer(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glNormalPointer", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glPointParameterf(int32_t arg0, float arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterf", "(IF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glPointParameterfv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterfv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glPointParameterfv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterfv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glPointParameterx(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterx", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glPointParameterxv(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterxv", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glPointParameterxv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterxv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11::glPointSizePointerOES(int32_t arg0, int32_t arg1, const ::java::nio::Buffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointSizePointerOES", "(IILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glTexCoordPointer(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexCoordPointer", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glTexEnvi(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvi", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glTexEnviv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnviv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glTexEnviv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnviv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glTexParameterfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glTexParameterfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glTexParameteri(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameteri", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glTexParameteriv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameteriv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glTexParameteriv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameteriv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glTexParameterxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11::glTexParameterxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11::glVertexPointer(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11::_class) ::android::opengl::GLES11::_class = java::fetch_class("android/opengl/GLES11");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexPointer", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
::javax::microedition::khronos::opengles::GL android::opengl::GLSurfaceView_GLWrapper::wrap(const ::javax::microedition::khronos::opengles::GL& arg0) const {
if (!::android::opengl::GLSurfaceView_GLWrapper::_class) ::android::opengl::GLSurfaceView_GLWrapper::_class = java::fetch_class("android/opengl/GLSurfaceView$GLWrapper");
static jmethodID mid = java::jni->GetMethodID(_class, "wrap", "(Ljavax/microedition/khronos/opengles/GL;)Ljavax/microedition/khronos/opengles/GL;");
jobject _arg0 = arg0.obj;
jobject ret = java::jni->CallObjectMethod(obj, mid, _arg0);
::javax::microedition::khronos::opengles::GL _ret(ret);
return _ret;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::ETC1::ETC1() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::ETC1::encodeBlock(const ::java::nio::Buffer& arg0, int32_t arg1, const ::java::nio::Buffer& arg2){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "encodeBlock", "(Ljava/nio/Buffer;ILjava/nio/Buffer;)V");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::ETC1::decodeBlock(const ::java::nio::Buffer& arg0, const ::java::nio::Buffer& arg1){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "decodeBlock", "(Ljava/nio/Buffer;Ljava/nio/Buffer;)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
int32_t android::opengl::ETC1::getEncodedDataSize(int32_t arg0, int32_t arg1){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "getEncodedDataSize", "(II)I");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::ETC1::encodeImage(const ::java::nio::Buffer& arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, const ::java::nio::Buffer& arg5){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "encodeImage", "(Ljava/nio/Buffer;IIIILjava/nio/Buffer;)V");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
jobject _arg5 = arg5.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::ETC1::decodeImage(const ::java::nio::Buffer& arg0, const ::java::nio::Buffer& arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "decodeImage", "(Ljava/nio/Buffer;Ljava/nio/Buffer;IIII)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::ETC1::formatHeader(const ::java::nio::Buffer& arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "formatHeader", "(Ljava/nio/Buffer;II)V");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
bool android::opengl::ETC1::isValid(const ::java::nio::Buffer& arg0){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "isValid", "(Ljava/nio/Buffer;)Z");
jobject _arg0 = arg0.obj;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
int32_t android::opengl::ETC1::getWidth(const ::java::nio::Buffer& arg0){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "getWidth", "(Ljava/nio/Buffer;)I");
jobject _arg0 = arg0.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
int32_t android::opengl::ETC1::getHeight(const ::java::nio::Buffer& arg0){
if (!::android::opengl::ETC1::_class) ::android::opengl::ETC1::_class = java::fetch_class("android/opengl/ETC1");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "getHeight", "(Ljava/nio/Buffer;)I");
jobject _arg0 = arg0.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLDebugHelper::GLDebugHelper() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::GLDebugHelper::_class) ::android::opengl::GLDebugHelper::_class = java::fetch_class("android/opengl/GLDebugHelper");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
::javax::microedition::khronos::opengles::GL android::opengl::GLDebugHelper::wrap(const ::javax::microedition::khronos::opengles::GL& arg0, int32_t arg1, const ::java::io::Writer& arg2){
if (!::android::opengl::GLDebugHelper::_class) ::android::opengl::GLDebugHelper::_class = java::fetch_class("android/opengl/GLDebugHelper");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "wrap", "(Ljavax/microedition/khronos/opengles/GL;ILjava/io/Writer;)Ljavax/microedition/khronos/opengles/GL;");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0, _arg1, _arg2);
::javax::microedition::khronos::opengles::GL _ret(ret);
return _ret;
}
::javax::microedition::khronos::egl::EGL android::opengl::GLDebugHelper::wrap(const ::javax::microedition::khronos::egl::EGL& arg0, int32_t arg1, const ::java::io::Writer& arg2){
if (!::android::opengl::GLDebugHelper::_class) ::android::opengl::GLDebugHelper::_class = java::fetch_class("android/opengl/GLDebugHelper");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "wrap", "(Ljavax/microedition/khronos/egl/EGL;ILjava/io/Writer;)Ljavax/microedition/khronos/egl/EGL;");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0, _arg1, _arg2);
::javax::microedition::khronos::egl::EGL _ret(ret);
return _ret;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::Matrix::Matrix() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::Matrix::multiplyMM(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, const std::vector< float>& arg4, int32_t arg5){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "multiplyMM", "([FI[FI[FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
jfloatArray _arg4 = java::jni->NewFloatArray(arg4.size());
java::jni->SetFloatArrayRegion(_arg4, 0, arg4.size(), arg4.data());
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::Matrix::multiplyMV(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, const std::vector< float>& arg4, int32_t arg5){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "multiplyMV", "([FI[FI[FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
jfloatArray _arg4 = java::jni->NewFloatArray(arg4.size());
java::jni->SetFloatArrayRegion(_arg4, 0, arg4.size(), arg4.data());
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::Matrix::transposeM(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "transposeM", "([FI[FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
bool android::opengl::Matrix::invertM(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "invertM", "([FI[FI)Z");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::Matrix::orthoM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4, float arg5, float arg6, float arg7){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "orthoM", "([FIFFFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
float _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::Matrix::frustumM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4, float arg5, float arg6, float arg7){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "frustumM", "([FIFFFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
float _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::Matrix::perspectiveM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "perspectiveM", "([FIFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
float android::opengl::Matrix::length(float arg0, float arg1, float arg2){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "length", "(FFF)F");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
return java::jni->CallStaticFloatMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::Matrix::setIdentityM(const std::vector< float>& arg0, int32_t arg1){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "setIdentityM", "([FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::Matrix::scaleM(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, float arg4, float arg5, float arg6){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "scaleM", "([FI[FIFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
void android::opengl::Matrix::scaleM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "scaleM", "([FIFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::Matrix::translateM(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, float arg4, float arg5, float arg6){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "translateM", "([FI[FIFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
void android::opengl::Matrix::translateM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "translateM", "([FIFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::Matrix::rotateM(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, float arg4, float arg5, float arg6, float arg7){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "rotateM", "([FI[FIFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
float _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::Matrix::rotateM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "rotateM", "([FIFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::Matrix::setRotateM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "setRotateM", "([FIFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::Matrix::setRotateEulerM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "setRotateEulerM", "([FIFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::Matrix::setLookAtM(const std::vector< float>& arg0, int32_t arg1, float arg2, float arg3, float arg4, float arg5, float arg6, float arg7, float arg8, float arg9, float arg10){
if (!::android::opengl::Matrix::_class) ::android::opengl::Matrix::_class = java::fetch_class("android/opengl/Matrix");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "setLookAtM", "([FIFFFFFFFFF)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
float _arg7 = arg7;
float _arg8 = arg8;
float _arg9 = arg9;
float _arg10 = arg10;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
}
int32_t android::opengl::GLUtils::getInternalFormat(const ::android::graphics::Bitmap& arg0){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "getInternalFormat", "(Landroid/graphics/Bitmap;)I");
jobject _arg0 = arg0.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
int32_t android::opengl::GLUtils::getType(const ::android::graphics::Bitmap& arg0){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "getType", "(Landroid/graphics/Bitmap;)I");
jobject _arg0 = arg0.obj;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
void android::opengl::GLUtils::texImage2D(int32_t arg0, int32_t arg1, int32_t arg2, const ::android::graphics::Bitmap& arg3, int32_t arg4){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "texImage2D", "(IIILandroid/graphics/Bitmap;I)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLUtils::texImage2D(int32_t arg0, int32_t arg1, int32_t arg2, const ::android::graphics::Bitmap& arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "texImage2D", "(IIILandroid/graphics/Bitmap;II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLUtils::texImage2D(int32_t arg0, int32_t arg1, const ::android::graphics::Bitmap& arg2, int32_t arg3){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "texImage2D", "(IILandroid/graphics/Bitmap;I)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLUtils::texSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, const ::android::graphics::Bitmap& arg4){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "texSubImage2D", "(IIIILandroid/graphics/Bitmap;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
jobject _arg4 = arg4.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLUtils::texSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, const ::android::graphics::Bitmap& arg4, int32_t arg5, int32_t arg6){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "texSubImage2D", "(IIIILandroid/graphics/Bitmap;II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
jobject _arg4 = arg4.obj;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
::java::lang::String android::opengl::GLUtils::getEGLErrorString(int32_t arg0){
if (!::android::opengl::GLUtils::_class) ::android::opengl::GLUtils::_class = java::fetch_class("android/opengl/GLUtils");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "getEGLErrorString", "(I)Ljava/lang/String;");
int32_t _arg0 = arg0;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::java::lang::String _ret(ret);
return _ret;
}
::javax::microedition::khronos::egl::EGLConfig android::opengl::GLSurfaceView_EGLConfigChooser::chooseConfig(const ::javax::microedition::khronos::egl::EGL10& arg0, const ::javax::microedition::khronos::egl::EGLDisplay& arg1) const {
if (!::android::opengl::GLSurfaceView_EGLConfigChooser::_class) ::android::opengl::GLSurfaceView_EGLConfigChooser::_class = java::fetch_class("android/opengl/GLSurfaceView$EGLConfigChooser");
static jmethodID mid = java::jni->GetMethodID(_class, "chooseConfig", "(Ljavax/microedition/khronos/egl/EGL10;Ljavax/microedition/khronos/egl/EGLDisplay;)Ljavax/microedition/khronos/egl/EGLConfig;");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
jobject ret = java::jni->CallObjectMethod(obj, mid, _arg0, _arg1);
::javax::microedition::khronos::egl::EGLConfig _ret(ret);
return _ret;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLES11Ext::GLES11Ext() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::GLES11Ext::glBlendEquationSeparateOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendEquationSeparateOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glBlendFuncSeparateOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendFuncSeparateOES", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glBlendEquationOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendEquationOES", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glDrawTexsOES(int16_t arg0, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexsOES", "(SSSSS)V");
int16_t _arg0 = arg0;
int16_t _arg1 = arg1;
int16_t _arg2 = arg2;
int16_t _arg3 = arg3;
int16_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glDrawTexiOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexiOES", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glDrawTexxOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexxOES", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glDrawTexsvOES(const std::vector< int16_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexsvOES", "([SI)V");
jshortArray _arg0 = java::jni->NewShortArray(arg0.size());
java::jni->SetShortArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glDrawTexsvOES(const ::java::nio::ShortBuffer& arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexsvOES", "(Ljava/nio/ShortBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glDrawTexivOES(const std::vector< int32_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexivOES", "([II)V");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glDrawTexivOES(const ::java::nio::IntBuffer& arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexivOES", "(Ljava/nio/IntBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glDrawTexxvOES(const std::vector< int32_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexxvOES", "([II)V");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glDrawTexxvOES(const ::java::nio::IntBuffer& arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexxvOES", "(Ljava/nio/IntBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glDrawTexfOES(float arg0, float arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexfOES", "(FFFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glDrawTexfvOES(const std::vector< float>& arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexfvOES", "([FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glDrawTexfvOES(const ::java::nio::FloatBuffer& arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawTexfvOES", "(Ljava/nio/FloatBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glEGLImageTargetTexture2DOES(int32_t arg0, const ::java::nio::Buffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glEGLImageTargetTexture2DOES", "(ILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glEGLImageTargetRenderbufferStorageOES(int32_t arg0, const ::java::nio::Buffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glEGLImageTargetRenderbufferStorageOES", "(ILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glAlphaFuncxOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glAlphaFuncxOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glClearColorxOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearColorxOES", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glClearDepthxOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearDepthxOES", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glClipPlanexOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanexOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glClipPlanexOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanexOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glColor4xOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColor4xOES", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glDepthRangexOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthRangexOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glFogxOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogxOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glFogxvOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogxvOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glFogxvOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogxvOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glFrustumxOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFrustumxOES", "(IIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES11Ext::glGetClipPlanexOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanexOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetClipPlanexOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanexOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glGetFixedvOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFixedvOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetFixedvOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFixedvOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glGetLightxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetLightxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetLightxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetLightxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetMaterialxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetMaterialxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetMaterialxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetMaterialxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetTexEnvxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnvxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetTexEnvxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexEnvxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetTexParameterxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetTexParameterxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexParameterxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glLightModelxOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelxOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glLightModelxvOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelxvOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glLightModelxvOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelxvOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glLightxOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightxOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glLightxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glLightxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glLineWidthxOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLineWidthxOES", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glLoadMatrixxOES(const std::vector< int32_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadMatrixxOES", "([II)V");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glLoadMatrixxOES(const ::java::nio::IntBuffer& arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadMatrixxOES", "(Ljava/nio/IntBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glMaterialxOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialxOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glMaterialxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glMaterialxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glMultMatrixxOES(const std::vector< int32_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultMatrixxOES", "([II)V");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glMultMatrixxOES(const ::java::nio::IntBuffer& arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultMatrixxOES", "(Ljava/nio/IntBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glMultiTexCoord4xOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultiTexCoord4xOES", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glNormal3xOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glNormal3xOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glOrthoxOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glOrthoxOES", "(IIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES11Ext::glPointParameterxOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterxOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glPointParameterxvOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterxvOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glPointParameterxvOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointParameterxvOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glPointSizexOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointSizexOES", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glPolygonOffsetxOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPolygonOffsetxOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glRotatexOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glRotatexOES", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glSampleCoveragexOES(int32_t arg0, bool arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glSampleCoveragexOES", "(IZ)V");
int32_t _arg0 = arg0;
bool _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glScalexOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glScalexOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexEnvxOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvxOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexEnvxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glTexEnvxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexParameterxOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterxOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexParameterxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glTexParameterxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTranslatexOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTranslatexOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
bool android::opengl::GLES11Ext::glIsRenderbufferOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsRenderbufferOES", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glBindRenderbufferOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindRenderbufferOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glDeleteRenderbuffersOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteRenderbuffersOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glDeleteRenderbuffersOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteRenderbuffersOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glGenRenderbuffersOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenRenderbuffersOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGenRenderbuffersOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenRenderbuffersOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glRenderbufferStorageOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glRenderbufferStorageOES", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetRenderbufferParameterivOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetRenderbufferParameterivOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetRenderbufferParameterivOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetRenderbufferParameterivOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
bool android::opengl::GLES11Ext::glIsFramebufferOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glIsFramebufferOES", "(I)Z");
int32_t _arg0 = arg0;
return java::jni->CallStaticBooleanMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glBindFramebufferOES(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindFramebufferOES", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glDeleteFramebuffersOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteFramebuffersOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glDeleteFramebuffersOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteFramebuffersOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glGenFramebuffersOES(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenFramebuffersOES", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGenFramebuffersOES(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenFramebuffersOES", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
int32_t android::opengl::GLES11Ext::glCheckFramebufferStatusOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCheckFramebufferStatusOES", "(I)I");
int32_t _arg0 = arg0;
return java::jni->CallStaticIntMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glFramebufferRenderbufferOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFramebufferRenderbufferOES", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glFramebufferTexture2DOES(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFramebufferTexture2DOES", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glGetFramebufferAttachmentParameterivOES(int32_t arg0, int32_t arg1, int32_t arg2, const std::vector< int32_t>& arg3, int32_t arg4){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFramebufferAttachmentParameterivOES", "(III[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jintArray _arg3 = java::jni->NewIntArray(arg3.size());
java::jni->SetIntArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES11Ext::glGetFramebufferAttachmentParameterivOES(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::IntBuffer& arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetFramebufferAttachmentParameterivOES", "(IIILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGenerateMipmapOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenerateMipmapOES", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glCurrentPaletteMatrixOES(int32_t arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCurrentPaletteMatrixOES", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glLoadPaletteFromModelViewMatrixOES(){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadPaletteFromModelViewMatrixOES", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES11Ext::glMatrixIndexPointerOES(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMatrixIndexPointerOES", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glWeightPointerOES(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glWeightPointerOES", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glDepthRangefOES(float arg0, float arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthRangefOES", "(FF)V");
float _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glFrustumfOES(float arg0, float arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFrustumfOES", "(FFFFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES11Ext::glOrthofOES(float arg0, float arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glOrthofOES", "(FFFFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES11Ext::glClipPlanefOES(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanefOES", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glClipPlanefOES(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClipPlanefOES", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glGetClipPlanefOES(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanefOES", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetClipPlanefOES(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetClipPlanefOES", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES11Ext::glClearDepthfOES(float arg0){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearDepthfOES", "(F)V");
float _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES11Ext::glTexGenfOES(int32_t arg0, int32_t arg1, float arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenfOES", "(IIF)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexGenfvOES(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenfvOES", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glTexGenfvOES(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenfvOES", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexGeniOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGeniOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexGenivOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenivOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glTexGenivOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenivOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexGenxOES(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenxOES", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glTexGenxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glTexGenxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexGenxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetTexGenfvOES(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexGenfvOES", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetTexGenfvOES(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexGenfvOES", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetTexGenivOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexGenivOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetTexGenivOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexGenivOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES11Ext::glGetTexGenxvOES(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexGenxvOES", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES11Ext::glGetTexGenxvOES(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES11Ext::_class) ::android::opengl::GLES11Ext::_class = java::fetch_class("android/opengl/GLES11Ext");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetTexGenxvOES", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::Visibility::Visibility() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::Visibility::_class) ::android::opengl::Visibility::_class = java::fetch_class("android/opengl/Visibility");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
int32_t android::opengl::Visibility::visibilityTest(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, const std::vector< uint16_t>& arg4, int32_t arg5, int32_t arg6){
if (!::android::opengl::Visibility::_class) ::android::opengl::Visibility::_class = java::fetch_class("android/opengl/Visibility");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "visibilityTest", "([FI[FI[CII)I");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
jcharArray _arg4 = java::jni->NewCharArray(arg4.size());
java::jni->SetCharArrayRegion(_arg4, 0, arg4.size(), arg4.data());
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
int32_t android::opengl::Visibility::frustumCullSpheres(const std::vector< float>& arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3, int32_t arg4, const std::vector< int32_t>& arg5, int32_t arg6, int32_t arg7){
if (!::android::opengl::Visibility::_class) ::android::opengl::Visibility::_class = java::fetch_class("android/opengl/Visibility");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "frustumCullSpheres", "([FI[FII[III)I");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
jintArray _arg5 = java::jni->NewIntArray(arg5.size());
java::jni->SetIntArrayRegion(_arg5, 0, arg5.size(), arg5.data());
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::Visibility::computeBoundingSphere(const std::vector< float>& arg0, int32_t arg1, int32_t arg2, const std::vector< float>& arg3, int32_t arg4){
if (!::android::opengl::Visibility::_class) ::android::opengl::Visibility::_class = java::fetch_class("android/opengl/Visibility");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "computeBoundingSphere", "([FII[FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jfloatArray _arg3 = java::jni->NewFloatArray(arg3.size());
java::jni->SetFloatArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLSurfaceView_Renderer::onSurfaceCreated(const ::javax::microedition::khronos::opengles::GL10& arg0, const ::javax::microedition::khronos::egl::EGLConfig& arg1) const {
if (!::android::opengl::GLSurfaceView_Renderer::_class) ::android::opengl::GLSurfaceView_Renderer::_class = java::fetch_class("android/opengl/GLSurfaceView$Renderer");
static jmethodID mid = java::jni->GetMethodID(_class, "onSurfaceCreated", "(Ljavax/microedition/khronos/opengles/GL10;Ljavax/microedition/khronos/egl/EGLConfig;)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
java::jni->CallVoidMethod(obj, mid, _arg0, _arg1);
}
void android::opengl::GLSurfaceView_Renderer::onSurfaceChanged(const ::javax::microedition::khronos::opengles::GL10& arg0, int32_t arg1, int32_t arg2) const {
if (!::android::opengl::GLSurfaceView_Renderer::_class) ::android::opengl::GLSurfaceView_Renderer::_class = java::fetch_class("android/opengl/GLSurfaceView$Renderer");
static jmethodID mid = java::jni->GetMethodID(_class, "onSurfaceChanged", "(Ljavax/microedition/khronos/opengles/GL10;II)V");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallVoidMethod(obj, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLSurfaceView_Renderer::onDrawFrame(const ::javax::microedition::khronos::opengles::GL10& arg0) const {
if (!::android::opengl::GLSurfaceView_Renderer::_class) ::android::opengl::GLSurfaceView_Renderer::_class = java::fetch_class("android/opengl/GLSurfaceView$Renderer");
static jmethodID mid = java::jni->GetMethodID(_class, "onDrawFrame", "(Ljavax/microedition/khronos/opengles/GL10;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLES10::GLES10() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::GLES10::glActiveTexture(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glActiveTexture", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glAlphaFunc(int32_t arg0, float arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glAlphaFunc", "(IF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glAlphaFuncx(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glAlphaFuncx", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glBindTexture(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBindTexture", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glBlendFunc(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glBlendFunc", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glClear(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClear", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glClearColor(float arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearColor", "(FFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glClearColorx(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearColorx", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glClearDepthf(float arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearDepthf", "(F)V");
float _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glClearDepthx(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearDepthx", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glClearStencil(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClearStencil", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glClientActiveTexture(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glClientActiveTexture", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glColor4f(float arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColor4f", "(FFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glColor4x(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColor4x", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glColorMask(bool arg0, bool arg1, bool arg2, bool arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColorMask", "(ZZZZ)V");
bool _arg0 = arg0;
bool _arg1 = arg1;
bool _arg2 = arg2;
bool _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glColorPointer(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glColorPointer", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glCompressedTexImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, const ::java::nio::Buffer& arg7){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
jobject _arg7 = arg7.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::GLES10::glCompressedTexSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, const ::java::nio::Buffer& arg8){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
jobject _arg8 = arg8.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
void android::opengl::GLES10::glCopyTexImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCopyTexImage2D", "(IIIIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::GLES10::glCopyTexSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCopyTexSubImage2D", "(IIIIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
}
void android::opengl::GLES10::glCullFace(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glCullFace", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glDeleteTextures(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteTextures", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glDeleteTextures(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDeleteTextures", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glDepthFunc(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthFunc", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glDepthMask(bool arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthMask", "(Z)V");
bool _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glDepthRangef(float arg0, float arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthRangef", "(FF)V");
float _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glDepthRangex(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDepthRangex", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glDisable(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDisable", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glDisableClientState(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDisableClientState", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glDrawArrays(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawArrays", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glDrawElements(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glDrawElements", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glEnable(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glEnable", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glEnableClientState(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glEnableClientState", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glFinish(){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFinish", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES10::glFlush(){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFlush", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES10::glFogf(int32_t arg0, float arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogf", "(IF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glFogfv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogfv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glFogfv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogfv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glFogx(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogx", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glFogxv(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogxv", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glFogxv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFogxv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glFrontFace(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFrontFace", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glFrustumf(float arg0, float arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFrustumf", "(FFFFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES10::glFrustumx(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glFrustumx", "(IIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES10::glGenTextures(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenTextures", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glGenTextures(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGenTextures", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
int32_t android::opengl::GLES10::glGetError(){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetError", "()I");
return java::jni->CallStaticIntMethod(_class, mid);
}
void android::opengl::GLES10::glGetIntegerv(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetIntegerv", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glGetIntegerv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetIntegerv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
::java::lang::String android::opengl::GLES10::glGetString(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glGetString", "(I)Ljava/lang/String;");
int32_t _arg0 = arg0;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::java::lang::String _ret(ret);
return _ret;
}
void android::opengl::GLES10::glHint(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glHint", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLightModelf(int32_t arg0, float arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelf", "(IF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLightModelfv(int32_t arg0, const std::vector< float>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelfv", "(I[FI)V");
int32_t _arg0 = arg0;
jfloatArray _arg1 = java::jni->NewFloatArray(arg1.size());
java::jni->SetFloatArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glLightModelfv(int32_t arg0, const ::java::nio::FloatBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelfv", "(ILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLightModelx(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelx", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLightModelxv(int32_t arg0, const std::vector< int32_t>& arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelxv", "(I[II)V");
int32_t _arg0 = arg0;
jintArray _arg1 = java::jni->NewIntArray(arg1.size());
java::jni->SetIntArrayRegion(_arg1, 0, arg1.size(), arg1.data());
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glLightModelxv(int32_t arg0, const ::java::nio::IntBuffer& arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightModelxv", "(ILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLightf(int32_t arg0, int32_t arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightf", "(IIF)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glLightfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glLightfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glLightx(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightx", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glLightxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glLightxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLightxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glLineWidth(float arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLineWidth", "(F)V");
float _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glLineWidthx(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLineWidthx", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glLoadIdentity(){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadIdentity", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES10::glLoadMatrixf(const std::vector< float>& arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadMatrixf", "([FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLoadMatrixf(const ::java::nio::FloatBuffer& arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadMatrixf", "(Ljava/nio/FloatBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glLoadMatrixx(const std::vector< int32_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadMatrixx", "([II)V");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glLoadMatrixx(const ::java::nio::IntBuffer& arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLoadMatrixx", "(Ljava/nio/IntBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glLogicOp(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glLogicOp", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glMaterialf(int32_t arg0, int32_t arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialf", "(IIF)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glMaterialfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glMaterialfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glMaterialx(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialx", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glMaterialxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glMaterialxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMaterialxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glMatrixMode(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMatrixMode", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glMultMatrixf(const std::vector< float>& arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultMatrixf", "([FI)V");
jfloatArray _arg0 = java::jni->NewFloatArray(arg0.size());
java::jni->SetFloatArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glMultMatrixf(const ::java::nio::FloatBuffer& arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultMatrixf", "(Ljava/nio/FloatBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glMultMatrixx(const std::vector< int32_t>& arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultMatrixx", "([II)V");
jintArray _arg0 = java::jni->NewIntArray(arg0.size());
java::jni->SetIntArrayRegion(_arg0, 0, arg0.size(), arg0.data());
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glMultMatrixx(const ::java::nio::IntBuffer& arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultMatrixx", "(Ljava/nio/IntBuffer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glMultiTexCoord4f(int32_t arg0, float arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultiTexCoord4f", "(IFFFF)V");
int32_t _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES10::glMultiTexCoord4x(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glMultiTexCoord4x", "(IIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLES10::glNormal3f(float arg0, float arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glNormal3f", "(FFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glNormal3x(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glNormal3x", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glNormalPointer(int32_t arg0, int32_t arg1, const ::java::nio::Buffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glNormalPointer", "(IILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glOrthof(float arg0, float arg1, float arg2, float arg3, float arg4, float arg5){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glOrthof", "(FFFFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES10::glOrthox(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glOrthox", "(IIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLES10::glPixelStorei(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPixelStorei", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glPointSize(float arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointSize", "(F)V");
float _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glPointSizex(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPointSizex", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glPolygonOffset(float arg0, float arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPolygonOffset", "(FF)V");
float _arg0 = arg0;
float _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glPolygonOffsetx(int32_t arg0, int32_t arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPolygonOffsetx", "(II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glPopMatrix(){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPopMatrix", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES10::glPushMatrix(){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glPushMatrix", "()V");
java::jni->CallStaticVoidMethod(_class, mid);
}
void android::opengl::GLES10::glReadPixels(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, const ::java::nio::Buffer& arg6){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glReadPixels", "(IIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
jobject _arg6 = arg6.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
void android::opengl::GLES10::glRotatef(float arg0, float arg1, float arg2, float arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glRotatef", "(FFFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glRotatex(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glRotatex", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glSampleCoverage(float arg0, bool arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glSampleCoverage", "(FZ)V");
float _arg0 = arg0;
bool _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glSampleCoveragex(int32_t arg0, bool arg1){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glSampleCoveragex", "(IZ)V");
int32_t _arg0 = arg0;
bool _arg1 = arg1;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
void android::opengl::GLES10::glScalef(float arg0, float arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glScalef", "(FFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glScalex(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glScalex", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glScissor(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glScissor", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glShadeModel(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glShadeModel", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glStencilFunc(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilFunc", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glStencilMask(int32_t arg0){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilMask", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallStaticVoidMethod(_class, mid, _arg0);
}
void android::opengl::GLES10::glStencilOp(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glStencilOp", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexCoordPointer(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexCoordPointer", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glTexEnvf(int32_t arg0, int32_t arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvf", "(IIF)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexEnvfv(int32_t arg0, int32_t arg1, const std::vector< float>& arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvfv", "(II[FI)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jfloatArray _arg2 = java::jni->NewFloatArray(arg2.size());
java::jni->SetFloatArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glTexEnvfv(int32_t arg0, int32_t arg1, const ::java::nio::FloatBuffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvfv", "(IILjava/nio/FloatBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexEnvx(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvx", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexEnvxv(int32_t arg0, int32_t arg1, const std::vector< int32_t>& arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvxv", "(II[II)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jintArray _arg2 = java::jni->NewIntArray(arg2.size());
java::jni->SetIntArrayRegion(_arg2, 0, arg2.size(), arg2.data());
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glTexEnvxv(int32_t arg0, int32_t arg1, const ::java::nio::IntBuffer& arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexEnvxv", "(IILjava/nio/IntBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, const ::java::nio::Buffer& arg8){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
jobject _arg8 = arg8.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
void android::opengl::GLES10::glTexParameterf(int32_t arg0, int32_t arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterf", "(IIF)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexParameterx(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexParameterx", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTexSubImage2D(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, const ::java::nio::Buffer& arg8){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
int32_t _arg6 = arg6;
int32_t _arg7 = arg7;
jobject _arg8 = arg8.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
void android::opengl::GLES10::glTranslatef(float arg0, float arg1, float arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTranslatef", "(FFF)V");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glTranslatex(int32_t arg0, int32_t arg1, int32_t arg2){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glTranslatex", "(III)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2);
}
void android::opengl::GLES10::glVertexPointer(int32_t arg0, int32_t arg1, int32_t arg2, const ::java::nio::Buffer& arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glVertexPointer", "(IIILjava/nio/Buffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
jobject _arg3 = arg3.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLES10::glViewport(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3){
if (!::android::opengl::GLES10::_class) ::android::opengl::GLES10::_class = java::fetch_class("android/opengl/GLES10");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "glViewport", "(IIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLSurfaceView::GLSurfaceView(const ::android::content::Context& arg0) : ::java::lang::Object((jobject)0), ::android::graphics::drawable::Drawable_Callback((jobject)0), ::android::view::KeyEvent_Callback((jobject)0), ::android::view::SurfaceHolder_Callback((jobject)0), ::android::view::SurfaceView((jobject)0), ::android::view::View((jobject)0), ::android::view::accessibility::AccessibilityEventSource((jobject)0) {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "(Landroid/content/Context;)V");
jobject _arg0 = arg0.obj;
obj = java::jni->NewObject(_class, mid, _arg0);
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLSurfaceView::GLSurfaceView(const ::android::content::Context& arg0, const ::android::util::AttributeSet& arg1) : ::java::lang::Object((jobject)0), ::android::graphics::drawable::Drawable_Callback((jobject)0), ::android::view::KeyEvent_Callback((jobject)0), ::android::view::SurfaceHolder_Callback((jobject)0), ::android::view::SurfaceView((jobject)0), ::android::view::View((jobject)0), ::android::view::accessibility::AccessibilityEventSource((jobject)0) {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
obj = java::jni->NewObject(_class, mid, _arg0, _arg1);
}
#pragma GCC diagnostic pop
void android::opengl::GLSurfaceView::setGLWrapper(const ::android::opengl::GLSurfaceView_GLWrapper& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setGLWrapper", "(Landroid/opengl/GLSurfaceView$GLWrapper;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setDebugFlags(int32_t arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setDebugFlags", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
int32_t android::opengl::GLSurfaceView::getDebugFlags() const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "getDebugFlags", "()I");
return java::jni->CallIntMethod(obj, mid);
}
void android::opengl::GLSurfaceView::setPreserveEGLContextOnPause(bool arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setPreserveEGLContextOnPause", "(Z)V");
bool _arg0 = arg0;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
bool android::opengl::GLSurfaceView::getPreserveEGLContextOnPause() const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "getPreserveEGLContextOnPause", "()Z");
return java::jni->CallBooleanMethod(obj, mid);
}
void android::opengl::GLSurfaceView::setRenderer(const ::android::opengl::GLSurfaceView_Renderer& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setRenderer", "(Landroid/opengl/GLSurfaceView$Renderer;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setEGLContextFactory(const ::android::opengl::GLSurfaceView_EGLContextFactory& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setEGLContextFactory", "(Landroid/opengl/GLSurfaceView$EGLContextFactory;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setEGLWindowSurfaceFactory(const ::android::opengl::GLSurfaceView_EGLWindowSurfaceFactory& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setEGLWindowSurfaceFactory", "(Landroid/opengl/GLSurfaceView$EGLWindowSurfaceFactory;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setEGLConfigChooser(const ::android::opengl::GLSurfaceView_EGLConfigChooser& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setEGLConfigChooser", "(Landroid/opengl/GLSurfaceView$EGLConfigChooser;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setEGLConfigChooser(bool arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setEGLConfigChooser", "(Z)V");
bool _arg0 = arg0;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setEGLConfigChooser(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setEGLConfigChooser", "(IIIIII)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
int32_t _arg5 = arg5;
java::jni->CallVoidMethod(obj, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::GLSurfaceView::setEGLContextClientVersion(int32_t arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setEGLContextClientVersion", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::setRenderMode(int32_t arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "setRenderMode", "(I)V");
int32_t _arg0 = arg0;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
int32_t android::opengl::GLSurfaceView::getRenderMode() const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "getRenderMode", "()I");
return java::jni->CallIntMethod(obj, mid);
}
void android::opengl::GLSurfaceView::requestRender() const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "requestRender", "()V");
java::jni->CallVoidMethod(obj, mid);
}
void android::opengl::GLSurfaceView::surfaceCreated(const ::android::view::SurfaceHolder& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "surfaceCreated", "(Landroid/view/SurfaceHolder;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::surfaceDestroyed(const ::android::view::SurfaceHolder& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "surfaceDestroyed", "(Landroid/view/SurfaceHolder;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
void android::opengl::GLSurfaceView::surfaceChanged(const ::android::view::SurfaceHolder& arg0, int32_t arg1, int32_t arg2, int32_t arg3) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "surfaceChanged", "(Landroid/view/SurfaceHolder;III)V");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
java::jni->CallVoidMethod(obj, mid, _arg0, _arg1, _arg2, _arg3);
}
void android::opengl::GLSurfaceView::onPause() const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "onPause", "()V");
java::jni->CallVoidMethod(obj, mid);
}
void android::opengl::GLSurfaceView::onResume() const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "onResume", "()V");
java::jni->CallVoidMethod(obj, mid);
}
void android::opengl::GLSurfaceView::queueEvent(const ::java::lang::Runnable& arg0) const {
if (!::android::opengl::GLSurfaceView::_class) ::android::opengl::GLSurfaceView::_class = java::fetch_class("android/opengl/GLSurfaceView");
static jmethodID mid = java::jni->GetMethodID(_class, "queueEvent", "(Ljava/lang/Runnable;)V");
jobject _arg0 = arg0.obj;
java::jni->CallVoidMethod(obj, mid, _arg0);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::GLU::GLU() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
::java::lang::String android::opengl::GLU::gluErrorString(int32_t arg0){
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "gluErrorString", "(I)Ljava/lang/String;");
int32_t _arg0 = arg0;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::java::lang::String _ret(ret);
return _ret;
}
void android::opengl::GLU::gluLookAt(const ::javax::microedition::khronos::opengles::GL10& arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6, float arg7, float arg8, float arg9){
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "gluLookAt", "(Ljavax/microedition/khronos/opengles/GL10;FFFFFFFFF)V");
jobject _arg0 = arg0.obj;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
float _arg5 = arg5;
float _arg6 = arg6;
float _arg7 = arg7;
float _arg8 = arg8;
float _arg9 = arg9;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
}
void android::opengl::GLU::gluOrtho2D(const ::javax::microedition::khronos::opengles::GL10& arg0, float arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "gluOrtho2D", "(Ljavax/microedition/khronos/opengles/GL10;FFFF)V");
jobject _arg0 = arg0.obj;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
void android::opengl::GLU::gluPerspective(const ::javax::microedition::khronos::opengles::GL10& arg0, float arg1, float arg2, float arg3, float arg4){
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "gluPerspective", "(Ljavax/microedition/khronos/opengles/GL10;FFFF)V");
jobject _arg0 = arg0.obj;
float _arg1 = arg1;
float _arg2 = arg2;
float _arg3 = arg3;
float _arg4 = arg4;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
}
int32_t android::opengl::GLU::gluProject(float arg0, float arg1, float arg2, const std::vector< float>& arg3, int32_t arg4, const std::vector< float>& arg5, int32_t arg6, const std::vector< int32_t>& arg7, int32_t arg8, const std::vector< float>& arg9, int32_t arg10){
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "gluProject", "(FFF[FI[FI[II[FI)I");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
jfloatArray _arg3 = java::jni->NewFloatArray(arg3.size());
java::jni->SetFloatArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
jfloatArray _arg5 = java::jni->NewFloatArray(arg5.size());
java::jni->SetFloatArrayRegion(_arg5, 0, arg5.size(), arg5.data());
int32_t _arg6 = arg6;
jintArray _arg7 = java::jni->NewIntArray(arg7.size());
java::jni->SetIntArrayRegion(_arg7, 0, arg7.size(), arg7.data());
int32_t _arg8 = arg8;
jfloatArray _arg9 = java::jni->NewFloatArray(arg9.size());
java::jni->SetFloatArrayRegion(_arg9, 0, arg9.size(), arg9.data());
int32_t _arg10 = arg10;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
}
int32_t android::opengl::GLU::gluUnProject(float arg0, float arg1, float arg2, const std::vector< float>& arg3, int32_t arg4, const std::vector< float>& arg5, int32_t arg6, const std::vector< int32_t>& arg7, int32_t arg8, const std::vector< float>& arg9, int32_t arg10){
if (!::android::opengl::GLU::_class) ::android::opengl::GLU::_class = java::fetch_class("android/opengl/GLU");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "gluUnProject", "(FFF[FI[FI[II[FI)I");
float _arg0 = arg0;
float _arg1 = arg1;
float _arg2 = arg2;
jfloatArray _arg3 = java::jni->NewFloatArray(arg3.size());
java::jni->SetFloatArrayRegion(_arg3, 0, arg3.size(), arg3.data());
int32_t _arg4 = arg4;
jfloatArray _arg5 = java::jni->NewFloatArray(arg5.size());
java::jni->SetFloatArrayRegion(_arg5, 0, arg5.size(), arg5.data());
int32_t _arg6 = arg6;
jintArray _arg7 = java::jni->NewIntArray(arg7.size());
java::jni->SetIntArrayRegion(_arg7, 0, arg7.size(), arg7.data());
int32_t _arg8 = arg8;
jfloatArray _arg9 = java::jni->NewFloatArray(arg9.size());
java::jni->SetFloatArrayRegion(_arg9, 0, arg9.size(), arg9.data());
int32_t _arg10 = arg10;
return java::jni->CallStaticIntMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::ETC1Util_ETC1Texture::ETC1Util_ETC1Texture(int32_t arg0, int32_t arg1, const ::java::nio::ByteBuffer& arg2) : ::java::lang::Object((jobject)0) {
if (!::android::opengl::ETC1Util_ETC1Texture::_class) ::android::opengl::ETC1Util_ETC1Texture::_class = java::fetch_class("android/opengl/ETC1Util$ETC1Texture");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "(IILjava/nio/ByteBuffer;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
jobject _arg2 = arg2.obj;
obj = java::jni->NewObject(_class, mid, _arg0, _arg1, _arg2);
}
#pragma GCC diagnostic pop
int32_t android::opengl::ETC1Util_ETC1Texture::getWidth() const {
if (!::android::opengl::ETC1Util_ETC1Texture::_class) ::android::opengl::ETC1Util_ETC1Texture::_class = java::fetch_class("android/opengl/ETC1Util$ETC1Texture");
static jmethodID mid = java::jni->GetMethodID(_class, "getWidth", "()I");
return java::jni->CallIntMethod(obj, mid);
}
int32_t android::opengl::ETC1Util_ETC1Texture::getHeight() const {
if (!::android::opengl::ETC1Util_ETC1Texture::_class) ::android::opengl::ETC1Util_ETC1Texture::_class = java::fetch_class("android/opengl/ETC1Util$ETC1Texture");
static jmethodID mid = java::jni->GetMethodID(_class, "getHeight", "()I");
return java::jni->CallIntMethod(obj, mid);
}
::java::nio::ByteBuffer android::opengl::ETC1Util_ETC1Texture::getData() const {
if (!::android::opengl::ETC1Util_ETC1Texture::_class) ::android::opengl::ETC1Util_ETC1Texture::_class = java::fetch_class("android/opengl/ETC1Util$ETC1Texture");
static jmethodID mid = java::jni->GetMethodID(_class, "getData", "()Ljava/nio/ByteBuffer;");
jobject ret = java::jni->CallObjectMethod(obj, mid);
::java::nio::ByteBuffer _ret(ret);
return _ret;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
::android::opengl::ETC1Util::ETC1Util() : ::java::lang::Object((jobject)0) {
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetMethodID(_class, "<init>", "()V");
obj = java::jni->NewObject(_class, mid);
}
#pragma GCC diagnostic pop
void android::opengl::ETC1Util::loadTexture(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, const ::java::io::InputStream& arg5){
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "loadTexture", "(IIIIILjava/io/InputStream;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
jobject _arg5 = arg5.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
void android::opengl::ETC1Util::loadTexture(int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, const ::android::opengl::ETC1Util_ETC1Texture& arg5){
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "loadTexture", "(IIIIILandroid/opengl/ETC1Util$ETC1Texture;)V");
int32_t _arg0 = arg0;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
jobject _arg5 = arg5.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
}
bool android::opengl::ETC1Util::isETC1Supported(){
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "isETC1Supported", "()Z");
return java::jni->CallStaticBooleanMethod(_class, mid);
}
::android::opengl::ETC1Util_ETC1Texture android::opengl::ETC1Util::createTexture(const ::java::io::InputStream& arg0){
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "createTexture", "(Ljava/io/InputStream;)Landroid/opengl/ETC1Util$ETC1Texture;");
jobject _arg0 = arg0.obj;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0);
::android::opengl::ETC1Util_ETC1Texture _ret(ret);
return _ret;
}
::android::opengl::ETC1Util_ETC1Texture android::opengl::ETC1Util::compressTexture(const ::java::nio::Buffer& arg0, int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4){
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "compressTexture", "(Ljava/nio/Buffer;IIII)Landroid/opengl/ETC1Util$ETC1Texture;");
jobject _arg0 = arg0.obj;
int32_t _arg1 = arg1;
int32_t _arg2 = arg2;
int32_t _arg3 = arg3;
int32_t _arg4 = arg4;
jobject ret = java::jni->CallStaticObjectMethod(_class, mid, _arg0, _arg1, _arg2, _arg3, _arg4);
::android::opengl::ETC1Util_ETC1Texture _ret(ret);
return _ret;
}
void android::opengl::ETC1Util::writeTexture(const ::android::opengl::ETC1Util_ETC1Texture& arg0, const ::java::io::OutputStream& arg1){
if (!::android::opengl::ETC1Util::_class) ::android::opengl::ETC1Util::_class = java::fetch_class("android/opengl/ETC1Util");
static jmethodID mid = java::jni->GetStaticMethodID(_class, "writeTexture", "(Landroid/opengl/ETC1Util$ETC1Texture;Ljava/io/OutputStream;)V");
jobject _arg0 = arg0.obj;
jobject _arg1 = arg1.obj;
java::jni->CallStaticVoidMethod(_class, mid, _arg0, _arg1);
}
|
2450553bc25e7725a06e2006142d1205179fbcbb
|
7ff190f15df5e16dc773e27c423d705bff9b366c
|
/Day_2/pattern2.cpp
|
d30cd36644437fa33efa4b8b165dc95747f52622
|
[] |
no_license
|
sreedhar-s/Homework_NR_Ace_Coding
|
3264f91f1c46a82911cd5f556cbabaaee5d17c4d
|
be664a90fbc7c4d68b7d67cc9d870d7edfaa9cff
|
refs/heads/master
| 2023-08-31T17:53:52.159412
| 2021-10-11T16:15:59
| 2021-10-11T16:15:59
| 411,726,372
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 390
|
cpp
|
pattern2.cpp
|
#include<iostream>
using namespace std;
int main(){
int n;
cout<<"Enter the value of n : ";
cin >> n;
for(int r=1;r<=n-r;r++){
//Printing n-r spaces
for(int i=1;i<=n-r;i++){
cout << " ";
}
//printing 2*n-1 stars
for(int i=1;i<=2*r-1;i++){
cout << "*";
}
cout<<"\n";
}
}
|
93298484eaf17f4552aa9860a1a15dd320ec8cb8
|
cc1150a32b40ec3944906645054967efd67ecb16
|
/laboratorio2/src/Triangle.cpp
|
4c0e9e520dccea246412e8d018a9dccf0b02d568
|
[] |
no_license
|
Milagros12345/clasess
|
920b2f99ce17345df13b3585581c85bd0565cc82
|
daca4f18d26b8f6f3f4fa6bac67379608d9d6d20
|
refs/heads/master
| 2020-04-03T17:55:54.329688
| 2019-02-01T14:17:16
| 2019-02-01T14:17:16
| 155,464,327
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 112
|
cpp
|
Triangle.cpp
|
#include "Triangle.h"
Triangle::~Triangle()
{
//dtor
}
int Triangle::area(){return widht*height/2;}
|
073aef8519c151c16a9f02be1268a65e5c64a7cf
|
f6f619a491826f9b2c28f36f1ad75ad8eef2bc87
|
/Project/ZwRQY/ZwForWHRQY/DrawDMXProcess.cpp
|
016f2e57f6ce780808ae16b76f38da569ba785c2
|
[
"MIT"
] |
permissive
|
kanbang/SVN
|
92d942263b85f8e4a3acbc5b6a757a162571580d
|
643d360284842c20b189dcb022fb04efb0447498
|
refs/heads/master
| 2021-01-24T03:19:20.084291
| 2016-02-18T03:19:56
| 2016-02-18T03:19:56
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 7,135
|
cpp
|
DrawDMXProcess.cpp
|
#include "StdAfx.h"
#include "DrawDMXProcess.h"
#include "DrawZDM.h"
DrawDMXProcess::DrawDMXProcess(void)
{
CString strCount = CUtils::getNumCount();
m_nCout = MyTransFunc::StringToInt(strCount);
m_bDrawJiedian = CUtils::getcreateJiedian();
m_pZdmInfo = new CZdmDataInfo();
m_pZdmInfo->setCount(strCount);
CString strLabel = BC_DICT + strCount;
m_pZdmInfo->setLabel(strLabel);
if (m_nCout == 1)
{
m_dZhuanghao = 0.00;
m_dSJDmHeight = 0.00;
}
else
{
//如果不为1,需要取上一个存储数据中的数据
int nTmp = m_nCout - 1;
strCount.Format(_T("%d"), nTmp);
CString strTmpLabel = BC_DICT + strCount;
CBcUtils bcUtils;
CZdmDataInfo pBiaoChi = bcUtils.get(strTmpLabel);
m_dZhuanghao = pBiaoChi.getcurData();
m_dSJDmHeight = pBiaoChi.getDesignDmx();
}
m_dminElavation = CUtils::getMinElavation();
m_dmaxElavation = CUtils::getMaxElavation();
}
DrawDMXProcess::~DrawDMXProcess(void)
{
if (m_pZdmInfo != NULL)
{
delete m_pZdmInfo;
m_pZdmInfo = NULL;
}
}
bool DrawDMXProcess::Draw()
{
if (m_nCout == 1)
{
if (!GetStartZhuanghao())
{
return false;
}
}
int nRet = GetZhuanghao();
if (nRet == RTNORM)
{
if (m_bDrawJiedian)
{
GetIsJiedian();
}
if (!GetSJDmHeight())
{
return false;
}
if (!GetXzDmHeight())
{
return false;
}
CDrawZDM zdm;
zdm.setData(m_pZdmInfo);
AcDbObjectId groupId = zdm.Draw();
return true;
}
else if (nRet == RTKWORD)
{
return true;
}
else
{
return false;
}
//m_GroupIds.append(groupId);
return true;
}
bool DrawDMXProcess::Insert()
{
CString strPrompt;
strPrompt.Format(_T("\n起始桩号值<m> <%.2f>:"), m_dZhuanghao);
int nRet = acedGetReal(strPrompt, &m_dZhuanghao);
if (nRet == RTNORM)
{
//return true;
}
else if (nRet == RTNONE)
{
m_dZhuanghao = m_dZhuanghao;
}
else
{
return false;
}
CString strCur = CurNumPositon(m_dZhuanghao);
if (strCur.CompareNoCase(_T("0")) == 0)
{
return false;
}
CString strLabel = BC_DICT + strCur;
m_pZdmInfo->setLabel(strLabel);
m_pZdmInfo->setCount(strCur);
m_pZdmInfo->setcurData(m_dZhuanghao);
if (nRet == RTNORM)
{
if (m_bDrawJiedian)
{
GetIsJiedian();
}
if (!GetSJDmHeight())
{
return false;
}
if (!GetXzDmHeight())
{
return false;
}
CDrawZDM zdm;
zdm.setData(m_pZdmInfo);
AcDbObjectId groupId = zdm.insert();
return true;
}
else if (nRet == RTKWORD)
{
return true;
}
else
{
return false;
}
}
//交互相关
bool DrawDMXProcess::GetStartZhuanghao()
{
int nRet = acedGetReal(_T("\n布置地面线(现状及设计)...\n桩号基准<0>"), &m_dstartZhuanghao);
if (nRet == RTNORM)
{
//return true;
}
else if (nRet == RTNONE)
{
m_dstartZhuanghao = 0;
}
else
{
return false;
}
return true;
}
int DrawDMXProcess::GetZhuanghao()
{
CString strPrompt;
if (m_nCout == 1)
{
strPrompt.Format(_T("\n起始桩号值<m> <%.2f>:"), m_dZhuanghao);
}
else
{
acedInitGet(0, _T("Undo"));
strPrompt.Format(_T("\n回退一步(U)/<下一点桩号值> <m> <%.2f>:"), m_dZhuanghao);
}
int nRet = acedGetReal(strPrompt, &m_dZhuanghao);
if (nRet == RTNORM)
{
//return true;
}
else if (nRet == RTNONE)
{
m_dZhuanghao = m_dZhuanghao;
}
else if (nRet == RTKWORD)
{
doUndo();
return RTKWORD;
}
else
{
return RTERROR;
}
m_pZdmInfo->setcurData(m_dZhuanghao);
return RTNORM;
}
//是否节点
bool DrawDMXProcess::GetIsJiedian()
{
acedInitGet(0 , _T("Yes No"));
TCHAR szKword [132];
szKword[0] = _T('N'); //给szKword一个默认值N
szKword[1] = _T('\0');
int nRet = acedGetKword(_T("\n是否定节点号?>>是(Y)/否(N) <N>:"), szKword);
if (nRet == RTNORM) //如果得到合理的关键字
{
if (_tcscmp(szKword, _T("Yes")) == 0)
m_bDrawJiedian = true;
else if (_tcscmp(szKword, _T("No")) == 0)
m_bDrawJiedian = false;
}
else if (nRet == RTNONE) //如果用户输入为空值
{
m_bDrawJiedian = false;
}
CUtils::SetcreateJiedian(m_bDrawJiedian);
return m_bDrawJiedian;
}
//
bool DrawDMXProcess::GetSJDmHeight()
{
CString strPrompt;
strPrompt.Format(_T("\n设计地面标高<m> <%.2f>:"), m_dSJDmHeight);
bool bRet = false;
while(!bRet)
{
int nRet = acedGetReal(strPrompt, &m_dSJDmHeight);
if (nRet == RTNORM)
{
//return true;
if (verifyHeight(m_dSJDmHeight))
{
bRet = true;
}
}
else if (nRet == RTNONE)
{
m_dSJDmHeight = m_dSJDmHeight;
if (verifyHeight(m_dSJDmHeight))
{
bRet = true;
}
}
else
{
bRet = false;
//return false;
break;
}
}
m_pZdmInfo->setDesignDmx(m_dSJDmHeight);
return bRet;
}
bool DrawDMXProcess::GetXzDmHeight()
{
CString strPrompt;
strPrompt.Format(_T("\n现状地面标高<m> <%.2f>:"), m_dSJDmHeight);
bool bRet = false;
while(!bRet)
{
int nRet = acedGetReal(strPrompt, &m_dXzDmHeight);
if (nRet == RTNORM)
{
//return true;
if (verifyHeight(m_dXzDmHeight))
{
bRet = true;
}
}
else if (nRet == RTNONE)
{
m_dXzDmHeight = m_dSJDmHeight;
if (verifyHeight(m_dXzDmHeight))
{
bRet = true;
}
}
else
{
bRet = false;
break;
}
}
m_pZdmInfo->setRealDmx(m_dXzDmHeight);
return bRet;
}
bool DrawDMXProcess::verifyHeight( double dHeight )
{
if (dHeight < m_dminElavation)
{
AfxMessageBox(_T("地面线数据比基础地面线标高还低,请重新输入数据"));
return false;
}
if (dHeight > m_dmaxElavation)
{
AfxMessageBox(_T("地面线数据比基础地面线标高还高,请重新输入数据"));
return false;
}
return true;
}
bool DrawDMXProcess::doUndo()
{
int nTmp = m_nCout - 1;
CString strCount;
strCount.Format(_T("%d"), nTmp);
CString strTmpLabel = BC_DICT + strCount;
EraseEntFromDict(strTmpLabel);
CBcUtils utils;
utils.del(strTmpLabel);
CUtils::setNumCount(strCount);
return true;
}
bool DrawDMXProcess::EraseEntFromDict( CString strGroupName )
{
AcDbDictionary *pGroupDict;
AcDbGroup* pGroup = NULL;
acdbHostApplicationServices()->workingDatabase()->getGroupDictionary(pGroupDict, AcDb::kForWrite);
if (pGroupDict->getAt(strGroupName, (AcDbObject*&)pGroup, AcDb::kForWrite) != Acad::eOk)
{
pGroupDict->close();
return false;
}
Acad::ErrorStatus es;
AcDbEntity* pEnt = NULL;
AcDbObjectId objId;
AcDbObjectIdArray objIds;
objIds.removeAll();
int nLength = 0;
nLength = pGroup->allEntityIds(objIds);
for (int i=0; i<objIds.length(); i++)
{
objId = objIds.at(i);
es = acdbOpenAcDbEntity((AcDbEntity*&)pEnt, objId, AcDb::kForWrite);
if (es!= Acad::eOk)
{
pEnt->close();
}
else
{
pEnt->erase();
pEnt->close();
}
}
pGroup->erase();
pGroup->close();
pGroupDict->close();
return true;
}
CString DrawDMXProcess::CurNumPositon( double dValue )
{
CString strCur = _T("0");
double dZhuanghao;
CBcUtils bcUtils;
map<CString, CZdmDataInfo> data = bcUtils.getAllData();
for (map<CString, CZdmDataInfo>::iterator iter = data.begin();
iter != data.end();
++iter)
{
CZdmDataInfo pData = iter->second;
dZhuanghao = pData.getcurData();
//当桩号比真实值大时,说明位置就在这个地方
if (dZhuanghao > dValue)
{
strCur = pData.getCount();
break;
}
}
return strCur;
}
|
a2e5ce272425e9b62e188e6ac4569eedcd024587
|
f904c98f8e80cb9148b7c54831ecc2f5f52efb2b
|
/caffe2/operators/interp_op.cc
|
464781d3f9a32900a3d5b1618ea5efd1c126393d
|
[
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause",
"Apache-2.0"
] |
permissive
|
sunshineInmoon/caffe2
|
6c7d14c36d87e78bb8031fa6ed316221823f31c8
|
8205241b767993c35bfecd83d71fbdfb80310125
|
refs/heads/master
| 2021-04-15T15:39:17.021975
| 2018-03-26T15:58:01
| 2018-03-26T15:58:01
| 126,499,175
| 0
| 0
|
Apache-2.0
| 2018-03-23T14:49:13
| 2018-03-23T14:49:11
| null |
UTF-8
|
C++
| false
| false
| 9,355
|
cc
|
interp_op.cc
|
#include "caffe2/operators/interp_op.h"
#include "caffe2/core/tensor.h"
#include "caffe2/core/logging.h"
namespace caffe2 {
template <typename T, class Context>
void InterpOp<T,Context>::interp2(const int channels,
const T *data1, const int x1, const int y1, const int height1, const int width1, const int Height1, const int Width1,
T *data2, const int x2, const int y2, const int height2, const int width2, const int Height2, const int Width2){
CAFFE_ENFORCE(x1 >= 0 && y1 >= 0 && height1 > 0 && width1 > 0 && x2 >= 0 && y2 >= 0 && height2 > 0 && width2 > 0,"caffe_cpu_interp2() first check has errors!");
CAFFE_ENFORCE(Width1 >= width1 + x1 && Height1 >= height1 + y1 && Width2 >= width2 + x2 && Height2 >= height2 + y2,"caffe_cpu_interp2() second check has errors!");
// special case: just copy
if (height1 == height2 && width1 == width2) {
for (int h2 = 0; h2 < height2; ++h2) {
const int h1 = h2;
for (int w2 = 0; w2 < width2; ++w2) {
const int w1 = w2;
const T* pos1 = &data1[(y1 + h1) * Width1 + (x1 + w1)];
T* pos2 = &data2[(y2 + h2) * Width2 + (x2 + w2)];
for (int c = 0; c < channels; ++c) {
pos2[0] = pos1[0];
pos1 += Width1 * Height1;
pos2 += Width2 * Height2;
}
}
}
return;
}
const float rheight = (height2 > 1) ? static_cast<float>(height1 - 1) / (height2 - 1) : 0.f;
const float rwidth = (width2 > 1) ? static_cast<float>(width1 - 1) / (width2 - 1) : 0.f;
for (int h2 = 0; h2 < height2; ++h2) {
const float h1r = rheight * h2;
const int h1 = h1r;
const int h1p = (h1 < height1 - 1) ? 1 : 0;
const T h1lambda = h1r - h1;
const T h0lambda = T(1.) - h1lambda;
for (int w2 = 0; w2 < width2; ++w2) {
const float w1r = rwidth * w2;
const int w1 = w1r;
const int w1p = (w1 < width1 - 1) ? 1 : 0;
const T w1lambda = w1r - w1;
const T w0lambda = T(1.) - w1lambda;
const T* pos1 = &data1[(y1 + h1) * Width1 + (x1 + w1)];
T* pos2 = &data2[(y2 + h2) * Width2 + (x2 + w2)];
for (int c = 0; c < channels; ++c) {
pos2[0] =
h0lambda * (w0lambda * pos1[0] + w1lambda * pos1[w1p]) +
h1lambda * (w0lambda * pos1[h1p * Width1] + w1lambda * pos1[h1p * Width1 + w1p]);
pos1 += Width1 * Height1;
pos2 += Width2 * Height2;
}
}
}
}
template<>
bool InterpOp<float,CPUContext>::RunOnDevice(){
const auto& X = Input(0);
if(OperatorBase::InputSize()==2){
X_1.CopyFrom(Input(1));
}
num_ = X.dim32(0);
channels_ = X.dim32(1);
height_in_ = X.dim32(2);
width_in_ = X.dim32(3);
height_in_eff_ = height_in_ + pad_beg_ + pad_end_;
width_in_eff_ = width_in_ + pad_beg_ + pad_end_;
if (zoom_factor_ != 0) {
CAFFE_ENFORCE_GE(zoom_factor_, 1, "Zoom factor must be positive");
height_out_ = height_in_eff_ + (height_in_eff_ - 1) * (zoom_factor_ - 1);
width_out_ = width_in_eff_ + (width_in_eff_ - 1) * (zoom_factor_ - 1);
}
else if (shrink_factor_ != 0) {
CAFFE_ENFORCE_GE(shrink_factor_, 1, "Shrink factor must be positive");
height_out_ = (height_in_eff_ - 1) / shrink_factor_ + 1;
width_out_ = (width_in_eff_ - 1) / shrink_factor_ + 1;
}
else if ((height_!=0) && (width_!=0)) {
height_out_ = height_;
width_out_ = width_;
}
else if (OperatorBase::InputSize() == 2) {
height_out_ = X_1.dim32(2);
width_out_ = X_1.dim32(3);
}
else {
LOG(FATAL);
}
CAFFE_ENFORCE_GT(height_in_eff_, 0, "height should be positive");
CAFFE_ENFORCE_GT(width_in_eff_, 0, "width should be positive");
CAFFE_ENFORCE_GT(height_out_, 0, "height should be positive");
CAFFE_ENFORCE_GT(width_out_, 0, "width should be positive");
vector<int> Dims;
Dims.push_back(num_);
Dims.push_back(channels_);
Dims.push_back(height_out_);
Dims.push_back(width_out_);
auto* Y = Output(0);
Y->Reshape(Dims);
const auto* xData = X.template data<float>();
auto* yData = Y->template mutable_data<float>();
interp2(num_ * channels_,
xData, - pad_beg_, - pad_beg_, height_in_eff_, width_in_eff_, height_in_, width_in_,
yData, 0, 0, height_out_, width_out_, height_out_, width_out_);
return true;
}
template <typename T, class Context>
void InterpGradientOp<T,Context>::interp2_backward(const int channels,
T *data1, const int x1, const int y1, const int height1, const int width1, const int Height1, const int Width1,
const T *data2, const int x2, const int y2, const int height2, const int width2, const int Height2, const int Width2){
CAFFE_ENFORCE(x1 >= 0 && y1 >= 0 && height1 > 0 && width1 > 0 && x2 >= 0 && y2 >= 0 && height2 > 0 && width2 > 0,"caffe_cpu_interp2_backward() first check has errors!");
CAFFE_ENFORCE(Width1 >= width1 + x1 && Height1 >= height1 + y1 && Width2 >= width2 + x2 && Height2 >= height2 + y2,"caffe_cpu_interp2_backward() second check has errors!");
// special case: same-size matching grids
if (height1 == height2 && width1 == width2) {
for (int h2 = 0; h2 < height2; ++h2) {
const int h1 = h2;
for (int w2 = 0; w2 < width2; ++w2) {
const int w1 = w2;
T* pos1 = &data1[(y1 + h1) * Width1 + (x1 + w1)];
const T* pos2 = &data2[(y2 + h2) * Width2 + (x2 + w2)];
for (int c = 0; c < channels; ++c) {
pos1[0] += pos2[0];//注意前向是pos2[0]+=pos1[0]
pos1 += Width1 * Height1;
pos2 += Width2 * Height2;
}
}
}
return;
}
const float rheight = (height2 > 1) ? static_cast<float>(height1 - 1) / (height2 - 1) : 0.f;
const float rwidth = (width2 > 1) ? static_cast<float>(width1 - 1) / (width2 - 1) : 0.f;
for (int h2 = 0; h2 < height2; ++h2) {
const float h1r = rheight * h2;
const int h1 = h1r;
const int h1p = (h1 < height1 - 1) ? 1 : 0;
const T h1lambda = h1r - h1;
const T h0lambda = T(1.) - h1lambda;
for (int w2 = 0; w2 < width2; ++w2) {
const float w1r = rwidth * w2;
const int w1 = w1r;
const int w1p = (w1 < width1 - 1) ? 1 : 0;
const T w1lambda = w1r - w1;
const T w0lambda = T(1.) - w1lambda;
T* pos1 = &data1[(y1 + h1) * Width1 + (x1 + w1)];
const T* pos2 = &data2[(y2 + h2) * Width2 + (x2 + w2)];
for (int c = 0; c < channels; ++c) {
pos1[0] += h0lambda * w0lambda * pos2[0];
pos1[w1p] += h0lambda * w1lambda * pos2[0];
pos1[h1p * Width1] += h1lambda * w0lambda * pos2[0];
pos1[h1p * Width1 + w1p] += h1lambda * w1lambda * pos2[0];
pos1 += Width1 * Height1;
pos2 += Width2 * Height2;
}
}
}
}
template<>
bool InterpGradientOp<float,CPUContext>::RunOnDevice(){
const auto& dY = Input(0);
const auto& X = Input(1);
if(OperatorBase::InputSize()==3){
X_1.CopyFrom(Input(2));
}
auto* dX = Output(0);
dX->ResizeLike(X);
num_ = X.dim32(0);
channels_ = X.dim32(1);
height_in_ = X.dim32(2);
width_in_ = X.dim32(3);
height_in_eff_ = height_in_ + pad_beg_ + pad_end_;
width_in_eff_ = width_in_ + pad_beg_ + pad_end_;
if (zoom_factor_ != 0) {
CAFFE_ENFORCE_GE(zoom_factor_, 1, "Zoom factor must be positive");
height_out_ = height_in_eff_ + (height_in_eff_ - 1) * (zoom_factor_- 1);
width_out_ = width_in_eff_ + (width_in_eff_ - 1) * (zoom_factor_ - 1);
}
else if (shrink_factor_ != 0) {
CAFFE_ENFORCE_GE(shrink_factor_, 1, "Shrink factor must be positive");
height_out_ = (height_in_eff_ - 1) / shrink_factor_ + 1;
width_out_ = (width_in_eff_ - 1) / shrink_factor_ + 1;
}
else if ((height_!=0) && (width_!=0)) {
height_out_ = height_;
width_out_ = width_;
}
else if (OperatorBase::InputSize() == 3) {
height_out_ = X_1.dim32(2);
width_out_ = X_1.dim32(3);
}
else {
LOG(FATAL);
}
CAFFE_ENFORCE_GT(height_in_eff_, 0, "height should be positive");
CAFFE_ENFORCE_GT(width_in_eff_, 0, "width should be positive");
CAFFE_ENFORCE_GT(height_out_, 0, "height should be positive");
CAFFE_ENFORCE_GT(width_out_, 0, "width should be positive");
auto* dXData = dX->template mutable_data<float>();
const auto* dYData = dY.template data<float>();
interp2_backward(num_*channels_, dXData,
-pad_beg_,-pad_beg_,height_in_eff_,width_in_eff_,height_in_,width_in_,dYData,
0,0,height_out_,width_out_,height_out_,width_out_);
return true;
}
REGISTER_CPU_OPERATOR(Interp, InterpOp<float,CPUContext>);
OPERATOR_SCHEMA(Interp)
.NumInputs(1,2)
.NumOutputs(1)
.Arg("zoom_factor","zoom a image")
.Arg("shrink_factor","shrink a image")
.Arg("height","the height of out image")
.Arg("width","the width of out image")
.Arg("pad_beg","pad begin ")
.Arg("pad_end","pad end")
.SetDoc(R"DOC(Bilinear Interpolation)DOC");
REGISTER_CPU_OPERATOR(InterpGradient,InterpGradientOp<float,CPUContext>);
OPERATOR_SCHEMA(InterpGradient)
.NumInputs(2,3)
.NumInputs(1)
.Arg("zoom_factor","zoom a image")
.Arg("shrink_factor","shrink a image")
.Arg("height","the height of out image")
.Arg("width","the width of out image")
.Arg("pad_beg","pad begin ")
.Arg("pad_end","pad end")
.SetDoc(R"DOC(Bilinear Interpolation Gradient)DOC");
class GetInterpGradient : public GradientMakerBase{
using GradientMakerBase::GradientMakerBase;
vector<OperatorDef> GetGradientDefs() override{
return SingleGradientDef(
"InterpGradient",
"",
std::vector<string>{GO(0),I(0),I(1)},
std::vector<string>{GI(0)});
}
};
}
|
47e009189cd49088a4eb360a35075ef5e373359e
|
63cfa4848d6783d41ddd470a6f1014378651f921
|
/BMP180Module.cpp
|
d46eb1fc000d301718f216777545ca0bab21ba39
|
[
"Apache-2.0"
] |
permissive
|
samindaa/csc688
|
692c006ae537013e921a6c1097bffb67e267c293
|
75a86d41748f9a90e219afef6192645c90af3878
|
refs/heads/master
| 2016-09-05T11:31:13.751254
| 2014-09-12T20:19:46
| 2014-09-12T20:19:46
| 16,720,821
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,117
|
cpp
|
BMP180Module.cpp
|
/*
* BMP180Module.cpp
*
* Created on: Feb 20, 2014
* Author: Saminda
*/
#include "BMP180Module.h"
#if defined(ENERGIA)
#include "Wire.h"
#endif
MAKE_MODULE(BMP180Module)
void BMP180Module::init()
{
calibration();
}
void BMP180Module::update(BMP180Representation& theBMP180Representation)
{
#if defined(ENERGIA)
calculation(theBMP180Representation); // run calculations for temperature and pressure
//Serial.print("Temperature: ");
//Serial.println(theBMP180Representation.fTemperature, 3);
//Serial.print("Pressure: ");
//Serial.println(theBMP180Representation.fPressure, 3);
//Serial.print("Altitude: ");
//Serial.println(theBMP180Representation.fAltitude, 3);
#endif
}
void BMP180Module::calibration()
{
#if defined(ENERGIA)
I2CMRead(BMP180_O_AC1_MSB);
parameters.i16AC1 = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_AC2_MSB);
parameters.i16AC2 = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_AC3_MSB);
parameters.i16AC3 = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_AC4_MSB);
parameters.ui16AC4 = (uint16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_AC5_MSB);
parameters.ui16AC5 = (uint16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_AC6_MSB);
parameters.ui16AC6 = (uint16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_B1_MSB);
parameters.i16B1 = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_B2_MSB);
parameters.i16B2 = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_MC_MSB);
parameters.i16MC = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
I2CMRead(BMP180_O_MD_MSB);
parameters.i16MD = (int16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
//Serial.print("i16AC1=");
//Serial.println(parameters.i16AC1);
//Serial.print("i16AC2=");
//Serial.println(parameters.i16AC2);
//Serial.print("i16AC3=");
//Serial.println(parameters.i16AC3);
//Serial.print("ui16AC4=");
//Serial.println(parameters.ui16AC4);
//Serial.print("ui16AC5=");
//Serial.println(parameters.ui16AC5);
//Serial.print("ui16AC6=");
//Serial.println(parameters.ui16AC6);
//Serial.print("i16B1=");
//Serial.println(parameters.i16B1);
//Serial.print("i16B2=");
//Serial.println(parameters.i16B2);
//Serial.print("i16MC=");
//Serial.println(parameters.i16MC);
//Serial.print("i16MD=");
//Serial.println(parameters.i16MD);
#endif
}
// read 16-bits from I2C
void BMP180Module::I2CMRead(const uint8_t& addr, const uint8_t& bytes)
{
#if defined(ENERGIA)
Wire.beginTransmission(parameters.ui8Addr);
Wire.write(addr);
Wire.endTransmission(false);
Wire.requestFrom(parameters.ui8Addr, bytes);
while (Wire.available() < bytes - 1)
;
parameters.pui8Data[0] = Wire.read();
parameters.pui8Data[1] = Wire.read();
if (bytes == 3)
parameters.pui8Data[2] = Wire.read();
#endif
}
void BMP180Module::cmdI2CMRead(const uint8_t& cmd, const uint8_t& addr, const uint8_t& bytes)
{
#if defined(ENERGIA)
Wire.beginTransmission(parameters.ui8Addr);
Wire.write(BMP180_O_CTRL_MEAS);
Wire.write(cmd);
Wire.endTransmission();
delay(5); //<< To ready data (Read manufacturer data sheet: TODO)
I2CMRead(addr, bytes);
#endif
}
void BMP180Module::calculation(BMP180Representation& theBMP180Representation)
{
#if defined(ENERGIA)
// Temperature
cmdI2CMRead((BMP180_CTRL_MEAS_SCO | BMP180_CTRL_MEAS_TEMPERATURE), BMP180_O_OUT_MSB, 2);
float fUT, fX1, fX2, fB5;
//
// Get the uncompensated temperature.
//
fUT = (float) (uint16_t) ((parameters.pui8Data[0] << 8) | parameters.pui8Data[1]);
//
// Calculate the true temperature.
//
fX1 = ((fUT - (float) parameters.ui16AC6) * (float) parameters.ui16AC5) / 32768.f;
fX2 = ((float) parameters.i16MC * 2048.f) / (fX1 + (float) parameters.i16MD);
fB5 = fX1 + fX2;
theBMP180Representation.fTemperature = fB5 / 160.f;
// This is with no sampling
cmdI2CMRead((BMP180_CTRL_MEAS_SCO | BMP180_CTRL_MEAS_PRESSURE | parameters.ui8Mode),
BMP180_O_OUT_MSB, 3);
float fUP, fX3, fB3, fB4, fB6, fB7, fP;
int_fast8_t i8Oss;
uint32_t rawPressure = (int32_t) ((parameters.pui8Data[0] << 16) | (parameters.pui8Data[1] << 8)
| (parameters.pui8Data[2] & BMP180_OUT_XLSB_M));
// Get the oversampling ratio.
//
i8Oss = parameters.ui8Mode >> BMP180_CTRL_MEAS_OSS_S;
//
// Retrieve the uncompensated pressure.
//
fUP = ((float) (int32_t) ((parameters.pui8Data[0] << 16) | (parameters.pui8Data[1] << 8)
| (parameters.pui8Data[2] & BMP180_OUT_XLSB_M)) / (1 << (8 - i8Oss)));
//
// Calculate the true temperature.
//
fX1 = ((fUT - (float) parameters.ui16AC6) * (float) parameters.ui16AC5) / 32768.f;
fX2 = ((float) parameters.i16MC * 2048.f) / (fX1 + (float) parameters.i16MD);
fB5 = fX1 + fX2;
//
// Calculate the true pressure.
//
fB6 = fB5 - 4000;
fX1 = ((float) parameters.i16B2 * ((fB6 * fB6) / 4096)) / 2048;
fX2 = ((float) parameters.i16AC2 * fB6) / 2048;
fX3 = fX1 + fX2;
fB3 = ((((float) parameters.i16AC1 * 4) + fX3) * (1 << i8Oss)) / 4;
fX1 = ((float) parameters.i16AC3 * fB6) / 8192;
fX2 = ((float) parameters.i16B1 * ((fB6 * fB6) / 4096)) / 65536;
fX3 = (fX1 + fX2) / 4;
fB4 = (float) parameters.ui16AC4 * ((fX3 / 32768) + 1);
fB7 = (fUP - fB3) * (50000 >> i8Oss);
fP = (fB7 * 2) / fB4;
fX1 = (fP / 256) * (fP / 256);
fX1 = (fX1 * 3038) / 65536;
fX2 = (fP * -7357) / 65536;
fP += (fX1 + fX2 + 3791) / 16;
theBMP180Representation.fPressure = fP;
//
// Calculate the altitude.
//
theBMP180Representation.fAltitude = 44330.0f
* (1.0f - powf(theBMP180Representation.fPressure / 101325.0f, 1.0f / 5.255f));
#endif
}
|
49ae5f65fc1e4d4066b43ea3563a274955ed9d53
|
10afe4ffc27a2b9433954bc7eb3f31b6472cfc42
|
/antlr4-runtime/modelicaBaseVisitor.h
|
19998c36c1b8de58510ee48fc6a8de3dba3e688a
|
[
"MIT"
] |
permissive
|
EgorSidorov/swiftCompiler
|
1406110f05ddb98ab8889afeaf65d98ccad5908c
|
63eeba1a43d4c0b8c3ecc5906bf793c07ecc414e
|
refs/heads/master
| 2020-08-07T12:51:31.730133
| 2019-10-07T18:35:38
| 2019-10-07T18:35:38
| 213,457,722
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 849
|
h
|
modelicaBaseVisitor.h
|
// Generated from modelica.g4 by ANTLR 4.7.2
#pragma once
#include "antlr4-runtime.h"
#include "modelicaVisitor.h"
/**
* This class provides an empty implementation of modelicaVisitor, which can be
* extended to create a visitor which only needs to handle a subset of the available methods.
*/
class modelicaBaseVisitor : public modelicaVisitor {
public:
virtual antlrcpp::Any visitCompileUnit(modelicaParser::CompileUnitContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitExpr(modelicaParser::ExprContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitTerm(modelicaParser::TermContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitFactor(modelicaParser::FactorContext *ctx) override {
return visitChildren(ctx);
}
};
|
b4c9c487f5277f266cffcb10d98c10454f6f2c35
|
3666e14d614e2f96426252901700bf620185cb6c
|
/6. CodeJam/2013/Round Qualification/A. Tic-Tac-Toe-Tomek/A_TicTacToeTomek.cpp
|
cf4b9e9862b74732fb0f3410c0923e47e02cd939
|
[] |
no_license
|
faijurrahman/pSolving
|
5dcd5182ccc8a89d848d1c2dcdc0f4579421b301
|
6b07c9946516ab4e387fe4248ff2eda7edf3f0a4
|
refs/heads/master
| 2021-01-01T16:12:47.779189
| 2016-09-22T22:26:13
| 2016-09-22T22:26:13
| 23,628,428
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,613
|
cpp
|
A_TicTacToeTomek.cpp
|
#include<set>
#include<climits>
#include<algorithm>
#include<vector>
#include<string>
#include<cstring>
#include<iostream>
#include <sstream>
#include <fstream>
using namespace std;
#define LOOP(i,s,n) for(int i=(s);i<(n);i++)
#define loop(i,n) for(int i=0;i<(n);i++)
#define MAX(mVal, oVal) (mVal) = max((mVal),(oVal))
#define MIN(mVal, oVal) (mVal) = min((mVal),(oVal))
#define All(c) (c).begin(),(c).end()
#define ZERO(arr) memset(arr,0,sizeof(arr))
#define FILL(arr,val) memset(arr,val,sizeof(arr))
#define MOD 1000000007
#define _N 100
int dp[_N][_N];
#define FILE_NAME_SMALL "A-small-practice"
#define FILE_NAME_LARGE "A-large-practice"
#define FILE_NAME_SAMPLE "sample"
class codeJam
{
public:
string calOuput(vector<string> in)
{
int X = in.size();
int cX=0, cO=0, cD=0;
loop(i,X)
{
cX=0, cO=0;
loop(j,X)
{
if(in[i][j]=='X' || in[i][j]=='T') cX++;
if(cX>=4) return "X won";
if(in[i][j]=='O' || in[i][j]=='T') cO++;
if(cO>=4) return "O won";
if(in[i][j]=='.') cD++;
}
}
loop(j,X)
{
cX=0, cO=0;
loop(i,X)
{
if(in[i][j]=='X' || in[i][j]=='T') cX++;
if(cX>=4) return "X won";
if(in[i][j]=='O' || in[i][j]=='T') cO++;
if(cO>=4) return "O won";
}
}
cX=0, cO=0;
loop(i,X)
{
if(in[i][i]=='X' || in[i][i]=='T') cX++;
if(cX>=4) return "X won";
if(in[i][i]=='O' || in[i][i]=='T') cO++;
if(cO>=4) return "O won";
}
cX=0, cO=0;
for(int i=0, j=X-1; i<X; i++, j--)
{
if(in[i][j]=='X' || in[i][j]=='T') cX++;
if(cX>=4) return "X won";
if(in[i][j]=='O' || in[i][j]=='T') cO++;
if(cO>=4) return "O won";
}
return cD ? "Game has not completed" : "Draw";
}
void processInput(string file)
{
ifstream fin;
ofstream fout;
int X;
fin.open(file+".in" );
fout.open(file+".out");
fin >> X;
loop(i,X)
{
int ans = 0;
string str;
vector<string> input;
loop(j,4)
{
fin >> str;
input.push_back(str);
}
fout << "Case #" << i+1 << ": " << calOuput(input) << endl;
}
fin.close();
fout.close();
}
};
class unitTesting
{
ifstream fSampleIn;
ifstream fSampleOut;
ifstream fSampleOutForVerify;
public:
void run_test(string sampleFileName)
{
const int GET_LINE_LENGHT = 100;
fSampleIn.open(sampleFileName + ".in");
fSampleOut.open(sampleFileName + ".out");
fSampleOutForVerify.open("sampleForVerify.out");
int X;
fSampleIn >> X;
loop(i,X)
{
char resultFromProgram[GET_LINE_LENGHT+1], sampleForVerifyOutput[GET_LINE_LENGHT+1];
fSampleOut.getline(resultFromProgram,GET_LINE_LENGHT);
fSampleOutForVerify.getline(sampleForVerifyOutput,GET_LINE_LENGHT);
if(strcmp(resultFromProgram,sampleForVerifyOutput) == 0) cout << "Case " << i << ": Passed" << endl;
else
{
cout << "Case " << i << ": Failed" << endl;
cout << "\tExpected: " << sampleForVerifyOutput << endl;
cout << "\tReceived: " << resultFromProgram << endl;
}
}
fSampleIn.close();
fSampleOut.close();
fSampleOutForVerify.close();
}
};
int main()
{
codeJam codeJamObj;
#ifdef FILE_NAME_SMALL
cout << "Small Input: ";
codeJamObj.processInput(FILE_NAME_SMALL);
cout << "Complete!" << endl;
#endif
#ifdef FILE_NAME_LARGE
cout << "Large Input: ";
codeJamObj.processInput(FILE_NAME_LARGE);
cout << "Complete!" << endl;
#endif
//Test Code
#ifdef FILE_NAME_SAMPLE
cout << endl << "Unit Testing... " << endl;
codeJamObj.processInput(FILE_NAME_SAMPLE);
unitTesting testProgramOutput;
testProgramOutput.run_test(FILE_NAME_SAMPLE);
#endif
getchar();
return 0;
}
|
2ec2d24535543d553348bc97aec8307a3c9b048f
|
76e09052f5bfa405697b26b88f658619d87a13ee
|
/gen/mempool.h
|
1481a3c0c16558a486f316fbff70e2758f44aa3e
|
[
"Zlib"
] |
permissive
|
iceignatius/genutil
|
6f92401917dee67e6daecaaa3ee57111f1db14aa
|
c682bd245d5dbe5dda39c7450be63545346c16ea
|
refs/heads/master
| 2020-02-26T16:27:28.017187
| 2018-04-13T06:06:26
| 2018-04-13T06:06:26
| 71,210,497
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,349
|
h
|
mempool.h
|
/**
* @file
* @brief Memory pool
* @details To support user space memory pool objects to help some purpose, such like processes communication.
* @author 王文佑
* @date 2014.05.09
* @copyright ZLib Licence
* @see http://www.openfoundry.org/of/projects/2419
*
* @note 模組設計原則:
* @li 本模組主要設計用途為如使用共用記憶體進行行程間通信時需要做資料管理的場合。
* @li 各物件內部所管理的記憶體位置皆以偏移量紀錄,以利不同地址空間的應用(偏移量零
* 保留用來標示無效的偏移量)。
* @li 考量到可能有其它行程共同使用共用資料的狀況,本功能集的所有公開物件皆不會主
* 動初使化物件內容,也不會主動銷毀物件與資料,使用者必須自行判斷需要執行上述
* 工作的時機。
*/
#ifndef _GEN_MEMPOOL_H_
#define _GEN_MEMPOOL_H_
#include "type.h"
#include "inline.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @class mempool_t
* @brief Memory pool
*/
typedef struct mempool_t mempool_t;
// 緩衝區設定
mempool_t* mempool_init(void* buffer, size_t size);
// 記憶體位址與偏移量轉換
uint64_t mempool_offset_from_addr(const mempool_t* pool, const void* bufaddr);
void* mempool_offset_to_addr (const mempool_t* pool, uint64_t bufoff);
// 記憶體資訊查詢
size_t mempool_get_pool_size (const mempool_t* pool);
size_t mempool_get_free_size (const mempool_t* pool);
size_t mempool_get_buffer_size(const mempool_t* pool, const void* bufaddr);
void* mempool_get_inuse_next (const mempool_t* pool, const void* bufaddr);
INLINE void* mempool_get_inuse_first(const mempool_t* pool)
{
/**
* @memberof mempool_t
* @brief Get first allocated buffer.
* @param pool Object instance.
* @return The first allocated buffer; or NULL if there have no allocated buffer.
*/
return mempool_get_inuse_next(pool,NULL);
}
// 記憶體分配
void* mempool_allocate (mempool_t* pool, size_t size);
void mempool_deallocate(mempool_t* pool, void* bufaddr);
void* mempool_reallocate(mempool_t* pool, void* bufaddr, size_t size);
#ifdef __cplusplus
} // extern "C"
#endif
#ifdef __cplusplus
/// C++ wrapper of @ref mempool_t
class TMemPool
{
private:
TMemPool(); // Not allowed to use
TMemPool(const TMemPool&); // Not allowed to use
TMemPool& operator=(const TMemPool&); // Not allowed to use
public:
static TMemPool* Initialize(void* Buffer, size_t Size) { return (TMemPool*)mempool_init(Buffer, Size); } ///< @see mempool_t::mempool_init
public:
uint64_t OffsetFromAddr(const void* BufAddr) const { return mempool_offset_from_addr((const mempool_t*)this, BufAddr); } ///< @see mempool_t::mempool_offset_from_addr
void* OffsetToAddr (uint64_t BufOff ) const { return mempool_offset_to_addr ((const mempool_t*)this, BufOff ); } ///< @see mempool_t::mempool_offset_to_addr
public:
size_t GetPoolSize () const { return mempool_get_pool_size ((const mempool_t*)this); } ///< @see mempool_t::mempool_get_pool_size
size_t GetFreeSize () const { return mempool_get_free_size ((const mempool_t*)this); } ///< @see mempool_t::mempool_get_free_size
size_t GetBufferSize(const void* BufAddr) const { return mempool_get_buffer_size((const mempool_t*)this, BufAddr); } ///< @see mempool_t::mempool_get_buffer_size
void* GetInuseNext (const void* BufAddr) const { return mempool_get_inuse_next ((const mempool_t*)this, BufAddr); } ///< @see mempool_t::mempool_get_inuse_next
void* GetInuseFirst() const { return mempool_get_inuse_first((const mempool_t*)this); } ///< @see mempool_t::mempool_get_inuse_first
public:
void* Allocate (size_t Size ) { return mempool_allocate ((mempool_t*)this, Size); } ///< @see mempool_t::mempool_allocate
void Deallocate(void* BufAddr ) { return mempool_deallocate((mempool_t*)this, BufAddr); } ///< @see mempool_t::mempool_deallocate
void* Reallocate(void* BufAddr, size_t Size) { return mempool_reallocate((mempool_t*)this, BufAddr, Size); } ///< @see mempool_t::mempool_reallocate
};
#endif
#endif
|
800db0ecc30007303b3ec1e3ba04955675d0305b
|
6d30c1840b2ddd01b8b81bc8639e051d9bf96b5e
|
/GalaxyQuest/Source/GalaxyQuest/Public/Widget/C_UserBag.h
|
4d8142c18272e965f6b87721a6d0543a33b91be8
|
[] |
no_license
|
Vin-Han/GalaxyQuest
|
eba3bafd0a5ec6b5ed45a924c5143fe9a2d5c64c
|
c3b1a3b6794b1b30f58b1fcc948ec7d434618eb1
|
refs/heads/master
| 2022-12-03T17:33:10.413848
| 2020-08-13T22:22:53
| 2020-08-13T22:22:53
| 262,983,440
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 879
|
h
|
C_UserBag.h
|
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "C_UserBag.generated.h"
class UTextBlock;
class UButton;
class UImage;
class UProgressBar;
class UScrollBox;
UCLASS()
class GALAXYQUEST_API UC_UserBag : public UUserWidget
{
GENERATED_BODY()
public:
virtual bool Initialize() override;
public:
UPROPERTY()
UScrollBox* Left_Roll;
UPROPERTY()
UScrollBox* Right_Roll;
UPROPERTY()
UButton* Exit_Btn;
UPROPERTY()
UButton* Left_Btn;
UPROPERTY()
UButton* Right_Btn;
UPROPERTY()
UProgressBar* HP_Bar;
UPROPERTY()
UProgressBar* Shield_Bar;
UPROPERTY()
UTextBlock* Intro_Text;
UPROPERTY()
UImage* Load_Image;
UPROPERTY()
UTextBlock* LeftBtn_Text;
UPROPERTY()
UTextBlock* RightBtn_Text;
UPROPERTY()
UTextBlock* Money_Text;
};
|
2355aad93fa26ba222130788884e31a33187e17f
|
805452a819f2f7950753e1cf86d88a294d7d3212
|
/Perso/src/FantomeSpeedy.cpp
|
f96ccd4edf33f9860dc2f5ebf5d45161ab77d102
|
[] |
no_license
|
JustineVuillemot/IMACMAN
|
94de6fefdaaf782ba84d2dead4af56c081a8210e
|
5b453deb025000704837b20263b48b093256b161
|
refs/heads/master
| 2021-09-25T13:37:47.254984
| 2018-10-22T17:22:31
| 2018-10-22T17:22:31
| 113,693,463
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 125
|
cpp
|
FantomeSpeedy.cpp
|
//
// Created by Alexian on 08/01/2018.
//
#include "FantomeSpeedy.hpp"
void FantomeSpeedy::deplacement(glm::vec3 dist){
}
|
80a14b1196bda6df42869ab46499359a0f2455a8
|
c8c5b33404786915c7e230e75c1f70e145203fbb
|
/cotson/src/abaeterno/mem_lib/cache_timing_mainmem.h
|
3c5af372807504207ad395fae8f9f79142996169
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
adityabhopale95/COTSON_Simulator_multinode
|
82b4e5a914b20083aaeacc6684b9ed300f5c55b2
|
4131d59fe83a6756caa00fb46164982cb490619e
|
refs/heads/master
| 2020-03-24T14:30:57.285733
| 2018-08-03T03:30:16
| 2018-08-03T03:30:16
| 142,770,484
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,877
|
h
|
cache_timing_mainmem.h
|
// (C) Copyright 2006-2009 Hewlett-Packard Development Company, L.P.
//
// 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.
//
// $Id: cache_timing_l2.h 11 2010-01-08 13:20:58Z paolofrb $
#ifndef TIMING_MAINMEM_H
#define TIMING_MAINMEM_H
#include "abaeterno_config.h"
#include "libmetric.h"
#include "liboptions.h"
#include "memory_interface.h"
#include "cpu_timer.h"
namespace Memory {
namespace Timing {
class MainMemory : public metric
{
public:
MainMemory(const Parameters & p);
void reset();
uint32_t latency(uint64_t tstamp,const Trace& mt,const Access& ma);
private:
const uint32_t _nchannels;
const uint32_t _ndimms_per_channel;
const uint32_t _ndevices_per_dimm;
const uint32_t _nbanks_per_device;
const uint32_t _page_sz; // page size in byte
const uint32_t _line_sz; // cache line size in byte
const uint32_t _cmd_clk_multiplier;
const uint32_t _bank_clk_multiplier;
std::vector<uint64_t> _channel_latest_access_cycle;
std::vector<uint64_t> _device_latest_access_cycle;
std::vector<uint64_t> _dimm_latest_access_cycle;
std::vector<uint64_t> _bank_latest_access_cycle;
uint64_t _total_latency;
uint32_t _nchannels_log2;
uint32_t _ndimms_per_channel_log2;
uint32_t _ndevices_per_dimm_log2;
uint32_t _nbanks_per_device_log2;
uint32_t _page_sz_log2;
uint32_t _line_sz_log2;
const uint32_t _t_RC;
const uint32_t _t_RAS;
const uint32_t _t_data_transfer;
};
}
}
#endif
|
f08e336beab5a646242852bdfe734b84968bf0ee
|
3a701800a0151e2f53f1df79c9cc0bc19003ca29
|
/lib/Transforms/Tapir/CilkABI.cpp
|
9b75d22f7122fde5a7d1866aec4249887a7fdc4e
|
[
"NCSA"
] |
permissive
|
Jarlene/Tapir-LLVM
|
333786fbe06917a9e9db433462f33ca64c346271
|
11eb2485a7e8a22099bf0d0fde3af6952707da24
|
refs/heads/master
| 2021-09-11T07:36:17.966704
| 2018-01-11T21:16:41
| 2018-01-11T21:20:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 34,581
|
cpp
|
CilkABI.cpp
|
//===- CilkABI.cpp - Lower Tapir into Cilk runtime system calls -----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements the CilkABI interface, which is used to convert Tapir
// instructions -- detach, reattach, and sync -- to calls into the Cilk
// runtime system. This interface does the low-level dirty work of passes
// such as LowerToCilk.
//
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Tapir/CilkABI.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Transforms/Tapir/Outline.h"
#include "llvm/Transforms/Utils/EscapeEnumerator.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/TapirUtils.h"
using namespace llvm;
#define DEBUG_TYPE "cilkabi"
/// Helper typedefs for cilk struct TypeBuilders.
typedef llvm::TypeBuilder<__cilkrts_stack_frame, false> StackFrameBuilder;
typedef llvm::TypeBuilder<__cilkrts_worker, false> WorkerBuilder;
typedef llvm::TypeBuilder<__cilkrts_pedigree, false> PedigreeBuilder;
/// Helper methods for storing to and loading from struct fields.
static Value *GEP(IRBuilder<> &B, Value *Base, int field) {
// return B.CreateStructGEP(cast<PointerType>(Base->getType()),
// Base, field);
return B.CreateConstInBoundsGEP2_32(nullptr, Base, 0, field);
}
static void StoreField(IRBuilder<> &B, Value *Val, Value *Dst, int field,
bool isVolatile = false) {
B.CreateStore(Val, GEP(B, Dst, field), isVolatile);
}
static Value *LoadField(IRBuilder<> &B, Value *Src, int field,
bool isVolatile = false) {
return B.CreateLoad(GEP(B, Src, field), isVolatile);
}
/// \brief Emit inline assembly code to save the floating point
/// state, for x86 Only.
static void EmitSaveFloatingPointState(IRBuilder<> &B, Value *SF) {
typedef void (AsmPrototype)(uint32_t*, uint16_t*);
llvm::FunctionType *FTy =
TypeBuilder<AsmPrototype, false>::get(B.getContext());
Value *Asm = InlineAsm::get(FTy,
"stmxcsr $0\n\t" "fnstcw $1",
"*m,*m,~{dirflag},~{fpsr},~{flags}",
/*sideeffects*/ true);
Value * args[2] = {
GEP(B, SF, StackFrameBuilder::mxcsr),
GEP(B, SF, StackFrameBuilder::fpcsr)
};
B.CreateCall(Asm, args);
}
/// \brief Helper to find a function with the given name, creating it if it
/// doesn't already exist. If the function needed to be created then return
/// false, signifying that the caller needs to add the function body.
template <typename T>
static bool GetOrCreateFunction(const char *FnName, Module& M,
Function *&Fn,
Function::LinkageTypes Linkage =
Function::InternalLinkage,
bool DoesNotThrow = true) {
LLVMContext &Ctx = M.getContext();
Fn = M.getFunction(FnName);
// if the function already exists then let the
// caller know that it is complete
if (Fn)
return true;
// Otherwise we have to create it
FunctionType *FTy = TypeBuilder<T, false>::get(Ctx);
Fn = Function::Create(FTy, Linkage, FnName, &M);
// Set nounwind if it does not throw.
if (DoesNotThrow)
Fn->setDoesNotThrow();
// and let the caller know that the function is incomplete
// and the body still needs to be added
return false;
}
/// \brief Emit a call to the CILK_SETJMP function.
static CallInst *EmitCilkSetJmp(IRBuilder<> &B, Value *SF, Module& M) {
LLVMContext &Ctx = M.getContext();
// We always want to save the floating point state too
EmitSaveFloatingPointState(B, SF);
Type *Int32Ty = Type::getInt32Ty(Ctx);
Type *Int8PtrTy = Type::getInt8PtrTy(Ctx);
// Get the buffer to store program state
// Buffer is a void**.
Value *Buf = GEP(B, SF, StackFrameBuilder::ctx);
// Store the frame pointer in the 0th slot
Value *FrameAddr =
B.CreateCall(Intrinsic::getDeclaration(&M, Intrinsic::frameaddress),
ConstantInt::get(Int32Ty, 0));
Value *FrameSaveSlot = GEP(B, Buf, 0);
B.CreateStore(FrameAddr, FrameSaveSlot, /*isVolatile=*/true);
// Store stack pointer in the 2nd slot
Value *StackAddr = B.CreateCall(
Intrinsic::getDeclaration(&M, Intrinsic::stacksave));
Value *StackSaveSlot = GEP(B, Buf, 2);
B.CreateStore(StackAddr, StackSaveSlot, /*isVolatile=*/true);
Buf = B.CreateBitCast(Buf, Int8PtrTy);
// Call LLVM's EH setjmp, which is lightweight.
Value* F = Intrinsic::getDeclaration(&M, Intrinsic::eh_sjlj_setjmp);
CallInst *SetjmpCall = B.CreateCall(F, Buf);
SetjmpCall->setCanReturnTwice();
return SetjmpCall;
}
/// \brief Get or create a LLVM function for __cilkrts_pop_frame.
/// It is equivalent to the following C code
///
/// __cilkrts_pop_frame(__cilkrts_stack_frame *sf) {
/// sf->worker->current_stack_frame = sf->call_parent;
/// sf->call_parent = 0;
/// }
static Function *Get__cilkrts_pop_frame(Module &M) {
Function *Fn = 0;
if (GetOrCreateFunction<cilk_func>("__cilkrts_pop_frame", M, Fn))
return Fn;
// If we get here we need to add the function body
LLVMContext &Ctx = M.getContext();
Function::arg_iterator args = Fn->arg_begin();
Value *SF = &*args;
BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", Fn);
IRBuilder<> B(Entry);
// sf->worker->current_stack_frame = sf.call_parent;
StoreField(B,
LoadField(B, SF, StackFrameBuilder::call_parent,
/*isVolatile=*/true),
LoadField(B, SF, StackFrameBuilder::worker,
/*isVolatile=*/true),
WorkerBuilder::current_stack_frame,
/*isVolatile=*/true);
// sf->call_parent = 0;
StoreField(B,
Constant::getNullValue(
TypeBuilder<__cilkrts_stack_frame*, false>::get(Ctx)),
SF, StackFrameBuilder::call_parent, /*isVolatile=*/true);
B.CreateRetVoid();
Fn->addFnAttr(Attribute::InlineHint);
return Fn;
}
/// \brief Get or create a LLVM function for __cilkrts_detach.
/// It is equivalent to the following C code
///
/// void __cilkrts_detach(struct __cilkrts_stack_frame *sf) {
/// struct __cilkrts_worker *w = sf->worker;
/// struct __cilkrts_stack_frame *volatile *tail = w->tail;
///
/// sf->spawn_helper_pedigree = w->pedigree;
/// sf->call_parent->parent_pedigree = w->pedigree;
///
/// w->pedigree.rank = 0;
/// w->pedigree.next = &sf->spawn_helper_pedigree;
///
/// *tail++ = sf->call_parent;
/// w->tail = tail;
///
/// sf->flags |= CILK_FRAME_DETACHED;
/// }
static Function *Get__cilkrts_detach(Module &M) {
Function *Fn = 0;
if (GetOrCreateFunction<cilk_func>("__cilkrts_detach", M, Fn))
return Fn;
// If we get here we need to add the function body
LLVMContext &Ctx = M.getContext();
Function::arg_iterator args = Fn->arg_begin();
Value *SF = &*args;
BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", Fn);
IRBuilder<> B(Entry);
// struct __cilkrts_worker *w = sf->worker;
Value *W = LoadField(B, SF, StackFrameBuilder::worker,
/*isVolatile=*/true);
// __cilkrts_stack_frame *volatile *tail = w->tail;
Value *Tail = LoadField(B, W, WorkerBuilder::tail,
/*isVolatile=*/true);
// sf->spawn_helper_pedigree = w->pedigree;
StoreField(B,
LoadField(B, W, WorkerBuilder::pedigree),
SF, StackFrameBuilder::parent_pedigree);
// sf->call_parent->parent_pedigree = w->pedigree;
StoreField(B,
LoadField(B, W, WorkerBuilder::pedigree),
LoadField(B, SF, StackFrameBuilder::call_parent),
StackFrameBuilder::parent_pedigree);
// w->pedigree.rank = 0;
{
StructType *STy = PedigreeBuilder::get(Ctx);
llvm::Type *Ty = STy->getElementType(PedigreeBuilder::rank);
StoreField(B,
ConstantInt::get(Ty, 0),
GEP(B, W, WorkerBuilder::pedigree),
PedigreeBuilder::rank);
}
// w->pedigree.next = &sf->spawn_helper_pedigree;
StoreField(B,
GEP(B, SF, StackFrameBuilder::parent_pedigree),
GEP(B, W, WorkerBuilder::pedigree),
PedigreeBuilder::next);
// *tail++ = sf->call_parent;
B.CreateStore(LoadField(B, SF, StackFrameBuilder::call_parent,
/*isVolatile=*/true),
Tail, /*isVolatile=*/true);
Tail = B.CreateConstGEP1_32(Tail, 1);
// w->tail = tail;
StoreField(B, Tail, W, WorkerBuilder::tail, /*isVolatile=*/true);
// sf->flags |= CILK_FRAME_DETACHED;
{
Value *F = LoadField(B, SF, StackFrameBuilder::flags, /*isVolatile=*/true);
F = B.CreateOr(F, ConstantInt::get(F->getType(), CILK_FRAME_DETACHED));
StoreField(B, F, SF, StackFrameBuilder::flags, /*isVolatile=*/true);
}
B.CreateRetVoid();
Fn->addFnAttr(Attribute::InlineHint);
return Fn;
}
/// \brief Get or create a LLVM function for __cilk_sync.
/// Calls to this function is always inlined, as it saves
/// the current stack/frame pointer values. This function must be marked
/// as returns_twice to allow it to be inlined, since the call to setjmp
/// is marked returns_twice.
///
/// It is equivalent to the following C code
///
/// void __cilk_sync(struct __cilkrts_stack_frame *sf) {
/// if (sf->flags & CILK_FRAME_UNSYNCHED) {
/// sf->parent_pedigree = sf->worker->pedigree;
/// SAVE_FLOAT_STATE(*sf);
/// if (!CILK_SETJMP(sf->ctx))
/// __cilkrts_sync(sf);
/// else if (sf->flags & CILK_FRAME_EXCEPTING)
/// __cilkrts_rethrow(sf);
/// }
/// ++sf->worker->pedigree.rank;
/// }
///
/// With exceptions disabled in the compiler, the function
/// does not call __cilkrts_rethrow()
static Function *GetCilkSyncFn(Module &M, bool instrument = false) {
Function *Fn = nullptr;
if (GetOrCreateFunction<cilk_func>("__cilk_sync", M, Fn,
Function::InternalLinkage,
/*doesNotThrow*/false))
return Fn;
// If we get here we need to add the function body
LLVMContext &Ctx = M.getContext();
Function::arg_iterator args = Fn->arg_begin();
Value *SF = &*args;
BasicBlock *Entry = BasicBlock::Create(Ctx, "cilk.sync.test", Fn);
BasicBlock *SaveState = BasicBlock::Create(Ctx, "cilk.sync.savestate", Fn);
BasicBlock *SyncCall = BasicBlock::Create(Ctx, "cilk.sync.runtimecall", Fn);
BasicBlock *Excepting = BasicBlock::Create(Ctx, "cilk.sync.excepting", Fn);
// TODO: Detect whether exceptions are needed.
BasicBlock *Rethrow = BasicBlock::Create(Ctx, "cilk.sync.rethrow", Fn);
BasicBlock *Exit = BasicBlock::Create(Ctx, "cilk.sync.end", Fn);
// Entry
{
IRBuilder<> B(Entry);
if (instrument)
// cilk_sync_begin
B.CreateCall(CILK_CSI_FUNC(sync_begin, M), SF);
// if (sf->flags & CILK_FRAME_UNSYNCHED)
Value *Flags = LoadField(B, SF, StackFrameBuilder::flags,
/*isVolatile=*/true);
Flags = B.CreateAnd(Flags,
ConstantInt::get(Flags->getType(),
CILK_FRAME_UNSYNCHED));
Value *Zero = ConstantInt::get(Flags->getType(), 0);
Value *Unsynced = B.CreateICmpEQ(Flags, Zero);
B.CreateCondBr(Unsynced, Exit, SaveState);
}
// SaveState
{
IRBuilder<> B(SaveState);
// sf.parent_pedigree = sf.worker->pedigree;
StoreField(B,
LoadField(B, LoadField(B, SF, StackFrameBuilder::worker,
/*isVolatile=*/true),
WorkerBuilder::pedigree),
SF, StackFrameBuilder::parent_pedigree);
// if (!CILK_SETJMP(sf.ctx))
Value *C = EmitCilkSetJmp(B, SF, M);
C = B.CreateICmpEQ(C, ConstantInt::get(C->getType(), 0));
B.CreateCondBr(C, SyncCall, Excepting);
}
// SyncCall
{
IRBuilder<> B(SyncCall);
// __cilkrts_sync(&sf);
B.CreateCall(CILKRTS_FUNC(sync, M), SF);
B.CreateBr(Exit);
}
// Excepting
{
IRBuilder<> B(Excepting);
if (Rethrow) {
Value *Flags = LoadField(B, SF, StackFrameBuilder::flags,
/*isVolatile=*/true);
Flags = B.CreateAnd(Flags,
ConstantInt::get(Flags->getType(),
CILK_FRAME_EXCEPTING));
Value *Zero = ConstantInt::get(Flags->getType(), 0);
Value *CanExcept = B.CreateICmpEQ(Flags, Zero);
B.CreateCondBr(CanExcept, Exit, Rethrow);
} else {
B.CreateBr(Exit);
}
}
// Rethrow
if (Rethrow) {
IRBuilder<> B(Rethrow);
B.CreateCall(CILKRTS_FUNC(rethrow, M), SF)->setDoesNotReturn();
B.CreateUnreachable();
}
// Exit
{
IRBuilder<> B(Exit);
// ++sf.worker->pedigree.rank;
Value *Rank = LoadField(B, SF, StackFrameBuilder::worker,
/*isVolatile=*/true);
Rank = GEP(B, Rank, WorkerBuilder::pedigree);
Rank = GEP(B, Rank, PedigreeBuilder::rank);
B.CreateStore(B.CreateAdd(
B.CreateLoad(Rank),
ConstantInt::get(Rank->getType()->getPointerElementType(),
1)),
Rank);
if (instrument)
// cilk_sync_end
B.CreateCall(CILK_CSI_FUNC(sync_end, M), SF);
B.CreateRetVoid();
}
Fn->addFnAttr(Attribute::AlwaysInline);
Fn->addFnAttr(Attribute::ReturnsTwice);
return Fn;
}
/// \brief Get or create a LLVM function for __cilkrts_enter_frame.
/// It is equivalent to the following C code
///
/// void __cilkrts_enter_frame_1(struct __cilkrts_stack_frame *sf)
/// {
/// struct __cilkrts_worker *w = __cilkrts_get_tls_worker();
/// if (w == 0) { /* slow path, rare */
/// w = __cilkrts_bind_thread_1();
/// sf->flags = CILK_FRAME_LAST | CILK_FRAME_VERSION;
/// } else {
/// sf->flags = CILK_FRAME_VERSION;
/// }
/// sf->call_parent = w->current_stack_frame;
/// sf->worker = w;
/// /* sf->except_data is only valid when CILK_FRAME_EXCEPTING is set */
/// w->current_stack_frame = sf;
/// }
static Function *Get__cilkrts_enter_frame_1(Module &M) {
Function *Fn = nullptr;
if (GetOrCreateFunction<cilk_func>("__cilkrts_enter_frame_1", M, Fn))
return Fn;
LLVMContext &Ctx = M.getContext();
Function::arg_iterator args = Fn->arg_begin();
Value *SF = &*args;
BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", Fn);
BasicBlock *SlowPath = BasicBlock::Create(Ctx, "slowpath", Fn);
BasicBlock *FastPath = BasicBlock::Create(Ctx, "fastpath", Fn);
BasicBlock *Cont = BasicBlock::Create(Ctx, "cont", Fn);
llvm::PointerType *WorkerPtrTy =
TypeBuilder<__cilkrts_worker*, false>::get(Ctx);
StructType *SFTy = StackFrameBuilder::get(Ctx);
// Block (Entry)
CallInst *W = nullptr;
{
IRBuilder<> B(Entry);
if (fastCilk)
W = B.CreateCall(CILKRTS_FUNC(get_tls_worker_fast, M));
else
W = B.CreateCall(CILKRTS_FUNC(get_tls_worker, M));
Value *Cond = B.CreateICmpEQ(W, ConstantPointerNull::get(WorkerPtrTy));
B.CreateCondBr(Cond, SlowPath, FastPath);
}
// Block (SlowPath)
CallInst *Wslow = nullptr;
{
IRBuilder<> B(SlowPath);
Wslow = B.CreateCall(CILKRTS_FUNC(bind_thread_1, M));
llvm::Type *Ty = SFTy->getElementType(StackFrameBuilder::flags);
StoreField(B,
ConstantInt::get(Ty, CILK_FRAME_LAST | CILK_FRAME_VERSION),
SF, StackFrameBuilder::flags, /*isVolatile=*/true);
B.CreateBr(Cont);
}
// Block (FastPath)
{
IRBuilder<> B(FastPath);
llvm::Type *Ty = SFTy->getElementType(StackFrameBuilder::flags);
StoreField(B,
ConstantInt::get(Ty, CILK_FRAME_VERSION),
SF, StackFrameBuilder::flags, /*isVolatile=*/true);
B.CreateBr(Cont);
}
// Block (Cont)
{
IRBuilder<> B(Cont);
Value *Wfast = W;
PHINode *W = B.CreatePHI(WorkerPtrTy, 2);
W->addIncoming(Wslow, SlowPath);
W->addIncoming(Wfast, FastPath);
StoreField(B,
LoadField(B, W, WorkerBuilder::current_stack_frame,
/*isVolatile=*/true),
SF, StackFrameBuilder::call_parent,
/*isVolatile=*/true);
StoreField(B, W, SF, StackFrameBuilder::worker, /*isVolatile=*/true);
StoreField(B, SF, W, WorkerBuilder::current_stack_frame,
/*isVolatile=*/true);
B.CreateRetVoid();
}
Fn->addFnAttr(Attribute::InlineHint);
return Fn;
}
/// \brief Get or create a LLVM function for __cilkrts_enter_frame_fast.
/// It is equivalent to the following C code
///
/// void __cilkrts_enter_frame_fast_1(struct __cilkrts_stack_frame *sf)
/// {
/// struct __cilkrts_worker *w = __cilkrts_get_tls_worker();
/// sf->flags = CILK_FRAME_VERSION;
/// sf->call_parent = w->current_stack_frame;
/// sf->worker = w;
/// /* sf->except_data is only valid when CILK_FRAME_EXCEPTING is set */
/// w->current_stack_frame = sf;
/// }
static Function *Get__cilkrts_enter_frame_fast_1(Module &M) {
Function *Fn = nullptr;
if (GetOrCreateFunction<cilk_func>("__cilkrts_enter_frame_fast_1", M, Fn))
return Fn;
LLVMContext &Ctx = M.getContext();
Function::arg_iterator args = Fn->arg_begin();
Value *SF = &*args;
BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", Fn);
IRBuilder<> B(Entry);
Value *W;
if (fastCilk)
W = B.CreateCall(CILKRTS_FUNC(get_tls_worker_fast, M));
else
W = B.CreateCall(CILKRTS_FUNC(get_tls_worker, M));
StructType *SFTy = StackFrameBuilder::get(Ctx);
llvm::Type *Ty = SFTy->getElementType(StackFrameBuilder::flags);
StoreField(B,
ConstantInt::get(Ty, CILK_FRAME_VERSION),
SF, StackFrameBuilder::flags, /*isVolatile=*/true);
StoreField(B,
LoadField(B, W, WorkerBuilder::current_stack_frame,
/*isVolatile=*/true),
SF, StackFrameBuilder::call_parent,
/*isVolatile=*/true);
StoreField(B, W, SF, StackFrameBuilder::worker, /*isVolatile=*/true);
StoreField(B, SF, W, WorkerBuilder::current_stack_frame, /*isVolatile=*/true);
B.CreateRetVoid();
Fn->addFnAttr(Attribute::InlineHint);
return Fn;
}
// /// \brief Get or create a LLVM function for __cilk_parent_prologue.
// /// It is equivalent to the following C code
// ///
// /// void __cilk_parent_prologue(__cilkrts_stack_frame *sf) {
// /// __cilkrts_enter_frame_1(sf);
// /// }
// static Function *GetCilkParentPrologue(Module &M) {
// Function *Fn = 0;
// if (GetOrCreateFunction<cilk_func>("__cilk_parent_prologue", M, Fn))
// return Fn;
// // If we get here we need to add the function body
// LLVMContext &Ctx = M.getContext();
// Function::arg_iterator args = Fn->arg_begin();
// Value *SF = &*args;
// BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", Fn);
// IRBuilder<> B(Entry);
// // __cilkrts_enter_frame_1(sf)
// B.CreateCall(CILKRTS_FUNC(enter_frame_1, M), SF);
// B.CreateRetVoid();
// Fn->addFnAttr(Attribute::InlineHint);
// return Fn;
// }
/// \brief Get or create a LLVM function for __cilk_parent_epilogue.
/// It is equivalent to the following C code
///
/// void __cilk_parent_epilogue(__cilkrts_stack_frame *sf) {
/// __cilkrts_pop_frame(sf);
/// if (sf->flags != CILK_FRAME_VERSION)
/// __cilkrts_leave_frame(sf);
/// }
static Function *GetCilkParentEpilogue(Module &M, bool instrument = false) {
Function *Fn = nullptr;
if (GetOrCreateFunction<cilk_func>("__cilk_parent_epilogue", M, Fn))
return Fn;
// If we get here we need to add the function body
LLVMContext &Ctx = M.getContext();
Function::arg_iterator args = Fn->arg_begin();
Value *SF = &*args;
BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", Fn),
*B1 = BasicBlock::Create(Ctx, "body", Fn),
*Exit = BasicBlock::Create(Ctx, "exit", Fn);
// Entry
{
IRBuilder<> B(Entry);
if (instrument)
// cilk_leave_begin
B.CreateCall(CILK_CSI_FUNC(leave_begin, M), SF);
// __cilkrts_pop_frame(sf)
B.CreateCall(CILKRTS_FUNC(pop_frame, M), SF);
// if (sf->flags != CILK_FRAME_VERSION)
Value *Flags = LoadField(B, SF, StackFrameBuilder::flags,
/*isVolatile=*/true);
Value *Cond = B.CreateICmpNE(Flags,
ConstantInt::get(Flags->getType(),
CILK_FRAME_VERSION));
B.CreateCondBr(Cond, B1, Exit);
}
// B1
{
IRBuilder<> B(B1);
// __cilkrts_leave_frame(sf);
B.CreateCall(CILKRTS_FUNC(leave_frame, M), SF);
B.CreateBr(Exit);
}
// Exit
{
IRBuilder<> B(Exit);
if (instrument)
// cilk_leave_end
B.CreateCall(CILK_CSI_FUNC(leave_end, M));
B.CreateRetVoid();
}
Fn->addFnAttr(Attribute::InlineHint);
return Fn;
}
static const StringRef stack_frame_name = "__cilkrts_sf";
static const StringRef worker8_name = "__cilkrts_wc8";
// static llvm::Value *LookupStackFrame(Function &F) {
// return F.getValueSymbolTable()->lookup(stack_frame_name);
// }
/// \brief Create the __cilkrts_stack_frame for the spawning function.
static AllocaInst *CreateStackFrame(Function &F) {
// assert(!LookupStackFrame(F) && "already created the stack frame");
LLVMContext &Ctx = F.getContext();
const DataLayout &DL = F.getParent()->getDataLayout();
Type *SFTy = StackFrameBuilder::get(Ctx);
Instruction *I = F.getEntryBlock().getFirstNonPHIOrDbgOrLifetime();
AllocaInst *SF = new AllocaInst(SFTy, DL.getAllocaAddrSpace(),
/*size*/nullptr, 8,
/*name*/stack_frame_name, /*insert before*/I);
if (!I)
F.getEntryBlock().getInstList().push_back(SF);
return SF;
}
Value* GetOrInitCilkStackFrame(Function& F,
ValueToValueMapTy &DetachCtxToStackFrame,
bool Helper = true, bool instrument = false) {
// Value* V = LookupStackFrame(F);
Value *V = DetachCtxToStackFrame[&F];
if (V) return V;
AllocaInst* alloc = CreateStackFrame(F);
DetachCtxToStackFrame[&F] = alloc;
BasicBlock::iterator II = F.getEntryBlock().getFirstInsertionPt();
AllocaInst* curinst;
do {
curinst = dyn_cast<llvm::AllocaInst>(II);
II++;
} while (curinst != alloc);
Value *StackSave;
IRBuilder<> IRB(&(F.getEntryBlock()), II);
if (instrument) {
Type *Int8PtrTy = IRB.getInt8PtrTy();
Value *ThisFn = ConstantExpr::getBitCast(&F, Int8PtrTy);
Value *ReturnAddress =
IRB.CreateCall(Intrinsic::getDeclaration(F.getParent(),
Intrinsic::returnaddress),
IRB.getInt32(0));
StackSave =
IRB.CreateCall(Intrinsic::getDeclaration(F.getParent(),
Intrinsic::stacksave));
if (Helper) {
Value *begin_args[3] = { alloc, ThisFn, ReturnAddress };
IRB.CreateCall(CILK_CSI_FUNC(enter_helper_begin, *F.getParent()),
begin_args);
} else {
Value *begin_args[4] = { IRB.getInt32(0), alloc, ThisFn, ReturnAddress };
IRB.CreateCall(CILK_CSI_FUNC(enter_begin, *F.getParent()), begin_args);
}
}
Value *args[1] = { alloc };
if (Helper || fastCilk)
IRB.CreateCall(CILKRTS_FUNC(enter_frame_fast_1, *F.getParent()), args);
else
IRB.CreateCall(CILKRTS_FUNC(enter_frame_1, *F.getParent()), args);
/* inst->insertAfter(alloc); */
if (instrument) {
Value* end_args[2] = { alloc, StackSave };
IRB.CreateCall(CILK_CSI_FUNC(enter_end, *F.getParent()), end_args);
}
EscapeEnumerator EE(F, "cilkabi_epilogue", false);
while (IRBuilder<> *AtExit = EE.Next()) {
if (isa<ReturnInst>(AtExit->GetInsertPoint()))
AtExit->CreateCall(GetCilkParentEpilogue(*F.getParent(), instrument),
args, "");
}
// // The function exits are unified before lowering.
// ReturnInst *retInst = nullptr;
// for (BasicBlock &BB : F) {
// TerminatorInst* TI = BB.getTerminator();
// if (!TI) continue;
// if (ReturnInst* RI = llvm::dyn_cast<ReturnInst>(TI)) {
// assert(!retInst && "Multiple returns found.");
// retInst = RI;
// }
// }
// assert(retInst && "No returns found.");
// CallInst::Create(GetCilkParentEpilogue(*F.getParent(), instrument), args, "",
// retInst);
return alloc;
}
static inline
bool makeFunctionDetachable(Function &extracted,
ValueToValueMapTy &DetachCtxToStackFrame,
bool instrument = false) {
Module *M = extracted.getParent();
// LLVMContext& Context = extracted.getContext();
// const DataLayout& DL = M->getDataLayout();
/*
__cilkrts_stack_frame sf;
__cilkrts_enter_frame_fast_1(&sf);
__cilkrts_detach();
*x = f(y);
*/
Value *SF = CreateStackFrame(extracted);
DetachCtxToStackFrame[&extracted] = SF;
assert(SF);
Value *args[1] = { SF };
// Scan function to see if it detaches.
bool SimpleHelper = true;
for (BasicBlock &BB : extracted) {
if (isa<DetachInst>(BB.getTerminator())) {
SimpleHelper = false;
break;
}
}
if (!SimpleHelper)
DEBUG(dbgs() << "Detachable helper function itself detaches.\n");
BasicBlock::iterator II = extracted.getEntryBlock().getFirstInsertionPt();
AllocaInst* curinst;
do {
curinst = dyn_cast<llvm::AllocaInst>(II);
II++;
} while (curinst != SF);
Value *StackSave;
IRBuilder<> IRB(&(extracted.getEntryBlock()), II);
if (instrument) {
Type *Int8PtrTy = IRB.getInt8PtrTy();
Value *ThisFn = ConstantExpr::getBitCast(&extracted, Int8PtrTy);
Value *ReturnAddress =
IRB.CreateCall(Intrinsic::getDeclaration(M, Intrinsic::returnaddress),
IRB.getInt32(0));
StackSave =
IRB.CreateCall(Intrinsic::getDeclaration(M, Intrinsic::stacksave));
if (SimpleHelper) {
Value *begin_args[3] = { SF, ThisFn, ReturnAddress };
IRB.CreateCall(CILK_CSI_FUNC(enter_helper_begin, *M), begin_args);
} else {
Value *begin_args[4] = { IRB.getInt32(0), SF, ThisFn, ReturnAddress };
IRB.CreateCall(CILK_CSI_FUNC(enter_begin, *M), begin_args);
}
}
if (SimpleHelper)
IRB.CreateCall(CILKRTS_FUNC(enter_frame_fast_1, *M), args);
else
IRB.CreateCall(CILKRTS_FUNC(enter_frame_1, *M), args);
if (instrument) {
Value *end_args[2] = { SF, StackSave };
IRB.CreateCall(CILK_CSI_FUNC(enter_end, *M), end_args);
}
// Call __cilkrts_detach
{
if (instrument)
IRB.CreateCall(CILK_CSI_FUNC(detach_begin, *M), args);
IRB.CreateCall(CILKRTS_FUNC(detach, *M), args);
if (instrument)
IRB.CreateCall(CILK_CSI_FUNC(detach_end, *M));
}
EscapeEnumerator EE(extracted, "cilkabi_epilogue", false);
while (IRBuilder<> *AtExit = EE.Next()) {
if (isa<ReturnInst>(AtExit->GetInsertPoint()))
AtExit->CreateCall(GetCilkParentEpilogue(*M, instrument), args, "");
else if (ResumeInst *RI = dyn_cast<ResumeInst>(AtExit->GetInsertPoint())) {
/*
sf.flags = sf.flags | CILK_FRAME_EXCEPTING;
sf.except_data = Exn;
*/
IRBuilder<> B(RI);
Value *Exn = AtExit->CreateExtractValue(RI->getValue(),
ArrayRef<unsigned>(0));
Value *Flags = LoadField(*AtExit, SF, StackFrameBuilder::flags,
/*isVolatile=*/true);
Flags = AtExit->CreateOr(Flags,
ConstantInt::get(Flags->getType(),
CILK_FRAME_EXCEPTING));
StoreField(*AtExit, Exn, SF, StackFrameBuilder::except_data);
/*
__cilkrts_pop_frame(&sf);
if (sf->flags)
__cilkrts_leave_frame(&sf);
*/
AtExit->CreateCall(GetCilkParentEpilogue(*M, instrument), args, "");
// CallInst::Create(GetCilkParentEpilogue(*M, instrument), args, "", RI);
}
}
// // Handle returns
// ReturnInst* Ret = nullptr;
// for (BasicBlock &BB : extracted) {
// TerminatorInst* TI = BB.getTerminator();
// if (!TI) continue;
// if (ReturnInst* RI = dyn_cast<ReturnInst>(TI)) {
// assert(Ret == nullptr && "Multiple return");
// Ret = RI;
// }
// }
// assert(Ret && "No return from extract function");
// /*
// __cilkrts_pop_frame(&sf);
// if (sf->flags)
// __cilkrts_leave_frame(&sf);
// */
// CallInst::Create(GetCilkParentEpilogue(*M, instrument), args, "", Ret);
// // Handle resumes
// for (BasicBlock &BB : extracted) {
// if (!isa<ResumeInst>(BB.getTerminator()))
// continue;
// ResumeInst *RI = cast<ResumeInst>(BB.getTerminator());
// /*
// sf.flags = sf.flags | CILK_FRAME_EXCEPTING;
// sf.except_data = Exn;
// */
// IRBuilder<> B(RI);
// Value *Exn = B.CreateExtractValue(RI->getValue(), ArrayRef<unsigned>(0));
// Value *Flags = LoadField(B, SF, StackFrameBuilder::flags,
// /*isVolatile=*/true);
// Flags = B.CreateOr(Flags,
// ConstantInt::get(Flags->getType(),
// CILK_FRAME_EXCEPTING));
// StoreField(B, Exn, SF, StackFrameBuilder::except_data);
// /*
// __cilkrts_pop_frame(&sf);
// if (sf->flags)
// __cilkrts_leave_frame(&sf);
// */
// CallInst::Create(GetCilkParentEpilogue(*M, instrument), args, "", RI);
// }
return true;
}
//##############################################################################
llvm::tapir::CilkABI::CilkABI() {}
/// \brief Get/Create the worker count for the spawning function.
Value* llvm::tapir::CilkABI::GetOrCreateWorker8(Function &F) {
// Value* W8 = F.getValueSymbolTable()->lookup(worker8_name);
// if (W8) return W8;
IRBuilder<> B(F.getEntryBlock().getFirstNonPHIOrDbgOrLifetime());
Value *P0 = B.CreateCall(CILKRTS_FUNC(get_nworkers, *F.getParent()));
Value *P8 = B.CreateMul(P0, ConstantInt::get(P0->getType(), 8), worker8_name);
return P8;
}
void llvm::tapir::CilkABI::createSync(SyncInst &SI, ValueToValueMapTy &DetachCtxToStackFrame) {
Function &Fn = *(SI.getParent()->getParent());
Module &M = *(Fn.getParent());
Value *SF = GetOrInitCilkStackFrame(Fn, DetachCtxToStackFrame,
/*isFast*/false, false);
Value *args[] = { SF };
assert( args[0] && "sync used in function without frame!" );
CallInst *CI = CallInst::Create(GetCilkSyncFn(M, false), args, "",
/*insert before*/&SI);
CI->setDebugLoc(SI.getDebugLoc());
BasicBlock *Succ = SI.getSuccessor(0);
SI.eraseFromParent();
BranchInst::Create(Succ, CI->getParent());
}
Function *llvm::tapir::CilkABI::createDetach(DetachInst &detach,
ValueToValueMapTy &DetachCtxToStackFrame,
DominatorTree &DT, AssumptionCache &AC) {
BasicBlock *detB = detach.getParent();
Function &F = *(detB->getParent());
BasicBlock *Spawned = detach.getDetached();
BasicBlock *Continue = detach.getContinue();
Module *M = F.getParent();
//replace with branch to succesor
//entry / cilk.spawn.savestate
Value *SF = GetOrInitCilkStackFrame(F, DetachCtxToStackFrame,
/*isFast=*/false, false);
assert(SF && "null stack frame unexpected");
CallInst *cal = nullptr;
Function *extracted = extractDetachBodyToFunction(detach, DT, AC, &cal);
assert(extracted && "could not extract detach body to function");
// Unlink the detached CFG in the original function. The heavy lifting of
// removing the outlined detached-CFG is left to subsequent DCE.
// Replace the detach with a branch to the continuation.
BranchInst *ContinueBr = BranchInst::Create(Continue);
ReplaceInstWithInst(&detach, ContinueBr);
// Rewrite phis in the detached block.
{
BasicBlock::iterator BI = Spawned->begin();
while (PHINode *P = dyn_cast<PHINode>(BI)) {
P->removeIncomingValue(detB);
++BI;
}
}
Value *SetJmpRes;
{
IRBuilder<> b(cal);
SetJmpRes = EmitCilkSetJmp(b, SF, *M);
}
// Conditionally call the new helper function based on the result of the
// setjmp.
{
BasicBlock *CallBlock = SplitBlock(detB, cal, &DT);
BasicBlock *CallCont = SplitBlock(CallBlock,
CallBlock->getTerminator(), &DT);
IRBuilder<> B(detB->getTerminator());
SetJmpRes = B.CreateICmpEQ(SetJmpRes,
ConstantInt::get(SetJmpRes->getType(), 0));
B.CreateCondBr(SetJmpRes, CallBlock, CallCont);
detB->getTerminator()->eraseFromParent();
}
makeFunctionDetachable(*extracted, DetachCtxToStackFrame, false);
return extracted;
}
// Helper function to inline calls to compiler-generated Cilk Plus runtime
// functions when possible. This inlining is necessary to properly implement
// some Cilk runtime "calls," such as __cilkrts_detach().
static inline void inlineCilkFunctions(Function &F) {
bool inlining = true;
while (inlining) {
inlining = false;
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
if (CallInst *cal = dyn_cast<CallInst>(&*I))
if (Function *fn = cal->getCalledFunction())
if (fn->getName().startswith("__cilk")) {
InlineFunctionInfo IFI;
if (InlineFunction(cal, IFI)) {
if (fn->getNumUses()==0)
fn->eraseFromParent();
inlining = true;
break;
}
}
}
if (llvm::verifyFunction(F, &errs())) {
DEBUG(F.dump());
assert(0);
}
}
cl::opt<bool> fastCilk("fast-cilk", cl::init(false), cl::Hidden,
cl::desc("Attempt faster cilk call implementation"));
void llvm::tapir::CilkABI::preProcessFunction(Function &F) {
if (fastCilk && F.getName()=="main") {
IRBuilder<> start(F.getEntryBlock().getFirstNonPHIOrDbg());
auto m = start.CreateCall(CILKRTS_FUNC(init, *F.getParent()));
m->moveBefore(F.getEntryBlock().getTerminator());
}
}
void llvm::tapir::CilkABI::postProcessFunction(Function &F) {
inlineCilkFunctions(F);
}
void llvm::tapir::CilkABI::postProcessHelper(Function &F) {
inlineCilkFunctions(F);
}
|
67f9de548bf75f7389028c251559d4d9b17d03f2
|
dc77ee86d6a45b48ecc2f20d36f35ff0e2788ead
|
/Headers/Yuka/Traits.hh
|
f3a4774464e42657f030e5d790b51e85c76a6dd8
|
[
"Apache-2.0"
] |
permissive
|
twistedflick/Yuka
|
230c7ac8c791566667281df051c94531135c2642
|
c1601a7314ccbdb1de2f4b7c69f4e2eb3f749b35
|
refs/heads/master
| 2021-04-27T11:54:24.042352
| 2018-12-31T00:21:49
| 2018-12-31T00:21:49
| 122,569,876
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 982
|
hh
|
Traits.hh
|
/* Copyright 2018 Mo McRoberts.
*
* 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 YUKA_TRAITS_HH_
# define YUKA_TRAITS_HH_ 1
# include "Traits/Trait.hh"
# include "Traits/Debuggable.hh"
# include "Traits/Flexible.hh"
# include "Traits/Identifiable.hh"
# include "Traits/Listening.hh"
# include "Traits/Observable.hh"
# include "Traits/Scriptable.hh"
# include "Traits/Solid.hh"
# include "Traits/Spatial.hh"
#endif /*!YUKA_TRAITS_HH_*/
|
579920a54aec32e2a954e71535bb1ccf84eae580
|
b367fe5f0c2c50846b002b59472c50453e1629bc
|
/xbox_leak_may_2020/xbox trunk/xbox/private/vc6addon/ide/include/proppage.h
|
daf63d3e942ea622b667606004e790be25e25ae6
|
[] |
no_license
|
sgzwiz/xbox_leak_may_2020
|
11b441502a659c8da8a1aa199f89f6236dd59325
|
fd00b4b3b2abb1ea6ef9ac64b755419741a3af00
|
refs/heads/master
| 2022-12-23T16:14:54.706755
| 2020-09-27T18:24:48
| 2020-09-27T18:24:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,226
|
h
|
proppage.h
|
/////////////////////////////////////////////////////////////////////////////
// PROPPAGE.H
// Defines classes which can be used to display a property page
// to view a CSlob's property map
#ifndef __PROPPAGE_H__
#define __PROPPAGE_H__
#undef AFX_DATA
#define AFX_DATA AFX_EXT_DATA
class CSlob;
class CSheetWnd;
class COleAllPage;
// CControlMap is a structure that maps control ids to property ids and
// control types. An array of these is defined for each property dialog
// by using the macros below (DECLARE_IDE_CONTROL_MAP, BEGIN_IDE_CONTROL_MAP,
// END_IDE_CONTROL_MAP, etc.)
class CEnum;
struct CControlMap
{
UINT m_nCtlID; // dialog id for m_nCtlType == page
UINT m_nLastCtlID; // name string id for m_nCtlType == page
UINT m_nProp; // optional page help ID for m_nCtlType == page
enum CTL_TYPE
{
null,
check,
list,
checkList,
comboList,
comboText,
autoComboList,
edit,
autoEdit,
radio,
page,
editInt, // FUTURE: some of these types could be removed,
editNum, // and achieved through flags. But no hurry.
thinText,
thickText,
icon,
editStrCap,
bitmap,
listText,
symbolCombo,
pathText,
} m_nCtlType;
DWORD m_dwFlags;
UINT m_nExtra; // extra UINT, eg. used for offset in RADIO
// union {
// CEnum* m_pEnum; // for lists and combos
// } u;
};
// flags for CControlMap::m_dwFlags:
enum
{
CM_EXTRA_ENUM = 0x001, // m_nExtra is a CEnum*
CM_EXTRA_LIMIT = 0x002, // m_nExtra is a limit value (UINT)
CM_EXTRA_OFFSET = 0x003, // m_nExtra is an offset
CM_EXTRA_HELPID = 0x004, // m_nExtra is a HelpID (of a page)
CM_EXTRA_MASK = 0x0ff, // for (m_dwFlags & CM_EXTRA_MASK) == CM_EXTRA_*
CM_NOAMBIGUOUS = 0x100, // disable control if value is ambiguous
CM_NOMULTISEL = 0x200, // disable control for any multiple selection
};
// Include this inside a CSlobPage-derived class declaration.
#define DECLARE_IDE_CONTROL_MAP() \
virtual CControlMap* GetControlMap(); \
static CControlMap m_controlMap [];
// Include these with the implementation of a CSlobPage-derived class.
#define BEGIN_IDE_CONTROL_MAP(theClass, nDlgID, nNameID) \
CControlMap* theClass::GetControlMap() \
{ return &m_controlMap[0]; } \
CControlMap theClass::m_controlMap [] = { \
{ nDlgID, nNameID, 0, CControlMap::page, 0x0, NULL },
#define BEGIN_IDE_CONTROL_MAP_H(theClass, nDlgID, nNameID, nHelpID) \
CControlMap* theClass::GetControlMap() \
{ return &m_controlMap[0]; } \
CControlMap theClass::m_controlMap [] = { \
{ nDlgID, nNameID, 0, CControlMap::page, CM_EXTRA_HELPID, nHelpID },
#define END_IDE_CONTROL_MAP() { 0, 0, 0, CControlMap::null, 0x0, NULL } };
// These macros define CControlMap structures for inclusion between
// the BEGIN_IDE_CONTROL_MAP and END_IDE_CONTROL_MAP macros.
#define MAP_CHECK(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::check, 0x0, NULL },
#define MAP_LIST(nCtlID, nProp, pEnum) \
{ nCtlID, nCtlID, nProp, CControlMap::list, CM_EXTRA_ENUM, (UINT)&pEnum },
#define MAP_LIST_TEXT(nCtlID, nProp, pEnum) \
{ nCtlID, nCtlID, nProp, CControlMap::listText, CM_EXTRA_ENUM, (UINT)&pEnum },
#define MAP_CHECK_LIST(nCtlID, pEnum) \
{ nCtlID, nCtlID, 0, CControlMap::checkList, CM_EXTRA_ENUM, (UINT)&pEnum },
#define MAP_COMBO_LIST(nCtlID, nProp, pEnum) \
{ nCtlID, nCtlID, nProp, CControlMap::comboList, CM_EXTRA_ENUM, (UINT)&pEnum },
#define MAP_COMBO_TEXT(nCtlID, nProp, pEnum) \
{ nCtlID, nCtlID, nProp, CControlMap::comboText, CM_EXTRA_ENUM, (UINT)&pEnum },
#define MAP_AUTO_COMBO_LIST(nCtlID, nProp, pEnum) \
{ nCtlID, nCtlID, nProp, CControlMap::autoComboList, CM_EXTRA_ENUM, (UINT)&pEnum },
#define MAP_EDIT(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::edit, 0x0, NULL },
#define MAP_EDIT_LIMIT(nCtlID, nProp, nLimit) \
{ nCtlID, nCtlID, nProp, CControlMap::edit, CM_EXTRA_LIMIT, nLimit },
#define MAP_EDIT_INT(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::editInt, 0x0, NULL },
#define MAP_EDIT_NUM(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::editNum, 0x0, NULL },
#define MAP_AUTO_EDIT(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::autoEdit, 0x0, NULL },
#define MAP_AUTO_EDIT_LIMIT(nCtlID, nProp, nLimit) \
{ nCtlID, nCtlID, nProp, CControlMap::autoEdit, CM_EXTRA_LIMIT, nLimit },
#define MAP_RADIO(nFirstCtlID, nLastCtlID, nOffset, nProp) \
{ nFirstCtlID, nLastCtlID, nProp, CControlMap::radio, CM_EXTRA_OFFSET, nOffset },
#define MAP_THIN_TEXT(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::thinText, 0x0, NULL },
#define MAP_THICK_TEXT(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::thickText, 0x0, NULL },
#define MAP_ICON(nCtlID) \
{ nCtlID, nCtlID, 0, CControlMap::icon, 0x0, NULL },
#define MAP_EDIT_STRCAP(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::editStrCap, 0x0, NULL },
#define MAP_BITMAP(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::bitmap, CM_NOAMBIGUOUS, NULL },
#define MAP_SYMBOL_COMBO(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::symbolCombo, 0x0, NULL },
#define MAP_PATH_TEXT(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::pathText, 0x0, NULL },
#define MAP_EDIT_NOAMBIG(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::edit, CM_NOAMBIGUOUS, NULL },
#define MAP_EDIT_NOMULTISEL(nCtlID, nProp) \
{ nCtlID, nCtlID, nProp, CControlMap::edit, CM_NOMULTISEL, NULL },
class C3dPropertyPage : public CDialog
{
public:
DECLARE_DYNAMIC(C3dPropertyPage)
public:
C3dPropertyPage();
virtual BOOL Create(UINT nIDSheet, CWnd* pWndOwner) = 0;
virtual BOOL SetupPage(CSheetWnd* pSheetWnd, CSlob* pSlob);
virtual void Activate(UINT nState, CSlob* pCurSlob);
virtual void InitializePage();
virtual void TermPage();
virtual BOOL ShowPage(int nCmdShow);
virtual void MovePage(const CRect& rect);
virtual BOOL Validate() = 0;
virtual BOOL UndoPendingValidate() = 0;
virtual void OnActivate();
virtual void OnDeactivate();
virtual LRESULT OnPageHelp(WPARAM wParam, LPARAM lParam);
virtual void GetPageName(CString& strName);
virtual CSize GetPageSize();
virtual BOOL IsPageActive() { return m_hWnd != NULL; }
virtual BOOL IsPageDisabled() { return FALSE; }
CSlob* GetSlob() { return m_pSlob; }
protected:
CSlob* m_pSlob;
CSheetWnd* m_pSheetWnd;
friend class CSheetWnd;
friend class CMultiSlob;
};
/////////////////////////////////////////////////////////////////////////////
// COlePage property page
class COlePage : public C3dPropertyPage
{
public:
DECLARE_DYNAMIC(COlePage)
public:
// Page caching.
static CObList s_listPages;
static LPUNKNOWN *s_pObjectCurrent;
static LPUNKNOWN s_pSingleObject;
static ULONG s_nObjectCurrent;
static UINT s_nPagesCurrent;
static LPCLSID s_lpClsID;
static BOOL s_bPossibleUnusedServers;
static COleAllPage *s_pAllPage;
//$UNDONE HACK HACK HACK get rid of this when the resource package changes its
// data bound control handling
static BOOL s_fShowAllPage;
static BOOL GetShowAllPage();
static void SetShowAllPage(BOOL fSet);
static UINT LoadPages(ULONG nUnkCnt, LPUNKNOWN *pprgUnk);
static UINT LoadAllPageOnly(ULONG nUnkCnt, LPUNKNOWN *pprgUnk);
static BOOL InPageCache(ULONG nUnkCnt, LPUNKNOWN *pprgUnk);
static UINT AddAllPageToList(UINT nPagesCurrent, CAUUID *pcaGUID);
static HRESULT DoPageIntersection(ISpecifyPropertyPages *pSPP, CAUUID *pcaGUID);
static C3dPropertyPage* GetPropPage(UINT iPage);
static C3dPropertyPage* GetPropPage(REFCLSID clsid);
static void Cleanup();
static void SetUnusedServers(BOOL fUnused = TRUE);
protected:
COlePage(REFCLSID clsid); // Use GetPropPage()
~COlePage();
public:
BOOL IsUsable()
{ return m_lpPropPage != NULL; }
virtual BOOL Create(UINT nIDSheet, CWnd* hWndOwner);
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void InitializePage();
virtual void TermPage();
virtual BOOL ShowPage(int nCmdShow);
virtual void MovePage(const CRect& rect);
virtual BOOL DestroyWindow();
virtual BOOL Validate();
virtual BOOL UndoPendingValidate();
virtual LRESULT OnPageHelp(WPARAM wParam, LPARAM lParam);
virtual void GetPageName(CString& strName);
virtual CSize GetPageSize();
virtual BOOL IsPageActive() { return m_bActive; }
void EditProperty(DISPID dispid);
inline void GetCLSID (CLSID * pClsID)
{
if (pClsID)
*pClsID = m_clsid;
}
// Attributes
protected:
BOOL m_bActive:1;
BOOL m_bVisible:1;
BOOL m_bTranslatingAccel:1;
CLSID m_clsid;
CString m_strName;
CSize m_size;
LPPROPERTYPAGE m_lpPropPage;
// Interface Maps
protected:
// IPropertyPageSite
BEGIN_INTERFACE_PART(PropertyPageSite, IPropertyPageSite)
INIT_INTERFACE_PART(COlePage, PropertyPageSite)
STDMETHOD(OnStatusChange)(DWORD);
STDMETHOD(GetLocaleID)(LCID FAR*);
STDMETHOD(GetPageContainer)(LPUNKNOWN FAR*);
STDMETHOD(TranslateAccelerator)(LPMSG);
END_INTERFACE_PART(PropertyPageSite)
DECLARE_INTERFACE_MAP()
friend COleAllPage;
};
// CSlobPages are CDialogs that use the CSlob property mechanism to
// automaticly handle the dialog.
class CSlobPage : public C3dPropertyPage
{
public:
DECLARE_IDE_CONTROL_MAP()
DECLARE_DYNAMIC(CSlobPage)
public:
CSlobPage();
virtual BOOL Create(UINT nIDSheet, CWnd* pWndOwner);
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void InitializePage();
virtual void InitPage();
BOOL EnablePage(BOOL bEnable = TRUE);
virtual BOOL IsPageDisabled() { return !m_bEnabled; }
virtual BOOL Validate();
virtual BOOL UndoPendingValidate();
virtual LRESULT OnPageHelp(WPARAM wParam, LPARAM lParam)
{
return C3dPropertyPage::OnPageHelp(wParam, lParam);
}
virtual BOOL OnPropChange(UINT nProp);
virtual void GetPageName(CString& strName);
CControlMap* FindControl(UINT nCtlID);
CControlMap* FindProp(UINT nProp);
protected:
// m_nValidateID is set to the ID of a control that will need to be validated
// by Validate() as soon as that control has been changed. It will
// be NULL if nothing needs to be validated. This will mainly be
// used by edits and combos that are normally validated when they
// loose the focus. Needs to be in here for the Escape accelerator.
int m_nValidateID;
BOOL m_bIgnoreChange:1;
BOOL m_bEnabled:1;
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
void StringEditorEditToProp(char* szBuf);
void StringEditorPropToEdit(CString& str);
/////////////////////////////////////////////////////////////////////////////
// List and Combo Box Enumerations...
// One entry in an enumeration
struct CEnumerator
{
const char* szId;
int val;
};
class CPropCheckList;
// An enumeration
class CEnum
{
public:
virtual void FillListBox(CListBox* pWnd, BOOL bClear = TRUE, CSlob* = NULL);
virtual void FillCheckList(CPropCheckList* pWnd, BOOL bClear = TRUE, CSlob* = NULL);
virtual void FillComboBox(CComboBox* pWnd, BOOL bClear = TRUE, CSlob* = NULL);
virtual BOOL ContainsVal(int val);
virtual POSITION GetHeadPosition();
virtual CEnumerator* GetNext(POSITION& pos);
virtual CEnumerator* GetList()
{ ASSERT(FALSE); return(NULL); };
};
// this is a enum designed to store its strings in the string table
// One entry in a localized enumeration
struct CLocalizedEnumerator
{
CLocalizedEnumerator( UINT aId, int aVal );
CString szId;
UINT id;
int val;
};
// A localized enumeration
class CLocalizedEnum : public CEnum
{
public:
virtual void FillListBox(CListBox* pWnd, BOOL bClear = TRUE, CSlob* = NULL);
virtual void FillCheckList(CPropCheckList* pWnd, BOOL bClear = TRUE, CSlob* = NULL);
virtual void FillComboBox(CComboBox* pWnd, BOOL bClear = TRUE, CSlob* = NULL);
virtual BOOL ContainsVal(int val);
virtual POSITION GetHeadPosition();
virtual CLocalizedEnumerator* GetNextL(POSITION& pos);
virtual CEnumerator* GetNext(POSITION& pos)
{ ASSERT( FALSE ); return (NULL); }; // You must use GetNextL()
virtual CLocalizedEnumerator *GetListL()
{ ASSERT( FALSE ); return (NULL); };
};
// Helper macros for making enumerations
#define DECLARE_ENUM_LIST() \
public: \
virtual CEnumerator* GetList() \
{ return &c_list[0]; } \
static CEnumerator c_list [];
// Define the enumerator identifiers and values in this table
#define BEGIN_ENUM_LIST(theClass) \
CEnumerator theClass::c_list [] = {
#define END_ENUM_LIST() \
{ NULL, 0 } };
// Define a simple CEnum derived class
#define DEFINE_ENUM(theEnum) \
class C##theEnum : public CEnum { DECLARE_ENUM_LIST() }; \
C##theEnum NEAR theEnum; \
BEGIN_ENUM_LIST(C##theEnum)
#define DECLARE_ENUM(theEnum) \
class C##theEnum : public CEnum { DECLARE_ENUM_LIST() }; \
extern C##theEnum NEAR theEnum;
// Helper macros for making localized enumerations
#define DECLARE_LOCALIZED_ENUM_LIST() \
public: \
virtual CLocalizedEnumerator* GetListL() \
{ return &c_list[0]; } \
static CLocalizedEnumerator c_list [];
// Define the enumerator identifiers and values in this table
#define BEGIN_LOCALIZED_ENUM_LIST(theClass) \
CLocalizedEnumerator theClass::c_list [] = {
// A localized enumeration entry
#define LOCALIZED_ENUM_ENTRY(id,val) \
CLocalizedEnumerator( id, val ),
#define END_LOCALIZED_ENUM_LIST() \
CLocalizedEnumerator( 0, 0 ) };
// Define a simple CLocalizedEnum derived class
#define DEFINE_LOCALIZED_ENUM(theEnum) \
class C##theEnum : public CLocalizedEnum { DECLARE_LOCALIZED_ENUM_LIST() }; \
C##theEnum NEAR theEnum; \
BEGIN_LOCALIZED_ENUM_LIST(C##theEnum)
#define DECLARE_LOCALIZED_ENUM(theEnum) \
class C##theEnum : public CLocalizedEnum { DECLARE_LOCALIZED_ENUM_LIST() }; \
extern C##theEnum NEAR theEnum;
/////////////////////////////////////////////////////////////////////////////
// Property Browser API
#define WM_USER_VALIDATEREQ (WM_USER + 3)
void SetPropertyBrowserVisible(BOOL bVisible); // show/hide and set visible state
void ShowPropertyBrowser(BOOL bShow = TRUE); // show/hide (temporary)
BOOL IsPropertyBrowserVisible(); // visibility test
void PinPropertyBrowser(BOOL bPin = TRUE); // toggles the pushpin when visible
BOOL IsPropertyBrowserPinned(); // pinned test
void ResetPropertyBrowserSelectionSlob(CSlob* pSlob);
void InvalidatePropertyBrowser(); // repaint property browser
void UpdatePropertyBrowser(); // force page to reflect selection
BOOL ValidatePropertyBrowser(); // validate pending changes
void ActivatePropertyBrowser(); // activate and show
void DeactivatePropertyBrowser(); // return focus to the app
void CancelPropertyBrowser(); // cancel changes
void ClosePropertyBrowser(); // really just hides it and sets popping off
BOOL BeginPropertyBrowserEdit(UINT nProp, // edit a specific property
UINT nChar = 0, UINT nRepeat = 0, UINT nFlags = 0);
CWnd* GetPropertyBrowserControl(UINT nID); // get a control on for the current object
C3dPropertyPage* GetNullPropertyPage(); // get null page (has ID controls)
C3dPropertyPage* GetCurrentPropertyPage(); // current propert page
void SetPropertyBrowserDefPage(); // make the currect page the default
BOOL IsPropertyBrowserInCancel(); // did the user just cancel
BOOL IsPropertyBrowserValidating(); // is the page being validated
// Methods used during CSlob::SetupPropertyPages()
int AddPropertyPage(C3dPropertyPage* pPage, CSlob* pSlob);
void SetPropertyCaption(LPCTSTR sz);
BOOL AppendExtraPropertyPages(void);
BOOL InhibitExtraPropertyPages(BOOL bInhibit = TRUE);
int StartNewPropertyPageSet(void);
int MergePropertyPageSets(void);
#undef AFX_DATA
#define AFX_DATA NEAR
#endif // __PROPPAGE_H__
|
548dbda8db63058abe5af9c46affccc6c9e697fe
|
575c265b54bbb7f20b74701753174678b1d5ce2c
|
/hpkj/Classes/gui/HelpScrollView.h
|
ce96f22dc4c97005370b543618a98aa5958740c4
|
[] |
no_license
|
larryzen/Project3.x
|
c8c8a0be1874647909fcb1a0eb453c46d6d674f1
|
cdc2bf42ea737c317fe747255d2ff955f80dbdae
|
refs/heads/master
| 2020-12-04T21:27:46.777239
| 2019-03-02T06:30:26
| 2019-03-02T06:30:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 755
|
h
|
HelpScrollView.h
|
#ifndef __Game__HelpScrollView__
#define __Game__HelpScrollView__
#include "CocosUnits.h"
#include "ConfigMgr.h"
#include "AnsString.h"
#include <iostream>
#include "cocos2d.h"
class HelpScrollView : public Layer
{
public:
HelpScrollView();
~HelpScrollView();
virtual bool init();
static Scene* scene();
Rect addString(Vec2 pt,const char* buff,cocos2d::Size size);
CREATE_FUNC(HelpScrollView);
public:
void onEnter();
void onExit();
bool onTouchBegan(Touch *pTouch, Event *pEvent);
void onTouchMoved(Touch *pTouch, Event *pEvent);
void onTouchEnded(Touch *pTouch, Event *pEvent);
void onTouchCancelled(Touch *pTouch, Event *pEvent);
private:
Node *m_node;
float m_start;
float m_end;
Vec2 m_endPos;
};
#endif //__Game__HelpScrollView__
|
08711cd15adb79ef37417226182066234c4e39d1
|
307c315a79f505aa9e3ac0227a003a2f185ba2ec
|
/module_01/ex03/main.cpp
|
1658210069ae4084409663686007b967aa02260f
|
[] |
no_license
|
EudaldV98/Piscine_Cpp
|
c0d7791c996127fff7578b53a550cf7cd55ccae6
|
445dc6752e4b1c26dd1715989da799317e5ab40b
|
refs/heads/master
| 2022-07-12T07:42:38.664212
| 2022-05-30T12:09:52
| 2022-05-30T12:09:52
| 243,049,544
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,079
|
cpp
|
main.cpp
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jvaquer <jvaquer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/27 18:20:12 by jvaquer #+# #+# */
/* Updated: 2020/12/14 11:39:29 by jvaquer ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
#include "ZombieHorde.hpp"
int main()
{
srand(time(NULL));
Zombie zb("Jonny", "Ground");
zb.announce();
ZombieHorde horde(5);
horde.announce();
}
|
a12347dd900adfaf643f264d0a89e2b4c3e0f88e
|
e64923acf304626b574cfc056a1e533e10bdd2f7
|
/c++/multiInclude/a.cpp
|
4edfc8f20cbe85b1b8d1e71cceff1efbd9f9e735
|
[] |
no_license
|
jingminglake/LanguageGrammaExamples
|
8eee2122383f76bd9afd12dd2ac27623d34eff3b
|
f888e9719b43c00add9c346d6fb50024207fc22f
|
refs/heads/master
| 2021-05-07T18:00:54.484825
| 2019-07-23T22:18:07
| 2019-07-23T22:18:07
| 108,775,709
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 154
|
cpp
|
a.cpp
|
#include "a.h"
#include "b.h"
#include <iostream>
void A::f() { std::cout << b->g() << std::endl; }
void A::test() { std::cout << "1234" << std::endl; }
|
8f48b6facf56f4e0b1b7c577ff3f311c2f1f0be9
|
7491e96c4dc532b3ed7a1e6cb1a900892d182f1e
|
/DP/Ladders.cpp
|
665a5b4897a21315206a847da88523b64459d624
|
[] |
no_license
|
parvezaalam786/Placement-Preparation
|
b4312364d06d9e01118bd872da73f72dc4f6c64e
|
948f546443c0d535bb1ee40bc68ed438125a6cf4
|
refs/heads/master
| 2023-01-19T17:51:46.914941
| 2020-11-11T11:28:14
| 2020-11-11T11:28:14
| 282,716,681
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,728
|
cpp
|
Ladders.cpp
|
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define fast_io ios::sync_with_stdio(false);cin.tie(NULL);
#define input freopen("Test.txt","r",stdin)
#define output freopen("Output.txt","w",stdout);
#define what_is(x) cout<<#x<<" is "<<x<<endl;
#define F(i,a,b) for(int i = a; i < b; i++)
#define MAX(a,b,c) max(a,max(b,c))
#define MIN(a,b,c) min(a,min(b,c))
#define pb push_back
#define eb emplace_back
#define inf 1000000000
const double pi = 3.141592653589793238460;
#define debug false
#define MAXN 100010
#define mod 1000000007
int ladders_topdown(int n,int k,int dp[])
{
if(n==0)
return 1;
if(dp[n]!=0)
return dp[n];
int ways = 0;
for(int i=1;i<=k;i++)
{
if(n-i>=0)
ways += ladders_topdown(n-i,k,dp);
}
return dp[n] = ways;
}
int ladders_bottomup(int n,int k)
{
int dp[100] = {0};
dp[0] = 1;
for(int i=1;i<=n;i++)
{
dp[i] = 0;
for(int j=1;j<=k;j++)
{
if(i-j>=0)
dp[i] += dp[i-j];
}
}
return dp[n];
}
// Another Optimised Implementation
int ladders_optimised(int n,int k)
{
int dp[100] = {0};
dp[0] = dp[1] = 1;
for(int i=2;i<=k;i++)
{
dp[i] = 2*dp[i-1];
}
for(int i=k+1;i<=n;i++)
{
dp[i] = 2*dp[i-1]-dp[i-k-1];
}
for(int i=0;i<=n;i++)
cout<<dp[i]<<" ";
return dp[n];
}
void solve()
{
int n,k;
int dp[100] = {0};
cin>>n>>k;
cout<<ladders_topdown(n,k,dp)<<"\n";
cout<<ladders_bottomup(n,k)<<"\n";
cout<<ladders_optimised(n,k)<<"\n";
}
int main()
{
// input; // output; // if(debug){watch_is();}
fast_io;
solve();
return 0;
}
|
8e203777f2897628b9c69edb5333145fe67c4498
|
857b5ce0da5e8a6909bf8ae69ef6ddafc24d3f99
|
/Editor Source/_Build_/Titan Editor/Source/@LeafRegion.h
|
2c6d21f9e84b5f1311243211eb6d414c1ce0db4f
|
[
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
psydox/EsenthelEngine
|
6b6d171000feeec60eace4f089575adc19c450af
|
18088042e40a31cbd186348fb0652c643cbd8f5d
|
refs/heads/master
| 2023-05-07T05:38:59.186560
| 2023-03-03T05:16:16
| 2023-03-03T05:16:16
| 181,012,405
| 1
| 0
| null | 2019-04-12T13:20:31
| 2019-04-12T13:20:30
| null |
UTF-8
|
C++
| false
| false
| 1,342
|
h
|
@LeafRegion.h
|
/******************************************************************************/
/******************************************************************************/
class LeafRegion : Region
{
class Texture : ImageSkin
{
virtual void update(C GuiPC &gpc)override;
virtual void draw(C GuiPC &gpc)override;
};
TextWhite ts;
Text leaf_attachment;
Texture texture;
Button remove_attachment, set_attachment_cam, random_bending, same_random_bending, remove_bending, random_color, remove_color;
TextLine color_value;
Memc<LeafAttachment> attachments;
static void RemoveAttachment(LeafRegion &leaf);
static void RemoveBending (LeafRegion &leaf);
static void RemoveColor (LeafRegion &leaf);
static void SetAttachmentCam(LeafRegion &leaf);
static void RandomBending(LeafRegion &leaf);
static void SameRandomBending(LeafRegion &leaf);
static void RandomColor(LeafRegion &leaf);
bool meshHasMtrl(C MaterialPtr &mtrl);
LeafRegion& create();
void clear();
virtual void update(C GuiPC&gpc)override;
};
/******************************************************************************/
/******************************************************************************/
/******************************************************************************/
|
de5376a7419385dc0be8d7950b3d6855df9c63ad
|
69e4dc4c97460c75e87bb04b55d86c5bb24300cf
|
/mazeDriver.cpp
|
3da5ddcb4eafab52d7d98295e228fd72e8ed085c
|
[
"MIT"
] |
permissive
|
dlandry8/maze-walk
|
e2d52ce758e2e8e80a4d29cd4ad1266d7ad9afb8
|
3b2f78ba0119a95ea8663ec0a83a9aef642809e1
|
refs/heads/master
| 2022-11-28T13:43:30.964536
| 2020-08-11T05:13:55
| 2020-08-11T05:13:55
| 286,651,220
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,314
|
cpp
|
mazeDriver.cpp
|
//------------------------------------------------------------------------------
// File: mazeDriver.cpp
// Description: Implementation of the maze walking algorithm.
// Author: David Landry
// CSS 342, Winter 2018
// Assignment 3: Recursive Maze Walk
// Environment: Written and compiled using Microsoft Visual Studio
// Community 2017.
//------------------------------------------------------------------------------
#include "maze.h"
//------------------------------------------------------------------------------
// Method: main
// Description: The main program file for stepping through a maze.
// Arguments: The file name.
// Preconditions: A file name is expected to be provided from the
// command line.
//------------------------------------------------------------------------------
int main(int argc, char* argv[])
{
Maze testMaze;
try
{
if (argv[1] == NULL)
{
std::cout << "Please specify a map file.";
return 0;
}
else
testMaze.readFile(argv[1]);
}
catch (std::exception e)
{
std::cout << e.what();
return 0;
}
std::cout << "Start: " << testMaze.getStart() << std::endl;
std::cout << "Exit: " << testMaze.getExit() << std::endl;
testMaze.printGrid();
if (testMaze.step(testMaze.getStart(), testMaze.getExit()))
{
std::cout << "Exit reached! Press <enter> to see the route!";
std::cin.get();
system("cls");
std::cout << "Start: " << testMaze.getStart() << std::endl;
std::cout << "Exit: " << testMaze.getExit() << std::endl;
testMaze.printGrid();
std::cout << "\nPress <enter> to see coordinates traversed." << std::endl;
std::cin.get();
for (int i = 0; i < testMaze.accessPath().size(); i++)
{
std::cout << testMaze.accessPath()[i] << std::endl;
}
std::cout << "PROFIT!\nPress <enter> to exit.";
}
else
std::cout << "No path to the exit exists. Press <enter> to exit.";
std::cin.get();
return 0;
}
|
111b868283c15650d996354ed69bc245cd9f678d
|
5a5a269bca292df0a0f501bd971551a7d4b8399d
|
/include/MaglevControl.h
|
74931bced9d138ea932a99f83002138763169093
|
[
"MIT"
] |
permissive
|
n-fallahinia/UoU_Soft_V1.3
|
168e6844bd49dbfb4dc5c6e5ed14d1d1210cb079
|
c7bd57825416a4bf8ef308d94a3572d41130d475
|
refs/heads/master
| 2020-06-11T12:25:06.482470
| 2019-06-27T23:59:05
| 2019-06-27T23:59:05
| 193,962,885
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,230
|
h
|
MaglevControl.h
|
#ifndef MAGLEVCONTROL_H
#define MAGLEVCONTROL_H
#include "ml_api.h"
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "ForceSensor.h"
#include "maglev_parameters.h"
#define SAVE_FORCE_COLS 67
#define SAVE_FORCE_DATA 40000
#define NUM_TRANSITIONS 2000
#define MAGLEV_FREQUENCY 10.0
#define CONTROL_FREQUENCY 1000.0
#define OPERATING_FREQUENCY 1500.0
class MaglevControl
{
public:
// Arrays of current gains to use in controllers
double current_gains_force[6][4];
double current_gains_position[6][4];
double current_gains_internal[6][4];
// Array of directions for use in forc control
bool force_control_directions[6];
// Define position and force variables
ml_position_t current_position;
ml_position_t desired_position;
double desired_force[6];
//double desired_position[6];
// Define "flag" variable to track whether the temperature (0),
// current (1) or forces (2) exerted by the Maglev
unsigned short int update_variable;
// Flags to indicate whether the maglev is on and whether the force
// controller is on
bool flag_maglev_start;
bool flag_force_control_start;
// Constructor/destructor
MaglevControl();
~MaglevControl();
void maglevConnect ( );
void maglevClearError ( );
void maglevTakeOff ( bool thumb );
void maglevLand ( );
void maglevTurnOff ( );
void maglevReadPositionGain(double [6][4]);
void maglevGetInternalGains();
void maglevSetInternalGains();
//void maglevSetForceGain( double * gains);
float maglevGetFrequency( );
void maglevSetFrequency( int f );
void maglevSetForce();
void maglevSetSaveFileName( char folder_name[18] );
void maglevStartForceController();
void maglevStopForceController();
bool maglevController ( Reading curr_force);
//Tom This is what the above line used to say
//void maglevController ( double * , double * );
void maglevSaveGains();
void maglevSaveForce();
void maglevStopSaveForce();
void maglevPrintGainMatrices();
void maglevGetPosition();
void maglevPrintOtherGains();
void maglevGetTemperature();
void maglevGetForce();
void maglevGetCurrent();
void maglevSetDesiredPosition();
private:
// Arrays of gains to achieve after transitions
double desired_gains_force[6][4];
double desired_gains_position[6][4];
double desired_gains_internal[6][4];
// Arrays of gains to start with for the transition
double starting_gains_internal[6][4];
double starting_gains_position[6][4];
double starting_gains_force[6][4];
// Arrays of gains read from file
double file_gains_force[6][4];
double file_gains_position[6][4];
// Stores the starting location of the transition
int end_counter;
// Values to keep track of controller parameters
double time_old;
double position_old[6];
int controller_counter;
double integral[6];
ml_forces_t pid_force;
double gravity_vector[3];
double velocity[6];
double rotation_matrix[3][3];
// Maglev force controller frequency
double control_freq;
// Variables used to track Maglev properties
ml_currents_t maglev_currents;
ml_temps_t current_temperatures;
ml_forces_t maglev_forces;
ml_fault_t current_fault;
ml_device_handle_t maglev_handle;
ml_gainset_type_t mp_gain_type;
ml_gain_vec_t gain_vec;
// Name of file containing the force gains
char force_gain_file_name[];
char force_save_file_name[40];
// Parameters for the low-pass velocity filter
double alpha;
double tau;
double cutoff_frequency;
//long long int *save_force_data;
double save_force_data[SAVE_FORCE_DATA][SAVE_FORCE_COLS];
bool flag_save_force;
int save_force_counter;
FILE *save_force_file;
void maglevInitGains();
//int tick_callback_handler( ml_device_handle_t, ml_position_t * );
bool maglevMove2Position ( double * new_position );
bool maglevOutsideBoundary();
inline double minValue(double my_array[6]);
inline float minValue(float my_array[6]);
void maglevCompensateForGravity();
void maglevGetGravityVector(double gravity[DATA_SIZE]);
void maglevZeroInternalGains();
void maglevResetInternalGains();
};
#endif
|
9a20740c9db794f7578ae69a82316285de2af066
|
c35a272fc49d28753b72e9f22651a6a81ec11b3d
|
/legacy/ex3.cpp
|
0cce8d0b899f8feb0049341a98c025377270d9a1
|
[
"MIT"
] |
permissive
|
Aldridgexia/learncpp
|
989936ee9d7920574733f86fe77d226ca53517b4
|
2d50e6662343dfcff563876c5d2628ba39780b7c
|
refs/heads/master
| 2021-05-02T09:48:35.448768
| 2020-09-04T04:44:50
| 2020-09-04T04:44:50
| 53,257,811
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,152
|
cpp
|
ex3.cpp
|
#include <iostream>
#include <cmath>
using namespace std;
int max1(int x, int y);
int max1(int x, int y, int z);
double max1(double x, double y);
double max1(double x, double y, double z);
int max1(int x, int y){
if(x==y) return x;
else if(x>=y)
return x;
else
return y;
}
int max1(int x, int y, int z){
return max1(max1(x,y),z);
}
double max1(double x, double y){
if(abs(x-y)<1e-10) return x;
else if(x>=y)
return x;
else
return y;
}
double max1(double x, double y, double z){
return max1(max1(x,y),z);
}
int main(){
int a,b,c;
double m,n,l;
cout<<"enter int a: ";
cin>>a;
cout<<"enter int b: ";
cin>>b;
cout<<"enter int c: ";
cin>>c;
cout<<"\n";
cout<<"max of "<<a<<" and "<<b<<" is "<<max1(a,b)<<endl;
cout<<"max of "<<a<<" and "<<b<<" and "<<c<<" is "<<max1(a,b,c)<<endl;
cout<<a<<" power "<<b<<" is "<<pow(a,b)<<endl;
cout<<"\n\n";
cout<<"enter double m: ";
cin>>m;
cout<<"enter double n: ";
cin>>n;
cout<<"enter double l: ";
cin>>l;
cout<<"\n";
cout<<"max of "<<m<<" and "<<n<<" is "<<max1(m,n)<<endl;
cout<<"max of "<<m<<" and "<<n<<" and "<<l<<" is "<<max1(m,n,l)<<endl;
cout<<"\n\n";
return 0;
}
|
fb8e065fb3bc8763898536664167d252672c1b9f
|
9447ea467d5cc4aa24418dae681bb907fafa1d80
|
/src/main.cpp
|
86ea013680df5f686d05b5a901b9367490634b66
|
[] |
no_license
|
jair-barajas/sniffer-redes
|
011d59b56001a100066b528c6566ce2da0d2fe01
|
f32d177a9788b845d7c5146e014055f2243a7d60
|
refs/heads/main
| 2023-03-19T03:47:44.851176
| 2021-03-05T18:41:29
| 2021-03-05T18:41:29
| 344,933,850
| 0
| 0
| null | 2021-03-05T21:04:42
| 2021-03-05T21:04:41
| null |
UTF-8
|
C++
| false
| false
| 1,398
|
cpp
|
main.cpp
|
#include <iostream>
#include <fstream>
#include <string>
#include <exception>
#include <EthernetFrame.hpp>
using namespace std;
int main()
{
EthernetFrame ef;
string filename;
ifstream binFile;
char* buffer;
cout << "Analizador de Paquetes Ethernet" << endl;
cout << "Equipo 5 de la sección D03" << endl << endl;
while (!binFile) {
cout << "Introduzca la localización del paquete (vacío para cancelar): ";
cin >> filename;
if (filename.size() == 0)
return EXIT_SUCCESS;
binFile.open(filename, ifstream::in | ifstream::binary);
if (!binFile)
cout << "Error abriendo el archivo." << endl;
}
// va hasta el final
binFile.seekg (0, binFile.end);
// obtiene la posición del final
unsigned length = binFile.tellg();
// regresa al inicio
binFile.seekg (0, binFile.beg);
// buffer contiene todo el contenido del archivo
buffer = static_cast<char*>(malloc(length));
/* TODO: imprimir datos de ef
// falta implementar setters/getters
//
// ef.setData(binFile.read(buffer, length));
//
// cout << "Dirección de destino: " << hex << ef.getDestinationAddress() << endl;
// cout << "Dirección de origen: " << hex << ef.getSourceAddress() << endl;
// cout << "Tipo: " << hex << ef.getType() << endl;
// cout << "Contenido: " << ef.getData() << endl;
*/
binFile.close();
return EXIT_SUCCESS;
}
|
34581f43cc0545b656c89859ea338a44c8956d04
|
b3e5b0bd78521e7cc02d45076305bfcdd6095462
|
/Backend/navsBackend/backend.h
|
c04ba946ff0ae6e728cc9201c42eb02237ccff0b
|
[] |
no_license
|
rapcode005/QMLApp
|
4e3fc2681c10474a10c7ba1f1358fef1200ef6da
|
b764db47a22d66584a7b6933b9b512e07588c323
|
refs/heads/master
| 2022-12-28T06:31:23.388021
| 2020-10-12T09:27:25
| 2020-10-12T09:27:25
| 303,338,979
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,417
|
h
|
backend.h
|
#ifndef BACKEND_H
#define BACKEND_H
#include <QObject>
#include <QJsonObject>
#include "installationTools/installationtools.h"
#include "appTools/apptools.h"
#include "userTools/usertools.h"
#include "loggingTools/loggingtools.h"
#include "organizationModel.h"
#include "appmodel.h"
#include "appquicklaunchmodel.h"
class Backend : public QObject
{
Q_OBJECT
Q_PROPERTY(QJsonObject userData
READ userData
WRITE setUserData
NOTIFY userDataChanged)
Q_PROPERTY(bool organizationDnsKeyStatus
READ organizationDnsKeyStatus
WRITE setOrganizationDnsKeyStatus
NOTIFY organizationDnsKeyStatusChanged)
Q_PROPERTY(OrganizationModel* organizationData
READ organizationData
WRITE setOrganizationData
NOTIFY organizationDataChanged)
Q_PROPERTY(QJsonObject installationData
READ installationData
WRITE setInstallationData
NOTIFY installationDataChanged)
Q_PROPERTY(bool registerStatus
READ registerStatus
WRITE setRegisterStatus
NOTIFY registerStatusChanged)
Q_PROPERTY(QJsonObject loginWindowsUsernameData
READ loginWindowsUsernameData
WRITE setLoginWindowsUsernameData
NOTIFY loginWindowsUsernameChanged)
Q_PROPERTY(QJsonObject loginUsernameData
READ loginUsernameData
WRITE setLoginUsernameData
NOTIFY loginUsernameChanged)
/*
Q_PROPERTY(QJsonObject logoutOrganizationData
READ logoutOrganizationData
WRITE setLogoutOrganizationData
NOTIFY logoutOrganizationChanged)
*/
Q_PROPERTY(QJsonObject logData
READ logData
WRITE setLogData
NOTIFY logChanged)
Q_PROPERTY(AppModel* appData
READ appData
WRITE setAppData
NOTIFY appDataChanged)
Q_PROPERTY(AppQuickLaunchModel* appQuickData
READ appQuickData
WRITE setAppQuickData
NOTIFY appQuickDataChanged)
public:
explicit Backend(QObject *parent = nullptr);
//bool installationData() const;
//void setInstallationData(const bool &installationData);
QJsonObject installationData() const;
void setInstallationData(const QJsonObject &installationData);
QJsonObject userData() const;
void setUserData(const QJsonObject &userData);
OrganizationModel *organizationData() const;
void setOrganizationData(OrganizationModel *organizationData);
bool registerStatus() const;
void setRegisterStatus(const bool ®isterStatus);
bool organizationDnsKeyStatus() const;
void setOrganizationDnsKeyStatus(bool organizationDnsKeyStatus);
int getIndexOrganization(const QString &oranizationLocationName);
QJsonObject loginWindowsUsernameData() const;
void setLoginWindowsUsernameData(const QJsonObject &data);
QJsonObject loginUsernameData() const;
void setLoginUsernameData(const QJsonObject &data);
//QJsonObject logoutOrganizationData() const;
//void setLogoutOrganizationData(const QJsonObject &logoutOrganization);
QJsonObject logData() const;
void setLogData(const QJsonObject &log);
AppModel *appData() const;
void setAppData(AppModel *newAppData);
AppQuickLaunchModel *appQuickData() const;
void setAppQuickData(AppQuickLaunchModel *newAppQuickData);
//int getValueFromColumnNameJSON(const QString &name);
//int getValueFromColumnNameOrganizationDataModel(const QString &name, OrganizationModel *model);
int getValueFromColumnNameJSON(const QString &name, const QJsonObject &json);
int getValueFromColumnNameJSON(const QString &name, const QString name2,
const QJsonObject &json);
private:
InstallationTools installationTools;
LoggingTools loggingTools;
AppTools appTools;
UserTools userTools;
WebServicesTools webServicesTools;
OrganizationModel *m_organizationData;
AppModel *m_appData;
AppQuickLaunchModel *m_appQuickData;
QJsonObject m_userData;
QJsonObject m_installationData;
//bool m_installationData;
QJsonObject m_loginWindowsUsername;
//QJsonObject m_logoutOrganization;
QJsonObject m_loginUsername;
QJsonObject m_log;
bool m_registerStatus;
bool m_organizationDnsKeyStatus;
signals:
void userDataChanged();
void organizationDnsKeyStatusChanged();
void organizationDataChanged();
void installationDataChanged();
void registerStatusChanged();
void loginWindowsUsernameChanged();
//void logoutOrganizationChanged();
void logChanged();
void appDataChanged();
void appQuickDataChanged();
void loginUsernameChanged();
public slots:
void loadUser();
void userLoaded(const QJsonObject &userData);
void checkOrganizationDnsKeyStatus(const QString &s_organizationDnsKey);
void organizationDnsKeyStatusLoaded(const bool &organizationDnsKeyStatus);
void loadOrganization(const QString &s_organization);
void organizationLoaded(OrganizationModel *organizationData);
//void loadInstallationData();
void loadInstallationData(QString organizationLocation = "");
void installationDataLoaded(const QJsonObject &installationData);
void deleteInstallationData();
void checkRegisterStatus();
void registerStatusLoaded(const bool ®sisterStatus);
//void loginOrganization(const QString &username, const QString &password);
void loginWindowsUsername();
void loginWindowsUsernameLoaded(const QJsonObject &loginData);
void loginUsername(const QString &username, const QString &password);
void loginUsernameLoaded(const QJsonObject &data);
//void logoutOrganization(const QString &username, const QString &password);
//void logoutOrganizationLoaded(const QJsonObject &logoutOrganization);
void createLog(const QString &formatName, const QString &logSource,
const QString &severity, const QString &errorMessage);
void logLoaded(const QJsonObject &logData);
void loadApp();
void appLoaded(AppModel *newAppData);
void loadAppQuick();
void appQuickLoaded(AppQuickLaunchModel *newAppQuickData);
void createISOFile();
};
#endif // BACKEND_H
|
34a8a01225cf92e6cd7f303a9052e290fd0e131e
|
d74e22f0dd5294f3113c127fad14a420b67f8de9
|
/Contests/01 Contest/01 PairSumDivisiblebyB.cpp
|
6a633dc0e81b1da84d72e87fd5f43f6224201a27
|
[] |
no_license
|
FazeelUsmani/Scaler-Academy
|
c44327223f062ab27e5230b13ec4a0cfa35269f9
|
229141a69ca0522e4048181d0ec9c3316b3148ae
|
refs/heads/master
| 2022-02-07T02:15:35.196734
| 2022-01-06T13:32:42
| 2022-01-06T13:32:42
| 236,805,007
| 194
| 144
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,401
|
cpp
|
01 PairSumDivisiblebyB.cpp
|
/*
Pair Sum divisible by M
Problem Description
Given an array of integers A and an integer B, find and return the number of pairs in A whose sum is divisible by B.
Since the answer may be large, return the answer modulo (109 + 7).
Problem Constraints
1 <= length of the array <= 100000
1 <= A[i] <= 109
1 <= B <= 106
Input Format
The first argument given is the integer array A.
The second argument given is the integer B.
Output Format
Return the total number of pairs for which the sum is divisible by B modulo (109 + 7).
Example Input
Input 1:
A = [1, 2, 3, 4, 5]
B = 2
Input 2:
A = [5, 17, 100, 11]
B = 28
Example Output
Output 1:
4
Output 2:
1
Example Explanation
Explanation 1:
All pairs which are divisible by 2 are (1,3),(1,5),(2,4),(3,5).
So total 4 pairs.
*/
// Make sure that reminder of (a+b)%B = 0
int Solution::solve(vector<int> &A, int B) {
int n = A.size();
long long cnt[B];
memset(cnt, 0, sizeof(cnt));
for (int i = 0; i < n; i++)
cnt[A[i] % B]++;
long long ans = (cnt[0] * (cnt[0]-1))/2;
ans %= 1000000007;
int i = 1, j = B-1;
while (i <= j){
if (i == j){
ans += (cnt[i] * (cnt[i]-1))/2;
ans %= 1000000007;
}
else{
ans += cnt[i]*cnt[j];
ans %= 1000000007;
}
i++;
j--;
}
return ans;
}
|
9b5fd1126d623c3d28c839ccdce037699f2380f6
|
aa62761e127f1fca3fd6f9aa8b3a3ee83381d38b
|
/vanya_fence.cpp
|
03fda0e2d056770fbf90b929110557ba22da2883
|
[] |
no_license
|
vickymhs/CodeForces-Submissions
|
60487bd33e5ea2bae0c55685ad75b284a15d2cef
|
7406daf60c9c977ba2d4d2222e148b65fa4d41fa
|
refs/heads/master
| 2020-06-25T04:01:01.177983
| 2019-10-31T12:18:37
| 2019-10-31T12:18:37
| 199,194,765
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 181
|
cpp
|
vanya_fence.cpp
|
#include<iostream>
using namespace std;
int main()
{
int n,h,a[2005],c=0,i;
cin>>n>>h;
for(i=0;i<n;i++)
{
cin>>a[i];
if(a[i]<=h)
c++;
else
c=c+2;
}
cout<<c;
}
|
6cf1cbfae13b840edea5144dc5ed69f3d9d0ef2b
|
f84b708f558ecd4808b74c676b51d6ee5148c025
|
/CrashBash_Client/src/Surface.cpp
|
65ebc8cf2b1001068c226f1193e86755e5f4ff53
|
[] |
no_license
|
ali-alaei/CrashBash
|
b606fdbfc0db69902fc1ab044cc7629772affdca
|
d92a47fd585255996d8ed84cce33db4c05ef822a
|
refs/heads/master
| 2020-04-06T07:06:56.765136
| 2019-01-13T09:44:21
| 2019-01-13T09:44:21
| 61,696,162
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 618
|
cpp
|
Surface.cpp
|
#include "Surface.h"
#include <iostream>
Surface::Surface(int w,int h):width(w),height(h)
{
///do khate paiin pak mishe chon gharare az file bekhooni,m
///ama age size dge az file bekhoonim zamin be ham mikhore
std::cout<<"---------------------------------------------------------------------------------------\n"<<width<<"----------------\n"<<height<<std::endl;
texture.loadFromFile("Stage.jpg");
}
Surface::~Surface()
{
//dtor
}
sf::Sprite Surface::show()
{
sprite.setTexture(texture);
sprite.setTextureRect(sf::IntRect(0, 0, width,height));
return sprite;
}
|
412415eabbd33a8303db0638a5c214007282e6e2
|
b13eee85aaf15b107916c08249bf0c1f822afa4a
|
/Calculator/src/main.cpp
|
8649de217badd36ab45099aaccbaa1777c7bb7a2
|
[] |
no_license
|
manivija/vs_code_cpp
|
19052aaa165842afb46c6b70b0d3163f28e366cc
|
7a56373d2b4429c8cf699790aee48aa6b49c4f0b
|
refs/heads/master
| 2020-07-13T10:13:07.095985
| 2019-09-12T02:37:50
| 2019-09-12T02:37:50
| 167,121,207
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,604
|
cpp
|
main.cpp
|
# include <iostream>
#include "std_lib_facilities.h"
#include <cmath>
using namespace std;
class Token
{
public:
char kind; // what kind of Token
double value; // the value of the Token
Token(char ch)
:kind(ch), value(0) {}
Token(char ch, double vl)
:kind(ch), value(vl) {}
};
class Token_Stream
{
public:
Token_Stream();
Token get();
void putback(Token T);
private:
bool full; // is there a token in the buffer?
Token buffer; // when putback .. is called, here is where we store it
};
// the class constructor
Token_Stream::Token_Stream(): full(false), buffer(0)
{}
void Token_Stream::putback(Token T)
{
if(full)
error("the buffer is already full");
buffer = T;
full = true;
}
const char number = '8';
const char quit = 'q';
const char print = ';';
const char prompt = '>>';
const string result = "=";
Token Token_Stream::get()
{
if(full)
{
full = false;
return buffer;
}
char ch;
cin >> ch;
switch(ch)
{
case ';':
case 'q':
case '(':
case ')':
case '+':
case '-':
case '*':
case '/':
return Token(ch);
case '.':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
cin.putback(ch);
double val;
cin >> val;
return Token(number, val);
}
default:
error("bad token");
}
}
Token_Stream TS;
double expression();
double term();
double primary()
{
Token T = TS.get();
switch(T.kind)
{
case '(':
{
double d = expression();
T = TS.get();
if(T.kind != ')')
error("')' expected");
return d;
}
break;
case number:
{
return T.value;
}
case '-':
{
return -primary();
}
case '+':
{
return +primary();
}
default:
error("primary expected");
}
}
double expression()
{
double left = term(); //read and evaluate a term
Token T = TS.get(); //get the next token
while(true)
{
switch(T.kind)
{
case '+':
left += term(); // evaluate term and add
T = TS.get();
break;
case '-':
left -= term(); // evaluate term and subtract
T = TS.get();
break;
default:
TS.putback(T);
return left; // return the answer, if no more + or -
}
}
}
double term()
{
double left = primary();
Token T = TS.get();
while(true)
{
switch(T.kind)
{
case '*':
{
left *= primary();
T = TS.get();
break;
}
case '/':
{
double d = primary();
if(d == 0)
error("dividing by zero");
left /= d;
T = TS.get();
break;
}
case '%':
{
double d = primary();
if(d == 0)
error("dividing by zero");
left = fmod(left,d);
T = TS.get();
break;
}
default:
TS.putback(T);
return left;
}
}
}
void exit_program()
{
cout<<"Please enter the charachter ~ to close the windows\n";
for (char ch; cin >> ch;)
if(ch=='~')
return;
return;
}
void calculate()
{
while (cin)
{
cout << prompt;
Token T = TS.get();
while(T.kind == print)
T = TS.get();
if(T.kind == quit)
return;
TS.putback(T);
cout<<result<<expression()<<"\n";
}
}
int main()
{
try
{
calculate();
exit_program();
return 0;
}
catch (exception& e)
{
cerr << e.what() << endl;
exit_program();
return 1;
}
catch (...)
{
cerr << "exception \n";
exit_program();
return 2;
}
return 0;
}
|
1c318158cae0ae35cc8238ef89f7fa38823b9bca
|
a02bfc69112666e95afc07c6d4e48dd843bcca55
|
/Day2/edgeDetection.cpp
|
230e99397f0198a5d7552f7295c840c78421937b
|
[] |
no_license
|
itsShnik/Image-Processing
|
aa70df42c1ee68a3fa2e20dd7d9c1ebaa9ae745f
|
3ded0ce234a9f2b95094a47c8de71f3fcc10dcd8
|
refs/heads/master
| 2020-04-09T03:37:50.008654
| 2018-12-07T13:39:01
| 2018-12-07T13:39:01
| 159,988,852
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,864
|
cpp
|
edgeDetection.cpp
|
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/core/core.hpp"
#include <iostream>
#include <cmath>
using namespace cv;
using namespace std;
Mat img ;
int rows;
int cols;
int **kernel_matrix;
void dilation(int i, int j, Mat img_e, Mat img_d)
{
int p, q, sum = 0;
for(p = i - 1; p <= i+1; p++)
for(q = j - 1; q <= j + 1; q++)
{
if( p >= 0 && p < rows && q >= 0 && q < cols)
{
sum += img_e.at<uchar>(p , q);
}
}
if(sum > 0)
img_d.at<uchar>(i , j) = 255;
}
void erosion(int i, int j, Mat img_e, Mat img_d)
{
int p, q, sum = 0, count = 0;
for(p = i - 1; p <= i+1; p++)
for(q = j - 1; q <= j + 1; q++)
{
if( p >= 0 && p < rows && q >= 0 && q < cols)
{
sum += img_e.at<uchar>(p , q);
count++;
}
}
if((int)(sum / count) < 250)
img_d.at<uchar>(i , j) = 0;
}
int gaussianBlur(int i, int j, Mat img)
{
int p, q, sum = 0;
for(p = i - 1; p <= i+1; p++)
for(q = j - 1; q <= j + 1; q++)
{
if( p >= 0 && p < rows && q >= 0 && q < cols)
{
if(p == i && q == j)
sum += ( img.at<uchar>(p , q) ) / 4;
else if( (p == i - 1 && ( q == j - 1 || q == j + 1) ) || (p == i + 1 && ( q == j - 1 || q == j + 1)))
sum += ( img.at<uchar>(p , q) ) / 16;
else
sum += ( img.at<uchar>(p , q) ) / 8;
}
}
return sum;
}
int gx_squared(int i, int j, Mat img_grayscale)
{
int sum = 0;
for(int p = i - 1; p < i + 1; p++)
{
for(int q = j - 1; q < j + 1; q++)
{
if(q == j - 1)
{
if(p == i)
sum += (-2) * img_grayscale.at<uchar>(p , q);
else
sum += (-1) * img_grayscale.at<uchar>(p , q);
}
else if( q == j + 1)
{
if(p == i)
sum += 2 * img_grayscale.at<uchar>(p , q);
else
sum += img_grayscale.at<uchar>(p , q);
}
else
continue;
}
}
return pow(sum , 2) / 8;
}
int gy_squared(int i, int j, Mat img_grayscale)
{
int sum = 0;
for(int p = j - 1; p < j + 1; p++)
{
for(int q = i - 1; q < i + 1; q++)
{
if(q == i - 1)
{
if(p == j)
sum += (-2) * img_grayscale.at<uchar>(q , p);
else
sum += (-1) * img_grayscale.at<uchar>(q , p);
}
else if( q == i + 1)
{
if(p == j)
sum += 2 * img_grayscale.at<uchar>(q , p);
else
sum += img_grayscale.at<uchar>(q , p);
}
else
continue;
}
}
return pow(sum , 2) / 8;
}
void updateFun(int threshold, void *)
{
//cout << "yes\n";
//edgeDetection
Mat edgedImage(rows - 2, cols - 2, CV_8UC1, Scalar(0));
//initializing
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
edgedImage.at<uchar>(i , j) = kernel_matrix[i][j];
//cout << "yes\n";
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
{
if(kernel_matrix[i][j] > threshold)
{
edgedImage.at<uchar>(i , j) = 0;
}
else
edgedImage.at<uchar>(i , j) = 255;
}
//cout << "yes\n";
Mat dilatedImage(rows - 2, cols - 2, CV_8UC1, Scalar(0));
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
dilatedImage.at<uchar>(i , j) = edgedImage.at<uchar>(i , j);
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
dilation(i , j, edgedImage, dilatedImage);
//cout << "yes\n";
Mat erodedImage(rows - 2, cols - 2, CV_8UC1, Scalar(0));
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
erodedImage.at<uchar>(i , j) = dilatedImage.at<uchar>(i , j);
//cout << "yes\n";
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
erosion(i , j, dilatedImage, erodedImage);
//cout << "yes\n";
namedWindow("win_dil", WINDOW_NORMAL);
namedWindow("win_ero", WINDOW_NORMAL);
imshow("win", edgedImage);
imshow("win_dil", dilatedImage);
imshow("win_ero", erodedImage);
}
int main()
{
int threshold = 0;
img = imread("rubik.jpg", 1);
rows = img.rows;
cols = img.cols;
cout << "yes\n";
//conversion to grayscale
Mat img_grayscale(rows, cols, CV_8UC1, Scalar(0));
for (int i=0; i<rows; i++)
{
for (int j=0; j<cols; j++)
{
img_grayscale.at<uchar>(i, j) = (0.21)*img.at<Vec3b>(i,j)[2] + (0.72)*img.at<Vec3b>(i,j)[1] + (0.07)*img.at<Vec3b>(i,j)[0];
}
}
//gaussianBlur
for(int i = 0; i < rows; i++)
for(int j = 0; j < cols; j++)
{
img_grayscale.at<uchar>(i , j) = gaussianBlur(i, j ,img_grayscale);
}
//calculating kernel matrix
//allocating memory
kernel_matrix = (int **)malloc(sizeof(int *) * (rows - 2));
for(int i = 0; i < rows - 2; i++)
{
kernel_matrix[i] = (int *)malloc(sizeof(int) * (cols - 2));
}
//cout << "yes\n";
for(int i = 1; i < rows - 1; i++)
for(int j = 1; j < cols - 1; j++)
{
int kernel_value = sqrt(gx_squared(i , j , img_grayscale) + gy_squared(i , j , img_grayscale));
//cout << "kvalue = " << kernel_value << "\n";
kernel_matrix[i - 1][j - 1] = kernel_value;
}
//cout << "yes\n";
Mat kmImage(rows - 2, cols - 2, CV_8UC1, Scalar(0));
for(int i = 0; i < rows - 2; i++)
for(int j = 0; j < cols - 2; j++)
kmImage.at<uchar>(i , j) = kernel_matrix[i][j];
namedWindow("win", WINDOW_NORMAL);
namedWindow("win_gray", WINDOW_NORMAL);
namedWindow("win_km", WINDOW_NORMAL);
imshow("win_km",kmImage);
imshow("win_gray", img_grayscale);
createTrackbar("trackbar", "win", &threshold, 1000, updateFun);
waitKey(0);
return 0;
}
|
80e8af21e182a255e2885b7ed19874879d8e4874
|
7598e1225155ab190e19565d98382c5baae9deb0
|
/3rdInclude/libs/KL1p/include/InverseGaussianBlur2DOperator.h
|
4f84a300eb4abff278e3cb10514ae8bc040948d0
|
[] |
no_license
|
GuoChris/FaceRecognition
|
2c02a00929f71325e3fade6c0b2db956261b4916
|
f89d75950fcbcb68d5515605b1febc5dd5c6246e
|
refs/heads/master
| 2020-12-06T00:18:29.707274
| 2020-05-03T02:38:42
| 2020-05-03T02:38:42
| 232,286,635
| 0
| 1
| null | null | null | null |
WINDOWS-1250
|
C++
| false
| false
| 13,787
|
h
|
InverseGaussianBlur2DOperator.h
|
// KL1p - A portable C++ compressed sensing library.
// Copyright (c) 2011-2012 René Gebel
//
// This file is part of the KL1p C++ library.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY of fitness for any purpose.
//
// This library is free software; You can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License (LGPL)
// as published by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
// See http://www.opensource.org/licenses for more info.
#ifndef KL1P_INVERSEGAUSSIANBLUR2DOPERATOR_H
#define KL1P_INVERSEGAUSSIANBLUR2DOPERATOR_H
#include "Operator.h"
#include "Fourier2DOperator.h"
#include "InverseFourier2DOperator.h"
#include "InverseGaussian2DDiagonalOperator.h"
namespace kl1p
{
// ---------------------------------------------------------------------------------------------------- //
template<class T>
class TInverseGaussianBlur2DOperator : public TOperator<T, T>
{
public:
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width);
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const T& gamma);
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const T& gamma, const T& sigma);
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const T& gamma, const T& sigma, klab::Int32 ic, klab::Int32 jc);
TInverseGaussianBlur2DOperator(const TInverseGaussianBlur2DOperator<T>& op);
virtual ~TInverseGaussianBlur2DOperator();
klab::UInt32 width() const;
klab::UInt32 height() const;
T gamma() const;
T sigma() const;
klab::Int32 ic() const;
klab::Int32 jc() const;
virtual void apply(const arma::Col<T>& in, arma::Col<T>& out);
virtual void applyAdjoint(const arma::Col<T>& in, arma::Col<T>& out);
private:
TInverseGaussianBlur2DOperator();
TInverseGaussianBlur2DOperator<T>& operator=(const TInverseGaussianBlur2DOperator<T>& op);
private:
TFourier2DOperator<std::complex<T> > _fft;
TInverseFourier2DOperator<std::complex<T> > _ifft;
TInverseGaussian2DDiagonalOperator<std::complex<T> > _gaussian;
};
// ---------------------------------------------------------------------------------------------------- //
template<class T>
class TInverseGaussianBlur2DOperator<std::complex<T> > : public TOperator<std::complex<T>, std::complex<T> >
{
public:
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width);
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const std::complex<T>& gamma);
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const std::complex<T>& gamma, const std::complex<T>& sigma);
TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const std::complex<T>& gamma, const std::complex<T>& sigma, klab::Int32 ic, klab::Int32 jc);
TInverseGaussianBlur2DOperator(const TInverseGaussianBlur2DOperator<std::complex<T> >& op);
virtual ~TInverseGaussianBlur2DOperator();
klab::UInt32 width() const;
klab::UInt32 height() const;
std::complex<T> gamma() const;
std::complex<T> sigma() const;
klab::Int32 ic() const;
klab::Int32 jc() const;
virtual void apply(const arma::Col<std::complex<T> >& in, arma::Col<std::complex<T> >& out);
virtual void applyAdjoint(const arma::Col<std::complex<T> >& in, arma::Col<std::complex<T> >& out);
private:
TInverseGaussianBlur2DOperator();
TInverseGaussianBlur2DOperator<std::complex<T> >& operator=(const TInverseGaussianBlur2DOperator<std::complex<T> >& op);
private:
TFourier2DOperator<std::complex<T> > _fft;
TInverseFourier2DOperator<std::complex<T> > _ifft;
TInverseGaussian2DDiagonalOperator<std::complex<T> > _gaussian;
};
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<T>::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width) : TOperator<T, T>(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<T>::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const T& gamma) : TOperator<T, T>(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width, gamma)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<T>::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const T& gamma, const T& sigma) : TOperator<T, T>(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width, gamma, sigma)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<T>::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const T& gamma, const T& sigma, klab::Int32 ic, klab::Int32 jc) : TOperator<T, T>(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width, gamma, sigma, ic, jc)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<T>::TInverseGaussianBlur2DOperator(const TInverseGaussianBlur2DOperator<T>& op) : TOperator<T, T>(op),
_fft(op._fft), _ifft(op._ifft), _gaussian(op._gaussian)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<T>::~TInverseGaussianBlur2DOperator()
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::UInt32 TInverseGaussianBlur2DOperator<T>::width() const
{
return _gaussian.width();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::UInt32 TInverseGaussianBlur2DOperator<T>::height() const
{
return _gaussian.height();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline T TInverseGaussianBlur2DOperator<T>::gamma() const
{
return _gaussian.gamma().real();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline T TInverseGaussianBlur2DOperator<T>::sigma() const
{
return _gaussian.sigma().real();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::Int32 TInverseGaussianBlur2DOperator<T>::ic() const
{
return _gaussian.ic();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::Int32 TInverseGaussianBlur2DOperator<T>::jc() const
{
return _gaussian.jc();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline void TInverseGaussianBlur2DOperator<T>::apply(const arma::Col<T>& in, arma::Col<T>& out)
{
arma::Col<std::complex<T> > tmp1;
arma::Col<std::complex<T> > tmp2;
klab::Convert(in, tmp1);
_fft.apply(tmp1, tmp2);
_gaussian.apply(tmp2, tmp1);
_ifft.apply(tmp1, tmp2);
klab::Convert(tmp2, out);
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline void TInverseGaussianBlur2DOperator<T>::applyAdjoint(const arma::Col<T>& in, arma::Col<T>& out)
{
arma::Col<std::complex<T> > tmp1;
arma::Col<std::complex<T> > tmp2;
klab::Convert(in, tmp1);
_ifft.applyAdjoint(tmp1, tmp2);
_gaussian.applyAdjoint(tmp2, tmp1);
_fft.applyAdjoint(tmp1, tmp2);
klab::Convert(tmp2, out);
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<std::complex<T> >::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width) : TOperator<std::complex<T>, std::complex<T> >(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<std::complex<T> >::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const std::complex<T>& gamma) : TOperator<std::complex<T>, std::complex<T> >(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width, gamma)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<std::complex<T> >::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const std::complex<T>& gamma, const std::complex<T>& sigma) : TOperator<std::complex<T>, std::complex<T> >(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width, gamma, sigma)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<std::complex<T> >::TInverseGaussianBlur2DOperator(klab::UInt32 height, klab::UInt32 width, const std::complex<T>& gamma, const std::complex<T>& sigma, klab::Int32 ic, klab::Int32 jc) : TOperator<std::complex<T>, std::complex<T> >(width*height),
_fft(height, width, true), _ifft(height, width, true), _gaussian(height, width, gamma, sigma, ic, jc)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<std::complex<T> >::TInverseGaussianBlur2DOperator(const TInverseGaussianBlur2DOperator<std::complex<T> >& op) : TOperator<std::complex<T>, std::complex<T> >(op),
_fft(op._fft), _ifft(op._ifft), _gaussian(op._gaussian)
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline TInverseGaussianBlur2DOperator<std::complex<T> >::~TInverseGaussianBlur2DOperator()
{}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::UInt32 TInverseGaussianBlur2DOperator<std::complex<T> >::width() const
{
return _gaussian.width();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::UInt32 TInverseGaussianBlur2DOperator<std::complex<T> >::height() const
{
return _gaussian.height();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline std::complex<T> TInverseGaussianBlur2DOperator<std::complex<T> >::gamma() const
{
return _gaussian.gamma();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline std::complex<T> TInverseGaussianBlur2DOperator<std::complex<T> >::sigma() const
{
return _gaussian.sigma();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::Int32 TInverseGaussianBlur2DOperator<std::complex<T> >::ic() const
{
return _gaussian.ic();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline klab::Int32 TInverseGaussianBlur2DOperator<std::complex<T> >::jc() const
{
return _gaussian.jc();
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline void TInverseGaussianBlur2DOperator<std::complex<T> >::apply(const arma::Col<std::complex<T> >& in, arma::Col<std::complex<T> >& out)
{
ThrowTraceExceptionIf(KIncompatibleSizeOperatorException, in.n_rows!=this->n());
arma::Col<std::complex<T> > tmp1;
arma::Col<std::complex<T> > tmp2;
_fft.apply(in, tmp1);
_gaussian.apply(tmp1, tmp2);
_ifft.apply(tmp2, out);
}
// ---------------------------------------------------------------------------------------------------- //
template<class T>
inline void TInverseGaussianBlur2DOperator<std::complex<T> >::applyAdjoint(const arma::Col<std::complex<T> >& in, arma::Col<std::complex<T> >& out)
{
ThrowTraceExceptionIf(KIncompatibleSizeOperatorException, in.n_rows!=this->m());
arma::Col<std::complex<T> > tmp1;
arma::Col<std::complex<T> > tmp2;
_ifft.applyAdjoint(in, tmp1);
_gaussian.applyAdjoint(tmp1, tmp2);
_fft.applyAdjoint(tmp2, out);
}
// ---------------------------------------------------------------------------------------------------- //
}
#endif
|
69d42900d9d7147056f8174531697b45f49c0e7d
|
041dccc25a60f4db7835e252e988accfb4e9c11d
|
/src/CoreRenderer.hpp
|
24c99d7649cc3e13fd3bf53326312607fed463e4
|
[] |
no_license
|
munro98/LandscapeWorld
|
d4bcf4e2db48d2283008c0b293eb61ff1ebbb18e
|
4a095f11d4e5b6f1dc84837beb6785f67ab555d3
|
refs/heads/master
| 2020-12-30T11:27:39.716381
| 2018-01-26T05:25:05
| 2018-01-26T05:25:05
| 91,554,586
| 0
| 0
| null | 2017-06-20T06:02:47
| 2017-05-17T08:50:38
|
C
|
UTF-8
|
C++
| false
| false
| 81
|
hpp
|
CoreRenderer.hpp
|
#pragma once
class CoreRenderer
{
public:
CoreRenderer();
~CoreRenderer();
};
|
01eeff9ff10e92872f45efde6e714179c4aa2bc7
|
c743c6af616b8d3f356eb3ac7bb87cf67b8ac3f5
|
/Src/Actor.cpp
|
14dbc68a445ff4ac002d8119eb585643319fd278
|
[] |
no_license
|
tn-mai/OpenGL3D2019_2nd
|
3af19eee0d8c821053e92f74657fc44bd8c18008
|
8c790df5488fcb1cd16ffe2efdebc8189e9acb7e
|
refs/heads/master
| 2021-07-16T02:15:58.118124
| 2020-09-23T04:01:20
| 2020-09-23T04:01:20
| 213,393,507
| 2
| 1
| null | null | null | null |
SHIFT_JIS
|
C++
| false
| false
| 11,352
|
cpp
|
Actor.cpp
|
/**
* @file Actor.cpp
*/
#include "Actor.h"
#include <glm/gtc/matrix_transform.hpp>
#include <algorithm>
/**
* コンストラクタ.
*
* @param name アクターの名前.
* @param health 耐久力.
* @param position 位置.
* @param rotation 回転.
* @param scale 拡大率.
*
* 指定された名前、耐久力、位置、回転、拡大率によってアクターを初期化する.
*/
Actor::Actor(const std::string& name, int health,
const glm::vec3& position, const glm::vec3& rotation,
const glm::vec3& scale)
: name(name), health(health), position(position),
rotation(rotation), scale(scale)
{
}
/**
* アクターの状態を更新する.
*
* @param deltaTime 経過時間.
*
* UpdateDrawData()より前に実行すること.
*/
void Actor::Update(float deltaTime)
{
position += velocity * deltaTime;
// 衝突判定の更新.
const glm::mat4 matT = glm::translate(glm::mat4(1), position);
const glm::mat4 matR_Y = glm::rotate(glm::mat4(1), rotation.y, glm::vec3(0, 1, 0));
const glm::mat4 matR_ZY = glm::rotate(matR_Y, rotation.z, glm::vec3(0, 0, -1));
const glm::mat4 matR_XZY = glm::rotate(matR_ZY, rotation.x, glm::vec3(1, 0, 0));
const glm::mat4 matS = glm::scale(glm::mat4(1), scale);
const glm::mat4 matModel = matT * matR_XZY * matS;
colWorld.type = colLocal.type;
switch (colLocal.type) {
case Collision::Shape::Type::sphere:
colWorld.s.center = matModel * glm::vec4(colLocal.s.center, 1);
colWorld.s.r = colLocal.s.r;
bounds = colWorld.s;
break;
case Collision::Shape::Type::capsule:
colWorld.c.seg.a = matModel * glm::vec4(colLocal.c.seg.a, 1);
colWorld.c.seg.b = matModel * glm::vec4(colLocal.c.seg.b, 1);
colWorld.c.r = colLocal.c.r;
bounds.center = (colWorld.c.seg.a + colWorld.c.seg.b) * 0.5f;
bounds.r = glm::length(colWorld.c.seg.b - colWorld.c.seg.a) * 0.5f + colWorld.c.r;
break;
case Collision::Shape::Type::obb:
colWorld.obb.center = matModel * glm::vec4(colLocal.obb.center, 1);
for (size_t i = 0; i < 3; ++i) {
colWorld.obb.axis[i] = matR_XZY * glm::vec4(colLocal.obb.axis[i], 1);
}
colWorld.obb.e = colLocal.obb.e;
bounds.center = colWorld.obb.center;
bounds.r = glm::length(colWorld.obb.e);
break;
}
}
/**
* 描画情報の更新.
*
* @param deltaTime 経過時間.
*
* Update()の後で実行すること.
*/
void Actor::UpdateDrawData(float deltaTime)
{
}
/**
* アクターの描画.
*
* @param drawType 描画するデータの種類.
*/
void Actor::Draw(Mesh::DrawType)
{
}
/**
* コンストラクタ.
*
* @param m 表示するメッシュ.
* @param name アクターの名前.
* @param health 耐久力.
* @param position 位置.
* @param rotation 回転.
* @param scale 拡大率.
*
* 指定されたメッシュ、名前、耐久力、位置、回転、拡大率によってアクターを初期化する.
*/
StaticMeshActor::StaticMeshActor(const Mesh::FilePtr& m,
const std::string& name, int health, const glm::vec3& position,
const glm::vec3& rotation, const glm::vec3& scale)
: Actor(name, health, position, rotation, scale), mesh(m)
{
}
/**
* 描画.
*
* @param drawType 描画するデータの種類.
*/
void StaticMeshActor::Draw(Mesh::DrawType drawType)
{
if (mesh) {
const glm::mat4 matT = glm::translate(glm::mat4(1), position);
const glm::mat4 matR_Y = glm::rotate(glm::mat4(1), rotation.y, glm::vec3(0, 1, 0));
const glm::mat4 matR_ZY = glm::rotate(matR_Y, rotation.z, glm::vec3(0, 0, -1));
const glm::mat4 matR_XZY = glm::rotate(matR_ZY, rotation.x, glm::vec3(1, 0, 0));
const glm::mat4 matS = glm::scale(glm::mat4(1), scale);
const glm::mat4 matModel = matT * matR_XZY * matS;
if (drawType == Mesh::DrawType::color && !mesh->materials.empty()) {
UploadLightList(mesh->materials[0].program);
}
Mesh::Draw(mesh, matModel, drawType);
}
}
/**
* アクターに影響するポイントライトのインデックスを設定する.
*
* @param v ポイントライトのインデックス配列.
*/
void LightReceiver::SetPointLightList(const std::vector<int>& v)
{
pointLightCount = v.size();
for (int i = 0; i < 8 && i < static_cast<int>(v.size()); ++i) {
pointLightIndex[i] = v[i];
}
}
/**
* アクターに影響するスポットライトのインデックスを設定する.
*
* @param v スポットライトのインデックス配列.
*/
void LightReceiver::SetSpotLightList(const std::vector<int>& v)
{
spotLightCount = v.size();
for (int i = 0; i < 8 && i < static_cast<int>(v.size()); ++i) {
spotLightIndex[i] = v[i];
}
}
/**
*
*/
void LightReceiver::UploadLightList(const Shader::ProgramPtr& p)
{
if (p) {
p->Use();
p->SetPointLightIndex(pointLightCount, pointLightIndex);
p->SetSpotLightIndex(spotLightCount, spotLightIndex);
glUseProgram(0);
}
}
/**
* 格納可能なアクター数を確保する.
*
* @param reserveCount アクター配列の確保数.
*/
void ActorList::Reserve(size_t reserveCount)
{
actors.reserve(reserveCount);
}
/**
* アクターを追加する.
*
* @param actor 追加するアクター.
*/
void ActorList::Add(const ActorPtr& actor)
{
actors.push_back(actor);
}
/**
* アクターを削除する.
*
* @param actor 削除するアクター.
*/
bool ActorList::Remove(const ActorPtr& actor)
{
for (auto itr = actors.begin(); itr != actors.end(); ++itr) {
if (*itr == actor) {
actors.erase(itr);
return true;
}
}
return false;
}
/**
* 指定された座標に対応するアクターマップのインデックスを取得する.
*
* @param pos インデックスの元になる位置.
*
* @return posに対応するアクターマップのインデックス.
*/
glm::ivec2 ActorList::CalcMapIndex(const glm::vec3& pos) const
{
const int x = std::max(0, std::min(sepalationSizeX - 1, static_cast<int>(pos.x / mapGridSizeX)));
const int y = std::max(0, std::min(sepalationSizeY - 1, static_cast<int>(pos.z / mapGridSizeY)));
return glm::ivec2(x, y);
}
/**
* アクターの状態を更新する.
*
* @param deltaTime 前回の更新からの経過時間.
*/
void ActorList::Update(float deltaTime)
{
for (const ActorPtr& e : actors) {
if (e && e->health > 0) {
e->Update(deltaTime);
}
}
// 死亡したアクターを削除する.
for (auto i = actors.begin(); i != actors.end();) {
const ActorPtr& e = *i;
if (!e || e->health <= 0) {
i = actors.erase(i);
} else {
++i;
}
}
// アクターマップを更新する.
for (int y = 0; y < sepalationSizeY; ++y) {
for (int x = 0; x < sepalationSizeX; ++x) {
grid[y][x].clear();
}
}
for (auto i = actors.begin(); i != actors.end(); ++i) {
const glm::ivec2 mapIndex = CalcMapIndex((*i)->position);
grid[mapIndex.y][mapIndex.x].push_back(*i);
}
}
/**
* アクターの描画データを更新する.
*
* @param deltaTime 前回の更新からの経過時間.
*/
void ActorList::UpdateDrawData(float deltaTime)
{
for (const ActorPtr& e : actors) {
if (e && e->health > 0) {
e->UpdateDrawData(deltaTime);
}
}
}
/**
* Actorを描画する.
*
* @param drawType 描画するデータの種類.
*/
void ActorList::Draw(Mesh::DrawType drawType)
{
for (const ActorPtr& e : actors) {
if (e && e->health > 0) {
e->Draw(drawType);
}
}
}
/**
* Actorを描画する.
*
* @param frustum 視錐台.
* @param drawType 描画するデータの種類.
*/
void ActorList::Draw(const Collision::Frustum& frustum, Mesh::DrawType drawType)
{
for (const ActorPtr& e : actors) {
if (e && e->health > 0) {
if (Collision::Test(frustum, e->bounds)) {
e->Draw(drawType);
}
}
}
}
/**
* 指定された座標の近傍にあるアクターのリストを取得する.
*
* @param pos 検索の基点となる座標.
* @param maxDistance 近傍とみなす最大距離(m).
*
* @return Actor::positionがposから半径maxDistance以内にあるアクターの配列.
*/
std::vector<ActorPtr> ActorList::FindNearbyActors(const glm::vec3& pos, float maxDistance) const
{
std::vector<std::pair<float, ActorPtr>> buffer;
buffer.reserve(1000);
const int range = 1;
const glm::ivec2 mapIndex = CalcMapIndex(pos);
const glm::ivec2 min = glm::max(mapIndex - range, 0);
const glm::ivec2 max = glm::min(mapIndex + range, glm::ivec2(sepalationSizeX - 1, sepalationSizeY - 1));
for (int y = min.y; y <= max.y; ++y) {
for (int x = min.x; x <= max.x; ++x) {
const std::vector<ActorPtr>& list = grid[y][x];
for (auto actor : list) {
const float distance = glm::distance(glm::vec3(actor->position), pos);
buffer.push_back(std::make_pair(distance, actor));
}
}
}
std::sort(buffer.begin(), buffer.end(), [](auto& a, auto& b) { return a.first < b.first; });
std::vector<ActorPtr> result;
result.reserve(100);
for (const auto& e : buffer) {
if (e.first <= maxDistance) {
result.push_back(e.second);
}
}
return result;
}
/**
* 衝突判定を行う.
*
* @param a 判定対象のアクターその1.
* @param b 判定対象のアクターその2.
* @param handler 衝突した場合に実行される関数.
*/
void DetectCollision(const ActorPtr& a, const ActorPtr& b, CollisionHandlerType handler)
{
if (a->health <= 0 || b->health <= 0) {
return;
}
Collision::Result r = Collision::TestShapeShape(a->colWorld, b->colWorld);
if (r.isHit) {
if (handler) {
handler(a, b, r.pa);
} else {
a->OnHit(b, r);
std::swap(r.pa, r.pb);
std::swap(r.na, r.nb);
b->OnHit(a, r);
}
}
}
/**
* 衝突判定を行う.
*
* @param a 判定対象のアクター.
* @param b 判定対象のアクターリスト.
* @param handler 衝突した場合に実行される関数.
*/
void DetectCollision(const ActorPtr& a, ActorList& b, CollisionHandlerType handler)
{
if (a->health <= 0) {
return;
}
for (const ActorPtr& actorB : b) {
if (actorB->health <= 0) {
continue;
}
Collision::Result r = Collision::TestShapeShape(a->colWorld, actorB->colWorld);
if (r.isHit) {
if (handler) {
handler(a, actorB, r.pa);
} else {
a->OnHit(actorB, r);
std::swap(r.pa, r.pb);
std::swap(r.na, r.nb);
actorB->OnHit(a, r);
}
if (a->health <= 0) {
break;
}
}
}
}
/**
* 衝突判定を行う.
*
* @param a 判定対象のアクターリストその1.
* @param b 判定対象のアクターリストその2.
* @param handler 衝突した場合に実行される関数.
*/
void DetectCollision(ActorList& a, ActorList& b, CollisionHandlerType handler)
{
for (const ActorPtr& actorA : a) {
if (actorA->health <= 0) {
continue;
}
for (const ActorPtr& actorB : b) {
if (actorB->health <= 0) {
continue;
}
Collision::Result r = Collision::TestShapeShape(actorA->colWorld, actorB->colWorld);
if (r.isHit) {
if (handler) {
handler(actorA, actorB, r.pa);
} else {
actorA->OnHit(actorB, r);
std::swap(r.pa, r.pb);
std::swap(r.na, r.nb);
actorB->OnHit(actorA, r);
}
if (actorA->health <= 0) {
break;
}
}
}
}
}
|
95cc2930cd183b4f4988df871e4e5450f392433f
|
ff08518195c074b65d99f2ad041923565c9ff297
|
/speed/mandelbrot2/c++/1/test.cc
|
46a1587fd1ffb2a34257335344201a7112283da9
|
[] |
no_license
|
arowM/felix
|
10c5603dd58d1ae7524113253760168b5bb20abb
|
006ebf6d296e1f458315684518e3aa3a1fe4e324
|
refs/heads/master
| 2020-12-25T11:41:31.755544
| 2013-02-01T09:36:00
| 2013-02-01T09:36:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,255
|
cc
|
test.cc
|
// based off http://metamatix.org/~ocaml/price-of-abstraction.html
#include <sys/time.h>
#include <iostream>
#define RESOLUTION 5000
void set_fpu (unsigned int mode) {
asm ("fldcw %0" : : "m" (*&mode));
}
int iters(int max_iter, double xc, double yc) {
double x = xc;
double y = yc;
for(int count = 0;count < max_iter; count++) {
if( x*x + y*y >= 4.0) { return count; }
double tmp = x*x-y*y+xc;
y = 2.0 * x * y + yc;
x = tmp;
}
return max_iter;
}
int main() {
set_fpu (0x27F);
timeval t0;
if (gettimeofday(&t0, NULL)) {
std::cerr << "gettimeofday failed" << std::endl;
return 1;
}
int max_val = RESOLUTION/2;
int min_val = -max_val;
double mul = 2.0 / max_val;
int count = 0;
for(int i=min_val;i<=max_val;i++) {
for(int j=min_val;j<=max_val;j++) {
count += iters(100,mul*i,mul*j);
}
}
timeval t1;
if (gettimeofday(&t1, NULL)) {
std::cerr << "gettimeofday failed" << std::endl;
return 1;
}
std::cout << count << std::endl;
double t = t1.tv_sec - t0.tv_sec;
t += double(t1.tv_usec - t0.tv_usec) / 1000000.0;
std::cout << t << std::endl;
return 0;
}
|
12be520537b760c10a7ff8e20780f61ba2a6d237
|
441789853ed9911b2da0c9eabf7fa00d2ceffc8f
|
/libsrc/src/dconvert/pace/paceconv.cc
|
6eefd09fb0152c723511f5859c95c7a1cb377634
|
[] |
no_license
|
zekiguven/dicom3tools
|
03132ce9f7979c80a3b76aeaf0c0e68b994f2737
|
57db042487dde60c6efa0ead001bc0f41505764b
|
refs/heads/master
| 2021-01-20T14:43:16.497155
| 2012-01-09T16:52:03
| 2012-01-09T16:52:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 86
|
cc
|
paceconv.cc
|
#include "elmconst.h"
#include "pacedc.h"
#include "paceptrs.h"
#include "paceconv.h"
|
25e28d5ea799f93f428b3cd6cab612319e4fb930
|
9e4373d0e957a9ea2e91c133fdbf353c117b7d91
|
/B1010 A+B和C/main.cpp
|
f218ea82055c4deba657304df6b087cb4ba0d44b
|
[] |
no_license
|
Joe-Feng/PAT
|
332108132175ff03e9f5e066d07ae15fa83dd922
|
d074ef9407cf3d13ba56502dc354ad39c8f9f689
|
refs/heads/master
| 2021-01-07T17:08:04.517168
| 2020-02-20T01:15:29
| 2020-02-20T01:15:29
| 241,763,946
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 1,064
|
cpp
|
main.cpp
|
/*
这道题很受打击
1 输入类型:范围为[-2^31~2^31],int的范围为[-2^31~2^31-1]
long long的范围:[-2^63~2^63-1],所以应该用long long
2 数组大小必须为常量,不能为变量
3 要注意输入输出的格式
4 考虑特殊情况,这里要求输入不超过10组
5 输出时要求为组数(从1开始),写的时候直接输出的是数组下标,差了1
6 能不用数组,尽量不用,常量的时间复杂度为o(1),数组为O(n)
7循环T次更简便的写法为while(T--)
*/
#include <cstdio>
int main()
{
int n;
long long array[10][3]={{0,0,0}};
scanf("%d", &n);
if(n<11)
{
for(int i=0; i<n; i++)
{
for(int j=0; j<3; j++)
{
scanf("%lld", &array[i][j]);
}
}
for(int i=0; i<n; i++)
{
if(array[i][0] + array[i][1] > array[i][2])
printf("Case #%d: true\n", i+1);
else
printf("Case #%d: false\n", i+1);
}
}
return 0;
}
|
ede7fa0e5ceaf1260fc02d0a88cab31445cd35ab
|
072b90ab181d9159ae532236c154638e718ae58b
|
/counter.cpp
|
053e9ef45ac285a05708cae8a8ff6cc124a0bfcb
|
[] |
no_license
|
RewoundVHS/cli-args
|
e81d7914be3199ef290b7f1028509da3991d306f
|
ecc1f08d36621edd7d8baf3dd43ef50e191a543a
|
refs/heads/master
| 2020-04-21T19:33:44.578161
| 2019-02-18T17:34:02
| 2019-02-18T17:34:02
| 169,810,872
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,186
|
cpp
|
counter.cpp
|
#include <iostream>
#include <string.h>
using namespace std;
void Usage(char * progname);
void GetHighAndLow(const char * param, int & low, int & high);
int main(int argc, char * argv[]) {
string argument;
bool reverse = false;
bool verbose = false;
bool help = false;
string lowString;
string highString;
string limitString;
string stepString;
int low = 1;
int high = 10;
int step = 1;
int i = 1;
while (i < argc) {
argument = argv[i];
// Print help menu
if (!strcmp(argv[i], "-h") or !strcmp(argv[i], "--help")) {
Usage(argv[0]);
help = true;
i++;
// Set bottom value
} else if (!strcmp(argv[i], "-b")) {
i++;
if (i < argc) {
low = atoi(argv[i]);
i++;
} else {
cerr << "\t-b requires an integer argument" << endl;
}
} else if (!strncmp(argv[i], "-b", 2)) {
lowString = argv[i];
low = stoi(lowString.substr(2, argument.size()));
i++;
} else if (!strncmp(argv[i], "--bottom=", 9)) {
lowString = argv[i];
low = stoi(lowString.substr(9, argument.size()));
i++;
// Set top value
} else if (!strcmp(argv[i], "-t")) {
i++;
if (i < argc) {
high = atoi(argv[i]);
i++;
} else {
cerr << "\t-t requires an integer argument" << endl;
}
} else if (!strncmp(argv[i],"-t", 2)) {
highString = argv[i];
high = stoi(highString.substr(2, argument.size()));
i++;
} else if (!strncmp(argv[i], "--top=", 6)) {
highString = argv[i];
high = stoi(highString.substr(6, argument.size()));
i++;
// Set upper and lower limits
} else if (!strcmp(argv[i], "-l")) {
i++;
if (i < argc) {
GetHighAndLow(argv[i], low, high);
i++;
} else {
cerr << "\t-l requires an argument" << endl;
}
} else if (!strncmp(argv[i], "-l", 2)) {
i++;
argument = argument.substr(2, argument.size());
GetHighAndLow(argument.c_str(), low, high);
i++;
} else if (!strncmp(argv[i], "--limit=", 8)) {
limitString = argument.substr(8, argument.size());
GetHighAndLow(limitString.c_str(), low, high);
i++;
// Set reverse mode
} else if (!strcmp(argv[i], "-r") || !strcmp(argv[i], "--reverse")) {
reverse = true;
i++;
// Set step
} else if (!strcmp(argv[i], "-s")) {
i++;
if (i < argc) {
step = atoi(argv[i]);
i++;
} else {
cerr << "\t-s requires an integer argument" << endl;
}
} else if (!strncmp(argv[i], "-s", 2)) {
stepString = argv[i];
step = stoi(stepString.substr(2, argument.size()));
i++;
} else if (!strncmp(argv[i], "--step=", 7)) {
stepString = argv[i];
step = stoi(stepString.substr(7, argument.size()));
i++;
// Set verbose mode
} else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")) {
verbose = true;
i++;
// Invalid argument
} else {
cerr << "Unknown argument " << argv[i] << endl;
Usage(argv[0]);
i++;
}
}
// Check if low greater than high, if so, print error and exit
if (low > high) {
cerr << "Low value greater than high value" << endl;
// Check if step is negative or zero, if so print an error and exit
} else if (step <= 0) {
cerr << "Step negative or zero" << endl;
// Verbose mode, print a summary of all values set by arguments
} else if (verbose) {
cout << "Low = " << low << endl;
cout << "High = " << high << endl;
cout << "Step = " << step << endl;
cout << "Reverse = ";
if (reverse)
cout << "Yes" << endl;
else
cout << "No" << endl;
cout << "Help = ";
if (help)
cout << "Yes" << endl;
else
cout << "No" << endl;
cout << "Verbose = Yes" << endl;
} else {
if (!reverse) {
// Count from low value to high value
for (int k=low; k<=high; k+=step) {
cout << k;
if (k+step <= high) {
cout << ' ';
}
}
} else {
// Count from high value to low value
for (int k=high; k>=low; k-=step) {
cout << k;
if (k-step >= low) {
cout << ' ';
}
}
}
cout << endl;
}
return 0;
}
// Finds the comma separated high and low values
void GetHighAndLow(const char* param, int & low, int & high) {
string tmp = param;
size_t pos;
pos = tmp.find(',');
if (pos == string::npos) {
high = -1;
low = atoi(param);
} else {
string first, second;
first = tmp.substr(0,pos);
low = atoi(tmp.c_str());
second = tmp.substr(pos+1,string::npos);
high = atoi(second.c_str());
}
return;
}
// Print the help section, explains command line argument usage
void Usage(char * progname) {
cout << "Usage: " << progname << endl;
cout << "\t-h --help: print a help message describing command line arguments" << endl;
cout << "\t-b n, --bottom=n: set the low value to be the integer n." << endl;
cout << "\t-t n, --top=n: set the high value to be the integer n." << endl;
cout << "\t-l m, n -lm, --limit=m,n: set the low value to be m and the high value to be n." << endl;
cout << "\t-r --reverse: print from high to low, not low to high." << endl;
cout << "\t-s n, -sn, --step=n: increment (or decrement) by n, the default is 1." << endl
<< "\tThe step value is restricted to positive integers (no negatives or 0)." << endl;
cout << "\t-v, --verbose: parse command line arguments and print a summary of the values." << endl;
return;
}
|
c2181bea22f3a4ab0f22fde62ea44f5b7a91b01a
|
91a882547e393d4c4946a6c2c99186b5f72122dd
|
/Source/XPSP1/NT/drivers/ksfilter/msfsio/device.cpp
|
ca82ff3d003c8365996798a270497dbdf7a448ed
|
[] |
no_license
|
IAmAnubhavSaini/cryptoAlgorithm-nt5src
|
94f9b46f101b983954ac6e453d0cf8d02aa76fc7
|
d9e1cdeec650b9d6d3ce63f9f0abe50dabfaf9e2
|
refs/heads/master
| 2023-09-02T10:14:14.795579
| 2021-11-20T13:47:06
| 2021-11-20T13:47:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 852
|
cpp
|
device.cpp
|
/*++
Copyright (C) Microsoft Corporation, 1998 - 1999
Module Name:
device.cpp
Abstract:
Device driver core, initialization, etc.
--*/
#include "msfsio.h"
#ifdef ALLOC_PRAGMA
#pragma code_seg("INIT")
#endif // ALLOC_PRAGMA
extern "C"
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPathName
)
/*++
Routine Description:
Sets up the driver object.
Arguments:
DriverObject -
Driver object for this instance.
RegistryPathName -
Contains the registry path which was used to load this instance.
Return Values:
Returns STATUS_SUCCESS if the driver was initialized.
--*/
{
_DbgPrintF(DEBUGLVL_VERBOSE,("DriverEntry"));
return
KsInitializeDriver(
DriverObject,
RegistryPathName,
&DeviceDescriptor);
}
|
87276e17b45e4725fd22f1a72c30079dd70ec1ef
|
8cfae49fcdc6c8176a1ac5332acaae9ccbc2e36b
|
/继承与派生(2)/ch7_闹钟类.cpp
|
cafc887b927f43896359dfd5e58df1db0e819381
|
[] |
no_license
|
YUZehuiIC/C-plus-plus_Exercises
|
ec5bac59638c91080c1bd257dd307c9ce22b2269
|
108e75690cae7ea96b902291e4351a9af781455e
|
refs/heads/main
| 2023-06-26T00:12:21.664412
| 2021-07-26T17:12:15
| 2021-07-26T17:12:15
| 389,709,736
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,376
|
cpp
|
ch7_闹钟类.cpp
|
#include <iostream>
#include <iomanip>
#include <windows.h>
using namespace std;
class Clock
{
private:
int Hour, Minute, Second; // 24小时制的时间数据
int TickMinute,TickSecond,TickTime; // 计时时长
public:
Clock(){Hour = Minute = Second = 0; }//默认时钟时间是00:00:00
Clock(int hour, int minute, int second){Hour = hour; Minute = minute; Second = second;}
void ShowTime(); //显示时间功能
void Tick(); //计时功能,每一次Tick,时间向前走1秒
void SetTime(int NewH, int NewM, int NewS){Hour = NewH; Minute = NewM; Second = NewS; } //重新设定时间值
int SetTickTime(int tm,int ts){TickMinute = tm; TickSecond = ts; TickTime = 60*TickMinute + TickSecond;return TickTime; }
int GetHour(){return Hour;}
int GetMinute(){return Minute;}
};
void Clock::ShowTime(){
cout.fill(0);
cout << setw(2) << Hour << ":" << setw(2) << Minute << ":" << setw(2) << Second << endl;
}
void Clock::Tick(){
if(++Second==60){
Second = 0;
if(++Minute==60){
Minute = 0;
if(++Hour==24)
Hour = 0;
}
}
// 输出格式设置
cout.fill('0'); // 处理个位数补0成为两位数的情况
cout << "时间是 ";
cout << setw(2) << Hour << ":"
<< setw(2) << Minute << ":"
<< setw(2) << Second;
Sleep(1000); // 定时1s
cout << '\r'; // 输出位置不变
}
class AlarmClock:public Clock
{
private:
int AlarmHour,AlarmMinute;
public:
AlarmClock(){AlarmHour = 23; AlarmMinute = 59;}//默认闹钟时间是23:59
AlarmClock(int AH,int AM){AlarmHour = AH; AlarmMinute = AM;}
void Alarm(){ cout << '\7' << '\7' << '\7'; }
void SetAlarmTime(int AH,int AM){AlarmHour = AH;AlarmMinute = AM;}
void Tick();
};
void AlarmClock::Tick(){ // 函数重载
Clock::Tick();
if(AlarmHour==GetHour() && AlarmMinute==GetMinute())
Alarm();
}
int main(){
AlarmClock AC;
int h,m,s,ah,am,tm,ts;
char judge;
while(1){
cout << "请输入初始时间(时 分 秒):";
cin >> h >> m >> s;
AC.SetTime(h,m,s);
cout << "请输入闹铃时间(时 分)";
cin >> ah >> am;
AC.SetAlarmTime(ah,am);
cout << "请输入计时时长(分 秒)";
cin >> tm >> ts;
for(int i=0;i<AC.SetTickTime(tm,ts);i++){
AC.Tick();}
cout << "计时结束,还要继续吗(Y/N)?";
cin >> judge;
if(judge=='N')
break;
}
cout << "Press any key to continue";
return 0;
}
|
dc6ce0615672105099ac1355b33359a59c96d0f1
|
7070b1aabbfb68811e5f699334d4f8e6522d0086
|
/FriendCircles/friend_circles.cpp
|
04a29d0becfb517558be2c9d9e5fb27318589162
|
[] |
no_license
|
zabdulre/Algorithms-
|
d886cd630f722d860796c9ebc307c8633365e569
|
1f5ae527642c177b257545b2638d8d83820eb002
|
refs/heads/master
| 2023-08-18T19:45:53.088086
| 2021-10-01T04:37:42
| 2021-10-01T04:37:42
| 412,306,453
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 876
|
cpp
|
friend_circles.cpp
|
#include "friend_circles.h"
#include <stack>
using namespace std;
/* Optional: LeetCode #547: "Friend Circles"
* (https://leetcode.com/problems/friend-circles/)
* There are N students in a class. Some of them are friends,
* while some are not. Their friendship is transitive in nature.
* For example, if A is a direct friend of B, and B is a direct friend of C,
* then A is an indirect friend of C. We define a friend circle as a
* group of students who are direct or indirect friends.
*
* You are given a N*N matrix M representing the friend relationship between
* students in the class. If M[i][j] = 1, then the ith and jth students are
* direct friends with each other, otherwise they are not.
*
* TODO: output the total number of friend circles among all the students. */
int findCircleNum(vector<vector<int>>& M) {
int count = 0;
return count;
}
|
37a812bbdc4b4bff7d87c4b429c131e89ea16be5
|
174cf202d576fcea141c244420c717487e8fb052
|
/widget.cpp
|
71a2bf0455ec6e29c0d477155278c19ef8dd1125
|
[] |
no_license
|
Hotactioncop/OpenGL_cube
|
4d49bcfa17e146237487ce252cba903038eaf059
|
9695e8cc6e245891e9d9c88c05768eefe75fedbf
|
refs/heads/main
| 2023-07-03T20:00:15.275864
| 2021-08-14T13:25:56
| 2021-08-14T13:25:56
| 395,998,315
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,905
|
cpp
|
widget.cpp
|
#include "widget.h"
#include <QMouseEvent>
Widget::Widget(QWidget *parent)
: QOpenGLWidget(parent), m_texture(0),
m_indexBuffer(QOpenGLBuffer::IndexBuffer), m_xRotate(0), m_yRotate(0) {
glEnable(GL_POLYGON_SMOOTH);
}
Widget::~Widget() {}
void Widget::initializeGL() //Вызывается 1 раз
{
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glEnable(GL_DEPTH_TEST); //Включаем буфер глубины
glEnable(
GL_CULL_FACE); //Включаем отсечение задних граней - чтобы не рисовались
initShaders();
initCube(1.0f);
}
void Widget::resizeGL(
int w, int h) //Вызывается каждый раз при изменении размера виджета
{
//Настраиваем матрицу проекции
float aspect = w / (float)h; //Отношение ширины на высоту
m_projectMatrix
.setToIdentity(); //Делаем матрицу единичной. У матрицы на главной
//диагонали стоит 1, остальные равны нулю
m_projectMatrix.perspective(45, aspect, 0.1f,
10.0f); //Угол усеченного конуса камеры,...,
//передняя и дальние полскости отсечения
}
void Widget::paintGL() //Вызывается каждый раз при перерисовке содержимого окна
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Очищаем сцену
//Загрузить матрицу проэкции в шейдер и модельно-видовую матрицу
QMatrix4x4 modelViewMatrix;
modelViewMatrix.setToIdentity();
// modelViewMatrix.rotate(m_xRotate,1.0,0.0,0.0);
// modelViewMatrix.rotate(m_yRotate,0.0,1.0,0.0);
modelViewMatrix.translate(0.0, 0.0, -5.0);
modelViewMatrix.rotate(m_rotation);
m_texture->bind(0);
m_program.bind(); //Доступ к программе
m_program.setUniformValue("qt_ModelViewProjectionMatrix",
m_projectMatrix * modelViewMatrix);
m_program.setUniformValue("qt_Texture0",
0); //Номер текстуры которая будет отрисовываться
m_arrayBuffer.bind();
int offset = 0;
int vertLoc = m_program.attributeLocation("qt_Vertex");
m_program.enableAttributeArray(vertLoc);
m_program.setAttributeBuffer(vertLoc, GL_FLOAT, offset, 3,
sizeof(VertexData));
offset += sizeof(QVector3D);
int texLoc = m_program.attributeLocation("qt_MultiTexCoord0");
m_program.enableAttributeArray(texLoc);
m_program.setAttributeBuffer(texLoc, GL_FLOAT, offset, 2, sizeof(VertexData));
m_indexBuffer.bind();
glDrawElements(GL_TRIANGLES, m_indexBuffer.size(), GL_UNSIGNED_INT, 0);
}
void Widget::mousePressEvent(QMouseEvent *event) {
if (event->buttons() == Qt::LeftButton) {
m_mousePosition =
QVector2D(event->localPos()); //Указатель мыши согласно угла окна
}
event->accept();
}
void Widget::mouseMoveEvent(QMouseEvent *event) {
if (event->buttons() != Qt::LeftButton)
return;
m_xRotate += 180 * (GLfloat)(event->y() - m_mousePosition.y()) / height();
m_yRotate += 180 * (GLfloat)(event->x() - m_mousePosition.x()) / width();
QVector2D diff =
QVector2D(event->localPos()) -
m_mousePosition; //Сохраняем дельту между текущим положением и первичным
m_mousePosition = QVector2D(event->localPos());
float angle =
diff.length() /
2.0; //Угол поворота. Делим на 2 чтобы поворот не был слишком быстрым
// QVector3D axis = QVector3D(m_xRotate, m_yRotate,
// 0.0); //Вектор вокруг которого осуществлять
// поворот
QVector3D axis = QVector3D(diff.y(), diff.x(),
0.0); //Вектор вокруг которого осуществлять поворот
m_rotation =
QQuaternion::fromAxisAndAngle(axis, angle) *
m_rotation; //Умножаем чтобы с каждым движением мыши поворот осуществлялся
//с нового положения а не с самого начала
update();
}
void Widget::initShaders() {
if (!m_program.addShaderFromSourceFile(QOpenGLShader::Vertex,
":/vshader.vsh"))
close();
if (!m_program.addShaderFromSourceFile(QOpenGLShader::Fragment,
":/fshader.fsh"))
close();
if (!m_program.link()) //Линкуем все шейдеры в один
close();
}
void Widget::initCube(float width) {
float width_div_2 = width / 2.0f;
QVector<VertexData> vertexes;
vertexes.append(VertexData(QVector3D(-width_div_2, width_div_2, width_div_2),
QVector2D(0.0, 1.0), QVector3D(0.0, 0.0, 1.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, -width_div_2, width_div_2),
QVector2D(0.0, 0.0), QVector3D(0.0, 0.0, 1.0)));
vertexes.append(VertexData(QVector3D(width_div_2, width_div_2, width_div_2),
QVector2D(1.0, 1.0), QVector3D(0.0, 0.0, 1.0)));
vertexes.append(VertexData(QVector3D(width_div_2, -width_div_2, width_div_2),
QVector2D(1.0, 0.0), QVector3D(0.0, 0.0, 1.0)));
vertexes.append(VertexData(QVector3D(width_div_2, width_div_2, width_div_2),
QVector2D(0.0, 1.0), QVector3D(1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, -width_div_2, width_div_2),
QVector2D(0.0, 0.0), QVector3D(1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, width_div_2, -width_div_2),
QVector2D(1.0, 1.0), QVector3D(1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, -width_div_2, -width_div_2),
QVector2D(1.0, 0.0), QVector3D(1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, width_div_2, width_div_2),
QVector2D(0.0, 1.0), QVector3D(0.0, 1.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, width_div_2, -width_div_2),
QVector2D(0.0, 0.0), QVector3D(0.0, 1.0, 0.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, width_div_2, width_div_2),
QVector2D(1.0, 1.0), QVector3D(0.0, 1.0, 0.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, width_div_2, -width_div_2),
QVector2D(1.0, 0.0), QVector3D(0.0, 1.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, width_div_2, -width_div_2),
QVector2D(0.0, 1.0), QVector3D(0.0, 0.0, -1.0)));
vertexes.append(VertexData(QVector3D(width_div_2, -width_div_2, -width_div_2),
QVector2D(0.0, 0.0), QVector3D(0.0, 0.0, -1.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, width_div_2, -width_div_2),
QVector2D(1.0, 1.0), QVector3D(0.0, 0.0, -1.0)));
vertexes.append(
VertexData(QVector3D(-width_div_2, -width_div_2, -width_div_2),
QVector2D(1.0, 0.0), QVector3D(0.0, 0.0, -1.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, width_div_2, width_div_2),
QVector2D(0.0, 1.0), QVector3D(-1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, width_div_2, -width_div_2),
QVector2D(0.0, 0.0), QVector3D(-1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, -width_div_2, width_div_2),
QVector2D(1.0, 1.0), QVector3D(-1.0, 0.0, 0.0)));
vertexes.append(
VertexData(QVector3D(-width_div_2, -width_div_2, -width_div_2),
QVector2D(1.0, 0.0), QVector3D(-1.0, 0.0, 0.0)));
vertexes.append(VertexData(QVector3D(-width_div_2, -width_div_2, width_div_2),
QVector2D(0.0, 1.0), QVector3D(0.0, -1.0, 0.0)));
vertexes.append(
VertexData(QVector3D(-width_div_2, -width_div_2, -width_div_2),
QVector2D(0.0, 0.0), QVector3D(0.0, -1.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, -width_div_2, width_div_2),
QVector2D(1.0, 1.0), QVector3D(0.0, -1.0, 0.0)));
vertexes.append(VertexData(QVector3D(width_div_2, -width_div_2, -width_div_2),
QVector2D(1.0, 0.0), QVector3D(0.0, -1.0, 0.0)));
QVector<GLuint> indexes;
for (int i = 0; i < 24; i += 4) {
indexes.append(i + 0);
indexes.append(i + 1);
indexes.append(i + 2);
indexes.append(i + 2);
indexes.append(i + 1);
indexes.append(i + 3);
}
//Вершинный буфер
m_arrayBuffer.create(); //Создаем
m_arrayBuffer.bind(); //Размещаем
m_arrayBuffer.allocate(
vertexes.constData(),
vertexes.size() *
sizeof(VertexData)); //Выделяем память и загружает данные
m_arrayBuffer.release(); //Освобождаем пока это не нужно
m_indexBuffer.create();
m_indexBuffer.bind();
m_indexBuffer.allocate(indexes.constData(), indexes.size() * sizeof(GLuint));
m_indexBuffer.release();
m_texture = new QOpenGLTexture(
QImage(":/Images/box.png").mirrored()); //Отражение по вертикали mirrored
m_texture->setMinificationFilter(QOpenGLTexture::Nearest);
m_texture->setMagnificationFilter(QOpenGLTexture::Linear);
m_texture->setWrapMode(QOpenGLTexture::Repeat);
}
|
bc8a6166c64345074316d3527b603f09bf861d11
|
d3d1f2d171c93f5c16653f713ea85dd650f6d997
|
/courses/prog_base_3/final/StarSystem/StarSystem/Camera.cpp
|
c5d095de4b45b6a2024d089a0ae69328e784d242
|
[] |
no_license
|
Silchenko-Nikita/Silchenko-Nikita-s
|
485d36415305d16b7568cc18c8c5277b0339c323
|
0d7be7845484111daf006729b84b4b646900c950
|
refs/heads/master
| 2020-04-12T08:48:25.443905
| 2017-02-24T09:38:56
| 2017-02-24T09:38:56
| 41,999,788
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,016
|
cpp
|
Camera.cpp
|
#include "stdafx.h"
#include <math.h>
#include <GL/freeglut.h>
#include <iostream>
#include "utils.h"
#include "camera.h"
#include "constants.h"
const float Camera::maxDistance = 1000.0f; // in abstract pixels
Camera::Camera(const float initialDistance) {
init(initialDistance);
}
void Camera::init(const float initialDistance) {
dist = initialDistance;
quat[0] = quat[1] = quat[2] = 0.0f;
quat[3] = 1.0f;
pos.x = pos.y = pos.z = 0.0f;
};
void Camera::render() {
float mat[16], mat1[16];
glLoadIdentity();
glGetFloatv(GL_MODELVIEW_MATRIX, mat1);
Utils::getModifMat(quat, mat1, mat);
Vector3d target, targetPix;
if (targetSpObj != NULL) {
SpaceObject * parent = targetSpObj->getParent();
if (parent != NULL) {
target = parent->getPosition() + targetSpObj->getPosition()*(targetSpObj->getType() == SPUTNIK ? dynamic_cast<Sputnik *>(targetSpObj)->getDistDisplayFactor() : 1.0);
}
else {
target = targetSpObj->getPosition();
}
targetPix = target * (1 / SpaceObject::getMetersPerPixel());
if (targetPix.length() > Camera::maxDistance / 2) {
targetSpObj = NULL;
target.nullify();
}
}
if (dist < 0.03f) dist = 0.03f;
glTranslatef(0.0f, 0.0f, -dist);
glMultMatrixf(mat);
glTranslatef(-targetPix.x, -targetPix.y, -targetPix.z);
}
void Camera::zoom(float deltaP) {
double minDist = (targetSpObj != NULL) ? (targetSpObj->getDiameter() * targetSpObj->getDiamDisplayFactor() * 1.6 / SpaceObject::getMetersPerPixel()) : 0.0;
if ((dist < minDist && deltaP < 0.0f) || (dist > maxDistance && deltaP > 0.0f)) return;
/*Vector3d pos;
SpaceObject * target = targetSpObj;
if(target != NULL){
pos = target->getPosition() +
}
if ((dist > Camera::maxDistance && delta > 0.0f)*/
dist += deltaP*dist;
}
void Camera::setTarget(SpaceObject * spObj){
targetSpObj = spObj;
double minDist = (targetSpObj != NULL) ? (targetSpObj->getDiameter() * targetSpObj->getDiamDisplayFactor() * 1.6 / SpaceObject::getMetersPerPixel()) : 0.0f;
if (dist < minDist) dist = minDist;
}
|
fec1257d941a5e6b3590010b75c89aa24121c7ef
|
42be4a025ccf0865513c11ba1eedb07de591a566
|
/SimpleCalculator/SimpleCalculator/Calc.h
|
0afd83a9c6da8d64621ba8d9a1566390692aa82f
|
[] |
no_license
|
jmiddendo/CPlusPlusExamples
|
715a3c808e19ac4b1f59ca58ceada308352806a9
|
cb2cc289fbfa28597de3f070217bbd5724acfd0a
|
refs/heads/master
| 2021-01-22T04:24:09.126082
| 2017-02-24T05:29:25
| 2017-02-24T05:29:25
| 81,536,525
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 352
|
h
|
Calc.h
|
#ifndef SimpleCalculator_H
#define SimpleCalculator_H
class SimpleCalculator
{
public:
SimpleCalculator(double ans = 0.0)
{
answer = ans;
}
double add(double, double);
double subtract(double, double);
double multiply(double, double);
double divide(double, double);
double getAnswer();
private:
double answer;
};
#endif
|
56cd9293a00ad9e86074ebc8c5cab6173c398aed
|
d3b519ec9a601f3d4f8f830e0ded5434f128a3c5
|
/bam/test/ba/kpi_change_at_recompute.cc
|
18c96a15e64ed8fac29a0abd0bbe28c029d6bb9d
|
[
"Apache-2.0"
] |
permissive
|
joschi99/centreon-broker
|
bcf8e5f1aea80e73342a3a7dab913684792db85a
|
196b90f3f2015b59b064d176628c6fe3b524ec45
|
refs/heads/master
| 2023-03-16T02:46:52.915632
| 2021-03-02T10:10:14
| 2021-03-02T10:10:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 29,274
|
cc
|
kpi_change_at_recompute.cc
|
/*
** Copyright 2014 Centreon
**
** 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.
**
** For more information : contact@centreon.com
*/
#include <gtest/gtest.h>
#include <cstdlib>
#include <memory>
#include <stack>
#include <vector>
#include "com/centreon/broker/bam/ba.hh"
#include "com/centreon/broker/bam/configuration/applier/state.hh"
#include "com/centreon/broker/bam/kpi_service.hh"
#include "com/centreon/broker/config/applier/init.hh"
#include "com/centreon/broker/neb/downtime.hh"
#include "com/centreon/broker/neb/service_status.hh"
using namespace com::centreon::broker;
class BamBA : public ::testing::Test {
public:
void SetUp() override {
// Initialization.
config::applier::init();
_aply_state.reset(new bam::configuration::applier::state);
_state.reset(new bam::configuration::state);
}
void TearDown() override {
// Cleanup.
config::applier::deinit();
}
protected:
std::unique_ptr<bam::configuration::applier::state> _aply_state;
std::unique_ptr<bam::configuration::state> _state;
};
/**
* Check that KPI change at BA recompute does not mess with the BA
* value.
*/
TEST_F(BamBA, Recompute) {
// Build BAM objects.
std::shared_ptr<bam::ba> test_ba(new bam::ba);
std::shared_ptr<bam::kpi_service> kpi(new bam::kpi_service);
kpi->set_host_id(1);
kpi->set_service_id(1);
kpi->set_impact_critical(100.0);
kpi->set_state_hard(bam::kpi_service::state::state_ok);
kpi->set_state_soft(kpi->get_state_hard());
test_ba->add_impact(kpi);
kpi->add_parent(test_ba);
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
for (int i(0); i < 100 + 2; ++i) {
std::shared_ptr<neb::service_status> ss(new neb::service_status);
ss->host_id = 1;
ss->service_id = 1;
ss->last_check = now + i;
ss->last_hard_state = ((i & 1) ? 0 : 2);
ss->current_state = ss->last_hard_state;
kpi->service_update(ss);
}
ASSERT_EQ(test_ba->get_state_hard(), 0);
}
/**
* Check that a KPI change at BA recompute does not mess with the BA
* value.
*
* ----------------
* ________| BA(C40%:W70%)|___________
* / ---------------- \
* | | |
* KPI1(C20%:W10%) KPI2(C20%:W10%) KPI3(C20%:W10%)
* | | |
* H1S1 H2S1 H3S1
*
* @return EXIT_SUCCESS on success.
*/
TEST_F(BamBA, ImpactState) {
// Build BAM objects.
std::shared_ptr<bam::ba> test_ba(new bam::ba);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(2);
results.push(1);
results.push(1);
results.push(1);
results.push(0);
results.push(0);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_impact_warning(10);
kpis[i]->set_impact_critical(20);
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
test_ba->set_level_warning(70.0);
test_ba->set_level_critical(40.0);
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
ss->service_id = 1;
for (int i = 0; i < 2; i++) {
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = i + 1;
ss->current_state = ss->last_hard_state;
kpis[j]->service_update(ss);
short val = results.top();
ASSERT_EQ(test_ba->get_state_soft(), val);
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
}
/**
* Check that a KPI change at BA recompute does not mess with the BA
* value.
*
* ----------------
* ________| BA(BEST) |___________
* / ---------------- \
* | | |
* KPI1(C20%:W10%) KPI2(C20%:W10%) KPI3(C20%:W10%)
* | | |
* H1S1 H2S1 H3S1
*
* @return EXIT_SUCCESS on success.
*/
TEST_F(BamBA, BestState) {
// Build BAM objects.
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_best);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(2);
results.push(1);
results.push(1);
results.push(1);
results.push(0);
results.push(0);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
ss->service_id = 1;
for (int i = 0; i < 2; i++) {
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = i + 1;
ss->current_state = ss->last_hard_state;
kpis[j]->service_update(ss);
short val = results.top();
ASSERT_EQ(test_ba->get_state_soft(), val);
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
}
/**
* Check that a KPI change at BA recompute does not mess with the BA
* value.
*
* ----------------
* ________| BA(WORST) |___________
* / ---------------- \
* | | |
* KPI1(C20%:W10%) KPI2(C20%:W10%) KPI3(C20%:W10%)
* | | |
* H1S1 H2S1 H3S1
*
* @return EXIT_SUCCESS on success.
*/
TEST_F(BamBA, WorstState) {
// Build BAM objects.
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_worst);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(2);
results.push(2);
results.push(2);
results.push(1);
results.push(1);
results.push(1);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
ss->service_id = 1;
for (int i = 0; i < 2; i++) {
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = i + 1;
ss->current_state = ss->last_hard_state;
kpis[j]->service_update(ss);
short val = results.top();
ASSERT_EQ(test_ba->get_state_soft(), val);
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
}
/**
* Check that a KPI change at BA recompute does not mess with the BA
* value.
*
* ----------------
* ________| BA(RAtioNUm) |____________________________
* / ---------------- \ \
* | | | \
* ---------------2 C -> W , 4 C -> C -------------------
* | | | \
* H1S1 H2S1 H3S1 H4S1
*
* @return EXIT_SUCCESS on success.
*/
TEST_F(BamBA, RatioNum) {
// Build BAM objects.
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_number);
test_ba->set_level_critical(4);
test_ba->set_level_warning(2);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(2);
results.push(1);
results.push(1);
results.push(0);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = 2;
ss->current_state = ss->last_hard_state;
kpis[j]->service_update(ss);
short val = results.top();
ASSERT_EQ(test_ba->get_state_soft(), val);
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
/**
* Check that a KPI change at BA recompute does not mess with the BA
* value.
*
* ----------------
* ________| BA(RAtio% ) |____________________________
* / ---------------- \ \
* | | | \
* ---------------75% C -> W , 100% C -> C -------------------
* | | | \
* H1S1 H2S1 H3S1 H4S1
*
* @return EXIT_SUCCESS on success.
*/
TEST_F(BamBA, RatioPercent) {
// Build BAM objects.
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_percent);
test_ba->set_level_critical(100);
test_ba->set_level_warning(75);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(2);
results.push(1);
results.push(0);
results.push(0);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = 2;
ss->current_state = ss->last_hard_state;
kpis[j]->service_update(ss);
short val = results.top();
ASSERT_EQ(test_ba->get_state_soft(), val);
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
TEST_F(BamBA, DtInheritAllCritical) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_percent);
test_ba->set_level_critical(100);
test_ba->set_level_warning(75);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_inherit);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<bool> results;
results.push(true);
results.push(false);
results.push(false);
results.push(false);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = 2;
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_in_downtime(), val);
results.pop();
}
}
TEST_F(BamBA, DtInheritOneOK) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_percent);
test_ba->set_level_critical(100);
test_ba->set_level_warning(90);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_inherit);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<bool> results;
results.push(false);
results.push(false);
results.push(false);
results.push(false);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
if (i == 0)
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
else
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->service_id = 1;
if (j == 0)
ss->last_hard_state = 0;
else
ss->last_hard_state = 2;
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_in_downtime(), val);
results.pop();
}
}
TEST_F(BamBA, IgnoreDt) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_percent);
test_ba->set_level_critical(100);
test_ba->set_level_warning(75);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_ignore);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<bool> results;
results.push(false);
results.push(false);
results.push(false);
results.push(false);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = 2;
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_in_downtime(), val);
results.pop();
}
}
TEST_F(BamBA, DtIgnoreKpi) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_percent);
test_ba->set_level_critical(100);
test_ba->set_level_warning(75);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_ignore_kpi);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<bool> results;
results.push(false);
results.push(false);
results.push(false);
results.push(false);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = 2;
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_in_downtime(), val);
results.pop();
}
}
TEST_F(BamBA, DtIgnoreKpiImpact) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_impact);
test_ba->set_level_critical(50);
test_ba->set_level_warning(75);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_ignore_kpi);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(0);
results.push(0);
results.push(1);
results.push(2);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
if (i == 3)
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
else
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
kpis[i]->set_impact_critical(25);
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
if (j == 3)
ss->last_hard_state = 0;
else
ss->last_hard_state = 2;
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
TEST_F(BamBA, DtIgnoreKpiBest) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_best);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_ignore_kpi);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(0);
results.push(2);
results.push(1);
results.push(0);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
switch (i) {
case 0:
case 1:
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
break;
case 2:
kpis[i]->set_state_hard(bam::kpi_service::state::state_warning);
break;
case 3:
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
break;
}
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = kpis[j]->get_state_hard();
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
TEST_F(BamBA, DtIgnoreKpiWorst) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_worst);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_ignore_kpi);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(0);
results.push(0);
results.push(1);
results.push(2);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
switch (i) {
case 0:
case 1:
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
break;
case 2:
kpis[i]->set_state_hard(bam::kpi_service::state::state_warning);
break;
case 3:
kpis[i]->set_state_hard(bam::kpi_service::state::state_ok);
break;
}
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = kpis[j]->get_state_hard();
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
TEST_F(BamBA, DtIgnoreKpiRatio) {
std::shared_ptr<bam::ba> test_ba(new bam::ba);
test_ba->set_state_source(bam::configuration::ba::state_source_ratio_number);
test_ba->set_downtime_behaviour(bam::configuration::ba::dt_ignore_kpi);
test_ba->set_level_warning(1);
test_ba->set_level_critical(2);
std::vector<std::shared_ptr<bam::kpi_service> > kpis;
std::stack<short> results;
results.push(0);
results.push(1);
results.push(2);
results.push(2);
std::shared_ptr<bam::kpi_service> s1{new bam::kpi_service};
kpis.push_back(s1);
std::shared_ptr<bam::kpi_service> s2{new bam::kpi_service};
kpis.push_back(s2);
std::shared_ptr<bam::kpi_service> s3{new bam::kpi_service};
kpis.push_back(s3);
std::shared_ptr<bam::kpi_service> s4{new bam::kpi_service};
kpis.push_back(s4);
for (size_t i = 0; i < kpis.size(); i++) {
kpis[i]->set_host_id(i + 1);
kpis[i]->set_service_id(1);
kpis[i]->set_state_hard(bam::kpi_service::state::state_critical);
kpis[i]->set_state_soft(kpis[i]->get_state_hard());
test_ba->add_impact(kpis[i]);
kpis[i]->add_parent(test_ba);
}
// Change KPI state as much time as needed to trigger a
// recomputation. Note that the loop must terminate on a odd number
// for the test to be correct.
time_t now(time(nullptr));
std::shared_ptr<neb::service_status> ss(new neb::service_status);
std::shared_ptr<neb::downtime> dt(new neb::downtime);
ss->service_id = 1;
for (size_t j = 0; j < kpis.size(); j++) {
ss->last_check = now + 1;
ss->host_id = j + 1;
ss->last_hard_state = kpis[j]->get_state_hard();
kpis[j]->service_update(ss);
dt->host_id = ss->host_id;
dt->service_id = 1;
dt->was_started = true;
dt->actual_end_time = 0;
kpis[j]->service_update(dt);
short val = results.top();
ASSERT_EQ(test_ba->get_state_hard(), val);
results.pop();
}
}
|
4bb7585c6222285ecd73a0cf0effd58931a4d114
|
bb32b44cdfe08a2a13ced83c9e7184dd76280cd5
|
/13/main.cpp
|
ce25bb1c8cd9afb50f1e48c8c51fddb34f3e9571
|
[] |
no_license
|
Falconesto/algorithmsLabs
|
2333f95f3745a3911819efb4a11f588e3ee73fbd
|
7de39ca0ff57e9b219fbe30aceb58935346545be
|
refs/heads/main
| 2023-03-28T17:33:16.151616
| 2021-04-07T18:53:33
| 2021-04-07T18:53:33
| 355,651,693
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 850
|
cpp
|
main.cpp
|
#include <vector>
#include <string>
#include <iostream>
std::vector<int> prefixFunction(std::string s) {
int n = (int) s.length();
std::vector<int> pi(n);
for (int i = 1; i < s.length(); i++) {
int j = pi[i - 1];
while ((j > 0) && (s[i] != s[j])) {
j = pi[j - 1];
}
if (s[i] == s[j]) {
pi[i] = j + 1;
} else {
pi[i] = j;
}
}
return pi;
}
int main() {
std::string p, t;
std::cin >> p >> t;
std::vector<int> pi = prefixFunction(p + '#' + t);
int len = p.size();
std::vector<int> ans;
for (int i = 0; i < t.length(); i++) {
if (pi[len + 1 + i] == len) {
ans.push_back(i - len + 2);
}
}
std::cout << ans.size() << std::endl;
for (int i : ans) {
std::cout << i << ' ';
}
}
|
5bf1db6ff1a93675bf2e3826a94576fa0fb9fbf6
|
c847fa35128db97a22cf12f9e7ac741e7b29f461
|
/blur.cpp
|
1b1b1dd19044ddfc11b29a87a34a23c57b9131b0
|
[] |
no_license
|
ArthurGoodman/gaussian_blur
|
720ac1063a001bf1cc39ee3e7d9c722905add6ad
|
2c1860315a6a68ec6dcef4e04fc49c4f7fe6e41c
|
refs/heads/master
| 2020-12-02T14:56:25.370095
| 2017-06-02T11:49:31
| 2017-06-02T11:49:31
| 66,163,381
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,861
|
cpp
|
blur.cpp
|
#include <QApplication>
#include <fftw3.h>
#include <functional>
#include <omp.h>
#include <QtWidgets>
class Widget : public QWidget {
QVBoxLayout vBox;
QHBoxLayout hBox;
QLabel label;
QSlider slider;
QImage ℑ
std::function<void(int)> compute;
public:
Widget(QImage &image, const std::function<void(int)> &compute)
: image(image)
, compute(compute) {
setFont(QFont("Courier New", 12));
slider.setOrientation(Qt::Horizontal);
slider.setMinimum(1);
slider.setMaximum(100);
slider.setSingleStep(1);
slider.setPageStep(10);
slider.setTickInterval(10);
slider.setTickPosition(QSlider::TicksBelow);
connect(&slider, &QSlider::valueChanged, this, &Widget::sliderValueChanged);
vBox.addWidget(&label);
hBox.addWidget(new QLabel("1", this));
hBox.addWidget(&slider);
hBox.addWidget(new QLabel("100", this));
vBox.addLayout(&hBox);
setLayout(&vBox);
vBox.setSizeConstraint(QLayout::SetFixedSize);
blur(1);
}
protected:
void keyPressEvent(QKeyEvent *e) {
switch (e->key()) {
case Qt::Key_Escape:
close();
break;
case Qt::Key_Return:
image.save("blurred.png");
break;
}
}
private slots:
void sliderValueChanged(int value) {
blur(value);
}
private:
void blur(int sigma) {
compute(sigma);
label.setPixmap(QPixmap::fromImage(image));
}
};
int getChannel(QRgb rgb, int c) {
switch (c) {
case 0:
return qRed(rgb);
case 1:
return qGreen(rgb);
case 2:
return qBlue(rgb);
default:
return 0;
}
}
QRgb setChannel(QRgb rgb, int c, int v) {
switch (c) {
case 0:
return qRgb(v, qGreen(rgb), qBlue(rgb));
case 1:
return qRgb(qRed(rgb), v, qBlue(rgb));
case 2:
return qRgb(qRed(rgb), qGreen(rgb), v);
default:
return 0;
}
}
int main(int argc, char **argv) {
QApplication app(argc, argv);
const int borderSize = 100;
fftwf_complex *input, *filter, *output;
fftwf_plan forward_plan, backward_plan;
QImage image("image.jpg"), blurred(image.width(), image.height(), QImage::Format_RGB32);
int width = image.width() + 2 * borderSize, height = image.height() + 2 * borderSize;
auto index = [&](int x, int y) -> int {
return (x + width) % width + (y + height) % height * width;
};
fftwf_init_threads();
fftwf_plan_with_nthreads(omp_get_max_threads());
input = (fftwf_complex *) fftwf_malloc(width * height * sizeof(fftwf_complex));
filter = (fftwf_complex *) fftwf_malloc(width * height * sizeof(fftwf_complex));
output = (fftwf_complex *) fftwf_malloc(width * height * sizeof(fftwf_complex));
forward_plan = fftwf_plan_dft_2d(height, width, input, output, FFTW_FORWARD, FFTW_MEASURE);
backward_plan = fftwf_plan_dft_2d(height, width, output, output, FFTW_BACKWARD, FFTW_MEASURE);
fftwf_plan filter_plan = fftwf_plan_dft_2d(height, width, filter, filter, FFTW_FORWARD, FFTW_MEASURE);
auto compute = [&](int sigma) {
std::fill((float *) filter, (float *) (filter + width * height), 0.0f);
const float a = 1.0 / 2 / M_PI / sigma / sigma;
for (float x = -width / 2; x < width / 2; x++)
for (float y = -height / 2; y < height / 2; y++)
filter[index(x, y)][0] = a * expf(-(x * x + y * y) / 2 / sigma / sigma);
fftwf_execute(filter_plan);
for (int c = 0; c < 3; c++) {
std::fill((float *) input, (float *) (input + width * height), 0.0f);
// for (int x = 0; x < width - 2 * borderSize; x++)
// for (int y = 0; y < height - 2 * borderSize; y++)
// input[index(x + borderSize, y + borderSize)][0] = getChannel(image.pixel(x, y), c);
for (int x = 0; x < width; x++)
for (int y = 0; y < height; y++) {
int nx = x - borderSize, ny = y - borderSize;
if (x < borderSize)
nx = abs(x - borderSize);
if (y < borderSize)
ny = abs(y - borderSize);
if (x > width - 1 - borderSize)
nx = 2 * width - 3 * borderSize - 1 - x;
if (y > height - 1 - borderSize)
ny = 2 * height - 3 * borderSize - 1 - y;
input[index(x, y)][0] = getChannel(image.pixel(nx, ny), c);
}
fftwf_execute(forward_plan);
for (int x = 0; x < width; x++)
for (int y = 0; y < height; y++) {
output[index(x, y)][0] = output[index(x, y)][0] * filter[index(x, y)][0] - output[index(x, y)][1] * filter[index(x, y)][1];
output[index(x, y)][1] = output[index(x, y)][0] * filter[index(x, y)][1] + output[index(x, y)][1] * filter[index(x, y)][0];
}
fftwf_execute(backward_plan);
for (int x = 0; x < width - 2 * borderSize; x++)
for (int y = 0; y < height - 2 * borderSize; y++)
blurred.setPixel(x, y, setChannel(blurred.pixel(x, y), c, round(output[index(x + borderSize, y + borderSize)][0]) / width / height));
}
};
// fftwf_free(input);
// fftwf_free(filter);
// fftwf_free(output);
// fftwf_destroy_plan(forward_plan);
// fftwf_destroy_plan(backward_plan);
// fftwf_cleanup_threads();
// QLabel label;
// label.setPixmap(QPixmap::fromImage(blurred));
// label.show();
// blurred.save("blurred.bmp");
Widget w(blurred, compute);
w.show();
return app.exec();
}
|
eb3fe72433b56aca2965420b48e5760ec857a7f8
|
d17e192a397dc68f3f92f959289a1a5dd5e91848
|
/language.cpp
|
7048fddecf72aaeb265cf55f3b774165a687dd34
|
[] |
no_license
|
NTW1313/CSC211-languageproject
|
4c8748c0546111df243b507722579404ebc3da76
|
5df8b189cfce91974a6d86fba2006839c4782764
|
refs/heads/master
| 2021-05-07T04:50:28.839140
| 2017-12-11T23:56:46
| 2017-12-11T23:56:46
| 111,471,394
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,491
|
cpp
|
language.cpp
|
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include "language.h"
/*
language.cpp
language class implementation
*/
//std::vector<int> frequencies;
//std::string langName;
//default constructor
language::language(){
langName = "";
}
//parameterized constructor
language::language(std::string filename) {
langName = filename;
}
//parameterized constructor
language::language(std::string filename, std::vector<int> freq){
langName = filename;
frequencies = freq;
}
/*
countTrigrams() method
counts the trigram frequencies of the language and
stores them in a vector
returns a language object with the filename and frequencies stored
*/
language language::countTrigrams(){
//the name of the file
std::string filename = langName;
//the frequencies vector will hold all of the frequencies of the trigrams
std::vector<int> frequencies(pow(27.0, 3.0));
//read file
std::fstream infile;
//opens the file
infile.open(filename);
//if the file opens
if(!infile.fail()){
std::string text = "";
for (std::string line; std::getline(infile, line); ) {
text.append(line);
}
//for loop to look at all possible trigrams
for (int i = 0; i < (int) text.length() - 2; i+=1) {
std::string trigram = text.substr(i,3);
//get the ascii code for each char
int indexa = trigram[0];
int indexb = trigram[1];
int indexc = trigram[2];
if(indexa==32){indexa = 0;}// if its a space, map it to 0
else{indexa = indexa - 96;}// - 96 so 'a' is 1, 'b' is 2, and so on
if(indexb==32){indexb = 0;}
else{indexb = indexb - 96;}
if(indexc==32){indexc = 0;}
else{indexc = indexc - 96;}
//find the index of the trigram in frequencies
int index = indexa * pow(27.0, 2.0) + indexb * 27 + indexc;
//add 1 to the frequencies vector at the trigram's position
frequencies[index] = frequencies[index] + 1;
}
//close file here
infile.close();
return language(filename, frequencies); //return a new language object
}
else{
//if the file does not open
std::cerr << "File cannot open, please check input" << std::endl;
exit(EXIT_FAILURE);
}
}
/*
getter methods
*/
//get frequencies: returns the vector of frequencies
std::vector<int> language::getFrequencies(){
return frequencies;
}
//get language name: returns the name of the language (the filename)
std::string language::getlangName(){
return langName;
}
|
21099337c3f76896a4677d51f928ad38ff6bc260
|
b84af33968fe7c21d76d85790d6f107e79317dcb
|
/src/db/db.h
|
ceccc77df88386dfe7a07635e0e19269337e4d34
|
[
"MIT"
] |
permissive
|
lelika1/foodculator
|
3af3aec2ff33aab2b9803a5b64666c9d7d6e159f
|
593982b0aa87c449d376c5ebbd3de43e6c5ba216
|
refs/heads/master
| 2021-05-22T19:43:23.703711
| 2021-04-28T23:08:30
| 2021-04-28T23:08:30
| 253,063,383
| 0
| 0
|
MIT
| 2020-06-06T15:06:10
| 2020-04-04T17:50:54
|
C++
|
UTF-8
|
C++
| false
| false
| 4,143
|
h
|
db.h
|
#ifndef __SRC_DB_DB_H__
#define __SRC_DB_DB_H__
#include <memory>
#include <mutex>
#include <string>
#include <string_view>
#include <variant>
#include <vector>
#include "json11/json11.hpp"
#include "util/statusor.h"
class sqlite3;
namespace foodculator {
struct Ingredient {
std::string name;
uint32_t kcal;
size_t id;
Ingredient(std::string name, uint32_t kcal, size_t id = 0)
: name(std::move(name)), kcal(kcal), id(id) {}
bool operator==(const Ingredient& rhs) const;
json11::Json to_json() const {
return json11::Json::object{
{"name", name}, {"kcal", std::to_string(kcal)}, {"id", std::to_string(id)}};
}
};
std::ostream& operator<<(std::ostream& out, const Ingredient& v);
struct Tableware {
std::string name;
uint32_t weight;
size_t id;
Tableware(std::string name, uint32_t weight, size_t id = 0)
: name(std::move(name)), weight(weight), id(id) {}
bool operator==(const Tableware& rhs) const;
json11::Json to_json() const {
return json11::Json::object{
{"name", name}, {"weight", std::to_string(weight)}, {"id", std::to_string(id)}};
}
};
std::ostream& operator<<(std::ostream& out, const Tableware& v);
struct RecipeIngredient {
size_t ingredient_id;
uint32_t weight;
RecipeIngredient(size_t id, uint32_t weight) : ingredient_id(id), weight(weight) {}
bool operator==(const RecipeIngredient& rhs) const;
json11::Json to_json() const {
return json11::Json::object{{"id", std::to_string(ingredient_id)},
{"weight", std::to_string(weight)}};
}
};
std::ostream& operator<<(std::ostream& out, const RecipeIngredient& v);
struct RecipeHeader {
std::string name;
size_t id;
RecipeHeader() {}
RecipeHeader(std::string name, size_t id = 0) : name(std::move(name)), id(id) {}
bool operator==(const RecipeHeader& rhs) const;
json11::Json to_json() const {
return json11::Json::object{{"name", name}, {"id", std::to_string(id)}};
}
};
std::ostream& operator<<(std::ostream& out, const RecipeHeader& v);
struct FullRecipe {
RecipeHeader header;
std::string description;
std::vector<RecipeIngredient> ingredients;
bool operator==(const FullRecipe& rhs) const;
json11::Json to_json() const {
return json11::Json::object{{"header", header.to_json()},
{"description", description},
{"ingredients", ingredients}};
}
};
std::ostream& operator<<(std::ostream& out, const FullRecipe& v);
class DB {
public:
static std::unique_ptr<DB> Create(std::string_view path);
~DB();
StatusOr<size_t> AddProduct(std::string name, uint32_t kcal);
StatusOr<Ingredient> GetProduct(size_t id);
StatusOr<std::vector<Ingredient>> GetProducts();
bool DeleteProduct(size_t id);
StatusOr<size_t> AddTableware(std::string name, uint32_t weight);
StatusOr<std::vector<Tableware>> GetTableware();
bool DeleteTableware(size_t id);
StatusOr<size_t> CreateRecipe(const std::string& name, const std::string& description,
const std::map<size_t, uint32_t>& ingredients);
StatusOr<std::vector<RecipeHeader>> GetRecipes();
StatusOr<FullRecipe> GetRecipeInfo(size_t recipe_id);
bool DeleteRecipe(size_t id);
private:
explicit DB(sqlite3* db) : db_(db) {}
using BindParameter = std::variant<uint32_t, std::string>;
StatusCode Insert(std::string_view table, const std::vector<std::string_view>& fields,
const std::vector<BindParameter>& params);
StatusOr<size_t> SelectId(std::string_view table, const std::vector<std::string_view>& fields,
const std::vector<BindParameter>& params, std::string_view id_field);
using DBRow = std::vector<std::string>;
StatusOr<std::vector<DBRow>> Exec(std::string_view sql,
const std::vector<BindParameter>& params);
std::mutex mu_;
sqlite3* db_;
};
} // namespace foodculator
#endif
|
09da199c9da38a17f7ecf01389343ba1dac5b891
|
9a15562d9e47ba572ce4909b5cc7ccc71a220b8c
|
/LabsAlgo/term2/3/P/P.cpp
|
b6f7857f8ad7f2de3fafef8140c619c276fcc597
|
[] |
no_license
|
Mervap/ITMO
|
76106bce726f01aa3e4fb7f7d79be1f989ada014
|
f9d3b79de97650e151b2008ec12c1a2f249b3e5b
|
refs/heads/master
| 2023-05-06T05:30:58.589999
| 2023-02-04T22:05:51
| 2023-02-10T01:09:25
| 122,747,773
| 10
| 6
| null | 2023-03-15T11:06:27
| 2018-02-24T14:32:14
|
Jupyter Notebook
|
UTF-8
|
C++
| false
| false
| 2,507
|
cpp
|
P.cpp
|
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int K = 19;
vector<long long> tree;
vector<int> par;
vector<int> in;
vector<int> out;
vector<vector<int>> dp;
vector<vector<int>> g;
int n;
void update(int i, int l, int r, int pos, long long val) {
if (l == r) {
tree[i] += val;
return;
}
int m = (r + l) / 2;
if (pos <= m) {
update(2 * i, l, m, pos, val);
} else {
update(2 * i + 1, m + 1, r, pos, val);
}
tree[i] = tree[2 * i] + tree[2 * i + 1];
}
long long query(int i, int l, int r, int lz, int rz) {
if (lz > rz) {
return 0;
}
if (l == lz && r == rz) {
return tree[i];
}
int m = (l + r) / 2;
return query(2 * i, l, m, lz, min(m, rz))
+ query(2 * i + 1, m + 1, r, max(m + 1, lz), rz);
}
bool isLCA(int v, int u) {
return in[v] <= in[u] && out[u] <= out[v];
}
int lca(int v, int u) {
for (int k = K - 1; k >= 0; --k) {
if (!isLCA(dp[v][k], u)) {
v = dp[v][k];
}
}
return isLCA(v, u) ? v : par[v];
}
int tree = 0;
void dfs(int v, int p) {
par[v] = p;
in[v] = tree++;
for (int u : g[v]) {
if (u != p) {
dfs(u, v);
}
}
out[v] = tree++;
}
int main() {
freopen("treepathadd.in", "r", stdin);
freopen("treepathadd.out", "w", stdout);
scanf("%d", &n);
++n;
tree.resize(8 * n);
par.resize(n);
in.resize(n);
out.resize(n);
g.resize(n);
dp.assign(n, vector<int>(K));
int a, b;
for (int i = 1; i < n - 1; ++i) {
scanf("%d %d", &a, &b);
g[a].push_back(b);
g[b].push_back(a);
}
g[0].push_back(1);
dfs(0, 0);
for (int i = 0; i < n; ++i) {
dp[i][0] = par[i];
}
for (int k = 1; k < K; ++k) {
for (int i = 0; i < n; ++i) {
dp[i][k] = dp[dp[i][k - 1]][k - 1];
}
}
int m;
scanf("%d\n", &m);
char c;
long long val;
int nn = 2 * n - 1;
for (int i = 0; i < m; ++i) {
scanf("%c", &c);
if (c == '+') {
scanf("%d %d %lld\n", &a, &b, &val);
int l = lca(a, b);
update(1, 0, nn, in[a], val);
update(1, 0, nn, in[b], val);
update(1, 0, nn, in[l], -val);
update(1, 0, nn, in[par[l]], -val);
} else {
scanf("%d\n", &a);
printf("%lld\n", query(1, 0, nn, in[a], out[a]));
}
}
}
|
0dc67a087b4e04cbe5c97f81bd040bffbb194397
|
8c970ada20aa9e8df83cd6b8265cfb07abaed1f0
|
/libstdframe_qt/include/std.captions.hpp
|
d44da0b5b54cdcbc0349619fcf7fa4a8548a51d7
|
[] |
no_license
|
wilsonsouza/libstdframe_qt
|
b5798c101c8ee0157b64b46e038efe4d5569a04b
|
f5de65483cb1fd7f42d5be206429e1ab0970736b
|
refs/heads/master
| 2020-03-30T05:01:08.683911
| 2018-09-29T20:47:30
| 2018-09-29T20:47:30
| 150,775,157
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
C++
| false
| false
| 16,835
|
hpp
|
std.captions.hpp
|
//-----------------------------------------------------------------------------------------------//
// dedaluslib.lib for Windows
//
// Created by Wilson.Souza 2012, 2018
// For Libbs Farma
//
// Dedalus Prime
// (c) 2012
//-----------------------------------------------------------------------------------------------//
#pragma once
#pragma warning(disable:4275)
#pragma warning(disable:4251)
#include <std.defs.hpp>
//-----------------------------------------------------------------------------------------------//
namespace std
{
namespace captions
{
struct shared
{
unicodestring const SEARCHED{ "Pesquisar" };
unicodestring const DETAILS{ "Detalhes" };
shared() = default;
};
//-----------------------------------------------------------------------------------------------//
struct tokens
{
const unicodestring nullstr{};
const unicodestring SEPARATOR{ "-" };
const unicodestring STRINGEND{};
const QIcon nullicon{};
tokens() = default;
};
//-----------------------------------------------------------------------------------------------//
struct messages
{
char const * INVALIDPOINTER{ "Invalid pointer, variable %s" };
messages() = default;
};
//-----------------------------------------------------------------------------------------------//
struct errors
{
unicodestring const CRITICAL{ "Erro!!!" };
unicodestring const QUESTION{ "Confirma?" };
unicodestring const WARNING{ unicodestring::fromLatin1("Atenção!") };
errors() = default;
};
//-----------------------------------------------------------------------------------------------//
struct styles
{
const unicodestring WINDOWS{ "windows" };
const unicodestring FUSION{ "fusion" };
const unicodestring WINDOWSXP{ "windowsxp" };
const unicodestring MACINTOSH{ "macintosh" };
styles() = default;
};
//-----------------------------------------------------------------------------------------------//
struct common
{
const unicodestring OK{ "&OK" };
const unicodestring CANCEL{ "&Cancelar" };
const unicodestring CONTINUE{ "Con&tinuar" };
const unicodestring RETRY{ "&Repetir" };
const unicodestring HELP{ "&Ajuda" };
const unicodestring INSERT{ "&Incluir" };
const unicodestring CHANGE{ "&Alterar" };
const unicodestring DETAILS{ "&Detalhes" };
const unicodestring REFRESH{ "&Atualizar" };
const unicodestring ERASE{ "&Excluir" };
common() = default;
};
//-----------------------------------------------------------------------------------------------//
struct file
{
const unicodestring NAME{ "&Arquivo" };
const unicodestring NEW{ "&Novo" };
const unicodestring OPEN{ "&Abrir" };
const unicodestring CLOSE{ "&Fechar" };
const unicodestring SAVE{ "&Salvar" };
const unicodestring SAVE_AS{ "Salvar &Como" };
const unicodestring PRINT{ "&Imprimir" };
const unicodestring PRINT_VIEW{ unicodestring::fromLatin1("&Visualizar Impressão") };
const unicodestring PRINT_SETUP{ unicodestring::fromLatin1("Configurar Impressão") };
const unicodestring PRINT_PAGE_SETUP{ "Configurar pagina para impressão" };
const unicodestring IMPORT{ "Importar" };
const unicodestring EXPORT{ "Exportar" };
const unicodestring RECENT_FILES{ "&Recentes" };
const unicodestring CHANGE_USER{ unicodestring::fromLatin1("&Trocar Usuário") };
const unicodestring LOGOFF{ "&Desligar Sistema" };
const unicodestring EXIT{ "&Sair" };
file() = default;
};
//-----------------------------------------------------------------------------------------------//
struct edit
{
const unicodestring NAME{ "Editar" };
const unicodestring UNDO{ "Desfazer" };
const unicodestring REDO{ "Refazer" };
const unicodestring CUT{ "Recortar" };
const unicodestring PASTE{ "Colar" };
const unicodestring COPY{ "Copiar" };
const unicodestring REMOVE{ "Remover" };
const unicodestring SELECT_ALL{ "Selecionar Tudo" };
const unicodestring FIND_REPLACE{ "Pesquisar e Modificar" };
const unicodestring GOTO{ "Ir Para" };
edit() = default;
};
//-----------------------------------------------------------------------------------------------//
struct view
{
const unicodestring NAME{ "Visualizar" };
const unicodestring TOOLBAR{ "Barra de Ferramentas" };
const unicodestring STATUSBAR{ "Barra de Estados" };
view() = default;
};
//-----------------------------------------------------------------------------------------------//
struct tools
{
const unicodestring NAME{ "Ferramentas" };
const unicodestring PREFERENCES{ unicodestring::fromLatin1("Preferências") };
tools() = default;
};
//-----------------------------------------------------------------------------------------------//
struct window
{
const unicodestring NAME{ "&Janela" };
const unicodestring CLOSE{ "&Fechar" };
const unicodestring CLOSEALL{ "Fechar &toda(s)" };
const unicodestring MAXIMIZE{ "&Maximizar" };
const unicodestring MINIMIZE{ "&Minimizar" };
const unicodestring SHOW{ "Mos&trar" };
const unicodestring HIDE{ "&Esconder" };
const unicodestring REFRESH{ "&Atualizar" };
const unicodestring DOCUMENT{ "Modo &documento" };
const unicodestring TABBED{ "Modo a&ba" };
const unicodestring TILE{ "Posicionar &lado a lado" };
const unicodestring CASCADE{ "Posicionar em &cascata" };
const unicodestring NEXT{ "&Proxima" };
const unicodestring PREVIOUS{ "Anterior" };
window() = default;
};
//-----------------------------------------------------------------------------------------------//
struct style
{
const unicodestring NAME{ "Estilo" };
const unicodestring WINDOWS{ "Tipo &Windows Nativo" };
const unicodestring MOTIF{ "Tipo &Motif" };
const unicodestring CDE{ "Tipo &CDE" };
const unicodestring PLASTIQUE{ "Tipo &Plastique" };
const unicodestring VISTA{ "Tipo Windows &Vista" };
const unicodestring XP{ "Tipo Windows &XP" };
const unicodestring MACINTOSH{ "Tipo &Macintosh iOS" };
const unicodestring FUSION{ "Tipo &Fusion" };
const unicodestring PART{ "Tipo " };
style() = default;
};
//-----------------------------------------------------------------------------------------------//
struct user
{
const unicodestring NAME{ unicodestring::fromLatin1("Usuários") };
const unicodestring PASSWORD{ "Senha" };
const unicodestring PERMISSION{ unicodestring::fromLatin1("Permissões") };
const unicodestring MANAGER{ unicodestring::fromLatin1("Manutenção") };
user() = default;
};
//-----------------------------------------------------------------------------------------------//
struct analyzer
{
const unicodestring NAME{ "Analisar" };
const unicodestring PAGE{ "Selecionar Tipo de Analise..." };
analyzer() = default;
};
//-----------------------------------------------------------------------------------------------//
struct help
{
const unicodestring NAME{ "Ajuda" };
const unicodestring INDEX{ unicodestring::fromLatin1("Índice da Ajuda") };
const unicodestring LIBBS{ "Libbs Home Page" };
const unicodestring DEDALUS{ "Dedalus Home Page" };
const unicodestring WRDEVINFO{ "WR DevInfo Home Page" };
const unicodestring ABOUT{ unicodestring::fromLatin1("Sobre %1") };
help() = default;
};
//-----------------------------------------------------------------------------------------------//
namespace libbs
{
unicodestring const CONTROLE_DE_VERBAS{ "Controle de Verbas" };
struct Equipe
{
const unicodestring NAME{ "&Equipe" };
const unicodestring REGIONAL{ "&Regional" };
const unicodestring CARGO{ "&Cargo" };
const unicodestring VAGA{ "&Vaga" };
const unicodestring MATRICULAS{ "&Matriculas" };
const unicodestring NCC{ unicodestring::fromLatin1("Número de conta corrente (N.C/C)") };
Equipe() = default;
};
//-----------------------------------------------------------------------------------------------//
struct Despesas
{
const unicodestring NAME{ "&Despesas" };
const unicodestring TIPO_DE_DESPESAS{ "&Tipo de despesas" };
const unicodestring QUANTIDADES{ "&Quantidades" };
//-----------------------------------------------------------------------------------------------//
struct Valores
{
const unicodestring NAME{ "&Valores" };
const unicodestring BASICOS{ "&Basicos" };
const unicodestring PESSOAIS{ "&Pessoais" };
Valores() = default;
};
//-----------------------------------------------------------------------------------------------//
struct Controles
{
const unicodestring NAME{ "&Controles" };
struct ContaCorrente
{
const unicodestring NAME{ "&Conta corrente" };
const unicodestring LANCAMENTO_DE_RELATORIOS{ unicodestring::fromLatin1("&Lançamento de relatórios") };
ContaCorrente() = default;
};
struct PainelControle
{
const unicodestring NAME{ "&Painel de controle" };
const unicodestring TODOS_EXCETO_DEMITIDOS{ "&Todos exceto demitidos" };
const unicodestring EQUIPE_DE_CAMPO{ "Equipe de campo" };
const unicodestring DEMITIDOS{ "Demitidos" };
PainelControle() = default;
};
Controles() = default;
};
//-----------------------------------------------------------------------------------------------//
struct Agenda
{
const unicodestring NAME{ "&Agenda" };
const unicodestring PENDENTES{ "&Pendentes" };
const unicodestring ENCERRADOS{ "&Encerrados" };
const unicodestring ATUALIZAR{ "A&tualizar" };
Agenda() = default;
};
//-----------------------------------------------------------------------------------------------//
const unicodestring REMESSAS{ "&Remessas" };
const unicodestring BANCO_RETORNO{ "&Banco retorno" };
const unicodestring EXTRATO_SAQUE{ "&Extrato de saque" };
Despesas() = default;
};
//-----------------------------------------------------------------------------------------------//
struct Saldos
{
const unicodestring NAME{ "&Saldos" };
const unicodestring GERENCIAL{ "&Gerencial" };
struct Contabil
{
const unicodestring NAME{ "&Contabil" };
const unicodestring SITUACAO_GERAL{ "Situação geral" };
const unicodestring EXTRATO_DE_FUNCIONARIO{ "Extrato de funcionário" };
Contabil() = default;
};
Saldos() = default;
};
//-----------------------------------------------------------------------------------------------//
const unicodestring LANCA_OS_BB{ unicodestring::fromLatin1("Lançamentos banco do brasil") };
//-----------------------------------------------------------------------------------------------//
struct Bloqueio
{
const unicodestring NAME{ "&Bloqueio" };
const unicodestring BLOQUEAR_SALDOS_ANTERIORES{ "Bloquear saldos anteriores" };
Bloqueio() = default;
};
//-----------------------------------------------------------------------------------------------//
struct Tabelas
{
const unicodestring NAME{ "&Tabelas" };
struct Eventos
{
const unicodestring NAME{ "&Eventos" };
const unicodestring EVENTOS{ unicodestring::fromLatin1("Manutenção de &eventos") };
Eventos() = default;
};
const unicodestring PESSOAS_DE_CONTATO{ "Pessoas de &contato" };
const unicodestring REGIONAIS{ "Regionais" };
const unicodestring PRODUTOS{ "&Produtos" };
const unicodestring GERENCIA_DE_PRODUTO{ unicodestring::fromLatin1("Gerência de produto") };
const unicodestring TAREFAS{ "&Tarefas" };
const unicodestring GASTOS{ "&Gastos" };
const unicodestring RATEIO{ "&Rateio" };
const unicodestring CIDADES{ "&Cidades" };
const unicodestring MEDICOS{ unicodestring::fromLatin1("&Médicos") };
const unicodestring CENTRO_DE_CUSTO{ "Centro de custo" };
Tabelas() = default;
};
struct Propagandistas
{
const unicodestring NAME{ "Propagandistas" };
const unicodestring TODOS_EXCETO_DEMITIDOS{ "Todos exceto demitidos" };
const unicodestring EQUIPE_DE_CAMPO{ "&Equipe de campo" };
const unicodestring DEMITIDOS{ "&Demitidos" };
const unicodestring TIPOS_DE_DESPESAS{ "&Tipos de despesas" };
const unicodestring TIPOS_DE_EVENTOS{ "Tipos de eventos" };
const unicodestring DIRETORIAS{ "&Diretorias" };
const unicodestring FORNECEDORES{ "&Fornecedores" };
const unicodestring ATIVIDADES{ "&Atividades" };
Propagandistas() = default;
};
struct Verbas
{
const unicodestring NAME{ "&Verbas" };
const unicodestring ANDAMENTO{ "&Andamento" };
const unicodestring ENCERRADAS{ "&Encerradas" };
const unicodestring DISTRIBUICAO{ unicodestring::fromLatin1("&Distribuição") };
const unicodestring GASTOS{ "&Gastos" };
const unicodestring LANCAMENTOS{ unicodestring::fromLatin1("&Lançamentos") };
const unicodestring MULTIPLOS{ "Multiplos" };
const unicodestring TAREFAS{ "&Tarefas" };
const unicodestring ENCERRAR{ "Encerrar" };
const unicodestring VERIFICAR_ORCAMENTO{ unicodestring::fromLatin1("&Verificar orçamento") };
const unicodestring RECALCULO{ "&Recalculo" };
const unicodestring LISTAGEM{ "&Listagem" };
const unicodestring RDS{ "RDs" };
const unicodestring WWG{ unicodestring::fromLatin1("Solicitações de verbas vindos do sistema de cartões banco do brasil (WWG)") };
const unicodestring NOTAS_FISCAIS{ "&Notas fiscais" };
const unicodestring VERIFICAO{ unicodestring::fromLatin1("Verificação") };
Verbas() = default;
};
struct Pagamentos
{
const unicodestring NAME{ "&Pagamentos" };
const unicodestring NORMAIS{ "&Normais" };
const unicodestring PENDENTES{ "Pendentes" };
const unicodestring ADIANTAMENTOS_PENDENTES{ "&Adiantamentos pendentes" };
const unicodestring TODOS_ADIANTAMENTOS{ "&Todos adiantamentos" };
const unicodestring ESTATISTICA{ "&Estatistica" };
const unicodestring PAGAR{ "Pagar" };
Pagamentos() = default;
};
struct Financeiro
{
const unicodestring NAME{ "&Financeiro" };
const unicodestring GERAR_CARTA{ "&Gerar carta" };
const unicodestring LANCAMENTOS{ unicodestring::fromLatin1("Lançamentos") };
Financeiro() = default;
};
const unicodestring CONTRATOS{ "&Contratos" };
struct Romaneio
{
const unicodestring NAME{ "&Romaneio" };
const unicodestring EMISSAO{ unicodestring::fromLatin1("&Emissão") };
Romaneio() = default;
};
const unicodestring NOTAS_FISCAIS{ std::captions::libbs::Verbas{}.NOTAS_FISCAIS };
}
}
}
|
bec9631922a2e36009832b5030a24104257baef0
|
3e44c87bb77d39a91a865d8d8db18181f1b1effa
|
/PAT/Advanced/1153-Decode-Registration-Card-of-PAT.cpp
|
d3d26f02166d733d0ff17406ece413b7c00d42c7
|
[] |
no_license
|
kainzhang/kz-algo-cpp
|
e6386ec3d29104f21a15401ace96db869662afc8
|
12947152289802915a65c793687e6008b5f2cd76
|
refs/heads/master
| 2023-01-23T23:56:10.541532
| 2020-11-23T02:40:03
| 2020-11-23T02:40:03
| 247,682,344
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,079
|
cpp
|
1153-Decode-Registration-Card-of-PAT.cpp
|
//
// Created by LOKKA on 2020/7/12.
//
#include <bits/stdc++.h>
using namespace std;
struct Node {
string s;
int val;
bool operator < (const Node &x) const {
return val == x.val ? s < x.s : val > x.val;
}
};
vector<Node> v;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, M;
cin >> N >> M;
v.resize(N);
for (int i = 0; i < N; i++) {
cin >> v[i].s >> v[i].val;
}
for (int i = 1; i <= M; i++) {
int num; string str;
vector<Node> ans;
cin >> num >> str;
printf("Case %d: %d %s\n", i, num, str.c_str());
switch(num) {
case 1: {
char sign = str[0];
for (int j = 0; j < N; j++) {
if (v[j].s[0] == sign) {
ans.push_back(v[j]);
}
}
break;
} case 2: {
int cnt = 0, sum = 0;
for (int j = 0; j < N; j++) {
if (v[j].s.substr(1, 3) == str) {
cnt++;
sum += v[j].val;
}
}
if (!cnt) {
printf("NA\n");
} else {
printf("%d %d\n", cnt, sum);
}
continue;
} case 3: {
unordered_map<string, int> tmp;
for (int j = 0; j < N; j++) {
string dd = v[j].s.substr(4, 6);
if (dd == str) {
tmp[v[j].s.substr(1, 3)]++;
}
}
for (auto &m : tmp) {
ans.push_back(Node{m.first, m.second});
}
break;
}
}
int len = ans.size();
if (!len) {
printf("NA\n");
continue;
}
sort(ans.begin(), ans.end());
for (int j = 0; j < len; j++) {
printf("%s %d\n", ans[j].s.c_str(), ans[j].val);
}
}
}
|
0c4915a1f5e3888820622c7059934be25b1722f2
|
ad78d2168925ec23d290d0186a5249ad4c6ea037
|
/src/ENDFtk/section/6/ContinuumEnergyAngle/KalbachMann/test/KalbachMann.test.cpp
|
906d1e78cc1262c00d11475c5459acb977941810
|
[
"BSD-2-Clause"
] |
permissive
|
jkulesza/ENDFtk
|
f363a115f059df02195b9f248f81854935c8dbf4
|
b6618b396f51e802b7ee19ba529533c27e6ac302
|
refs/heads/master
| 2023-03-11T01:36:52.086387
| 2020-10-29T17:36:01
| 2020-10-29T17:36:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,075
|
cpp
|
KalbachMann.test.cpp
|
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "ENDFtk/section/6.hpp"
// other includes
// convenience typedefs
using namespace njoy::ENDFtk;
using KalbachMann =
section::Type< 6 >::ContinuumEnergyAngle::KalbachMann;
std::string chunkNA1();
void verifyChunkNA1( const KalbachMann& );
std::string chunkNA2();
void verifyChunkNA2( const KalbachMann& );
std::string invalidSize();
std::string invalidNA();
SCENARIO( "KalbachMann" ) {
GIVEN( "valid data for a KalbachMann with na=1" ) {
WHEN( "the data is given explicitly" ) {
double energy = 1e-5;
int nd = 0;
int na = 1;
int nep = 2;
std::vector< double > list = { 1., 2., 3., 4., 5., 6. };
std::vector< std::array< double, 3 > > data = {
{{ 1., 2., 3. }},
{{ 4., 5., 6. }} };
THEN( "a KalbachMann can be constructed using a list and members can be "
"tested" ) {
KalbachMann chunk( energy, nd, na, nep, std::move( list ) );
verifyChunkNA1( chunk );
}
THEN( "a KalbachMann can be constructed using arrays and members can be "
"tested" ) {
KalbachMann chunk( energy, nd, nep, std::move( data ) );
verifyChunkNA1( chunk );
} // THEN
} // WHEN
WHEN( "the data is read from a string/stream" ) {
std::string string = chunkNA1();
auto begin = string.begin();
auto end = string.end();
long lineNumber = 1;
THEN( "a KalbachMann can be constructed and members can be tested" ) {
KalbachMann chunk( begin, end, lineNumber, 9228, 6, 5 );
verifyChunkNA1( chunk );
} // THEN
} // WHEN
} // GIVEN
GIVEN( "valid data for a KalbachMann with na=2" ) {
WHEN( "the data is given explicitly" ) {
double energy = 1e-5;
int nd = 0;
int na = 2;
int nep = 2;
std::vector< double > list = { 1., 2., 3., 4., 5., 6., 7., 8. };
std::vector< std::array< double, 4 > > data = {
{{ 1., 2., 3., 4. }},
{{ 5., 6., 7., 8. }} };
THEN( "a KalbachMann can be constructed using a list and members can be "
"tested" ) {
KalbachMann chunk( energy, nd, na, nep, std::move( list ) );
verifyChunkNA2( chunk );
}
THEN( "a KalbachMann can be constructed using arrays and members can be "
"tested" ) {
KalbachMann chunk( energy, nd, nep, std::move( data ) );
verifyChunkNA2( chunk );
} // THEN
} // WHEN
WHEN( "the data is read from a string/stream" ) {
std::string string = chunkNA2();
auto begin = string.begin();
auto end = string.end();
long lineNumber = 1;
THEN( "a KalbachMann can be constructed and members can be tested" ) {
KalbachMann chunk( begin, end, lineNumber, 9228, 6, 5 );
verifyChunkNA2( chunk );
} // THEN
} // WHEN
} // GIVEN
GIVEN( "a valid instance of KalbachMann with na=1" ) {
std::string string = chunkNA1();
auto begin = string.begin();
auto end = string.end();
long lineNumber = 1;
KalbachMann chunk(begin, end, lineNumber, 9228, 6, 5 );
THEN( "it can be printed" ) {
std::string buffer;
auto output = std::back_inserter( buffer );
chunk.print( output, 9228, 6, 5 );
REQUIRE( buffer == string );
} // THEN
} // GIVEN
GIVEN( "a valid instance of KalbachMann with na=2" ) {
std::string string = chunkNA2();
auto begin = string.begin();
auto end = string.end();
long lineNumber = 1;
KalbachMann chunk(begin, end, lineNumber, 9228, 6, 5 );
THEN( "it can be printed" ) {
std::string buffer;
auto output = std::back_inserter( buffer );
chunk.print( output, 9228, 6, 5 );
REQUIRE( buffer == string );
} // THEN
} // GIVEN
GIVEN( "invalid data for a LegendreCoefficients" ) {
WHEN( "data is used with an invalid na" ) {
double energy = 1e-5;
int nd = 0;
int na = 0;
int nep = 2;
std::vector< double > list = { 1., 2., 3., 4., 5., 6. };
THEN( "an exception is thrown" ) {
REQUIRE_THROWS( KalbachMann( energy, nd, na, nep,
std::move( list ) ) );
} // THEN
} // WHEN
WHEN( "data is used with inconsistent sizes" ) {
double energy = 1e-5;
int nd = 0;
int na = 1;
int nep = 2;
std::vector< double > wronglist = { 1., 2., 3., 4., 5. };
std::vector< std::array< double, 3 > > datana1 = {
{{ 1., 2., 3. }} };
std::vector< std::array< double, 4 > > datana2 = {
{{ 1., 2., 3., 4. }} };
THEN( "an exception is thrown" ) {
REQUIRE_THROWS( KalbachMann( energy, nd, na, nep,
std::move( wronglist ) ) );
REQUIRE_THROWS( KalbachMann( energy, nd, nep,
std::move( datana1 ) ) );
REQUIRE_THROWS( KalbachMann( energy, nd, nep,
std::move( datana2 ) ) );
} // THEN
} // WHEN
WHEN( "a string representation is used with invalid na" ) {
std::string string = invalidNA();
auto begin = string.begin();
auto end = string.end();
long lineNumber = 1;
THEN( "an exception is thrown" ) {
REQUIRE_THROWS( KalbachMann( begin, end, lineNumber, 9228, 6, 5 ) );
} // THEN
} // WHEN
WHEN( "a string representation is used with inconsistent NW, NA, NEP" ) {
std::string string = invalidSize();
auto begin = string.begin();
auto end = string.end();
long lineNumber = 1;
THEN( "an exception is thrown" ) {
REQUIRE_THROWS( KalbachMann( begin, end, lineNumber, 9228, 6, 5 ) );
} // THEN
} // WHEN
} // GIVEN
} // SCENARIO
std::string chunkNA1() {
return
" 0.000000+0 1.000000-5 0 1 6 29228 6 5 \n"
" 1.000000+0 2.000000+0 3.000000+0 4.000000+0 5.000000+0 6.000000+09228 6 5 \n";
}
void verifyChunkNA1( const KalbachMann& chunk ) {
REQUIRE( 2 == chunk.LANG() );
REQUIRE( 1e-5 == Approx( chunk.energy() ) );
REQUIRE( 0 == chunk.ND() );
REQUIRE( 0 == chunk.numberDiscreteEnergies() );
REQUIRE( 1 == chunk.NA() );
REQUIRE( 1 == chunk.numberAngularParameters() );
REQUIRE( 6 == chunk.NW() );
REQUIRE( 2 == chunk.NEP() );
REQUIRE( 2 == chunk.numberSecondaryEnergies() );
REQUIRE( 2 == chunk.energies().size() );
REQUIRE( 1. == Approx( chunk.energies()[0] ) );
REQUIRE( 4. == Approx( chunk.energies()[1] ) );
REQUIRE( 2 == chunk.parameters().size() );
REQUIRE( 2. == Approx( chunk.parameters()[0][0] ) );
REQUIRE( 3. == Approx( chunk.parameters()[0][1] ) );
REQUIRE( 5. == Approx( chunk.parameters()[1][0] ) );
REQUIRE( 6. == Approx( chunk.parameters()[1][1] ) );
REQUIRE( 2 == Approx( chunk.totalEmissionProbabilities().size() ) );
REQUIRE( 2. == Approx( chunk.totalEmissionProbabilities()[0] ) );
REQUIRE( 5. == Approx( chunk.totalEmissionProbabilities()[1] ) );
REQUIRE( 2 == chunk.NC() );
}
std::string chunkNA2() {
return
" 0.000000+0 1.000000-5 0 2 8 29228 6 5 \n"
" 1.000000+0 2.000000+0 3.000000+0 4.000000+0 5.000000+0 6.000000+09228 6 5 \n"
" 7.000000+0 8.000000+0 9228 6 5 \n";
}
void verifyChunkNA2( const KalbachMann& chunk ) {
REQUIRE( 2 == chunk.LANG() );
REQUIRE( 1e-5 == Approx( chunk.energy() ) );
REQUIRE( 0 == chunk.ND() );
REQUIRE( 0 == chunk.numberDiscreteEnergies() );
REQUIRE( 2 == chunk.NA() );
REQUIRE( 2 == chunk.numberAngularParameters() );
REQUIRE( 8 == chunk.NW() );
REQUIRE( 2 == chunk.NEP() );
REQUIRE( 2 == chunk.numberSecondaryEnergies() );
REQUIRE( 2 == chunk.energies().size() );
REQUIRE( 1. == Approx( chunk.energies()[0] ) );
REQUIRE( 5. == Approx( chunk.energies()[1] ) );
REQUIRE( 2 == chunk.parameters().size() );
REQUIRE( 2. == Approx( chunk.parameters()[0][0] ) );
REQUIRE( 3. == Approx( chunk.parameters()[0][1] ) );
REQUIRE( 4. == Approx( chunk.parameters()[0][2] ) );
REQUIRE( 6. == Approx( chunk.parameters()[1][0] ) );
REQUIRE( 7. == Approx( chunk.parameters()[1][1] ) );
REQUIRE( 8. == Approx( chunk.parameters()[1][2] ) );
REQUIRE( 2 == Approx( chunk.totalEmissionProbabilities().size() ) );
REQUIRE( 2. == Approx( chunk.totalEmissionProbabilities()[0] ) );
REQUIRE( 6. == Approx( chunk.totalEmissionProbabilities()[1] ) );
REQUIRE( 3 == chunk.NC() );
}
std::string invalidSize() {
return
" 0.000000+0 1.000000-5 0 1 5 29228 6 5 \n"
" 1.000000+0 2.000000+0 3.000000+0 4.000000+0 5.000000+0 9228 6 5 \n";
}
std::string invalidNA() {
return
" 0.000000+0 1.000000-5 0 3 10 29228 6 5 \n"
" 1.000000+0 2.000000+0 3.000000+0 4.000000+0 5.000000+0 6.000000+09228 6 5 \n"
" 7.000000+0 8.000000+0 9.000000+0 1.000000+1 9228 6 5 \n";
}
|
b8f4b5ca1249c26560e19c8d5900589487b0b3e6
|
295761bc19ac68ca9c111c25d8f867dbcca49fa9
|
/include/particles/interface/component/Particle.ipp
|
64e6be5cc3b78c589dbf68d12881f521944d934b
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
warwick-hpsc/CUP-CFD
|
2ad95dd291bb5c8dff6080e6df70f4d2b7ebdaa0
|
b83b5675eb64a3806bee9096267321840a757790
|
refs/heads/master
| 2021-12-21T20:09:18.696865
| 2021-12-19T23:37:03
| 2021-12-19T23:37:03
| 241,870,858
| 3
| 1
|
MIT
| 2021-12-19T23:37:04
| 2020-02-20T11:48:36
|
C++
|
UTF-8
|
C++
| false
| false
| 22,578
|
ipp
|
Particle.ipp
|
/**
* @file
* @author University of Warwick
* @version 1.0
*
* @section LICENSE
*
* @section DESCRIPTION
*
* Description
*
* Contains Header Level Definitions for the Particle Class
*/
#ifndef CUPCFD_PARTICLES_PARTICLE_IPP_H
#define CUPCFD_PARTICLES_PARTICLE_IPP_H
#include <iostream>
#include <unistd.h>
namespace cupcfd
{
namespace particles
{
template <class P, class I, class T>
Particle<P, I, T>::Particle()
:CustomMPIType(),
velocity(T(0.0)),
pos(),
inflightPos(),
travelDt(T(0.0)),
particleID(-1),
rank(-1),
lastRank(-1),
cellGlobalID(-1),
lastCellGlobalID(-1),
lastLastCellGlobalID(-1),
cellEntryFaceLocalID(-1)
{
}
template <class P, class I, class T>
Particle<P, I, T>::Particle(cupcfd::geometry::euclidean::EuclideanVector<T,3> velocity,
cupcfd::geometry::euclidean::EuclideanPoint<T,3> pos,
I id,
I cellGlobalID, I rank, T travelDt)
:CustomMPIType(),
velocity(velocity),
pos(pos),
inflightPos(pos),
travelDt(travelDt),
particleID(id),
rank(rank),
lastRank(-1),
cellGlobalID(cellGlobalID),
lastCellGlobalID(-1),
lastLastCellGlobalID(-1),
cellEntryFaceLocalID(-1)
{
}
template <class P, class I, class T>
Particle<P, I, T>::~Particle()
{
}
template <class P, class I, class T>
inline void Particle<P, I, T>::operator=(Particle& source) {
static_cast<P*>(this)->operator=(source);
}
template <class P, class I, class T>
inline I Particle<P, I, T>::getRank() {
return this->rank;
}
template <class P, class I, class T>
inline void Particle<P, I, T>::setPos(cupcfd::geometry::euclidean::EuclideanPoint<T,3>& pos) {
this->pos = pos;
}
template <class P, class I, class T>
inline cupcfd::geometry::euclidean::EuclideanPoint<T,3> Particle<P, I, T>::getPos() {
return this->pos;
}
template <class P, class I, class T>
inline void Particle<P, I, T>::setInFlightPos(cupcfd::geometry::euclidean::EuclideanPoint<T,3>& inflightPos) {
this->inflightPos = inflightPos;
}
template <class P, class I, class T>
inline cupcfd::geometry::euclidean::EuclideanPoint<T,3> Particle<P, I, T>::getInFlightPos() {
return this->inflightPos;
}
template <class P, class I, class T>
inline void Particle<P, I, T>::setVelocity(cupcfd::geometry::euclidean::EuclideanVector<T,3>& velocity) {
this->velocity = velocity;
}
template <class P, class I, class T>
inline cupcfd::geometry::euclidean::EuclideanVector<T,3> Particle<P, I, T>::getVelocity() {
return this->velocity;
}
template <class P, class I, class T>
inline cupcfd::error::eCodes Particle<P, I, T>::safelySetCellGlobalID(I cellGlobalID, I cellEntryFaceLocalID) {
if (this->cellGlobalID == cellGlobalID) {
std::cout << "ERROR: Attempting to update a particle " << this->particleID << " to be in cell " << cellGlobalID << " but it is already in that cell" << std::endl;
return cupcfd::error::E_ERROR;
}
if ( (cellGlobalID == this->lastLastCellGlobalID) || (cellGlobalID == this->lastCellGlobalID) ) {
std::cout << "ERROR: Attempting to move particle " << this->particleID << " to cell " << cellGlobalID << " but it was there recently (recent history is " << this->lastLastCellGlobalID << " -> " << this->lastCellGlobalID << " -> " << this->cellGlobalID << ")" << std::endl;
return cupcfd::error::E_ERROR;
}
this->lastLastCellGlobalID = this->lastCellGlobalID;
this->lastCellGlobalID = this->cellGlobalID;
this->cellGlobalID = cellGlobalID;
if (cellEntryFaceLocalID == I(-1)) {
std::cout << "ERROR: Particle::safelySetCellGlobalID() called with invalid value of 'cellEntryFaceLocalID'" << std::endl;
return cupcfd::error::E_ERROR;
}
this->cellEntryFaceLocalID = cellEntryFaceLocalID;
return cupcfd::error::E_SUCCESS;
}
template <class P, class I, class T>
inline I Particle<P, I, T>::getCellGlobalID() const {
return this->cellGlobalID;
}
template <class P, class I, class T>
inline I Particle<P, I, T>::getLastCellGlobalID() const {
return this->lastCellGlobalID;
}
template <class P, class I, class T>
inline I Particle<P, I, T>::getCellEntryFaceLocalID() const {
return this->cellEntryFaceLocalID;
}
template <class P, class I, class T>
inline I Particle<P, I, T>::getParticleID() const {
return this->particleID;
}
template <class P, class I, class T>
inline void Particle<P, I, T>::setTravelTime(T dt) {
this->travelDt = dt;
}
template <class P, class I, class T>
inline T Particle<P, I, T>::getTravelTime() const {
return this->travelDt;
}
template <class P, class I, class T>
inline bool Particle<P, I, T>::getInactive() const {
return static_cast<P*>(this)->getInactive();
}
template <class P, class I, class T>
inline bool Particle<P, I, T>::stateValid() const {
if ((this->lastCellGlobalID != I(-1)) && (this->cellEntryFaceLocalID == I(-1))) {
std::cout << "ERROR: particle " << this->particleID << " has history of cell movement but cellEntryFaceLocalID is -1" << std::endl;
return false;
}
return true;
}
template <class P, class I, class T>
inline void Particle<P, I, T>::print() const {
std::cout << " > Particle " << this->particleID << " state:" << std::endl;
if (this->cellEntryFaceLocalID != -1) {
std::cout << " > Cell ID: " << cellGlobalID << " , entered through local face ID " << this->cellEntryFaceLocalID << std::endl;
} else{
std::cout << " > Cell ID: " << cellGlobalID << std::endl;
}
std::cout << " > POS: "; this->pos.print(); std::cout << std::endl;
std::cout << " > In-flight POS: "; this->inflightPos.print(); std::cout << std::endl;
std::cout << " > Velocity: "; this->velocity.print(); std::cout << std::endl;
std::cout << " > Travel time left: " << this->travelDt << std::endl;
std::cout << " > Cell movement history: " << this->lastLastCellGlobalID << " -> " << this->lastCellGlobalID << " -> " << this->cellGlobalID << std::endl;
if (this->lastRank != -1) {
std::cout << " > Rank history: " << this->lastRank << " -> " << this->rank << std::endl;
}
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::calculateFaceIntersection(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh,
I faceID,
bool verbose,
bool& doesIntersect,
cupcfd::geometry::euclidean::EuclideanPoint<T,3>& intersection,
bool& intersectionOnEdge,
T& timeToIntersect) {
// Ensure false by default:
doesIntersect = false;
intersectionOnEdge = false;
timeToIntersect = T(-1);
cupcfd::geometry::euclidean::EuclideanPoint<T,3> v0 = this->inflightPos;
cupcfd::geometry::euclidean::EuclideanVector<T,3> velocity = this->velocity;
// Break the faces up into triangles and compute the intersection with the plane of each triangle and determine the time to reach
// Get the vertices/spatial coordinates for each face
I nFaceVertices = mesh.getFaceNVertices(faceID);
// Counters to ensure that face is being split into non-overlapping triangles:
I num_faces_contacting_particle_on_edge = I(0);
I num_faces_contacting_particle_within_tri = I(0);
I faceVertex0ID = mesh.getFaceVertex(faceID, 0);
for(I j = 1; j < (nFaceVertices-1); j++) {
I faceVertex1ID = mesh.getFaceVertex(faceID, j);
I faceVertex2ID = mesh.getFaceVertex(faceID, j+1);
cupcfd::geometry::euclidean::EuclideanPoint<T,3> faceVertex0 = mesh.getVertexPos(faceVertex0ID);
cupcfd::geometry::euclidean::EuclideanPoint<T,3> faceVertex1 = mesh.getVertexPos(faceVertex1ID);
cupcfd::geometry::euclidean::EuclideanPoint<T,3> faceVertex2 = mesh.getVertexPos(faceVertex2ID);
cupcfd::geometry::euclidean::EuclideanPlane3D<T> plane(faceVertex0, faceVertex1, faceVertex2);
if (j==1) {
// On first triangle, check if velocity is parallel to face:
if (plane.isVectorParallel(this->velocity)) {
return cupcfd::error::E_SUCCESS;
}
}
cupcfd::geometry::shapes::Triangle3D<T> shape(mesh.getVertexPos(faceVertex0ID),
mesh.getVertexPos(faceVertex1ID),
mesh.getVertexPos(faceVertex2ID));
bool doesIntersectTriangle;
bool doesIntersectTriangleOnEdge;
cupcfd::geometry::euclidean::EuclideanPoint<T,3> triIntersection;
T timeToIntersectTriangle;
doesIntersectTriangle = shape.calculateIntersection(v0, velocity, triIntersection, timeToIntersectTriangle, &doesIntersectTriangleOnEdge, verbose);
if (doesIntersectTriangle) {
if (doesIntersect) {
std::cout << "ERROR: calculateFaceIntersection() has detected multiple face intersections for particle " << this->particleID << std::endl;
return cupcfd::error::E_ERROR;
}
if (timeToIntersect == T(0.0)) {
if (doesIntersectTriangleOnEdge) {
num_faces_contacting_particle_on_edge++;
} else {
num_faces_contacting_particle_within_tri++;
}
}
doesIntersect = true;
intersection = triIntersection;
intersectionOnEdge = doesIntersectTriangleOnEdge;
timeToIntersect = timeToIntersectTriangle;
}
}
if (num_faces_contacting_particle_within_tri > 1) {
std::cout << "ERROR: Particle " << this->particleID << " of cell " << this->cellGlobalID << " is directly resting on " << num_faces_contacting_particle_within_tri << " triangles" << std::endl;
std::cout << " Only " << num_faces_contacting_particle_on_edge << " of these have the particle on a triangle edge, indicating that triangles are overlapping" << std::endl;
return cupcfd::error::E_ERROR;
}
return cupcfd::error::E_SUCCESS;
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::updatePositionAtomic(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh, T * dt, I * exitFaceLocalID, bool verbose) {
cupcfd::error::eCodes status;
// Note: We are treating velocity as if it cannot change within one atomic traversal of a cell.
// Velocity can be updated via the updateVelocityAtomic function, but more fine-grained applications of acceleration
// would need a fined-grained mesh.
// ToDo: Error Check - Particle cannot advance if it has reached a rank transition (i.e. the current rank
// does not match the particle rank because it needs to be transferred to that rank)
// Check - if the particle has no remaining travel time, then don't change anything
if(arth::isEqual(this->getTravelTime(), T(0))) {
*exitFaceLocalID = -1;
*dt = T(0);
if (verbose) {
std::cout << " > > > no travel time left" << std::endl;
}
return cupcfd::error::E_SUCCESS;
}
// Get Cell Local ID - ToDo: Could store this inside cell - storage overhead vs graph lookup overhead
I node = mesh.cellConnGraph->globalToNode[this->cellGlobalID];
I localCellID;
status = mesh.cellConnGraph->connGraph.getNodeLocalIndex(node, &localCellID);
CHECK_ECODE(status)
// ****************************************************** //
// Identify which face the exiting vector intersects with //
// ****************************************************** //
I nFaces;
mesh.getCellNFaces(localCellID, &nFaces);
// Store the local ID of the face we are exiting by
I exitFaceID = -1;
// Store the intersection point of that face
cupcfd::geometry::euclidean::EuclideanPoint<T,3> exitIntersection;
T exitTravelTime = T(-1);
T exitDistance= T(-1);
I intersectionCount = 0;
// Calculate maximum distance across cell, to provide an upper bound on
// valid values for distance-to-intersection:
T max_inter_vertex_distance = T(-1);
for(I f1 = 0; f1 < nFaces; f1++) {
I localFaceID1 = mesh.getCellFaceID(localCellID, f1);
I nFaceVertices1 = mesh.getFaceNVertices(localFaceID1);
for(I j1 = 0; j1 < nFaceVertices1; j1++) {
I faceVertexID1 = mesh.getFaceVertex(localFaceID1, j1);
for (I f2 = 0; f2 < nFaces; f2++) {
I localFaceID2 = mesh.getCellFaceID(localCellID, f2);
I nFaceVertices2 = mesh.getFaceNVertices(localFaceID2);
for(I j2 = j1+1; j2 < nFaceVertices2; j2++) {
I faceVertexID2 = mesh.getFaceVertex(localFaceID2, j2);
if (faceVertexID1 != faceVertexID2) {
T face_edge_length =
( mesh.getVertexPos(faceVertexID1) - mesh.getVertexPos(faceVertexID2) ).length();
if (max_inter_vertex_distance == T(-1)) {
max_inter_vertex_distance = face_edge_length;
}
else if (max_inter_vertex_distance < face_edge_length) {
max_inter_vertex_distance = face_edge_length;
}
}
}
}
}
}
// Loop over the faces of the cell
bool face_was_found = false;
I num_faces_contacting_particle_on_edge = I(0);
I num_faces_contacting_particle_within_tri = I(0);
for(I i = 0; i < nFaces; i++) {
// Retrieve the faces of the cell
I localFaceID = mesh.getCellFaceID(localCellID, i);
bool doesIntersect;
cupcfd::geometry::euclidean::EuclideanPoint<T,3> intersection;
bool intersectionOnEdge;
T timeToIntersect = T(-1);
status = calculateFaceIntersection( mesh,
localFaceID,
false,
doesIntersect,
intersection,
intersectionOnEdge,
timeToIntersect);
CHECK_ECODE(status)
if (doesIntersect) {
if (timeToIntersect >= T(0)) {
intersectionCount++;
if (timeToIntersect == T(0.0)) {
if (intersectionOnEdge) {
num_faces_contacting_particle_on_edge++;
} else {
num_faces_contacting_particle_within_tri++;
}
}
if (localFaceID == this->cellEntryFaceLocalID) {
continue;
}
T speed = this->velocity.length();
T distance = timeToIntersect * speed;
exitFaceID = localFaceID;
exitIntersection = intersection;
exitTravelTime = timeToIntersect;
exitDistance = distance;
face_was_found = true;
}
}
}
if (!face_was_found) {
std::cout << "ERROR: Failed to find face of cell " << this->cellGlobalID << " that particle " << this->particleID << " will intersect" << std::endl;
return cupcfd::error::E_ERROR;
}
if (exitTravelTime < T(0)) {
std::cout << "ERROR: Selected exit face " << exitFaceID << " of cell " << this->cellGlobalID << " will be reached by particle " << this->particleID << " in negative time " << exitTravelTime << ", should be positive time" << std::endl;
return cupcfd::error::E_ERROR;
}
if (num_faces_contacting_particle_within_tri > 1) {
std::cout << "ERROR: Particle " << this->particleID << " of cell " << this->cellGlobalID << " is directly resting on " << num_faces_contacting_particle_within_tri << " triangles" << std::endl;
std::cout << " Only " << num_faces_contacting_particle_on_edge << " of these have the particle on a triangle edge, indicating that triangles are overlapping" << std::endl;
return cupcfd::error::E_ERROR;
}
if (exitDistance > max_inter_vertex_distance) {
std::cout << "ERROR: Particle " << this->particleID << " distance to selected face intersection " << exitDistance << " is greater than max inter-vertex distance " << max_inter_vertex_distance << std::endl;
return cupcfd::error::E_ERROR;
}
// Theoretically should either have to leave via one of the faces or stay inside the cell, assuming
// it is a closed polyhedron. Therefore, at this point there should be at least a timeToIntersect,
// and potentially a exitFaceID.
// If there is not, then it is possible an invalid cell ID is set for the particle
// ToDo: Error Check for this?
if(intersectionCount == 0) {
// Error - No Face was found for exiting (assuming there would be travel time to reach it)
// This would suggest the particle is in the wrong cell for its position
std::cout << "ERROR: No exit face found for particle " << this->particleID << std::endl;
return cupcfd::error::E_ERROR;
}
// Verify with the travel time remaining whether it will actually exit the cell
// (a) Does not exit cell
if(exitTravelTime > this->travelDt) {
if (verbose) {
std::cout << " > does not exit cell in this timestep, will travel for " << this->travelDt << std::endl;
}
// Not enough travel time on the particle left to reach face
// Particle does not exit cell
*exitFaceLocalID = -1;
*dt = this->travelDt;
// Update the particle position to within this cell, and set remaining travel time to 0
this->inflightPos = this->inflightPos + (this->velocity * this->travelDt);
this->pos = this->inflightPos;
this->travelDt = 0.0;
return cupcfd::error::E_SUCCESS;
}
else {
if (verbose) {
std::cout << " > exits cell in this timestep through local-face-ID " << exitFaceID << " after " << exitTravelTime << " seconds" << std::endl;
}
// Stops either exactly on or exits via face.
// In either scenario, we move the particle to the face (where it can be assigned to the next cell when its state is updated)
*exitFaceLocalID = exitFaceID;
*dt = exitTravelTime;
// Intersection was set when we set the exitFaceID
this->inflightPos = exitIntersection;
// Can reuse last computed distance/speed/travel time since the prior loop exited on the valid value
this->travelDt = this->travelDt - exitTravelTime;
// Boundary conditions will be handed by other functions
return cupcfd::error::E_SUCCESS;
}
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::updateBoundaryFaceWall(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh, I cellLocalID, I faceLocalID) {
return static_cast<P*>(this)->updateBoundaryFaceWall(mesh, cellLocalID, faceLocalID);
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::updateBoundaryFaceSymp(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh, I cellLocalID, I faceLocalID) {
return static_cast<P*>(this)->updateBoundaryFaceSymp(mesh, cellLocalID, faceLocalID);
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::updateBoundaryFaceInlet(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh, I cellLocalID, I faceLocalID) {
return static_cast<P*>(this)->updateBoundaryFaceInlet(mesh, cellLocalID, faceLocalID);
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::updateBoundaryFaceOutlet(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh, I cellLocalID, I faceLocalID) {
return static_cast<P*>(this)->updateBoundaryFaceOutlet(mesh, cellLocalID, faceLocalID);
}
template <class P, class I, class T>
template <class M, class L>
cupcfd::error::eCodes Particle<P, I, T>::redetectEntryFaceID(cupcfd::geometry::mesh::UnstructuredMeshInterface<M,I,T,L>& mesh) {
cupcfd::error::eCodes status;
bool verbose = false;
if (verbose) {
std::cout << "> Redetecting entry face ID of particle " << this->particleID << " between cells " << this->lastCellGlobalID << " -> " << this->getCellGlobalID() << std::endl;
this->print();
}
I cellGlobalID = this->getCellGlobalID();
I cellNode = mesh.cellConnGraph->globalToNode[cellGlobalID];
I cellLocalID;
status = mesh.cellConnGraph->connGraph.getNodeLocalIndex(cellNode, &cellLocalID);
CHECK_ECODE(status)
I cellNumFaces;
mesh.getCellNFaces(cellLocalID, &cellNumFaces);
I lastCellGlobalID = this->lastCellGlobalID;
I lastCellNode = mesh.cellConnGraph->globalToNode[lastCellGlobalID];
I lastCellLocalID;
status = mesh.cellConnGraph->connGraph.getNodeLocalIndex(lastCellNode, &lastCellLocalID);
CHECK_ECODE(status)
I lastCellNumFaces;
mesh.getCellNFaces(lastCellLocalID, &lastCellNumFaces);
I entryFaceLocalID;
bool entryFaceFound = false;
T entryFaceDistance = T(0);
T speed = this->velocity.length();
for (I fi1=0; fi1<cellNumFaces; fi1++) {
I f1 = mesh.getCellFaceID(cellLocalID, fi1);
for (I fi2=0; fi2<lastCellNumFaces; fi2++) {
I f2 = mesh.getCellFaceID(lastCellLocalID, fi2);
if (f1 == f2) {
if (verbose) {
std::cout << " > Analysing face " << f1 << std::endl;
}
bool doesIntersect;
cupcfd::geometry::euclidean::EuclideanPoint<T,3> intersection;
bool intersectionOnEdge;
T timeToIntersect = T(-1);
status = calculateFaceIntersection( mesh,
f1,
verbose,
doesIntersect,
intersection,
intersectionOnEdge,
timeToIntersect);
CHECK_ECODE(status)
if (doesIntersect) {
if (!entryFaceFound) {
entryFaceFound = true;
entryFaceLocalID = f1;
entryFaceDistance = speed * timeToIntersect;
}
else {
// Select nearest face:
T thisFaceDistance = speed * timeToIntersect;
if (thisFaceDistance < entryFaceDistance) {
entryFaceLocalID = f1;
entryFaceDistance = speed * timeToIntersect;
}
}
}
}
}
}
if (!entryFaceFound) {
std::cout << "ERROR: Redetection of cell entry face of particle " << this->particleID << " failed" << std::endl;
return cupcfd::error::E_ERROR;
}
this->cellEntryFaceLocalID = entryFaceLocalID;
return cupcfd::error::E_SUCCESS;
}
template <class P, class I, class T>
inline cupcfd::error::eCodes Particle<P, I, T>::getMPIType(MPI_Datatype * dType) {
return static_cast<P*>(this)->getMPIType(dType);
}
template <class P, class I, class T>
cupcfd::error::eCodes Particle<P, I, T>::registerMPIType() {
return static_cast<P*>(this)->registerMPIType();
}
template <class P, class I, class T>
cupcfd::error::eCodes Particle<P, I, T>::deregisterMPIType() {
return static_cast<P*>(this)->deregisterMPIType();
}
template <class P, class I, class T>
inline bool Particle<P, I, T>::isRegistered() {
return static_cast<P*>(this)->isRegistered();
}
}
}
#endif
|
bb1208cba6deb97f78269f80aae39755713eb4e0
|
670db5d074f268ed09d5ad5a45062f90ed440f57
|
/complex_parallel_example.cpp
|
4f2534005c29796611b42f3809aa0df380c8172b
|
[] |
no_license
|
kevinm36/hpc_hw4
|
4560b8605f57b00d2766ce86038654a2a3738cd5
|
33d7d646142222d841d53abb27856b1ce2149aba
|
refs/heads/master
| 2020-04-22T16:40:59.397215
| 2019-02-13T13:58:21
| 2019-02-13T13:58:21
| 170,516,822
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,001
|
cpp
|
complex_parallel_example.cpp
|
#include <complex>
#include <vector>
#include <algorithm>
#include <functional>
#include <iostream>
#include <omp.h>
typedef std::vector< std::complex<float> > TCmplxVec;
#pragma omp declare reduction( + : TCmplxVec : \
std::transform(omp_in.begin( ), omp_in.end( ), \
omp_out.begin( ), omp_out.begin( ), \
std::plus< std::complex<float> >( )) ) \
initializer (omp_priv(omp_orig))
int main(int argc, char *argv[]) {
int size;
if (argc < 2)
size = 10;
else
size = atoi(argv[1]);
TCmplxVec result(size,0);
for(int i =0;i<size;i++){
std::cout << i << ": " << result[i] << "\n";
}
#pragma omp parallel reduction( + : result )
{
int tid=omp_get_thread_num();
for (int i=0; i<std::min(tid+1,size); i++)
result[i] += tid;
}
for (int i=0; i<size; i++)
std::cout << i << "\t" << result[i] << std::endl;
return 0;
}
|
79a8f3ec32fdf38efda64550a38883a209180802
|
0c243370727a9e61e2433b51e7c2f4cca46728e1
|
/CS111 + CS211/CS111/hw5_B.cpp
|
5203e5ec96372c6fe9432a3dfc9e5bc00f90ae65
|
[] |
no_license
|
matteoSaputo/Portfolio
|
2b8d771ebc0c5af6b55311bf8295295ec8bf0932
|
51231bd6eeaa4ebcb8391b995bc0a28a7da44873
|
refs/heads/main
| 2023-08-02T16:06:29.221194
| 2021-10-09T17:33:55
| 2021-10-09T17:33:55
| 415,187,577
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 512
|
cpp
|
hw5_B.cpp
|
#include <iostream>
using namespace std;
void printChars(int x, char c){
for (int i = 1; i <= x; i++) cout << c;
}
void printDiamond(int x){
int size = x - 1;
int stars = 1;
while(size >= 0){
printChars(size, ' ');
printChars(stars, '*');
printChars(size, ' ');
size--;
stars+=2;
cout << endl;
}
size++;
stars-=2;
while(size <= x-1){
size++;
stars-=2;
printChars(size, ' ');
printChars(stars, '*');
printChars(size, ' ');
cout << endl;
}
}
int main(){
printDiamond(5);
}
|
5ee80a08c18ba83e79c5317c64097d368ad5e151
|
b81beeefe5b0c26d552b27e0248fc3dca35054fd
|
/src/linear_algebra/test/matrix_arithmetics.cpp
|
b81597b2a4455e0465b49993bc1e35d4fb90f53c
|
[
"GPL-1.0-or-later",
"Apache-2.0",
"GPL-3.0-only"
] |
permissive
|
SLongshaw/MUI
|
a0dbd53c3e5a14dec943f7636734d35ea78b4f3d
|
16b34693305e1d68a573a404638c79ad84fe6364
|
refs/heads/master
| 2023-08-03T23:40:47.652260
| 2023-08-02T13:57:14
| 2023-08-02T13:57:14
| 209,804,174
| 2
| 6
|
Apache-2.0
| 2023-06-06T09:57:25
| 2019-09-20T14:01:51
|
C++
|
UTF-8
|
C++
| false
| false
| 8,455
|
cpp
|
matrix_arithmetics.cpp
|
/*****************************************************************************
* Multiscale Universal Interface Code Coupling Library *
* *
* Copyright (C) 2023 W. Liu *
* *
* This software is jointly licensed under the Apache License, Version 2.0 *
* and the GNU General Public License version 3, you may use it according *
* to either. *
* *
* ** Apache License, version 2.0 ** *
* *
* 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. *
* *
* ** GNU General Public License, version 3 ** *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/**
* @file matrix_arithmetics.cpp
* @author W. Liu
* @date 28 January 2023
* @brief Unit test on Sparse Matrix arithmetic operations.
*/
#include <iostream>
#include <fstream>
#include "../matrix.h"
void test02 () {
std::cout << std::endl;
std::cout << "============================================================" << std::endl;
std::cout << "============= TEST 02: Matrix Arithmetic Operations ========" << std::endl;
std::cout << "============================================================" << std::endl;
std::cout << std::endl;
mui::linalg::sparse_matrix<int,double> A(3, 3, "CSR");
A.set_value(0, 0, 1);
A.set_value(0, 2, 2);
A.set_value(1, 1, 3);
std::cout << "Matrix A: " << std::endl;
A.print();
// Create matrix B
std::vector<double> row0_vector{4,5,0};
std::vector<double> row1_vector{0,6,0};
std::vector<double> row2_vector{0,0,0};
std::vector<std::vector<double>> dense_vector;
dense_vector.push_back(row0_vector);
dense_vector.push_back(row1_vector);
dense_vector.push_back(row2_vector);
mui::linalg::sparse_matrix<int,double> B(dense_vector, "CSR");
std::cout << "Matrix B: " << std::endl;
B.print();
mui::linalg::sparse_matrix<int,double> C(3, 3, "CSR");
C = A + B;
std::cout << "Addition of matrices (A + B): " << std::endl;
C.print();
C.set_zero();
C = A - B;
std::cout << "Subtraction of matrices (A - B): " << std::endl;
C.print();
C.set_zero();
C = A * B;
std::cout << "Multiplication of matrices (A * B): " << std::endl;
C.print();
C.set_zero();
C = 8 * A;
std::cout << "Scalar multiplication (8 * A): " << std::endl;
C.print();
C.set_zero();
C = A * 8;
std::cout << "Scalar multiplication (A * 8): " << std::endl;
C.print();
mui::linalg::sparse_matrix<int,double> D(A.get_rows(), 1, "CSR");
mui::linalg::sparse_matrix<int,double> E(B.get_rows(), 1, "CSR");
double dot_result = 0;
D = A.segment(0,(A.get_rows()-1),1,1);
E = B.segment(0,(B.get_rows()-1),1,1);
dot_result = D.dot_product(E);
std::cout << "The 2nd row of matrix A dot product with the 2nd row of matrix B: " << std::endl;
std::cout << " " << dot_result << std::endl;
C.set_zero();
C = A.hadamard_product(B);
std::cout << "Hadamard product (A {*} B): " << std::endl;
C.print();
C.set_zero();
C = A.transpose();
std::cout << "Transpose of matrix A (A^T): " << std::endl;
C.print();
mui::linalg::sparse_matrix<int,double> F(2, 2, "CSR");
F.set_value(0, 0, -1);
F.set_value(0, 1, 1.5);
F.set_value(1, 0, 1);
F.set_value(1, 1, -1);
std::cout << "Matrix F: " << std::endl;
F.print();
mui::linalg::sparse_matrix<int,double> G = F.inverse();
std::cout << "Inverse of matrix F^(-1) : " << std::endl;
G.print();
mui::linalg::sparse_matrix<int,double> H = F * G;
std::cout << "Proof inverse of matrix by F * F^(-1) (should be an identity matrix): " << std::endl;
H.print();
}
void test03 () {
std::cout << std::endl;
std::cout << "============================================================" << std::endl;
std::cout << "=============== TEST 03: Matrix LU Decomposition ===========" << std::endl;
std::cout << "============================================================" << std::endl;
std::cout << std::endl;
mui::linalg::sparse_matrix<int,double> G(2,2, "CSR");
G.set_value(0, 0, 4);
G.set_value(0, 1, 3);
G.set_value(1, 0, 6);
G.set_value(1, 1, 3);
std::cout << "Matrix G: " << std::endl;
G.print();
mui::linalg::sparse_matrix<int,double> L;
mui::linalg::sparse_matrix<int,double> U;
G.lu_decomposition(L,U);
std::cout << "L matrix of LU decomposition of matrix G: " << std::endl;
L.print();
std::cout << "U matrix of LU decomposition of matrix G: " << std::endl;
U.print();
mui::linalg::sparse_matrix<int,double> H = L * U;
std::cout << "Proof LU decomposition by L * U (should equals to matrix G): " << std::endl;
H.print();
}
void test04 () {
std::cout << std::endl;
std::cout << "============================================================" << std::endl;
std::cout << "=============== TEST 04: Matrix QR Decomposition ===========" << std::endl;
std::cout << "============================================================" << std::endl;
std::cout << std::endl;
mui::linalg::sparse_matrix<int,double> H(3,3, "CSR");
H.set_value(0, 0, 12);
H.set_value(0, 1, -51);
H.set_value(0, 2, 4);
H.set_value(1, 0, 6);
H.set_value(1, 1, 167);
H.set_value(1, 2, -68);
H.set_value(2, 0, -4);
H.set_value(2, 1, 24);
H.set_value(2, 2, -41);
std::cout << "Matrix H: " << std::endl;
H.print();
mui::linalg::sparse_matrix<int,double> Q;
mui::linalg::sparse_matrix<int,double> R;
H.qr_decomposition(Q,R);
std::cout << "Q matrix of QR decomposition of matrix H: " << std::endl;
Q.print();
std::cout << "R matrix of QR decomposition of matrix H: " << std::endl;
R.print();
mui::linalg::sparse_matrix<int,double> I = Q * R;
std::cout << "Proof QR decomposition by Q * R (should equals to matrix H): " << std::endl;
I.print();
}
int main()
{
// Perform test 02
test02();
// Perform test 03
test03();
// Perform test 04
test04();
return 0;
}
|
1cd26ee5cb6789f727ff34e5acaff339b8cbe300
|
935195953d248df7163222934bdcd20e1791d149
|
/ToolKit/Controls/Header/XTPHeaderCtrl.cpp
|
1fab582c12f2ddbcf6894bc6c2d414a67e76d340
|
[
"MIT"
] |
permissive
|
11Zero/DemoBCG
|
0e6c5a233e037040e5f9c270ed8d1bc19b0d482d
|
8f41d5243899cf1c82990ca9863fb1cb9f76491c
|
refs/heads/master
| 2021-01-13T04:13:14.591471
| 2016-12-31T17:05:23
| 2016-12-31T17:05:23
| 77,680,203
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 18,529
|
cpp
|
XTPHeaderCtrl.cpp
|
// XTPHeaderCtrl.cpp : implementation of the CXTPHeaderCtrl class.
//
// This file is a part of the XTREME CONTROLS MFC class library.
// (c)1998-2011 Codejock Software, All Rights Reserved.
//
// THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
// RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
// CONSENT OF CODEJOCK SOFTWARE.
//
// THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
// IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
// YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
// SINGLE COMPUTER.
//
// CONTACT INFORMATION:
// support@codejock.com
// http://www.codejock.com
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Common/XTPResourceManager.h"
#include "Common/XTPWinThemeWrapper.h"
#include "Common/XTPColorManager.h"
#include "Common/XTPDrawHelpers.h"
#include "Common/XTPImageManager.h"
#include "Controls/Util/XTPControlTheme.h"
#include "Common/XTPDrawHelpers.h"
#include "Controls/Defines.h"
#include "Controls/Resource.h"
#include "Controls/Util/XTPGlobal.h"
#include "Controls/Header/XTPHeaderCtrlTheme.h"
#include "Controls/Header/XTPHeaderCtrl.h"
#include "Controls/Util/XTPFunctions.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CXTPHeaderCtrl
CXTPHeaderCtrl::CXTPHeaderCtrl()
: m_iMinSize(0)
, m_nPos(0)
, m_iOverIndex(-1)
, m_nSortedCol(-1)
, m_bRTL(DetermineRTL())
, m_bAutoSize(false)
, m_bEnableMenus(TRUE)
, m_bAscending(TRUE)
, m_bLBtnDown(FALSE)
, m_bPainted(FALSE)
, m_popupMenuID(0)
, m_pt(CPoint(0, 0))
, m_pTheme(NULL)
{
m_pImageManager = NULL;
VERIFY(SetTheme(xtpControlThemeDefault));
}
CXTPHeaderCtrl::~CXTPHeaderCtrl()
{
CMDTARGET_RELEASE(m_pTheme);
CMDTARGET_RELEASE(m_pImageManager);
}
void CXTPHeaderCtrl::SetImageManager(CXTPImageManager* pImageManager)
{
CMDTARGET_RELEASE(m_pImageManager);
m_pImageManager = pImageManager;
}
BEGIN_MESSAGE_MAP(CXTPHeaderCtrl, CHeaderCtrl)
//{{AFX_MSG_MAP(CXTPHeaderCtrl)
ON_WM_WINDOWPOSCHANGING()
ON_WM_SETCURSOR()
ON_WM_PAINT()
ON_MESSAGE(WM_PRINTCLIENT, OnPrintClient)
ON_WM_ERASEBKGND()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
ON_WM_TIMER()
ON_WM_DESTROY()
ON_WM_RBUTTONDOWN()
ON_NOTIFY_REFLECT_EX(HDN_ITEMCHANGING, OnItemchanging)
ON_COMMAND(XTP_IDC_SORTASC, OnSortAsc)
ON_COMMAND(XTP_IDC_SORTDSC, OnSortDsc)
ON_COMMAND(XTP_IDC_ALIGNLEFT, OnAlignLeft)
ON_COMMAND(XTP_IDC_ALIGNCENTER, OnAlignCenter)
ON_COMMAND(XTP_IDC_ALIGNRIGHT, OnAlignRight)
ON_MESSAGE(HDM_LAYOUT, OnLayout)
//}}AFX_MSG_MAP
ON_MESSAGE(WM_XTP_SETCONTROLTHEME, OnSetTheme)
END_MESSAGE_MAP()
IMPLEMENT_DYNAMIC(CXTPHeaderCtrl, CHeaderCtrl)
/////////////////////////////////////////////////////////////////////////////
// CXTPHeaderCtrl message handlers
void CXTPHeaderCtrl::OnThemeChanged()
{
RecalcLayout();
}
BOOL CXTPHeaderCtrl::IsThemeValid() const
{
return (m_pTheme != NULL);
}
void CXTPHeaderCtrl::ApplyFieldWidths(int iNewWidth)
{
CListCtrl* pListCtrl = (CListCtrl*)GetParent();
ASSERT_VALID(pListCtrl);
int iItemCount = GetItemCount();
int iFrozenCount = (int)m_arFrozenCols.GetCount();
int iThawedCount = iItemCount - iFrozenCount;
if (iThawedCount <= 0)
return;
int iWidth = iNewWidth/iThawedCount;
int iItem;
for (iItem = 0; iItem < iItemCount; iItem++)
{
if (IsColFrozen(iItem))
continue;
if (iWidth > m_iMinSize)
pListCtrl->SetColumnWidth(iItem, iWidth);
iNewWidth -= iWidth;
}
}
void CXTPHeaderCtrl::ResizeColumnsToFit()
{
FitFieldWidths(0);
}
void CXTPHeaderCtrl::FitFieldWidths(int iNewWidth)
{
if (iNewWidth <= 0)
{
CXTPWindowRect rc(this);
iNewWidth = rc.Width();
}
// adjust for vertical scroll bar.
DWORD dwStyle = ::GetWindowLong(::GetParent(m_hWnd), GWL_STYLE);
if ((dwStyle & WS_VSCROLL) == WS_VSCROLL)
iNewWidth -= ::GetSystemMetrics(SM_CXVSCROLL);
// adjust for frozen columns.
iNewWidth -= GetFrozenColWidth();
ApplyFieldWidths(iNewWidth);
}
void CXTPHeaderCtrl::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
{
if (m_bAutoSize)
{
int iCount = GetItemCount();
if (iCount > 0)
{
if (GetCapture() != GetParent()) // indicates scrolling
{
// is the window size changing?
CXTPWindowRect rc(this);
if (rc.Width() != lpwndpos->cx)
{
FitFieldWidths(lpwndpos->cx);
}
}
}
}
else
{
CHeaderCtrl::OnWindowPosChanging(lpwndpos);
}
}
void CXTPHeaderCtrl::EnableAutoSize(bool bEnable/*=true*/)
{
m_bAutoSize = bEnable;
}
void CXTPHeaderCtrl::FreezeColumn(int iCol)
{
m_arFrozenCols.AddTail(iCol);
}
void CXTPHeaderCtrl::ThawColumn(int iCol)
{
for (POSITION pos = m_arFrozenCols.GetHeadPosition(); pos; m_arFrozenCols.GetNext(pos))
{
int iNext = m_arFrozenCols.GetAt(pos);
if (iNext == iCol)
{
m_arFrozenCols.RemoveAt(pos);
break;
}
}
}
void CXTPHeaderCtrl::ThawAllColumns()
{
m_arFrozenCols.RemoveAll();
}
BOOL CXTPHeaderCtrl::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (m_arFrozenCols.GetCount())
{
CPoint pt;
::GetCursorPos(&pt);
CPoint ptClient = pt;
ScreenToClient(&ptClient);
HDHITTESTINFO hti;
::ZeroMemory(&hti, sizeof(hti));
hti.pt.x = ptClient.x;
hti.pt.y = ptClient.y;
int nIndex = (int)::SendMessage(GetSafeHwnd(),
HDM_HITTEST, 0L, (LPARAM)&hti);
if (nIndex > -1)
{
// if we are over one of the frozen columns, we can stop
if (IsColFrozen(nIndex))
{
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
return TRUE;
}
else
{
// determine if the current index is adjacent to a frozen column index.
// if columns are resized by dragging to the right, test for the frozen column on the left.
// if columns are resized by dragging to the left, test for the frozen column on the right.
int iAdjIndex = nIndex + (m_bRTL ? 1 : -1);
if ((iAdjIndex > -1) && IsColFrozen(iAdjIndex))
{
CRect r;
Header_GetItemRect(m_hWnd, nIndex, &r);
int nMidPoint = (r.left + (r.Width()/2));
// if columns resize to the right and the point is the right half of the header item...
if (!m_bRTL && (ptClient.x <= nMidPoint))
{
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
return TRUE;
}
// if columns resize to the left and the point is the left half of the header item...
else if (m_bRTL && (ptClient.x >= nMidPoint))
{
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
return TRUE;
}
}
}
}
}
return CHeaderCtrl::OnSetCursor(pWnd, nHitTest, message);
}
BOOL CXTPHeaderCtrl::OnItemchanging(NMHDR* pNMHDR, LRESULT* pResult)
{
HD_NOTIFY* pHDN = (HD_NOTIFY*)pNMHDR;
*pResult = FALSE;
if (pHDN && (pHDN->pitem->mask & HDI_WIDTH) != 0)
{
// if sizing is disabled for this column, keep the user from resizing
if (m_arFrozenCols.GetCount() && IsColFrozen(pHDN->iItem))
*pResult = TRUE;
// if the column is smaller than the minimum size, keep the user from resizing
if (pHDN->pitem->mask & HDI_WIDTH && pHDN->pitem->cxy < m_iMinSize)
*pResult = TRUE;
}
return BOOL(*pResult);
}
bool CXTPHeaderCtrl::IsColFrozen(int iCol)
{
for (POSITION pos = m_arFrozenCols.GetHeadPosition(); pos; m_arFrozenCols.GetNext(pos))
{
int iNext = m_arFrozenCols.GetAt(pos);
if (iNext == iCol)
{
return true;
}
}
return false;
}
bool CXTPHeaderCtrl::DetermineRTL()
{
CWindowDC dc(NULL);
// determine if columns are resized by dragging them right (most languages) or
// left (RTL languages like Arabic & Hebrew).
UINT nAlign = dc.GetTextAlign();
ASSERT(nAlign != GDI_ERROR);
// will only be true for RTL languages, text is laid out right to left and
// columns resize to the left
if ((nAlign != GDI_ERROR) && (nAlign & TA_RTLREADING))
{
return true;
}
return false;
}
int CXTPHeaderCtrl::GetFrozenColWidth()
{
int iFrozenWidth = 0;
for (POSITION pos = m_arFrozenCols.GetHeadPosition(); pos; m_arFrozenCols.GetNext(pos))
{
int iCol = m_arFrozenCols.GetAt(pos);
CRect r;
Header_GetItemRect(m_hWnd, iCol, &r);
iFrozenWidth += r.Width();
}
return iFrozenWidth;
}
void CXTPHeaderCtrl::SetMinSize(int iMinSize)
{
m_iMinSize = iMinSize;
}
void CXTPHeaderCtrl::OnPaint()
{
CPaintDC dc(this);
if (IsThemeValid())
{
CXTPBufferDC memDC(dc);
m_pTheme->DrawHeader(&memDC, this);
}
else
{
CHeaderCtrl::DefWindowProc(WM_PAINT, (WPARAM)dc.m_hDC, 0);
}
}
LRESULT CXTPHeaderCtrl::OnPrintClient(WPARAM wParam, LPARAM /*lParam*/)
{
CDC* pDC = CDC::FromHandle((HDC)wParam);
if (pDC && IsThemeValid())
{
m_pTheme->DrawHeader(pDC, this);
return TRUE;
}
return Default();
}
BOOL CXTPHeaderCtrl::OnEraseBkgnd(CDC* /*pDC*/)
{
return TRUE;
}
void CXTPHeaderCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
m_bLBtnDown = TRUE;
CHeaderCtrl::OnLButtonDown(nFlags, point);
}
void CXTPHeaderCtrl::OnLButtonUp(UINT nFlags, CPoint point)
{
m_bLBtnDown = FALSE;
CHeaderCtrl::OnLButtonUp(nFlags, point);
}
void CXTPHeaderCtrl::OnMouseMove(UINT nFlags, CPoint point)
{
if (IsThemeValid() && m_pTheme->UseWinXPThemes(this))
{
SetTimer(1, 10, NULL);
}
CHeaderCtrl::OnMouseMove(nFlags, point);
}
int CXTPHeaderCtrl::HitTest(CPoint pt, UINT* pFlags/*=NULL*/) const
{
HDHITTESTINFO hti;
hti.pt.x = pt.x;
hti.pt.y = pt.y;
int iItem = (int)::SendMessage(m_hWnd, HDM_HITTEST, 0, (LPARAM)(&hti));
if (pFlags != NULL)
*pFlags = hti.flags;
return iItem;
}
BOOL CXTPHeaderCtrl::ItemPressed(int iItem)
{
if (m_bLBtnDown)
{
CPoint point;
::GetCursorPos(&point);
ScreenToClient(&point);
UINT uFlags;
if (HitTest(point, &uFlags) == iItem)
return ((uFlags & HHT_ONHEADER) == HHT_ONHEADER);
}
return FALSE;
}
void CXTPHeaderCtrl::OnTimer(UINT_PTR nIDEvent)
{
if (nIDEvent == 1)
{
CPoint pt;
::GetCursorPos(&pt);
ScreenToClient(&pt);
int iOverIndex = HitTest(pt);
if (iOverIndex == -1)
{
KillTimer(1);
if (m_bPainted == TRUE)
{
RedrawWindow();
}
m_bPainted = false;
return;
}
if (iOverIndex != m_iOverIndex)
{
m_iOverIndex = iOverIndex;
m_bPainted = false;
}
if (!m_bPainted)
{
RedrawWindow();
m_bPainted = true;
}
}
CHeaderCtrl::OnTimer(nIDEvent);
}
LRESULT CXTPHeaderCtrl::OnLayout(WPARAM wParam, LPARAM lParam)
{
if (IsThemeValid())
{
return (LRESULT)m_pTheme->Layout(
(LPHDLAYOUT)lParam, this);
}
return CHeaderCtrl::DefWindowProc(HDM_LAYOUT, wParam, lParam);
}
int CXTPHeaderCtrl::SetSortImage(int iSortCol, BOOL bSortAsc)
{
ASSERT(iSortCol < GetItemCount());
int nPrevCol = m_nSortedCol;
m_nSortedCol = iSortCol;
m_bAscending = bSortAsc;
RedrawWindow();
return nPrevCol;
}
int CXTPHeaderCtrl::GetSortedCol(BOOL* pbSortAsc/*=NULL*/)
{
if (pbSortAsc)
*pbSortAsc = m_bAscending;
return m_nSortedCol;
}
BOOL CXTPHeaderCtrl::RecalcLayout()
{
if (!::IsWindow(m_hWnd))
return FALSE;
HD_LAYOUT hdl;
CXTPClientRect rcClient(this);
hdl.prc = &rcClient;
WINDOWPOS wp;
ZeroMemory(&wp, sizeof(WINDOWPOS));
hdl.pwpos = ℘
if (!Header_Layout(m_hWnd, &hdl))
return FALSE;
// Set the size, position, and visibility of the header window.
::SetWindowPos(m_hWnd, wp.hwndInsertAfter, wp.x, wp.y,
wp.cx, wp.cy, wp.flags | SWP_FRAMECHANGED);
CWnd* pWndParent = GetParent();
if (!::IsWindow(pWndParent->GetSafeHwnd()))
return FALSE;
// Force list control to recalculate it's layout.
CXTPWindowRect rcWindow(pWndParent);
const int cx = rcWindow.Width();
const int cy = rcWindow.Height();
pWndParent->SetWindowPos(NULL, 0, 0, cx, cy+1,
SWP_NOMOVE | SWP_FRAMECHANGED);
pWndParent->SetWindowPos(NULL, 0, 0, cx, cy,
SWP_NOMOVE | SWP_FRAMECHANGED);
return TRUE;
}
void CXTPHeaderCtrl::OnDestroy()
{
if (IsThemeValid())
m_pTheme->CleanUp(this);
CHeaderCtrl::OnDestroy();
}
void CXTPHeaderCtrl::SetBitmap(int iCol, UINT uBitmapID, DWORD dwRemove/*=NULL*/)
{
if (dwRemove)
{
HD_ITEM hdi;
hdi.mask = HDI_FORMAT;
GetItem(iCol, &hdi);
hdi.fmt &= ~dwRemove;
SetItem(iCol, &hdi);
}
SetBitmap(iCol, uBitmapID, FALSE, RGB(192, 192, 192));
}
void CXTPHeaderCtrl::SetBitmap(int iCol, UINT uBitmapID, BOOL bRemove, COLORREF crMask)
{
if (IsThemeValid())
{
m_pTheme->SetBitmap(iCol, uBitmapID, bRemove, crMask, this);
}
}
void CXTPHeaderCtrl::InitializeHeader(BOOL bBoldFont)
{
SetFont(bBoldFont ? &XTPAuxData().fontBold : &XTPAuxData().font);
RedrawWindow();
}
BOOL CXTPHeaderCtrl::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
if (message == WM_SETTINGCHANGE || message == WM_SYSCOLORCHANGE)
{
RefreshMetrics();
}
return CHeaderCtrl::OnWndMsg(message, wParam, lParam, pResult);
}
void CXTPHeaderCtrl::OnRButtonDown(UINT nFlags, CPoint point)
{
CPoint pt = m_pt = point;
ClientToScreen(&pt);
// If no sort headers are defined for the parent control or popup menus
// has been disabled, call the base class and return.
CWnd* pParentWnd = GetParent();
if (pParentWnd->GetStyle() & LVS_NOSORTHEADER || m_bEnableMenus == FALSE)
{
CHeaderCtrl::OnRButtonDown(nFlags, point);
return;
}
// No menu was defined use default
if (!m_popupMenuID)
{
// Get the index to the header item under the cursor.
int iIndex = HitTest(m_pt);
if (iIndex != -1)
{
CMenu menu;
CXTPResourceManager::AssertValid(XTPResourceManager()->LoadMenu(&menu, XTP_IDM_POPUP));
CMenu* pPopup = menu.GetSubMenu(2);
ASSERT(pPopup != NULL);
if (!pPopup)
return;
if (m_nSortedCol == iIndex && m_bAscending == TRUE)
pPopup->CheckMenuItem(XTP_IDC_SORTASC, MF_CHECKED | MF_BYCOMMAND);
else if (m_nSortedCol == iIndex && m_bAscending == FALSE)
pPopup->CheckMenuItem(XTP_IDC_SORTDSC, MF_CHECKED | MF_BYCOMMAND);
if (pParentWnd && (
pParentWnd->IsKindOf(RUNTIME_CLASS(CListCtrl)) ||
pParentWnd->IsKindOf(RUNTIME_CLASS(CListView))))
{
LVCOLUMN lvc;
lvc.mask = LVCF_FMT;
ListView_GetColumn(pParentWnd->m_hWnd, iIndex, &lvc);
switch (lvc.fmt & LVCFMT_JUSTIFYMASK)
{
case LVCFMT_LEFT:
pPopup->CheckMenuItem(XTP_IDC_ALIGNLEFT, MF_CHECKED | MF_BYCOMMAND);
break;
case LVCFMT_CENTER:
pPopup->CheckMenuItem(XTP_IDC_ALIGNCENTER, MF_CHECKED | MF_BYCOMMAND);
break;
case LVCFMT_RIGHT:
pPopup->CheckMenuItem(XTP_IDC_ALIGNRIGHT, MF_CHECKED | MF_BYCOMMAND);
break;
}
}
XTPContextMenu(pPopup, TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, this, XTP_IDR_TBAR_HDR);
}
}
else
{
CMenu menu;
VERIFY(menu.LoadMenu(m_popupMenuID));
CMenu* pPopup = menu.GetSubMenu(m_nPos);
ASSERT(pPopup != NULL);
if (!pPopup)
return;
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
pt.x, pt.y, GetOwner());
}
}
void CXTPHeaderCtrl::SetMenuID(UINT popupMenuID, int nPos)
{
m_popupMenuID = popupMenuID;
m_nPos = nPos;
}
void CXTPHeaderCtrl::SendNotify(int iIndex)
{
CWnd* pParentWnd = GetParent();
if (!pParentWnd || !::IsWindow(pParentWnd->m_hWnd))
return;
if (pParentWnd->IsKindOf(RUNTIME_CLASS(CListCtrl)) ||
pParentWnd->IsKindOf(RUNTIME_CLASS(CListView)))
{
TCHAR lpBuffer[256];
HDITEM hdi;
hdi.mask = HDI_TEXT | HDI_BITMAP | HDI_FORMAT | HDI_IMAGE | HDI_LPARAM | HDI_ORDER | HDI_WIDTH;
hdi.pszText = lpBuffer;
hdi.cchTextMax = 256;
GetItem(iIndex, &hdi);
NMHEADER nmh;
nmh.hdr.hwndFrom = m_hWnd;
nmh.hdr.idFrom = GetDlgCtrlID();
nmh.hdr.code = HDN_ITEMCLICK;
nmh.iItem = iIndex;
nmh.iButton = 1;
nmh.pitem = &hdi;
// send message to the parent's owner window.
pParentWnd->SendMessage(WM_NOTIFY,
(WPARAM)(int)nmh.hdr.idFrom, (LPARAM)(NMHEADER*)&nmh);
// then forward to the descendants.
pParentWnd->SendMessageToDescendants(WM_NOTIFY,
(WPARAM)(int)nmh.hdr.idFrom, (LPARAM)(NMHEADER*)&nmh);
}
}
void CXTPHeaderCtrl::OnSortAsc()
{
int iIndex = HitTest(m_pt);
if (iIndex != -1)
{
if (m_nSortedCol != iIndex || m_bAscending == FALSE)
{
m_bAscending = TRUE;
m_nSortedCol = iIndex;
SendNotify(iIndex);
}
}
}
void CXTPHeaderCtrl::OnSortDsc()
{
int iIndex = HitTest(m_pt);
if (iIndex != -1)
{
if (m_nSortedCol != iIndex || m_bAscending == TRUE)
{
m_bAscending = FALSE;
m_nSortedCol = iIndex;
SendNotify(iIndex);
}
}
}
BOOL CXTPHeaderCtrl::SetAlingment(int nFlag)
{
int iIndex = HitTest(m_pt);
if (iIndex != -1)
{
CWnd* pParentWnd = GetParent();
if (pParentWnd && (
pParentWnd->IsKindOf(RUNTIME_CLASS(CListCtrl)) ||
pParentWnd->IsKindOf(RUNTIME_CLASS(CListView))))
{
LVCOLUMN lvc;
lvc.mask = LVCF_FMT;
ListView_GetColumn(pParentWnd->m_hWnd, iIndex, &lvc);
lvc.fmt &= ~LVCFMT_JUSTIFYMASK;
lvc.fmt |= nFlag;
ListView_SetColumn(pParentWnd->m_hWnd, iIndex, &lvc);
ListView_SetWorkAreas(pParentWnd->m_hWnd, 0, NULL);
}
}
return FALSE;
}
void CXTPHeaderCtrl::OnAlignLeft()
{
SetAlingment(LVCFMT_LEFT);
}
void CXTPHeaderCtrl::OnAlignCenter()
{
SetAlingment(LVCFMT_CENTER);
}
void CXTPHeaderCtrl::OnAlignRight()
{
SetAlingment(LVCFMT_RIGHT);
}
BOOL CXTPHeaderCtrl::HasSortArrow()
{
if (IsThemeValid())
return m_pTheme->HasSortArrow();
return FALSE;
}
void CXTPHeaderCtrl::ShowSortArrow(BOOL bSortArrow)
{
if (IsThemeValid())
{
DWORD dwStyle = m_pTheme->GetDrawStyle() & ~HDR_XTP_SORTARROW;
if (bSortArrow)
dwStyle |= HDR_XTP_SORTARROW;
m_pTheme->SetDrawStyle(dwStyle, this);
}
}
void CXTPHeaderCtrl::SetFontBold(BOOL bBoldFont)
{
ASSERT(::IsWindow(m_hWnd));
SetFont(bBoldFont ? &XTPAuxData().fontBold : &XTPAuxData().font);
}
void CXTPHeaderCtrl::RefreshMetrics()
{
if (m_pTheme)
m_pTheme->RefreshMetrics(this);
if (::IsWindow(m_hWnd))
RedrawWindow();
}
BOOL CXTPHeaderCtrl::SetTheme(CXTPHeaderCtrlTheme* pTheme)
{
CMDTARGET_RELEASE(m_pTheme);
m_pTheme = pTheme;
RefreshMetrics();
return (m_pTheme != NULL);
}
BOOL CXTPHeaderCtrl::SetTheme(XTPControlTheme eTheme)
{
CMDTARGET_RELEASE(m_pTheme);
switch (eTheme)
{
case xtpControlThemeOfficeXP:
m_pTheme = new CXTPHeaderCtrlThemeOfficeXP;
break;
case xtpControlThemeOffice2003:
m_pTheme = new CXTPHeaderCtrlThemeOffice2003;
break;
case xtpControlThemeDefault:
m_pTheme = new CXTPHeaderCtrlThemeExplorer;
break;
default:
m_pTheme = new CXTPHeaderCtrlTheme;
break;
}
RefreshMetrics();
return (m_pTheme != NULL);
}
LRESULT CXTPHeaderCtrl::OnSetTheme(WPARAM wParam, LPARAM /*lParam*/)
{
XTPControlTheme eTheme = (XTPControlTheme)wParam;
SetTheme(eTheme);
return 0;
}
|
034e5495e7dba00211db408ae5903464d4639bf3
|
2a2927294921211d9f0392d0dd201024d489dd36
|
/ex17/main.cpp
|
ce79270af74071aa4175f984f92e0c45bc284aeb
|
[] |
no_license
|
david-s0/Savitch-Ch6
|
487139020ddf1af8f2c0f0f04a28162375f8fea6
|
31e1f995d3a26c15a4c676f9b3ca464bd515d922
|
refs/heads/master
| 2021-01-10T20:36:32.354988
| 2012-12-28T20:47:06
| 2012-12-28T20:47:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,072
|
cpp
|
main.cpp
|
#include <fstream>
#include <cstring>
#include <iostream>
using namespace std;
int main()
{
ifstream in;
int position;
char inName[30];
char mName[30];
char fName[30];
bool mFound = false, fFound = false;
cout << "What name are you looking for?" << endl;
cin.getline(inName, 20);
in.open("babynames2004.txt");
while (!in.eof())
{
in >> position;
in.get();
in.getline(mName, 20, ' ');
if (!strcmp(mName, inName))
{
cout << mName << " is ranked " << position << " in popularity among boys." << endl;
mFound = true;
}
in.getline(fName, 20, '\n');
int slength = strlen(fName);
fName[slength - 1] = '\0';
if (!strcmp(fName, inName))
{
cout << fName << " is ranked " << position << " in popularity among girls." << endl;
fFound = true;
}
}
if (!mFound)
{
cout << inName << " is not ranked among the top 1000 boy names." << endl;
}
if (!fFound)
{
cout << inName << " is not ranked among the top 1000 girl names." << endl;
}
return 0;
}
|
d0a4f6e78d12ed88f6e80196d7a45db75c92b169
|
dd6147bf9433298a64bbceb7fdccaa4cc477fba6
|
/7383/Laskovenko_Evgeniy/lab3/main.cpp
|
ce4956790157d89efcfb6b1999ce95157a93b2d1
|
[] |
no_license
|
moevm/oop
|
64a89677879341a3e8e91ba6d719ab598dcabb49
|
faffa7e14003b13c658ccf8853d6189b51ee30e6
|
refs/heads/master
| 2023-03-16T15:48:35.226647
| 2020-06-08T16:16:31
| 2020-06-08T16:16:31
| 85,785,460
| 42
| 304
| null | 2023-03-06T23:46:08
| 2017-03-22T04:37:01
|
C++
|
UTF-8
|
C++
| false
| false
| 205
|
cpp
|
main.cpp
|
#include <iostream>
#include "list.h"
#include "vector.h"
using namespace std;
int main()
{
list<int> a;
a.push_back(5);
a.push_front(3);
vector<int> b({1, 2, 3, 4, 5});
return 0;
}
|
de610bc5f90156742d4ad1783c3f4009be29a1e5
|
a17785a827aa7f457099de4b1a74a4c79c11c70c
|
/fixed_xor_test.cc
|
3919ba99f5b105bd5a3ec07d1a3f1be648041bc2
|
[] |
no_license
|
felipeamp/cryptopals_challenge
|
70a15ec6f7babcad440b373b1846f5a4b1d855a0
|
78008452aa290cd961f880855bf0df6c10b5e026
|
refs/heads/master
| 2021-01-19T08:45:07.000323
| 2017-04-16T21:47:31
| 2017-04-16T21:47:31
| 87,667,864
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 661
|
cc
|
fixed_xor_test.cc
|
// Copyright 2017 <felipeamp>
#include <string>
#include "fixed_xor.h"
#include "gtest/gtest.h"
namespace {
constexpr char kString1Before[] = "1c0111001f010100061a024b53535009181c";
constexpr char kString2Before[] = "686974207468652062756c6c277320657965";
constexpr char kStringAfter[] = "746865206b696420646f6e277420706c6179";
TEST(FixedXorTest, XorsCorrectly) {
ASSERT_STREQ(kStringAfter,
fixedxor::FixedXor(std::string(kString1Before),
std::string(kString2Before)).c_str());
}
} // namespace
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
|
b4f30b98be61e0fc44e16f2886969c01dfcdba14
|
36183993b144b873d4d53e7b0f0dfebedcb77730
|
/GameDevelopment/Game Programming Gems 4/02 Mathematics/02 Celes/alg/vector.h
|
3f5771a4dd4a649de36bff47397007c51478075d
|
[] |
no_license
|
alecnunn/bookresources
|
b95bf62dda3eb9b0ba0fb4e56025c5c7b6d605c0
|
4562f6430af5afffde790c42d0f3a33176d8003b
|
refs/heads/master
| 2020-04-12T22:28:54.275703
| 2018-12-22T09:00:31
| 2018-12-22T09:00:31
| 162,790,540
| 20
| 14
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,261
|
h
|
vector.h
|
// vector.h
// Represents triples.
// celes@tecgraf.puc-rio.br
// Jul 2003
/* This code is free software; you can redistribute it and/or modify it.
** The software provided hereunder is on an "as is" basis, and
** the author has no obligation to provide maintenance, support, updates,
** enhancements, or modifications.
*/
#ifndef ALG_VECTOR_H
#define ALG_VECTOR_H
#include <math.h>
#include <stdio.h>
#define ALG_TOL 1.0e-7
class AlgVector
{
public:
float x, y, z;
AlgVector ()
{
}
AlgVector (float vx, float vy, float vz)
: x(vx), y(vy), z(vz)
{
}
~AlgVector ()
{
}
void Set (float vx, float vy, float vz)
{
x = vx; y = vy; z = vz;
}
float Dot (const AlgVector& q) const
{
return x*q.x + y*q.y + z*q.z;
}
float Length () const
{
return (float)sqrt(x*x+y*y+z*z);
}
void Normalize ()
{
float l = Length();
if (fabs(l) > ALG_TOL) {
float d = 1.0f/l;
x *= d; y *= d; z *= d;
}
}
void Print (const char* label) const
{
printf("%s = {%g, %g, %g}\n",label,x,y,z);
}
friend AlgVector Cross (const AlgVector& a, const AlgVector& b)
{
AlgVector v;
v.x = a.y*b.z - a.z*b.y;
v.y = a.z*b.x - a.x*b.z;
v.z = a.x*b.y - a.y*b.x;
return v;
}
};
#endif
|
5e8884d256c39a62aa1891032cd772dfe9ef3dad
|
089e2b8ffc5f0cc77d8a3b07695961135b212ae0
|
/src/owlVulkan/core/swapchain_support.cpp
|
83419144e4cf6290da951c7f23389d9091c4f072
|
[
"MIT"
] |
permissive
|
auperes/owl_engine
|
5ae70a1adf759aa19263e90017374874f439987f
|
6da8b48b1caf6cf9f224f1a1d5df59461e83ce9a
|
refs/heads/main
| 2023-02-11T01:16:59.099006
| 2020-12-17T23:27:32
| 2020-12-17T23:27:32
| 315,045,642
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 63
|
cpp
|
swapchain_support.cpp
|
#include "swapchain_support.h"
namespace owl::vulkan::core
{
}
|
080c9da86e087e38a23bc4021eee16c6f6c3e09a
|
0f0df7351c29d0ec9178afb44225c84d6e28ccd6
|
/Color.cpp
|
6c9dbfab771bf42e21e584abd3cca0b45b86106c
|
[] |
no_license
|
gbook/miview
|
070cde96c1dfbc55ea6ff8f3a87bf7004c4862e2
|
eea025e8e24fdd5e40986ee42eb8ea00e860b79a
|
refs/heads/master
| 2021-01-10T11:16:50.802257
| 2015-07-16T19:44:45
| 2015-07-16T19:44:45
| 36,947,429
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,149
|
cpp
|
Color.cpp
|
/* ----------------------------------------------------------------------------
Color.cpp
MIView - Medical Image Viewer
Copyright (C) 2009-2011 Gregory Book
MIView is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------- */
#include "Color.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Color::Color()
{
r = g = b = gray = 0.0;
isNormalized = false;
}
Color::Color(double red, double green, double blue, double g) {
r = red;
g = green;
b = blue;
gray = g;
}
Color::~Color()
{
}
// --------------------------------------------------------
// ---------- SetRGB --------------------------------------
// --------------------------------------------------------
void Color::SetRGB(double red, double green, double blue)
{
r = red;
g = green;
b = blue;
}
// --------------------------------------------------------
// ---------- SetGray -------------------------------------
// --------------------------------------------------------
void Color::SetGray(double g)
{
gray = g;
}
// --------------------------------------------------------
// ---------- Red -----------------------------------------
// --------------------------------------------------------
double Color::Red()
{
return r;
}
// --------------------------------------------------------
// ---------- Green ---------------------------------------
// --------------------------------------------------------
double Color::Green()
{
return g;
}
// --------------------------------------------------------
// ---------- Blue ----------------------------------------
// --------------------------------------------------------
double Color::Blue()
{
return b;
}
// --------------------------------------------------------
// ---------- Gray ----------------------------------------
// --------------------------------------------------------
double Color::Gray()
{
return gray;
}
// --------------------------------------------------------
// ---------- SetNormalized -------------------------------
// --------------------------------------------------------
void Color::SetNormalized(bool isNorm)
{
isNormalized = isNorm;
}
// --------------------------------------------------------
// ---------- IsNormalized --------------------------------
// --------------------------------------------------------
bool Color::IsNormalized()
{
return isNormalized;
}
|
21b6354e65ef2371650b35e7af98509395dd2994
|
2e7b706532399d077f9aa0d1de9597ddc8865993
|
/code/gmock/src/sampling.h
|
117571dfa368480ad035b85d39500a668f47b94e
|
[] |
no_license
|
jwgcarlson/OPSEC
|
19b8eaf29d4274acbbd6db9c22213944432b474e
|
024372119309d52ba7fe30091da6b3dbf801115b
|
refs/heads/master
| 2016-09-09T19:11:55.271789
| 2012-09-01T11:01:10
| 2012-09-01T11:01:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,052
|
h
|
sampling.h
|
#ifndef SAMPLING_H
#define SAMPLING_h
#include <vector>
#include "grid.h"
#include "particle.h"
#include "Spline.h"
/* Sample x \in [0,1] from the linear 1-D distribution
* f(x) = a0*(1-x) + a1*x */
double sample1d(double a0, double a1);
/* Sample (x,y,z) \in [0,1]^3 from a 3-D distribution f(x,y,z) that is
* tri-linear in (x,y,z), with the values at the corners given by a_{ijk} */
void sample3d(double a000, double a001, double a010, double a011,
double a100, double a101, double a110, double a111,
double& x, double& y, double& z);
/* Generate random Fourier modes $\delta_{\vec{k}}$ according to the given
* P(k), then Fourier transform to obtain the real space fields. The velocity
* field (vx,vy,vz) is given in Fourier space by
* \vec{v}_{\vec{k}} = (i\vec{k}/k^2) f \delta_{\vec{k}}
* The density and velocity fields are smoothed on the scale R. */
void generate_fields(int N, double L, double f, Spline P, double R, Grid& delta, Grid& vx, Grid& vy, Grid& vz);
#if 0
/* Inverse CIC: return the value of the field at the point (x,y,z) \in [0,1]^3 */
double icic(double a000, double a001, double a010, double a011,
double a100, double a101, double a110, double a111,
double x, double y, double z);
/* Sample particles.
* x = x0 + (ix+fx)*dL
* y = y0 + (iy+fy)*dL
* z = z0 + (iz+fz)*dL
* Return the number of particles added. */
int sample_particles(Grid& rho, /* number density field */
Grid& vx, Grid& vy, Grid& vz, /* velocity field */
double dL, /* side length of one grid cell */
int ixbegin, int ixend, int nx,
int iybegin, int iyend, int ny,
int izbegin, int izend, int nz,
double x0, double y0, double z0, /* offset for particles */
std::vector<Particle>& particles /* array of particles to add to */
);
#endif
#endif // SAMPLING_H
|
86dc3f0170d7a349d4e46684afd9d7daab4d35d9
|
a2bbe15f4de9835098289a68918ffa77bad5af18
|
/addingBooksToLibrary/solution.cpp
|
0c1fbafa3f81a673263de5ebe8d6d0582e1ae7df
|
[] |
no_license
|
rebornkumar/CodingProblem
|
fcf44dce178dd28bdbf937877876d4803a3fa4ee
|
cd7a1a7667b77238644b48e535c2bb9228f59cc9
|
refs/heads/master
| 2020-12-05T00:34:33.556719
| 2020-01-05T17:45:29
| 2020-01-05T17:45:29
| 231,952,438
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 999
|
cpp
|
solution.cpp
|
#include<bits/stdc++.h>
using namespace std;
string nextName(string str) {
int M = str.size();
int carry = 1;
for(int i = M-1; i>=0; i--) {
int val = (int)(str[i] - 'a') + carry;
int rem = val%27;
carry /= 27;
str[i] = (char)(val + 'a');
}
if(carry != 0) {
str = "a"+str;
}
return str;
}
int main() {
//code
int N;
cin>>N;
vector<string>books(N,"");
unordered_set<string>hash;
for(int i=0;i<N;i++) {
cin>>books[i];
if(books[i] != "?") {
hash.insert(books[i]);
}
}
string curr = "a";
for(int i =0;i<N;i++) {
if(books[i] == "?") {
while(hash.find(curr) != hash.end()) {
curr = nextName(curr);
}
books[i] = curr;
curr = nextName(curr);
}
}
for(int i =0; i<N;i++) {
cout<<books[i]<<endl;
}
//code
return 0;
}
|
1b805edc00604db5e0b1a59141b50ae6ef54cb9a
|
a621633460ba31b87f923fcaea3643a0d1637750
|
/projects/C++/cli/others/m_sterg.cpp
|
fe7a3eea865624983b15eabe79731ea5ed0265c1
|
[] |
no_license
|
BogdanFi/cmiN
|
edeb8316fcfd23c8525066265bac510f7361ebed
|
b3938f025f837df5213c8602e5854a46f2d624d3
|
refs/heads/master
| 2020-04-28T09:01:26.127160
| 2018-07-03T16:12:08
| 2018-07-03T16:12:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,411
|
cpp
|
m_sterg.cpp
|
// stergere linie/coloana matrice
#include <iostream>
using namespace std;
int main()
{
int l, c, i, j, m[100][100], ans, ld = 0, cd = 0;
do {
cout << "Numarul de linii (1-100): ";
cin >> l;
} while (l < 1 || l > 100);
do {
cout << "Numarul de coloane (1-100): ";
cin >> c;
} while (c < 1 || c > 100);
cout << "Completati matricea...\n";
for (i = 0; i < l; i++) {
for (j = 0; j < c; j++) {
cin >> m[i][j];
}
cout << "\n";
}
cout << "Doriti a elimina vreo linie (1/0)? ";
cin >> ans;
if (ans) {
do {
cout << "Linia (0-" << l - 1 << "): ";
cin >> i;
} while (i < 0 || i >= l);
for (; i < l - 1; i++) {
for (j = 0; j < c; j++) {
m[i][j] = m[i + 1][j];
}
}
ld = 1;
}
cout << "Doriti a elimina vreo coloana (1/0)? ";
cin >> ans;
if (ans) {
do {
cout << "Coloana (0-" << c - 1 << "): ";
cin >> j;
} while (j < 0 || j >= c);
for (; j < c - 1; j++) {
for (i = 0; i < l; i++) {
m[i][j] = m[i][j + 1];
}
}
cd = 1;
}
for (i = 0; i < l - ld; i++) {
for (j = 0; j < c - cd; j++) {
cout << m[i][j] << " ";
}
cout << "\n";
}
return 0;
}
|
0dc15e54299dd1b270c682e6b48f9bfa0493ef13
|
7466d6ec10a4c0e7844cdc0d8ada82b66c9d8898
|
/renderers/PathTracingRenderer.cpp
|
a90c830600bf1b4e112701a315f2f4d3d849f420
|
[] |
no_license
|
LittleCVR/MaoPPM
|
380897afcd30a09229504d3dc91d922f551bced8
|
56d8d813b96f7954021ad58ce8cd21eaca29c05d
|
refs/heads/master
| 2020-05-20T10:08:42.350721
| 2011-09-07T16:29:42
| 2011-09-07T16:29:42
| 1,853,546
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,281
|
cpp
|
PathTracingRenderer.cpp
|
/*
* =============================================================================
*
* Filename: PathTracingRenderer.cpp
*
* Description:
*
* Version: 1.0
* Created: 2011-06-08 19:09:58
*
* Author: Chun-Wei Huang (LittleCVR),
* Company: Communication & Multimedia Laboratory,
* Department of Computer Science & Information Engineering,
* National Taiwan University
*
* =============================================================================
*/
#include "PathTracingRenderer.h"
/*----------------------------------------------------------------------------
* header files from std C/C++
*----------------------------------------------------------------------------*/
#include <algorithm>
#include <cstdio>
#include <ctime>
#include <iostream>
#include <limits>
/*----------------------------------------------------------------------------
* header files of our own
*----------------------------------------------------------------------------*/
#include "payload.h"
#include "Scene.h"
/*----------------------------------------------------------------------------
* using namespaces
*----------------------------------------------------------------------------*/
using namespace std;
using namespace optix;
using namespace MaoPPM;
PathTracingRenderer::PathTracingRenderer(Scene * scene) : Renderer(scene),
m_maxRayDepth(DEFAULT_MAX_RAY_DEPTH)
{
/* EMPTY */
} /* ----- end of method PathTracingRenderer::PathTracingRenderer ----- */
PathTracingRenderer::~PathTracingRenderer()
{
/* EMPTY */
} /* ----- end of method PathTracingRenderer::~PathTracingRenderer ----- */
void PathTracingRenderer::init()
{
Renderer::preInit();
debug("sizeof(SamplePoint) = \033[01;31m%4d\033[00m.\n", sizeof(SamplePoint));
// buffers
m_samplePointList = context()->createBuffer(RT_BUFFER_INPUT_OUTPUT, RT_FORMAT_USER);
m_samplePointList->setElementSize(sizeof(SamplePoint));
m_samplePointList->setSize(width() * height() * m_maxRayDepth);
context()["samplePointList"]->set(m_samplePointList);
m_pathCountList = context()->createBuffer(RT_BUFFER_INPUT_OUTPUT, RT_FORMAT_UNSIGNED_INT);
m_pathCountList->setSize(width() * height() * m_maxRayDepth);
context()["pathCountList"]->set(m_pathCountList);
m_radianceList = context()->createBuffer(RT_BUFFER_INPUT_OUTPUT, RT_FORMAT_FLOAT3);
m_radianceList->setSize(width() * height() * m_maxRayDepth);
context()["radianceList"]->set(m_radianceList);
context()["maxRayDepth"]->setUint(m_maxRayDepth);
context()->setEntryPointCount(N_PASSES);
setExceptionProgram(CleaningPass);
setExceptionProgram(TracingPass);
setExceptionProgram(SummingPass);
setRayGenerationProgram(CleaningPass, "PathTracingRenderer.cu", "clear");
setRayGenerationProgram(TracingPass, "PathTracingRenderer.cu", "trace");
setRayGenerationProgram(SummingPass, "PathTracingRenderer.cu", "sum");
setMissProgram(NormalRay, "ray.cu", "handleNormalRayMiss");
Renderer::postInit();
} /* ----- end of method PathTracingRenderer::init ----- */
void PathTracingRenderer::render(const Scene::RayGenCameraData & cameraData)
{
if (scene()->isCameraChanged()) {
scene()->setIsCameraChanged(false);
m_frame = 0;
}
uint nSamplesPerThread = 0;
uint2 launchSize = make_uint2(0, 0);
context()["frameCount"]->setUint(m_frame);
// Launch path tracing pass.
setLocalHeapPointer(0);
launchSize = make_uint2(width(), height());
context()["launchSize"]->setUint(launchSize.x, launchSize.y);
nSamplesPerThread = 1 + 3 * m_maxRayDepth;
generateSamples(nSamplesPerThread * launchSize.x * launchSize.y);
context()["nSamplesPerThread"]->setUint(nSamplesPerThread);
context()->launch(CleaningPass, width(), height());
context()->launch(TracingPass, width(), height());
context()->launch(SummingPass, width(), height());
// Add frame count.
m_frame++;
} /* ----- end of method PathTracingRenderer::render ----- */
void PathTracingRenderer::resize(unsigned int width, unsigned int height)
{
Renderer::resize(width, height);
m_samplePointList->setSize(width * height * m_maxRayDepth);
debug("\033[01;33msamplePointList\033[00m resized to: \033[01;31m%10u\033[00m.\n",
sizeof(SamplePoint) * m_maxRayDepth * width * height);
m_pathCountList->setSize(width * height * m_maxRayDepth);
debug("\033[01;33mpathCountList\033[00m resized to: \033[01;31m%10u\033[00m.\n",
sizeof(unsigned int) * m_maxRayDepth * width * height);
m_demandLocalHeapSize = width * height *
m_maxRayDepth * sizeof(Intersection);
setLocalHeapSize(m_demandLocalHeapSize);
} /* ----- end of method PathTracingRenderer::resize ----- */
void PathTracingRenderer::parseArguments(vector<char *> argumentList)
{
int argc = argumentList.size();
for (vector<char *>::iterator it = argumentList.begin();
it != argumentList.end(); ++it)
{
std::string arg(*it);
if (arg == "--max-ray-depth") {
if (++it != argumentList.end()) {
m_maxRayDepth = atoi(*it);
cerr << "Set max ray depth to " << m_maxRayDepth << endl;
} else {
std::cerr << "Missing argument to " << arg << std::endl;
exit(EXIT_FAILURE);
}
}
// otherwise
else {
std::cerr << "Unknown option: '" << arg << std::endl;
exit(EXIT_FAILURE);
}
}
} /* ----- end of function PathTracingRenderer::parseArguments ----- */
void PathTracingRenderer::printUsageAndExit(bool doExit)
{
std::cerr
<< "BDPT options:" << std::endl
<< " | --max-ray-depth <int> Set IGPPM to use N importons per thread." << std::endl
<< std::endl;
if (doExit)
exit(EXIT_FAILURE);
} /* ----- end of function PathTracingRenderer::printUsageAndExit ----- */
|
767b64b0f648d086559fe5781cceb3b4ba66e71a
|
8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a
|
/3rdParty/boost/1.78.0/libs/serialization/src/utf8_codecvt_facet.cpp
|
f6550d07dee7d3fc6d991f0aa7324dd8fc80382d
|
[
"BSL-1.0",
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode-public-domain",
"JSON",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSD-4-Clause",
"Python-2.0",
"LGPL-2.1-or-later"
] |
permissive
|
arangodb/arangodb
|
0980625e76c56a2449d90dcb8d8f2c485e28a83b
|
43c40535cee37fc7349a21793dc33b1833735af5
|
refs/heads/devel
| 2023-08-31T09:34:47.451950
| 2023-08-31T07:25:02
| 2023-08-31T07:25:02
| 2,649,214
| 13,385
| 982
|
Apache-2.0
| 2023-09-14T17:02:16
| 2011-10-26T06:42:00
|
C++
|
UTF-8
|
C++
| false
| false
| 752
|
cpp
|
utf8_codecvt_facet.cpp
|
// Copyright Vladimir Prus 2004.
// 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)
#include <boost/config.hpp>
#ifdef BOOST_NO_STD_WSTREAMBUF
#error "wide char i/o not supported on this platform"
#endif
// include boost implementation of utf8 codecvt facet
# define BOOST_ARCHIVE_SOURCE
#include <boost/archive/detail/decl.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace archive { namespace detail {
#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL
#define BOOST_UTF8_END_NAMESPACE }}}
#include <boost/detail/utf8_codecvt_facet.ipp>
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL
#undef BOOST_UTF8_BEGIN_NAMESPACE
|
6e858b703ee94dee490029d629b8315e5afe4741
|
cc0c4336d5706eaad6450f5e96f39c2346ef0c3d
|
/x10.runtime/src-cpp/x10/lang/X10Class.cc
|
efa20cced200ffbe8a00f7c2e3d384cdf66ef919
|
[] |
no_license
|
scalegraph/sx10
|
cd637b391b0d60f3fd4a90d9837c5186ad0638bc
|
e4ec20a957b427b0458acdd62d387c36d0824ee4
|
refs/heads/master
| 2021-01-10T20:06:55.557744
| 2014-02-12T05:55:53
| 2014-02-12T05:55:53
| 11,485,181
| 1
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,215
|
cc
|
X10Class.cc
|
/*
* This file is part of the X10 project (http://x10-lang.org).
*
* This file is licensed to You under the Eclipse Public License (EPL);
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.opensource.org/licenses/eclipse-1.0.php
*
* (C) Copyright IBM Corporation 2006-2010.
*/
#include <x10/lang/X10Class.h>
#include <x10/lang/String.h>
using namespace x10::lang;
using namespace x10aux;
x10::lang::String* x10::lang::X10Class::typeName() {
return x10::lang::String::Lit(_type()->name());
}
void x10::lang::X10Class::dealloc_object(X10Class *obj) {
_M_("Attempting to dealloc object "<<(void*)obj);
obj->_destructor();
x10aux::dealloc(obj);
}
x10aux::RuntimeType x10::lang::X10Class::rtt;
void x10::lang::X10Class::_initRTT() {
if (rtt.initStageOne(&rtt)) return;
const x10aux::RuntimeType* parents[1] = { x10aux::getRTT<x10::lang::Any>()};
rtt.initStageTwo("x10.lang.X10Class", RuntimeType::class_kind, 1, parents, 0, NULL, NULL);
}
itable_entry x10::lang::X10Class::empty_itable[1] = { itable_entry(NULL, (void*)x10::lang::X10Class::getRTT()) };
// vim:tabstop=4:shiftwidth=4:expandtab
|
38d7f4a031c4ce8e58d34788713b0e70b09e0783
|
4e0035957c61860b0e343bbf46e47e95722fa932
|
/include/Bluffer.h
|
10d15c46000a23658f795492f033d74e25c50ce1
|
[] |
no_license
|
yomayy/exam_krok
|
843728dcb6e50e407a6445d69a07dfc6eb06427e
|
d0f329dba75b5b496f0844e20b0a739a00f17eb6
|
refs/heads/master
| 2020-03-28T18:29:46.432405
| 2018-09-15T09:00:38
| 2018-09-15T09:00:38
| 148,886,102
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 458
|
h
|
Bluffer.h
|
#ifndef BLUFFER_H
#define BLUFFER_H
#include <Pers.h>
#include <CentralBluf.h>
class Bluffer : public Pers
{
public:
void explode();
void damage(int bomb);
static Bluffer* Instance(int hp, CentralBluf *cb);
static bool DeleteInstance();
protected:
private:
Bluffer(int hp, CentralBluf *cb);
virtual ~Bluffer();
static Bluffer* _self;
CentralBluf *cb;
};
#endif // BLUFFER_H
|
23ffbf11216aca43ec1ddbef5fce8739abcab317
|
6069ffb81b6364807ca995494a613c88ca40a9dd
|
/fork.cpp
|
b92a2e3e5b8e177163d42d0eff55b8bba72756e9
|
[] |
no_license
|
GarrettJMU/cppshell
|
fa8f0225626c957e26998704a7c87f5e83577bc1
|
c54e963017875267b0ea5af99faa86d84af1c330
|
refs/heads/master
| 2020-06-09T06:03:45.195101
| 2019-06-24T23:35:00
| 2019-06-24T23:35:00
| 193,386,900
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,114
|
cpp
|
fork.cpp
|
//Name: Garrett Hughes
//Class username: cssc0849
//Class information: CS 570, Summer 2019
//Assignment information: Assignment 2
//Filename: fork.cpp
#include "header.hpp"
#ifndef FORK_CPP
#define FORK_CPP
void handleFork(char *command, char *arguments[], int numberOfArgsIncludingCommand) {
if (numberOfArgsIncludingCommand > 2) {
printf("Error: You entered too many arguments. Only use one argument. Exiting now.\n");
endProcess = -1;
} else {
pid_t childID = fork();
if (childID < 0) {
//Check if there is any sort of error then break loop in main and exit
printf("Error after attempting to fork(). Exiting now.\n");
endProcess = 1;
} else if (childID == 0) {
//Child process
execvp(command, arguments);
//Print error if error.present?
perror(command);
endProcess = 1;
} else {
if (waitpid(childID, 0, 0) < 0) {
printf("Error when waiting for child.\n");
endProcess = 1;
}
}
}
}
#endif
|
82f8d161134495e86751c8eb873d3440ca1f9144
|
04c0f4652bebe27bc7c931c2199d54462c175e8c
|
/ToDoList/TDCStartupOptions.cpp
|
3f33379a5e2988caf9a1135e6381d57ddf1310bf
|
[] |
no_license
|
layerfsd/ToDoList_Dev
|
bdd5b892e988281b99b6167d6c64b6fe8466a8b8
|
d9bb3c8999ee72bf85a92cc29f0d6aa14d3f3b35
|
refs/heads/master
| 2021-09-07T13:16:05.508224
| 2018-02-23T10:31:21
| 2018-02-23T10:31:32
| 125,009,385
| 2
| 2
| null | 2018-03-13T07:22:51
| 2018-03-13T07:22:51
| null |
UTF-8
|
C++
| false
| false
| 18,424
|
cpp
|
TDCStartupOptions.cpp
|
#include "stdafx.h"
#include "TDCStartupOptions.h"
#include "tdcenum.h"
#include "tdcswitch.h"
#include "tdcmapping.h"
#include "..\Shared\EnCommandLineInfo.h"
#include "..\Shared\misc.h"
#include "..\Shared\datehelper.h"
#include "..\Shared\timehelper.h"
/////////////////////////////////////////////////////////////////////////////////////////////
TDCSTARTUPATTRIB::TDCSTARTUPATTRIB() : bSet(FALSE)
{
szValue[0] = 0;
}
TDCSTARTUPATTRIB& TDCSTARTUPATTRIB::operator=(const TDCSTARTUPATTRIB& other)
{
bSet = other.bSet;
lstrcpyn(szValue, other.szValue, ATTRIBLEN);
return *this;
}
BOOL TDCSTARTUPATTRIB::operator==(const TDCSTARTUPATTRIB& other) const
{
return ((!bSet && !other.bSet) || (bSet && other.bSet && (_tcscmp(szValue, other.szValue) == 0)));
}
BOOL TDCSTARTUPATTRIB::operator==(const CString& sValue) const
{
return (bSet && (sValue == szValue));
}
BOOL TDCSTARTUPATTRIB::IsEmpty() const
{
return (!bSet || !lstrlen(szValue));
}
void TDCSTARTUPATTRIB::SetValue(const CString& sValue)
{
bSet = TRUE;
lstrcpyn(szValue, sValue, ATTRIBLEN);
}
BOOL TDCSTARTUPATTRIB::GetValue(CString& sValue) const
{
if (bSet)
{
sValue = szValue;
return TRUE;
}
return FALSE;
}
BOOL TDCSTARTUPATTRIB::GetValue(int& nValue, BOOL& bOffset) const
{
if (bSet && Misc::IsNumber(szValue))
{
nValue = _ttoi(szValue);
bOffset = IsOffset(szValue);
return TRUE;
}
return FALSE;
}
BOOL TDCSTARTUPATTRIB::GetValue(double& dValue, BOOL& bOffset) const
{
if (bSet && Misc::IsNumber(szValue))
{
dValue = _ttof(szValue);
bOffset = IsOffset(szValue);
return TRUE;
}
return FALSE;
}
int TDCSTARTUPATTRIB::GetValues(CStringArray& aItems, BOOL& bAppend) const
{
aItems.RemoveAll();
if (!bSet)
return -1;
bAppend = FALSE;
CString sValue(GetValue());
if (!sValue.IsEmpty())
{
if (sValue[0] == '+')
{
bAppend = TRUE;
sValue = sValue.Mid(1);
}
return Misc::Split(sValue, aItems, '|');
}
return 0;
}
void TDCSTARTUPATTRIB::ClearValue()
{
bSet = FALSE;
::ZeroMemory(szValue, (sizeof(szValue) / sizeof(szValue[0])));
}
BOOL TDCSTARTUPATTRIB::IsOffset(LPCTSTR szValue)
{
return (szValue && ((szValue[0] == '+') || (szValue[0] == '-')));
}
BOOL TDCSTARTUPATTRIB::GetTime(double& dValue, TDC_UNITS& nUnits, BOOL& bOffset) const
{
if (!bSet)
return FALSE;
TH_UNITS nTHUnits = THU_NULL;
if (IsOffset(szValue) && CTimeHelper::DecodeOffset(szValue, dValue, nTHUnits, TRUE))
{
bOffset = TRUE;
}
else if (CTimeHelper::DecodeOffset(szValue, dValue, nTHUnits, FALSE)) // Decode as plain number
{
bOffset = FALSE;
}
else if (Misc::IsEmpty(szValue))
{
dValue = 0;
nTHUnits = THU_HOURS;
bOffset = FALSE;
}
else
{
bOffset = -1; // error
return FALSE;
}
nUnits = TDC::MapTHUnitsToUnits(nTHUnits);
return TRUE;
}
BOOL TDCSTARTUPATTRIB::GetDate(double& dValue, TDC_UNITS& nUnits, BOOL& bOffset) const
{
if (!bSet)
return FALSE;
DH_UNITS nDHUnits = DHU_NULL;
if (IsOffset(szValue) && CDateHelper::DecodeOffset(szValue, dValue, nDHUnits, TRUE))
{
bOffset = TRUE;
}
else if (CDateHelper::DecodeOffset(szValue, dValue, nDHUnits, FALSE)) // Decode as plain number
{
bOffset = FALSE;
}
else if (Misc::IsEmpty(szValue))
{
dValue = 0;
nDHUnits = DHU_DAYS;
bOffset = FALSE;
}
else
{
bOffset = -1; // error
return FALSE;
}
nUnits = TDC::MapDHUnitsToUnits(nDHUnits);
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////////////////////
class CTDCNullDate : public COleDateTime
{
public:
CTDCNullDate()
{
CDateHelper::ClearDate(*this);
}
};
static const CTDCNullDate NULLDATE;
/////////////////////////////////////////////////////////////////////////////////////////////
CTDCStartupOptions::CTDCStartupOptions()
{
Reset();
}
CTDCStartupOptions::CTDCStartupOptions(const CTDCStartupOptions& startup)
{
*this = startup;
}
CTDCStartupOptions::CTDCStartupOptions(const CEnCommandLineInfo& cmdInfo)
{
Reset();
// insert default path at front
lstrcpyn(m_szFilePaths, cmdInfo.m_strFileName, FILEPATHSLEN);
// then multiple others
if (cmdInfo.HasOption(SWITCH_TASKFILE))
{
if (!cmdInfo.m_strFileName.IsEmpty())
lstrcat(m_szFilePaths, _T("|")); // add delimiter
int nLen = lstrlen(m_szFilePaths);
ExtractAttribute(cmdInfo, SWITCH_TASKFILE, m_szFilePaths + nLen, FILEPATHSLEN - nLen);
}
CString sValue;
COleDateTime date;
// new task
if (ExtractAttribute(cmdInfo, SWITCH_NEWTASK, m_sNewTask))
{
m_dwFlags |= TLD_NEWTASK;
// user can specify parentID else 0
if (cmdInfo.GetOption(SWITCH_PARENTID, sValue))
{
m_dwParentID = _ttoi(sValue);
}
else if (cmdInfo.GetOption(SWITCH_SIBLINGID, sValue))
{
m_dwSiblingID = _ttoi(sValue);
}
// creation date for new tasks only
ParseDate(cmdInfo, SWITCH_TASKCREATEDATE, m_dtCreateDate);
// We don't support date offsets
if (m_dtCreateDate.IsOffset())
{
m_dtCreateDate.ClearValue();
}
else
{
// time overrides
TDCSTARTUPATTRIB time;
ParseDate(cmdInfo, SWITCH_TASKCREATETIME, time);
double dTime = 0.0;
BOOL bOffset = FALSE;
// We don't support time offsets either
if (time.GetValue(dTime, bOffset) && !bOffset)
{
double dDateTime = 0.0;
if (m_dtCreateDate.GetValue(dDateTime, bOffset))
dDateTime = CDateHelper::GetDateOnly(dDateTime).m_dt;
else
dDateTime = CDateHelper::GetDate(DHD_TODAY);
m_dtCreateDate.SetValue(Misc::Format(dDateTime + dTime));
}
}
}
// select task
else if (cmdInfo.GetOption(SWITCH_SELECTTASKID, sValue))
{
m_dwIDSel = _ttoi(sValue);
}
// or merge/import
else if (ExtractAttribute(cmdInfo, SWITCH_IMPORT, m_szFilePaths, FILEPATHSLEN))
{
m_dwFlags |= TLD_IMPORTFILE;
}
else if (cmdInfo.GetOption(SWITCH_COMMANDID, sValue))
{
m_sCmdIDs.SetValue(sValue);
}
// other task attribs
ExtractAttribute(cmdInfo, SWITCH_TASKEXTID, m_sExternalID);
ExtractAttribute(cmdInfo, SWITCH_TASKCATEGORY, m_sCategory);
ExtractAttribute(cmdInfo, SWITCH_TASKSTATUS, m_sStatus);
ExtractAttribute(cmdInfo, SWITCH_TASKALLOCBY, m_sAllocBy);
ExtractAttribute(cmdInfo, SWITCH_TASKALLOCTO, m_sAllocTo);
ExtractAttribute(cmdInfo, SWITCH_TASKVERSION, m_sVersion);
ExtractAttribute(cmdInfo, SWITCH_TASKTAGS, m_sTags);
ExtractAttribute(cmdInfo, SWITCH_TASKDEPENDENCY, m_sDepends);
ExtractAttribute(cmdInfo, SWITCH_TASKFILEREF, m_sFileRef);
ExtractAttribute(cmdInfo, SWITCH_TASKPRIORITY, m_nPriority);
ExtractAttribute(cmdInfo, SWITCH_TASKRISK, m_nRisk);
// % completion
if (cmdInfo.GetOption(SWITCH_TASKPERCENT, sValue))
m_nPercentDone.SetValue(sValue);
// dates
ParseDate(cmdInfo, SWITCH_TASKSTARTDATE, m_dtStartDate);
ParseTime(cmdInfo, SWITCH_TASKSTARTTIME, m_dStartTime);
ParseDate(cmdInfo, SWITCH_TASKDUEDATE, m_dtDueDate);
ParseTime(cmdInfo, SWITCH_TASKDUETIME, m_dDueTime);
ParseDate(cmdInfo, SWITCH_TASKDONEDATE, m_dtDoneDate);
ParseTime(cmdInfo, SWITCH_TASKDONETIME, m_dDoneTime);
// times and cost
if (cmdInfo.GetOption(SWITCH_TASKCOST, sValue))
m_dCost.SetValue(sValue);
if (cmdInfo.GetOption(SWITCH_TASKTIMEEST, sValue))
m_dTimeEst.SetValue(sValue);
if (cmdInfo.GetOption(SWITCH_TASKTIMESPENT, sValue))
m_dTimeSpent.SetValue(sValue);
// comments replace [\][n] with [\n]
if (cmdInfo.GetOption(SWITCH_TASKCOMMENTS, sValue))
{
sValue.Replace(_T("\\n"), _T("\n"));
m_sComments.SetValue(sValue);
}
// Custom attribute
CStringArray aValues;
if (cmdInfo.GetOptions(SWITCH_TASKCUSTOMATTRIB, aValues) && (aValues.GetSize() == 2))
m_sCustomAttrib.SetValue(Misc::FormatArray(aValues, '|'));
// Copying task attributes
if (cmdInfo.GetOptions(SWITCH_TASKCOPYATTRIB, aValues) && (aValues.GetSize() == 2))
{
m_sCopyFrom.SetValue(aValues[0]);
m_sCopyTo.SetValue(aValues[1]);
}
// App-level flags
if (cmdInfo.HasOption(SWITCH_FORCEVISIBLE))
m_dwFlags |= TLD_FORCEVISIBLE;
if (cmdInfo.HasOption(SWITCH_NOPWORDPROMPT))
m_dwFlags &= ~TLD_PASSWORDPROMPTING;
if (cmdInfo.HasOption(SWITCH_LOGGING))
{
m_dwFlags |= TLD_LOGGING;
if (cmdInfo.GetOption(SWITCH_LOGGING) != _T("x"))
m_dwFlags |= TLD_LOG_MODULES;
}
if (cmdInfo.HasOption(SWITCH_STARTEMPTY))
m_dwFlags |= TLD_STARTEMPTY;
if (cmdInfo.HasOption(SWITCH_UPGRADED))
m_dwFlags |= TLD_UPGRADED;
if (cmdInfo.HasOption(SWITCH_SAVEUIVISINTASKLIST))
m_dwFlags |= TLD_SAVEUIVISINTASKLIST;
if (cmdInfo.GetOption(SWITCH_SAVEINTERMEDIATE, sValue))
{
m_dwFlags |= TLD_SAVEINTERMEDIATE;
sValue.MakeUpper();
m_bSaveIntermediateAll = (sValue == _T("ALL"));
}
if (cmdInfo.HasOption(SWITCH_TASKLINK))
{
if (!HasFilePath())
{
CString sLink(cmdInfo.GetOption(SWITCH_TASKLINK));
lstrcpyn(m_szFilePaths, sLink, FILEPATHSLEN);
}
m_dwFlags |= TLD_TASKLINK;
}
}
BOOL CTDCStartupOptions::GetSaveIntermediateAll() const
{
return (HasFlag(TLD_SAVEINTERMEDIATE) ? m_bSaveIntermediateAll : FALSE);
}
CTDCStartupOptions& CTDCStartupOptions::operator=(const CTDCStartupOptions& startup)
{
lstrcpy(m_szFilePaths, startup.m_szFilePaths);
m_sCmdIDs = startup.m_sCmdIDs;
m_sNewTask = startup.m_sNewTask;
m_sComments = startup.m_sComments;
m_sExternalID = startup.m_sExternalID;
m_sVersion = startup.m_sVersion;
m_sAllocTo = startup.m_sAllocTo;
m_sAllocBy = startup.m_sAllocBy;
m_sCategory = startup.m_sCategory;
m_sTags = startup.m_sTags;
m_sStatus = startup.m_sStatus;
m_sDepends = startup.m_sDepends;
m_sFileRef = startup.m_sFileRef;
m_sCustomAttrib = startup.m_sCustomAttrib;
m_dtCreateDate = startup.m_dtCreateDate;
m_dtStartDate = startup.m_dtStartDate;
m_dtDueDate = startup.m_dtDueDate;
m_dtDoneDate = startup.m_dtDoneDate;
m_dStartTime = startup.m_dStartTime;
m_dDueTime = startup.m_dDueTime;
m_dDoneTime = startup.m_dDoneTime;
m_nPriority = startup.m_nPriority;
m_nRisk = startup.m_nRisk;
m_dCost = startup.m_dCost;
m_dTimeEst = startup.m_dTimeEst;
m_dTimeSpent = startup.m_dTimeSpent;
m_nPercentDone = startup.m_nPercentDone;
m_dwIDSel = startup.m_dwIDSel;
m_dwParentID = startup.m_dwParentID;
m_dwSiblingID = startup.m_dwSiblingID;
m_dwFlags = startup.m_dwFlags;
m_bSaveIntermediateAll = startup.m_bSaveIntermediateAll;
m_sCopyFrom = startup.m_sCopyFrom;
m_sCopyTo = startup.m_sCopyTo;
return *this;
}
BOOL CTDCStartupOptions::operator==(const CTDCStartupOptions& startup) const
{
return
(
(_tcscmp(m_szFilePaths, startup.m_szFilePaths) == 0) &&
(m_sNewTask == startup.m_sNewTask) &&
(m_sComments == startup.m_sComments) &&
(m_sExternalID == startup.m_sExternalID) &&
(m_sVersion == startup.m_sVersion) &&
(m_sAllocTo == startup.m_sAllocTo) &&
(m_sAllocBy == startup.m_sAllocBy) &&
(m_sCategory == startup.m_sCategory) &&
(m_sTags == startup.m_sTags) &&
(m_sStatus == startup.m_sStatus) &&
(m_sDepends == startup.m_sDepends) &&
(m_sFileRef == startup.m_sFileRef) &&
(m_sCustomAttrib == startup.m_sCustomAttrib) &&
(m_dtCreateDate == startup.m_dtCreateDate) &&
(m_dtStartDate == startup.m_dtStartDate) &&
(m_dtDueDate == startup.m_dtDueDate) &&
(m_dtDoneDate == startup.m_dtDoneDate) &&
(m_dStartTime == startup.m_dStartTime) &&
(m_dDueTime == startup.m_dDueTime) &&
(m_dDoneTime == startup.m_dDoneTime) &&
(m_nPriority == startup.m_nPriority) &&
(m_nRisk == startup.m_nRisk) &&
(m_dCost == startup.m_dCost) &&
(m_dTimeEst == startup.m_dTimeEst) &&
(m_dTimeSpent == startup.m_dTimeSpent) &&
(m_nPercentDone == startup.m_nPercentDone) &&
(m_dwIDSel == startup.m_dwIDSel) &&
(m_dwParentID == startup.m_dwParentID) &&
(m_dwSiblingID == startup.m_dwSiblingID) &&
(m_dwFlags == startup.m_dwFlags) &&
(m_bSaveIntermediateAll == startup.m_bSaveIntermediateAll) &&
(m_sCmdIDs == startup.m_sCmdIDs) &&
(m_sCopyFrom == startup.m_sCopyFrom) &&
(m_sCopyTo == startup.m_sCopyTo)
);
}
BOOL CTDCStartupOptions::IsEmpty(BOOL bIgnoreFlags) const
{
CTDCStartupOptions empty;
if (bIgnoreFlags)
empty.m_dwFlags = m_dwFlags;
return (*this == empty);
}
BOOL CTDCStartupOptions::HasFlag(DWORD dwFlag) const
{
return Misc::HasFlag(m_dwFlags, dwFlag);
}
BOOL CTDCStartupOptions::ModifyFlags(DWORD dwRemove, DWORD dwAdd)
{
return Misc::ModifyFlags(m_dwFlags, dwRemove, dwAdd);
}
int CTDCStartupOptions::GetFilePaths(CStringArray& aFiles) const
{
return Misc::Split(m_szFilePaths, aFiles, '|');
}
BOOL CTDCStartupOptions::ExtractAttribute(const CEnCommandLineInfo& cmdInfo, LPCTSTR szSwitch, LPTSTR szAttrib, int nLenAttrib)
{
CStringArray aSrc;
if (cmdInfo.GetOptions(szSwitch, aSrc))
{
lstrcpyn(szAttrib, Misc::FormatArray(aSrc, '|'), nLenAttrib);
return TRUE;
}
return FALSE;
}
BOOL CTDCStartupOptions::ExtractAttribute(const CEnCommandLineInfo& cmdInfo, LPCTSTR szSwitch, TDCSTARTUPATTRIB& attrib)
{
CStringArray aSrc;
if (cmdInfo.GetOptions(szSwitch, aSrc))
{
attrib.SetValue(Misc::FormatArray(aSrc, '|'));
return TRUE;
}
return FALSE;
}
void CTDCStartupOptions::ParseDate(const CEnCommandLineInfo& cmdInfo,
LPCTSTR szSwitch, TDCSTARTUPATTRIB& dtDate)
{
CString sValue;
if (cmdInfo.GetOption(szSwitch, sValue))
{
if (TDCSTARTUPATTRIB::IsOffset(sValue))
{
dtDate.SetValue(sValue);
}
else if (sValue.IsEmpty())
{
// Clear date
dtDate.SetValue(sValue);
}
else // actual date
{
COleDateTime date;
if (CDateHelper::DecodeRelativeDate(sValue, date, FALSE) ||
CDateHelper::DecodeDate(sValue, date, TRUE))
{
dtDate.SetValue(Misc::Format(date.m_dt));
}
}
}
}
void CTDCStartupOptions::ParseTime(const CEnCommandLineInfo& cmdInfo,
LPCTSTR szSwitch, TDCSTARTUPATTRIB& dTime)
{
CString sValue;
if (cmdInfo.GetOption(szSwitch, sValue))
{
if (TDCSTARTUPATTRIB::IsOffset(sValue))
{
dTime.SetValue(sValue); // in hours
}
else if (sValue.IsEmpty())
{
// Clear time
dTime.SetValue(sValue);
}
else // actual time
{
COleDateTime dtTime;
if (dtTime.ParseDateTime(sValue, VAR_TIMEVALUEONLY))
dTime.SetValue(Misc::Format(dtTime.m_dt));
}
}
}
void CTDCStartupOptions::Reset()
{
m_szFilePaths[0] = 0;
m_sNewTask.ClearValue();
m_sComments.ClearValue();
m_sExternalID.ClearValue();
m_sVersion.ClearValue();
m_sAllocTo.ClearValue();
m_sAllocBy.ClearValue();
m_sCategory.ClearValue();
m_sStatus.ClearValue();
m_sTags.ClearValue();
m_sFileRef.ClearValue();
m_sDepends.ClearValue();
m_sCustomAttrib.ClearValue();
m_sCmdIDs.ClearValue();
m_dtCreateDate.ClearValue();
m_dtStartDate.ClearValue();
m_dtDueDate.ClearValue();
m_dtDoneDate.ClearValue();
m_dStartTime.ClearValue();
m_dDueTime.ClearValue();
m_dDoneTime.ClearValue();
m_dTimeEst.ClearValue();
m_dTimeSpent.ClearValue();
m_dCost.ClearValue();
m_nPercentDone.ClearValue();
m_nPriority.ClearValue();
m_nRisk.ClearValue();
m_dwIDSel = 0;
m_dwParentID = 0;
m_dwSiblingID = 0;
m_dwFlags = TLD_PASSWORDPROMPTING;
m_bSaveIntermediateAll = FALSE;
m_sCopyFrom.ClearValue();
m_sCopyTo.ClearValue();
}
BOOL CTDCStartupOptions::GetCreationDate(COleDateTime& dtValue) const
{
BOOL bOffset = FALSE;
double dValue = 0.0;
TDC_UNITS nUnits = TDCU_NULL;
if (m_dtCreateDate.GetDate(dValue, nUnits, bOffset) && !bOffset)
{
dtValue = COleDateTime(dValue);
return TRUE;
}
// else
return FALSE;
}
BOOL CTDCStartupOptions::GetPriority(int& nValue, BOOL& bOffset) const
{
// handle 'n' for none
if (m_nPriority == _T("n"))
{
nValue = -2;
bOffset = FALSE;
return TRUE;
}
// else
return m_nPriority.GetValue(nValue, bOffset);
}
BOOL CTDCStartupOptions::GetRisk(int& nValue, BOOL& bOffset) const
{
// handle 'n' for none
if (m_nRisk == _T("n"))
{
nValue = -2;
bOffset = FALSE;
return TRUE;
}
return m_nRisk.GetValue(nValue, bOffset);
}
BOOL CTDCStartupOptions::GetCustomAttribute(CString& sCustomID, CString& sValue) const
{
if (!m_sCustomAttrib.IsEmpty())
{
CStringArray aValues;
if (Misc::Split(m_sCustomAttrib.GetValue(), aValues, '|') == 2)
{
sCustomID = aValues[0];
sValue = aValues[1];
return !(sCustomID.IsEmpty() || sValue.IsEmpty());
}
}
sCustomID.Empty();
sValue.Empty();
return FALSE;
}
int CTDCStartupOptions::GetCommandIDs(CUIntArray& aCmdIDs) const
{
CStringArray aCommands;
int nNumCmds = Misc::Split(m_sCmdIDs.GetValue(), aCommands, '|');
aCmdIDs.RemoveAll();
for (int nCmd = 0; nCmd < nNumCmds; nCmd++)
{
UINT nCmdID = _ttoi(aCommands[nCmd]);
if (nCmdID != 0)
aCmdIDs.Add(nCmdID);
}
return aCmdIDs.GetSize();
}
BOOL CTDCStartupOptions::GetCopyAttribute(TDC_ATTRIBUTE& nFromAttrib, TDC_ATTRIBUTE& nToAttrib) const
{
TDC_ATTRIBUTE nFrom = TDC::MapCommandLineSwitchToAttribute(m_sCopyFrom.GetValue());
if (nFrom == TDCA_NONE)
return FALSE;
TDC_ATTRIBUTE nTo = TDC::MapCommandLineSwitchToAttribute(m_sCopyTo.GetValue());
if (nTo == TDCA_NONE)
return FALSE;
// else
nFromAttrib = nFrom;
nToAttrib = nTo;
return TRUE;
}
BOOL CTDCStartupOptions::GetCopyAttribute(TDC_ATTRIBUTE& nFromAttrib, CString& sToCustomAttrib) const
{
TDC_ATTRIBUTE nFrom = TDC::MapCommandLineSwitchToAttribute(m_sCopyFrom.GetValue());
if (nFrom == TDCA_NONE)
return FALSE;
TDC_ATTRIBUTE nTo = TDC::MapCommandLineSwitchToAttribute(m_sCopyTo.GetValue());
if (nTo != TDCA_NONE)
return FALSE;
// else
nFromAttrib = nFrom;
sToCustomAttrib = m_sCopyTo.GetValue();
return TRUE;
}
BOOL CTDCStartupOptions::GetCopyAttribute(CString& sFromCustomAttrib, TDC_ATTRIBUTE& nToAttrib) const
{
TDC_ATTRIBUTE nFrom = TDC::MapCommandLineSwitchToAttribute(m_sCopyFrom.GetValue());
if (nFrom != TDCA_NONE)
return FALSE;
TDC_ATTRIBUTE nTo = TDC::MapCommandLineSwitchToAttribute(m_sCopyTo.GetValue());
if (nTo == TDCA_NONE)
return FALSE;
// else
sFromCustomAttrib = m_sCopyFrom.GetValue();
nToAttrib = nTo;
return TRUE;
}
BOOL CTDCStartupOptions::GetCopyAttribute(CString& sFromCustomAttrib, CString& sToCustomAttrib) const
{
if (m_sCopyFrom.IsEmpty() || m_sCopyTo.IsEmpty())
return FALSE;
TDC_ATTRIBUTE nFrom = TDC::MapCommandLineSwitchToAttribute(m_sCopyFrom.GetValue());
if (nFrom != TDCA_NONE)
return FALSE;
TDC_ATTRIBUTE nTo = TDC::MapCommandLineSwitchToAttribute(m_sCopyTo.GetValue());
if (nTo != TDCA_NONE)
return FALSE;
// else
sFromCustomAttrib = m_sCopyFrom.GetValue();
sToCustomAttrib = m_sCopyTo.GetValue();
return TRUE;
}
|
179733071ba5fd5471c367505dd897133c1c1c8a
|
862bc22c2491fca70087572890e7d994c0ebb45b
|
/trees/tree_from_pre_in_order_btree.cpp
|
870d20823ef7cb12912298565d2b2fe2561ce400
|
[] |
no_license
|
abhi2694/Data-Structures-Codes
|
58879bc28415d29df241bcbb4c42562c58879ba2
|
5cf17db4c489cf9feb82ae97d351e453a0912b04
|
refs/heads/master
| 2022-11-19T23:51:11.625306
| 2020-07-21T20:33:05
| 2020-07-21T20:33:05
| 263,261,126
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,077
|
cpp
|
tree_from_pre_in_order_btree.cpp
|
// Following is the Binary Tree node structure
/**************
class BinaryTreeNode {
public :
T data;
BinaryTreeNode<T> *left;
BinaryTreeNode<T> *right;
BinaryTreeNode(T data) {
this -> data = data;
left = NULL;
right = NULL;
}
};
***************/
BinaryTreeNode<int>* buildtree(int *preorder, int *inorder,int pres,int pree,int ins,int ine)
{
if (pres>pree||ins>ine) return NULL;
int value=preorder[pres];
int k=0;
for (int i=ins;i<=ine;i++)
{
if (value==inorder[i]) {k=i;break;}
}
BinaryTreeNode<int>* root= new BinaryTreeNode<int>(value);
root->left= buildtree(preorder,inorder,pres+1, pres+(k-ins), ins,k-1);
root->right= buildtree(preorder,inorder, pres+(k-ins)+1,pree,k+1,ine);
return root;
}
BinaryTreeNode<int>* buildTree(int *preorder, int preLenght, int *inorder, int inLength) {
// Write your code here
int pres=0;
int pree=preLenght-1;
int ins=0;
int ine=inLength-1;
return buildtree(preorder,inorder,pres,pree,ins,ine);
}
|
62ccb9309f18c385d4eec8a2224806d7df610b4f
|
0bae86219e690b4690633c309509eee379793abb
|
/1060.cpp
|
a2428316a2d19c3623bd61abb0624ef4f675ddb5
|
[] |
no_license
|
toffanetto/URI_toffanetto
|
959cb3074e4f3ac7f2745177f05af26d29d525c5
|
1d741f971ffb2395f74f041e7905fc70248963e5
|
refs/heads/master
| 2022-12-06T01:08:40.947325
| 2020-08-30T18:48:02
| 2020-08-30T18:48:02
| 291,491,068
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 251
|
cpp
|
1060.cpp
|
#include <iostream>
using namespace std;
int main(){
int c=0,qp=0;
float a;
while (c<6)
{
cin >> a;
if (a>0)
qp=qp+1;
c=c+1;
}
cout << qp <<" valores positivos" << endl;
return 0;
}
|
a753ce49cb5993350d26349e644dfe5b7826128d
|
f819d6e972a5cf26ad0d13b2be482a353d3cfeb9
|
/Doc/Sinkhold_DocPJ/Sinkhold_Doc/Service_ScanEnemyCharacter.h
|
4b580742bac6e861c24690cb3049562de6e36e09
|
[] |
no_license
|
Sandwich33/Sinkhole4_9
|
b317dc2ca75879597197c4db1c2983ac7c677e48
|
72d0cb90ea6b8ba39966fd23e9b31b1ef8d65be1
|
refs/heads/master
| 2021-01-21T15:26:23.278122
| 2016-08-11T09:17:25
| 2016-08-11T09:17:25
| 53,466,519
| 0
| 0
| null | null | null | null |
UHC
|
C++
| false
| false
| 748
|
h
|
Service_ScanEnemyCharacter.h
|
#pragma once
/**
@brief 팀원 AI 서비스
@details 매 틱마다 공격 대상을 찾는다. 발견하면 대상을 블랙보드의 targetToAttack에 set한다.
*/
class Service_ScanEnemyCharacter :
public BTService
{
public:
BlackboardKeySelector targetToAttack;
BlackboardKeySelector attackRange;
/**
@brief 서비스 틱 이벤트
@details 캐릭터 주변 일정 범위 안의 적 캐릭터를 찾는다.
@details 찾은 캐릭터들 중 가장 가까운 액터를 블랙보드의 targetToAttack에 저장한다.
@param OwnerActor AI 컨트롤러.
*/
EventGraph ReceiveTick(Actor OwnerActor);
private:
AllAIController All_AI_Ref;
Pawn AI_Char_Ref;
EObjectTypeQuery EObject_Arr;
Vector AI_Location;
Float F_AttackRange;
};
|
0d00d83a56bc4490d7e3c07503e660a111370b77
|
84a3fd4f2b29be3148347a70a66fa60199e88147
|
/WDC65816SelectionDAGInfo.h
|
b082e1850ad964a4639194b95a590a7a1cddd910
|
[] |
no_license
|
SNES-SDK/WDC65816
|
3244ee01ef69a786649d10c563d50fc94e83ef58
|
af2bb7b1f77e6d97c71ba359a75ea716299af374
|
refs/heads/master
| 2021-01-21T11:03:10.192240
| 2017-05-14T13:18:39
| 2017-05-14T13:18:39
| 91,722,483
| 6
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 897
|
h
|
WDC65816SelectionDAGInfo.h
|
//===- WDC65816SelectionDAGInfo.h - WDC 65816 SelectionDAG Info -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the WDC 65816 subclass for TargetSelectionDAGInfo.
//
//===----------------------------------------------------------------------===//
#ifndef WDC65816SELECTIONDAGINFO_H
#define WDC65816SELECTIONDAGINFO_H
#include "llvm/Target/TargetSelectionDAGInfo.h"
namespace llvm {
class WDC65816TargetMachine;
class WDC65816SelectionDAGInfo : public TargetSelectionDAGInfo {
public:
explicit WDC65816SelectionDAGInfo(const WDC65816TargetMachine &TM);
~WDC65816SelectionDAGInfo();
};
}
#endif
|
fb66eadb2acc31a413744683047d72c58f3ead7c
|
5ea21725bd5958fbfbb9434d8aad3e4b70f47f10
|
/src/Hexagon/System/Config.cpp
|
c1868bbac51e28c5af240f309f204c90f2e635e2
|
[] |
no_license
|
MarkOates/hexagon
|
38610a11bee4c57afb36690d3174da47d093d2bb
|
f103d717848c903dc24f1e6564fdad36d4fc1e23
|
refs/heads/master
| 2023-08-31T18:00:28.302024
| 2023-08-28T10:35:00
| 2023-08-28T10:35:00
| 147,267,150
| 0
| 0
| null | 2022-08-30T22:44:12
| 2018-09-04T00:36:30
|
C++
|
UTF-8
|
C++
| false
| false
| 9,775
|
cpp
|
Config.cpp
|
#include <Hexagon/System/Config.hpp>
#include <Hexagon/Elements/ColorKit.hpp>
#include <iostream>
#include <sstream>
#include <stdexcept>
namespace Hexagon
{
namespace System
{
std::string Config::INITIAL_DISPLAY_WIDTH_KEY = "initial_display_width";
std::string Config::INITIAL_DISPLAY_HEIGHT_KEY = "initial_display_height";
std::string Config::DEFAULT_NAVIGATOR_DIRECTORY_KEY = "default_navigator_directory";
std::string Config::DOMAIN_KEY = "domain";
std::string Config::REGEX_TEMP_FILENAME_KEY = "regex_temp_filename";
std::string Config::CLIPBOARD_TEMP_FILENAME_KEY = "clipboard_temp_filename";
std::string Config::FILE_NAVIGATOR_SELECTION_FILENAME_KEY = "file_navigator_selection_temp_filename";
std::string Config::MAKE_COMMAND_FILENAME_KEY = "make_command_temp_filename";
std::string Config::FOCUSED_COMPONENT_FILENAME_KEY = "focused_component_filename";
std::string Config::FONT_BIN_PATH_KEY = "font_bin_path";
std::string Config::BITMAP_BIN_PATH_KEY = "bitmap_bin_path";
std::string Config::DARK_MODE_KEY = "dark_mode";
std::string Config::OBJECTIVE_KEY = "objective";
std::string Config::HUD_SHOW_FOCUS_TIMER_BAR_KEY = "hud_show_focus_timer_bar";
std::string Config::INITIAL_BASELINE_CAMERA_STEPBACK_KEY = "initial_baseline_camera_stepback";
Config::Config(std::string config_filename)
: config_filename(config_filename)
, config(config_filename)
, initialized(false)
{
}
Config::~Config()
{
}
std::string Config::get_config_filename() const
{
return config_filename;
}
void Config::validate_initialized(std::string function_name)
{
if (!initialized)
{
std::stringstream error_message;
error_message << "[Hexagon::System::Config error:] cannot call "
<< "\"" << function_name << "\". "
<< "This component must be initialized before this function can be used.";
throw std::runtime_error(error_message.str());
}
}
void Config::initialize()
{
if (!(al_is_system_installed()))
{
std::stringstream error_message;
error_message << "[Config::initialize]: error: guard \"al_is_system_installed()\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::initialize: error: guard \"al_is_system_installed()\" not met");
}
if (initialized) return; // TODO, double initialization should raise an exception
config.load();
initialized = true;
}
void Config::reload()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::reload]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::reload: error: guard \"initialized\" not met");
}
config.reload(); return;
}
int Config::get_initial_display_width()
{
validate_initialized(__FUNCTION__);
return config.get_or_default_int("", INITIAL_DISPLAY_WIDTH_KEY, 2430);
}
int Config::get_initial_display_height()
{
validate_initialized(__FUNCTION__);
return config.get_or_default_int("", INITIAL_DISPLAY_HEIGHT_KEY, 1350);
}
std::string Config::get_default_navigator_directory()
{
validate_initialized(__FUNCTION__);
return config.get_or_default_str("", DEFAULT_NAVIGATOR_DIRECTORY_KEY, "/Users/markoates/Repos/hexagon/");
}
std::string Config::get_regex_temp_filename()
{
std::string default_filename = resource_path({"data", "tmp"}, "regex.txt");
return config.get_or_default_str("", REGEX_TEMP_FILENAME_KEY, default_filename);
}
std::string Config::get_clipboard_temp_filename()
{
std::string default_filename = resource_path({"data", "tmp"}, "clipboard.txt");
return config.get_or_default_str("", CLIPBOARD_TEMP_FILENAME_KEY, default_filename);
}
std::string Config::get_file_navigator_selection_filename()
{
std::string default_filename = resource_path({"data", "tmp"}, "file_navigator_selection.txt");
return config.get_or_default_str("", FILE_NAVIGATOR_SELECTION_FILENAME_KEY, default_filename);
}
std::string Config::get_make_command_filename()
{
std::string default_filename = resource_path({"data", "tmp"}, "make_command.txt");
return config.get_or_default_str("", MAKE_COMMAND_FILENAME_KEY, default_filename);
}
std::string Config::get_focused_component_filename()
{
std::string default_filename = "/Users/markoates/Repos/hexagon/bin/programs/data/tmp/focused_component.txt";
return config.get_or_default_str("", FOCUSED_COMPONENT_FILENAME_KEY, default_filename);
}
std::string Config::get_font_bin_path()
{
std::string default_font_bin_path = "/Users/markoates/Repos/hexagon/bin/programs/data/fonts";
return config.get_or_default_str("", FONT_BIN_PATH_KEY, default_font_bin_path);
}
std::string Config::get_bitmap_bin_path()
{
std::string default_bitmap_bin_path = "/Users/markoates/Repos/hexagon/bin/programs/data/bitmaps";
return config.get_or_default_str("", BITMAP_BIN_PATH_KEY, default_bitmap_bin_path);
}
int Config::get_initial_baseline_camera_stepback()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::get_initial_baseline_camera_stepback]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::get_initial_baseline_camera_stepback: error: guard \"initialized\" not met");
}
validate_initialized(__FUNCTION__);
return config.get_or_default_int("", INITIAL_BASELINE_CAMERA_STEPBACK_KEY, 130);
}
bool Config::is_dark_mode()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::is_dark_mode]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::is_dark_mode: error: guard \"initialized\" not met");
}
return config.get_or_default_bool("", DARK_MODE_KEY, false);
}
std::string Config::get_objective()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::get_objective]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::get_objective: error: guard \"initialized\" not met");
}
return config.get_or_default_str("", OBJECTIVE_KEY, "- objective not set -");
}
std::string Config::get_current_project_domain()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::get_current_project_domain]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::get_current_project_domain: error: guard \"initialized\" not met");
}
return config.get_or_default_str("", DOMAIN_KEY, ""); // value should be an empty string
}
bool Config::is_fullscreen()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::is_fullscreen]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::is_fullscreen: error: guard \"initialized\" not met");
}
return config.get_or_default_bool("", FULLSCREEN_KEY, false);
}
bool Config::get_hud_show_focus_timer_bar()
{
if (!(initialized))
{
std::stringstream error_message;
error_message << "[Config::get_hud_show_focus_timer_bar]: error: guard \"initialized\" not met.";
std::cerr << "\033[1;31m" << error_message.str() << " An exception will be thrown to halt the program.\033[0m" << std::endl;
throw std::runtime_error("Config::get_hud_show_focus_timer_bar: error: guard \"initialized\" not met");
}
return config.get_or_default_bool("", HUD_SHOW_FOCUS_TIMER_BAR_KEY, false);
}
ALLEGRO_COLOR Config::get_backfill_color()
{
if (is_dark_mode())
{
return al_color_name("black");
}
else
{
//Hexagon::Elements::ColorKit color_kit;
//return color_kit.backwall_gray();
return al_color_name("white");
//return al_color_html("8f9996"); // deep rich gray
//return al_color_html("8a5b38"); // darker, more true deep brown from lamp
//return al_color_html("a67d5a"); // color of lamp light against wall
//return al_color_html("d2dbd6"); // very nice light gray
}
//return al_color_html("d2dbd6"); // very nice light gray
//return al_color_html("8f9996"); // deep rich gray
//return al_color_html("5b5c60");
//return al_color_name("black");
}
ALLEGRO_COLOR Config::get_base_text_color()
{
if (is_dark_mode())
{
return al_color_name("white");
}
else
{
return al_color_name("black");
}
}
float Config::get_backfill_opacity()
{
return 0.8f;
}
std::string Config::resource_path(std::vector<std::string> components, std::string filename)
{
std::string result;
ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);
for (auto &component : components) al_append_path_component(path, component.c_str());
al_set_path_filename(path, filename.c_str());
result = al_path_cstr(path, ALLEGRO_NATIVE_PATH_SEP);
//std::cout << result << std::endl;
return result;
}
} // namespace System
} // namespace Hexagon
|
19cc25a6f56f72e0aad77612d312a33a433b8759
|
3e44773781f73410cbd3ca40f5dab78c314cd276
|
/include/tools/parse_cli_arguments.cpp
|
4f52c94916f029184c08bd87129115d5d2a81b5d
|
[] |
no_license
|
matejzavrsnik/mzlib
|
044350b5e3a8fab7a1bc4e3f808f0d35302d7a6b
|
6dc58978fecccb293268d346900b6af914170dc5
|
refs/heads/master
| 2023-01-23T12:46:02.959223
| 2023-01-09T19:39:10
| 2023-01-09T19:39:10
| 59,434,730
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,119
|
cpp
|
parse_cli_arguments.cpp
|
//
// Copyright (c) 2017 Matej Zavrsnik
//
// Web: matejzavrsnik.com
// Mail: matejzavrsnik@gmail.com
//
#include "gtest/gtest.h"
#include "parse_cli_arguments.h"
TEST(parse_arguments, zero_arguments)
{
const int argc = 1;
const char* argv[argc] =
{
"program.exe"
};
auto arguments = mzlib::parse_arguments(argc, argv);
ASSERT_EQ(0, arguments.size());
}
TEST(parse_arguments, one_argument)
{
const int argc = 2;
const char* argv[argc] =
{
"program.exe",
"--superhero=batman"
};
auto arguments = mzlib::parse_arguments(argc, argv);
ASSERT_EQ(1, arguments.size());
ASSERT_EQ("batman", arguments["superhero"]);
}
TEST(parse_arguments, many_arguments)
{
const int argc = 4;
const char* argv[argc] =
{
"program.exe",
"--superhero=batman",
"--sidekick=robin",
"--archvillain=joker"
};
auto arguments = mzlib::parse_arguments(argc, argv);
ASSERT_EQ(3, arguments.size());
ASSERT_EQ("batman", arguments["superhero"]);
ASSERT_EQ("robin", arguments["sidekick"]);
ASSERT_EQ("joker", arguments["archvillain"]);
}
|
3e42b74468ea333f082f2d09e610a32590689da7
|
056d826a009c452a36c52b446434d6d6b0b455d2
|
/HW3/graycodesarefun.cpp
|
115e33d9c2811830e83fa5193b92761b760245c2
|
[] |
no_license
|
sri-kalimani/CSAlgorithms
|
31ffb3180414b736197d5413d3eed9375b4eb88f
|
f33efc5f018bae02a8417bedc0cb80445abbb5b4
|
refs/heads/master
| 2020-09-08T07:49:12.679026
| 2019-12-13T23:42:14
| 2019-12-13T23:42:14
| 221,067,087
| 6
| 1
| null | 2019-11-18T19:04:13
| 2019-11-11T20:46:12
|
C++
|
UTF-8
|
C++
| false
| false
| 4,269
|
cpp
|
graycodesarefun.cpp
|
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <array>
#include <list>
#include "vector"
using namespace std;
vector<string> namesInPic(string grayCode);
string names[] = {"Alice", "Bob", "Chris", "Dylan"};
//Generates recursively the binary reflected Gray code of order n
//Input: A positive integer n
//Output: A list of all bit strings of length n composing the Gray code
vector<string> BRGC(int n)
{
vector<string> listToReturn;
vector<string> listReversed;
int lengthOfint;
if (n == 1)
{
listToReturn.push_back("0");
listToReturn.push_back("1");
}
else
{
listToReturn = BRGC(n - 1);
for (int i = 0; i < listToReturn.size(); i++)
{
listReversed.push_back(listToReturn[listToReturn.size() - i - 1]);
}
for (int i = 0; i < listReversed.size(); i++)
{
listToReturn[i] = "0" + listToReturn[i];
listReversed[i] = "1" + listReversed[i];
listToReturn.push_back(listReversed[i]);
}
}
return listToReturn;
}
/*
* changes a string of 1s and 0s into to a int base 10
*/
int toBinary(string binaryString)
{
int binaryNum = 0;
for (int i = 0; i < binaryString.length(); i++)
{
if (binaryString.substr(binaryString.length() - (i + 1), 1) == "1")
{
binaryNum = binaryNum + pow(2, i);
}
}
return binaryNum;
}
/*
* takes in a set of graycode and return
* grayCode: is a vector of grayCode given by strings
* return: Returns a vector of string that tell which name was added or removed from the photo
*/
vector<string> outputOrderOfnames(vector<string> grayCode)
{
vector<string> orderOfnames;
vector<string> namesInList;
int numberShift;
int previousNum;
int currentNum;
string previousString;
string currentString;
string addToList;
for (int i = 1; i < grayCode.size(); i++)
{
previousString = grayCode[i - 1];
currentString = grayCode[i];
previousNum = toBinary(previousString);
currentNum = toBinary(currentString);
numberShift = (currentNum ^ previousNum);
for (int j = 0; j < 4; j++)
{
if (numberShift & 1)
{
namesInList = namesInPic(grayCode[i]);
addToList = " ";
for(int k =0; k < namesInList.size();k++){
if(namesInList[k] == names[j]){
addToList = names[j] + " in";
}else if(addToList == " "){
addToList = names[j] + " out";
}
}
orderOfnames.push_back(addToList );
numberShift = numberShift >> 1;
}
else
{
numberShift = numberShift >> 1;
}
}
}
return orderOfnames;
}
/* Gives the names of the people currently in the picture
* grayCode: Gives a binary number in the form of a string
* Return: Returns a list of names in the form of a vector
*/
vector<string> namesInPic(string grayCode)
{
vector<string> orderOfnames;
int numberShift;
int previousNum;
int currentNum;
numberShift = toBinary(grayCode);
for (int j = 0; j < 4; j++)
{
if (numberShift & 1)
{
orderOfnames.push_back(names[j]);
numberShift = numberShift >> 1;
}
else
{
numberShift = numberShift >> 1;
}
}
return orderOfnames;
}
//Puts all the information calculated prior into a table
void createTable(vector<string> grayCode, vector<string> OrderOfnames)
{
vector<string> namesInPhoto;
for (int i = 1; i < 16; i++)
{
cout << i << " ";
cout << grayCode[i] << " ";
namesInPhoto = namesInPic(grayCode[i]);
for(int j = 0; j < namesInPhoto.size();j++){
cout << namesInPhoto[j] << " ";
}
cout << " " << OrderOfnames[i-1] << " ";
cout << endl;
}
}
int main()
{
createTable(BRGC(4), outputOrderOfnames(BRGC(4)));
return 1;
}
|
79366c30871878226c80b2b91cd7de448cf5e7f9
|
4099959fa7e5262da92a201f4e6595b0661c015f
|
/solutions/easy/747. Largest Number At Least Twice of Others.cpp
|
d4dc6ba8710143423495d176455a01302d2060f0
|
[] |
no_license
|
baur-krykpayev/leetcode
|
f9bf6bdda4b46f735a8cde892b49de2d535e4b72
|
3fecf9ae1f7aefd32f84508995ad59c3970df6df
|
refs/heads/master
| 2023-03-09T09:40:46.987049
| 2018-07-29T14:40:24
| 2018-07-29T14:40:24
| 110,995,029
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 693
|
cpp
|
747. Largest Number At Least Twice of Others.cpp
|
/*
* Problem: 747. Largest Number At Least Twice of Others [easy]
* Source : https://leetcode.com/problems/largest-number-at-least-twice-of-others/description/
* Solver : Baur Krykpayev
* Date : 07/25/2018
*/
int dominantIndex(int* nums, int numsSize)
{
int first = INT_MIN;
int ind = -1;
int second = INT_MIN;
for (int i = 0; i < numsSize; i++)
{
if (nums[i] > first)
{
first = nums[i];
ind = i;
}
}
for (int i = 0; i < numsSize; i++)
{
if (nums[i] != first && nums[i] > second)
{
second = nums[i];
}
}
return (first >= 2*second) ? ind : -1;
}
|
12d99cfabeef28b7def3e08bd61e2ff253c31fdd
|
03495bd2d66cfd0ba64d0bbaf003339ab4aa855f
|
/TP3_REV4/Principal.cpp
|
fd2c08492c090a32556dfa3e172d38485cd4f8a2
|
[] |
no_license
|
FrancoisGDrouin/GIF-1003-TP3
|
ee8e728b11b33efeaa2cfa356d13fcb6c2c1e569
|
c5cb9ed07a86ac781d911021552fbc356c4a0372
|
refs/heads/main
| 2023-06-03T23:11:24.337173
| 2021-06-29T01:46:59
| 2021-06-29T01:46:59
| 381,207,839
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,317
|
cpp
|
Principal.cpp
|
#include <iostream>
#include <string>
#include <sstream>
#include "Adresse.h"
#include "Personne.h"
#include "Date.h"
#include "validationFormat.h"
using namespace std;
int main()
{
int p_numeroCivic;
string p_nomRue;
string p_ville;
string p_codePostal;
string p_province;
string p_nas;
string p_prenom;
string p_nom;
int p_partiPolitique;
util::Date p_dateNaissance;
long p_jour;
long p_mois;
long p_annee;
util::Adresse p_adresse;
cout << "----------------------------------------" << endl;
cout << "Bienvenue a l'outil de gestion des listes électorales" << endl;
cout << "----------------------------------------" << endl;
cout << "" << endl;
cout << "Inscription d'un candidat" << endl;
cout << "Choisissez un parti" << endl;
string temp;
{
cout << "0:BLOC_QUEBECOIS, 1:CONSERVATEUR,2:INDEPENDANT,3:LIBERAL,4:NOUVEAU_PARTI_DEMOCRATIQUE" << endl;
getline (cin, temp);
}
p_partiPolitique = temp;
temp.clear();
bool verification = false;
while (!verification)
{
cout << "Veuillez entrer sa date de naissance" << endl;
cout << "Le jour [1..31] : ";
cin >> p_jour;
cout << "Le mois [1..12] : ";
cin >> p_mois;
cout << "L'annee [1970..2037] : ";
cin >> p_annee;
if (d.validerDate(p_jour, p_mois, p_annee))
{
verification = true;
}
else
{
cout << "La date de naissance n'est pas valide" << endl;
}
}
cout << "Entrez l'adresse" << endl;
cout << "Numéro de rue : " << endl;
std::cin.clear();
getline (cin, temp);
p_numeroCivic = std::atoi(temp.c_str());
temp.clear();
if (p_numeroCivic <= 0)
{
do
{
cout << "Le numéro de rue doit être positif" << endl;
cout << "" << endl;
cout << "Numéro de rue : " << endl;
cout << "Numéro de rue : " << endl;
std::cin.clear();
getline (cin, temp);
p_numeroCivic = std::atoi(temp.c_str());
temp.clear();
}
while (p_numeroCivic <= 0);
}
cout << "Rue : " << endl;
getline (cin, temp);
p_nomRue = temp;
temp.clear();
if (p_nomRue.empty())
{
do
{
cout << "Le nom de la rue ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Rue : " << endl;
getline (cin, temp);
p_nomRue = temp;
temp.clear();
}
while (p_nomRue.empty());
}
cout << "Ville : " << endl;
getline (cin, temp);
p_ville = temp;
temp.clear();
if (p_ville.empty())
{
do
{
cout << "Le nom de la ville ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Ville : " << endl;
getline (cin, temp);
p_ville = temp;
temp.clear();
}
while (p_ville.empty());
}
cout << "Code postal : " << endl;
getline (cin, temp);
p_codePostal = temp;
temp.clear();
if (p_codePostal.empty())
{
do
{
cout << "Le code postal ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Code postal : " << endl;
getline (cin, temp);
p_codePostal = temp;
temp.clear();
}
while (p_codePostal.empty());
}
cout << "Province : " << endl;
getline (cin, temp);
p_province = temp;
temp.clear();
if (p_province.empty())
{
do
{
cout << "La province ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Province : " << endl;
getline (cin, temp);
p_province = temp;
temp.clear();
}
while (p_province.empty());
}
cout << "Entrez le nom : " << endl;
getline (cin, temp);
p_nom = temp;
temp.clear();
if (p_nom.empty())
{
do
{
cout << "Le nom est vide" << endl;
cout << "Entrez le nom : " << endl;
getline (cin, temp);
p_nom = temp;
temp.clear();
}
while (p_nom == "");
}
cout << "Entrez le prenom : " << endl;
getline (cin, temp);
p_prenom = temp;
temp.clear();
if (p_prenom.empty())
{
do
{
cout << "Le prénom est vide" << endl;
cout << "Entrez le prenom : " << endl;
getline (cin, temp);
p_prenom = temp;
temp.clear();
}
while (p_prenom.empty());
}
if (!util::validerNas(p_nas))
{
do
{
cout << "NAS invalide" << endl;
cout << "Entrez son numéro d'assurance sociale" << endl;
getline (cin, temp);
p_nas = temp;
temp.clear();
}
while (!util::validerNas(p_nas));
}
util::Date d(p_jour, p_mois, p_annee);
util::Adresse adressePersonneCourante(p_numeroCivic, p_nomRue, p_ville, p_codePostal, p_province);
elections::Personne personneCourante(p_nas, p_prenom, p_nom, d, adressePersonneCourante);
cout << "Personne enregistrée" << endl;
cout << "------------------------------------------------" << endl;
cout << personneCourante.reqPersonneFormate() << endl;
cout << "Saisir la nouvelle adresse" << endl;
cout << "Entrez l'adresse" << endl;
cout << "Numéro de rue : " << endl;
std::cin.clear();
getline (cin, temp);
p_numeroCivic = std::atoi(temp.c_str());
temp.clear();
if (p_numeroCivic <= 0)
{
do
{
cout << "Le numéro de rue doit être positif" << endl;
cout << "" << endl;
cout << "Numéro de rue : " << endl;
cout << "Numéro de rue : " << endl;
std::cin.clear();
getline (cin, temp);
p_numeroCivic = std::atoi(temp.c_str());
temp.clear();
}
while (p_numeroCivic <= 0);
}
cout << "Rue : " << endl;
getline (cin, temp);
p_nomRue = temp;
temp.clear();
if (p_nomRue.empty())
{
do
{
cout << "Le nom de la rue ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Rue : " << endl;
getline (cin, temp);
p_nomRue = temp;
temp.clear();
}
while (p_nomRue.empty());
}
cout << "Ville : " << endl;
getline (cin, temp);
p_ville = temp;
temp.clear();
if (p_ville.empty())
{
do
{
cout << "Le nom de la ville ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Ville : " << endl;
getline (cin, temp);
p_ville = temp;
temp.clear();
}
while (p_ville.empty());
}
cout << "Code postal : " << endl;
getline (cin, temp);
p_codePostal = temp;
temp.clear();
if (p_codePostal.empty())
{
do
{
cout << "Le code postal ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Code postal : " << endl;
getline (cin, temp);
p_codePostal = temp;
temp.clear();
}
while (p_codePostal.empty());
}
cout << "Province : " << endl;
getline (cin, temp);
p_province = temp;
temp.clear();
if (p_province.empty())
{
do
{
cout << "La province ne peut pas être vide" << endl;
cout << "" << endl;
cout << "Province : " << endl;
getline (cin, temp);
p_province = temp;
temp.clear();
}
while (p_province.empty());
}
adressePersonneCourante.asgAdresse(p_numeroCivic, p_nomRue, p_ville, p_codePostal, p_province);
personneCourante.asgPersonne(p_nas, p_prenom, p_nom, d, adressePersonneCourante);
cout << "Personne enregistrée" << endl;
cout << "------------------------------------------------" << endl;
cout << personneCourante.reqPersonneFormate() << endl;
cout << "Fin du programme" << endl;
return 0;
}
|
d9a74be8cf19bf696acf86891c78c3c50d06b6d5
|
ebe1e922d0237f8bf79d018cab7ff9878fcd2101
|
/KTLT/G4_bay Loi_Kiem thu.cpp
|
ac1bc231530aecaa9510419572d0e46089fda2ee
|
[] |
no_license
|
BinhMinhs10/dev-C-
|
b79d1ea314c314e1dea8c4fef4c8e7d489285deb
|
7100683517bdde4840545fa4c7f8ececd5eff618
|
refs/heads/master
| 2021-04-15T18:33:05.080965
| 2018-03-23T16:17:09
| 2018-03-23T16:17:09
| 126,510,397
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,915
|
cpp
|
G4_bay Loi_Kiem thu.cpp
|
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
// Gan cac gia tri mac dinh
int MAX_LINE_LEN=50; //do dai toi da 1 dong
int MAX_WORD_LEN=20; //do dai toi da 1 tu
char spaceTable[10]={'\n',' ','\t'}; //mang cac ki tu duoc coi la dau cach
char spaceChar=' '; // ki tu de phan cach cac tu trong van ban dau ra
char input[300],output[300]; //mang chua ten file dau vao va dau ra
int canlevanban=0; // van ban duoc can le mac dinh la deu hai ben
int canledongcuoi=0; // dong cuoi duoc can le mac dinh la deu hai ben
int option; char x;
int dem=3;
/**************************** CAC HAM CO SO *******************************/
// Ham kiem tra ki tu ch co phai la khoang trang khong
int IsWhitespace(char ch){
int i=0;
while(spaceTable[i]!='\0')
{
if(spaceTable[i]==ch) return 1;
i++;
}
return 0;
}
// Ham doc tu file
int ReadWord_File(char *word, FILE *p){ //p la con tro tro den file dau vao, ket qua doc duoc se luu vao mang word.
char ch, pos = 0;
fscanf(p,"%c",&ch);
while(IsWhitespace(ch)) //bo qua whitespace
fscanf(p,"%c",&ch);
while(!IsWhitespace(ch) && (!feof(p))){ //luu cac ki tu vao cho den MAX_WORD_LEN
if (pos < MAX_WORD_LEN){
word[pos]=ch;
pos++;
}
fscanf(p,"%c",&ch);
}
word[pos]='\0';
return pos; //Tra ve do dai tu doc duoc
}
// Ham doc tu ban phim
int ReadWord_KeyBoard(char *word){
int ch, pos = 0;
ch = getchar();
while(IsWhitespace(ch)) ch = getchar();
while(!IsWhitespace(ch) && (ch !='$')){
if (pos < MAX_WORD_LEN) {
word[pos]=(char)ch;
pos++;
}
ch = getchar();
}
word[pos]='\0';
return pos;
}
// Ham xoa dong
void ClearLine(char *line, int *lineLen, int *numWords) {
line[0] = '\0';
*lineLen = 0;
*numWords = 0;
}
// Ham them mot tu vao dong
void AddWord(const char *word, char *line, int *lineLen) { //word la tu, line la dong can them tu vao, lineLen la do dai dong truoc khi them tu
if(*lineLen > 0) {
line[*lineLen] = spaceTable[0];
line[*lineLen + 1] = '\0';
(*lineLen)++;
}
strcat(line, word);
(*lineLen ) += strlen(word);
}
/********************************CAC HAM XUAT DU LIEU TREN MOT DONG****************************/
// Ham in dong ra man hinh
void WriteLine(char *line, int lineLen, int numWords, int option) { //numWords: so tu dang co trong dong, option: phu thuoc cach thuc chon cach thuc can le
if(option==0){
int extraSpaces, spacesToInsert,i,j;
extraSpaces = MAX_LINE_LEN - lineLen;
for(i=0; i<lineLen; i++) {
if(line[i]!=spaceTable[0])
putchar(line[i]);
else {
if(extraSpaces){
spacesToInsert = extraSpaces / (numWords - 1);
for(j=1; j<= spacesToInsert+1; j++)
putchar(spaceChar);
extraSpaces -= spacesToInsert;
numWords--;
}
else{
for(j=i;j<lineLen;j++){
if(line[j]!=spaceTable[0])
putchar(line[j]);
else putchar(spaceChar);
}
break;
}
}
}
putchar('\n');
}
else if(option==1){
int i;
for(i=0;i<lineLen;i++){
if(line[i]!=spaceTable[0])
putchar(line[i]);
else putchar(spaceChar);
}
putchar('\n');
}
else {
int i=lineLen-1;
while(line[i]==spaceTable[0]){
line[i]='\0';
i--;
}
lineLen=i+1;
int extraSpaces = MAX_LINE_LEN - lineLen;
for(i=0;i<extraSpaces;i++) putchar(spaceChar);
for(i=0;i<lineLen;i++){
if(line[i]!=spaceTable[0])
putchar(line[i]);
else putchar(spaceChar);
}
putchar('\n');
}
}
// Ham ghi dong ra file
void StoreLine(char *line, int lineLen, int numWords, FILE *q, int option) {
int i;
if(option==0){
int extraSpaces, spacesToInsert,j;
extraSpaces = MAX_LINE_LEN - lineLen;
for(i=0; i<lineLen; i++) {
if(line[i] !=spaceTable[0])
fprintf(q,"%c",line[i]);
else {
if(extraSpaces){
spacesToInsert = extraSpaces / (numWords - 1);
for(j=1; j<= spacesToInsert+1; j++)
fprintf(q,"%c",spaceChar);
extraSpaces -= spacesToInsert;
numWords--;
}
else{
for(j=i;j<lineLen;j++){
if(line[j]!=spaceTable[0])
fprintf(q,"%c",line[j]);
else fprintf(q,"%c",spaceChar);
}
break;
}
}
}
fprintf(q,"\n");
}
else if(option==1){
int i;
for(i=0;i<lineLen;i++){
if(line[i]!=spaceTable[0])
fprintf(q,"%c",line[i]);
else fprintf(q,"%c",spaceChar);
}
fprintf(q,"\n");
}
else {
int i=lineLen-1;
while(line[i]==spaceTable[0]){
line[i]='\0';
i--;
}
lineLen=i+1;
int extraSpaces = MAX_LINE_LEN - lineLen;
for(i=0;i<extraSpaces;i++) fprintf(q,"%c",spaceChar);
for(i=0;i<lineLen;i++){
if(line[i]!=spaceTable[0])
fprintf(q,"%c",line[i]);
else fprintf(q,"%c",spaceChar);
}
fprintf(q,"\n");
}
}
/*********************** HAM CAI DAT CAC THONG SO PHUC VU VIEC THUC HIEN CHUONG TRINH***********************/
int MakeMenu_1(){
int input;
printf("-------------------------------------------------------------------------");
printf("\nBuoc 1. Tuy chinh cach thuc trinh bay van ban");
printf( "\nNhan 1 de quy dinh so ky tu toi da tren mot dong"
"\nNhan 2 de quy dinh ky tu nao la ky tu khoang trang"
"\nNhan 3 de quy dinh cach thuc can le cho van ban"
"\nNhan 4 de quy dinh cach thuc can le cho dong cuoi cung"
"\nNhan 5 de quy dinh ky tu phan tach tu trong van ban dau ra"
"\nNhan 6 de bo qua thao tac nay hoac xac nhan da tuy chinh xong"
"\n**Luu y: Neu nguoi dung khong quy dinh, chuong trinh se su dung cac gia tri mac dinh, mot dong toi da 50 ki tu, mot tu toi da 20 ki tu.\n"
"->");
scanf("%d",&input);
return input;
}
int MakeMenu_2(){
int input;
printf("-------------------------------------------------------------------------");
printf( "\nBuoc 2. Chon cach thuc nhap xuat van ban");
printf( "\nNhap tu ban phim, xuat ra man hinh, nhan 1"
"\nNhap tu ban phim, xuat ra file, nhan 2"
"\nNhap tu file, xuat ra man hinh, nhan 3"
"\nNhap tu file, xuat ra file, nhan 4\n"
"->");
scanf("%d",&input);
return input;
}
int MakeMaxLine(){
int max;
do{
printf("\n Nhap so ki tu toi da tren mot dong: ");
scanf("%d",&max);
fflush(stdin);
} while(max<=0);
//printf("\n%x\n",max);
return max;
}
char BackMenu(){
char opt;
printf("\n Quay lai bang tuy chinh?(c/k) ");
fflush(stdin); scanf("%c",&opt);
return opt;
}
void luachoncanle(int flag){ //in chua luon cach can le
if(flag==0) printf("Can giua");
if(flag==1) printf("Can trai");
if(flag==2) printf("Can phai");
}
void MakeInputAndOutput(int flag){
if(flag==1) printf( "\nnhap tu ban phim, xuat ra man hinh");
if(flag==2) printf("\nnhap tu ban phim, xuat ra file");
if(flag==3) printf("\nnhap tu file, xuat ra man hinh");
if(flag==4) printf("\nnhap tu file, xuat ra file");
}
void Design(int _MAX_LINE_LEN,int _canlevanban, int _canledongcuoi, int _dem,char* _spaceTable,int _option ){
int i;
printf("\nSo ki tu toi da tren mot dong: %d",_MAX_LINE_LEN);
printf("\nKi tu la khoang trang: ");
for( i=1 ; i<=_dem ; i++){
printf("%c ",_spaceTable[i]);
}
printf("\nCach can le van ban: ");
luachoncanle(_canlevanban);
printf("\nCach can le dong cuoi: ");
luachoncanle(_canledongcuoi);
printf( "\nCach thuc nhap xuat van ban: ");
MakeInputAndOutput(_option);
printf("\n");
}
/**************************** CAC HAM XU LY VOI DU LIEU VAO RA ************************************/
void inKey_outScreen(char *word, int wordLen, char *line, int lineLen, int numWords){
printf("\n**Luu y: De ket thuc thao tac nhap van ban, hay go lan luot 'Enter','$' va 'Enter'");
printf("\nNhap van ban o duoi day\n");
FILE *q=fopen("temp.txt","w");
while(1) {
wordLen = ReadWord_KeyBoard(word);
if((wordLen == 0) && (lineLen > 0)) {
StoreLine(line, lineLen, numWords, q, canledongcuoi);
break;
}
else if((wordLen + 1 +lineLen) > MAX_LINE_LEN) {
StoreLine(line, lineLen, numWords, q, canlevanban);
ClearLine(line, &lineLen, &numWords);
AddWord(word,line,&lineLen);
numWords++;
}
else if(wordLen==0&&lineLen==0) break;
else {
AddWord(word, line, &lineLen);
numWords++;
}
}
fclose(q);
FILE *p=fopen("temp.txt","r");
printf("\nVan ban sau khi duoc can le la:\n\n");
char temp;
fscanf(p,"%c",&temp);
while(!feof(p)){
printf("%c",temp);
fscanf(p,"%c",&temp);
}
fclose(p);
}
void inKey_outFile(char *word, int wordLen, char *line, int lineLen, int numWords){
printf("\nNhap ten file de ghi du lieu: ");fflush(stdin);gets(output);
printf("\n**Luu y: De ket thuc thao tac nhap van ban, hay go lan luot 'Enter','$' va 'Enter'");
printf("\nNhap van ban o duoi day\n");
FILE *q=fopen(output,"w");
while(1) {
wordLen = ReadWord_KeyBoard(word);
if((wordLen == 0) && (lineLen > 0)) {
StoreLine(line, lineLen, numWords, q, canledongcuoi);
break;
}
else if((wordLen + 1 +lineLen) > MAX_LINE_LEN) {
StoreLine(line, lineLen, numWords, q, canlevanban);
ClearLine(line, &lineLen, &numWords);
AddWord(word,line,&lineLen);
numWords++;
}
else if(wordLen==0&&lineLen==0) break;
else {
AddWord(word, line, &lineLen);
numWords++;
}
}
fclose(q);
printf("\n Da luu file thanh cong");
}
void inFile_outScreen(char *word, int wordLen, char *line, int lineLen, int numWords){
char ch = 'k';
do{
printf("\nNhap ten file de doc du lieu: ");fflush(stdin); gets(input);
FILE *p=fopen(input,"r");
if(p==NULL) {
printf("Khong mo duoc file dau vao");
printf("\nBan co muon nhap lai ten file (c/k)");
scanf("%c",&ch);
}
else{
printf("\nVan ban sau khi duoc can le la: \n\n");
while(1) {
wordLen = ReadWord_File(word,p);
if((wordLen == 0) && (lineLen > 0)) { // Can le cho dong cuoi o day
WriteLine(line, lineLen, numWords,canledongcuoi);
break;
}
else if((wordLen + 1 +lineLen) > MAX_LINE_LEN) {
WriteLine(line, lineLen, numWords,canlevanban);
ClearLine(line, &lineLen, &numWords);
AddWord(word,line,&lineLen);
numWords++;
}
else if(wordLen==0&&lineLen==0) break;
else {
AddWord(word, line, &lineLen);
numWords++;
}
}
}
fclose(p);
}while( (toupper(ch)) == 'C');
}
void inFile_outFile(char *word, int wordLen, char *line, int lineLen, int numWords){
char ch = 'k';
do{
printf("\nNhap ten file de doc du lieu: "); fflush(stdin); gets(input);
FILE *p=fopen(input,"r");
if(p==NULL){
printf("Khong mo duoc file dau vao");
printf("\nBan co muon nhap lai ten file (c/k)");
scanf("%c",&ch);
}
else{
printf("\nNhap ten file de ghi du lieu: "); fflush(stdin); gets(output);
FILE *q=fopen(output,"w");
while(1) {
wordLen = ReadWord_File(word,p);
if((wordLen == 0) && (lineLen > 0)) {
StoreLine(line, lineLen, numWords, q, canledongcuoi);
break;
}
else if((wordLen + 1 +lineLen) > MAX_LINE_LEN) {
StoreLine(line, lineLen, numWords, q, canlevanban);
ClearLine(line, &lineLen, &numWords);
AddWord(word,line,&lineLen);
numWords++;
}
else if(wordLen==0&&lineLen==0) break;
else {
AddWord(word, line, &lineLen);
numWords++;
}
}
printf("\n Da luu vao file %s thanh cong",output);
fclose(q);
}
fclose(p);
}while( toupper(ch) == 'C');
}
int main(void) {
// Khai bao cac bien trung gian
int i;
// Bat dau chuong trinh
do{
option = MakeMenu_1();
switch(option){
case 1: {
MAX_LINE_LEN = MakeMaxLine();
//printf("\n%d\n",MAX_LINE_LEN);
MAX_WORD_LEN = MAX_LINE_LEN - 1 ;
x = BackMenu();
break;
}
case 2: {
printf("\n **Luu y chuong trinh mac dinh ky tu xuong dong luon la khoang trang\n");
printf("\n Nhap so ki tu khac duoc coi la khoang trang (toi da 10 ki tu): ");
scanf("%d",&dem);
if((dem<=10)&&(dem>0)) {
char x;
for(i=1;i<=dem;i++) {
printf("\n Ky tu thu %d la: ",i);
fflush(stdin);
scanf("%c",&x);
if(!IsWhitespace(x)){
spaceTable[i]=x;
}
}
spaceTable[dem+1]='\0';
}
else {
printf("Syntax error");
dem=0;
}
x = BackMenu();
break;
}
case 3: {
printf( "\n Nhap cach thuc can le cho van ban"
"\n Nhan 0 de can le deu hai ben"
"\n Nhan 1 de can le trai"
"\n Nhan 2 de can le phai\n"
"->");
scanf("%d",&canlevanban);
if((canlevanban!=0)&&(canlevanban!=1)&&(canlevanban!=2))
{
printf("\nSyntax error");
canlevanban=0;
}
x = BackMenu();
break;
}
case 4: {
printf( "\n Nhap cach thuc can le cho dong cuoi"
"\n Nhan 0 de can le deu hai ben"
"\n Nhan 1 de can le trai"
"\n Nhan 2 de can le phai\n"
"->");
scanf("%d",&canledongcuoi);
if((canledongcuoi!=0)&&(canledongcuoi!=1)&&(canledongcuoi!=2))
{
printf("\nSyntax error");
canledongcuoi=0;
}
x = BackMenu();
break;
}
case 5: {
printf("\nNhap ki tu phan tach tu trong van ban dau ra:"); fflush(stdin);
scanf("%c",&spaceChar);
x = BackMenu();
break;
}
case 6: {
x = 'k';
break;
}
default: {
printf("\nSyntax error");
x = BackMenu();
break;
}
}
} while(toupper(x)!='K');
// Khai bao cac bien phuc vu chuong trinh
char word[MAX_WORD_LEN + 1];
int wordLen;
char line[MAX_LINE_LEN + 1];
int lineLen = 0;
int numWords = 0;
ClearLine(line, &lineLen, &numWords);
// Buoc 2
option = MakeMenu_2();
// Cac thao tac da lua chon
system("cls");
Design( MAX_LINE_LEN, canlevanban, canledongcuoi, dem, spaceTable, option);
switch(option){
case 1: {
inKey_outScreen(word,wordLen,line,lineLen,numWords);
break;
}
case 2: {
inKey_outFile(word,wordLen,line,lineLen,numWords);
break;
}
case 3: {
inFile_outScreen(word,wordLen,line,lineLen,numWords);
break;
}
case 4: {
inFile_outFile(word,wordLen,line,lineLen,numWords);
break;
}
default: {
printf("\n Syntax error");
break;
}
}
return 1;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.