hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
588 values
lang
stringclasses
305 values
max_stars_repo_path
stringlengths
3
363
max_stars_repo_name
stringlengths
5
118
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringdate
2015-01-01 00:00:35
2022-03-31 23:43:49
max_stars_repo_stars_event_max_datetime
stringdate
2015-01-01 12:37:38
2022-03-31 23:59:52
max_issues_repo_path
stringlengths
3
363
max_issues_repo_name
stringlengths
5
118
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
363
max_forks_repo_name
stringlengths
5
135
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringdate
2015-01-01 00:01:02
2022-03-31 23:27:27
max_forks_repo_forks_event_max_datetime
stringdate
2015-01-03 08:55:07
2022-03-31 23:59:24
content
stringlengths
5
1.05M
avg_line_length
float64
1.13
1.04M
max_line_length
int64
1
1.05M
alphanum_fraction
float64
0
1
4259258ae97ccc6e15a09a7f0c41901ddaef041c
2,969
h
C
src/cpp-ethereum/libweb3jsonrpc/TestFace.h
XianlinGong/fabcoinsc-dev
585d90f376a9223ab172151a81b92dca1113ecd6
[ "MIT" ]
26
2018-04-24T00:33:11.000Z
2022-03-26T15:46:04.000Z
src/cpp-ethereum/libweb3jsonrpc/TestFace.h
XianlinGong/fabcoinsc-dev
585d90f376a9223ab172151a81b92dca1113ecd6
[ "MIT" ]
4
2018-07-17T13:33:26.000Z
2018-08-27T07:10:49.000Z
src/cpp-ethereum/libweb3jsonrpc/TestFace.h
XianlinGong/fabcoinsc-dev
585d90f376a9223ab172151a81b92dca1113ecd6
[ "MIT" ]
22
2018-04-24T00:33:31.000Z
2022-02-03T09:40:26.000Z
/** * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY! */ #ifndef JSONRPC_CPP_STUB_DEV_RPC_TESTFACE_H_ #define JSONRPC_CPP_STUB_DEV_RPC_TESTFACE_H_ #include "ModularServer.h" namespace dev { namespace rpc { class TestFace : public ServerInterface<TestFace> { public: TestFace() { this->bindAndAddMethod(jsonrpc::Procedure("test_setChainParams", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::TestFace::test_setChainParamsI); this->bindAndAddMethod(jsonrpc::Procedure("test_mineBlocks", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::TestFace::test_mineBlocksI); this->bindAndAddMethod(jsonrpc::Procedure("test_modifyTimestamp", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::TestFace::test_modifyTimestampI); this->bindAndAddMethod(jsonrpc::Procedure("test_addBlock", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::TestFace::test_addBlockI); this->bindAndAddMethod(jsonrpc::Procedure("test_rewindToBlock", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::TestFace::test_rewindToBlockI); } inline virtual void test_setChainParamsI(const Json::Value &request, Json::Value &response) { response = this->test_setChainParams(request[0u]); } inline virtual void test_mineBlocksI(const Json::Value &request, Json::Value &response) { response = this->test_mineBlocks(request[0u].asInt()); } inline virtual void test_modifyTimestampI(const Json::Value &request, Json::Value &response) { response = this->test_modifyTimestamp(request[0u].asInt()); } inline virtual void test_addBlockI(const Json::Value &request, Json::Value &response) { response = this->test_addBlock(request[0u].asString()); } inline virtual void test_rewindToBlockI(const Json::Value &request, Json::Value &response) { response = this->test_rewindToBlock(request[0u].asInt()); } virtual bool test_setChainParams(const Json::Value& param1) = 0; virtual bool test_mineBlocks(int param1) = 0; virtual bool test_modifyTimestamp(int param1) = 0; virtual bool test_addBlock(const std::string& param1) = 0; virtual bool test_rewindToBlock(int param1) = 0; }; } } #endif //JSONRPC_CPP_STUB_DEV_RPC_TESTFACE_H_
54.981481
221
0.625463
512a079c172fdeb424c768ab3564f847e2e599f5
2,483
h
C
vendor/github.com/google/certificate-transparency/cpp/server/server.h
weltonrodrigo/origin
075680352a29112ec40a1a9ab3e63665aa5dd143
[ "Apache-2.0" ]
220
2017-01-07T14:32:15.000Z
2022-02-22T08:56:16.000Z
vendor/github.com/google/certificate-transparency/cpp/server/server.h
weltonrodrigo/origin
075680352a29112ec40a1a9ab3e63665aa5dd143
[ "Apache-2.0" ]
23
2018-03-06T09:20:28.000Z
2018-05-28T07:57:05.000Z
vendor/github.com/google/certificate-transparency/cpp/server/server.h
weltonrodrigo/origin
075680352a29112ec40a1a9ab3e63665aa5dd143
[ "Apache-2.0" ]
31
2017-01-09T06:38:45.000Z
2020-11-03T16:57:29.000Z
#ifndef CERT_TRANS_SERVER_SERVER_H_ #define CERT_TRANS_SERVER_SERVER_H_ #include <stdint.h> #include <memory> #include <string> #include <thread> #include "base/macros.h" #include "log/strict_consistent_store.h" #include "monitoring/gauge.h" #include "util/libevent_wrapper.h" #include "util/masterelection.h" #include "util/sync_task.h" class Frontend; class LogVerifier; namespace cert_trans { template <class Logged> class ClusterStateController; // TODO(pphaneuf): Not needed? template <class Logged> class ConsistentStore; class ContinuousFetcher; class Database; class EtcdClient; class GCMExporter; class LogLookup; class LogSigner; class LoggedEntry; class Proxy; class ThreadPool; class UrlFetcher; // Size of latest locally generated STH. Gauge<>* latest_local_tree_size_gauge(); class Server { public: static void StaticInit(); // Doesn't take ownership of anything. Server(const std::shared_ptr<libevent::Base>& event_base, ThreadPool* internal_pool, ThreadPool* http_pool, Database* db, EtcdClient* etcd_client, UrlFetcher* url_fetcher, const LogVerifier* log_verifier); ~Server(); bool IsMaster() const; MasterElection* election(); ConsistentStore<LoggedEntry>* consistent_store(); ClusterStateController<LoggedEntry>* cluster_state_controller(); LogLookup* log_lookup(); ContinuousFetcher* continuous_fetcher(); Proxy* proxy(); libevent::HttpServer* http_server(); void Initialise(bool is_mirror); void WaitForReplication() const; void Run(); private: const std::shared_ptr<libevent::Base> event_base_; std::unique_ptr<libevent::EventPumpThread> event_pump_; libevent::HttpServer http_server_; Database* const db_; const LogVerifier* const log_verifier_; const std::string node_id_; UrlFetcher* const url_fetcher_; EtcdClient* const etcd_client_; MasterElection election_; ThreadPool* const internal_pool_; util::SyncTask server_task_; StrictConsistentStore<LoggedEntry> consistent_store_; const std::unique_ptr<Frontend> frontend_; std::unique_ptr<LogLookup> log_lookup_; std::unique_ptr<ClusterStateController<LoggedEntry>> cluster_controller_; std::unique_ptr<ContinuousFetcher> fetcher_; ThreadPool* const http_pool_; std::unique_ptr<Proxy> proxy_; std::unique_ptr<std::thread> node_refresh_thread_; std::unique_ptr<GCMExporter> gcm_exporter_; DISALLOW_COPY_AND_ASSIGN(Server); }; } // namespace cert_trans #endif // CERT_TRANS_SERVER_SERVER_H_
26.414894
75
0.775272
663332e01ea83594cfb14d9b21916de072eb96ce
2,976
h
C
test_src/Polyhedron.h
rafael-radkowski/setforge
cfa42fc4fc77a3f74c0118a00e047a4c67a7452c
[ "MIT" ]
5
2019-08-19T16:06:45.000Z
2021-11-12T08:40:52.000Z
test_src/Polyhedron.h
rafael-radkowski/setforge
cfa42fc4fc77a3f74c0118a00e047a4c67a7452c
[ "MIT" ]
1
2019-06-14T20:30:37.000Z
2019-06-20T14:29:41.000Z
test_src/Polyhedron.h
rafael-radkowski/DNNHelpers
cfa42fc4fc77a3f74c0118a00e047a4c67a7452c
[ "MIT" ]
1
2019-03-12T19:45:57.000Z
2019-03-12T19:45:57.000Z
#pragma once /* Class Polyhedron Create an Icosahedron and extend it to a Polyhedron by recursive decomposition. see https://schneide.blog/2016/07/15/generating-an-icosphere-in-c/ for details. Rafael Radkowski Iowa State University rafael@iastate.edu +1 (515) 294 7044 Jan 2019 All copyrights reserved --------------------------------------------------------------- Last edited: Jan 21, 2019: - Switched render mode back to fill after the polyheder got rendered. */ #include <iostream> #include <string> #include <vector> #include <map> #include <array> // GLEW include #include <GL/glew.h> // GLM include files #define GLM_FORCE_INLINE #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/transform.hpp> // transformation #include <glm/gtx/quaternion.hpp> // quaternions // glfw includes #include <GLFW/glfw3.h> // local #include "OpenGLDefaults.h" #include "VertexBuffers.h" #include "ShaderProgram.h" #include "PolyhedronGeometry.h" using namespace std; using namespace cs557; namespace arlab { class Polyhedron { private: typedef std::map<std::pair<int, int>, int> Lookup; // triangle list, vertex list using IndexedMesh=std::pair< vector<glm::vec3>, vector<glm::ivec3> > ; public: /* Create an Icosahedron or Polyhedron, depending on the num of subdivisions. @param level - the number of subdivisons. 0 creates an Icosahedron; */ void create( int level, int shader_program = -1); /* Draw the coordinate system @param viewMatrix - a view matrix object @param modelMatrix - a model matrix object. */ void draw(glm::mat4 projectionMatrix, glm::mat4 viewMatrix, glm::mat4 modelMatrix); /* Return the shader program @return - int containing the shader program */ int getProgram(void){return program;} private: int vertex_for_edge(Lookup& lookup, vector<glm::vec3>& vertices, int first, int second); /* Subdivide the Icosahedron triangles */ vector<glm::ivec3> subdivide(vector<glm::vec3>& vertices, vector<glm::ivec3> triangles); /* Create an Icosahedron */ void createIcosahedron(void); /* Create a Polyhedron @param subdivisions - the number of subdivisions @param vertices - the Icosahedron vertices @param triangles - the Icosahedron triangle index list */ std::pair< vector<glm::vec3>, vector<glm::ivec3> > createPolyhedron(int subdivisions, vector<glm::vec3>& vertices, vector<glm::ivec3> triangles); ///------------------------------------------- // Members int vaoID[1]; // Our Vertex Array Object int vboID[2]; // Our Vertex Buffer Object int iboID[1]; // Our Index Object // the shader program that renders this object int program; int viewMatrixLocation; int modelMatrixLocation; int projMatrixLocation; vector<glm::vec3> _points; vector<glm::vec3> _colors; vector<glm::ivec3> _triangle_index; int _I; // num indices float _radius; int _level; private: }; }//namespace arlab
22.044444
147
0.691868
66458aff79cfcae487edaa370ea73c685154f8b1
1,476
c
C
bp_common/test/src/demos/src/mc_template.c
maximaka/black-parrot
7478eaba03c1defcb0c690abbddc809c3a71dcfb
[ "BSD-3-Clause" ]
2
2020-03-05T23:53:32.000Z
2020-05-02T12:21:24.000Z
bp_common/test/src/demos/src/mc_template.c
maximaka/black-parrot
7478eaba03c1defcb0c690abbddc809c3a71dcfb
[ "BSD-3-Clause" ]
13
2020-03-09T19:07:23.000Z
2020-04-05T21:56:38.000Z
bp_common/test/src/demos/src/mc_template.c
maximaka/black-parrot
7478eaba03c1defcb0c690abbddc809c3a71dcfb
[ "BSD-3-Clause" ]
2
2020-03-06T22:46:05.000Z
2020-03-06T22:52:36.000Z
/* * Name: * mc_template.c * * Description: * This is a template program for multicore tests. * */ #include <stdint.h> #include "bp_utils.h" #include "mc_util.h" #ifndef N #define N 16 #endif typedef uint32_t matrix[N]; matrix MATRIX; #ifndef NUM_CORES #define NUM_CORES 2 #endif volatile uint64_t __attribute__((aligned(64))) global_lock = 0; volatile uint64_t __attribute__((aligned(64))) start_barrier_mem = 0; volatile uint64_t __attribute__((aligned(64))) end_barrier_mem = 0; uint64_t thread_main() { uint64_t core_id; __asm__ volatile("csrr %0, mhartid": "=r"(core_id): :); // TODO: make the thread do something interesting // synchronize at end of computation by incrementing the end barrier lock(&global_lock); end_barrier_mem += 1; unlock(&global_lock); } uint64_t main(uint64_t argc, char * argv[]) { uint64_t core_id; __asm__ volatile("csrr %0, mhartid": "=r"(core_id): :); // only core 0 intializes data structures if (core_id == 0) { global_lock = 0; for (int i = 0; i < N; i++) { MATRIX[i] = i; } // signal done with initialization start_barrier_mem = 0xdeadbeef; } else { while (start_barrier_mem != 0xdeadbeef) { } } // all threads execute thread_main(); // core 0 waits for all threads to finish if (core_id == 0) { // wait for all threads to finish while (end_barrier_mem != NUM_CORES) { } bp_finish(0); } else { bp_finish(0); } return 0; }
19.421053
70
0.660569
619c01fe39f1b4ec92bfa09fa5d09c9e59afa65b
9,697
c
C
src/avl/python/avl.py.c
guidanoli/aa
81814c7d72d7126308440d0ad07892a36800de20
[ "MIT" ]
null
null
null
src/avl/python/avl.py.c
guidanoli/aa
81814c7d72d7126308440d0ad07892a36800de20
[ "MIT" ]
2
2021-08-19T17:57:12.000Z
2021-08-19T17:59:23.000Z
src/avl/python/avl.py.c
guidanoli/aa
81814c7d72d7126308440d0ad07892a36800de20
[ "MIT" ]
null
null
null
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <yadsl/pydefines.h> #include <avl/avl.h> #ifdef YADSL_DEBUG #include <memdb/memdb.h> #else #include <stdlib.h> #endif // // Objects // typedef struct { PyObject_HEAD yadsl_AVLTreeHandle *ob_tree; PyObject *ob_func; unsigned char lock : 1; } yadsl_AVLTreePythonObject; // // Exceptions // static PyObject *PyExc_Lock = NULL; YADSL_PYDEFINES_EXCEPTION_METADATA() static struct _exception_metadata exceptions[] = { // // Exception definitions // { &PyExc_Lock, "pyavl.Lock", "Lock", "Tree is locked. Illegal operation detected." }, // // Sentinel // { NULL, NULL, NULL, }, }; YADSL_PYDEFINES_EXCEPTION_FUNCTIONS(yadsl_AVLTreePythonObject, exceptions) // // Callbacks // static void decRefCallback(void *object) { Py_XDECREF((PyObject *) object); } static int cmpCallback(void *obj1, void *obj2, void *cmp_objs_arg) { int result = 1; yadsl_AVLTreePythonObject *ho; PyObject *callable; ho = (yadsl_AVLTreePythonObject *) cmp_objs_arg; if (callable = ho->ob_func) { PyObject *args = NULL, *resultObj = NULL, *zero = NULL; if ((args = PyTuple_Pack(2, obj1, obj2)) == NULL) goto exit1; ho->lock = 1; resultObj = PyObject_CallObject(callable, args); Py_DECREF(args); if (resultObj == NULL) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "An unspecified error occurred during callback."); goto exit1; } if (!PyNumber_Check(resultObj)) { PyErr_Format(PyExc_TypeError, "Return should be a number, not %.200s", Py_TYPE(resultObj)->tp_name); goto exit1; } zero = PyLong_FromLong(0L); if (zero == NULL) goto exit1; result = PyObject_RichCompareBool(resultObj, zero, Py_LT); if (result == -1) { PyErr_SetString(PyExc_RuntimeError, "An unspecified error while comparing objects."); goto exit1; } if (result) { // result = -1 -> resultObj < 0 result = -1; } else { result = PyObject_RichCompareBool(resultObj, zero, Py_GT); if (result == -1) { PyErr_SetString(PyExc_RuntimeError, "An unspecified error while comparing objects."); goto exit1; } // result = 0 -> obj1 == obj2 // result = 1 -> obj1 > obj2 } exit1: ho->lock = 0; Py_XDECREF(zero); Py_XDECREF(resultObj); } else { Py_XINCREF(obj1); ho->lock = 1; result = PyObject_RichCompareBool(obj1, obj2, Py_LT); if (result == -1) { PyErr_SetString(PyExc_RuntimeError, "An unspecified error while comparing objects."); goto exit2; } if (result) { // result = -1 -> obj1 < obj2 result = -1; } else { result = PyObject_RichCompareBool(obj1, obj2, Py_GT); if (result == -1) { PyErr_SetString(PyExc_RuntimeError, "An unspecified error while comparing objects."); goto exit2; } // result = 0 -> obj1 == obj2 // result = 1 -> obj1 > obj2 } exit2: ho->lock = 0; Py_XDECREF(obj1); } return result; } struct _visit_cb_arg { yadsl_AVLTreePythonObject *ao; /* avl object */ PyObject *func; /* callable object */ }; void *visitCallback(void *object, void *cmp_objs_arg) { struct _visit_cb_arg *info = (struct _visit_cb_arg *) cmp_objs_arg; PyObject *func_arg = PyTuple_Pack(1, object), *result; if (func_arg == NULL) { PyErr_SetString(PyExc_MemoryError, "Could not create internal tuple"); return cmp_objs_arg; // Flag for 'internal error' } info->ao->lock = 1; result = PyObject_CallObject(info->func, func_arg); info->ao->lock = 0; Py_DECREF(func_arg); if (result == NULL) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "An unspecified error occurred during callback."); return cmp_objs_arg; // Flag for 'internal error' } if (!PyObject_IsTrue(result)) { Py_DECREF(result); return NULL; } return result; // Return to function } // // Method definitions // static PyObject * AVL_new(PyTypeObject *type, PyObject *args, PyObject *kw) { yadsl_AVLTreePythonObject *self; self = (yadsl_AVLTreePythonObject *) type->tp_alloc(type, 0); if (self != NULL) { self->ob_tree = NULL; self->ob_func = NULL; self->lock = 0; } return (PyObject *) self; } PyDoc_STRVAR(_AVL_init__doc__, "AVL(/, f=None)\n" "--\n" "\n" "Python AVL tree data structure.\n" "f is the following comparison function:\n" "\tf(o1 : Object, o2: Object) -> int\n" "It takes two objects o1 and o2 and returns:\n" "\t< 0, if o1 < o2\n" "\t= 0, if o1 = o2\n" "\t> 0, if o1 > o2\n"); static int AVL_init(yadsl_AVLTreePythonObject *self, PyObject *args, PyObject *kw) { PyObject *callbackObj = NULL; static char *keywords[] = { "f", NULL }; if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:pyavl.AVL.__init__", keywords, &callbackObj)) return -1; if (callbackObj != NULL) { if (!PyCallable_Check(callbackObj)) { PyErr_SetString(PyExc_TypeError, "f should be a callable object"); return -1; } } if (!(self->ob_tree = yadsl_avltree_tree_create(cmpCallback, self, decRefCallback))) { PyErr_SetString(PyExc_MemoryError, "Could not create avl tree"); return -1; } self->ob_func = callbackObj; Py_XINCREF(callbackObj); #ifdef YADSL_DEBUG yadsl_memdb_dump(); #endif return 0; } static void AVL_dealloc(yadsl_AVLTreePythonObject *self) { if (self->ob_tree) yadsl_avltree_destroy(self->ob_tree); #ifdef YADSL_DEBUG yadsl_memdb_dump(); #endif Py_XDECREF(self->ob_func); Py_TYPE(self)->tp_free((PyObject *) self); } PyDoc_STRVAR(_AVL_add__doc__, "add(obj : Object) -> bool\n" "--\n" "\n" "Add object to tree.\n" "Returns whether it was added or not."); static PyObject * AVL_add(yadsl_AVLTreePythonObject *self, PyObject *obj) { bool exists; if (self->lock) { _yadsl_AVLTreePythonObject_throw_error(PyExc_Lock); return NULL; } switch (yadsl_avltree_object_insert(self->ob_tree, obj, &exists)) { case YADSL_AVLTREE_RET_OK: #ifdef YADSL_DEBUG yadsl_memdb_dump(); #endif if (!exists) Py_INCREF(obj); if (PyErr_Occurred()) return NULL; return PyBool_FromLong(!exists); case YADSL_AVLTREE_RET_MEMORY: PyErr_SetString(PyExc_MemoryError, "Could not allocate memory for newly added item in tree"); break; default: Py_UNREACHABLE(); } return NULL; } PyDoc_STRVAR(_AVL_remove__doc__, "remove(obj : Object) -> None\n" "--\n" "\n" "Remove object from tree."); static PyObject * AVL_remove(yadsl_AVLTreePythonObject *self, PyObject *obj) { bool exists; if (self->lock) { _yadsl_AVLTreePythonObject_throw_error(PyExc_Lock); return NULL; } switch (yadsl_avltree_object_remove(self->ob_tree, obj, &exists)) { case YADSL_AVLTREE_RET_OK: #ifdef YADSL_DEBUG yadsl_memdb_dump(); #endif if (PyErr_Occurred()) return NULL; Py_RETURN_NONE; default: Py_UNREACHABLE(); } return NULL; } PyDoc_STRVAR(_AVL_contains__doc__, "contains(obj : Object) -> bool\n" "--\n" "\n" "Check whether tree contains object."); static PyObject * AVL_contains(yadsl_AVLTreePythonObject *self, PyObject *obj) { bool exists; if (self->lock) { _yadsl_AVLTreePythonObject_throw_error(PyExc_Lock); return NULL; } switch (yadsl_avltree_object_search(self->ob_tree, obj, &exists)) { case YADSL_AVLTREE_RET_OK: if (PyErr_Occurred()) return NULL; return PyBool_FromLong(exists); default: Py_UNREACHABLE(); } return NULL; } PyDoc_STRVAR(_AVL_iterate__doc__, "iterate(f : Object) -> Object\n" "--\n" "\n" "Iterate through tree in order with a function.\n" "If a value other than None/False is returned, the\n" "iteration will be interrupted and that will be the\n" "returned value of iterate. Else, None is returned."); static PyObject * AVL_iterate(yadsl_AVLTreePythonObject *self, PyObject *obj) { struct _visit_cb_arg cmp_objs_arg; void *ret = NULL; if (self->lock) { _yadsl_AVLTreePythonObject_throw_error(PyExc_Lock); return NULL; } if (!PyCallable_Check(obj)) { PyErr_SetString(PyExc_TypeError, "argument should be a callable object"); return NULL; } cmp_objs_arg.ao = self; cmp_objs_arg.func = obj; switch (yadsl_avltree_tree_traverse(self->ob_tree, YADSL_AVLTREE_VISITING_IN_ORDER, visitCallback, &cmp_objs_arg, &ret)) { case YADSL_AVLTREE_RET_OK: #ifdef YADSL_DEBUG yadsl_memdb_dump(); #endif if (PyErr_Occurred()) goto exit; if (ret == NULL) Py_RETURN_NONE; return ret; default: Py_UNREACHABLE(); } exit: if (ret != &cmp_objs_arg) // flag for 'internal error' Py_XDECREF(ret); return NULL; } // // Method table // PyMethodDef AVL_methods[] = { // // Methods // { "add", (PyCFunction) AVL_add, METH_O, _AVL_add__doc__ }, { "remove", (PyCFunction) AVL_remove, METH_O, _AVL_remove__doc__ }, { "contains", (PyCFunction) AVL_contains, METH_O, _AVL_contains__doc__ }, { "iterate", (PyCFunction) AVL_iterate, METH_O, _AVL_iterate__doc__ }, // // // Sentinel // { NULL, NULL, 0, NULL } }; // // Types // static PyTypeObject AVLType = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "pyavl.AVL", .tp_basicsize = sizeof(yadsl_AVLTreePythonObject), .tp_itemsize = 0, .tp_dealloc = (destructor) AVL_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = _AVL_init__doc__, .tp_methods = AVL_methods, .tp_init = (initproc) AVL_init, .tp_new = (newfunc) AVL_new, }; // // Module // PyModuleDef pyavl_module = { PyModuleDef_HEAD_INIT, "pyavl", }; PyMODINIT_FUNC PyInit_pyavl(void) { PyObject *m; struct _exception_metadata *_exc; Py_Initialize(); if (PyType_Ready(&AVLType) < 0) return NULL; m = PyModule_Create(&pyavl_module); if (m == NULL) return NULL; YADSL_PYDEFINES_INIT_EXCEPTION_OBJECTS(m, _exc) Py_INCREF(&AVLType); if (PyModule_AddObject(m, "AVL", (PyObject *) &AVLType) < 0) { Py_DECREF(&AVLType); Py_DECREF(m); return NULL; } return m; }
20.720085
123
0.69537
e8acaf2906f9c2cb3b0a247a0b45a6b5056b6e8b
11,247
c
C
test_coverage.c
sternmull/yalloc
2d38f57d64f38eedc2c314e1c1090fb9cf26379f
[ "MIT" ]
4
2021-02-11T06:49:01.000Z
2022-03-08T13:58:26.000Z
test_coverage.c
sternmull/yalloc
2d38f57d64f38eedc2c314e1c1090fb9cf26379f
[ "MIT" ]
1
2021-02-18T20:40:03.000Z
2021-02-19T15:52:02.000Z
test_coverage.c
sternmull/yalloc
2d38f57d64f38eedc2c314e1c1090fb9cf26379f
[ "MIT" ]
null
null
null
#include "yalloc/yalloc.h" #include <stdint.h> #include <memory.h> #include <assert.h> #include "test_util.h" // carefully crafted test sequence that covers all paths of the allocation function static void test_alloc_coverage() { uint32_t pool[MAX_POOL_SIZE / 4]; assert(!yalloc_init(pool, 15)); // path that rounds size down to alignment yalloc_deinit(pool); assert(yalloc_init(pool, 8)); // pool too small assert(yalloc_init(pool, MAX_POOL_SIZE + 1)); // pool too big assert(!yalloc_init(pool, MAX_POOL_SIZE)); // maximum pool size assert(!checked_alloc(pool, 0)); // allocating zero bytes should return NULL checked_free(pool, NULL); // freeing NULL should be ignored { void * all = checked_alloc(pool, yalloc_count_free(pool)); // allocate everything assert(all); void * nope = checked_alloc(pool, 1); // try to allocate with an empty free-list (this is the interesting case) assert(!nope); checked_free(pool, all); // free everything } { // try to allocate more than available while the free-list is non-empty void * p = checked_alloc(pool, sizeof(pool)); assert(!p); } void * a1 = checked_alloc(pool, 8); assert(a1); void * b = checked_alloc(pool, 16); assert(b); checked_free(pool, a1); { // occupy first block with exactly the same size as before void * a2 = checked_alloc(pool, 8); assert(a2 == a1); checked_free(pool, a2); } { // occupy first block with 1 byte less (test ceiling to alignment) void * a2 = checked_alloc(pool, 7); assert(a2 == a1); checked_free(pool, a2); } { // occupy first block with 4 bytes less, this leads to a padded allocation because 4 bytes are not enough for a free block (which is 8 bytes because it consistes of two list-nodes: one for address-order, one for free-list) void * a2 = checked_alloc(pool, 4); assert(a2 == a1); checked_free(pool, a2); } // allocation that can not be satisfied by the first element of the free list (so it will be iterated) void * c = checked_alloc(pool, 32); assert(c); checked_free(pool, c); // allocation that splits the first free block while that block has a pointer to a next free block void * c2 = checked_alloc(pool, 24); assert(c2 == c); yalloc_deinit(pool); } void test_free_coverage() { uint32_t pool[32]; yalloc_init(pool, sizeof(pool)); { // free a block with a free block before it void * a = checked_alloc(pool, 16); void * b = checked_alloc(pool, yalloc_count_free(pool)); checked_free(pool, a); // now b has free space before it (but not after it) checked_free(pool, b); } for (int withGap = 0; withGap < 2; ++withGap) { if (withGap) { // create a tiny free block at the beginning of the pool (so the free list has an additional element, which triggers additional code paths) void * gap = checked_alloc(pool, 8); checked_alloc(pool, 8); checked_free(pool, gap); } { // free block with free space after it void * a = checked_alloc(pool, 16); checked_free(pool, a); } { // free after a padded allocation void * a = checked_alloc(pool, 16); void * b = checked_alloc(pool, 16); checked_free(pool, a); void * a2 = checked_alloc(pool, 12); // reoccupy the space of a with a padded block assert(a2 == a); checked_free(pool, b); // free the block after the padded block } { // free a block with a free block before and after it void * a = checked_alloc(pool, 16); void * b = checked_alloc(pool, 16); checked_free(pool, a); // now b has free blocks on both sides checked_free(pool, b); } } yalloc_deinit(pool); } void test_count_free() { uint32_t pool[10]; yalloc_init(pool, sizeof(pool)); int n = yalloc_count_free(pool); assert(n == 32); { void * p = checked_alloc(pool, n); n = yalloc_count_free(pool); assert(n == 0); checked_free(pool, p); } void * a = checked_alloc(pool, 8); n = yalloc_count_free(pool); assert(n == 20); /*void * b =*/ checked_alloc(pool, 8); n = yalloc_count_free(pool); assert(n == 8); checked_free(pool, a); n = yalloc_count_free(pool); assert(n == 20); void * a2 = checked_alloc(pool, 4); // occupies the space of a, but will have padding assert(a2 == a); n = yalloc_count_free(pool); assert(n == 12); checked_alloc(pool, 8); n = yalloc_count_free(pool); assert(n == 0); yalloc_deinit(pool); } void test_used_block_iteration() { uint32_t pool[10]; yalloc_init(pool, sizeof(pool)); assert(!yalloc_first_used(pool)); void * a = checked_alloc(pool, 8); assert(yalloc_first_used(pool) == a); assert(!yalloc_next_used(pool, a)); void * b = checked_alloc(pool, 8); assert(yalloc_first_used(pool) == a); assert(yalloc_next_used(pool, a) == b); assert(!yalloc_next_used(pool, b)); checked_free(pool, a); assert(yalloc_first_used(pool) == b); assert(!yalloc_next_used(pool, b)); yalloc_deinit(pool); } void test_defragmentation_coverage() { uint32_t pool[MAX_POOL_SIZE / 4]; yalloc_init(pool, sizeof(pool)); { // defrag an empty pool assert(!yalloc_defrag_in_progress(pool)); yalloc_defrag_start(pool); assert(yalloc_defrag_in_progress(pool)); yalloc_defrag_commit(pool); assert(!yalloc_defrag_in_progress(pool)); } { // defrag pool with one allocation that is already defragmented void * a = checked_alloc(pool, 16); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, a) == a); yalloc_defrag_commit(pool); checked_free(pool, a); } { // defrag full pool with one allocation void * a = checked_alloc(pool, yalloc_count_free(pool)); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, a) == a); yalloc_defrag_commit(pool); checked_free(pool, a); } { // defrag full pool with one padded allocation void * a = checked_alloc(pool, yalloc_count_free(pool) - 4); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, a) == a); yalloc_defrag_commit(pool); checked_free(pool, a); } { // defrag pool with two allocations, first one is padded void * a = checked_alloc(pool, 16); void * b = checked_alloc(pool, 24); checked_free(pool, a); void * newA = checked_alloc(pool, 12); // creates a padded allocation where a was assert(a == newA); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, a) == a); void * newB = yalloc_defrag_address(pool, b); assert(newB == (char*)b - 4); yalloc_defrag_commit(pool); checked_free(pool, a); checked_free(pool, newB); } { // defrag pool with one allocation and a gap before it void * a = checked_alloc(pool, 16); void * b = checked_alloc(pool, 16); checked_free(pool, a); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, NULL) == NULL); void * newB = yalloc_defrag_address(pool, b); assert(newB == a); yalloc_defrag_commit(pool); void * all = checked_alloc(pool, yalloc_count_free(pool)); assert(all); checked_free(pool, all); checked_free(pool, newB); } { // defrag pool with two allocations and a gap between them void * a = checked_alloc(pool, 16); void * b = checked_alloc(pool, 24); void * c = checked_alloc(pool, 8); checked_free(pool, b); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, NULL) == NULL); void * newA = yalloc_defrag_address(pool, a); assert(newA == a); void * newC = yalloc_defrag_address(pool, c); assert(newC == (char*)pool + 4 + 16 + 4); yalloc_defrag_commit(pool); void * all = checked_alloc(pool, yalloc_count_free(pool)); assert(all); checked_free(pool, all); checked_free(pool, newA); checked_free(pool, newC); } { // defrag pool with two allocation and a gaps size_t initialFree = yalloc_count_free(pool); void * a = checked_alloc(pool, 20); void * b = checked_alloc(pool, 16); void * c = checked_alloc(pool, 8); void * d = checked_alloc(pool, 24); checked_free(pool, a); checked_free(pool, c); assert(yalloc_count_free(pool) == initialFree - (16 + 4) - (24 + 4)); yalloc_defrag_start(pool); assert(yalloc_defrag_address(pool, NULL) == NULL); void * newB = yalloc_defrag_address(pool, b); assert(newB == a); void * newD = yalloc_defrag_address(pool, d); assert(newD == (char*)pool + 16 + 4 + 4); yalloc_defrag_commit(pool); void * all = checked_alloc(pool, yalloc_count_free(pool)); assert(all); checked_free(pool, all); checked_free(pool, newB); checked_free(pool, newD); } yalloc_deinit(pool); } // This test misses a bunch of special cases. I still leave it heare... a test more never hurts. // The better test is test_defragmentation_coverage() which covers all cases of the defragmentation procedure. void test_defragmentation() { uint32_t pool[MAX_POOL_SIZE / 4]; yalloc_init(pool, sizeof(pool)); // defragment a pool that don't need defragementation for (int n = 0; n < 5; ++n) { // do so with n allocations void * ptrs[n]; for (int i = 0; i < n; ++i) ptrs[i] = checked_alloc(pool, i * 8); yalloc_defrag_start(pool); for (int i = 0; i < n; ++i) assert(yalloc_defrag_address(pool, ptrs[i]) == ptrs[i]); yalloc_defrag_commit(pool); for (int i = 0; i < n; ++i) checked_free(pool, ptrs[i]); } // defragment a pool that does need defragementation for (int freeOdd = 0; freeOdd < 2; ++freeOdd) { // at first round free the first, third, ... allocation, at the next free the second, fourth, ... for (int n = 0; n < 5; ++n) { // do a pass with n allocations void * ptrs[n]; int sizes[n]; // do the allocations for (int i = 0; i < n; ++i) { sizes[i] = i * 8; ptrs[i] = checked_alloc(pool, sizes[i]); } // free every second allcation (so we get holes in the pool) for (int i = freeOdd; i < n; i += 2) { checked_free(pool, ptrs[i]); ptrs[i] = NULL; } yalloc_defrag_start(pool); // check if the new addresses are reported correctly (should be pool + sum of allocations before them + their own header) for (int i = 0; i < n; ++i) { // for each allocation char * expectedNewAddr; if (!ptrs[i]) expectedNewAddr = NULL; else { expectedNewAddr = (char*)pool; for (int j = 0; j < i; ++j) { if (ptrs[j]) expectedNewAddr += yalloc_block_size(pool, ptrs[j]) + 4; } expectedNewAddr += 4; // header of the current allocation } void * newAddr = yalloc_defrag_address(pool, ptrs[i]); assert(newAddr == expectedNewAddr); ptrs[i] = newAddr; } yalloc_defrag_commit(pool); for (int i = 0; i < n; ++i) { checked_free(pool, ptrs[i]); } } } yalloc_deinit(pool); } int main() { test_used_block_iteration(); test_count_free(); test_alloc_coverage(); test_free_coverage(); test_defragmentation_coverage(); test_defragmentation(); return 0; }
27.70197
226
0.640171
9fa269ebaf284c1a0c1adc0a33813c94a14a47d2
3,117
c
C
cmd-confirm-before.c
dittonedo45/tmux2
ad364415d68bf8995f3edd961cc3828ff1300ebb
[ "ISC" ]
null
null
null
cmd-confirm-before.c
dittonedo45/tmux2
ad364415d68bf8995f3edd961cc3828ff1300ebb
[ "ISC" ]
null
null
null
cmd-confirm-before.c
dittonedo45/tmux2
ad364415d68bf8995f3edd961cc3828ff1300ebb
[ "ISC" ]
null
null
null
/* $OpenBSD$ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/types.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include "tmux.h" /* * Asks for confirmation before executing a command. */ static enum cmd_retval cmd_confirm_before_exec (struct cmd *, struct cmdq_item *); static int cmd_confirm_before_callback (struct client *, void *, const char *, int); static void cmd_confirm_before_free (void *); const struct cmd_entry cmd_confirm_before_entry = { .name = "confirm-before", .alias = "confirm", .args = {"p:t:", 1, 1}, .usage = "[-p prompt] " CMD_TARGET_CLIENT_USAGE " command", .flags = CMD_CLIENT_TFLAG, .exec = cmd_confirm_before_exec }; struct cmd_confirm_before_data { char *cmd; }; static enum cmd_retval cmd_confirm_before_exec (struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args (self); struct cmd_confirm_before_data *cdata; struct client *tc = cmdq_get_target_client (item); struct cmd_find_state *target = cmdq_get_target (item); char *cmd, *copy, *new_prompt, *ptr; const char *prompt; if ((prompt = args_get (args, 'p')) != NULL) xasprintf (&new_prompt, "%s ", prompt); else { ptr = copy = xstrdup (args->argv[0]); cmd = strsep (&ptr, " \t"); xasprintf (&new_prompt, "Confirm '%s'? (y/n) ", cmd); free (copy); } cdata = xmalloc (sizeof *cdata); cdata->cmd = xstrdup (args->argv[0]); status_prompt_set (tc, target, new_prompt, NULL, cmd_confirm_before_callback, cmd_confirm_before_free, cdata, PROMPT_SINGLE); free (new_prompt); return (CMD_RETURN_NORMAL); } static int cmd_confirm_before_callback (struct client *c, void *data, const char *s, __unused int done) { struct cmd_confirm_before_data *cdata = data; char *error; enum cmd_parse_status status; if (c->flags & CLIENT_DEAD) return (0); if (s == NULL || *s == '\0') return (0); if (tolower ((u_char) s[0]) != 'y' || s[1] != '\0') return (0); status = cmd_parse_and_append (cdata->cmd, NULL, c, NULL, &error); if (status == CMD_PARSE_ERROR) { cmdq_append (c, cmdq_get_error (error)); free (error); } return (0); } static void cmd_confirm_before_free (void *data) { struct cmd_confirm_before_data *cdata = data; free (cdata->cmd); free (cdata); }
26.193277
75
0.683349
d7557fcc068a16a35c8f09d396ddc4bb3fc60a63
1,506
c
C
programacao_estruturada/listas_6_8/lista_8/exercicio1.c
PedroHenrique-git/c
b8a9fcd988a80e0738506bb2fdea43ed7fcd5ece
[ "MIT" ]
null
null
null
programacao_estruturada/listas_6_8/lista_8/exercicio1.c
PedroHenrique-git/c
b8a9fcd988a80e0738506bb2fdea43ed7fcd5ece
[ "MIT" ]
null
null
null
programacao_estruturada/listas_6_8/lista_8/exercicio1.c
PedroHenrique-git/c
b8a9fcd988a80e0738506bb2fdea43ed7fcd5ece
[ "MIT" ]
null
null
null
#include <stdio.h> #include <conio.h> main() { const int registros = 256; struct TASCII { int codigo; char caractere; } ascii; FILE * arquivo; char c, nomeArquivo[80]; int i; char opcao; printf("*******************************\n"); printf("*** Manipulacao de arquivos ***\n"); printf("*******************************\n\n"); printf("Informe o nome (com caminho) do arquivo a ser usado: "); gets(nomeArquivo); arquivo = fopen(nomeArquivo, "wb+"); printf("\nARMAZENANDO DADOS NO ARQUIVO...\n"); for(i = 1; i < registros; i = i+1) { ascii.codigo = i-1; ascii.caractere = (char)(i-1); fwrite(&ascii, sizeof(struct TASCII), 1, arquivo); } //ADICIONANDO UM REGISTRO AO FINAL DO ARQUIVO fseek(arquivo, (registros-1) * sizeof(struct TASCII), 0); ascii.codigo = i-1; ascii.caractere = (char)(i-1); fwrite(&ascii, sizeof(struct TASCII), 1, arquivo); printf("\nLENDO DADOS DO ARQUIVO...\n"); printf("Tabela ASCII:\n"); rewind(arquivo); while(1) { fread(&ascii, sizeof(struct TASCII), 1, arquivo); if (feof(arquivo)) break; //Só encontramos o fim de arquivo após tentarmos ler um //registro e acabarmos lendo o fim de arquivo printf("%d\t%c\n" , ascii.codigo, ascii.caractere); } fclose(arquivo); printf("\nDeseja apagar o arquivo?\n"); printf("[S]im\n"); printf("[N]ao\n"); printf("[S/N]: "); scanf("\n%c", &opcao); if ((opcao == 'S') || (opcao == 's')) remove(nomeArquivo); getch(); }
21.211268
66
0.583665
ba471deb4b168ff71caa1070e5f878eba7ca905b
1,677
h
C
Modelica_DeviceDrivers/Resources/Include/MDDAVRDigital.h
hubertus65/Modelica_DeviceDrivers
79df766871e2451f65882fb69e1cfa784df3d792
[ "BSD-3-Clause" ]
29
2015-04-16T08:02:33.000Z
2019-02-22T03:06:16.000Z
Modelica_DeviceDrivers/Resources/Include/MDDAVRDigital.h
hubertus65/Modelica_DeviceDrivers
79df766871e2451f65882fb69e1cfa784df3d792
[ "BSD-3-Clause" ]
172
2015-02-06T11:10:55.000Z
2019-04-03T08:31:39.000Z
Modelica_DeviceDrivers/Resources/Include/MDDAVRDigital.h
hubertus65/Modelica_DeviceDrivers
79df766871e2451f65882fb69e1cfa784df3d792
[ "BSD-3-Clause" ]
20
2015-01-27T10:50:50.000Z
2019-03-15T11:13:17.000Z
#ifndef MDDAVRDIGITAL__H #define MDDAVRDIGITAL__H #if !defined(__AVR__) #error "The AVR package can only be used when targeting AVR CPUs" #endif #include <avr/io.h> #include <util/delay.h> /* Return only the port and not the pin in order to avoid malloc * Trust the user calls the following functions correctly... */ static inline void* MDD_avr_digital_pin_init(int port, int pin, int isOutput) { volatile uint8_t *ddr, *outp, *inp; switch (port) { #if defined(PORTA) case 1: outp = &PORTA; ddr = &DDRA; inp = &PINA; /* The address of 'PINx' is assigned to 'inp', hence it can be used to accept input */ break; #endif #if defined(PORTB) case 2: outp = &PORTB; ddr = &DDRB; inp = &PINB; break; #endif #if defined(PORTC) case 3: outp = &PORTC; ddr = &DDRC; inp = &PINC; break; #endif #if defined(PORTD) case 4: outp = &PORTD; ddr = &DDRD; inp = &PIND; break; #endif } if (isOutput) { *ddr |= (1<<(pin-1)); return (void*)outp; } else { /* If the pin is of type input then the corresponding pin is set as input using the DDR register and `inp` is returned */ *ddr &= ~(1<<(pin-1)); return (void*)inp; } } static inline void MDD_avr_digital_pin_close(void *in_port) { } static inline int MDD_avr_digital_pin_read(void *in_port, int pin) { volatile uint8_t *port = (volatile uint8_t *) in_port; return *port & (1<<(pin-1)) ? 1 : 0; } static inline void MDD_avr_digital_pin_write(void *in_port, int pin, int value) { volatile uint8_t *port = (volatile uint8_t *) in_port; if (value) { *port |= (1<<(pin-1)); } else { *port &= ~(1<<(pin-1)); } } #endif
21.5
124
0.634466
80b1e5686fd1b264c824b5ae3c38dcac180f8c55
6,476
h
C
iOS/Classes/Native/mscorlib_System_Security_Policy_CodeGroup4075050400MethodDeclarations.h
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "MIT" ]
11
2016-07-22T19:58:09.000Z
2021-09-21T12:51:40.000Z
iOS/Classes/Native/mscorlib_System_Security_Policy_CodeGroup4075050400MethodDeclarations.h
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "MIT" ]
1
2018-05-07T14:32:13.000Z
2018-05-08T09:15:30.000Z
iOS/Classes/Native/mscorlib_System_Security_Policy_CodeGroup4075050400MethodDeclarations.h
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "MIT" ]
null
null
null
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <assert.h> #include <exception> // System.Security.Policy.CodeGroup struct CodeGroup_t4075050400; // System.Security.Policy.IMembershipCondition struct IMembershipCondition_t23102852; // System.Security.Policy.PolicyStatement struct PolicyStatement_t313031467; // System.Security.SecurityElement struct SecurityElement_t2125293618; // System.Security.Policy.PolicyLevel struct PolicyLevel_t1214940608; // System.String struct String_t; // System.Collections.IList struct IList_t1751339649; // System.Object struct Il2CppObject; #include "codegen/il2cpp-codegen.h" #include "mscorlib_System_Security_Policy_PolicyStatement313031467.h" #include "mscorlib_System_Security_SecurityElement2125293618.h" #include "mscorlib_System_Security_Policy_PolicyLevel1214940608.h" #include "mscorlib_System_String7231557.h" #include "mscorlib_System_Security_Policy_CodeGroup4075050400.h" #include "mscorlib_System_Object4170816371.h" // System.Void System.Security.Policy.CodeGroup::.ctor(System.Security.Policy.IMembershipCondition,System.Security.Policy.PolicyStatement) extern "C" void CodeGroup__ctor_m2017258170 (CodeGroup_t4075050400 * __this, Il2CppObject * ___membershipCondition0, PolicyStatement_t313031467 * ___policy1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::.ctor(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) extern "C" void CodeGroup__ctor_m297504329 (CodeGroup_t4075050400 * __this, SecurityElement_t2125293618 * ___e0, PolicyLevel_t1214940608 * ___level1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.Policy.PolicyStatement System.Security.Policy.CodeGroup::get_PolicyStatement() extern "C" PolicyStatement_t313031467 * CodeGroup_get_PolicyStatement_m2982604484 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::set_PolicyStatement(System.Security.Policy.PolicyStatement) extern "C" void CodeGroup_set_PolicyStatement_m2181039707 (CodeGroup_t4075050400 * __this, PolicyStatement_t313031467 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Security.Policy.CodeGroup::get_Description() extern "C" String_t* CodeGroup_get_Description_m3483375035 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::set_Description(System.String) extern "C" void CodeGroup_set_Description_m3975256248 (CodeGroup_t4075050400 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.Policy.IMembershipCondition System.Security.Policy.CodeGroup::get_MembershipCondition() extern "C" Il2CppObject * CodeGroup_get_MembershipCondition_m1069806301 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.Security.Policy.CodeGroup::get_Name() extern "C" String_t* CodeGroup_get_Name_m2286683854 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::set_Name(System.String) extern "C" void CodeGroup_set_Name_m3619152003 (CodeGroup_t4075050400 * __this, String_t* ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.IList System.Security.Policy.CodeGroup::get_Children() extern "C" Il2CppObject * CodeGroup_get_Children_m3916364187 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::AddChild(System.Security.Policy.CodeGroup) extern "C" void CodeGroup_AddChild_m1295765677 (CodeGroup_t4075050400 * __this, CodeGroup_t4075050400 * ___group0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Security.Policy.CodeGroup::Equals(System.Object) extern "C" bool CodeGroup_Equals_m3162055676 (CodeGroup_t4075050400 * __this, Il2CppObject * ___o0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Security.Policy.CodeGroup::Equals(System.Security.Policy.CodeGroup,System.Boolean) extern "C" bool CodeGroup_Equals_m1198507690 (CodeGroup_t4075050400 * __this, CodeGroup_t4075050400 * ___cg0, bool ___compareChildren1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Security.Policy.CodeGroup::GetHashCode() extern "C" int32_t CodeGroup_GetHashCode_m2557386080 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::FromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) extern "C" void CodeGroup_FromXml_m2137875188 (CodeGroup_t4075050400 * __this, SecurityElement_t2125293618 * ___e0, PolicyLevel_t1214940608 * ___level1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::ParseXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) extern "C" void CodeGroup_ParseXml_m3164368567 (CodeGroup_t4075050400 * __this, SecurityElement_t2125293618 * ___e0, PolicyLevel_t1214940608 * ___level1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.SecurityElement System.Security.Policy.CodeGroup::ToXml() extern "C" SecurityElement_t2125293618 * CodeGroup_ToXml_m2549202689 (CodeGroup_t4075050400 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.SecurityElement System.Security.Policy.CodeGroup::ToXml(System.Security.Policy.PolicyLevel) extern "C" SecurityElement_t2125293618 * CodeGroup_ToXml_m1708899516 (CodeGroup_t4075050400 * __this, PolicyLevel_t1214940608 * ___level0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Security.Policy.CodeGroup::CreateXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) extern "C" void CodeGroup_CreateXml_m2354317026 (CodeGroup_t4075050400 * __this, SecurityElement_t2125293618 * ___element0, PolicyLevel_t1214940608 * ___level1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Security.Policy.CodeGroup System.Security.Policy.CodeGroup::CreateFromXml(System.Security.SecurityElement,System.Security.Policy.PolicyLevel) extern "C" CodeGroup_t4075050400 * CodeGroup_CreateFromXml_m3390181618 (Il2CppObject * __this /* static, unused */, SecurityElement_t2125293618 * ___se0, PolicyLevel_t1214940608 * ___level1, const MethodInfo* method) IL2CPP_METHOD_ATTR;
80.95
237
0.842959
2a2d906000ed4ba525cc641dc950eddff62b8ed1
588
c
C
server/src/models/mx_model_user.c
viacheslavpleshkov/unit-factory-ucode-uchat
e9a6f910f9ad5ad2bf3e572b1e5840d8fcac5c3c
[ "MIT" ]
1
2020-07-25T14:07:42.000Z
2020-07-25T14:07:42.000Z
server/src/models/mx_model_user.c
viacheslavpleshkov/unit-factory-ucode-uchat
e9a6f910f9ad5ad2bf3e572b1e5840d8fcac5c3c
[ "MIT" ]
null
null
null
server/src/models/mx_model_user.c
viacheslavpleshkov/unit-factory-ucode-uchat
e9a6f910f9ad5ad2bf3e572b1e5840d8fcac5c3c
[ "MIT" ]
3
2020-07-11T19:09:21.000Z
2021-01-14T13:43:48.000Z
#include "uchat_server.h" char *mx_model_user_database(void) { return "sqlite3"; } char *mx_model_user_name_table(void) { return "users"; } char **mx_model_user_fill_table(void) { char **fill_table = malloc(sizeof(char*) * 8); fill_table[0] = mx_strdup("id"); fill_table[1] = mx_strdup("first_name"); fill_table[2] = mx_strdup("last_name"); fill_table[3] = mx_strdup("login"); fill_table[4] = mx_strdup("password"); fill_table[5] = mx_strdup("token"); fill_table[6] = mx_strdup("create_at"); fill_table[7] = NULL; return fill_table; }
23.52
50
0.659864
4a5ab2fa2a9bc5abbfb2ad14184fe923ca14f8ca
11,999
c
C
hid_test_buttons/Core/Src/main.c
joaomorenorf/STM32F401-Joystick-Shield
99926d9cae607cdbae8ae06a99d5e8e952ca878d
[ "Unlicense" ]
1
2021-12-04T05:31:53.000Z
2021-12-04T05:31:53.000Z
hid_test_buttons/Core/Src/main.c
joaomorenorf/STM32F401-Joystick-Shield
99926d9cae607cdbae8ae06a99d5e8e952ca878d
[ "Unlicense" ]
null
null
null
hid_test_buttons/Core/Src/main.c
joaomorenorf/STM32F401-Joystick-Shield
99926d9cae607cdbae8ae06a99d5e8e952ca878d
[ "Unlicense" ]
null
null
null
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under Ultimate Liberty license * SLA0044, the "License"; You may not use this file except in compliance with * the License. You may obtain a copy of the License at: * www.st.com/SLA0044 * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "usb_device.h" #include "usbd_hid.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ ADC_HandleTypeDef hadc1; /* USER CODE BEGIN PV */ USBD_HandleTypeDef hUsbDeviceFS; /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_ADC1_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ uint32_t Read_JSVRx(void); uint32_t Read_JSVRy(void); uint32_t Read_JSSW(void); void CONFIG_ADC_CHANNEL(uint32_t channel); int8_t Read_Left(); int8_t Read_Right(); int8_t Read_Up(); int8_t Read_Down(); /* USER CODE END 0 */ /** * @brief The application entry point. * @retval int */ int main(void) { /* USER CODE BEGIN 1 */ // HID Mouse struct mouseHID_t { uint8_t buttons; int8_t x; int8_t y; int8_t wheel; }; struct mouseHID_t mouseHID; uint8_t * buff = (uint8_t *) &mouseHID; mouseHID.buttons = 0; mouseHID.x = 0; mouseHID.y = 0; mouseHID.wheel = 0; /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USB_DEVICE_Init(); MX_ADC1_Init(); /* USER CODE BEGIN 2 */ int8_t buttonl = 0, buttonr = 0, buttonu = 0, buttond = 0; int8_t buttonu_last = 0, buttond_last = 0; /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ // Send HID reportz int32_t rx = (int32_t) Read_JSVRx(); int32_t ry = (int32_t) Read_JSVRy(); mouseHID.x = (rx - 2047) / 256; mouseHID.y = -(ry - 2047) / 256; buttonl = Read_Left(); buttonr = Read_Right(); buttonu = Read_Up(); buttond = Read_Down(); if (buttonl) mouseHID.buttons = 1; else if (buttonr) mouseHID.buttons = 2; else if (buttonu && !buttonu_last) mouseHID.wheel = 5; else if (buttond && !buttond_last) mouseHID.wheel = -5; else mouseHID.buttons = 0; buttonu_last = buttonu; buttond_last = buttond; USBD_HID_SendReport(&hUsbDeviceFS, buff, sizeof(struct mouseHID_t)); HAL_Delay(5); } /* USER CODE END 3 */ } /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Configure the main internal regulator output voltage */ __HAL_RCC_PWR_CLK_ENABLE(); __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2); /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLM = 4; RCC_OscInitStruct.PLL.PLLN = 72; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4; RCC_OscInitStruct.PLL.PLLQ = 3; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK) { Error_Handler(); } } /** * @brief ADC1 Initialization Function * @param None * @retval None */ static void MX_ADC1_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.ScanConvMode = DISABLE; hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.DiscontinuousConvMode = DISABLE; hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.NbrOfConversion = 1; hadc1.Init.DMAContinuousRequests = DISABLE; hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV; if (HAL_ADC_Init(&hadc1) != HAL_OK) { Error_Handler(); } /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time. */ sConfig.Channel = ADC_CHANNEL_0; sConfig.Rank = 1; sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES; if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN ADC1_Init 2 */ /* USER CODE END ADC1_Init 2 */ } /** * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { GPIO_InitTypeDef GPIO_InitStruct = {0}; /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOH_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET); /*Configure GPIO pin : B1_Pin */ GPIO_InitStruct.Pin = B1_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct); /*Configure GPIO pins : PA2 PA3 */ GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF7_USART2; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /*Configure GPIO pin : LD2_Pin */ GPIO_InitStruct.Pin = LD2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct); /*Configure GPIO pins : JSTK_START_Pin JSTK_RIGHT_Pin JSTK_LEFT_Pin JSTK_DOWN_Pin */ GPIO_InitStruct.Pin = JSTK_START_Pin|JSTK_RIGHT_Pin|JSTK_LEFT_Pin|JSTK_DOWN_Pin; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /*Configure GPIO pins : JSTK_SELECT_Pin JSTK_JOYSTICK_Pin */ GPIO_InitStruct.Pin = JSTK_SELECT_Pin|JSTK_JOYSTICK_Pin; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /*Configure GPIO pin : JSTK_UP_Pin */ GPIO_InitStruct.Pin = JSTK_UP_Pin; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(JSTK_UP_GPIO_Port, &GPIO_InitStruct); } /* USER CODE BEGIN 4 */ uint32_t Read_JSVRx(void) { uint32_t val = 0; if (HAL_ADC_GetState(&hadc1) != HAL_ADC_STATE_REG_BUSY) { CONFIG_ADC_CHANNEL(ADC_CHANNEL_0); HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1, 100); val = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1); } return val; } uint32_t Read_JSVRy(void) { uint32_t val = 0; if (HAL_ADC_GetState(&hadc1) != HAL_ADC_STATE_REG_BUSY) { CONFIG_ADC_CHANNEL(ADC_CHANNEL_1); HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1, 100); val = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1); } return val; } uint32_t Read_JSSW(void) { return 0; } void CONFIG_ADC_CHANNEL(uint32_t channel) { ADC_ChannelConfTypeDef sConfig; sConfig.Channel = channel; sConfig.Rank = 1; sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES; if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK) { Error_Handler(); } } //Fim do void CONFIG_ADC_CHANNEL (uint32_t channel) int8_t Read_Left() { int8_t clicked=0; clicked = !HAL_GPIO_ReadPin(JSTK_JOYSTICK_GPIO_Port, JSTK_JOYSTICK_Pin); clicked |= !HAL_GPIO_ReadPin(JSTK_LEFT_GPIO_Port, JSTK_JOYSTICK_Pin); clicked |= !HAL_GPIO_ReadPin(JSTK_SELECT_GPIO_Port, JSTK_JOYSTICK_Pin); return clicked; } int8_t Read_Right() { int8_t clicked = 0; clicked = !HAL_GPIO_ReadPin(JSTK_RIGHT_GPIO_Port, JSTK_JOYSTICK_Pin); clicked |= !HAL_GPIO_ReadPin(JSTK_START_GPIO_Port, JSTK_JOYSTICK_Pin); return clicked; } int8_t Read_Up() { int8_t clicked = 0; clicked = HAL_GPIO_ReadPin(JSTK_UP_GPIO_Port, JSTK_JOYSTICK_Pin); return clicked; } int8_t Read_Down() { int8_t clicked = 0; clicked = HAL_GPIO_ReadPin(JSTK_DOWN_GPIO_Port, JSTK_JOYSTICK_Pin); return clicked; } /* USER CODE END 4 */ /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ /* USER CODE END Error_Handler_Debug */ } #ifdef USE_FULL_ASSERT /** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval None */ void assert_failed(uint8_t *file, uint32_t line) { /* USER CODE BEGIN 6 */ /* User can add his own implementation to report the file name and line number, tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* USER CODE END 6 */ } #endif /* USE_FULL_ASSERT */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
28.637232
114
0.647554
9a07bb599042e231bde8a8fcbb7fc573db2ee589
86,570
h
C
include/powv34.h
eder-matheus/flute3
03798146ce9544885f747b930b837aff7a303aaa
[ "BSD-3-Clause" ]
1
2021-03-04T02:35:43.000Z
2021-03-04T02:35:43.000Z
include/powv34.h
eder-matheus/flute3
03798146ce9544885f747b930b837aff7a303aaa
[ "BSD-3-Clause" ]
null
null
null
include/powv34.h
eder-matheus/flute3
03798146ce9544885f747b930b837aff7a303aaa
[ "BSD-3-Clause" ]
null
null
null
#include <string> void initPOWV34() { std::vector<std::string> powv_temp = {"A5$E", "BA$1", "B5$E", "95$E", "D5$E", "057319", "057314", "057314", "057314", "057315", "057316", "057317", "057318", "057319", "057319", "057315", "057315", "H", "01ABC5D$", "1DE$5", "23$D", "29AB$1", "43$D", "45$DE", "134$CD", "79A$1", "723$B", "9D$3", "8D6E$A", "B5$E", "C4$D", "9456$A", "AC56$A", "FDE$5", "G3$D", "057332", "I", "01ABC5D$", "19A$1", "2DE$5", "33$D", "31$9A", "53$D", "234$CD", "71$9A", "8D6E$B", "99$1", "A5$E", "B4$D", "B1$9", "C1$9", "E23$A", "D2C$A", "GDE$5", "H3$D", "R", "01A3BCDE$", "15$E", "2C$3", "36$C", "24$D", "19A$1", "65$E", "7C$3", "86$C", "74$D", "8DE$5", "B1$9A", "A6E$C", "D5$E", "DD$AB", "F5$E", "F1$9", "G4$D", "G1$9", "I1$9", "HB$D", "L5$E", "H23$A", "N5$E", "O4$D", "OC$3", "NCD$3", "I", "01ABC56$", "19A$1", "2CD$6", "3E$5", "43$C", "33$C", "41$9A", "73$C", "75$E", "85$E", "134E$BC", "B9$1", "C5$E", "D1$9", "B23$A", "FC$3", "F5$E", "G5$E", "E", "01ABC56$", "19A$1", "2CDE$56", "33$C", "31$9A", "53$C", "134E$BC", "79$1", "85$E", "91$9", "723$A", "BC$3", "B5$E", "C5$E", "057337", "057316", "057316", "057334", "E", "09BC5D$", "11$9", "1DE$5", "33$D", "31$9", "41$9", "134$CD", "71$9", "7D6E$B", "95$E", "91$9", "A4$D", "C1$9", "A1$9", "057342", "M", "09BCC5D$", "13$C", "16$C", "11$9", "2E$5", "51$9", "24$D", "21$9", "71$9", "31$9", "1DE$5", "B1$9", "76E$C", "D5$E", "DD$B", "D1$9", "E4$B", "ED$B", "E1$9", "F1$9", "H1$9", "I1$9", "E", "09BC56$", "11$9", "1CD$6", "3E$5", "43$C", "41$9", "33$C", "31$9", "51$9", "71$9", "134E$BC", "B5$E", "B1$9", "C1$9", "A", "09BC56$", "11$9", "1CDE$56", "33$C", "31$9", "41$9", "134E$BC", "75$E", "71$9", "81$9", "057346", "057317", "057317", "057335", "057344", "G", "093CDE$", "15$E", "11$9", "24$D", "21$9", "41$9", "2BC$3", "76$C", "71$9", "81$9", "7DE$5", "B1$9", "46E$C", "D5$E", "D1$9", "E1$9", "057352", "G", "09BC56$", "13$B", "11$9", "2D$6", "4E$5", "51$9", "41$9", "21$9", "1CD$6", "9E$5", "A1$9", "91$9", "24E$C", "D5$E", "D1$9", "E1$9", "C", "09BC56$", "13$B", "11$9", "21$9", "24E$C", "55$E", "51$9", "61$9", "2DE$56", "91$9", "9BC$3", "B1$9", "057355", "057318", "057318", "057336", "057345", "057354", "C", "09BDE$", "15$E", "13$B", "11$9", "26$D", "23$B", "21$9", "53$B", "51$9", "31$9", "61$9", "81$9", "057362", "8", "09BDE$", "13$B", "11$9", "21$9", "09B56$", "53$B", "51$9", "61$9", "057364", "057319", "057319", "057337", "057346", "057355", "057364", "C", "09BDE$", "15$D", "13$B", "11$9", "26$E", "23$B", "21$9", "53$B", "51$9", "31$9", "61$9", "81$9", "057372", "057372", "057319", "057319", "057337", "057346", "057355", "057364", "057372", "8", "09BD$", "15$D", "13$B", "11$9", "23$B", "21$9", "31$9", "51$9", "057382", "057312", "057312", "057314", "057315", "057316", "057317", "057318", "F", "09A3456$", "12C$9", "21$A", "33$C", "4A$1", "1ABC$34", "61$A", "6CD$5", "8E$6", "93$C", "91$A", "83$C", "81$A", "A1$A", "C1$A", "057391", "057314", "057314", "057314", "057315", "057316", "057317", "057318", "057391", "057391", "057315", "057315", "057332", "057332", "057334", "057335", "057336", "E", "09A3456$", "11$9", "223$A", "3C$3", "2BC$34", "59A$1", "6CD$5", "7E$6", "83$C", "73$C", "81$9A", "B3$C", "B6$E", "C6$E", "057409", "057316", "057316", "057334", "057342", "057342", "057344", "057345", "C", "09BC56$", "11$9", "1CD$5", "3E$6", "43$C", "41$9", "33$C", "31$9", "51$9", "71$9", "134$BC", "B1$9", "057418", "057317", "057317", "057335", "057344", "057352", "057352", "057354", "E", "09BC56$", "13$B", "11$9", "2D$5", "4E$6", "51$9", "41$9", "24$C", "21$9", "81$9", "1CD$5", "BE$6", "C1$9", "B1$9", "057427", "057318", "057318", "057336", "057345", "057354", "057362", "057362", "C", "09BDE$", "16$E", "13$B", "11$9", "25$D", "23$B", "21$9", "53$B", "51$9", "31$9", "61$9", "81$9", "057436", "057391", "057391", "057409", "057418", "057427", "057436", "8", "09BE$", "16$E", "13$B", "11$9", "23$B", "21$9", "31$9", "51$9", "057444", "057444", "057391", "057391", "057409", "057418", "057427", "057436", "057444", "4", "09B$", "093$", "01B$", "013$", "057454", "054432", "054432", "054434", "054435", "054436", "054437", "054438", "H", "0123456$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "52A3$5", "89$6", "9C$1", "AB$2", "B6$9", "A6$9", "BCD$3", "E1$C", "E6$9", "F6$9", "057463", "054434", "054434", "054434", "054435", "054436", "054437", "054438", "057463", "057463", "054435", "054435", "054452", "054452", "054454", "054455", "054456", "M", "01923456$", "1C$1", "15$9", "2B$2", "45$9", "25$9", "41D$3", "7C$1", "75$9", "85$9", "7E$94", "BC$1", "B2A3$6", "D9$5", "EC$1", "FB$2", "G5$9", "F5$9", "GCD$3", "J1$C", "J5$9", "K5$9", "057481", "054436", "054436", "054454", "054462", "054462", "054464", "054465", "W", "0192A3456$", "1C$1", "15$9", "25$9", "4B$2", "2AB$2", "6E$A", "61D$3", "8C$1", "82$A", "92$A", "85$9A", "CC$1", "2DE$A", "E5$9", "F4$E", "G3$D", "CE$45", "IC$1", "I23$6", "K9$5", "LC$1", "M5$9", "K4$A", "OC$1", "NB$2", "MAB$2", "RCD$3", "S1$C", "S5$9A", "U1$C", "H12$C", "057490", "054437", "054437", "054455", "054464", "054472", "054472", "054474", "`", "01ABC5D6E$", "1CD$6", "23$D", "32$C", "3B$1", "34$1", "49$5", "56$3", "62$A", "7BC$1", "AA$2", "B1D$3", "CBC$1", "2BC$1", "145$E", "F3$D", "GE$1", "H9$5", "HB$E", "H4$E", "G2$C", "L9$5", "IAB$E", "N2$A", "N1D$3", "PC$1", "Q2$A", "P2$AB", "Q5$9A", "I2D$A", "U5$9", "V4$E", "W1$B", "XA$C", "YE$4", "Z9$5", "Y3$D", "\\2$A", "]C$2", "^B$1", "44$AB", "057499", "054438", "054438", "054456", "054465", "054474", "054482", "054482", "V", "012345DE$", "1B$1", "2A$2", "396$D", "45$9", "54$E", "51C$E", "7D$3", "8B$1", "7B$1", "31C$4", "BD$3", "CB$1", "C6$D", "D6$D", "D3$D", "B92$5", "HB$1", "IA$2", "892$5", "K3$D", "LB$1", "KB$1", "MA$2", "OD$3", "62D$A", "Q1$B", "R3$D", "SB$1", "JBCD$3", "U1$B", "057508", "057463", "057463", "057481", "057490", "057499", "057508", "K", "012345E$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "64$D", "456$E", "8B$1", "892$5", "AB$1", "BA$2", "5923$5", "DB$1", "EA$2", "FBC$3", "G1$B", "1456$E", "IB$1", "JA$2", "057516", "057516", "057463", "057463", "057481", "057490", "057499", "057508", "057516", "C", "012345$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "64$D", "5923$5", "8B$1", "9A$2", "ABC$3", "B1$B", "057526", "054504", "054504", "054506", "054507", "054508", "054509", "054510", "H", "01923456$", "1C$1", "15$9", "2B$2", "45$9", "25$9", "41D$3", "7C$1", "75$9", "85$9", "7E$94", "BC$1", "B92A3$56", "DC$1", "EB$2", "FCD$3", "G1$C", "057535", "054506", "054506", "054506", "054507", "054508", "054509", "054510", "057535", "057535", "054507", "054507", "054452", "054452", "054454", "054455", "054456", "057481", "057481", "054508", "054508", "054454", "054462", "054462", "054464", "054465", "057490", "057490", "054509", "054509", "054455", "054464", "054472", "054472", "054474", "057499", "057499", "054510", "054510", "054456", "054465", "054474", "054482", "054482", "057508", "057508", "057535", "057535", "057481", "057490", "057499", "057508", "057516", "057516", "057516", "057535", "057535", "057481", "057490", "057499", "057508", "057516", "057526", "057526", "054576", "054576", "054578", "054579", "054580", "054581", "054582", "W", "0192A3456$", "1C$1", "15$9", "25$9", "4B$2", "2AB$2", "6E$A", "61D$3", "8C$1", "82$A", "92$A", "85$9A", "CC$1", "2DE$A", "E5$9", "F4$E", "G3$D", "E1B$9", "IC$1", "CE$45", "KC$1", "H12$C", "A3E$45", "NA$6", "OC$1", "PB$2", "P6$A", "QCD$3", "S1$C", "P4D$A", "U3$D", "V12$C", "057607", "054578", "054578", "054578", "054579", "054580", "054581", "054582", "057607", "057607", "054579", "054579", "054596", "054596", "054598", "054599", "054600", "W", "0192A3456$", "1C$1", "2AB$2", "3E$A", "35$A", "31D$3", "6C$1", "65$A", "62$A", "75$A", "72$A", "6E$A4", "CC$1", "C23$5", "EA$6", "FC$1", "GB$2", "G6$A", "E4$9", "I4$9", "KD$6", "L3$D", "HCD$3", "N1$C", "24D$9", "P5$A", "Q3$D", "RA$5", "J23$6", "QE$45", "R12$C", "VA$5", "057625", "054580", "054580", "054598", "054606", "054606", "054608", "054609", "]", "0192A3456$", "1C$1", "2AB$2", "3E$A", "35$A", "31D$3", "6C$1", "65$A", "62$A", "75$A", "72$A", "6E$A4", "CC$1", "D3B$6", "EA$5", "FCD$3", "G1$C", "G5$A", "H5$A", "F2$AB", "K1$C", "L45$A", "MC$1", "ND$9", "N3$9", "OA$5", "Q6$D", "Q3$D", "R1$C", "M23$9", "UA$5", "24D$9", "W5$A", "X3$D", "YA$5", "XE$45", "Y12$C", "\\A$5", "057634", "054581", "054581", "054599", "054608", "054616", "054616", "054618", "q", "019ABC5D6E$", "1CD$6", "23$D", "3B$1", "34$1", "4A$5", "62$A", "46$3", "52$A", "9D$9", "93$9", "61D$3", "CBC$1", "D5$AB", "145$E", "F3$D", "F2$5", "GB$1", "G4$1", "IA$5", "K2$A", "K1D$3", "MC$1", "N5$A", "N2$A", "KE$AB", "32$C5", "R46$9", "74D$9", "T1$B", "U3$D", "T6$D", "T3$D", "V2$C", "Y5$A", "Z4$B", "91$BC", "\\A6$C", "]45$E", "^3$D", "_2$A", "`C$2", "`B$9", "^C$A", "bA$5", "dC$2", "eE$1", "fB$E", "eD$3", "hB$1", "]B$DE", "96$9C", "`DE$9", "lA$5", "l4$E", "n3$D", "cB$19", "p3$D", "057643", "054582", "054582", "054600", "054609", "054618", "054626", "054626", "k", "0192345DE$", "1B$1", "2A$2", "36$D", "445$E", "31C$4", "6D$3", "7B$1", "76$D", "86$D", "83$D", "62$5", "CB$1", "BA$5", "945$E", "F3$D", "F2$5", "FB$1", "G2$5", "GB$1", "JB$1", "HB$1", "IA$5", "N3$D", "C4D$9", "PB$1", "P6$D", "P3$D", "Q6$D", "Q3$D", "2CD$9", "V6$D", "V3$D", "X4$C", "J4D$9", "Z3$D", "ZB$1", "[B$1", "52D$A", "^1$B", "_3$D", "`B$1", "^C$9", "aE$9", "a4$9", "aC$9", "cA$5", "Y12$B", "EBCD$3", "h1$B", "_234$9", "j3$D", "057652", "057607", "057607", "057625", "057634", "057643", "057652", "V", "0192345E$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "64$D", "523$5", "8B$1", "84$9", "9A$2", "94$9", "BBC$3", "D1$B", "456$E", "F2$5", "FB$1", "GB$1", "HA$5", "2CD$9", "K4$D", "L3$C", "G34$9", "NB$1", "L56$E", "P9$C", "Q1$B", "QA$2", "Q34$9", "M12$B", "T12$B", "057660", "057660", "057607", "057607", "057625", "057634", "057643", "057652", "057660", "I", "0192345$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "64$D", "523$5", "8B$1", "84$9", "9A$2", "94$9", "BBC$3", "D1$B", "2CD$9", "F4$D", "G3$C", "H12$B", "057670", "054648", "054648", "054650", "054651", "054652", "054653", "054654", "f", "01ABC5D6E$", "1BC$1", "145$E", "33$D", "4E$1", "59$5", "5B$E", "54$E", "42$C", "99$5", "6AB$E", "B2$A", "B1D$3", "DC$1", "E2$A", "D2$AB", "E5$9A", "62D$A", "I5$9", "IC$9", "J4$E", "KA$2", "L1$B", "NA$C", "OE$4", "P9$5", "O3$D", "R2$A", "SC$2", "TB$1", "QC$9A", "E3E$45", "WB$6", "X1$B", "X4$B", "YD$3", "Y2$C", "W2$A", "XCD$3", "\\4D$B", "_3$D", "_C$A", "`2$A", "`C$A", "aB$1", "d3$D", "\\6$AB", "057679", "054650", "054650", "054650", "054651", "054652", "054653", "054654", "057679", "057679", "054651", "054651", "054668", "054668", "054670", "054671", "054672", "n", "019ABC5D6E$", "123$5", "24$9", "2AB$6", "4C$2", "5B$1", "66$B", "64$B", "5D$3", "72$A", "A4$9", "BD$6", "C1$B", "D3$D", "C3$D", "E2$C", "6CD$3", "44D$B", "I3$D", "75$A3", "145$E", "L3$D", "L2$5", "MB$1", "M4$1", "OA$5", "Q2$A", "Q1D$3", "SC$1", "T5$A", "T2$A", "QE$AB", "M2$C5", "XDE$B", "YC$A", "Z45$E", "[A$C", "\\3$D", "]2$A", "^C$2", "^B$9", "`A$5", "aC$2", "bE$1", "cB$E", "bD$3", "eB$1", "ZB$19", "^DE$9", "hA$5", "hC$5", "h4$E", "k3$D", "[B$19", "m3$D", "057697", "054652", "054652", "054670", "054678", "054678", "054680", "054681", "f", "019ABC5D6E$", "123$5", "2B$6", "3C$2", "4D$3", "44$1", "4AB$1", "76$B", "85$3", "94$E", "7CD$3", "A3$CD", "C1$A", "C4$A", "DD$3", "F2$B", "F5$B", "D5$B", "I4$1", "CE$AB", "24$9A", "K2D$9", "62D$9", "N6$D", "N3$D", "D2$BC", "Q34$A", "R5$B", "SD$3", "RD$3", "R2$9", "RC$9", "UC$9", "TE$45", "J2D$9", "Z3$D", "ZB$5", "[E$5", "]B$E", "N1$AB", "_9$C", "`3$D", "a2$9", "aC$9", "VDE$B", "d45$E", "e3$D", "057706", "054653", "054653", "054671", "054680", "054688", "054688", "054690", "n", "0192A3BCDE$", "14D$A", "25$B", "23$D", "2C$9", "3A$D", "33$D", "42$9", "4C$9", "26$9D", "36$CD", "1BC$2", "CA$1", "D4$A", "CD$3", "F5$B", "G3$D", "H4$1", "D56$3", "J4$E", "JCD$6", "LB$5", "K3$CD", "N1$A", "N4$A", "OD$3", "Q2$B", "Q5$B", "O5$B", "T4$1", "NE$AB", "G6$CD", "724$9", "X6$C", "B45$E", "Z3$D", "[B$5", "\\D$3", "\\2$9", "\\C$9", "]C$9", "V2D$9", "E2D$9", "b5$B", "c3$D", "b6$D", "b3$D", "O2$BC", "U2D$9", "h3$D", "hB$5", "iE$5", "kB$E", "Y45$E", "m3$D", "057715", "054654", "054654", "054672", "054681", "054690", "054698", "054698", "q", "09A3B456E$", "1D$6", "145$E", "212$B", "4CD$A", "53$D", "56$D", "64$C", "82$9", "8B$9", "A6$D", "BA$1", "BC$E", "AA$1", "EC$4", "FD$3", "GB$5", "G6$D", "H6$D", "H3$D", "DD$3", "5B$95", "M6$D", "M3$D", "856$D", "PA$E", "P4$E", "PC$E", "QD$3", "TC$A", "RB$9", "VA$1", "WC$4", "XD$3", "YB$5", "XB$5", "21C$4", "\\D$3", "]6$D", "\\B$5", "_A$1", "`4$A", "_2$B", "`5D$3", "c6$D", "d4$E", "e3$D", "f1$A", "f4$A", "e1$A", "g2$B", "g5$B", "i2$B", "i5$B", "cBC$5", "n1$AB", "R23$9", "pD$3", "057724", "057679", "057679", "057697", "057706", "057715", "057724", "`", "09AA3B45E$", "1D$A", "11$A", "14$A", "32$B", "3C$3", "6D$4", "1BC$3", "8D$4", "93$5", "A1$A", "A4$A", "86$E", "D1$A", "BC$3", "B2$B", "C2$9", "E2$B", "E5$B", "H5$B", "K4$D", "L1$A", "M9$B", "ND$4", "N3$C", "P2$9", "PB$9", "M6$E", "RA$1", "9BC$5", "D34$A", "V2$9", "W5$B", "G4$9A", "N56$E", "ZA$C", "456$E", "[34$A", "]2$9", "]B$9", "_A$1", "057732", "057732", "057679", "057679", "057697", "057706", "057715", "057724", "057732", "Q", "09AA3B45$", "1D$A", "11$A", "14$A", "32$B", "3C$3", "6D$4", "1BC$3", "8D$4", "93$5", "A1$A", "A4$A", "BC$3", "B2$B", "C2$9", "F5$B", "G4$D", "H1$A", "I9$B", "JD$4", "J3$C", "L2$9", "LB$9", "NA$1", "9BC$5", "E4$9A", "057742", "054720", "054720", "054722", "054723", "054724", "054725", "054726", "Y", "09A3B456E$", "15$9", "1D$9", "24$E", "32$A", "51$B", "645$E", "73$D", "7B$1", "8B$1", "21C$E", "BD$3", "CB$1", "BB$1", "C92$5", "F3$D", "GB$1", "FB$1", "HA$2", "JD$3", "CE$45", "LB$1", "JDE$45", "N4$6", "N2$A", "P1$B", "NBC$6", "RD$3", "S1$B", "R1$B", "O2D$A", "V1$B", "W3$D", "V3$D", "057751", "054722", "054722", "054722", "054723", "054724", "054725", "054726", "057751", "057751", "054723", "054723", "054740", "054740", "054742", "054743", "054744", "g", "09A3B456E$", "12D$A", "21$B", "2C$9", "345$E", "53$D", "5B$1", "6B$1", "7C$9", "8E$9", "84$9", "8C$9", "AD$5", "AA$5", "145$E", "F1C$4", "GD$3", "H2$5", "HB$1", "G2$5", "GB$1", "KB$1", "IB$1", "JA$5", "O3$D", "OE$A4", "Q1$B", "R23$5", "SB$1", "S4$9", "TA$2", "V4$6", "T4$9", "UD$6", "YB$1", "Y3$D", "Z3$D", "VBC$6", "]D$3", "^1$B", "]1$B", "K4D$9", "a3$D", "aB$1", "bB$1", "D12$B", "e45$E", "f3$D", "057769", "054724", "054724", "054742", "054750", "054750", "054752", "054753", "i", "09A3B456E$", "145$E", "21C$4", "3B$5", "4A$1", "5D$3", "54$A", "6E$4", "83$5", "91$A", "61$A", "AC$6", "CD$3", "A2$B", "42$B", "B2$B", "B5$B", "9BC$6", "ID$3", "94$A6", "81$AB", "E4$9A", "MD$6", "N3$D", "K2D$9", "P6$D", "P3$D", "Q5$B", "72D$9", "T5$B", "U3$D", "V4$C", "W1$A", "X9$B", "YE$4", "ZD$5", "[2$9", "ZA$E", "ZC$E", "]D$3", "_C$A", "VB$5", "[A$34", "bC$A", "[B$9D", "dA$1", "dC$E", "fD$3", "Y23$9", "hD$3", "057778", "054725", "054725", "054743", "054752", "054760", "054760", "054762", "U", "09A3456E$", "145$E", "2C$5", "3AB$4", "4D$3", "41$A", "5E$4", "73$5", "8C$6", "9D$3", "A1$A", "91$A", "81$A", "71$A", "51$A", "323$9", "GE$C", "H1$A", "IC$E", "JD$3", "KA$1", "I45$E", "MA$1", "KE$45", "OD$6", "PA$1", "P3$D", "Q6$D", "Q3$D", "Q9$2D", "057787", "054726", "054726", "054744", "054753", "054762", "054770", "054770", "X", "09A3456E$", "1D$6", "2C$5", "145$E", "4C$5", "3AB$4", "61$A", "6CD$3", "85$C", "81$A", "96$D", "91$A", "B4$E", "B1$A", "D3$D", "F1$A", "D1$A", "32D$9", "I1$A", "J6$D", "J3$D", "I6$D", "I3$D", "523$9", "OE$C", "P1$A", "QD$6", "QC$E", "RA$1", "SD$3", "UA$1", "Q45$E", "WA$1", "057796", "057751", "057751", "057769", "057778", "057787", "057796", "R", "09A345DE$", "1C$5", "14$D", "22$9", "41$A", "1AB$D", "6C$3", "61$A", "7D$4", "9C$5", "A3$C", "A1$A", "B1$A", "91$A", "76$E", "71$A", "F1$A", "356$E", "IC$5", "J2$9", "KE$6", "L1$A", "M3$C", "M6$E", "NA$1", "I234$9", "Q1$A", "057804", "057804", "057751", "057751", "057769", "057778", "057787", "057796", "057804", "J", "09A345D$", "1C$5", "14$D", "22$9", "41$A", "1AB$D", "6C$3", "61$A", "7D$4", "9C$5", "A3$C", "A1$A", "B1$A", "91$A", "71$A", "32C$9", "G1$A", "H3$C", "IA$1", "057814", "C", "012345$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "52A3$5", "8C$1", "9B$2", "ACD$3", "B1$C", "057816", "J", "0192345$", "1C$1", "2B$2", "156$9", "4C$1", "5B$2", "31D$3", "7E$4", "8C$1", "86$9", "94$E", "96$9", "756$9", "DC$1", "82A3$5", "FC$1", "GB$2", "HCD$3", "I1$C", "X", "0192A345$", "1C$1", "156$9", "3C$1", "4B$2", "2AB$2", "61D$3", "7E$4", "8C$1", "94$E", "823$5", "BC$1", "B6$A", "B4$A", "CB$2", "C6$A", "C4$A", "FCD$3", "I1$C", "86$9A", "KC$1", "726$A", "MC$1", "66E$A", "M5$92", "PC$1", "4DE$A", "R9$5", "R4$E", "T3$D", "S1B$9", "VC$1", "U12$C", "d", "0192A3B45$", "1BC$1", "2A$2", "31D$3", "4E$4", "5BC$1", "63$5", "64$E", "71$B", "76$B", "74$B", "86$B", "9D$3", "92$C", "A2$A", "B2$A", "C2$A", "6CD$5", "E6$AB", "J4$6", "C5$9A", "156$9", "MC$2", "NE$1", "O9$5", "OB$E", "O4$E", "ND$3", "P2D$A", "T5$9", "TC$9", "U4$E", "VA$2", "W1$B", "YA$C", "ZE$4", "[9$5", "Z3$D", "]2$A", "^C$2", "_B$1", "\\C$9A", "H1$BC", "XB$34", "c1$BC", "[", "09A3B456E$", "15$9", "1D$9", "24$E", "32$A", "51$B", "645$E", "73$D", "7B$1", "8B$1", "21C$E", "BD$3", "CB$1", "BB$1", "C92$5", "FB$1", "GA$2", "HBC$6", "IE$4", "JD$5", "K3$D", "K1$B", "L1$B", "J1$B", "I1$B", "L6$BC", "Q4$6", "Q2$A", "R2$A", "S1$B", "U4$6", "R5$DE", "W2$A", "X1$B", "CE$45", "ZB$1", "W", "0123456E$", "1B$1", "2A$2", "145$E", "4B$1", "5A$2", "31C$3", "7D$4", "8B$1", "7B$1", "75$E", "A5$E", "792$E", "DB$1", "EA$2", "F3D$6", "GE$5", "H6$4", "I2$A", "H2$A", "G2$A", "J1$B", "M4$6", "N5$E", "IBC$3", "PD$6", "Q4$D", "Q1$B", "R5$E", "R1$B", "P1$B", "T1$B", "R", "0123456E$", "1B$1", "2A$2", "145$E", "4B$1", "5A$2", "31C$3", "7D$4", "8B$1", "7B$1", "75$E", "A5$E", "792$E", "DB$1", "EA$2", "8923$5", "G4$6", "GB$1", "HB$1", "IA$2", "K4$6", "KBC$3", "MD$6", "N4$D", "N1$B", "O1$B", "M1$B", "057823", "057818", "057818", "057818", "057819", "057820", "057821", "057822", "057823", "057823", "057819", "057819", "W", "0192A345$", "1C$1", "2AB$2", "31D$3", "4E$4", "5C$1", "56$A", "64$E", "66$A", "523$5", "AC$1", "A6$A", "BB$2", "B6$A", "DCD$3", "F1$C", "A4$9A", "HC$1", "456$A", "J2$5", "JC$1", "KC$1", "36E$A", "N5$E", "2DE$9", "P6$A", "P4$E", "R3$D", "Q45$E", "T3$D", "U12$C", "VA$56", "057836", "k", "0192A3B45$", "1BC$1", "2A$2", "31D$3", "4E$4", "5BC$1", "63$5", "64$E", "71$B", "76$B", "74$B", "86$B", "9D$3", "92$C", "A2$A", "C5$A", "C2$A", "6CD$5", "66$AB", "E6$AB", "56$AB", "B2$9A", "M5$C", "N4$E", "O1$B", "P3$D", "Q2$C", "QB$1", "356$A", "T1$B", "UD$3", "V2$5", "U4$1", "K4$96", "UE$15", "N6$AB", "[19$B", "\\A$C", "\\45$E", "^A$C", "_3$D", "`2$A", "aC$2", "aB$9", "aDE$9", "dA$5", "dC$5", "d4$E", "g3$D", "^B$19", "i3$D", "Q6E$1", "g", "09A3B456E$", "12D$A", "21$B", "2C$9", "345$E", "53$D", "5B$1", "6B$1", "7C$9", "8E$9", "84$9", "8C$9", "AD$5", "AA$5", "145$E", "F1C$4", "GD$3", "H2$5", "HB$1", "GB$1", "IB$1", "JA$5", "MBC$6", "NE$4", "OD$5", "P3$D", "P1$B", "Q1$B", "O1$B", "N1$B", "Q6$BC", "V4$6", "V2$A", "X1$B", "V5$A3", "Z1$B", "W5$DE", "\\2$A", "]1$B", "W2$9A", "_1$B", "^4D$9", "a3$D", "aB$1", "bB$1", "D12$B", "e45$E", "f3$D", "b", "01923456E$", "1B$1", "2A$2", "145$E", "4B$1", "5A$2", "5C$9", "7E$5", "8D$4", "83$C", "31C$3", "BD$4", "CB$1", "BB$1", "B5$E", "B2$E", "EA$E", "H5$A", "H2$A", "H3D$6", "KE$5", "L6$4", "M2$A", "K2$A", "N1$B", "O1$B", "Q4$9", "O4$9", "R6$D", "TB$1", "MBC$3", "VD$6", "W4$D", "W1$B", "X5$E", "X1$B", "V1$B", "Z1$B", "L2$9A", "^1$B", "534$9", "A12$B", "a45$E", "[", "01923456E$", "1B$1", "2A$2", "145$E", "4B$1", "5A$2", "5C$9", "7E$5", "8D$4", "83$C", "31C$3", "BD$4", "CB$1", "BB$1", "B5$E", "B2$E", "EA$E", "H5$A", "H2$A", "C23$5", "KB$1", "LA$2", "M4$6", "MBC$3", "OD$6", "P4$D", "P1$B", "Q1$B", "O1$B", "N2$9A", "U1$B", "G34$9", "WB$1", "534$9", "A12$B", "Z45$E", "057841", "057820", "057820", "057838", "e", "0192A3B45$", "1DE$A", "26$B", "24$E", "43$D", "52$9", "5C$9", "4C$9", "345$E", "93$D", "2C$95", "1BC$2", "CA$1", "DE$A", "D4$A", "E6$B", "CD$3", "HE$4", "I6$B", "ICD$5", "K3$D", "L2$C", "L4$1", "M6$B", "N2$9", "P5$C", "Q6$B", "Q4$E", "S3$D", "LAB$1", "U5$3", "V4$E", "V6$B", "U6$B", "W6$B", "VCD$5", "J24$E", "\\5$2", "]3$D", "^4$1", "_2D$9", "`3$D", "aE$5", "3234$9", "c45$E", "d3$D", "057846", "j", "09A3B456E$", "1BC$6", "2A$E", "31$A", "34$A", "2D$5", "62$9", "42$B", "3D6$3", "9E$4", "A3$5", "B1$A", "91$A", "CC$6", "ED$3", "F5$D", "G4$E", "C2$B", "D2$B", "D5$B", "K3$D", "BBC$6", "MD$3", "N5$D", "O4$E", "A1$AB", "145$E", "52D$9", "S3$D", "71$AB", "U45$E", "V3$D", "756$B", "X45$E", "Y3$D", "Z4$C", "[1$A", "\\9$B", "]E$4", "^D$5", "_2$9", "^A$E", "^C$E", "aD$3", "cC$A", "_A$34", "eC$A", "_B$9D", "gA$1", "]23$9", "iD$3", "j", "0123B4CDE$", "1AB$1", "29$2", "3A6$4", "45$3", "41$A", "6C$3", "7D$6", "84$D", "95$E", "62$B", "A3$C", "CA$1", "D4$A", "C2$B", "E6$D", "G2$9", "E2$9", "HE$B", "JD$4", "J3$C", "J5$E", "L1$A", "N9$B", "OC$3", "O2$9", "PD$4", "P5$E", "SA$C", "5BC$5", "UD$6", "V4$D", "W5$E", "54$DE", "Y1$A", "ZE$B", "[D$4", "[3$C", "[2$E", "[5$E", "]A$1", "`D$A", "`4$A", "]2$B", "b5$E", "O45$E", "e2$9", "eB$9", "gA$1", "PB$9E", "iD$6", "b", "0123B4CDE$", "1AB$1", "29$2", "3A6$4", "45$3", "41$A", "6C$3", "7D$6", "84$D", "62$B", "5BC$5", "BD$6", "C4$D", "54$DE", "E1$A", "FE$B", "GD$4", "G3$C", "G2$E", "G5$E", "IA$1", "LD$A", "L4$A", "I2$B", "N5$E", "E34$A", "Q2$9", "RE$B", "SD$4", "S3$C", "S5$E", "U1$A", "W9$B", "XC$3", "X2$9", "YD$4", "Y5$E", "\\A$C", "X45$E", "^2$9", "^B$9", "`A$1", "YB$9E", "057850", "057821", "057821", "057839", "057848", "V", "09A3456E$", "1C$6", "2D$5", "32$9", "24$E", "41$A", "145$E", "2AB$E", "81$A", "8CD$3", "AE$4", "BD$5", "C3$D", "C1$A", "D6$C", "D1$A", "B6$C", "B1$A", "A6$C", "A1$A", "F1$A", "H1$A", "J1$A", "523$9", "O1$A", "PD$3", "QA$1", "P6E$C", "SA$1", "S45$E", "UA$1", "057856", "Y", "09A34CDE$", "12$9", "21$A", "156$C", "44$D", "55$E", "5C$E", "7D$6", "72$9", "82$9", "91$A", "BD$6", "4AB$D", "D1$A", "DC$3E", "F1$A", "FCD$6", "HE$5", "ID$4", "J6$D", "J1$A", "I1$A", "K3$C", "K5$C", "K1$A", "H3$C", "H1$A", "N1$A", "O1$A", "Q1$A", "523$9", "V1$A", "W45$E", "XA$1", "R", "09A34CDE$", "12$9", "21$A", "156$C", "44$D", "55$E", "5C$E", "72$9", "81$A", "4AB$D", "A1$A", "AC$3E", "C1$A", "CDE$4", "EC$5", "FD$6", "G4$D", "G1$A", "H1$A", "F3$C", "F1$A", "K1$A", "E1$A", "523$9", "O1$A", "P45$E", "QA$1", "057859", "057822", "057822", "057840", "057849", "057858", "J", "09A34DE$", "12$9", "21$A", "1AB$3", "45$E", "41$A", "56$D", "51$A", "71$A", "4CD$4", "A6$D", "A1$A", "B1$A", "145$E", "E6$D", "F2$9", "E2$9", "G1$A", "ID$6", "057866", "E", "09A34DE$", "12$9", "21$A", "1AB$3", "41$A", "4CD$4", "66$D", "61$A", "71$A", "456$DE", "A1$A", "A34$AB", "C2$9", "D1$A", "057868", "057823", "057823", "057841", "057850", "057859", "057868", "H", "09A34DE$", "12$9", "21$A", "1AB$3", "4C$4", "51$A", "45$D", "41$A", "76$E", "71$A", "91$A", "145$D", "C6$E", "C2$9", "D2$9", "E1$A", "G6$E", "057876", "057876", "057823", "057823", "057841", "057850", "057859", "057868", "057876", "C", "09A34D$", "12$9", "21$A", "1AB$3", "4C$4", "51$A", "45$D", "41$A", "71$A", "145$D", "A2$9", "B1$A", "057886", "057816", "057816", "057818", "057819", "057820", "057821", "057822", "J", "0123456$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "4B$1", "5923$5", "8B$1", "9A$2", "ABC$3", "B1$B", "BDE$6", "D4$D", "D1$B", "E1$B", "E3$BC", "H2$A", "I1$B", "057895", "057818", "057818", "057818", "057819", "057820", "057821", "057822", "057895", "057895", "057819", "057819", "057836", "057836", "057838", "057839", "057840", "P", "01923456$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "4B$1", "523$5", "8B$1", "84$9", "9A$2", "94$9", "AE$6", "DB$1", "BBC$3", "F1$B", "FDE$6", "H4$D", "H1$B", "I1$B", "I3$BC", "2CD$9", "M4$D", "N3$C", "O12$B", "057913", "057820", "057820", "057838", "057846", "057846", "057848", "057849", "X", "09AA3B456$", "11$A", "1D$A", "14$A", "22$B", "2C$3", "6D$4", "1BC$3", "8D$4", "93$5", "A1$A", "A4$A", "BC$3", "B2$B", "CE$6", "F2$9", "C2$9", "H5$B", "I4$D", "J1$A", "K9$B", "L3$C", "M2$9", "MB$9", "LD$4", "OA$1", "9BC$5", "RDE$6", "S4$D", "S1$AB", "U4$D", "E4$9A", "WE$6", "057922", "057821", "057821", "057839", "057848", "057856", "057856", "057858", "Q", "09A34CDE$", "16$E", "12$9", "25$C", "44$D", "22$9", "31$A", "76$E", "4AB$D", "9C$3", "91$A", "AD$4", "CC$5", "D3$C", "D1$A", "E1$A", "C1$A", "A1$A", "DDE$6", "J4$D", "J1$A", "K1$A", "52C$9", "N1$A", "O3$C", "PA$1", "057931", "057822", "057822", "057840", "057849", "057858", "057866", "057866", "J", "09A34DE$", "16$E", "12$9", "22$9", "31$A", "56$E", "1AB$3", "76$E", "71$A", "8C$4", "A1$A", "85$D", "81$A", "C1$A", "ADE$6", "F1$A", "245$D", "H2$9", "I1$A", "057940", "057895", "057895", "057913", "057922", "057931", "057940", "E", "09A34E$", "16$E", "12$9", "22$9", "31$A", "56$E", "1AB$3", "7C$4", "86$E", "81$A", "94$C", "91$A", "71$A", "B1$A", "057948", "057948", "057895", "057895", "057913", "057922", "057931", "057940", "057948", "7", "09A34$", "12$9", "21$A", "1AB$3", "4C$4", "51$A", "41$A", "057958", "054936", "054936", "054938", "054939", "054940", "054941", "054942", "O", "012A3456$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "523$5", "8C$1", "9B$2", "89A$6", "BC$1", "CB$2", "DCD$3", "E1$C", "E6$9A", "G1$C", "C4D$A", "I3$D", "J12$C", "2DE$A", "L4$E", "M3$D", "N12$C", "057967", "054938", "054938", "054938", "054939", "054940", "054941", "054942", "057967", "057967", "054939", "054939", "054956", "054956", "054958", "054959", "054960", "Y", "0192A3456$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "523$5", "8A$6", "9C$1", "AB$2", "B6$A", "A6$A", "BCD$3", "E1$C", "E6$A", "F6$A", "A4D$A", "I3$D", "I5$9", "J5$9", "K6$A", "M3$D", "J12$C", "O5$9", "P6$A", "2DE$A", "R4$E", "R5$9", "S3$D", "S5$9", "U5$9", "U12$C", "X5$9", "057985", "054940", "054940", "054958", "054966", "054966", "054968", "054969", "V", "0192A3456$", "1C$1", "2AB$2", "3E$A", "35$A", "31D$3", "6C$1", "65$A", "62$A", "75$A", "72$A", "6E$A4", "CC$1", "D3B$6", "EA$5", "FCD$3", "G1$C", "G5$A", "H5$A", "F2$AB", "K1$C", "L45$A", "MC$1", "ND$9", "N3$9", "M6$1B", "Q5$9", "R4$E", "S3$D", "M23$9", "T12$C", "057994", "054941", "054941", "054959", "054968", "054976", "054976", "054978", "d", "019ABC5D6E$", "1CD$6", "23$D", "3B$1", "34$1", "4A$5", "62$A", "46$3", "52$A", "96$C", "A5$9", "9D$9", "93$9", "B4$E", "E3$D", "61D$3", "GBC$1", "H5$AB", "145$E", "J3$D", "J2$5", "KB$1", "K4$1", "MA$5", "O2$A", "O1D$3", "QC$1", "R5$A", "R2$A", "OE$AB", "32$C5", "A1$B6", "WA6$C", "X45$E", "Y3$D", "Z2$A", "[C$2", "[B$9", "YC$A", "XB$DE", "[DE$9", "`4$E", "a3$D", "`C$56", "cB$4", "058003", "054942", "054942", "054960", "054969", "054978", "054986", "054986", "`", "0192345DE$", "1B$1", "2A$2", "36$D", "445$E", "31C$4", "6D$3", "7B$1", "76$D", "86$D", "83$D", "62$5", "CB$1", "BA$5", "945$E", "F3$D", "F2$5", "FB$1", "G2$5", "GB$1", "JB$1", "HB$1", "IA$5", "N3$D", "2CD$9", "P3$D", "Q4$C", "52D$A", "S1$B", "T3$D", "UB$1", "SC$9", "VE$9", "V4$9", "VC$9", "WE$4", "R12$B", "EBCD$3", "]1$B", "T234$9", "_3$D", "058012", "057967", "057967", "057985", "057994", "058003", "058012", "R", "0192345E$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "64$D", "523$5", "8B$1", "9A$2", "ABC$3", "B1$B", "456$E", "D2$5", "DB$1", "EB$1", "FA$5", "2CD$9", "I4$D", "J3$C", "J56$E", "L9$C", "M1$B", "MA$2", "M34$9", "K12$B", "P12$B", "058020", "058020", "057967", "057967", "057985", "057994", "058003", "058012", "058020", "G", "0192345$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "64$D", "523$5", "8B$1", "9A$2", "ABC$3", "B1$B", "2CD$9", "D4$D", "E3$C", "F12$B", "058030", "055008", "055008", "055010", "055011", "055012", "055013", "055014", "V", "0192A3456$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "523$5", "8A$6", "9C$1", "AB$2", "B6$A", "A6$A", "BCD$3", "E1$C", "E6$A", "F6$A", "A4D$A", "I3$D", "J12$C", "2DE$A", "L4$E", "L5$9", "M3$D", "M5$9", "O5$9", "O12$C", "R5$9", "I56$9A", "T3$D", "U12$C", "058039", "055010", "055010", "055010", "055011", "055012", "055013", "055014", "058039", "058039", "055011", "055011", "054956", "054956", "054958", "054959", "054960", "057985", "057985", "055012", "055012", "054958", "054966", "054966", "054968", "054969", "057994", "057994", "055013", "055013", "054959", "054968", "054976", "054976", "054978", "058003", "058003", "055014", "055014", "054960", "054969", "054978", "054986", "054986", "058012", "058012", "058039", "058039", "057985", "057994", "058003", "058012", "058020", "058020", "058020", "058039", "058039", "057985", "057994", "058003", "058012", "058020", "058030", "058030", "055080", "055080", "055082", "055083", "055084", "055085", "055086", "V", "0192A3456$", "1C$1", "2AB$2", "3E$A", "35$A", "31D$3", "6C$1", "65$A", "62$A", "75$A", "72$A", "6E$A4", "CC$1", "C23$5", "EA$6", "FC$1", "GB$2", "G6$A", "HCD$3", "J1$C", "G4D$A", "L3$D", "M12$C", "2DE$A", "O5$9", "P4$E", "Q3$D", "R12$C", "L56$9A", "T3$D", "U12$C", "058111", "055082", "055082", "055082", "055083", "055084", "055085", "055086", "058111", "058111", "055083", "055083", "054596", "054596", "054598", "054599", "054600", "057625", "057625", "055084", "055084", "054598", "054606", "054606", "054608", "054609", "057634", "057634", "055085", "055085", "054599", "054608", "054616", "054616", "054618", "057643", "057643", "055086", "055086", "054600", "054609", "054618", "054626", "054626", "057652", "057652", "058111", "058111", "057625", "057634", "057643", "057652", "057660", "057660", "057660", "058111", "058111", "057625", "057634", "057643", "057652", "057660", "057670", "057670", "055152", "055152", "055154", "055155", "055156", "055157", "055158", "i", "019ABC5D6E$", "123$5", "2AB$6", "3C$2", "4B$1", "56$B", "54$B", "4D$3", "62$A", "5CD$3", "34D$B", "B3$D", "BC$A", "C2$A", "CC$A", "DB$1", "G3$D", "65$A3", "145$E", "J3$D", "J2$5", "KB$1", "K4$1", "MA$5", "O2$A", "O1D$3", "QC$1", "R5$A", "R2$A", "OE$AB", "U2D$A", "V1$B", "WA$C", "V5$9", "Y4$E", "Z3$D", "W45$E", "\\A$C", "]3$D", "^2$A", "_C$2", "_B$9", "XB$DE", "VCD$9", "c3$D", "_DE$9", "eC$5", "e4$E", "fB$4", "g3$D", "058183", "055154", "055154", "055154", "055155", "055156", "055157", "055158", "058183", "058183", "055155", "055155", "054668", "054668", "054670", "054671", "054672", "057697", "057697", "055156", "055156", "054670", "054678", "054678", "054680", "054681", "057706", "057706", "055157", "055157", "054671", "054680", "054688", "054688", "054690", "057715", "057715", "055158", "055158", "054672", "054681", "054690", "054698", "054698", "057724", "057724", "058183", "058183", "057697", "057706", "057715", "057724", "057732", "057732", "057732", "058183", "058183", "057697", "057706", "057715", "057724", "057732", "057742", "057742", "055224", "055224", "055226", "055227", "055228", "055229", "055230", "b", "09A3B456E$", "12D$A", "21$B", "345$E", "43$D", "4B$1", "5B$1", "6C$9", "7E$9", "74$9", "7C$9", "9D$5", "CC$4", "DD$3", "E5$D", "145$E", "G1C$4", "HD$3", "I2$5", "IB$1", "H2$5", "HB$1", "LB$1", "JB$1", "KA$5", "P3$D", "PE$A4", "R1$B", "S23$5", "TB$1", "UA$2", "V4$6", "VBC$6", "XD$3", "Y1$B", "X1$B", "W2D$A", "\\1$B", "]3$D", "\\3$D", "C12$B", "`45$E", "a3$D", "058255", "055226", "055226", "055226", "055227", "055228", "055229", "055230", "058255", "058255", "055227", "055227", "054740", "054740", "054742", "054743", "054744", "057769", "057769", "055228", "055228", "054742", "054750", "054750", "054752", "054753", "057778", "057778", "055229", "055229", "054743", "054752", "054760", "054760", "054762", "057787", "057787", "055230", "055230", "054744", "054753", "054762", "054770", "054770", "057796", "057796", "058255", "058255", "057769", "057778", "057787", "057796", "057804", "057804", "057804", "058255", "058255", "057769", "057778", "057787", "057796", "057804", "057814", "057814", "G", "012A345$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "523$5", "8C$1", "9B$2", "ACD$3", "B1$C", "2DE$A", "D4$E", "E3$D", "F12$C", "058320", "N", "0192A345$", "1C$1", "2B$2", "31D$3", "4E$4", "5C$1", "64$E", "523$5", "8C$1", "9B$2", "ACD$3", "B1$C", "2DE$A", "D4$E", "E3$D", "D56$9", "G4$E", "H3$D", "F12$C", "J56$9", "GBCD$5", "L3$D", "M12$C", "W", "0192A345$", "1C$1", "2AB$2", "31D$3", "4E$4", "5C$1", "56$A", "64$E", "66$A", "523$5", "AC$1", "A6$A", "A4$A", "BB$2", "B6$A", "B4$A", "ECD$3", "H1$C", "456$A", "J2$5", "JC$1", "KC$1", "36E$A", "N5$E", "N2D$AB", "P5$9", "Q4$E", "R3$D", "S12$C", "PBCD$9", "U3$D", "V12$C", "g", "0192A3B45$", "1BC$1", "2A$2", "31D$3", "4E$4", "5BC$1", "63$5", "64$E", "71$B", "76$B", "74$B", "86$B", "9D$3", "92$C", "A2$A", "B2$A", "C5$A", "C2$A", "6CD$5", "66$AB", "E6$AB", "L4$6", "56$AB", "356$A", "O1$B", "PD$3", "Q2$5", "P4$1", "PE$15", "T2D$A", "U1$B", "VA$C", "U5$9", "X4$E", "Y3$D", "V45$E", "[A$C", "\\3$D", "]2$A", "^C$2", "^B$9", "UCD$9", "a3$D", "^DE$9", "cC$5", "c4$E", "dB$4", "e3$D", "d", "09A3B456E$", "12D$A", "21$B", "345$E", "43$D", "4B$1", "5B$1", "6C$9", "7E$9", "74$9", "7C$9", "9D$5", "CC$4", "DD$3", "E5$D", "145$E", "G1C$4", "HD$3", "I2$5", "IB$1", "HB$1", "JB$1", "KA$5", "NBC$6", "OE$4", "PD$5", "Q3$D", "Q1$B", "R1$B", "P1$B", "O1$B", "R6$BC", "W4$6", "W2$A", "X2$A", "Y1$B", "[4$6", "W5$A3", "]1$B", "X5$DE", "_2$A", "`1$B", "C12$B", "b45$E", "c3$D", "^", "01923456E$", "1B$1", "2A$2", "145$E", "4B$1", "5A$2", "5C$9", "7E$5", "8D$4", "83$C", "31C$3", "BD$4", "CB$1", "BB$1", "B5$E", "B2$E", "EA$E", "H5$A", "H2$A", "H3D$6", "KE$5", "L6$4", "M2$A", "L2$A", "K2$A", "N1$B", "Q4$6", "R5$E", "MBC$3", "TD$6", "U4$D", "U1$B", "V5$E", "V1$B", "T1$B", "X1$B", "534$9", "A12$B", "]45$E", "Y", "01923456E$", "1B$1", "2A$2", "145$E", "4B$1", "5A$2", "5C$9", "7E$5", "8D$4", "83$C", "31C$3", "BD$4", "CB$1", "BB$1", "B5$E", "B2$E", "EA$E", "H5$A", "H2$A", "C23$5", "K4$6", "KB$1", "LB$1", "MA$2", "O4$6", "OBC$3", "QD$6", "R4$D", "R1$B", "S1$B", "Q1$B", "534$9", "A12$B", "X45$E", "058327", "058322", "058322", "058322", "058323", "058324", "058325", "058326", "058327", "058327", "058323", "058323", "057836", "057836", "057838", "057839", "057840", "057841", "057841", "058324", "058324", "057838", "057846", "057846", "057848", "057849", "057850", "057850", "058325", "058325", "057839", "057848", "057856", "057856", "057858", "057859", "057859", "058326", "058326", "057840", "057849", "057858", "057866", "057866", "057868", "057868", "058327", "058327", "057841", "057850", "057859", "057868", "057876", "057876", "057876", "058327", "058327", "057841", "057850", "057859", "057868", "057876", "057886", "057886", "058320", "058320", "058322", "058323", "058324", "058325", "058326", "N", "01923456$", "1B$1", "2A$2", "31C$3", "4D$4", "5B$1", "4B$1", "523$5", "8B$1", "9A$2", "ABC$3", "B1$B", "BDE$6", "D4$D", "D1$B", "E1$B", "E3$BC", "H2$A", "I1$B", "2CD$9", "K4$D", "L3$C", "M12$B", "058399", "058322", "058322", "058322", "058323", "058324", "058325", "058326", "058399", "058399", "058323", "058323", "057836", "057836", "057838", "057839", "057840", "057913", "057913", "058324", "058324", "057838", "057846", "057846", "057848", "057849", "057922", "057922", "058325", "058325", "057839", "057848", "057856", "057856", "057858", "057931", "057931", "058326", "058326", "057840", "057849", "057858", "057866", "057866", "057940", "057940", "058399", "058399", "057913", "057922", "057931", "057940", "057948", "057948", "057948", "058399", "058399", "057913", "057922", "057931", "057940", "057948", "057958", "057958", "055440", "055440", "055442", "055443", "055444", "055445", "055446", "\\", "01ABC5D6E$", "14$E", "23$D", "3E$1", "4B$E", "44$E", "32$C", "1CD$5", "83$D", "92$C", "9B$1", "B5$3", "C4$E", "8BC$1", "42D$A", "F1$B", "GA$C", "H4$E", "G4$E", "F4$E", "I3$D", "L2$A", "MC$2", "NB$1", "E9AB$6", "P3$CD", "Q1$B", "Q4$B", "RD$3", "R2$C", "U4D$B", "V3$D", "VC$A", "W2$A", "WC$A", "XB$1", "[3$D", "058471", "055442", "055442", "055442", "055443", "055444", "055445", "055446", "058471", "058471", "055443", "055443", "055460", "055460", "055462", "055463", "055464", "k", "019ABC5D6E$", "14$E", "23$D", "3E$1", "4B$E", "44$E", "32$C", "1CD$5", "83$D", "92$C", "9B$1", "B5$3", "C4$E", "8AB$6", "E3$D", "FB$1", "G4$B", "F2$C", "GCD$3", "J6$AB", "I4D$B", "L3$D", "LC$A", "M2$A", "MC$A", "NB$1", "N5$9", "Q3$D", "Q5$9", "O5$9", "P5$9", "S5$9", "U6$A", "42D$A", "Y1$B", "ZA$C", "[4$E", "Z4$E", "Y4$E", "Y5$9", "\\3$D", "`2$A", "aC$2", "bB$1", "^5$9", "c5$9", "YCD$9", "f3$D", "aB5$9", "hDE$B", "i4$E", "j3$D", "058489", "055444", "055444", "055462", "055470", "055470", "055472", "055473", "l", "019ABC5D6E$", "14$E", "23$D", "32$C", "1CD$5", "5B$6", "63$D", "53$D", "72$C", "96$B", "94D$B", "B5$A", "B3$D", "C6$B", "C3$D", "CC$9", "E3$D", "F2$9", "FC$9", "EA$CD", "K5$A", "K4$E", "L4$E", "M3$D", "O5$A", "7AB$1", "Q6$B", "Q4$B", "R5$3", "T4$E", "S5$A", "V6$B", "QCD$3", "X6$B", "U3$CD", "ZE$B", "[4$E", "[5$A", "\\5$A", "LBC$9", "_A$1", "_4$E", "`4$E", "a3$D", "c2$C", "cA$1", "W2D$9", "fB$6", "f3$D", "g3$D", "dDE$B", "j4$E", "k3$D", "058498", "055445", "055445", "055463", "055472", "055480", "055480", "055482", "e", "0192A3BCDE$", "1BC$2", "2A$1", "2D$3", "45$B", "53$D", "64$1", "356$3", "84$E", "8CD$6", "AB$5", "93$CD", "CE$B", "D1$A", "D5$A", "C1$A", "E5$E", "F4$E", "GD$3", "J2$B", "J5$B", "56$CD", "145$B", "ND$A", "O3$D", "N6$C", "Q5$A", "R4$E", "S3$D", "OBC$9", "UA$1", "U3$D", "V3$D", "W2$C", "Y4$B", "QB$DE", "RBC$9", "\\A$1", "\\4$E", "]4$E", "^3$D", "`2$C", "`A$1", "Z56$C", "c4$E", "d3$D", "058507", "055446", "055446", "055464", "055473", "055482", "055490", "055490", "l", "09A3B45DE$", "1A6$D", "21$A", "25$A", "44$E", "2BC$E", "6D$3", "61$A", "7E$4", "9D$6", "71$A", "82$B", "85$B", "B2$B", "B5$B", "ABC$5", "G1$AB", "A3$5D", "I1$A", "J2$B", "J5$B", "LD$3", "M6$D", "112$B", "OCD$A", "P3$D", "PB$9", "Q4$C", "QB$9", "S2$9", "SB$9", "RA$1", "W3$D", "VA$1", "P56$D", "Z4$E", "ZB$9", "[A$C", "]3$D", "^E$A", "_4$E", "_C$E", "_B$9", "`B$9", "aB$9", "[B$9", "bA$1", "\\A$1", "f4$E", "fC$E", "g4$E", "`23$9", "kD$3", "058516", "058471", "058471", "058489", "058498", "058507", "058516", "\\", "09AA3B45E$", "1D$A", "11$A", "14$A", "32$B", "3C$3", "6D$4", "1BC$3", "8D$4", "93$5", "A1$A", "86$E", "C1$A", "BC$3", "B2$B", "D2$B", "D5$B", "9BC$5", "22C$9", "J1$A", "K9$B", "L4$D", "M3$C", "N2$9", "NB$9", "MB$9", "J4$D", "PA$1", "M56$E", "TA$C", "TB$9", "VA$1", "456$E", "U34$A", "Y2$9", "YB$9", "[A$1", "058524", "058524", "058471", "058471", "058489", "058498", "058507", "058516", "058524", "O", "09AA3B45$", "1D$A", "11$A", "14$A", "32$B", "3C$3", "6D$4", "1BC$3", "8D$4", "93$5", "A1$A", "BC$3", "B2$B", "9BC$5", "22C$9", "F1$A", "G9$B", "H4$D", "I3$C", "J2$9", "JB$9", "IB$9", "F4$D", "LA$1", "058534", "055512", "055512", "055514", "055515", "055516", "055517", "055518", "f", "019ABC5D6E$", "14$E", "23$D", "3E$1", "4B$E", "44$E", "32$C", "1CD$5", "83$D", "92$C", "9B$1", "B5$3", "C4$E", "8AB$6", "E3$D", "FB$1", "G4$B", "F2$C", "GCD$3", "J6$AB", "I4D$B", "L3$D", "LC$A", "M2$A", "MC$A", "NB$1", "Q3$D", "42D$A", "S1$B", "TA$C", "U4$E", "T4$E", "S4$E", "S5$9", "V3$D", "Z2$A", "[C$2", "\\B$1", "X5$9", "]5$9", "SCD$9", "`3$D", "[B5$9", "a12$C", "bDE$B", "d4$E", "e3$D", "058543", "055514", "055514", "055514", "055515", "055516", "055517", "055518", "058543", "058543", "055515", "055515", "055460", "055460", "055462", "055463", "055464", "058489", "058489", "055516", "055516", "055462", "055470", "055470", "055472", "055473", "058498", "058498", "055517", "055517", "055463", "055472", "055480", "055480", "055482", "058507", "058507", "055518", "055518", "055464", "055473", "055482", "055490", "055490", "058516", "058516", "058543", "058543", "058489", "058498", "058507", "058516", "058524", "058524", "058524", "058543", "058543", "058489", "058498", "058507", "058516", "058524", "058534", "058534", "055584", "055584", "055586", "055587", "055588", "055589", "055590", "g", "019ABC5D6E$", "14$E", "23$D", "32$C", "1CD$5", "5B$6", "63$D", "53$D", "72$C", "96$B", "94D$B", "B3$D", "7AB$1", "D6$B", "D4$B", "E5$3", "G4$E", "DCD$3", "I6$B", "H3$CD", "KE$B", "L4$E", "L5$A", "M5$A", "LCD$A", "N2D$9", "Q1$A", "R4$E", "Q4$E", "S3$D", "U2$C", "UA$1", "P2D$9", "X1$A", "Y3$D", "X3$D", "Z2$C", "4DE$B", "]5$A", "]4$E", "^4$E", "_3$D", "a5$A", "]CD$A", "c3$D", "VDE$B", "e4$E", "f3$D", "058615", "055586", "055586", "055586", "055587", "055588", "055589", "055590", "058615", "058615", "055587", "055587", "055604", "055604", "055606", "055607", "055608", "X", "01ABC5D6E$", "14$E", "23$D", "32$C", "1CD$5", "5B$6", "63$D", "53$D", "72$C", "96$B", "94D$B", "B3$D", "4DE$B", "D5$A", "D4$E", "E4$E", "F3$D", "H5$A", "DCD$A", "J3$D", "79AB$1", "L6$B", "L4$B", "M5$3", "O4$E", "LCD$3", "Q6$B", "P3$CD", "SE$B", "T4$E", "T5$A", "U5$A", "TCD$A", "058633", "055588", "055588", "055606", "055614", "055614", "055616", "055617", "[", "01ABC5D6E$", "14$E", "23$D", "32$C", "1CD$5", "5B$6", "63$D", "53$D", "72$C", "96$B", "94D$B", "B5$A", "B3$D", "C6$B", "C3$D", "E3$D", "EA$CD", "H5$A", "H4$E", "I4$E", "J3$D", "L5$A", "79AB$1", "N6$B", "N4$B", "O5$3", "Q4$E", "P5$A", "S6$B", "NCD$3", "U6$B", "R3$CD", "WE$B", "X4$E", "X5$A", "Y5$A", "058642", "055589", "055589", "055607", "055616", "055624", "055624", "055626", "U", "012A3BCDE$", "1BC$2", "2D$3", "35$B", "43$D", "46$CD", "29A$1", "756$3", "84$E", "8CD$6", "AB$5", "93$CD", "CE$B", "D5$A", "E4$E", "D1$9A", "GB$E", "G5$E", "HD$3", "J2$B", "J5$B", "145$B", "MD$A", "N3$D", "M6$C", "P5$A", "Q4$E", "R3$D", "PB$DE", "594$1", "058651", "055590", "055590", "055608", "055617", "055626", "055634", "055634", "[", "09A3B45DE$", "11$9", "22$B", "26$D", "2C$4", "5D$3", "66$D", "5B$5", "82$B", "1A6$D", "A5$A", "B4$E", "C1$9", "DC$4", "EB$5", "FD$3", "F2$B", "G2$B", "G5$B", "ABC$E", "KD$3", "LE$4", "MD$6", "NBC$5", "N3$5D", "6BC$5", "3CD$A", "R3$D", "S4$C", "R56$D", "U4$E", "VA$C", "W3$D", "XE$A", "Y4$E", "YC$E", "058660", "058615", "058615", "058633", "058642", "058651", "058660", "Q", "01ABC5DE$", "14$D", "23$C", "32$B", "1BC$5", "53$C", "62$B", "69A$1", "85$3", "94$D", "A6$E", "9BC$5", "A3$BC", "DD$A", "D4$A", "B1$9A", "G2$B", "G5$B", "F56$E", "J1$9", "K2$B", "LC$A", "4CD$A", "N4$D", "O3$C", "L34$A", "058668", "058668", "058615", "058615", "058633", "058642", "058651", "058660", "058668", "H", "01ABC5D$", "14$D", "23$C", "32$B", "1BC$5", "53$C", "62$B", "69A$1", "85$3", "94$D", "9BC$5", "A3$BC", "CD$A", "C4$A", "4CD$A", "F4$D", "G3$C", "058678", "055656", "055656", "055658", "055659", "055660", "055661", "055662", "f", "019ABC5D6E$", "123$5", "2B$6", "3C$2", "4D$3", "34D$B", "63$D", "4AB$1", "86$B", "84$B", "95$3", "B4$E", "8CD$3", "C3$CD", "EE$B", "F1$A", "F5$A", "E1$A", "G5$E", "H4$E", "ID$3", "L2$B", "L5$B", "FCD$A", "G2$CE", "H2D$9", "Q1$A", "R4$E", "Q4$E", "S3$D", "U2$C", "UA$1", "O2D$9", "X1$A", "Y3$D", "X3$D", "Z2$C", "\\4$B", "]5$C", "^4$E", "_3$D", "PDE$B", "a5$A", "b4$E", "c3$D", "aCD$A", "e3$D", "058687", "055658", "055658", "055658", "055659", "055660", "055661", "055662", "058687", "058687", "055659", "055659", "055676", "055676", "055678", "055679", "055680", "V", "01ABC5D6E$", "123$5", "2B$6", "3C$2", "4D$3", "34D$B", "63$D", "134$D", "8B$E", "85$E", "9D$3", "B2$B", "B5$B", "89A$1", "EB$E", "E5$A", "G4$E", "ECD$A", "FCD$3", "JE$4", "K3$5", "LB$6", "M4$B", "MCD$3", "82$CE", "PDE$B", "Q5$A", "R4$E", "S3$D", "QCD$A", "U3$D", "058705", "055660", "055660", "055678", "055686", "055686", "055688", "055689", "U", "01ABC5D6E$", "123$5", "2B$6", "3C$2", "4D$3", "24$A", "6D$6", "73$D", "494$1", "9AB$4", "A6$B", "B5$3", "C4$E", "ACD$3", "D3$CD", "F4$A", "G5$B", "FE$AB", "I1$9", "JB$E", "J5$E", "KD$3", "M2$B", "M5$B", "J2$CE", "65$BC", "Q45$E", "R3$D", "SB$5", "TD$3", "058714", "055661", "055661", "055679", "055688", "055696", "055696", "055698", "Z", "012A3BCDE$", "14D$A", "25$B", "23$D", "26$D", "3A$D", "33$D", "36$CD", "1BC$2", "9D$3", "A5$B", "B3$D", "B6$CD", "99A$1", "E4$A", "F5$B", "E56$3", "H4$E", "HCD$6", "JB$5", "I3$CD", "L4$A", "M5$B", "LE$AB", "O1$9", "PB$E", "P5$E", "QD$3", "S2$B", "S5$B", "P2$CE", "845$E", "W3$D", "XB$5", "YD$3", "058723", "055662", "055662", "055680", "055689", "055698", "055706", "055706", "b", "09A3B456E$", "1D$6", "11$9", "21$9", "42$B", "4C$4", "6D$3", "76$D", "6B$5", "92$B", "145$E", "B1$9", "CC$4", "DB$5", "ED$3", "E2$B", "F2$B", "F5$B", "2BC$5", "JA$4", "K5D$3", "L6$D", "M4$E", "N3$D", "O4$A", "LBC$5", "7BC$5", "A4D$A", "S5$B", "T3$D", "T6$D", "S3$D", "S6$D", "U4$C", "YB6$D", "Z5$B", "ZC$E", "[A$E", "[4$E", "[C$E", "]D$3", "`C$A", "\\D$3", "058732", "058687", "058687", "058705", "058714", "058723", "058732", "U", "01ABC5DE$", "14$D", "23$C", "32$B", "1BC$5", "53$C", "62$B", "74$A", "85$B", "94$D", "A3$C", "69A$1", "C5$3", "D4$D", "C4$A", "E6$E", "DBC$5", "E3$BC", "ID$A", "I4$A", "G34$A", "G1$9A", "M2$B", "M5$B", "K56$E", "P1$9", "Q2$B", "RC$A", "SB$5", "R34$A", "058740", "058740", "058687", "058687", "058705", "058714", "058723", "058732", "058740", "J", "01ABC5D$", "14$D", "23$C", "32$B", "1BC$5", "53$C", "62$B", "74$A", "85$B", "94$D", "A3$C", "69A$1", "C5$3", "D4$D", "C4$A", "DBC$5", "E3$BC", "HD$A", "H4$A", "058750", "055728", "055728", "055730", "055731", "055732", "055733", "055734", "o", "09AA3B456E$", "11$A", "15$A", "1D$A", "34$E", "1BC$E", "6D$3", "61$A", "7E$4", "93$5", "A4$6", "A1$A", "B1$A", "71$A", "DC$4", "FD$3", "C2$B", "82$B", "85$B", "E2$B", "E5$B", "ABC$6", "MD$3", "91$AB", "D2D$B", "P3$D", "22D$B", "RCD$A", "S3$D", "S5$D", "SB$9", "T4$C", "W5$D", "W2$9", "WB$9", "TB$9", "XA$E", "X4$E", "XC$E", "XB$9", "U4$E", "UB$9", "\\D$3", "]B$9", "^B$9", "`B$9", "VA$1", "f5$D", "f3$D", "_A$1", "ZA$1", "i4$E", "iC$E", "g4$E", "]23$9", "nD$3", "058759", "055730", "055730", "055730", "055731", "055732", "055733", "055734", "058759", "058759", "055731", "055731", "055748", "055748", "055750", "055751", "055752", "]", "01A3B456E$", "19A$1", "25$A", "2D$A", "34$E", "51$9", "6C$4", "7B$5", "8D$3", "82$B", "92$B", "95$B", "2BC$E", "DD$3", "EE$4", "F3$5", "G4$6", "GBC$6", "ID$3", "G1$9A", "KC$6", "LD$3", "L4$C", "K2$B", "N2D$B", "P3$D", "K5$3B", "12D$B", "SCD$A", "T3$D", "T5$D", "U4$C", "W5$D", "XA$E", "X4$E", "XC$E", "V4$E", "YD$3", "058777", "055732", "055732", "055750", "055758", "055758", "055760", "055761", "^", "09A3B456E$", "11$9", "145$E", "31$9", "4C$4", "5B$5", "6D$3", "62$B", "72$B", "75$B", "3BC$5", "BA$4", "CD$3", "DE$4", "E3$5", "FBC$6", "GD$3", "F4$A6", "I1$9", "JC$4", "KD$3", "K6$C", "M2$B", "N4$A", "OD$6", "P3$D", "O5$B", "RA$C", "M5$3B", "S34$A", "UB$D", "U5$D", "VC$E", "WA$E", "W4$E", "WC$E", "YD$3", "\\C$A", "XD$3", "058786", "055733", "055733", "055751", "055760", "055768", "055768", "055770", "R", "09A3456E$", "11$9", "145$E", "3C$5", "31$9", "41$9", "6B$4", "7D$3", "8E$4", "93$5", "AC$6", "BD$3", "4AB$4", "DD$3", "EE$4", "F3$5", "GC$6", "HD$3", "B4$BC", "J9$1", "J2D$A", "L3$D", "L6$D", "N45$E", "O3$D", "PE$C", "Q45$E", "058795", "055734", "055734", "055752", "055761", "055770", "055778", "055778", "U", "09A3456E$", "1D$6", "11$9", "2C$5", "41$9", "21$9", "5B$4", "145$E", "8C$5", "81$9", "91$9", "BB$4", "CD$3", "DE$4", "ED$6", "FC$5", "4AB$4", "HCD$3", "I5$C", "J6$D", "K4$E", "L3$D", "52D$A", "N3$D", "N6$D", "O45$C", "Q6$D", "RC$E", "SD$3", "R45$E", "058804", "058759", "058759", "058777", "058786", "058795", "058804", "R", "09A345DE$", "1C$5", "14$D", "11$9", "21$9", "31$9", "5B$4", "7C$3", "85$C", "94$D", "52$A", "4B$D", "A6$E", "1AB$D", "EC$3", "FD$4", "GC$5", "H3$C", "F6$E", "356$E", "KC$5", "K1$9", "L1$9", "N2$A", "OE$6", "P3$C", "Q456$E", "058812", "058812", "058759", "058759", "058777", "058786", "058795", "058804", "058812", "J", "09A345D$", "1C$5", "14$D", "11$9", "21$9", "31$9", "5B$4", "7C$3", "85$C", "94$D", "52$A", "4B$D", "1AB$D", "DC$3", "ED$4", "FC$5", "G3$C", "B45$D", "I3$C", "058822", "O", "0A3BB4C5$", "1E$B", "11$B", "14$B", "32$C", "3D$3", "6E$4", "1CD$3", "8E$4", "93$5", "A1$B", "BD$3", "B2$C", "9CD$5", "22D$A", "F1$B", "GA$C", "H4$E", "I3$D", "J2$A", "JC$A", "IC$A", "F4$E", "LB$1", "058824", "Y", "09A3BB4C5$", "1E$B", "11$B", "14$B", "32$C", "3D$3", "6E$4", "1CD$3", "8E$4", "93$5", "A1$B", "BD$3", "B2$C", "9CD$5", "22D$A", "F1$B", "GA$C", "H4$E", "I3$D", "J2$A", "JC$A", "IC$A", "F4$E", "LB$1", "F56$9", "P4$E", "Q3$D", "PCD$5", "S3$D", "T12$C", "R12$C", "VDE$B", "W4$E", "X3$D", "_", "019ABC5DE$", "14$E", "23$D", "32$C", "1CD$5", "53$D", "62$C", "6AB$1", "85$3", "94$E", "9CD$5", "A3$CD", "CE$B", "C4$B", "D56$A", "F4$E", "FCD$5", "F2D$9", "I1$A", "J4$E", "I4$E", "K3$D", "M2$C", "MA$1", "H2D$9", "P1$A", "Q3$D", "P3$D", "R2$C", "4DE$B", "U4$E", "V3$D", "U56$A", "X4$E", "Y3$D", "XCD$5", "[3$D", "NDE$B", "]4$E", "^3$D", "h", "0192A3B45$", "1BC$2", "2A$1", "2D$3", "4E$4", "56$B", "36E$B", "71$A", "75$A", "85$E", "94$E", "AD$3", "C2$5", "7CD$A", "5CD$5", "F3$D", "G2$C", "H6$B", "H4$B", "GAB$1", "K5$3", "L4$E", "L6$B", "K6$B", "K4$B", "M6$B", "LCD$5", "92D$9", "S1$A", "T4$E", "S4$E", "U3$D", "W2$C", "WA$1", "E2D$9", "Z1$A", "[3$D", "Z3$D", "\\2$C", "^4$B", "_5$C", "`4$E", "a3$D", "[9$BC", "c3$D", "cA$CD", "e5$A", "f4$E", "g3$D", "r", "09AA3B456E$", "11$A", "15$A", "1D$A", "34$E", "22D$B", "6CD$A", "73$D", "75$D", "7B$9", "84$C", "B5$D", "B2$9", "BB$9", "8B$9", "CA$E", "C4$E", "CC$E", "CB$9", "94$E", "9B$9", "GD$3", "HB$9", "IB$9", "KB$9", "AA$1", "Q5$D", "Q3$D", "JA$1", "EA$1", "T4$E", "TC$E", "R4$E", "2C5$E", "YD$3", "ZB$5", "[A$1", "\\E$4", "]3$5", "^4$6", "^1$A", "_1$A", "aC$4", "bD$3", "c5$D", "d4$E", "a2$B", "`2$B", "[2$B", "^BC$6", "iD$3", "j5$D", "k4$E", "]1$AB", "_5$DE", "n1$A", "o2$B", "H23$9", "qD$3", "g", "09AA3B456E$", "11$A", "1D$A", "14$A", "22$B", "2C$3", "6D$4", "6B$E", "62$E", "65$E", "45$E", "8A$1", "CDE$4", "D3$5", "E4$6", "E1$A", "F5$E", "F1$A", "H1$A", "GC$3", "KD$6", "L4$D", "M5$E", "G2$B", "I2$B", "P5$E", "DBC$5", "RD$6", "S4$D", "T5$E", "534$A", "VC$3", "V2$9", "VB$9", "WD$4", "ZB$9", "W5$E", "WB$9", "\\A$C", "\\B$9", "[A$1", "]A$1", "YA$1", "a5$E", "V45$E", "d2$9", "dB$9", "fA$1", "b", "09AA3B456E$", "11$A", "1D$A", "14$A", "22$B", "2C$3", "6D$4", "6B$E", "62$E", "65$E", "45$E", "8A$1", "CDE$4", "D3$5", "E4$6", "E1$A", "F1$A", "GC$3", "ID$6", "J4$D", "G2$B", "H2$B", "DBC$5", "ND$6", "O4$D", "534$A", "QC$3", "Q2$9", "QB$9", "RD$4", "UB$9", "R5$E", "RB$9", "WA$C", "WB$9", "VA$1", "XA$1", "TA$1", "\\5$E", "Q45$E", "_2$9", "_B$9", "aA$1", "058831", "058826", "058826", "058826", "058827", "058828", "058829", "058830", "058831", "058831", "058827", "058827", "P", "01ABC5DE$", "14$E", "23$D", "32$C", "1CD$5", "53$D", "62$C", "4DE$B", "84$E", "93$D", "856$A", "B4$E", "C3$D", "BCD$5", "E3$D", "69AB$1", "G5$3", "H4$E", "HCD$5", "I3$CD", "KE$B", "K4$B", "L56$A", "N4$E", "NCD$5", "058844", "X", "012A3B45$", "1BC$2", "2D$3", "3E$4", "46$B", "4CD$5", "63$D", "72$C", "86$B", "84$B", "534$D", "B5$E", "CD$3", "D2$5", "B9A$1", "F5$A", "G4$E", "FB$6E", "FCD$A", "IBCD$3", "KE$4", "L3$5", "L6$B", "M6$B", "M4$B", "K6$B", "LCD$5", "945$BC", "S5$A", "T4$E", "U3$D", "SCD$A", "W3$D", "`", "01A3B456E$", "19A$1", "25$A", "2D$A", "34$E", "51$9", "6C$4", "7D$3", "8B$5", "9C$6", "AE$4", "BD$5", "C3$D", "D4$C", "D6$C", "E2$B", "F2$B", "92$B", "B6$BC", "E9A$1", "K6$4", "L5$3", "M4$E", "LBC$6", "OD$3", "P5$D", "Q4$E", "K5$DE", "S1$9A", "T2$B", "12D$B", "VCD$A", "W3$D", "W5$D", "X4$C", "Z5$D", "[A$E", "[4$E", "[C$E", "Y4$E", "\\D$3", "\\", "012A3456E$", "1B$2", "2C$3", "3D$4", "3B$E", "32$E", "35$E", "134$A", "8C$3", "9D$4", "95$E", "BA$C", "CB$2", "D9$1", "EE$5", "FA$4", "GD$A", "4BC$5", "ID$6", "J4$D", "K3$C", "K5$E", "I3$C", "N2$B", "L2$B", "L5$E", "P5$E", "N9A$1", "S5$3", "S4$6", "U5$E", "TBC$5", "WD$6", "X4$D", "Y5$E", "T4$DE", "845$E", "W", "012A3456E$", "1B$2", "2C$3", "3D$4", "3B$E", "32$E", "35$E", "134$A", "8C$3", "9D$4", "95$E", "BA$C", "CB$2", "D9$1", "EE$5", "FA$4", "GD$A", "4BC$5", "ID$6", "J4$D", "K3$C", "I3$C", "M2$B", "L2$B", "M9A$1", "P5$3", "P4$6", "QBC$5", "SD$6", "T4$D", "Q4$DE", "845$E", "058849", "058828", "058828", "058846", "X", "012A3B45$", "1DE$A", "26$B", "2C$5", "24$E", "53$D", "345$E", "73$D", "4AB$4", "9C$2", "AD$3", "96$B", "B5$CD", "D6$B", "D4$E", "F3$D", "A94$1", "HAB$4", "I5$3", "J4$E", "J6$B", "I6$B", "K6$B", "JCD$5", "H5$CD", "PA$E", "Q4$A", "P6$B", "S1$9", "T5$E", "UD$3", "V2$5", "S45$E", "058854", "a", "09A3B456E$", "11$9", "1BC$6", "3A$E", "44$A", "3D$5", "61$9", "7C$4", "8D$3", "95$D", "86$C", "A4$E", "B2$B", "C6$C", "E2$B", "E5$B", "G3$D", "H4$C", "I9$1", "4D6$3", "KE$4", "L3$5", "MBC$6", "ND$3", "O5$D", "P4$E", "41$9A", "R2$B", "A6$BC", "72$AB", "22D$B", "VC$A", "V34$A", "XB$D", "X5$D", "ZA$E", "Z4$E", "ZC$E", "[D$3", "^C$A", "YC$6E", "`D$3", "`", "012A3456E$", "1B$2", "2C$3", "3D$4", "3B$E", "32$E", "35$E", "134$A", "8C$3", "9D$4", "95$E", "9B$E", "BA$C", "DB$2", "E9$1", "FE$5", "GA$4", "HD$A", "CD$6", "JA$4", "KB$2", "LE$5", "M9$1", "MC$3", "OD$4", "P6$D", "O5$E", "Q3$C", "S2$B", "GBC$E", "UD$6", "VA$4", "WBC$3", "XE$5", "YD$4", "Z6$D", "[5$BC", "\\3$5", "\\4$DE", "M2$AB", "845$E", "Y", "012A3456E$", "1B$2", "2C$3", "3D$4", "3B$E", "32$E", "35$E", "134$A", "8C$3", "9D$4", "95$E", "9B$E", "BA$C", "DB$2", "E9$1", "FE$5", "GA$4", "HD$A", "GBC$E", "JA$34", "KDE$4", "L3$5", "LBC$5", "ND$6", "O4$D", "M4$A6", "Q1$9", "RC$3", "SD$4", "T6$D", "U3$C", "V2$B", "R2$AB", "845$E", "058858", "058829", "058829", "058847", "058856", "V", "09A3456E$", "1C$6", "11$9", "2D$5", "41$9", "24$E", "21$9", "61$9", "52$A", "7B$E", "145$E", "B1$9", "2AB$E", "DCD$3", "EE$4", "FD$5", "G3$D", "H6$C", "F6$C", "E6$C", "G1$9A", "L3$D", "L5$D", "M6$C", "N6$C", "N4$E", "P4$E", "945$E", "S3$D", "T6E$C", "U45$E", "058864", "Z", "09A34CDE$", "11$9", "22$A", "156$C", "44$D", "41$9", "55$E", "5C$E", "51$9", "71$9", "8D$6", "81$9", "B1$9", "9B$4", "DB$4", "FC$3", "GE$5", "HD$4", "I6$D", "J3$C", "J5$C", "D2$A", "C2$A", "4AB$D", "OC$3E", "PCD$6", "QE$5", "RD$4", "S6$D", "T3$C", "T5$C", "Q3$C", "P1$9A", "923$A", "Y45$E", "S", "09A34CDE$", "11$9", "22$A", "156$C", "44$D", "41$9", "55$E", "5C$E", "51$9", "71$9", "81$9", "9B$4", "B2$A", "4AB$D", "EC$3E", "FDE$4", "GC$5", "HD$6", "I4$D", "H3$C", "I1$9A", "L4$D", "L6$D", "N3$C", "N5$C", "F1$9A", "923$A", "R45$E", "058867", "058830", "058830", "058848", "058857", "058866", "J", "09A34DE$", "11$9", "2B$3", "35$E", "22$A", "46$D", "1AB$3", "75$E", "86$D", "7CD$4", "A6$D", "A1$9A", "C6$D", "145$E", "E6$D", "F1$9", "E1$9", "H2$A", "G2$A", "058874", "E", "09A34DE$", "11$9", "2B$3", "22$A", "1AB$3", "5CD$4", "66$D", "61$9A", "86$D", "556$DE", "A1$9A", "B34$B", "C9$1", "C2$A", "058876", "058831", "058831", "058849", "058858", "058867", "058876", "H", "09A34DE$", "11$9", "2B$3", "3C$4", "35$D", "22$A", "56$E", "1AB$3", "8C$4", "85$D", "A6$E", "145$D", "C6$E", "C1$9", "D1$9", "E2$A", "G6$E", "058884", "058884", "058831", "058831", "058849", "058858", "058867", "058876", "058884", "C", "09A34D$", "11$9", "2B$3", "3C$4", "35$D", "22$A", "1AB$3", "7C$4", "75$D", "145$D", "A1$9", "B2$A", "058894", "058824", "058824", "058826", "058827", "058828", "058829", "058830", "V", "09AA3B456$", "11$A", "1D$A", "14$A", "22$B", "2C$3", "6D$4", "1BC$3", "8D$4", "93$5", "A1$A", "BC$3", "B2$B", "9BC$5", "EDE$6", "F4$D", "F1$AB", "H4$D", "I3$C", "JA$1", "J2$B", "534$A", "MC$3", "M2$9", "MB$9", "ND$4", "QB$9", "NB$9", "RA$1", "SA$1", "PA$1", "058903", "058826", "058826", "058826", "058827", "058828", "058829", "058830", "058903", "058903", "058827", "058827", "058844", "058844", "058846", "058847", "058848", "O", "012A3456$", "1B$2", "2C$3", "3D$4", "134$A", "5C$3", "6D$4", "4BC$5", "83$C", "92$B", "8DE$6", "B4$D", "C3$C", "D2$B", "D9A$1", "FBC$3", "GD$4", "H6$DE", "I5$BC", "J3$5", "J4$D", "L3$BC", "MD$A", "M4$A", "058921", "058828", "058828", "058846", "058854", "058854", "058856", "058857", "Q", "012A3456$", "1B$2", "2C$3", "3D$4", "134$A", "5C$3", "6D$4", "7B$5", "8E$6", "8A$4", "AB$2", "BC$3", "9AB$2", "D9$1", "E6$E", "FA$4", "G5$3", "H4$D", "DC$3", "JD$4", "HBC$5", "LDE$6", "M4$D", "I3$BC", "OD$A", "O4$A", "058930", "058829", "058829", "058847", "058856", "058864", "058864", "058866", "Q", "09A34CDE$", "16$E", "11$9", "25$C", "44$D", "41$9", "21$9", "51$9", "32$A", "96$E", "8B$4", "BC$3", "CD$4", "DC$5", "E3$C", "4AB$D", "GC$3", "HD$4", "IC$5", "J3$C", "JDE$6", "L4$D", "L1$9A", "N4$D", "823$A", "PC$3", "058939", "058830", "058830", "058848", "058857", "058866", "058874", "058874", "J", "09A34DE$", "16$E", "11$9", "21$9", "3B$3", "56$E", "32$A", "76$E", "6C$4", "65$D", "1AB$3", "B6$E", "CC$4", "C5$D", "DDE$6", "F1$9A", "245$D", "H1$9", "I2$A", "058948", "058903", "058903", "058921", "058930", "058939", "058948", "E", "09A34E$", "16$E", "11$9", "21$9", "3B$3", "5C$4", "66$E", "56$E", "32$A", "96$E", "1AB$3", "BC$4", "C6$E", "D4$C", "058956", "058956", "058903", "058903", "058921", "058930", "058939", "058948", "058956", "7", "09A34$", "11$9", "2B$3", "3C$4", "22$A", "1AB$3", "6C$4", "058966", "055944", "055944", "055946", "055947", "055948", "055949", "055950", "R", "0A3B456E$", "14$E", "12D$A", "31$B", "44$E", "34$E", "53$D", "7B$1", "11C$E", "9D$3", "9B$1", "AE$4", "CD$5", "DB$1", "D3$D", "E3$D", "E5$D", "H4$E", "G9A4$6", "JBC$4", "KD$3", "L1$B", "K1$B", "J2D$A", "O1$B", "P3$D", "O3$D", "058975", "055946", "055946", "055946", "055947", "055948", "055949", "055950", "058975", "058975", "055947", "055947", "055964", "055964", "055966", "055967", "055968", "`", "09A3B456E$", "14$E", "12D$A", "31$B", "44$E", "34$E", "53$D", "7B$1", "11C$E", "9D$3", "9B$1", "AE$4", "CD$5", "DB$1", "D3$D", "E3$D", "E5$D", "H4$E", "GA4$6", "JBC$4", "KD$3", "L1$B", "K1$B", "J2D$A", "O1$B", "P3$D", "P5$9", "O3$D", "O5$9", "Q5$9", "S5$9", "3CD$9", "W5$D", "W3$D", "X4$E", "Z3$D", "[E$C", "\\4$E", "\\12D$B", "^4$E", "_3$D", "058993", "055948", "055948", "055966", "055974", "055974", "055976", "055977", "n", "09AA3B456E$", "14$E", "11$A", "15$A", "1D$A", "21$A", "25$A", "3C$E", "8D$3", "9E$4", "AD$5", "B3$D", "1BC$E", "DD$3", "EE$4", "FD$5", "G3$D", "H4$6", "I1$A", "I5$A", "JC$4", "LD$3", "GBC$6", "N3$D", "J2D$B", "P3$D", "P5$9A", "R3$D", "32D$B", "T4$E", "U3$D", "TCD$A", "W3$D", "W5$D", "Y4$E", "YB$9", "Z3$D", "\\E$C", "]4$E", "]B$9", "^B$9", "\\B$9", "ZB$9", "_A$1", "[A$1", "c4$E", "cC$E", "dD$5", "gB$6", "g3$D", "h3$D", "d4$E", "]2D$9", "l4$E", "m3$D", "059002", "055949", "055949", "055967", "055976", "055984", "055984", "055986", "]", "09A34556E$", "1D$5", "14$E", "2C$6", "1AB$5", "54$E", "5C$E", "51$A", "61$A", "7D$3", "71$A", "AE$4", "CD$5", "DC$6", "E3$D", "E1$A", "F4$C", "F6$C", "F1$A", "D1$A", "H1$A", "I1$A", "C1$A", "A1$A", "42D$9", "P1$A", "Q3$D", "P3$D", "Q56$D", "TA$1", "T4$E", "U4$E", "V3$D", "XE$C", "YA$1", "Y4$E", "Z4$E", "ZC$E", "059011", "055950", "055950", "055968", "055977", "055986", "055994", "055994", "X", "09A345DE$", "156$D", "24$E", "2AB$5", "4C$E", "41$A", "5D$3", "51$A", "7E$4", "9D$6", "AC$5", "B1$A", "A1$A", "91$A", "71$A", "B3$CD", "G1$A", "2234$9", "I1$A", "J4$E", "JC$E", "I4$E", "IC$E", "LD$3", "OE$4", "PA$1", "Q4$E", "JD$56", "SC$4", "TD$3", "UA$1", "V3$D", "SA$1", "059020", "058975", "058975", "058993", "059002", "059011", "059020", "P", "09A345DE$", "14$D", "1AB$D", "3C$3", "31$A", "4D$4", "6C$5", "73$C", "71$A", "81$A", "61$A", "46$E", "41$A", "C1$A", "12C$9", "F1$A", "G4$D", "F4$D", "H3$C", "JA$1", "256$E", "L2C$9", "M1$A", "N34$C", "OA$1", "059028", "059028", "058975", "058975", "058993", "059002", "059011", "059020", "059028", "I", "09A345D$", "14$D", "1AB$D", "3C$3", "31$A", "4D$4", "6C$5", "73$C", "71$A", "81$A", "61$A", "41$A", "12C$9", "D1$A", "E4$D", "D4$D", "F3$C", "HA$1", "059038", "056016", "056016", "056018", "056019", "056020", "056021", "056022", "\\", "09A3B456E$", "14$E", "12D$A", "31$B", "44$E", "34$E", "53$D", "7B$1", "11C$E", "9D$3", "9B$1", "AE$4", "CD$5", "DB$1", "D3$D", "E3$D", "E5$D", "H4$E", "GA4$6", "JBC$4", "KD$3", "L1$B", "K1$B", "J2D$A", "O1$B", "P3$D", "O3$D", "3CD$9", "S5$D", "S3$D", "T4$E", "V3$D", "WE$C", "X4$E", "X12D$B", "Z4$E", "[3$D", "059047", "056018", "056018", "056018", "056019", "056020", "056021", "056022", "059047", "059047", "056019", "056019", "055964", "055964", "055966", "055967", "055968", "058993", "058993", "056020", "056020", "055966", "055974", "055974", "055976", "055977", "059002", "059002", "056021", "056021", "055967", "055976", "055984", "055984", "055986", "059011", "059011", "056022", "056022", "055968", "055977", "055986", "055994", "055994", "059020", "059020", "059047", "059047", "058993", "059002", "059011", "059020", "059028", "059028", "059028", "059047", "059047", "058993", "059002", "059011", "059020", "059028", "059038", "059038", "056088", "056088", "056090", "056091", "056092", "056093", "056094", "k", "09AA3B456E$", "14$E", "11$A", "15$A", "1D$A", "21$A", "25$A", "3C$E", "8D$3", "9E$4", "AD$5", "B3$D", "1BC$E", "DD$3", "EE$4", "FD$5", "G3$D", "H4$6", "I1$A", "JC$4", "KD$3", "GBC$6", "M3$D", "J2D$B", "O3$D", "32D$B", "Q4$E", "R3$D", "QCD$A", "T3$D", "T5$D", "TB$9", "UB$9", "V4$E", "VB$9", "Y3$D", "[E$C", "\\4$E", "\\B$9", "]B$9", "[B$9", "YB$9", "WA$1", "b5$D", "b3$D", "^A$1", "e4$E", "eC$E", "c4$E", "\\2D$9", "i4$E", "j3$D", "059119", "056090", "056090", "056090", "056091", "056092", "056093", "056094", "059119", "059119", "056091", "056091", "056108", "056108", "056110", "056111", "056112", "Z", "01ABCDD6E$", "13$D", "15$D", "34$E", "43$D", "5E$C", "64$E", "1BC$6", "83$D", "94$C", "A9A$1", "B6$4", "CD$3", "D5$D", "E4$E", "F3$D", "DBC$6", "H3$D", "GE$BC", "J4$E", "J5$A", "JD$A", "K5$A", "A2D$B", "O3$D", "62D$B", "Q4$E", "R3$D", "QCD$A", "T3$D", "T5$D", "V4$E", "W3$D", "XE$C", "Y4$E", "059137", "056092", "056092", "056110", "056118", "056118", "056120", "056121", "]", "01ABCDD6E$", "13$D", "15$D", "34$E", "43$D", "5E$C", "64$E", "1BC$6", "83$D", "94$C", "A9A$1", "B6$4", "CD$3", "D5$D", "E4$E", "B5$A", "F3$D", "DBC$6", "I3$D", "HE$BC", "K4$E", "K5$A", "KD$A", "L5$A", "A2D$B", "P5$A", "P3$D", "Q6$B", "S3$D", "S5$D", "Q3$D", "U4$E", "W3$D", "XE$C", "Y4$E", "SA$CD", "[4$E", "\\3$D", "059146", "056093", "056093", "056111", "056120", "056128", "056128", "056130", "Z", "09A34556E$", "1D$5", "14$E", "11$9", "2C$6", "21$9", "51$9", "31$9", "7B$5", "9C$4", "AD$3", "B6$C", "C3$D", "C5$D", "E4$E", "6B$D", "G4$E", "GC$E", "1AB$5", "J4$E", "JC$E", "LD$3", "ME$4", "ND$5", "OC$6", "P3$D", "Q4$C", "Q6$C", "72D$A", "T3$D", "T56$D", "V4$E", "W3$D", "XE$C", "Y4$E", "059155", "056094", "056094", "056112", "056121", "056130", "056138", "056138", "S", "09A345DE$", "11$9", "156$D", "34$E", "31$9", "41$9", "5B$5", "7C$E", "8D$3", "9E$4", "AD$6", "BC$5", "3AB$5", "DC$E", "ED$3", "FE$4", "GD$6", "HC$5", "I3$CD", "J1$9A", "22CD$A", "L3$D", "M4$C", "L56$D", "O4$E", "P3$D", "QE$C", "R4$E", "059164", "059119", "059119", "059137", "059146", "059155", "059164", "N", "09A345DE$", "14$D", "11$9", "21$9", "3B$D", "5C$3", "6D$4", "7C$5", "83$C", "66$E", "1AB$D", "BC$3", "CD$4", "DC$5", "E3$C", "C6$E", "256$E", "H1$9", "32C$A", "J4$D", "K3$C", "K56$E", "M34$C", "059172", "059172", "059119", "059119", "059137", "059146", "059155", "059164", "059172", "H", "09A345D$", "14$D", "11$9", "21$9", "3B$D", "5C$3", "6D$4", "7C$5", "83$C", "1AB$D", "AC$3", "BD$4", "CC$5", "D3$C", "32C$A", "F4$D", "G3$C", "059182", "056160", "056160", "056162", "056163", "056164", "056165", "056166", "\\", "09A34556E$", "1D$5", "14$E", "1AB$5", "44$E", "4C$E", "41$A", "51$A", "6D$3", "61$A", "9E$4", "BD$5", "CC$6", "D3$D", "D1$A", "E4$C", "E6$C", "E1$A", "C1$A", "G1$A", "H1$A", "B1$A", "91$A", "1234$9", "O1$A", "P4$E", "PC$E", "O4$E", "OC$E", "RD$3", "UE$4", "VD$5", "WA$1", "W3$D", "X5$D", "X3$D", "Z4$E", "059191", "056162", "056162", "056162", "056163", "056164", "056165", "056166", "059191", "059191", "056163", "056163", "056180", "056180", "056182", "056183", "056184", "X", "09A34556E$", "1D$5", "14$E", "11$9", "21$9", "31$9", "5B$D", "74$E", "7C$E", "9D$3", "AE$4", "BD$5", "CC$6", "D3$D", "C3$D", "E4$C", "1AB$5", "H4$E", "HC$E", "JD$3", "KE$4", "LD$5", "MC$6", "N3$D", "O4$C", "O6$C", "52CD$A", "R3$D", "R5$D", "T4$E", "U3$D", "VE$C", "W4$E", "059209", "056164", "056164", "056182", "056190", "056190", "056192", "056193", "Q", "09BCCDDE$", "13$D", "16$C", "11$9", "24$C", "26$C", "21$9", "35$D", "31$9", "51$9", "61$9", "84$E", "81$9", "C3$D", "EE$C", "F4$E", "FD$B", "F5$B", "F1$9", "G5$B", "G1$9", "E1$9", "C1$9", "H1$9", "I1$9", "K1$9", "059218", "056165", "056165", "056183", "056192", "056200", "056200", "056202", "S", "09BCCDDE$", "13$D", "16$C", "11$9", "24$C", "26$C", "21$9", "35$D", "31$9", "55$B", "51$9", "61$9", "84$E", "81$9", "D3$D", "FE$C", "G4$E", "GD$B", "G5$B", "G1$9", "H5$B", "H1$9", "F1$9", "D1$9", "A1$9", "I1$9", "J1$9", "L1$9", "059227", "056166", "056166", "056184", "056193", "056202", "056210", "056210", "K", "093BCDE$", "11$9", "1CD$3", "35$C", "31$9", "46$D", "41$9", "64$E", "61$9", "83$D", "AE$C", "B5$B", "B1$9", "A1$9", "81$9", "C4$E", "C1$9", "G1$9", "BD$B6", "J1$9", "059236", "059191", "059191", "059209", "059218", "059227", "059236", "I", "09BCCDE$", "13$C", "15$C", "11$9", "21$9", "34$D", "31$9", "63$C", "8D$B", "84$B", "81$9", "66$E", "61$9", "C1$9", "91$9", "A1$9", "A56$E", "H1$9", "059244", "059244", "059191", "059191", "059209", "059218", "059227", "059236", "059244", "E", "09BCCD$", "13$C", "15$C", "11$9", "21$9", "34$D", "31$9", "63$C", "8D$B", "84$B", "81$9", "61$9", "91$9", "A1$9", "059254", "056232", "056232", "056234", "056235", "056236", "056237", "056238", "Z", "09A34556E$", "1D$5", "14$E", "1AB$5", "4C$E", "41$A", "5D$3", "51$A", "7E$4", "93$5", "AC$6", "BD$3", "C1$A", "B4$C", "B1$A", "E1$A", "A1$A", "91$A", "71$A", "1234$9", "K1$A", "LD$5", "L4$E", "LC$E", "MC$4", "PD$3", "QA$1", "Q5$D", "R5$D", "R3$D", "S4$E", "MA$1", "K4$E", "KC$E", "T4$E", "059263", "056234", "056234", "056234", "056235", "056236", "056237", "056238", "059263", "059263", "056235", "056235", "056252", "056252", "056254", "056255", "056256", "U", "09A34556E$", "1D$5", "14$E", "11$9", "21$9", "31$9", "5B$D", "7C$E", "8D$3", "9E$4", "A3$5", "BC$6", "CD$3", "C4$C", "1AB$5", "FC$E", "GD$3", "HE$4", "I3$5", "JC$6", "KD$3", "K4$C", "52CD$A", "N3$D", "N5$D", "O4$C", "Q5$D", "R4$E", "RC$E", "P4$E", "059281", "056236", "056236", "056254", "056262", "056262", "056264", "056265", "M", "09BCCDDE$", "13$D", "11$9", "24$C", "26$C", "21$9", "41$9", "55$3", "51$9", "84$E", "81$9", "A3$D", "CE$C", "DD$B", "D5$B", "D1$9", "C1$9", "A1$9", "E1$9", "F4$E", "F1$9", "K1$9", "059290", "056237", "056237", "056255", "056264", "056272", "056272", "056274", "K", "0934CDE$", "11$9", "1BC$4", "3D$3", "41$9", "36$C", "31$9", "65$3", "61$9", "84$E", "81$9", "A3$D", "C4$B", "C1$9", "A1$9", "D5$C", "D1$9", "G1$9", "CE$BC", "J1$9", "059299", "056238", "056238", "056256", "056265", "056274", "056282", "056282", "M", "093BCDE$", "14$B", "11$9", "25$C", "21$9", "46$D", "41$9", "61$9", "1CD$3", "95$C", "91$9", "A6$D", "A1$9", "C4$E", "C1$9", "E3$D", "G4$B", "G1$9", "E1$9", "H5$C", "H1$9", "K1$9", "059308", "059263", "059263", "059281", "059290", "059299", "059308", "M", "09BCCDE$", "13$C", "15$C", "11$9", "24$B", "21$9", "34$D", "31$9", "73$C", "9D$B", "94$B", "91$9", "76$E", "71$9", "D1$9", "51$9", "A1$9", "B1$9", "D34$B", "J5$C", "J1$9", "K1$9", "059316", "059316", "059263", "059263", "059281", "059290", "059299", "059308", "059316", "G", "09BCCD$", "13$C", "15$C", "11$9", "24$B", "21$9", "34$D", "31$9", "73$C", "9D$B", "94$B", "91$9", "71$9", "51$9", "A1$9", "B1$9", "059326", "I", "0A3B45E$", "14$E", "1BC$E", "3D$3", "31$B", "4E$4", "6D$5", "73$D", "71$B", "81$B", "61$B", "41$B", "12D$A", "D1$B", "E4$E", "D4$E", "F3$D", "HB$1", "059328", "S", "09A3B45E$", "14$E", "1BC$E", "3D$3", "31$B", "4E$4", "6D$5", "73$D", "71$B", "81$B", "61$B", "41$B", "12D$A", "D1$B", "E4$E", "D4$E", "F3$D", "HB$1", "DCD6$9", "J5$D", "J3$D", "K4$E", "M3$D", "NE$C", "O4$E", "O12D$B", "Q4$E", "R3$D", "c", "09AA3B45E$", "14$E", "11$A", "21$A", "3C$E", "5D$3", "6E$4", "7D$5", "83$D", "1BC$E", "AD$3", "BE$4", "CD$5", "D3$D", "156$A", "FD$5", "F4$E", "32D$B", "I4$E", "J3$D", "ICD6$A", "L3$D", "L5$D", "LB$9", "MB$9", "N4$E", "NB$9", "Q3$D", "SE$C", "T4$E", "TB$9", "UB$9", "SB$9", "QB$9", "OA$1", "Z5$D", "Z3$D", "VA$1", "]4$E", "]C$E", "[4$E", "T2D$9", "a4$E", "b3$D", "V", "09AABCDDE$", "13$D", "15$D", "11$A", "21$A", "34$E", "31$A", "63$D", "8E$C", "84$C", "81$A", "61$A", "91$A", "A1$A", "956$AB", "FD$5", "F4$E", "F234$9", "I1$A", "J4$E", "JC$E", "I4$E", "IC$E", "LD$3", "OE$4", "PD$5", "QA$1", "Q3$D", "R5$D", "R3$D", "T4$E", "^", "09AA3B4C5$", "11$A", "1CD$3", "3E$4", "4D$5", "53$D", "51$A", "64$C", "66$C", "61$A", "46$C", "41$A", "36$C", "31$A", "81$A", "91$A", "B1$A", "D1$A", "16E$C", "J1$A", "J5$AB", "LD$5", "L4$E", "L234$9", "O1$A", "PD$5", "P4$E", "PC$E", "QC$4", "TD$3", "UA$1", "U5$D", "V5$D", "V3$D", "W4$E", "QA$1", "O4$E", "OC$E", "X4$E", "X", "09AAB4C56$", "11$A", "1CD$6", "3E$5", "4D$4", "56$D", "51$A", "43$C", "41$A", "63$C", "65$C", "61$A", "33$C", "31$A", "A1$A", "81$A", "B1$A", "D1$A", "13E$C", "J1$A", "JD$AB", "L4$D", "M5$E", "L2C$9", "O1$A", "P4$D", "Q3$C", "QA$1", "Q5$E", "RA$1", "S5$E", "R45$E", "WA$1", "T", "09AAB4C56$", "11$A", "13E$C", "31$A", "3D$AB", "54$D", "65$E", "1DE$4", "8C$5", "9D$6", "A4$D", "A1$A", "B3$C", "B1$A", "93$C", "91$A", "F1$A", "D1$A", "81$A", "52C$9", "K1$A", "L4$D", "M3$C", "MA$1", "M5$E", "NA$1", "O5$E", "N45$E", "SA$1", "059335", "059330", "059330", "059330", "059331", "059332", "059333", "059334", "059335", "059335", "059331", "059331", "R", "01ABCDDE$", "13$D", "15$D", "34$E", "43$D", "5E$C", "64$E", "69A$1", "84$E", "8BC$E", "AD$3", "BE$4", "CD$5", "D3$D", "856$A", "FD$5", "F4$E", "62D$B", "I4$E", "J3$D", "ICD6$A", "L3$D", "L5$D", "N4$E", "O3$D", "PE$C", "Q4$E", "059348", "R", "01ABCDDE$", "13$D", "15$D", "34$E", "43$D", "5E$C", "64$E", "19A$1", "83$D", "85$D", "A4$E", "B3$D", "CE$C", "C4$C", "6D6$B", "F9$1", "G5$D", "H4$E", "H1$9", "I1$9", "F2CD$A", "L3$D", "L5$D", "N4$E", "O3$D", "PE$C", "Q4$E", "Y", "01A3B4C5$", "19A$1", "2CD$3", "3E$4", "4D$5", "53$D", "64$C", "66$C", "46$C", "36$C", "51$9A", "B3$D", "B5$D", "C4$C", "C6$C", "D6$C", "D4$E", "G4$E", "26E$C", "J5$AB", "KD$5", "K4$E", "K1$9", "L1$9", "M1$9", "OB$D", "O2CD$A", "R3$D", "R5$D", "S4$C", "U5$D", "V4$E", "VC$E", "T4$E", "V", "01AB4C56$", "19A$1", "2CD$6", "3E$5", "4D$4", "56$D", "43$C", "63$C", "65$C", "33$C", "51$9A", "B4$D", "B6$D", "C3$C", "C5$E", "D3$C", "D5$C", "E5$E", "23E$C", "JD$AB", "K4$D", "K1$9", "L5$E", "L1$9", "N1$9", "OB$4", "O23$A", "RC$3", "SD$4", "S5$E", "R45$E", "R", "01AB4C56$", "19A$1", "23E$C", "3D$AB", "44$D", "41$9", "55$E", "51$9", "71$9", "8B$4", "2DE$4", "BC$5", "CD$6", "D4$D", "E3$C", "C3$C", "D1$9A", "H4$D", "H6$D", "I3$C", "J3$C", "J5$C", "823$A", "NC$3", "OD$4", "O5$E", "N45$E", "059353", "059332", "059332", "059350", "K", "09BCDDE$", "13$D", "15$D", "11$9", "21$9", "34$E", "31$9", "63$D", "8E$C", "84$C", "81$9", "61$9", "91$9", "A1$9", "9D6$B", "F5$D", "F1$9", "G4$E", "G1$9", "I1$9", "059358", "Q", "093B4C5$", "11$9", "1CD$3", "3E$4", "4D$5", "53$D", "51$9", "64$C", "66$C", "61$9", "46$C", "41$9", "36$C", "31$9", "81$9", "91$9", "B1$9", "D1$9", "16E$C", "JD$B", "J5$B", "J1$9", "K1$9", "L4$E", "L1$9", "O1$9", "Q", "09B4C56$", "11$9", "1CD$6", "3E$5", "4D$4", "56$D", "51$9", "43$C", "41$9", "63$C", "65$C", "61$9", "33$C", "31$9", "A1$9", "81$9", "B1$9", "D1$9", "13E$C", "J4$B", "JD$B", "J1$9", "K5$E", "K1$9", "L1$9", "N1$9", "M", "09B4C56$", "11$9", "13E$C", "34$B", "3D$B", "31$9", "45$E", "41$9", "51$9", "71$9", "1DE$4", "BC$5", "CD$6", "D4$D", "D1$9", "E3$C", "E1$9", "C3$C", "C1$9", "I1$9", "G1$9", "B1$9", "059362", "059333", "059333", "059351", "059360", "Q", "093B4C5$", "1E$B", "14$B", "11$9", "2D$5", "51$9", "26$C", "21$9", "71$9", "31$9", "1CD$3", "BE$4", "CD$5", "D3$D", "D1$9", "E6$C", "E1$9", "C6$C", "C1$9", "B6$C", "B1$9", "G1$9", "I1$9", "K1$9", "745$E", "P1$9", "059368", "U", "09B4C56$", "11$9", "1CD$6", "3E$5", "4D$4", "56$D", "51$9", "41$9", "63$C", "65$C", "61$9", "33$C", "31$9", "91$9", "A1$9", "C4$B", "C1$9", "G6$D", "G1$9", "IE$C", "KB$4", "LD$B", "L1$9", "K5$E", "K1$9", "M1$9", "I1$9", "O1$9", "43$BC", "T1$9", "O", "09B4C56$", "11$9", "13E$C", "34$B", "3D$B", "31$9", "4C$E", "45$E", "41$9", "51$9", "71$9", "81$9", "1DE$4", "DC$5", "ED$6", "F4$D", "F1$9", "G1$9", "E3$C", "E1$9", "J1$9", "D1$9", "G3$BC", "N1$9", "059371", "059334", "059334", "059352", "059361", "059370", "G", "09B4DE$", "15$E", "13$B", "11$9", "26$D", "21$9", "51$9", "31$9", "1CD$4", "96$D", "91$9", "A1$9", "234$B", "D6$D", "D1$9", "E1$9", "059378", "C", "09B4DE$", "13$B", "11$9", "21$9", "1CD$4", "56$D", "51$9", "61$9", "156$DE", "91$9", "934$B", "B1$9", "059380", "059335", "059335", "059353", "059362", "059371", "059380", "E", "09BCDE$", "14$C", "11$9", "25$D", "23$B", "21$9", "46$E", "41$9", "71$9", "51$9", "434$B", "B6$E", "B1$9", "C1$9", "059388", "059388", "059335", "059335", "059353", "059362", "059371", "059380", "059388", "A", "09BCD$", "14$C", "11$9", "25$D", "23$B", "21$9", "41$9", "51$9", "434$B", "91$9", "059398", "059328", "059328", "059330", "059331", "059332", "059333", "059334", "O", "09A345D6$", "14$D", "1AB$D", "3C$3", "31$A", "4D$4", "6C$5", "73$C", "71$A", "81$A", "61$A", "41$A", "7DE$6", "D4$D", "D1$A", "E3$C", "E1$A", "G1$A", "12C$9", "J1$A", "K4$D", "L3$C", "LA$1", "MA$1", "059407", "059330", "059330", "059330", "059331", "059332", "059333", "059334", "059407", "059407", "059331", "059331", "059348", "059348", "059350", "059351", "059352", "N", "09A345D6$", "14$D", "11$9", "21$9", "4B$4", "5C$3", "6D$4", "7C$5", "83$C", "1AB$D", "AC$3", "BD$4", "CC$5", "D3$C", "DDE$6", "F4$D", "G3$C", "F1$9A", "I4$D", "J3$C", "423$A", "LC$3", "MD$4", "059425", "059332", "059332", "059350", "059358", "059358", "059360", "059361", "K", "09BCCD6$", "13$C", "15$C", "11$9", "21$9", "34$D", "31$9", "63$C", "84$B", "8D$B", "81$9", "61$9", "91$9", "A1$9", "1DE$6", "F4$D", "F1$9", "G3$C", "G1$9", "I1$9", "059434", "059333", "059333", "059351", "059360", "059368", "059368", "059370", "M", "09BCCD6$", "13$C", "15$C", "11$9", "24$B", "21$9", "34$D", "31$9", "73$C", "94$B", "9D$B", "91$9", "71$9", "A1$9", "5E$6", "F1$9", "51$9", "B1$9", "1DE$6", "J4$D", "J1$9", "K1$9", "059443", "059334", "059334", "059352", "059361", "059370", "059378", "059378", "G", "09BCD6$", "14$C", "11$9", "2E$6", "43$B", "41$9", "25$D", "23$B", "21$9", "71$9", "51$9", "81$9", "1DE$6", "D1$9", "734$B", "F1$9", "059452", "059407", "059407", "059425", "059434", "059443", "059452", "C", "09BCE$", "16$E", "14$C", "11$9", "24$C", "21$9", "33$B", "31$9", "53$B", "51$9", "71$9", "91$9", "059460", "059460", "059407", "059407", "059425", "059434", "059443", "059452", "059460", "6", "09BC$", "14$C", "11$9", "23$B", "21$9", "41$9", "059470", "7", "03B4C$", "12$B", "21$C", "1CD$3", "4E$4", "51$C", "41$C", "059472", "E", "093B4C$", "12$B", "16$9", "21$C", "46$9", "26$9", "1CD$3", "7E$4", "81$C", "86$9", "71$C", "76$9", "96$9", "B6$9", "I", "0192A34$", "1C$1", "16$9", "26$9", "4B$2", "2AB$2", "6CD$3", "7E$4", "81$C", "71$C", "86$9A", "B1$C", "C4$E", "B4$E", "45DE$A", "F4$E", "G3$D", "H12$C", "Q", "0192A3B4$", "16$9", "2C$2", "3D$3", "4E$4", "3B$1", "1BC$1", "7A$2", "81D$3", "9E$4", "ABC$1", "B4$E", "5BC$1", "D4$E", "35E$1", "F4$E", "F2D$A", "H1$B", "IA$C", "J4$E", "I4$E", "H4$E", "K3$D", "N2$A", "OC$2", "PB$1", "L", "01ABCD6E$", "1B$1", "14$E", "24$E", "33$D", "5B$1", "592$6", "7B$1", "8A$2", "9BCD$3", "AE$4", "B1$B", "A1$B", "55E$1C", "E4$E", "E2D$A", "G1$B", "H4$E", "G4$E", "I3$D", "KB$1", "J", "01ABCD6E$", "1B$1", "14$E", "24$E", "35$D", "5B$1", "3923$6", "7B$1", "8A$2", "9BC$3", "A1$B", "ADE$4", "C1$B", "53E$1C", "E2$A", "E4$E", "F1$B", "H4$E", "F4$E", "H", "01ABCD6E$", "1B$1", "145$DE", "3B$1", "33E$1C", "52$A", "54$E", "61$B", "84$E", "64$E", "19234$6", "BB$1", "CA$2", "DBC$3", "ED$4", "F1$B", "E1$B", "059479", "059474", "059474", "059474", "059475", "059476", "059477", "059478", "059479", "059479", "059475", "059475", "K", "0192A34$", "1C$1", "2AB$2", "36$A", "3CD$3", "5E$4", "61$C", "66$A", "51$C", "56$A", "76$A", "96$A", "25DE$9", "D6$A", "E4$E", "D4$E", "F3$D", "HA$6", "H12$C", "JA$6", "059492", "[", "0192A3B4$", "1C6$2", "2D$3", "3E$4", "2B$1", "5A$6", "62$A", "61D$3", "8E$4", "9BC$1", "A4$E", "A6$AB", "C4$E", "25E$1", "E4$E", "E2D$9A", "G4$E", "H3$D", "G19$B", "JA$C", "K4$E", "J4$E", "L3$D", "N2$A", "OC$2", "OB$9", "QA$6", "RC$2", "SD$3", "TE$4", "UB$1", "V4$E", "SB$1", "O5DE$9", "Y4$E", "Z3$D", "Z", "09AA3BB4C$", "16$A", "12$A", "21$B", "4D$3", "5E$4", "6B$1", "74$E", "42$6", "1BCD$3", "AE$4", "B1$B", "A1$B", "45E$1C", "E4$E", "E2D$A", "G1$B", "H4$E", "G4$E", "GC$9", "I3$D", "LB$1", "JC$9", "MC$9", "M5E$9", "P4$E", "K1A$6", "RB$1", "R4$E", "S4$E", "T3$D", "VB$1", "P12D$B", "X4$E", "Y3$D", "U", "019ABCD6E$", "1B$1", "14$E", "24$E", "35$D", "5B$1", "323$6", "7B$1", "8A$2", "9BC$3", "A1$B", "ADE$4", "C1$B", "75E$9", "EB$1", "E4$E", "F4$E", "E6$1A", "I4$E", "J5$D", "I9$CD", "L1$B", "M4$E", "LA$2", "O4$E", "L4$E", "K3E$C", "R4$E", "R12$B", "T4$E", "P", "019ABCD6E$", "1B$1", "1234$6", "3B$1", "35$9", "4A$2", "45$9", "6BC$3", "8D$4", "91$B", "81$B", "56$1A", "C9$CD", "D1$B", "E4$E", "DA$2", "G4$E", "D4$E", "IC5$9", "J3E$C", "K4$E", "K12$B", "M4$E", "145$DE", "OB$1", "059497", "059476", "059476", "059494", "Z", "0192A3B4$", "1BC$2", "2A$1", "2D$3", "4E$4", "56$B", "64$E", "26$B", "35E$A", "96$B", "A4$E", "94$E", "A2D$9", "DB$6", "D4$E", "E4$E", "F3$D", "HB$6", "D1$A6", "J9$C", "K6$B", "L4$E", "K4$E", "M3$D", "OB$6", "P2$9", "PC$9", "NC$9", "3BCD$3", "TE$4", "U6$B", "T6$B", "L2345$9", "X4$E", "Y3$D", "059502", "_", "09AA3BB4C$", "11$A", "22$B", "26$B", "4D$3", "5E$4", "1D6$3", "7E$4", "8BC$6", "94$E", "91$AB", "B4$E", "15E$A", "D4$E", "D6$BC", "F4$E", "D2D$9", "H6$B", "I4$E", "H4$E", "J3$D", "LB$6", "I1$A6", "N4$E", "O3$D", "N96$B", "QA$C", "R4$E", "Q4$E", "S3$D", "UC$A", "U5E$A", "W4$E", "WB$9", "XB$9", "YA$1", "[4$E", "W2D$9", "]4$E", "^3$D", "b", "019ABCD6E$", "14$E", "25$D", "1AB$1", "44$E", "55$D", "53$6", "71$A", "8C$3", "82$B", "5BC$6", "BDE$4", "C1$AB", "75E$A", "E4$E", "E2$9", "F2$9", "G6$B", "I4$E", "J5$D", "K1$A", "L9$B", "MD$5", "NE$4", "OA$CD", "PB$2", "P4$E", "QA$1", "S4$E", "SD$A", "T1$A", "T5$A", "TD$A", "OB$96", "Y4$E", "M3E$C", "[4$E", "[2$9", "[B$9", "\\2$9", "\\B$9", "^A$1", "a4$E", "Z", "019ABCD6E$", "1AB$1", "234$6", "31$A", "35$A", "4C$3", "6D$4", "42$B", "52$9", "96$B", "3BC$3", "BD$4", "85$9A", "56$BC", "EA$D", "F4$E", "F1$A", "G1$A", "G5$A", "H2$B", "K4$E", "KCD$A", "HC$3E", "LC5$A", "OB$9", "PA$1", "NAB$1", "O3E$C", "S4$E", "S2$9", "SB$9", "T2$9", "TB$9", "VA$1", "Y4$E", "059506", "059477", "059477", "059495", "059504", "O", "09AA3B4C$", "11$A", "1CD$3", "3E$4", "46$C", "41$A", "36$C", "31$A", "51$A", "71$A", "15E$AB", "B6$C", "C4$E", "B4$E", "B2D$9", "F1$A", "G4$E", "F4$E", "H3$D", "JA$1", "J56E$C", "LA$1", "L4$E", "M4$E", "059512", "V", "09AAB4CCD$", "13$C", "16$C", "11$A", "21$A", "3E$4", "61$A", "35$D", "31$A", "81$A", "1DE$4", "B1$A", "83E$C", "D4$E", "D1$A", "E1$A", "DD$AB", "HC$6", "H4$E", "I4$E", "I2$9", "J5$D", "K2$9", "L1$A", "O4$E", "M2C$9", "Q1$A", "R3E$C", "SA$1", "S4$E", "T4$E", "P", "09AABCD6E$", "11$A", "1CD$6", "34$D", "31$A", "43$C", "41$A", "61$A", "65$AB", "96$C", "92$9", "B1$A", "AAB$D", "D4$E", "D1$A", "E1$A", "DC$3E", "H1$A", "E5$AB", "J2C$9", "K1$A", "L3E$C", "MA$1", "M4$E", "N4$E", "059515", "059478", "059478", "059496", "059505", "059514", "J", "09AAB4CD$", "15$C", "11$A", "26$D", "21$A", "41$A", "1DE$4", "76$D", "71$A", "81$A", "23E$AB", "B4$E", "B2$9", "C2$9", "D1$A", "F4$E", "C56$D", "H2$9", "I1$A", "059522", "K", "09A345DE$", "12$9", "21$A", "1AB$3", "4C$5", "5D$4", "66$D", "61$A", "51$A", "71$A", "46$D", "41$A", "BC$E", "D5$C", "D1$A", "B1$A", "E1$A", "E34$AB", "I2$9", "J1$A", "059524", "059479", "059479", "059497", "059506", "059515", "059524", "H", "09AABCDE$", "11$A", "145$CD", "31$A", "3C6$E", "55$C", "51$A", "61$A", "33D$AB", "94$D", "92$9", "A2$9", "B1$A", "D4$D", "A56$E", "F2$9", "G1$A", "059532", "059532", "059479", "059479", "059497", "059506", "059515", "059524", "059532", "A", "09AABCD$", "11$A", "145$CD", "31$A", "33D$AB", "54$D", "52$9", "62$9", "71$A", "94$D", "059542", "B", "0A3B4C$", "12$B", "21$C", "1CD$3", "4E$4", "51$C", "41$C", "25DE$A", "84$E", "93$D", "A12$C", "059544", "F", "09A3B4C$", "12$B", "21$C", "1CD$3", "4E$4", "51$C", "41$C", "25DE$A", "84$E", "86$9", "93$D", "96$9", "B6$9", "B12$C", "E6$9", "G", "0192A34$", "1C$1", "2AB$2", "36$A", "3CD$3", "5E$4", "61$C", "66$A", "51$C", "56$A", "76$A", "96$A", "25D6E$9A", "D4$E", "E3$D", "F12$C", "T", "0192A3B4$", "1C6$2", "2D$3", "3E$4", "2B$1", "5A$6", "62$A", "61D$3", "8E$4", "9BC$1", "A4$E", "A6$AB", "C4$E", "25E$1", "E4$E", "E2D$9A", "G4$E", "H3$D", "G19$B", "JA$C", "K4$E", "J4$E", "L3$D", "N2$A", "OC$2", "OB$9", "O5DE$9", "R4$E", "S3$D", "T", "09AA3BB4C$", "16$A", "12$A", "21$B", "4D$3", "5E$4", "6B$1", "74$E", "42$6", "1BCD$3", "AE$4", "B1$B", "A1$B", "45E$1C", "E4$E", "E2D$A", "G1$B", "H4$E", "G4$E", "GC$9", "I3$D", "LB$1", "JC$9", "MC$9", "M5E$9", "P4$E", "P12D$B", "R4$E", "S3$D", "Q", "019ABCD6E$", "1B$1", "14$E", "24$E", "35$D", "5B$1", "323$6", "7B$1", "8A$2", "9BC$3", "A1$B", "ADE$4", "C1$B", "53E$1C", "E2$A", "E4$E", "F1$B", "H4$E", "F4$E", "FCD$9", "K4$E", "L5$D", "M3E$C", "N4$E", "N12$B", "P4$E", "N", "019ABCD6E$", "1B$1", "1234$6", "3B$1", "4A$2", "5BC$3", "6D$4", "71$B", "61$B", "145$DE", "AB$1", "A3E$1C", "C2$A", "C4$E", "D1$B", "F4$E", "D4$E", "DCD$9", "HC5$9", "J3E$C", "K4$E", "K12$B", "M4$E", "059551", "059546", "059546", "059546", "059547", "059548", "059549", "059550", "059551", "059551", "059547", "059547", "059492", "059492", "059494", "059495", "059496", "059497", "059497", "059548", "059548", "059494", "059502", "059502", "059504", "059505", "059506", "059506", "059549", "059549", "059495", "059504", "059512", "059512", "059514", "059515", "059515", "059550", "059550", "059496", "059505", "059514", "059522", "059522", "059524", "059524", "059551", "059551", "059497", "059506", "059515", "059524", "059532", "059532", "059532", "059551", "059551", "059497", "059506", "059515", "059524", "059532", "059542", "059542", "J", "0A3BB4C$", "11$B", "2D$3", "3E$4", "22$C", "1CD$3", "6E$4", "15E$B", "84$E", "82D$A", "A1$B", "BA$C", "C4$E", "D3$D", "E2$A", "EC$A", "DC$A", "A4$E", "GB$1", "059616", "Q", "09A3BB4C$", "11$B", "2D$3", "3E$4", "22$C", "1CD$3", "6E$4", "15E$B", "84$E", "82D$A", "A1$B", "BA$C", "C4$E", "D3$D", "E2$A", "EC$A", "DC$A", "A4$E", "A6$9", "GB$1", "I6$9", "K6$9", "FB6$9", "N5DE$B", "O4$E", "P3$D", "R", "019ABCDE$", "14$E", "23$D", "32$C", "3AB$1", "5CD$3", "6E$4", "55E$B", "84$E", "86$A", "96$A", "A2D$9", "C1$A", "D4$E", "C4$E", "E3$D", "G2$C", "GA$1", "D9$BC", "JA$6", "K4$E", "J4$E", "L3$D", "N6$A", "H5DE$B", "P4$E", "Q3$D", "R", "0192A3B4$", "1BC$2", "2A$1", "2D$3", "4E$4", "56$B", "64$E", "26$B", "85E$1", "94$E", "92D$9", "B1$A", "C4$E", "B4$E", "D3$D", "F2$C", "FA$1", "C9$BC", "I4$E", "J3$D", "3BCD$3", "LE$4", "M6$B", "L6$B", "G5DE$B", "P4$E", "Q3$D", "Z", "09AA3BB4C$", "11$A", "22$B", "26$B", "4D$3", "5E$4", "1D6$3", "7E$4", "8BC$6", "94$E", "91$AB", "B4$E", "45E$1C", "D4$E", "D12D$B", "FC$A", "F4$E", "G4$E", "GB$9", "H3$D", "KC$A", "LB$9", "IB$9", "JA$1", "O4$E", "MA$1", "K5E$A", "R4$E", "RB$9", "SB$9", "TA$1", "V4$E", "R2D$9", "X4$E", "Y3$D", "^", "019ABCD6E$", "14$E", "25$D", "1AB$1", "44$E", "55$D", "53$6", "71$A", "8C$3", "82$B", "5BC$6", "BDE$4", "C1$AB", "33E$C", "EA$1", "F4$E", "FD$A", "G1$A", "G5$A", "GD$A", "E2$B", "L4$E", "LCD$A", "N4$E", "NB$9", "O5$D", "QB$9", "OB$9", "PA$1", "T4$E", "RA$1", "Q3E$C", "W4$E", "W2$9", "WB$9", "X2$9", "XB$9", "ZA$1", "]4$E", "X", "019ABCD6E$", "1AB$1", "234$6", "31$A", "4C$3", "5D$4", "42$B", "3BC$3", "8D$4", "245$DE", "A1$AB", "B3E$C", "CA$1", "D4$E", "DD$A", "E1$A", "E5$A", "C2$B", "I4$E", "ICD$A", "KB$9", "LA$1", "JC5$A", "NB$9", "OA$1", "N3E$C", "Q4$E", "Q2$9", "QB$9", "R2$9", "RB$9", "TA$1", "W4$E", "059623", "059618", "059618", "059618", "059619", "059620", "059621", "059622", "059623", "059623", "059619", "059619", "H", "01ABCDE$", "14$E", "23$D", "32$C", "39AB$1", "5CD$3", "6E$4", "55E$B", "84$E", "86$A", "96$A", "45DE$B", "C6$A", "C4$E", "D4$E", "E3$D", "G6$A", "059636", "H", "012A3B4$", "1BC$2", "2D$3", "3E$4", "46$B", "54$E", "26$B", "29A$1", "8BCD$3", "9E$4", "A6$B", "96$B", "795E$1", "D4$E", "15D6E$AB", "F4$E", "G3$D", "O", "01ABCD6E$", "14$E", "23$D", "3B$6", "42$B", "1BC$6", "64$E", "49A$1", "8D6$3", "9E$4", "ABC$6", "B4$E", "35E$C", "D9$1", "E4$E", "F1$9", "D2D$B", "HC$A", "H4$E", "I4$E", "J3$D", "LC$A", "L5E$A", "N4$E", "R", "01ABCD6E$", "14$E", "25$D", "2BC$6", "43$C", "52$B", "4DE$4", "59A$1", "86$3", "9E$4", "95$D", "9BC$6", "CDE$4", "33E$C", "E2$B", "F4$E", "E4$E", "FCD$A", "I4$E", "J5$D", "E9A$1", "L4$E", "LD$A", "M5$A", "MD$A", "K3E$C", "Q4$E", "N", "01ABCD6E$", "19AB$1", "234$6", "3BC$3", "4D$4", "31$9A", "6C$3", "7D$4", "62$B", "245$DE", "A3E$BC", "B4$E", "BD$A", "C5$A", "B1$9A", "F2$B", "G4$E", "F4$E", "GCD$A", "FC$3E", "HC5$A", "L3E$C", "M4$E", "059641", "059620", "059620", "059638", "M", "012A3B4$", "1BC$2", "2D$3", "3E$4", "46$B", "54$E", "26$B", "29A$1", "85E$A", "96$B", "A4$E", "94$E", "8BCD$3", "DE$4", "E6$B", "D6$B", "15DE$A", "H6$B", "I4$E", "H4$E", "J3$D", "LB$6", "059646", "T", "01ABCD6E$", "14$E", "23$D", "3B$6", "42$B", "1BC$6", "64$E", "49A$1", "8D6$3", "9E$4", "ABC$6", "B4$E", "85E$A", "D4$E", "D6$BC", "F4$E", "F1$9", "G1$9", "H2D$B", "JC$A", "J4$E", "KB$6", "K4$E", "M4$E", "L3$D", "PC$A", "QB$6", "P5E$A", "S4$E", "V", "01ABCD6E$", "14$E", "25$D", "2BC$6", "43$C", "52$B", "4DE$4", "59A$1", "86$3", "9E$4", "95$D", "9BC$6", "CDE$4", "85E$A", "E4$E", "E6$BC", "GA$D", "H4$E", "I5$A", "ID$A", "H1$9A", "L2$B", "M4$E", "L4$E", "MCD$A", "PB$6", "P4$E", "Q4$E", "R5$D", "T3E$C", "U4$E", "P", "01ABCD6E$", "19AB$1", "234$6", "35$A", "3BC$3", "5D$4", "31$9A", "7C$3", "8D$4", "72$B", "A5$A", "B6$B", "46$BC", "DA$D", "E4$E", "F5$A", "E1$9A", "H2$B", "I4$E", "H4$E", "HC$3E", "JC5$A", "M3E$C", "N4$E", "245$DE", "059650", "059621", "059621", "059639", "059648", "N", "01A3B4C$", "19A$1", "2CD$3", "3E$4", "46$C", "36$C", "41$9A", "76$C", "74$E", "84$E", "15E$B", "B9$1", "C6$C", "D4$E", "D1$9", "C4$E", "E1$9", "G1$9", "B2D$A", "J4$E", "K3$D", "L56E$C", "M4$E", "059656", "V", "01ABCD6E$", "14$E", "2C$6", "33$C", "25$D", "19A$1", "64$E", "7C$6", "83$C", "75$D", "8DE$4", "B1$9A", "A3E$C", "D4$E", "DD$AB", "FC$6", "F4$E", "F1$9", "G4$E", "G1$9", "H5$D", "L1$9", "H1$9", "J1$9", "IB$D", "P4$E", "K2$A", "R4$E", "M2C$A", "T3E$C", "U4$E", "O", "01ABCD6E$", "19A$1", "2CD$6", "34$D", "43$C", "31$9A", "64$D", "73$C", "85$B", "99$1", "A6$C", "B1$9", "CB$D", "D4$E", "92$A", "E5$B", "G9$1", "BAB$D", "I4$E", "IC$3E", "K1$9A", "G2C$A", "M3E$C", "N4$E", "059659", "059622", "059622", "059640", "059649", "059658", "J", "01AB4CD$", "15$C", "26$D", "19A$1", "45$C", "56$D", "4DE$4", "76$D", "71$9A", "96$D", "23E$B", "B9$1", "C4$E", "D1$9", "B2$A", "F4$E", "D56$D", "H1$9", "I2$A", "059666", "K", "09A345DE$", "11$9", "2B$3", "3C$5", "4D$4", "56$D", "36$D", "7C$E", "75$E", "22$A"}; POWV.insert(POWV.end(), powv_temp.begin(), powv_temp.end()); }
17,314
86,469
0.445582
62939e84949b3cd35d583b293ffb90a6ed2864c1
918
h
C
src/ScanDialog.h
huseyinkozan/softfm-gui
570ff2aacb7b68b1237c0121fbc9dccbb5f0a19e
[ "MIT" ]
1
2022-03-29T19:41:36.000Z
2022-03-29T19:41:36.000Z
src/ScanDialog.h
huseyinkozan/softfm-gui
570ff2aacb7b68b1237c0121fbc9dccbb5f0a19e
[ "MIT" ]
null
null
null
src/ScanDialog.h
huseyinkozan/softfm-gui
570ff2aacb7b68b1237c0121fbc9dccbb5f0a19e
[ "MIT" ]
null
null
null
#ifndef SCANDIALOG_H #define SCANDIALOG_H #include <QDialog> #include "ChannelRecord.h" #include "MainWindow.h" namespace Ui { class ScanDialog; } class ScanDialog : public QDialog { Q_OBJECT public: explicit ScanDialog(QWidget *parent = nullptr); ~ScanDialog(); const ChannelRecordMap &crMap() const; void setCrMap(const ChannelRecordMap &newCrMap); void process(const MainWindow::AdvancedFields & af); bool isMuted() const; public slots: void done(int result); signals: void changeFreq(int freqAsKhz); protected: void showEvent(QShowEvent *event); private slots: void timerTimeout(); void on_scanButton_clicked(); void on_okButton_clicked(); void on_cancelButton_clicked(); void on_tableWidget_itemSelectionChanged(); private: Ui::ScanDialog *ui; ChannelRecordMap m_crMap; QTimer * m_timer = nullptr; }; #endif // SCANDIALOG_H
17
56
0.714597
d124c4496a056898a034ca070962a4213180584d
2,878
c
C
platform/ethernut2/ethernut-main.c
teco-kit/contiki-jn51xx
867c0e86c189387cac7decf90c95e3c0b038c611
[ "BSD-3-Clause" ]
null
null
null
platform/ethernut2/ethernut-main.c
teco-kit/contiki-jn51xx
867c0e86c189387cac7decf90c95e3c0b038c611
[ "BSD-3-Clause" ]
null
null
null
platform/ethernut2/ethernut-main.c
teco-kit/contiki-jn51xx
867c0e86c189387cac7decf90c95e3c0b038c611
[ "BSD-3-Clause" ]
null
null
null
/* Copyright (c) 2005, Swedish Institute of Computer Science * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This file is part of the Contiki OS * * $Id: ethernut-main.c,v 1.4 2010/12/03 21:39:33 dak664 Exp $ * */ #include "contiki.h" #include "contiki-net.h" #include "dev/serial-line.h" #include "dev/slip.h" #include "dev/rs232.h" #include <avr/interrupt.h> /*static void setup_xram(void) __attribute__ ((naked)) \ __attribute__ ((section (".init1"))); static void setup_xram(void) { outp(BV(SRE) | BV(SRW), MCUCR); }*/ static struct uip_fw_netif slipif = {UIP_FW_NETIF(0,0,0,0, 0,0,0,0, slip_send)}; PROCESS(serial_test, "Serial test"); PROCESS_THREAD(serial_test, ev, data) { PROCESS_BEGIN(); while(1) { PROCESS_WAIT_EVENT_UNTIL(ev == serial_line_event_message); rs232_print(RS232_PORT_0, data); } PROCESS_END(); } PROCINIT(&etimer_process, &serial_line_process, &slip_process, &uip_fw_process); int main(void) { uip_ipaddr_t addr; clock_init(); rs232_init(RS232_PORT_0, USART_BAUD_57600,USART_PARITY_NONE | USART_STOP_BITS_1 | USART_DATA_BITS_8); rs232_set_input(RS232_PORT_0, slip_input_byte); sei(); /* Initialize drivers and event kernal */ process_init(); uip_ipaddr(&addr, 172,16,0,2); uip_sethostaddr(&addr); procinit_init(); autostart_start(autostart_processes); uip_fw_default(&slipif); rs232_print_p(RS232_PORT_0, PSTR("Initialized\n")); while(1) { process_run(); } return 0; }
28.78
103
0.732453
2bd027e873bc5f47e6635945e4cdefa36e12276d
861
h
C
bootstrap/include/panda$util$JSONParser$closure152.h
ethannicholas/panda-old
75576bcf5c4e5a34e964547d623a5de874e6e47c
[ "MIT" ]
null
null
null
bootstrap/include/panda$util$JSONParser$closure152.h
ethannicholas/panda-old
75576bcf5c4e5a34e964547d623a5de874e6e47c
[ "MIT" ]
null
null
null
bootstrap/include/panda$util$JSONParser$closure152.h
ethannicholas/panda-old
75576bcf5c4e5a34e964547d623a5de874e6e47c
[ "MIT" ]
null
null
null
// This file was automatically generated by the Panda compiler #ifndef panda$util$JSONParser$closure152_H #define panda$util$JSONParser$closure152_H extern panda$core$Class panda$util$JSONParser$closure152_class; #ifndef CLASS_panda$util$JSONParser$closure152 #define CLASS_panda$util$JSONParser$closure152 struct panda$util$JSONParser$closure152 { panda$core$Class* cl; }; #define panda$util$JSONParser$closure152$closure_panda$parser$GLRParser$State_$Rpanda$core$Object$Z_INDEX 4 typedef panda$core$Object*(panda$util$JSONParser$closure152$closure_panda$parser$GLRParser$State_$Rpanda$core$Object$Z_TYPE)(panda$util$JSONParser$closure152* self, panda$parser$GLRParser$State*); void panda$util$JSONParser$closure152$init(panda$util$JSONParser$closure152* self); panda$util$JSONParser$closure152* new_panda$util$JSONParser$closure152$init(); #endif #endif
50.647059
196
0.832753
2be84b5ca1f9680732d3cb79edfdc4c6d7c630c8
2,940
h
C
nau/src/nau/geometry/vertexData.h
Khirion/nau
47a2ad8e0355a264cd507da5e7bba1bf7abbff95
[ "MIT" ]
29
2015-09-16T22:28:30.000Z
2022-03-11T02:57:36.000Z
nau/src/nau/geometry/vertexData.h
Khirion/nau
47a2ad8e0355a264cd507da5e7bba1bf7abbff95
[ "MIT" ]
1
2017-03-29T13:32:58.000Z
2017-03-31T13:56:03.000Z
nau/src/nau/geometry/vertexData.h
Khirion/nau
47a2ad8e0355a264cd507da5e7bba1bf7abbff95
[ "MIT" ]
10
2015-10-15T14:20:15.000Z
2022-02-17T10:37:29.000Z
#ifndef VERTEXDATA_H #define VERTEXDATA_H #include "nau/math/vec3.h" #include <map> #include <memory> #include <string> #include <vector> using namespace nau::math; namespace nau { namespace geometry { class VertexAttrib { public: float x,y,z,w; VertexAttrib() : x(0), y(0), z(0), w(0) {}; VertexAttrib(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {}; VertexAttrib(const VertexAttrib &v) : x(v.x), y(v.y), z(v.z), w(v.w) {}; void set(float xx, float yy, float zz, float ww = 1) { this->x = xx; this->y = yy; this->z = zz; this->w = ww; } void add(const VertexAttrib &v) { x += v.x; y += v.y; z += v.z; w += v.w; }; bool operator == (const VertexAttrib &v) const { float tolerance = -1.0f; return (FloatEqual(x, v.x, tolerance) && FloatEqual(y, v.y, tolerance) && \ FloatEqual(z, v.z, tolerance) && FloatEqual(w, v.w, tolerance)); }; void copy(const VertexAttrib &v) { x = v.x; y = v.y; z = v.z; w = v.w; }; void normalize() { float m = sqrtf(x*x + y*y + z*z); if (m <= FLT_EPSILON) { m = 1; } x /= m; y /= m; z /= m; }; }; class VertexData { public: static const int MaxAttribs = 16; static const std::string Syntax[]; static unsigned int GetAttribIndex(std::string); // A vertex attribute is four floats typedef VertexAttrib Attr ; static unsigned int const NOLOC = 0; static std::shared_ptr<VertexData> Create (const std::string &name); virtual ~VertexData(void); void setName(std::string &name); virtual unsigned int getNumberOfVertices() = 0; std::shared_ptr<std::vector<Attr>> &getDataOf (unsigned int type); void setDataFor (unsigned int index, std::shared_ptr<std::vector<Attr>> &dataArray); int add (std::shared_ptr<VertexData> &aVertexData); virtual void prepareTriangleIDs(unsigned int sceneObjID, unsigned int primitiveOffset, std::vector<unsigned int> *index) = 0; virtual void appendVertex(unsigned int i) = 0; virtual void setAttributeDataFor (unsigned int type, std::shared_ptr<std::vector<VertexData::Attr>> &, int location = -1) = 0; virtual void setAttributeLocationFor (unsigned int type, int location) = 0; void unitize(vec3 &vCenter, vec3 &vMin, vec3 &vMax); virtual bool compile(void) = 0; virtual unsigned int getBufferID(unsigned int vertexAttrib) = 0; virtual void resetCompilationFlag() = 0; virtual void bind (void) = 0; virtual void unbind (void) = 0; virtual bool isCompiled() = 0; virtual void setBuffer(unsigned int type, int bufferID) = 0; protected: VertexData(void); VertexData(const std::string &name); std::shared_ptr<std::vector<Attr>> m_InternalArrays[MaxAttribs]; std::string m_Name; }; }; }; #endif //VERTEXDATA_H
21.940299
80
0.611224
9ae2dc15ff2dddfad1e223a96981b012538088c4
1,648
h
C
tests/corruption_test_0/allocator_policy.h
bridgerrholt/cpp_allocators
9cfc79cb168918b2ec01ad618c5c705e6d2bff93
[ "MIT" ]
null
null
null
tests/corruption_test_0/allocator_policy.h
bridgerrholt/cpp_allocators
9cfc79cb168918b2ec01ad618c5c705e6d2bff93
[ "MIT" ]
null
null
null
tests/corruption_test_0/allocator_policy.h
bridgerrholt/cpp_allocators
9cfc79cb168918b2ec01ad618c5c705e6d2bff93
[ "MIT" ]
null
null
null
#ifndef BRH_CPP_ALLOCATORS_CORRUPTION_TEST_0_ALLOCATOR_POLICY_H #define BRH_CPP_ALLOCATORS_CORRUPTION_TEST_0_ALLOCATOR_POLICY_H #include <cstddef> #include <string> #include <allocators/blocks/block.h> namespace brh { namespace allocators { namespace tests { class AllocatorPolicy { public: virtual ~AllocatorPolicy() {} virtual SizeType calcRequiredSize(SizeType desiredSize) const = 0; virtual SizeType getStorageSize() const = 0; virtual RawBlock allocate (SizeType size) = 0; virtual void deallocate(RawBlock block) = 0; virtual bool reallocate(RawBlock & block, SizeType size) { return false; } virtual bool expand(RawBlock & block, SizeType amount) { return false; } }; template <class Allocator> class BasicAllocatorPolicy : public AllocatorPolicy { public: BasicAllocatorPolicy() {} template <class ... ArgTypes> BasicAllocatorPolicy(ArgTypes ... args) : allocator_(std::forward(args)...) {} ~BasicAllocatorPolicy() {} SizeType calcRequiredSize(SizeType desiredSize) const override { return allocator_.calcRequiredSize(desiredSize); } SizeType getStorageSize() const override { return allocator_.getStorageSize(); } RawBlock allocate(SizeType size) override { return allocator_.allocate(size); } void deallocate(RawBlock block) override { return allocator_.deallocate(block); } bool reallocate(RawBlock & block, SizeType size) override { return allocator_.reallocate(block, size); } bool expand(RawBlock & block, SizeType amount) override { return allocator_.expand(block, amount); } private: Allocator allocator_; }; } } } #endif
21.128205
68
0.740898
32625e96c3efc15dc2b1e768a9dd00c6382fdf09
7,660
c
C
STM32F030/STM32F0xx_StdPeriph_Lib_V1.5.0/Projects/STM32F0xx_StdPeriph_Examples/IWDG/IWDG_Reset/main.c
EEWX/VFD28016-display
94f799cbb890784818ba3e87457d68dfe88c0bbb
[ "CC-BY-4.0" ]
null
null
null
STM32F030/STM32F0xx_StdPeriph_Lib_V1.5.0/Projects/STM32F0xx_StdPeriph_Examples/IWDG/IWDG_Reset/main.c
EEWX/VFD28016-display
94f799cbb890784818ba3e87457d68dfe88c0bbb
[ "CC-BY-4.0" ]
null
null
null
STM32F030/STM32F0xx_StdPeriph_Lib_V1.5.0/Projects/STM32F0xx_StdPeriph_Examples/IWDG/IWDG_Reset/main.c
EEWX/VFD28016-display
94f799cbb890784818ba3e87457d68dfe88c0bbb
[ "CC-BY-4.0" ]
null
null
null
/** ****************************************************************************** * @file IWDG/IWDG_Reset/main.c * @author MCD Application Team * @version V1.4.0 * @date 24-July-2014 * @brief Main program body ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2> * * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 * * 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. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /** @addtogroup STM32F0xx_StdPeriph_Examples * @{ */ /** @addtogroup IWDG_Reset * @{ */ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ __IO uint32_t TimingDelay = 0; __IO uint32_t LsiFreq = 40000; extern __IO uint16_t CaptureNumber; /* Private function prototypes -----------------------------------------------*/ static void TIM14_ConfigForLSI(void); void Delay(__IO uint32_t nTime); /* Private functions ---------------------------------------------------------*/ /** * @brief Main program. * @param None * @retval None */ int main(void) { /*!< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file */ /* Initialize LED and Tamper Button mounted on the Eval board */ STM_EVAL_LEDInit(LED1); STM_EVAL_LEDInit(LED2); STM_EVAL_PBInit(BUTTON_TAMPER, BUTTON_MODE_EXTI); /* Setup SysTick Timer for 1 msec interrupts */ if (SysTick_Config(SystemCoreClock / 1000)) { /* Capture error */ while (1); } /* Check if the system has resumed from IWDG reset */ if (RCC_GetFlagStatus(RCC_FLAG_IWDGRST) != RESET) { /* IWDGRST flag set */ /* Turn on LED1 */ STM_EVAL_LEDOn(LED1); /* Clear reset flags */ RCC_ClearFlag(); } else { /* IWDGRST flag is not set */ /* Turn off LED1 */ STM_EVAL_LEDOff(LED1); } #ifdef LSI_TIM_MEASURE /* TIM Configuration -------------------------------------------------------*/ TIM14_ConfigForLSI(); /* Wait until the TIM14 get 2 LSI edges */ while(CaptureNumber != 2) { } /* Disable TIM14 CC1 Interrupt Request */ TIM_ITConfig(TIM14, TIM_IT_CC1, DISABLE); #endif /* LSI_TIM_MEASURE */ /* IWDG timeout equal to 250 ms (the timeout may varies due to LSI frequency dispersion) */ /* Enable write access to IWDG_PR and IWDG_RLR registers */ IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); /* IWDG counter clock: LSI/32 */ IWDG_SetPrescaler(IWDG_Prescaler_32); /* Set counter reload value to obtain 250ms IWDG TimeOut. Counter Reload Value = 250ms/IWDG counter clock period = 250ms / (LSI/32) = 0.25s / (LsiFreq/32) = LsiFreq/(32 * 4) = LsiFreq/128 */ IWDG_SetReload(LsiFreq/128); /* Reload IWDG counter */ IWDG_ReloadCounter(); /* Enable IWDG (the LSI oscillator will be enabled by hardware) */ IWDG_Enable(); while (1) { /* Toggle LED2 */ STM_EVAL_LEDToggle(LED2); /* Insert 220 ms delay */ Delay(220); /* Reload IWDG counter */ IWDG_ReloadCounter(); } } #ifdef LSI_TIM_MEASURE /** * @brief Configures TIM14 to measure the LSI oscillator frequency. * @param None * @retval None */ static void TIM14_ConfigForLSI(void) { NVIC_InitTypeDef NVIC_InitStructure; TIM_ICInitTypeDef TIM_ICInitStructure; /* Enable peripheral clocks ------------------------------------------------*/ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); /* Allow access to the RTC */ PWR_BackupAccessCmd(ENABLE); /* Reset RTC Domain */ RCC_BackupResetCmd(ENABLE); RCC_BackupResetCmd(DISABLE); /*!< LSI Enable */ RCC_LSICmd(ENABLE); /*!< Wait till LSI is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET) {} /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI); /* Enable the RTC Clock */ RCC_RTCCLKCmd(ENABLE); /* Wait for RTC APB registers synchronisation */ RTC_WaitForSynchro(); /* Enable TIM14 clocks */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM14, ENABLE); /* Enable the TIM14 Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = TIM14_IRQn; NVIC_InitStructure.NVIC_IRQChannelPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); /* Configure TIM14 prescaler */ TIM_PrescalerConfig(TIM14, 0, TIM_PSCReloadMode_Immediate); /* Connect internally the TM14_CH1 Input Capture to the LSI clock output */ TIM_RemapConfig(TIM14, TIM14_RTC_CLK); /* TIM14 configuration: Input Capture mode --------------------- The LSI oscillator is connected to TIM14 CH1 The Rising edge is used as active edge, The TIM14 CCR1 is used to compute the frequency value ------------------------------------------------------------ */ TIM_ICInitStructure.TIM_Channel = TIM_Channel_1; TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising; TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI; TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV8; TIM_ICInitStructure.TIM_ICFilter = 0; TIM_ICInit(TIM14, &TIM_ICInitStructure); /* TIM14 Counter Enable */ TIM_Cmd(TIM14, ENABLE); /* Reset the flags */ TIM14->SR = 0; /* Enable the CC1 Interrupt Request */ TIM_ITConfig(TIM14, TIM_IT_CC1, ENABLE); } #endif /* LSI_TIM_MEASURE */ /** * @brief Inserts a delay time. * @param nTime: specifies the delay time length, in 10 ms. * @retval None */ void Delay(__IO uint32_t nTime) { TimingDelay = nTime; while(TimingDelay != 0); } /** * @brief Decrements the TimingDelay variable. * @param None * @retval None */ void TimingDelay_Decrement(void) { if (TimingDelay != 0x00) { TimingDelay--; } } #ifdef USE_FULL_ASSERT /** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval None */ void assert_failed(uint8_t* file, uint32_t line) { /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* Infinite loop */ while (1) { } } #endif /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
27.854545
81
0.599739
68415df551432903a439e5f035e1bdcb4e492a0e
1,533
h
C
Gra/button.h
ObalonyPiwot/Alien_Space_Shooter_Game_PwJC
b941cfbb2d382c79519ba41c27633f8b23b25454
[ "MIT" ]
4
2022-01-02T16:45:00.000Z
2022-01-11T15:59:29.000Z
Gra/button.h
ObalonyPiwot/Alien_Space_Shooter_Game_PwJC
b941cfbb2d382c79519ba41c27633f8b23b25454
[ "MIT" ]
null
null
null
Gra/button.h
ObalonyPiwot/Alien_Space_Shooter_Game_PwJC
b941cfbb2d382c79519ba41c27633f8b23b25454
[ "MIT" ]
1
2022-01-06T22:02:21.000Z
2022-01-06T22:02:21.000Z
#pragma once #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <string> #include "Sciany.h" #include "run_game.h" using namespace std; using namespace sf; class Button: public Sciany { public: Button(float p_x, float p_y, float a, float b, int type, string tekst) :Sciany(p_x, p_y, a, b, type, lava) { setFont(); bText.setString(tekst); //getShape(); bText.setPosition(Vector2f(shape.getPosition().x-50, (shape.getPosition().y-20))); shape.setFillColor(Color::Red); }; void draw(RenderWindow& window); void setFont(); void setTexture(); int checkMouse(Vector2i posMouse) { if ((posMouse.x >= Sciany::left()) && (posMouse.x <= Sciany::right()) && (posMouse.y >= Sciany::top()) && (posMouse.y <= Sciany::bottom())) { if (!Sciany::wTexture.loadFromFile("DATA/TEXTURE/BUTTON/active.png")) cout << "Nie wczytano_1 \n"; shape.setTexture(&wTexture); if (Mouse::isButtonPressed(Mouse::Left)) { if (!buffer.loadFromFile("DATA/SOUND/SAMPLES/click.wav")) cout << "samples error "; sound.setBuffer(buffer); sound.play(); switch (wType) { case 1: return 1; break; case 2: return 2; break; } } } else { if (!Sciany::wTexture.loadFromFile("DATA/TEXTURE/BUTTON/disable.png")) cout << "Nie wczytano_1 \n"; shape.setTexture(&wTexture); return 0; } } private: //RectangleShape bShape; SoundBuffer buffer; Sound sound; Font bFont; Text bText; };
23.953125
142
0.6197
04a8a94f0a0aca2b4180358355be6351d18dda7f
4,126
c
C
src/ReturnStack/ReturnStack.c
andreigramescu/GoForth
e6c6f8613ce3b400d8715d0e14695d51d948291d
[ "MIT" ]
2
2020-09-19T12:27:40.000Z
2020-09-22T21:09:40.000Z
src/ReturnStack/ReturnStack.c
andreigramescu/GoForth
e6c6f8613ce3b400d8715d0e14695d51d948291d
[ "MIT" ]
null
null
null
src/ReturnStack/ReturnStack.c
andreigramescu/GoForth
e6c6f8613ce3b400d8715d0e14695d51d948291d
[ "MIT" ]
null
null
null
#include "ReturnStack.h" #include <malloc.h> #include <stdbool.h> #include <assert.h> struct return_stack { size_t length; size_t size; size_t arr[1]; }; bool ReturnStack_append(ReturnStack **darr, size_t val) { struct return_stack *dynarray = (struct return_stack *) *darr; assert(dynarray != NULL); return ReturnStack_insert(darr, val, dynarray->length); } ReturnStack *ReturnStack_create(size_t length) { struct return_stack *dynarray = malloc(sizeof(struct return_stack) + sizeof(size_t) * (length - 1)); if(dynarray == NULL) return NULL; dynarray->length = length; dynarray->size = length; return dynarray; } void ReturnStack_destroy(ReturnStack *dynarray) { free(dynarray); } bool ReturnStack_insert(ReturnStack **darr, size_t val, size_t index) { struct return_stack *dynarray = (struct return_stack *) *darr; assert(dynarray != NULL && index <= dynarray->length); if(dynarray->length + 1 > dynarray->size) { struct return_stack *realloced_dynarray = (struct return_stack *) realloc(dynarray, sizeof(struct return_stack) + dynarray->size * RETURNSTACK_REALLOC_FACTOR * sizeof(size_t)); if(realloced_dynarray == NULL) return false; dynarray = realloced_dynarray; dynarray->size *= RETURNSTACK_REALLOC_FACTOR; *darr = (void *) dynarray; } size_t curr = dynarray->length; while(curr != index) { dynarray->arr[curr] = dynarray->arr[curr - 1]; curr--; } dynarray->arr[curr] = val; dynarray->length++; return true; } size_t ReturnStack_length(ReturnStack *darr) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL); return dynarray->length; } size_t ReturnStack_size(ReturnStack *darr) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL); return dynarray->size; } bool ReturnStack_resize(ReturnStack **darr, size_t size) { struct return_stack *dynarray = (struct return_stack *) *darr; assert(dynarray != NULL); struct return_stack *realloced_dynarray = (struct return_stack *) realloc(dynarray, sizeof(struct return_stack) + size * sizeof(size_t)); if(realloced_dynarray == NULL) return false; dynarray = realloced_dynarray; dynarray->size = size; dynarray->length = dynarray->length > dynarray->size ? dynarray->size : dynarray->length; *darr = dynarray; return true; } size_t *ReturnStack_arr(ReturnStack *darr) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL); return dynarray->arr; } size_t ReturnStack_get(ReturnStack *darr, size_t index) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL && index < dynarray->length); return dynarray->arr[index]; } size_t *ReturnStack_get_arr_reference(ReturnStack *darr, size_t index) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL && index < dynarray->length); return &dynarray->arr[index]; } void ReturnStack_set(ReturnStack *darr, size_t index, size_t val) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL && index < dynarray->length); dynarray->arr[index] = val; } bool ReturnStack_adjust_length(ReturnStack **darr, size_t length) { struct return_stack *dynarray = (struct return_stack *) *darr; if(length > dynarray->size) { if(!ReturnStack_resize(darr, length)) { return false; } dynarray = (struct return_stack *) *darr; } dynarray->length = length; return true; } size_t ReturnStack_remove(ReturnStack *darr, size_t index) { struct return_stack *dynarray = (struct return_stack *) darr; assert(dynarray != NULL && index < dynarray->length); size_t value = dynarray->arr[index]; for(size_t i = index; i < dynarray->length - 1; i++) dynarray->arr[i] = dynarray->arr[i + 1]; dynarray->length--; return value; }
28.068027
184
0.668929
2c0f8dac7e836f878bb4d025a01ba01cb6bcff38
1,356
h
C
Ursa-Editor/src/EditorLayer.h
quiniks/Ursa
4f6c7c153d9d4c2ccb4c42f06d2fa88910d15c8c
[ "Apache-2.0" ]
null
null
null
Ursa-Editor/src/EditorLayer.h
quiniks/Ursa
4f6c7c153d9d4c2ccb4c42f06d2fa88910d15c8c
[ "Apache-2.0" ]
null
null
null
Ursa-Editor/src/EditorLayer.h
quiniks/Ursa
4f6c7c153d9d4c2ccb4c42f06d2fa88910d15c8c
[ "Apache-2.0" ]
null
null
null
#pragma once #include "Ursa.h" #include "imgui/imgui.h" #include "Panels/SceneHierarchyPanel.h" #include "Ursa/Renderer/EditorCamera.h" namespace Ursa { class EditorLayer : public Layer { public: EditorLayer(); virtual ~EditorLayer() = default; virtual void OnAttach() override; virtual void OnDetach() override; void OnUpdate(TimeStep ts) override; virtual void OnImGuiRender() override; void OnEvent(Event& e) override; private: bool OnKeyPressed(KeyPressedEvent& e); bool OnMouseButtonPressed(MouseButtonEvent& e); void NewScene(); void OpenScene(); void SaveSceneAs(); private: EditorCamera m_EditorCamera; Ref<Scene> m_ActiveScene; Entity m_QuadEntity; Entity m_CameraEntity; Entity m_HoveredEntity; Ref<VertexArray> m_SquareVertexArray; Ref<Shader> m_FlatColorShader; Ref<FrameBuffer> m_FrameBuffer; Ref<Texture2D> m_CheckerTexture; Ref<Texture2D> m_TileSheet; Ref<Texture2D> m_UrsaTitle; std::unordered_map<char, Ref<SubTexture2D>> m_TextureMap; uint32_t m_MapWidth = 0, m_MapHeight = 0; glm::vec2 m_ViewportSize = { 0.0f, 0.0f }; bool m_ViewportFocused = false; bool m_ViewportHovered = false; glm::vec2 m_ViewportBounds[2]; //Panels bool m_StatsOpen = false; bool m_DemoOpen = false; SceneHierarchyPanel m_SceneHierarchyPanel; //Gizmos int m_GizmoType = 0; }; }
24.214286
59
0.743363
c8423af7729fc79403cdb0265c9c91a3dc90c21a
10,317
h
C
src/Generic/state/XMLElement.h
BBN-E/serif
1e2662d82fb1c377ec3c79355a5a9b0644606cb4
[ "Apache-2.0" ]
1
2022-03-24T19:57:00.000Z
2022-03-24T19:57:00.000Z
src/Generic/state/XMLElement.h
BBN-E/serif
1e2662d82fb1c377ec3c79355a5a9b0644606cb4
[ "Apache-2.0" ]
null
null
null
src/Generic/state/XMLElement.h
BBN-E/serif
1e2662d82fb1c377ec3c79355a5a9b0644606cb4
[ "Apache-2.0" ]
null
null
null
// Copyright 2011 by BBN Technologies Corp. // All Rights Reserved. // // XMLElement: serialization & deserialization of SERIF's annotations to XML #ifndef XML_ELEMENT_H #define XML_ELEMENT_H #include "Generic/state/XMLStrings.h" #include "Generic/common/UnexpectedInputException.h" #include "Generic/common/InternalInconsistencyException.h" #include <boost/lexical_cast.hpp> #include <vector> #include <map> // Forward declarations. class Symbol; class LocatedString; XERCES_CPP_NAMESPACE_BEGIN class DOMElement; XERCES_CPP_NAMESPACE_END namespace SerifXML { /** A single element in the XML tree used to serialize SERIF's objects. * Each XMLElement corresponds with a single node in the XML tree. * This is the base class for XMLTheoryElement used to serialize SERIF's * docTheory and sub-theory objects. * * A special "NULL" XMLElement can be constructed with the default * constructor. It can also be returned by some methods that check for * optional values. Any attempt to access the tag, attributes, children, * or text of a "NULL" XMLElement will result in an exception. Use * isNull() to check if an XMLElement is NULL. * * This class is not meant to be "complete" -- for example, there is * currently no way to delete a child element or modify an element's * tag. If you find that some functionality is missing, and you need * it, feel free to add a method. * * XMLElement objects are meant to be passed by value. (They are basically * a wrapper for a pair of pointers, so they are cheap to copy). As a * consequence, they should not be used polymorphically and no methods * should be made virtual. */ class XMLElement { public: XMLElement(); // Constructs the "NULL" XMLElement. ~XMLElement() {} XMLElement(xercesc::DOMElement *element); XMLElement(const XMLElement& other); // Copy constructor XMLElement& operator=(const XMLElement& other); // Assignment operator /** Return true if this XMLElement is NULL -- i.e., if it doesn't refer * to any actual element. */ bool isNull() const { return _xercesDOMElement == 0; } // Allow XMLElement to be used in conditional expressions, to test // whether the XMLElement is NULL. operator bool() const { return !isNull(); } //=============================== XML Tag =================================== /** Return this element's XML tag. */ const XMLCh* getTag() const; /** Return true if this element has the specified XML tag. */ bool hasTag(const XMLCh* tagName) const; // [no setTag() method is defined yet] //=========================== XML Attributes =============================== /** Return true if this element defines a value for the specified * XML attribute (or if the DTD defines a default value for * that attribute). */ bool hasAttribute(const XMLCh* attrName) const; /** Return the value of the attribute with the specified name, * using the type specified by the (explicit) template parameter * ReturnType. If this element has no attribute with the given * name, and the XML DTD provides a default value, then return * that value. Otherwise, throw an UnexpectedInputException. * The following ReturnTypes are currently supported: * Symbol, wstring, bool, int, size_t, float, "const XMLCh*" */ template<typename ReturnType> ReturnType getAttribute(const XMLCh* attrName) const; /** Return the value of the attribute with the specified name, * using the type specified by the (explicit) template parameter * ReturnType. If this element has no attribute with the given * name, and the XML DTD provides a default value, then return * that value. Otherwise, return default_value. * The following ReturnTypes are currently supported: * Symbol, wstring, bool, int, size_t, float, "const XMLCh*" */ template<typename ReturnType> ReturnType getAttribute(const XMLCh* attrName, ReturnType default_value) const; /** Set the value of the specified attribute. If the specified attribute * already has a value, then report a load warning and overwrite the * old value with the new one. The following ValueTypes are currently * supported: Symbol, wstring, bool, int, size_t, float, "const XMLCh*" */ template<typename ValueType> void setAttribute(const XMLCh* attrName, ValueType attrValue); //============================= XML Text ================================= /** Return the text contents of this element using the specified * type. Currently supported types are: std::wstring and const XMLCh* */ template<typename ReturnType> ReturnType getText() const; /** Add a given text string to the body of this element. Generally, an * element should not contain both text and child elements, though this * isn't currently enforced. */ template<typename ValueType> void addText(ValueType text); //=========================== XML Comments =============================== /** Add a comment to this element. The comment will be placed inside the * body of the element, after any child elements or text that has already * been added. Dashes will be replaced with underscores (to avoid the string * "--", which is disallowed in comments. */ template<typename ValueType> void addComment(ValueType comment); //=========================== XML Children =============================== /** Return a vector containing the child elements of this element, * in order. */ std::vector<XMLElement> getChildElements() const; /** Return the child element with the given tag name. If no child * element has the given tag name, or if multiple child elements * have the given tag name, then throw an UnexpectedInputException. */ XMLElement getUniqueChildElementByTagName(const XMLCh* tag) const; /** Return the child element with the given tag name. If no child * element has the given tag name, return a NULL XMLElement. If * multiple child elements have the given tag name, then throw an * UnexpectedInputException. */ XMLElement getOptionalUniqueChildElementByTagName(const XMLCh* tag) const; /** Return a vector containing the child elements with the given tag * name. By default, a warning will be issued if this element * contains any children that do *not* have the specified tag name, * since the typical use case in our XML serialization is to have * lists consist of elements with the same tag. If you wish to allow * for children with a different tag name, then set the optional * warn_if_other_tags_found parameter to false. */ std::vector<XMLElement> getChildElementsByTagName(const XMLCh* tag, bool warn_if_other_tags_found=true) const; /** Return the single child element of this element. If this element * has no children, or multiple children, then throw an * UnexpectedInputException. */ XMLElement getUniqueChildElement() const; /** Add a new child node to this element with the given tag, and return * an XMLElement pointing to it. The new element will be empty (no * attributes or children). */ XMLElement addChild(const XMLCh* tag); /** Add attribute of the given name and save the keys and values of * the map in the attribute. Currently only maps between wstrings * and wstrings are allowed. To add more types, add explicit template * instantiation to XMLElement.cpp . */ template<typename KeyType, typename ValueType> void saveMap(const XMLCh* attrName, std::map<KeyType, ValueType>& m); /** Read map from attribute of given name. Currently only maps between * wstrings and wstrings are allowed. To add more types, add explicit * template instantiation in XMLElement.cpp . */ template<typename KeyType, typename ValueType> std::map<KeyType, ValueType> loadMap(const XMLCh* attrName) const; //======================== Output ======================================= std::wstring toWString(); //======================== Errors & Warnings ============================ // Issue a warning message. (may throw an exception) void reportLoadWarning(const std::string &msg) const; void reportLoadWarning(const std::wstring &msg) const; // Issue a warning error. (throws an exception) UnexpectedInputException reportLoadError(const std::string &msg) const; UnexpectedInputException reportLoadError(const std::wstring &msg) const; protected: //======================== Member Variables ============================ // Pointer into the parallel DOM structure xercesc::DOMElement* _xercesDOMElement; //======================== Helper Methods ============================ void requireAttribute(const XMLCh* attrName) const; // Raise an InternalInconsistency exception if this XMLElement is NULL (i.e., // if it does not refer to any element in the DOM tree). This helper method // should be called by any method that access the dom tree or the doc theory. void checkNull() const { if (isNull()) throw InternalInconsistencyException("XMLElement::checkNull", "Attempt to access a NULL XMLElement."); } bool convertBoolFromXMLString(const XMLCh* value) const; template<typename ValueType> UnexpectedInputException reportBadAttributeValue(const XMLCh* attrName, const XMLCh* attrVal) const; UnexpectedInputException reportMissingAttribute(const XMLCh* attrName) const; template<typename ValueType> UnexpectedInputException reportBadTheoryPointerType(const XMLCh* attrName) const { std::wstringstream err; err << L"Attribute \"" << transcodeToStdWString(attrName) << L"\" pointed to an unexpected value type."; throw reportLoadError(err.str()); } const XMLCh* getAttributeHelper(const XMLCh* attrName) const; void setAttributeHelper(const XMLCh* attrName, const XMLCh* attrVal); const XMLCh* getTextHelper() const; void addTextHelper(const XMLCh* text); void addCommentHelper(const XMLCh* text); template<typename T> T convertFromXMLString(const XMLCh* value) const; template<typename T> xstring convertToXMLString(T value) const; template<typename T> std::wstring getTypeName() const; }; typedef std::vector<XMLElement> XMLElementList; } // namespace SerifXML #endif
42.632231
107
0.690899
0893cb47fa2d997ab1f237deb718116602976626
584
h
C
collection/cp/ACM_Notebook_new-master/String/minmove.h
daemonslayer/Notebook
a9880be9bd86955afd6b8f7352822bc18673eda3
[ "Apache-2.0" ]
1
2019-03-24T13:12:01.000Z
2019-03-24T13:12:01.000Z
collection/cp/ACM_Notebook_new-master/String/minmove.h
daemonslayer/Notebook
a9880be9bd86955afd6b8f7352822bc18673eda3
[ "Apache-2.0" ]
null
null
null
collection/cp/ACM_Notebook_new-master/String/minmove.h
daemonslayer/Notebook
a9880be9bd86955afd6b8f7352822bc18673eda3
[ "Apache-2.0" ]
null
null
null
// Tính vị trí của xâu xoay vòng có thứ tự từ điển nhỏ nhất của xâu s[] int minmove(string s) { int n = s.length(); int x, y, i, j, u, v; // x is the smallest string before string y for (x = 0, y = 1; y < n; ++ y) { i = u = x; j = v = y; while (s[i] == s[j]) { ++ u; ++ v; if (++ i == n) i = 0; if (++ j == n) j = 0; if (i == x) break; // All strings are equal } if (s[i] <= s[j]) y = v; else { x = y; if (u > y) y = u; } } return x; }
26.545455
71
0.364726
ec6d74b00f8bc49900d4f39c9c8897efe012f07d
546
h
C
LinkedList.h
GregoryWizard/rd_linkedlist
9d7e5fad6a1cb312e42874c3713e55f0cfe54d1a
[ "Apache-2.0" ]
null
null
null
LinkedList.h
GregoryWizard/rd_linkedlist
9d7e5fad6a1cb312e42874c3713e55f0cfe54d1a
[ "Apache-2.0" ]
null
null
null
LinkedList.h
GregoryWizard/rd_linkedlist
9d7e5fad6a1cb312e42874c3713e55f0cfe54d1a
[ "Apache-2.0" ]
null
null
null
#include <iostream> using namespace std; // Data types. enum t_type { t_int,t_float,t_string }; // Struct of item in list. struct Item { void* x; t_type type; Item* next, *prev; }; // List class. class LinkedList { private: Item* head_, *tail_; int size_; public: LinkedList(); ~LinkedList(); void Print(); void Add(int x); void Add(double x); void Add(string x); void Remove(int index); int getSize(); };
16.545455
39
0.514652
ecb9af530ece74c92f71f7cb3e2c82e2c400836d
6,998
h
C
System/Library/PrivateFrameworks/MediaControls.framework/MediaControlsEndpointsViewController.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
12
2019-06-02T02:42:41.000Z
2021-04-13T07:22:20.000Z
System/Library/PrivateFrameworks/MediaControls.framework/MediaControlsEndpointsViewController.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/MediaControls.framework/MediaControlsEndpointsViewController.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
3
2019-06-11T02:46:10.000Z
2019-12-21T14:58:16.000Z
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:51:14 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/MediaControls.framework/MediaControls * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ #import <MediaControls/MediaControlsCollectionViewController.h> #import <libobjc.A.dylib/MPAVRoutingViewControllerDelegate.h> #import <MediaControls/MediaControlsPanelViewControllerDelegate.h> #import <MediaControls/MediaControlsCollectionViewDataSource.h> #import <MediaControls/MediaControlsCollectionViewDelegate.h> #import <MediaControls/MediaControlsEndpointsManagerDelegate.h> #import <libobjc.A.dylib/CCUIContentModuleContentViewController.h> @class MPAVOutputDeviceRoutingDataSource, MPMediaControlsConfiguration, MediaControlsEndpointsManager, MPAVRoutingViewController, MPAVEndpointRoute, NSString; @interface MediaControlsEndpointsViewController : MediaControlsCollectionViewController <MPAVRoutingViewControllerDelegate, MediaControlsPanelViewControllerDelegate, MediaControlsCollectionViewDataSource, MediaControlsCollectionViewDelegate, MediaControlsEndpointsManagerDelegate, CCUIContentModuleContentViewController> { MPAVOutputDeviceRoutingDataSource* _outputDeviceRoutingDataSource; long long _lastSelectedModeForActivePanelViewController; BOOL _didRetrieveActiveSystemRouteOnce; BOOL _shouldReselectActiveSystemRoute; BOOL _prewarming; BOOL _shouldTransitionToVisibleWhenReady; BOOL _dismissing; BOOL _onScreen; MPMediaControlsConfiguration* _configuration; /*^block*/id _routingCornerViewTappedBlock; MediaControlsEndpointsManager* _endpointsManager; MPAVRoutingViewController* _routingViewController; MPAVEndpointRoute* _selectedRoute; NSString* _routingContextUID; } @property (assign,getter=isDismissing,nonatomic) BOOL dismissing; //@synthesize dismissing=_dismissing - In the implementation block @property (assign,getter=isOnScreen,nonatomic) BOOL onScreen; //@synthesize onScreen=_onScreen - In the implementation block @property (nonatomic,retain) MediaControlsEndpointsManager * endpointsManager; //@synthesize endpointsManager=_endpointsManager - In the implementation block @property (nonatomic,retain) MPAVRoutingViewController * routingViewController; //@synthesize routingViewController=_routingViewController - In the implementation block @property (nonatomic,retain) MPAVEndpointRoute * selectedRoute; //@synthesize selectedRoute=_selectedRoute - In the implementation block @property (nonatomic,copy) NSString * routingContextUID; //@synthesize routingContextUID=_routingContextUID - In the implementation block @property (nonatomic,retain) MPMediaControlsConfiguration * configuration; //@synthesize configuration=_configuration - In the implementation block @property (nonatomic,copy) id routingCornerViewTappedBlock; //@synthesize routingCornerViewTappedBlock=_routingCornerViewTappedBlock - In the implementation block @property (readonly) unsigned long long hash; @property (readonly) Class superclass; @property (copy,readonly) NSString * description; @property (copy,readonly) NSString * debugDescription; @property (nonatomic,readonly) double preferredExpandedContentHeight; @property (nonatomic,readonly) double preferredExpandedContentWidth; @property (nonatomic,readonly) BOOL providesOwnPlatter; -(void)setDisplayMode:(long long)arg1 ; -(NSString *)routingContextUID; -(void)setRoutingContextUID:(NSString *)arg1 ; -(void)startPrewarming; -(void)stopPrewarming; -(void)didSelectRoute:(id)arg1 ; -(void)_routeDidChangeNotification:(id)arg1 ; -(void)routingViewController:(id)arg1 didPickRoute:(id)arg2 ; -(void)setOnScreen:(BOOL)arg1 ; -(void)setDismissing:(BOOL)arg1 ; -(BOOL)isDismissing; -(double)preferredExpandedContentHeight; -(double)preferredExpandedContentWidth; -(BOOL)providesOwnPlatter; -(void)dismissMediaControlsPanelViewController:(id)arg1 completion:(/*^block*/id)arg2 ; -(void)mediaControlsPanelViewController:(id)arg1 willToggleRoutingPicker:(BOOL)arg2 ; -(void)mediaControlsPanelViewController:(id)arg1 didToggleRoutingPicker:(BOOL)arg2 ; -(void)setRoutingViewController:(MPAVRoutingViewController *)arg1 ; -(void)setRoutingCornerViewTappedBlock:(id)arg1 ; -(MPAVRoutingViewController *)routingViewController; -(id)routingCornerViewTappedBlock; -(void)_setupEndpointsManager; -(void)_setupRoutingViewController; -(void)_setSelectedRoute:(id)arg1 isUserSelected:(BOOL)arg2 ; -(void)_updateDiscoveryMode; -(void)_transitionToVisibleIfNeeded; -(void)_transitionToVisible:(BOOL)arg1 ; -(BOOL)_isReadyForAppearanceTransition; -(void)_assignRouteViewControllerToSelectedPanelViewController; -(void)_updateSupportedModesForSelectedMediaControlsPanelViewController; -(void)_selectActiveSystemRouteIfNeeded; -(void)_updateEndpointRouteForOutputDeviceDataSource:(id)arg1 ; -(void)_supportedModesForSelectedRoute:(unsigned long long*)arg1 selectedMode:(long long*)arg2 ; -(void)_updateModesForSelectedMediaControlsPanelViewController; -(void)setSelectedRoute:(MPAVEndpointRoute *)arg1 ; -(BOOL)_isSelectedRouteInRoutes; -(long long)numberOfItemsInCollectionViewController:(id)arg1 ; -(id)mediaControlsCollectionViewController:(id)arg1 viewControllerForItemAtIndex:(long long)arg2 ; -(long long)defaultSelectedItemIndexForCollectionViewController:(id)arg1 ; -(void)mediaControlsCollectionViewController:(id)arg1 willDisplayViewController:(id)arg2 forItemAtIndex:(long long)arg3 ; -(void)mediaControlsCollectionViewController:(id)arg1 didDisplayViewController:(id)arg2 forItemAtIndex:(long long)arg3 ; -(void)mediaControlsCollectionViewController:(id)arg1 didEndDisplayingViewController:(id)arg2 forItemAtIndex:(long long)arg3 ; -(BOOL)mediaControlsCollectionViewController:(id)arg1 canSelectItemAtIndex:(long long)arg2 ; -(void)mediaControlsCollectionViewController:(id)arg1 willSelectItemAtIndex:(long long)arg2 withReason:(long long)arg3 ; -(void)mediaControlsCollectionViewController:(id)arg1 didSelectItemAtIndex:(long long)arg2 withReason:(long long)arg3 ; -(void)endpointsManager:(id)arg1 activeSystemRouteDidChange:(id)arg2 ; -(void)endpointsManager:(id)arg1 defersRoutesReplacement:(/*^block*/id)arg2 ; -(void)homeObserverDidUpdateKnownUIDs:(id)arg1 ; -(MediaControlsEndpointsManager *)endpointsManager; -(void)setEndpointsManager:(MediaControlsEndpointsManager *)arg1 ; -(MPAVEndpointRoute *)selectedRoute; -(void)dealloc; -(void)viewWillAppear:(BOOL)arg1 ; -(void)viewWillDisappear:(BOOL)arg1 ; -(void)viewDidLoad; -(void)reloadData; -(void)viewDidLayoutSubviews; -(void)viewDidDisappear:(BOOL)arg1 ; -(MPMediaControlsConfiguration *)configuration; -(void)setConfiguration:(MPMediaControlsConfiguration *)arg1 ; -(BOOL)isOnScreen; -(void)updateContentInsets; @end
59.811966
322
0.817948
ae6a523b0e3242f7f5a8309f715fafcd261e542b
5,411
c
C
kernel/linux-3.4.y/arch/arm/mach-hi3518ev200/pm.c
suda-morris/SUDA_3518E
cfad829ecd574ffe5e8c59c96ffad5c1e1bf5fa4
[ "Apache-2.0" ]
4
2020-04-28T02:12:34.000Z
2021-02-23T01:57:39.000Z
kernel/linux-3.4.y/arch/arm/mach-hi3518ev200/pm.c
donginhb/SUDA_3518E
cfad829ecd574ffe5e8c59c96ffad5c1e1bf5fa4
[ "Apache-2.0" ]
null
null
null
kernel/linux-3.4.y/arch/arm/mach-hi3518ev200/pm.c
donginhb/SUDA_3518E
cfad829ecd574ffe5e8c59c96ffad5c1e1bf5fa4
[ "Apache-2.0" ]
5
2018-05-16T16:36:08.000Z
2020-11-04T05:51:11.000Z
/*copyright:hisilicon,bvt,liucan,2014-7-14*/ #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/pm.h> #include <linux/suspend.h> #include <asm/memory.h> #include <mach/system.h> #include <mach/early-debug.h> #include <mach/platform.h> #include <linux/delay.h> #include <linux/suspend.h> #include <linux/syscalls.h> #include <asm/mach/time.h> #include <linux/slab.h> #include <mach/platform.h> #include <mach/time.h> #include <asm/mach/time.h> #include <asm/hardware/arm_timer.h> #include <asm/mach/irq.h> #include <linux/sched.h> #include <linux/mm.h> #include <linux/reboot.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/kallsyms.h> #include <asm/cacheflush.h> #include <asm/processor.h> #include <asm/system.h> #include <mach/hardware.h> #include <asm/mach/map.h> static void hi_hardware_power_off(void) { unsigned int gpio_group, gpio_offset; gpio_group = 13; gpio_offset = 2; #define GPIO_BASE 0x20140000 /*config gpio is output*/ writel((0x01 << gpio_offset), IO_ADDRESS(GPIO_BASE + (gpio_group << 16) + 0x400)); /*output high*/ writel((0x01 << gpio_offset), IO_ADDRESS(GPIO_BASE + (gpio_group << 16) + 0x00 + (1 << (gpio_offset + 2)))); } void hi_pm_power_off(void) { /* Disable interrupts first */ local_irq_disable(); local_fiq_disable(); /* Clean and invalidate caches */ flush_cache_all(); /* Turn off caching */ cpu_proc_fin(); /* Push out any further dirty data, and ensure cache is empty */ flush_cache_all(); /* * Now call the architecture specific reboot code. */ hi_hardware_power_off(); /* * Whoops - the architecture was unable to reboot. * Tell the user! */ mdelay(1000); printk(KERN_EMERG "Poweroff failed -- System halted\n"); while (1) ; } /*hibernate methods*/ #ifdef CONFIG_HIBERNATION unsigned long saved_interrupt_mask[128]; unsigned long saved_cpu_target_mask[128]; typedef struct __timer_register { unsigned long timer_load; unsigned long timer_value; unsigned long timer_ctrl; unsigned long timer_bgload; } timer_register; static timer_register timer0[2]; static int timer_init_value; static int save_timer0(void) { void __iomem *timer0_base_addr = (void __iomem *)CFG_TIMER_VABASE; timer_init_value = readl(IO_ADDRESS(SYS_CTRL_BASE)); /*protect timer0_0*/ timer0[0].timer_load = readl(timer0_base_addr + TIMER_LOAD); timer0[0].timer_value = readl(timer0_base_addr + TIMER_VALUE); timer0[0].timer_ctrl = readl(timer0_base_addr + TIMER_CTRL); timer0[0].timer_bgload = readl(timer0_base_addr + TIMER_BGLOAD); /*disable timer0_0 */ writel(0, timer0_base_addr + TIMER_CTRL); /*protect timer0_1*/ timer0[1].timer_load = readl(timer0_base_addr + 0x20 + TIMER_LOAD); timer0[1].timer_value = readl(timer0_base_addr + 0x20 + TIMER_VALUE); timer0[1].timer_ctrl = readl(timer0_base_addr + 0x20 + TIMER_CTRL); timer0[1].timer_bgload = readl(timer0_base_addr + 0x20 + TIMER_BGLOAD); /*disable timer0_1 */ writel(0, timer0_base_addr + 0x20 + TIMER_CTRL); return 0; } static int restore_timer0(void) { void __iomem *timer0_base_addr = (void __iomem *)CFG_TIMER_VABASE; writel(timer_init_value, IO_ADDRESS(SYS_CTRL_BASE)); /* restore timer0_0 */ writel(0, timer0_base_addr + TIMER_CTRL); writel(1, timer0_base_addr + TIMER_INTCLR); writel(timer0[0].timer_value, timer0_base_addr + TIMER_LOAD); writel(timer0[0].timer_ctrl, timer0_base_addr + TIMER_CTRL); writel(timer0[0].timer_bgload, timer0_base_addr + TIMER_BGLOAD); /* restore timer0_1 */ writel(0, timer0_base_addr + 0x20 + TIMER_CTRL); writel(1, timer0_base_addr + 0x20 + TIMER_INTCLR); writel(timer0[1].timer_value, timer0_base_addr + 0x20 + TIMER_LOAD); writel(timer0[1].timer_ctrl, timer0_base_addr + 0x20 + TIMER_CTRL); writel(timer0[1].timer_bgload, timer0_base_addr + 0x20 + TIMER_BGLOAD); return 0; } static int hi_hiber_begin(void) { return 0; } static void hi_hiber_end(void) { } static int hi_hiber_pre_snapshot(void) { save_timer0(); return 0; } static void hi_hiber_finish(void) { restore_timer0(); } static int hi_hiber_prepare(void) { return 0; } static void hi_hiber_leave(void) { } static int hi_hiber_enter(void) { #ifdef CONFIG_DEFAULT_MTD hi_pm_power_off(); #else kernel_restart(NULL); #endif return 0; } static int hi_hiber_restore(void) { return 0; } static void hi_hiber_restore_cleanup(void) { } static void hi_hiber_recover(void) { } struct platform_hibernation_ops hi_hibernation_ops = { .begin = hi_hiber_begin, .end = hi_hiber_end, .pre_snapshot = hi_hiber_pre_snapshot, .finish = hi_hiber_finish, .prepare = hi_hiber_prepare, .enter = hi_hiber_enter, .leave = hi_hiber_leave, .pre_restore = hi_hiber_restore, .restore_cleanup = hi_hiber_restore_cleanup, .recover = hi_hiber_recover, }; #endif /* CONFIG_HIBERNATION */ /*pm methods*/ static int hi_pm_enter(suspend_state_t state) { return 0; } int hi_pm_valid(suspend_state_t state) { return 1; } static const struct platform_suspend_ops hi_pm_ops = { .enter = hi_pm_enter, .valid = hi_pm_valid, }; static int __init hi_pm_init(void) { pm_power_off = hi_pm_power_off; suspend_set_ops(&hi_pm_ops); #ifdef CONFIG_HIBERNATION /* registering hibernation call backs */ hibernation_set_ops(&hi_hibernation_ops); #endif return 0; } module_init(hi_pm_init);
21.730924
72
0.730179
b7f11b0835f69dd87865402c88bc401215f217b7
219
h
C
source/RobotController/RobotControllerGUI/rlHeaders.h
xxzl0130/ProgrammingExperience
4f18ad6eb6bc1e7f0d69b458e0c4efbbf4326cfd
[ "MIT" ]
1
2020-09-08T02:54:11.000Z
2020-09-08T02:54:11.000Z
source/RobotController/RobotControllerGUI/rlHeaders.h
xxzl0130/ProgrammingExperience
4f18ad6eb6bc1e7f0d69b458e0c4efbbf4326cfd
[ "MIT" ]
1
2020-09-08T02:53:54.000Z
2020-09-23T00:55:35.000Z
source/RobotController/RobotControllerGUI/rlHeaders.h
xxzl0130/ProgrammingExperience
4f18ad6eb6bc1e7f0d69b458e0c4efbbf4326cfd
[ "MIT" ]
null
null
null
#pragma once #include <rl/math/Rotation.h> #include <rl/math/Unit.h> #include <rl/math/Vector.h> #include <rl/math/Polynomial.h> #include <rl/math/Transform.h> #include <rl/math/Quaternion.h> #include <rl/math/Unit.h>
21.9
31
0.726027
3129878cc20c61d7a523387139ef9219d109e429
6,179
h
C
tests/testapp/testapp_assert_helper.h
rohansuri/kv_engine
6d377448a787ce5dc268c95def2850e36f5f1328
[ "BSD-3-Clause" ]
null
null
null
tests/testapp/testapp_assert_helper.h
rohansuri/kv_engine
6d377448a787ce5dc268c95def2850e36f5f1328
[ "BSD-3-Clause" ]
null
null
null
tests/testapp/testapp_assert_helper.h
rohansuri/kv_engine
6d377448a787ce5dc268c95def2850e36f5f1328
[ "BSD-3-Clause" ]
2
2019-10-11T14:00:49.000Z
2020-04-06T09:20:15.000Z
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2017 Couchbase, Inc. * * 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. */ #pragma once #include "testapp.h" #include <iosfwd> #include <type_traits> #include <include/memcached/util.h> /** * Unfortunately I'm largely recreating some of GTest's internals for this * function. GTest provides similar helpers like these, but they are not * intended for public consumption. Ultimately, many tests call this, so * it's best to favor clear messages over small code. */ class AssertHelper { public: AssertHelper() : cur_failure(::testing::AssertionFailure()) { } explicit AssertHelper(::testing::AssertionResult& existing) : cur_failure(existing), has_failure(!cur_failure) { } void combine(::testing::AssertionResult& existing) { if (!existing) { has_failure = true; cur_failure << existing; } } template <typename T1, typename T2> ::testing::AssertionResult& eq(const char* astr, const char* bstr, const T1& a, const T2& b) { if (a != b) { return assertOp(astr, bstr, a, b, "=="); } else { return returnDummy(); } } template <typename T1, typename T2> ::testing::AssertionResult& ne(const char* astr, const char* bstr, const T1& a, const T2& b) { if (a == b) { return assertOp(astr, bstr, a, b, "!="); } else { return returnDummy(); } } template <typename T1, typename T2> ::testing::AssertionResult gt(const char* astr, const char* bstr, const T1& a, const T2& b) { if (!(a > b)) { return assertOp(astr, bstr, a, b, ">"); } else { return returnDummy(); } } template <typename T1, typename T2> ::testing::AssertionResult ge(const char* astr, const char* bstr, const T1& a, const T2& b) { if (!(a >= b)) { return assertOp(astr, bstr, a, b, ">="); } else { return returnDummy(); } } template <typename T> ::testing::AssertionResult empty(const char* s, const T& a) { if (!a.empty()) { return assertOp("empty()", std::to_string(a.size()), "<EMPTY>"); } else { return returnDummy(); } } ::testing::AssertionResult& fail(const char* msg = nullptr) { if (msg != nullptr) { cur_failure << msg << std::endl; } has_failure = true; return cur_failure; } ::testing::AssertionResult result() { if (has_failure) { return cur_failure; } else { return ::testing::AssertionSuccess(); } } bool hasFailure() const { return has_failure; } private: template <typename T> std::string formatArg(const T& arg) const { using namespace std; return to_string(arg); } // Don't call this variant iff the first argument is an enum and the second // argument isn't. We want to convert it in the other variant template <typename T1, typename T2, typename std::enable_if< !std::is_enum<T1>::value || std::is_same<T1,T2>::value, bool>::type = true > ::testing::AssertionResult& assertOp(const char* expstr, const char* gotstr, const T1& expected, const T2& got, const char* opstr) { return fail() << "Expected: " << std::endl << " " << gotstr << " " << opstr << " " << expstr << " (" << formatArg(expected) << ")" << std::endl << "Actual: " << std::endl << " " << gotstr << ": " << formatArg(got) << std::endl; } // Called to coerce the second argument into an enum. template <typename T1, typename T2, typename std::enable_if< std::is_enum<T1>::value && !std::is_same<T1, T2>::value, bool>::type = true > ::testing::AssertionResult& assertOp(const char* expstr, const char *gotstr, const T1& expected, const T2& got, const char* opstr) { auto converted_got = static_cast<T1>(got); return assertOp(expstr, gotstr, expected, converted_got, opstr); } ::testing::AssertionResult& returnDummy() { static auto tmp = ::testing::AssertionSuccess(); return tmp; } ::testing::AssertionResult cur_failure; bool has_failure = false; }; template <> inline std::string AssertHelper::formatArg(const cb::mcbp::Status& arg) const { // We want a hex representation std::stringstream ss; ss << to_string(arg) << " (0x" << std::hex << arg << ")"; return ss.str(); } template <> inline std::string AssertHelper::formatArg( const cb::mcbp::ClientOpcode& cmd) const { std::stringstream ss; ss << to_string(cmd) << "(0x" << std::hex << cmd << ")"; return ss.str(); } template<> inline std::string AssertHelper::formatArg(const std::string& s) const { return s; } #define TESTAPP_EXPECT_EQ(helper, a, b) helper.eq(#a, #b, a, b) #define TESTAPP_EXPECT_NE(helper, a, b) helper.ne(#b, #b, a, b) #define TESTAPP_EXPECT_GE(helper, a, b) helper.ge(#a, #b, a, b) #define TESTAPP_EXPECT_GT(helper, a, b) helper.gt(#a, #b, a, b)
33.042781
80
0.555268
c150837fe037c5dc1ffcdeb3e7aa0d301476bd52
2,175
h
C
src/redland/RedlandWrapper/src/include/redland/LibrdfModel.h
sys-bio/tesemantic
f25f44a0a7e67d38f1e94fd69c08ae7f73be2079
[ "Apache-2.0" ]
6
2020-07-07T11:23:29.000Z
2021-11-19T09:49:02.000Z
src/redland/RedlandWrapper/src/include/redland/LibrdfModel.h
sys-bio/tesemantic
f25f44a0a7e67d38f1e94fd69c08ae7f73be2079
[ "Apache-2.0" ]
79
2020-06-23T15:32:44.000Z
2022-02-23T06:46:43.000Z
src/redland/RedlandWrapper/src/include/redland/LibrdfModel.h
sys-bio/tesemantic
f25f44a0a7e67d38f1e94fd69c08ae7f73be2079
[ "Apache-2.0" ]
5
2020-11-29T04:29:54.000Z
2021-08-17T15:55:41.000Z
// // Created by Ciaran on 5/17/2020. // #ifndef LIBOMEXMETA_LIBRDFMODEL_H #define LIBOMEXMETA_LIBRDFMODEL_H #include "LibrdfQuery.h" #include "LibrdfQueryResults.h" #include "LibrdfStatement.h" #include "LibrdfStorage.h" #include "LibrdfStream.h" #include "LibrdfWorld.h" #include "librdf.h" #include <iostream> #include <memory> #include <string> namespace redland { /** * @brief std::function signature of librdf_free_model */ using model_free_func = std::function<void(librdf_model *)>; /** * Instantiation of templated superclass */ using RefCounted_librdf_model = RefCountedRedlandType<librdf_model, model_free_func>; class LibrdfQuery; class LibrdfQueryResults; /** * @brief RAII abstraction around librdf_model */ class LibrdfModel : public RefCounted_librdf_model { public: using RefCounted_librdf_model::RefCounted_librdf_model; explicit LibrdfModel(librdf_model *model); explicit LibrdfModel(LibrdfStorage& storage, const char *options = nullptr); /** * @brief equality operator. * @details iterates over this stream and looks for containment in rhs stream, and then does the same in reverse. * @details Maximum complexity: O(n^2). Minimum complexity O(1), when lhs and rhs are different sizes. */ bool operator==(const LibrdfModel &rhs) const ; bool operator!=(const LibrdfModel &rhs) const ; [[nodiscard]] LibrdfQueryResults query(const std::string& query); LibrdfStream toStream() const; int size() const; void addStatement(const LibrdfStatement& statement) const; void removeStatement(const LibrdfStatement &statement) const; LibrdfStorage getStorage() const; int commitTransaction() const; int startTransaction() const; void *getTransactionHandle() const; int startTransactionWithHandle(void *handle) const; int getTransactionRollback() const; int supportsContexts() const; bool containsStatement( LibrdfStatement &statement) const ; }; } #endif //LIBOMEXMETA_LIBRDFMODEL_H
25.588235
121
0.687816
1e22a750f6a51031b4cb0a24b41a4ed110241b07
293
h
C
ch4_bridging_with_a_virtual_constructor/SimpleMC3.h
WongYatChun/Design_Patterns_and_Derivatives_Pricing
4aa8fa6794f70b086e66c1a8752a596b448cd8d8
[ "MIT" ]
null
null
null
ch4_bridging_with_a_virtual_constructor/SimpleMC3.h
WongYatChun/Design_Patterns_and_Derivatives_Pricing
4aa8fa6794f70b086e66c1a8752a596b448cd8d8
[ "MIT" ]
null
null
null
ch4_bridging_with_a_virtual_constructor/SimpleMC3.h
WongYatChun/Design_Patterns_and_Derivatives_Pricing
4aa8fa6794f70b086e66c1a8752a596b448cd8d8
[ "MIT" ]
null
null
null
#ifndef SIMPLEMC3_H #define SIMPLEMC3_H #include "Vanilla1.h" double SimpleMonteCarlo3(const VanillaOption& TheOption, double Spot, double Vol, double r, unsigned long NumberOfPaths); #endif
24.416667
56
0.532423
3669c66ceff3bc0ea928c80d6bde27bd38adc9ce
991
h
C
libraries/stdlib/NullOrReference.h
AymenSekhri/CyanOS
1e42772911299a40aab0e7aac50181b180941800
[ "MIT" ]
63
2020-06-18T11:04:07.000Z
2022-02-24T09:01:44.000Z
libraries/stdlib/NullOrReference.h
AymenSekhri/CyanOS
1e42772911299a40aab0e7aac50181b180941800
[ "MIT" ]
4
2020-08-31T23:07:37.000Z
2021-06-08T21:54:02.000Z
libraries/stdlib/NullOrReference.h
AymenSekhri/CyanOS
1e42772911299a40aab0e7aac50181b180941800
[ "MIT" ]
9
2020-08-03T13:48:50.000Z
2022-03-31T11:50:59.000Z
#pragma once #include "Assert.h" template <typename T> class NullOrReference { public: DEFAULT_COPY(NullOrReference) DEFAULT_MOVE(NullOrReference) DEFAULT_DESTRUCTOR(NullOrReference) NullOrReference() { m_storage = nullptr; } NullOrReference(T* storage) : m_storage{storage} { ASSERT(storage); } NullOrReference(T& storage) : m_storage{&storage} {} T& value() { ASSERT(is_valid()); return *m_storage; } T* ptr() { ASSERT(is_valid()); return m_storage; } T& operator*() { ASSERT(is_valid()); return *m_storage; } T* operator->() { ASSERT(is_valid()); return m_storage; } const T& value() const { ASSERT(is_valid()); return *m_storage; } const T* ptr() const { ASSERT(is_valid()); return m_storage; } const T& operator*() const { ASSERT(is_valid()); return *m_storage; } const T* operator->() const { ASSERT(is_valid()); return m_storage; } bool is_valid() const { return m_storage != nullptr; } private: T* m_storage; };
16.79661
70
0.665994
cfc01894f3845ccaf4381b0da703ff5c06ddcc50
2,470
h
C
drivers/usbd_stm.h
a-v-s/stm32usb
b994149b42e9132090ada929ee55153ab0e482c8
[ "MIT" ]
null
null
null
drivers/usbd_stm.h
a-v-s/stm32usb
b994149b42e9132090ada929ee55153ab0e482c8
[ "MIT" ]
3
2019-12-24T14:41:07.000Z
2019-12-24T15:49:32.000Z
drivers/usbd_stm.h
a-v-s/stm32usb
b994149b42e9132090ada929ee55153ab0e482c8
[ "MIT" ]
null
null
null
/* File: usbd_stm.h Author: André van Schoubroeck License: MIT MIT License Copyright (c) 2018, 2019 André van Schoubroeck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef __USBD_STM__ #define __USBD_STM__ // Todo MCU family defines: I had this before my hard disk crashed // For the intial test, just check for these two /* #if defined STM32F103xB #include "stm32f1xx_hal.h" #include "stm32f1xx_ll_usb.h" #include "stm32f1xx_hal_pcd.h" #include "stm32f1xx_hal_pcd_ex.h" #elif defined STM32F303xC #include "stm32f3xx_hal.h" #include "stm32f3xx_ll_usb.h" #include "stm32f3xx_hal_pcd.h" #include "stm32f3xx_hal_pcd_ex.h" #elif defined STM32F401xC #include "stm32f4xx_hal.h" #include "stm32f4xx_ll_usb.h" #include "stm32f4xx_hal_pcd.h" #include "stm32f4xx_hal_pcd_ex.h" #else #error "STM32 FAMILY NOT DEFINED!" #endif */ #include "hal.h" #include <stdint.h> #include <stdbool.h> #define PMAPOS_MIN 0x18 typedef struct { uint32_t PmaPos; GPIO_TypeDef* PullUpPort; uint16_t PullUpPin; bool PullUpInverted; } usbd_stm32_usbfs_v1_config; int usbd_stm32_transmit(void *pcd_handle, uint8_t ep, void *data, size_t size); int usbd_stm32_set_address(void *pcd_handle, uint8_t address); int usbd_stm32_ep_set_stall(void *pcd_handle, uint8_t ep); int usbd_stm32_ep_clear_stall(void *pcd_handle, uint8_t ep); int usbd_stm32_ep_close(void *pcd_handle, uint8_t ep); int usbd_stm32_ep_open(void *pcd_handle, uint8_t epnum, uint8_t epsize, uint8_t eptype); #endif //USBD_STM
29.759036
79
0.791093
965d8c8568139b85777e47daa15e8124feb9076f
314
h
C
SGP/Coin.h
olehermanse/SGP
ec898da6bf8b6aa39fd23697db076b412ad66425
[ "MIT" ]
2
2015-01-16T23:46:55.000Z
2016-03-28T23:04:58.000Z
SGP/Coin.h
olehermanse/SGP
ec898da6bf8b6aa39fd23697db076b412ad66425
[ "MIT" ]
null
null
null
SGP/Coin.h
olehermanse/SGP
ec898da6bf8b6aa39fd23697db076b412ad66425
[ "MIT" ]
null
null
null
#ifndef __GameJam__Coin__ #define __GameJam__Coin__ #include "mGraphics.h" #include "mHeightmap.h" class Coin{ public: Coin(); static mGraphics* gfx; float theta; float phi; float radius; mVector pos; void draw(); void update(); void rotate(); private: }; #endif /* defined(__GameJam__Coin__) */
12.56
39
0.703822
d2bdb0746cefa0d86dc8d0de086da58545e6bef8
16,925
h
C
kernels/geometry/triangle_intersector_woop.h
Patafikss/embree3-AT
c3e83ef157bd1fde1db7d1d90c8fd55a5a278573
[ "Apache-2.0" ]
null
null
null
kernels/geometry/triangle_intersector_woop.h
Patafikss/embree3-AT
c3e83ef157bd1fde1db7d1d90c8fd55a5a278573
[ "Apache-2.0" ]
null
null
null
kernels/geometry/triangle_intersector_woop.h
Patafikss/embree3-AT
c3e83ef157bd1fde1db7d1d90c8fd55a5a278573
[ "Apache-2.0" ]
null
null
null
// ======================================================================== // // Copyright 2009-2020 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // you may not use this file except in compliance with the License. // // You may obtain a copy of the License at // // // // http://www.apache.org/licenses/LICENSE-2.0 // // // // Unless required by applicable law or agreed to in writing, software // // distributed under the License is distributed on an "AS IS" BASIS, // // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // See the License for the specific language governing permissions and // // limitations under the License. // // ======================================================================== // #pragma once #include "triangle.h" #include "intersector_epilog.h" /*! This intersector implements a modified version of the Woop's ray-triangle intersection test */ namespace embree { namespace isa { template<int M> struct WoopHitM { __forceinline WoopHitM() {} __forceinline WoopHitM(const vbool<M>& valid, const vfloat<M>& U, const vfloat<M>& V, const vfloat<M>& T, const vfloat<M>& inv_det, const Vec3vf<M>& Ng) : U(U), V(V), T(T), inv_det(inv_det), valid(valid), vNg(Ng) {} __forceinline void finalize() { vt = T; vu = U*inv_det; vv = V*inv_det; } __forceinline Vec2f uv (const size_t i) const { return Vec2f(vu[i],vv[i]); } __forceinline float t (const size_t i) const { return vt[i]; } __forceinline Vec3fa Ng(const size_t i) const { return Vec3fa(vNg.x[i],vNg.y[i],vNg.z[i]); } private: const vfloat<M> U; const vfloat<M> V; const vfloat<M> T; const vfloat<M> inv_det; public: const vbool<M> valid; vfloat<M> vu; vfloat<M> vv; vfloat<M> vt; Vec3vf<M> vNg; }; template<int M> struct WoopPrecalculations1 { unsigned int kx,ky,kz; Vec3vf<M> org; Vec3fa S; __forceinline WoopPrecalculations1() {} __forceinline WoopPrecalculations1(const Ray& ray, const void* ptr) { kz = maxDim(abs(ray.dir)); kx = (kz+1) % 3; ky = (kx+1) % 3; const float inv_dir_kz = rcp(ray.dir[kz]); if (ray.dir[kz]) std::swap(kx,ky); S.x = ray.dir[kx] * inv_dir_kz; S.y = ray.dir[ky] * inv_dir_kz; S.z = inv_dir_kz; org = Vec3vf<M>(ray.org[kx],ray.org[ky],ray.org[kz]); } }; template<int M> struct WoopIntersector1 { typedef WoopPrecalculations1<M> Precalculations; __forceinline WoopIntersector1() {} __forceinline WoopIntersector1(const Ray& ray, const void* ptr) {} static __forceinline bool intersect(const vbool<M>& valid0, Ray& ray, const Precalculations& pre, const Vec3vf<M>& tri_v0, const Vec3vf<M>& tri_v1, const Vec3vf<M>& tri_v2, WoopHitM<M>& hit) { vbool<M> valid = valid0; /* vertices relative to ray origin */ const Vec3vf<M> org = Vec3vf<M>(pre.org.x,pre.org.y,pre.org.z); const Vec3vf<M> A = Vec3vf<M>(tri_v0[pre.kx],tri_v0[pre.ky],tri_v0[pre.kz]) - org; const Vec3vf<M> B = Vec3vf<M>(tri_v1[pre.kx],tri_v1[pre.ky],tri_v1[pre.kz]) - org; const Vec3vf<M> C = Vec3vf<M>(tri_v2[pre.kx],tri_v2[pre.ky],tri_v2[pre.kz]) - org; /* shear and scale vertices */ const vfloat<M> Ax = nmadd(A.z,pre.S.x,A.x); const vfloat<M> Ay = nmadd(A.z,pre.S.y,A.y); const vfloat<M> Bx = nmadd(B.z,pre.S.x,B.x); const vfloat<M> By = nmadd(B.z,pre.S.y,B.y); const vfloat<M> Cx = nmadd(C.z,pre.S.x,C.x); const vfloat<M> Cy = nmadd(C.z,pre.S.y,C.y); /* scaled barycentric */ const vfloat<M> U0 = Cx*By; const vfloat<M> U1 = Cy*Bx; const vfloat<M> V0 = Ax*Cy; const vfloat<M> V1 = Ay*Cx; const vfloat<M> W0 = Bx*Ay; const vfloat<M> W1 = By*Ax; #if !defined(__AVX512F__) valid &= (U0 >= U1) & (V0 >= V1) & (W0 >= W1) | (U0 <= U1) & (V0 <= V1) & (W0 <= W1); #else valid &= ge(ge(U0 >= U1,V0,V1),W0,W1) | le(le(U0 <= U1,V0,V1),W0,W1); #endif if (likely(none(valid))) return false; const vfloat<M> U = U0-U1; const vfloat<M> V = V0-V1; const vfloat<M> W = W0-W1; const vfloat<M> det = U+V+W; valid &= det != 0.0f; const vfloat<M> inv_det = rcp(det); const vfloat<M> Az = pre.S.z * A.z; const vfloat<M> Bz = pre.S.z * B.z; const vfloat<M> Cz = pre.S.z * C.z; const vfloat<M> T = madd(U,Az,madd(V,Bz,W*Cz)); const vfloat<M> t = T * inv_det; /* perform depth test */ valid &= (vfloat<M>(ray.tnear()) < t) & (t <= vfloat<M>(ray.tfar)); if (likely(none(valid))) return false; const Vec3vf<M> tri_Ng = cross(tri_v2-tri_v0,tri_v0-tri_v1); /* update hit information */ new (&hit) WoopHitM<M>(valid,U,V,t,inv_det,tri_Ng); return true; } static __forceinline bool intersect(Ray& ray, const Precalculations& pre, const Vec3vf<M>& v0, const Vec3vf<M>& v1, const Vec3vf<M>& v2, WoopHitM<M>& hit) { vbool<M> valid = true; return intersect(valid,ray,pre,v0,v1,v2,hit); } template<typename Epilog> static __forceinline bool intersect(Ray& ray, const Precalculations& pre, const Vec3vf<M>& v0, const Vec3vf<M>& v1, const Vec3vf<M>& v2, const Epilog& epilog) { WoopHitM<M> hit; if (likely(intersect(ray,pre,v0,v1,v2,hit))) return epilog(hit.valid,hit); return false; } template<typename Epilog> static __forceinline bool intersect(const vbool<M>& valid, Ray& ray, const Precalculations& pre, const Vec3vf<M>& v0, const Vec3vf<M>& v1, const Vec3vf<M>& v2, const Epilog& epilog) { WoopHitM<M> hit; if (likely(intersect(valid,ray,pre,v0,v1,v2,hit))) return epilog(hit.valid,hit); return false; } }; #if 0 template<int K> struct WoopHitK { __forceinline WoopHitK(const vfloat<K>& U, const vfloat<K>& V, const vfloat<K>& T, const vfloat<K>& absDen, const Vec3vf<K>& Ng) : U(U), V(V), T(T), absDen(absDen), Ng(Ng) {} __forceinline std::tuple<vfloat<K>,vfloat<K>,vfloat<K>,Vec3vf<K>> operator() () const { const vfloat<K> rcpAbsDen = rcp(absDen); const vfloat<K> t = T * rcpAbsDen; const vfloat<K> u = U * rcpAbsDen; const vfloat<K> v = V * rcpAbsDen; return std::make_tuple(u,v,t,Ng); } private: const vfloat<K> U; const vfloat<K> V; const vfloat<K> T; const vfloat<K> absDen; const Vec3vf<K> Ng; }; template<int M, int K> struct WoopIntersectorK { __forceinline WoopIntersectorK(const vbool<K>& valid, const RayK<K>& ray) {} /*! Intersects K rays with one of M triangles. */ template<typename Epilog> __forceinline vbool<K> intersectK(const vbool<K>& valid0, //RayK<K>& ray, const Vec3vf<K>& ray_org, const Vec3vf<K>& ray_dir, const vfloat<K>& ray_tnear, const vfloat<K>& ray_tfar, const Vec3vf<K>& tri_v0, const Vec3vf<K>& tri_e1, const Vec3vf<K>& tri_e2, const Vec3vf<K>& tri_Ng, const Epilog& epilog) const { /* calculate denominator */ vbool<K> valid = valid0; const Vec3vf<K> C = tri_v0 - ray_org; const Vec3vf<K> R = cross(C,ray_dir); const vfloat<K> den = dot(tri_Ng,ray_dir); const vfloat<K> absDen = abs(den); const vfloat<K> sgnDen = signmsk(den); /* test against edge p2 p0 */ const vfloat<K> U = dot(tri_e2,R) ^ sgnDen; valid &= U >= 0.0f; if (likely(none(valid))) return false; /* test against edge p0 p1 */ const vfloat<K> V = dot(tri_e1,R) ^ sgnDen; valid &= V >= 0.0f; if (likely(none(valid))) return false; /* test against edge p1 p2 */ const vfloat<K> W = absDen-U-V; valid &= W >= 0.0f; if (likely(none(valid))) return false; /* perform depth test */ const vfloat<K> T = dot(tri_Ng,C) ^ sgnDen; valid &= (absDen*ray_tnear < T) & (T <= absDen*ray_tfar); if (unlikely(none(valid))) return false; /* perform backface culling */ #if defined(EMBREE_BACKFACE_CULLING) valid &= den < vfloat<K>(zero); if (unlikely(none(valid))) return false; #else valid &= den != vfloat<K>(zero); if (unlikely(none(valid))) return false; #endif /* calculate hit information */ WoopHitK<K> hit(U,V,T,absDen,tri_Ng); return epilog(valid,hit); } /*! Intersects K rays with one of M triangles. */ template<typename Epilog> __forceinline vbool<K> intersectK(const vbool<K>& valid0, RayK<K>& ray, const Vec3vf<K>& tri_v0, const Vec3vf<K>& tri_v1, const Vec3vf<K>& tri_v2, const Epilog& epilog) const { const Vec3vf<K> e1 = tri_v0-tri_v1; const Vec3vf<K> e2 = tri_v2-tri_v0; const Vec3vf<K> Ng = cross(e2,e1); return intersectK(valid0,ray.org,ray.dir,ray.tnear(),ray.tfar,tri_v0,e1,e2,Ng,epilog); } /*! Intersects K rays with one of M triangles. */ template<typename Epilog> __forceinline vbool<K> intersectEdgeK(const vbool<K>& valid0, RayK<K>& ray, const Vec3vf<K>& tri_v0, const Vec3vf<K>& tri_e1, const Vec3vf<K>& tri_e2, const Epilog& epilog) const { const Vec3vf<K> tri_Ng = cross(tri_e2,tri_e1); return intersectK(valid0,ray.org,ray.dir,ray.tnear(),ray.tfar,tri_v0,tri_e1,tri_e2,tri_Ng,epilog); } /*! Intersect k'th ray from ray packet of size K with M triangles. */ __forceinline bool intersectEdge(RayK<K>& ray, size_t k, const Vec3vf<M>& tri_v0, const Vec3vf<M>& tri_e1, const Vec3vf<M>& tri_e2, WoopHitM<M>& hit) const { /* calculate denominator */ typedef Vec3vf<M> Vec3vfM; const Vec3vf<M> tri_Ng = cross(tri_e2,tri_e1); const Vec3vfM O = broadcast<vfloat<M>>(ray.org,k); const Vec3vfM D = broadcast<vfloat<M>>(ray.dir,k); const Vec3vfM C = Vec3vfM(tri_v0) - O; const Vec3vfM R = cross(C,D); const vfloat<M> den = dot(Vec3vfM(tri_Ng),D); const vfloat<M> absDen = abs(den); const vfloat<M> sgnDen = signmsk(den); /* perform edge tests */ const vfloat<M> U = dot(Vec3vf<M>(tri_e2),R) ^ sgnDen; const vfloat<M> V = dot(Vec3vf<M>(tri_e1),R) ^ sgnDen; /* perform backface culling */ #if defined(EMBREE_BACKFACE_CULLING) vbool<M> valid = (den < vfloat<M>(zero)) & (U >= 0.0f) & (V >= 0.0f) & (U+V<=absDen); #else vbool<M> valid = (den != vfloat<M>(zero)) & (U >= 0.0f) & (V >= 0.0f) & (U+V<=absDen); #endif if (likely(none(valid))) return false; /* perform depth test */ const vfloat<M> T = dot(Vec3vf<M>(tri_Ng),C) ^ sgnDen; valid &= (absDen*vfloat<M>(ray.tnear()[k]) < T) & (T <= absDen*vfloat<M>(ray.tfar[k])); if (likely(none(valid))) return false; /* calculate hit information */ new (&hit) WoopHitM<M>(valid,U,V,T,absDen,tri_Ng); return true; } __forceinline bool intersectEdge(RayK<K>& ray, size_t k, const BBox<vfloat<M>>& time_range, const Vec3vf<M>& tri_v0, const Vec3vf<M>& tri_e1, const Vec3vf<M>& tri_e2, WoopHitM<M>& hit) const { if (likely(intersect(ray,k,tri_v0,tri_e1,tri_e2,hit))) { hit.valid &= time_range.lower <= vfloat<M>(ray.time[k]); hit.valid &= vfloat<M>(ray.time[k]) < time_range.upper; return any(hit.valid); } return false; } template<typename Epilog> __forceinline bool intersectEdge(RayK<K>& ray, size_t k, const Vec3vf<M>& tri_v0, const Vec3vf<M>& tri_e1, const Vec3vf<M>& tri_e2, const Epilog& epilog) const { WoopHitM<M> hit; if (likely(intersectEdge(ray,k,tri_v0,tri_e1,tri_e2,hit))) return epilog(hit.valid,hit); return false; } template<typename Epilog> __forceinline bool intersectEdge(RayK<K>& ray, size_t k, const BBox<vfloat<M>>& time_range, const Vec3vf<M>& tri_v0, const Vec3vf<M>& tri_e1, const Vec3vf<M>& tri_e2, const Epilog& epilog) const { WoopHitM<M> hit; if (likely(intersectEdge(ray,k,time_range,tri_v0,tri_e1,tri_e2,hit))) return epilog(hit.valid,hit); return false; } template<typename Epilog> __forceinline bool intersect(RayK<K>& ray, size_t k, const Vec3vf<M>& v0, const Vec3vf<M>& v1, const Vec3vf<M>& v2, const Epilog& epilog) const { const Vec3vf<M> e1 = v0-v1; const Vec3vf<M> e2 = v2-v0; return intersectEdge(ray,k,v0,e1,e2,epilog); } template<typename Epilog> __forceinline bool intersect(RayK<K>& ray, size_t k, const BBox<vfloat<M>>& time_range, const Vec3vf<M>& v0, const Vec3vf<M>& v1, const Vec3vf<M>& v2, const Epilog& epilog) const { const Vec3vf<M> e1 = v0-v1; const Vec3vf<M> e2 = v2-v0; return intersectEdge(ray,k,time_range,v0,e1,e2,epilog); } }; #endif } }
39.178241
134
0.461152
cf38202e4acef00489075cd06d78eb76ef359689
213
h
C
Project-one/include/semaphores-lib.h
carvalheirafc/cDump
6a61b914d47f0df6296a3cf22ae7cfd8172b9ffc
[ "Apache-2.0" ]
null
null
null
Project-one/include/semaphores-lib.h
carvalheirafc/cDump
6a61b914d47f0df6296a3cf22ae7cfd8172b9ffc
[ "Apache-2.0" ]
null
null
null
Project-one/include/semaphores-lib.h
carvalheirafc/cDump
6a61b914d47f0df6296a3cf22ae7cfd8172b9ffc
[ "Apache-2.0" ]
null
null
null
#ifndef __SEMAPHORES_LIB_H__ #define __SEMAPHORES_LIB_H__ void fillMatrix(int** targetMatrix, int number, int matrix_size); void matrixMultiplicationWithTreads(int dimmentions); #endif //__SEMAPHORES_LIB_H__
19.363636
65
0.830986
cf78db62581aff434900cd87903ed8f0b76a3e87
727
h
C
fboss/agent/state/StateUtils.h
fakeNetflix/facebook-repo-fboss
b4b64540c779022bcbeff72376549d0addf3f7e7
[ "BSD-3-Clause" ]
null
null
null
fboss/agent/state/StateUtils.h
fakeNetflix/facebook-repo-fboss
b4b64540c779022bcbeff72376549d0addf3f7e7
[ "BSD-3-Clause" ]
null
null
null
fboss/agent/state/StateUtils.h
fakeNetflix/facebook-repo-fboss
b4b64540c779022bcbeff72376549d0addf3f7e7
[ "BSD-3-Clause" ]
null
null
null
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once #include <string> #include "fboss/agent/types.h" namespace facebook { namespace fboss { namespace util { /** * Utility functions for InterfaceID <-> ifName (on host) */ std::string createTunIntfName(InterfaceID ifID); bool isTunIntfName(const std::string& ifName); InterfaceID getIDFromTunIntfName(const std::string& ifName); } // namespace util } // namespace fboss } // namespace facebook
24.233333
79
0.730399
65cd3ae01444a91f60a2e6e33c688badd4d197e9
529
c
C
Implementation/Lisa's Workbook.c
iamvk1996/HackerRank-Solutions
781553d4f87549372136c7a541a2cf55a69d40ac
[ "Apache-2.0" ]
null
null
null
Implementation/Lisa's Workbook.c
iamvk1996/HackerRank-Solutions
781553d4f87549372136c7a541a2cf55a69d40ac
[ "Apache-2.0" ]
null
null
null
Implementation/Lisa's Workbook.c
iamvk1996/HackerRank-Solutions
781553d4f87549372136c7a541a2cf55a69d40ac
[ "Apache-2.0" ]
null
null
null
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int n,k; scanf("%d %d",&n,&k); int pages[n+1]; int p=1; int count=0; for(int i=1;i<=n;i++) { scanf("%d",&pages[i]); } for(int i=1;i<=n;i++) { for(int q=1;q<=pages[i];q++) { if(q==p) count++; if(q%k==0 && q!=pages[i]) p++; } p++; } printf("%d",count); return 0; }
16.030303
37
0.359168
65f9330acc5ff8053d522edbcf092595e14c3ed3
5,661
c
C
usr/tests/testdesc/testdesc.c
mslovy/barrelfish
780bc02cfbc3594b0ae46ca3a921d183557839be
[ "MIT" ]
null
null
null
usr/tests/testdesc/testdesc.c
mslovy/barrelfish
780bc02cfbc3594b0ae46ca3a921d183557839be
[ "MIT" ]
null
null
null
usr/tests/testdesc/testdesc.c
mslovy/barrelfish
780bc02cfbc3594b0ae46ca3a921d183557839be
[ "MIT" ]
null
null
null
/** \file * \brief inheritance of file descriptors */ /* * Copyright (c) 2010, 2012, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <barrelfish/barrelfish.h> #include <barrelfish/spawn_client.h> #include "testdesc.h" /* Copying the actual handles is hard. * We could try a deep copy, but really we should come up with a serialised * format for each type. It also involves implementing the underlying * resources such that the descriptors can actually be used in the new * dispatcher. */ static size_t copy_file_fd(void *dest, lpaddr_t offset, struct fd_store *fds) { size_t size = sizeof(void *); printf("FILE\n\thandle: %p\n", fds->handle); /* This following isn't correct at all - we're just copying the value of * the pointer, which is useless in the new dispatcher */ printf("copying %zu bytes from %p to %p\n", size, &fds->handle, dest); memcpy(dest, &fds->handle, size); fds->handle = (void*)(offset); printf("fd %d fixed handle is: %p\n", fds->num, fds->handle); return size; } static size_t copy_unixsock_fd(void *dest, lpaddr_t offset, struct fd_store *fds) { // shallow copy. doesn't really help us. struct _unix_socket *ush; size_t size; ush = fds->handle; printf("adding UNIX socket (%p)\n\ttype: %x protocol: %x\n\tpassive: %d " "nonblkng: %d\n", fds->handle, ush->type, ush->protocol, ush->passive, ush->nonblocking); size = sizeof(struct _unix_socket); printf("copying %zu bytes from %p to %p\n", size, fds->handle, dest); memcpy(dest, fds->handle, size); fds->handle = (void*)(offset); printf("fd %d fixed handle is: %p\n", fds->num, fds->handle); return size; } /** * \brief Setup inherited file descriptors * */ static errval_t spawn_setup_fds(struct capref *frame) { errval_t err; void *fdspg; // Create frame (actually multiple pages) for fds err = frame_alloc(frame, FDS_SIZE, NULL); if (err_is_fail(err)) { return err_push(err, SPAWN_ERR_CREATE_FDSPG); } // map it in so we can write to it err = vspace_map_one_frame(&fdspg, FDS_SIZE, *frame, NULL, NULL); if (err_is_fail(err)) { return err_push(err, SPAWN_ERR_MAP_FDSPG_TO_SELF); } /* Layout of FD page: * int num_fds * struct fd_store fdtab[num_fds] * uint8_t buf[] // store of actual handle data. entries in fdtab above * // point here (relative offset from the beginning of buf). * TODO: add the actual handle data! */ int *num_fds = (int *)fdspg; *num_fds = 0; struct fd_store *fdtab = (struct fd_store *)(num_fds + 1); /* first copy all the fd table entries */ struct fdtab_entry *fde; struct fd_store *fds; int i; for (i = MIN_FD; i < MAX_FD; i++) { fde = fdtab_get(i); if (fde->type != FDTAB_TYPE_AVAILABLE) { fds = &fdtab[*num_fds]; fds->num = i; fds->type = fde->type; fds->handle = fde->handle; printf("added fd %d to fdtabs[%d]: %p as fd_store (%p: num: %d, " "type: %d, (unfixed)handle: %p)\n", i, *num_fds, &fdtab[*num_fds], fds, fds->num, fds->type, fds->handle); (*num_fds)++; } } /* then copy all the handle data to the buffer */ char *buf = (char *)&fdtab[*num_fds]; char *dest = buf; genpaddr_t offset; size_t size; for (i = 0; i < *num_fds; i++) { fds = &fdtab[i]; offset = (genpaddr_t)(dest - buf); switch (fds->type) { case FDTAB_TYPE_FILE: size = copy_file_fd(dest, offset, fds); break; case FDTAB_TYPE_UNIX_SOCKET: size = copy_unixsock_fd(dest, offset, fds); break; default: // nothing to copy size = 0; break; } dest += size; } // unmap frame err = vspace_unmap(fdspg); return err; } static errval_t spawn_child(struct capref fdcap) { errval_t err; char *argv[2] = { "testdesc-child", NULL }; domainid_t new_domain = -1; coreid_t core = 0; // allocate inheritcn struct capref inheritcn_cap; err = alloc_inheritcn_with_caps(&inheritcn_cap, fdcap, NULL_CAP, NULL_CAP); err = spawn_program_with_caps(core, argv[0], argv, NULL, inheritcn_cap, NULL_CAP, SPAWN_NEW_DOMAIN, &new_domain); if (err_is_fail(err)) { DEBUG_ERR(err, "failed spawn on core %d", core); return err; } return SYS_ERR_OK; } int main(int argc, char *argv[]) { errval_t err; printf("Test inheritance of file descriptors\n"); // create some file handles int fd = open("test file", O_CREAT); printf("opened a file with fd: %d\n", fd); fd = socket(AF_UNIX, SOCK_STREAM, 0); printf("opened a socket with fd: %d\n", fd); struct capref fdcap; err = spawn_setup_fds(&fdcap); if (err_is_fail(err)) { DEBUG_ERR(err, "could not setup fds!\n"); return EXIT_FAILURE; } err = spawn_child(fdcap); if (err_is_fail(err)) { DEBUG_ERR(err, "could not spawn child!\n"); return EXIT_FAILURE; } return EXIT_SUCCESS; }
26.957143
82
0.594595
68163e6ff24d44775ce46042a93c09e20c6df250
2,007
h
C
src/IceRay/main/interface/c/core/render/ray.h
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
2
2020-09-04T12:27:15.000Z
2022-01-17T14:49:40.000Z
src/IceRay/main/interface/c/core/render/ray.h
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
null
null
null
src/IceRay/main/interface/c/core/render/ray.h
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
1
2020-09-04T12:27:52.000Z
2020-09-04T12:27:52.000Z
#ifndef f8d904309b2543a588747a56c4e59a9a #define f8d904309b2543a588747a56c4e59a9a #include "../../system/system.h" #include "../../type/interval.h" #include "../object/object.h" #include "../geometry/geometry.h" struct IceRayC_Render_Ray_Struct {}; typedef IceRayC_Render_Ray_Struct* IceRayC_Render_Ray_Handle; IceRayC__EXPORT IceRayC__DECLSPEC void IceRayC_Render_Ray_Release( IceRayC_Render_Ray_Handle P_this ); IceRayC__EXPORT IceRayC__DECLSPEC IceRayC_Render_Ray_Handle IceRayC_Render_Ray_Direction0(); IceRayC__EXPORT IceRayC__DECLSPEC IceRayC_Render_Ray_Handle IceRayC_Render_Ray_Distance0(); IceRayC__EXPORT IceRayC__DECLSPEC IceRayC_Render_Ray_Handle IceRayC_Render_Ray_Distance1( IceRayC_Geometry_Handle P_geometry ); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Distance_Geometry( IceRayC_Render_Ray_Handle P_this, IceRayC_Geometry_Handle P_geometry ); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Distance_Clip( IceRayC_Render_Ray_Handle P_this, IceRayC_TypeInterval1D P_clip ); IceRayC__EXPORT IceRayC__DECLSPEC IceRayC_Render_Ray_Handle IceRayC_Render_Ray_Trace0(); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Trace_Object( IceRayC_Render_Ray_Handle P_this, IceRayC_Object_Handle P_object ); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Trace_Depth( IceRayC_Render_Ray_Handle P_this, IceRayC_TypeSize P_depth ); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Trace_Trash( IceRayC_Render_Ray_Handle P_this, IceRayC_TypeScalar P_trash ); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Trace_Next( IceRayC_Render_Ray_Handle P_this, IceRayC_TypeSize P_next ); IceRayC__EXPORT IceRayC__DECLSPEC int IceRayC_Render_Ray_Trace_IOR( IceRayC_Render_Ray_Handle P_this, IceRayC_TypeScalar P_IOR ); #endif
60.818182
173
0.786248
fdd7e7bae87d3ce1b2966cafbdb05cad753c4278
1,715
h
C
ctcdecode/src/cpu_binding.h
shamoons/ctcdecode
f78df9c7847e5086312648d0e68ab8506b436b0c
[ "MIT" ]
null
null
null
ctcdecode/src/cpu_binding.h
shamoons/ctcdecode
f78df9c7847e5086312648d0e68ab8506b436b0c
[ "MIT" ]
null
null
null
ctcdecode/src/cpu_binding.h
shamoons/ctcdecode
f78df9c7847e5086312648d0e68ab8506b436b0c
[ "MIT" ]
null
null
null
typedef enum { CTC, CTC_DICT, CTC_KENLM } DecodeType ; /* scorers */ int kenlm_enabled(); void* get_dict_scorer(const wchar_t* label_str, int labels_size, int space_index, int blank_index, const char* trie_path); void* get_kenlm_scorer(const wchar_t* label_str, int labels_size, int space_index, int blank_index, const char* lm_path, const char* trie_path); void free_kenlm_scorer(void* kenlm_scorer); void set_kenlm_scorer_lm_weight(void *scorer, float weight); void set_kenlm_scorer_wc_weight(void *scorer, float weight); void set_kenlm_min_unigram_weight(void *scorer, float weight); void set_dict_min_unigram_weight(void *scorer, float weight); // void set_kenlm_scorer_vwc_weight(void *scorer, float weight); void set_label_selection_parameters(void *decoder, int label_selection_size, float label_selection_margin); void* get_base_scorer(); /* decoders */ void* get_ctc_beam_decoder(int num_classes, int top_paths, int beam_width, int blank_index, void *scorer, DecodeType type); /* run decoding */ int ctc_beam_decode(void *decoder, DecodeType type, THFloatTensor *probs, THIntTensor *seq_len, THIntTensor *output, THFloatTensor *scores, THIntTensor *th_out_len, THIntTensor *th_alignments, THFloatTensor *char_probs); /* utilities */ int generate_lm_dict(const wchar_t* labels, int size, int blank_index, int space_index, const char* lm_path, const char* dictionary_path, const char* output_path); int generate_dict(const wchar_t* labels, int size, int blank_index, int space_index, const char* dictionary_path, const char* output_path);
38.977273
107
0.727697
0498cee5184bb3096c0979d40adaa7c80402bc4a
304
h
C
SimG4Core/PhysicsLists/plugins/FTFCMS_BIC.h
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-08-09T08:42:11.000Z
2019-08-09T08:42:11.000Z
SimG4Core/PhysicsLists/plugins/FTFCMS_BIC.h
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
SimG4Core/PhysicsLists/plugins/FTFCMS_BIC.h
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-04-03T19:23:27.000Z
2019-04-03T19:23:27.000Z
#ifndef SimG4Core_PhysicsLists_FTFCMS_BIC_H #define SimG4Core_PhysicsLists_FTFCMS_BIC_H #include "SimG4Core/Physics/interface/PhysicsList.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" class FTFCMS_BIC: public PhysicsList { public: FTFCMS_BIC(const edm::ParameterSet & p); }; #endif
17.882353
55
0.8125
ca327e4834d9a71185af2a6eb806a7e232250cb9
671
h
C
imagelist.h
zemc77/ProjectIMG
acd74f326e87e6b5c63957e6712d56ad0d2e4bcc
[ "MIT" ]
null
null
null
imagelist.h
zemc77/ProjectIMG
acd74f326e87e6b5c63957e6712d56ad0d2e4bcc
[ "MIT" ]
null
null
null
imagelist.h
zemc77/ProjectIMG
acd74f326e87e6b5c63957e6712d56ad0d2e4bcc
[ "MIT" ]
null
null
null
#pragma once #include <QString> #include <QList> class imagelist { public: enum FilterMode {All, Cropped, Uncropped}; imagelist(QString folder); ~imagelist(); int getPosition(); void setPosition(int position); void Seek(int direction, int mode); void Cycle(int direction); QString getPath(); QString getName(); QString getExtension(); QString getFolder(); int getSize(); bool isEmpty(); QList<QString *> *getList() const; private: QList<QString*> *getImagePaths(QString path); bool isImage(QString filename); int _position; int _listsize; QList<QString*> *_list; QString currentFolder; };
21.645161
49
0.66468
a9c5799ec9a722aa39dad90b52a4f4cca289c956
7,368
h
C
src/js/vm/Printer.h
fengjixuchui/blazefox
d5c732ac7305a79fe20704c2d134c130f14eca83
[ "MIT" ]
149
2018-12-23T09:08:00.000Z
2022-02-02T09:18:38.000Z
src/js/vm/Printer.h
fengjixuchui/blazefox
d5c732ac7305a79fe20704c2d134c130f14eca83
[ "MIT" ]
null
null
null
src/js/vm/Printer.h
fengjixuchui/blazefox
d5c732ac7305a79fe20704c2d134c130f14eca83
[ "MIT" ]
56
2018-12-23T18:11:40.000Z
2021-11-30T13:18:17.000Z
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef vm_Printer_h #define vm_Printer_h #include "mozilla/Attributes.h" #include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <string.h> #include "js/TypeDecls.h" #include "js/Utility.h" namespace js { class LifoAlloc; // Generic printf interface, similar to an ostream in the standard library. // // This class is useful to make generic printers which can work either with a // file backend, with a buffer allocated with an JSContext or a link-list // of chunks allocated with a LifoAlloc. class GenericPrinter { protected: bool hadOOM_; // whether reportOutOfMemory() has been called. constexpr GenericPrinter() : hadOOM_(false) {} public: // Puts |len| characters from |s| at the current position and // return true on success, false on failure. virtual bool put(const char* s, size_t len) = 0; virtual void flush() { /* Do nothing */ } inline bool put(const char* s) { return put(s, strlen(s)); } inline bool putChar(const char c) { return put(&c, 1); } // Prints a formatted string into the buffer. bool printf(const char* fmt, ...) MOZ_FORMAT_PRINTF(2, 3); bool vprintf(const char* fmt, va_list ap) MOZ_FORMAT_PRINTF(2, 0); // Report that a string operation failed to get the memory it requested. virtual void reportOutOfMemory(); // Return true if this Sprinter ran out of memory. virtual bool hadOutOfMemory() const; }; // Sprintf, but with unlimited and automatically allocated buffering. class Sprinter final : public GenericPrinter { public: struct InvariantChecker { const Sprinter* parent; explicit InvariantChecker(const Sprinter* p) : parent(p) { parent->checkInvariants(); } ~InvariantChecker() { parent->checkInvariants(); } }; JSContext* context; // context executing the decompiler private: static const size_t DefaultSize; #ifdef DEBUG bool initialized; // true if this is initialized, use for debug builds #endif bool shouldReportOOM; // whether to report OOM to the context char* base; // malloc'd buffer address size_t size; // size of buffer allocated at base ptrdiff_t offset; // offset of next free char in buffer MOZ_MUST_USE bool realloc_(size_t newSize); public: explicit Sprinter(JSContext* cx, bool shouldReportOOM = true); ~Sprinter(); // Initialize this sprinter, returns false on error. MOZ_MUST_USE bool init(); void checkInvariants() const; const char* string() const { return base; } const char* stringEnd() const { return base + offset; } JS::UniqueChars release(); // Returns the string at offset |off|. char* stringAt(ptrdiff_t off) const; // Returns the char at offset |off|. char& operator[](size_t off); // Attempt to reserve len + 1 space (for a trailing nullptr byte). If the // attempt succeeds, return a pointer to the start of that space and adjust the // internal content. The caller *must* completely fill this space on success. char* reserve(size_t len); // Puts |len| characters from |s| at the current position and // return true on success, false on failure. virtual bool put(const char* s, size_t len) override; using GenericPrinter::put; // pick up |inline bool put(const char* s);| // Format the given format/arguments as if by JS_vsmprintf, then put it. // Return true on success, else return false and report an error (typically // OOM). MOZ_MUST_USE bool jsprintf(const char* fmt, ...) MOZ_FORMAT_PRINTF(2, 3); bool putString(JSString* str); ptrdiff_t getOffset() const; // Report that a string operation failed to get the memory it requested. The // first call to this function calls JS_ReportOutOfMemory, and sets this // Sprinter's outOfMemory flag; subsequent calls do nothing. virtual void reportOutOfMemory() override; }; // Fprinter, print a string directly into a file. class Fprinter final : public GenericPrinter { private: FILE* file_; bool init_; public: explicit Fprinter(FILE* fp); constexpr Fprinter() : file_(nullptr), init_(false) {} #ifdef DEBUG ~Fprinter(); #endif // Initialize this printer, returns false on error. MOZ_MUST_USE bool init(const char* path); void init(FILE* fp); bool isInitialized() const { return file_ != nullptr; } void flush() override; void finish(); // Puts |len| characters from |s| at the current position and // return true on success, false on failure. virtual bool put(const char* s, size_t len) override; using GenericPrinter::put; // pick up |inline bool put(const char* s);| }; // LSprinter, is similar to Sprinter except that instead of using an // JSContext to allocate strings, it use a LifoAlloc as a backend for the // allocation of the chunk of the string. class LSprinter final : public GenericPrinter { private: struct Chunk { Chunk* next; size_t length; char* chars() { return reinterpret_cast<char*>(this + 1); } char* end() { return chars() + length; } }; private: LifoAlloc* alloc_; // LifoAlloc used as a backend of chunk allocations. Chunk* head_; Chunk* tail_; size_t unused_; public: explicit LSprinter(LifoAlloc* lifoAlloc); ~LSprinter(); // Copy the content of the chunks into another printer, such that we can // flush the content of this printer to a file. void exportInto(GenericPrinter& out) const; // Drop the current string, and let them be free with the LifoAlloc. void clear(); // Puts |len| characters from |s| at the current position and // return true on success, false on failure. virtual bool put(const char* s, size_t len) override; using GenericPrinter::put; // pick up |inline bool put(const char* s);| }; // Map escaped code to the letter/symbol escaped with a backslash. extern const char js_EscapeMap[]; // Return a C-string containing the chars in str, with any non-printing chars // escaped. If the optional quote parameter is present and is not '\0', quotes // (as specified by the quote argument) are also escaped, and the quote // character is appended at the beginning and end of the result string. // The returned string is guaranteed to contain only ASCII characters. extern JS::UniqueChars QuoteString(JSContext* cx, JSString* str, char quote = '\0'); // Appends the quoted string to the given Sprinter. Follows the same semantics // as QuoteString from above. extern bool QuoteString(Sprinter* sp, JSString* str, char quote = '\0'); } // namespace js #endif // vm_Printer_h
31.896104
97
0.654045
a62013fd4da6cf21e0cee05942cf09376e4f77e8
2,310
c
C
src/data.c
johnmastro/sky
b96ef49c1f9f341d5ea111e16bc7367cb0c7bdff
[ "MIT" ]
null
null
null
src/data.c
johnmastro/sky
b96ef49c1f9f341d5ea111e16bc7367cb0c7bdff
[ "MIT" ]
null
null
null
src/data.c
johnmastro/sky
b96ef49c1f9f341d5ea111e16bc7367cb0c7bdff
[ "MIT" ]
null
null
null
// data.c - Basic data constructors and accessors #include "sky.h" enum type_tag get_type_tag(value_t value) { if (value == NIL) return TAG_LIST; enum type_tag tag = value & ~VAL_MASK; if (!tag) tag = ((struct object *)value)->tag; assert(tag != TAG_UNUSED); return tag; } static struct object *make_object(enum type_tag tag) { struct object *obj = xmalloc(sizeof(*obj)); obj->tag = tag; return obj; } value_t make_integer(intptr_t value) { return ((uintptr_t)value << TAG_BITS) + TAG_INT; } intptr_t integer_data(value_t value) { return value >> TAG_BITS; } value_t make_character(int value) { return ((uintptr_t)value << TAG_BITS) + TAG_CHAR; } int character_data(value_t value) { return value >> TAG_BITS; } value_t make_string(const char *data, ptrdiff_t len) { assert(len >= 0); assert(len != PTRDIFF_MAX); struct object *obj = make_object(TAG_STRING); obj->u.string.len = len; obj->u.string.data = xmalloc(len + 1); memcpy(obj->u.string.data, data, len); obj->u.string.data[len] = '\0'; return (value_t)obj; } ptrdiff_t string_length(value_t value) { return ((struct object *)value)->u.string.len; } const unsigned char *string_data(value_t value) { return ((struct object *)value)->u.string.data; } int string_ref(value_t value, ptrdiff_t i) { const unsigned char *data = string_data(value); return data[i]; } value_t make_symbol(value_t name) { assert(get_type_tag(name) == TAG_STRING); struct object *obj = make_object(TAG_SYMBOL); obj->u.symbol.name = name; return (value_t)obj; } value_t make_symbol_from_c_string(const char *data) { size_t len = strlen(data); assert(len < (size_t)PTRDIFF_MAX); value_t name = make_string(data, len); return make_symbol(name); } value_t symbol_name(value_t value) { return ((struct object *)value)->u.symbol.name; } value_t cons(value_t first, value_t rest) { assert(get_type_tag(rest) == TAG_LIST); struct object *obj = make_object(TAG_LIST); obj->u.list.first = first; obj->u.list.rest = rest; return (value_t)obj; } value_t first(value_t value) { return ((struct object *)value)->u.list.first; } value_t rest(value_t value) { return ((struct object *)value)->u.list.rest; }
20.625
53
0.669697
b7ce6141d2c3eedeef7f50a3bc0d517339d22893
11,598
h
C
gpu/ipc/service/gpu_watchdog_thread.h
Yannic/chromium
ab32e8aacb08c9fce0dc4bf09eec456ba46e3710
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
76
2020-09-02T03:05:41.000Z
2022-03-30T04:40:55.000Z
gpu/ipc/service/gpu_watchdog_thread.h
blueboxd/chromium-legacy
07223bc94bd97499909c9ed3c3f5769d718fe2e0
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
45
2020-09-02T03:21:37.000Z
2022-03-31T22:19:45.000Z
gpu/ipc/service/gpu_watchdog_thread.h
Yannic/chromium
ab32e8aacb08c9fce0dc4bf09eec456ba46e3710
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
8
2020-07-22T18:49:18.000Z
2022-02-08T10:27:16.000Z
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef GPU_IPC_SERVICE_GPU_WATCHDOG_THREAD_H_ #define GPU_IPC_SERVICE_GPU_WATCHDOG_THREAD_H_ #include "base/atomicops.h" #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/metrics/histogram_macros.h" #include "base/power_monitor/power_observer.h" #include "base/task/task_observer.h" #include "base/threading/thread.h" #include "base/time/time.h" #include "build/build_config.h" #include "gpu/ipc/common/gpu_watchdog_timeout.h" #include "gpu/ipc/service/gpu_ipc_service_export.h" #include "ui/gfx/native_widget_types.h" #include "ui/gl/progress_reporter.h" namespace gpu { // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class GpuWatchdogThreadEvent { kGpuWatchdogStart, kGpuWatchdogKill, kGpuWatchdogEnd, kMaxValue = kGpuWatchdogEnd, }; // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class GpuWatchdogTimeoutEvent { // Recorded each time OnWatchdogTimeout() is called. kTimeout = 0, // Recorded when a GPU main thread is killed for a detected hang. kKill = 1, // Window only: Recorded when a hang is detected but we allow the GPU main // thread to continue until it spent the full // thread time doing the work. kMoreThreadTime = 2, // Windows only: The GPU makes progress after givenmore thread time. The GPU // main thread is not killed. kProgressAfterMoreThreadTime = 3, // Deprecated. A gpu hang is detected but watchdog waits for 60 seconds before // taking action. // kTimeoutWait = 4, // Deprecated. The GPU makes progress within 60 sec in OnWatchdogTimeout(). // The GPU main thread is not killed. // kProgressAfterWait = 5, // Just continue if it's not on the TTY of our host X11 server. kContinueOnNonHostServerTty = 6, // Windows only: After detecting GPU hang and continuing running through // OnGpuWatchdogTimeout for the max cycles, the GPU main thread still cannot // get the full thread time. kLessThanFullThreadTimeAfterCapped = 7, // Windows only: The GPU main thread went through the // kLessThanFullThreadTimeAfterCapped stage before the process is killed. kKillOnLessThreadTime = 8, // OnWatchdogTimeout() is called long after the expected time. The GPU is not // killed this time because of the slow system. kSlowWatchdogThread = 9, kMaxValue = kSlowWatchdogThread, }; #if defined(OS_WIN) // If the actual time the watched GPU thread spent doing actual work is less // than the watchdog timeout, the GPU thread can continue running through // OnGPUWatchdogTimeout for at most 4 times before the gpu thread is killed. constexpr int kMaxCountOfMoreGpuThreadTimeAllowed = 3; #endif constexpr int kMaxExtraCyclesBeforeKill = 0; // A thread that intermitently sends tasks to a group of watched message loops // and deliberately crashes if one of them does not respond after a timeout. class GPU_IPC_SERVICE_EXPORT GpuWatchdogThread : public base::Thread, public base::PowerSuspendObserver, public base::TaskObserver, public gl::ProgressReporter { public: static std::unique_ptr<GpuWatchdogThread> Create( bool start_backgrounded, const std::string& thread_name); static std::unique_ptr<GpuWatchdogThread> Create( bool start_backgrounded, base::TimeDelta timeout, int init_factor, int restart_factor, bool test_mode, const std::string& thread_name); GpuWatchdogThread(const GpuWatchdogThread&) = delete; GpuWatchdogThread& operator=(const GpuWatchdogThread&) = delete; ~GpuWatchdogThread() override; // Notifies the watchdog when Chrome is backgrounded / foregrounded. Should // only be used if Chrome is completely backgrounded and not expected to // render (all windows backgrounded and not producing frames). void OnBackgrounded(); void OnForegrounded(); // The watchdog starts armed to catch startup hangs, and needs to be disarmed // once init is complete, before executing tasks. void OnInitComplete(); // Notifies the watchdog when the GPU child process is being destroyed. // This function is called directly from // viz::GpuServiceImpl::~GpuServiceImpl() void OnGpuProcessTearDown(); // Pause the GPU watchdog to stop the timeout task. If the current heavy task // is not running on the GPU driver, the watchdog can be paused to avoid // unneeded crash. void PauseWatchdog(); // Continue the watchdog after a pause. void ResumeWatchdog(); // For gpu testing only. Return status for the watchdog tests bool IsGpuHangDetectedForTesting(); void WaitForPowerObserverAddedForTesting(); // Implements base::Thread. void Init() override; void CleanUp() override; // Implements gl::ProgressReporter. void ReportProgress() override; // Implements TaskObserver. void WillProcessTask(const base::PendingTask& pending_task, bool was_blocked_or_low_priority) override; void DidProcessTask(const base::PendingTask& pending_task) override; // Implements base::PowerSuspendObserver. void OnSuspend() override; void OnResume() override; protected: GpuWatchdogThread(); private: enum PauseResumeSource { kAndroidBackgroundForeground = 0, kPowerSuspendResume = 1, kGeneralGpuFlow = 2, }; GpuWatchdogThread(base::TimeDelta timeout, int init_factor, int restart_factor, bool test_mode, const std::string& thread_name); void AddPowerObserver(); void RestartWatchdogTimeoutTask(PauseResumeSource source_of_request); void StopWatchdogTimeoutTask(PauseResumeSource source_of_request); void UpdateInitializationFlag(); void Arm(); void Disarm(); void InProgress(); bool IsArmed(); base::subtle::Atomic32 ReadArmDisarmCounter(); void OnWatchdogTimeout(); bool SlowWatchdogThread(); bool WatchedThreadNeedsMoreThreadTime(bool no_gpu_hang_detected); #if defined(OS_WIN) base::ThreadTicks GetWatchedThreadTime(); #endif // Do not change the function name. It is used for [GPU HANG] carsh reports. void DeliberatelyTerminateToRecoverFromHang(); // Records "GPU.WatchdogThread.Event". void GpuWatchdogHistogram(GpuWatchdogThreadEvent thread_event); // Histogram recorded in OnWatchdogTimeout() // Records "GPU.WatchdogThread.Timeout" void GpuWatchdogTimeoutHistogram(GpuWatchdogTimeoutEvent timeout_event); #if defined(OS_WIN) // Histograms recorded for WatchedThreadNeedsMoreThreadTime() function. void WatchedThreadNeedsMoreThreadTimeHistogram( bool no_gpu_hang_detected, bool start_of_more_thread_time); #endif // Used for metrics. It's 1 minute after the event. bool WithinOneMinFromPowerResumed(); bool WithinOneMinFromForegrounded(); #if defined(USE_X11) void UpdateActiveTTY(); #endif // The watchdog continues when it's not on the TTY of our host X11 server. bool ContinueOnNonHostX11ServerTty(); // This counter is only written on the gpu thread, and read on both threads. volatile base::subtle::Atomic32 arm_disarm_counter_ = 0; // The counter number read in the last OnWatchdogTimeout() on the watchdog // thread. int32_t last_arm_disarm_counter_ = 0; // Timeout on the watchdog thread to check if gpu hangs. base::TimeDelta watchdog_timeout_; // The one-time watchdog timeout multiplier in the gpu initialization. int watchdog_init_factor_; // The one-time watchdog timeout multiplier after the watchdog pauses and // restarts. int watchdog_restart_factor_; // The time the gpu watchdog was created. base::TimeTicks watchdog_start_timeticks_; // The time the last OnSuspend and OnResume was called. base::TimeTicks power_suspend_timeticks_; base::TimeTicks power_resume_timeticks_; // The time the last OnBackgrounded and OnForegrounded was called. base::TimeTicks backgrounded_timeticks_; base::TimeTicks foregrounded_timeticks_; // The time PauseWatchdog and ResumeWatchdog was called. base::TimeTicks watchdog_pause_timeticks_; base::TimeTicks watchdog_resume_timeticks_; // TimeTicks: Tracking the amount of time a task runs. Executing delayed // tasks at the right time. // ThreadTicks: Use this timer to (approximately) measure how much time the // calling thread spent doing actual work vs. being de-scheduled. // The time the last OnWatchdogTimeout() was called. base::TimeTicks last_on_watchdog_timeout_timeticks_; // The wall-clock time the next OnWatchdogTimeout() will be called. base::Time next_on_watchdog_timeout_time_; #if defined(OS_WIN) base::ThreadTicks last_on_watchdog_timeout_thread_ticks_; // The difference between the timeout and the actual time the watched thread // spent doing actual work. base::TimeDelta remaining_watched_thread_ticks_; // The Windows thread hanndle of the watched GPU main thread. void* watched_thread_handle_ = nullptr; // After GPU hang detected, how many times has the GPU thread been allowed to // continue due to not enough thread time. int count_of_more_gpu_thread_time_allowed_ = 0; // The total timeout, up to 60 seconds, the watchdog thread waits for the GPU // main thread to get full thread time. base::TimeDelta time_in_wait_for_full_thread_time_; // After detecting GPU hang and continuing running through // OnGpuWatchdogTimeout for the max cycles, the GPU main thread still cannot // get the full thread time. bool less_than_full_thread_time_after_capped_ = false; #endif #if defined(USE_X11) FILE* tty_file_ = nullptr; int host_tty_ = -1; int active_tty_ = -1; int last_active_tty_ = -1; #endif // The system has entered the power suspension mode. bool in_power_suspension_ = false; // The GPU process has started tearing down. Accessed only in the gpu process. bool in_gpu_process_teardown_ = false; // Chrome is running on the background on Android. Gpu is probably very slow // or stalled. bool is_backgrounded_ = false; // The GPU watchdog is paused. The timeout task is temporarily stopped. bool is_paused_ = false; // Whether the watchdog thread has added the power monitor observer. // Read/Write by the watchdog thread only. bool is_power_observer_added_ = false; // whether GpuWatchdogThreadEvent::kGpuWatchdogStart has been recorded. bool is_watchdog_start_histogram_recorded = false; // Read/Write by the watchdog thread only after initialized in the // constructor. bool in_gpu_initialization_ = false; // The number of logical processors/cores on the current machine. int num_of_processors_ = 0; // For the experiment and the debugging purpose size_t num_of_timeout_after_power_resume_ = 0; size_t num_of_timeout_after_foregrounded_ = 0; bool foregrounded_event_ = false; bool power_resumed_event_ = false; // For gpu testing only. const bool is_test_mode_; // Set by the watchdog thread and Read by the test thread. base::AtomicFlag test_result_timeout_and_gpu_hang_; scoped_refptr<base::SingleThreadTaskRunner> watched_gpu_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> watchdog_thread_task_runner_; base::WeakPtr<GpuWatchdogThread> weak_ptr_; base::WeakPtrFactory<GpuWatchdogThread> weak_factory_{this}; }; } // namespace gpu #endif // GPU_IPC_SERVICE_GPU_WATCHDOG_THREAD_H_
35.907121
80
0.758752
a284af91d985b3c3e92f66a511335772bf0b54e4
422
h
C
Sources/Views/OAScrollView.h
Zahnstocher/OsmAnd-ios
d67009024c5ebb0084c83e3a9c305455b5db3397
[ "MIT" ]
null
null
null
Sources/Views/OAScrollView.h
Zahnstocher/OsmAnd-ios
d67009024c5ebb0084c83e3a9c305455b5db3397
[ "MIT" ]
null
null
null
Sources/Views/OAScrollView.h
Zahnstocher/OsmAnd-ios
d67009024c5ebb0084c83e3a9c305455b5db3397
[ "MIT" ]
null
null
null
// // OAScrollView.h // OsmAnd // // Created by Alexey Kulish on 23/02/2018. // Copyright © 2018 OsmAnd. All rights reserved. // #import <UIKit/UIKit.h> @protocol OAScrollViewDelegate @required - (void) onContentOffsetChanged:(CGPoint)contentOffset; - (BOOL) isScrollAllowed; @end @interface OAScrollView : UIScrollView @property (nonatomic, weak) id<OAScrollViewDelegate> oaDelegate; - (BOOL) isSliding; @end
16.230769
64
0.732227
2c3bdb50a8c5d7d4c7464cbe2d6729f48c5f0a1e
5,716
h
C
Pods/Headers/Public/pjsip/pjmedia/include/pjmedia/alaw_ulaw.h
vikt0r40/Cheryz
08e8bd0ac9b3ce62d024a8fc82e678e9737d104e
[ "MIT" ]
null
null
null
Pods/Headers/Public/pjsip/pjmedia/include/pjmedia/alaw_ulaw.h
vikt0r40/Cheryz
08e8bd0ac9b3ce62d024a8fc82e678e9737d104e
[ "MIT" ]
null
null
null
Pods/Headers/Public/pjsip/pjmedia/include/pjmedia/alaw_ulaw.h
vikt0r40/Cheryz
08e8bd0ac9b3ce62d024a8fc82e678e9737d104e
[ "MIT" ]
null
null
null
/* $Id: alaw_ulaw.h 3553 2011-05-05 06:14:19Z nanang $ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * 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 2 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __PJMEDIA_ALAW_ULAW_H__ #define __PJMEDIA_ALAW_ULAW_H__ #include <pjmedia/types.h> PJ_BEGIN_DECL #if defined(PJMEDIA_HAS_ALAW_ULAW_TABLE) && PJMEDIA_HAS_ALAW_ULAW_TABLE!=0 extern const pj_uint8_t pjmedia_linear2ulaw_tab[16384]; extern const pj_uint8_t pjmedia_linear2alaw_tab[16384]; extern const pj_int16_t pjmedia_ulaw2linear_tab[256]; extern const pj_int16_t pjmedia_alaw2linear_tab[256]; /** * Convert 16-bit linear PCM value to 8-bit A-Law. * * @param pcm_val 16-bit linear PCM value. * @return 8-bit A-Law value. */ #define pjmedia_linear2alaw(pcm_val) \ pjmedia_linear2alaw_tab[(((pj_int16_t)pcm_val) >> 2) & 0x3fff] /** * Convert 8-bit A-Law value to 16-bit linear PCM value. * * @param chara_val 8-bit A-Law value. * @return 16-bit linear PCM value. */ #define pjmedia_alaw2linear(chara_val) \ pjmedia_alaw2linear_tab[chara_val] /** * Convert 16-bit linear PCM value to 8-bit U-Law. * * @param pcm_val 16-bit linear PCM value. * @return U-bit A-Law value. */ #define pjmedia_linear2ulaw(pcm_val) \ pjmedia_linear2ulaw_tab[(((pj_int16_t)pcm_val) >> 2) & 0x3fff] /** * Convert 8-bit U-Law value to 16-bit linear PCM value. * * @param u_val 8-bit U-Law value. * @return 16-bit linear PCM value. */ #define pjmedia_ulaw2linear(u_val) \ pjmedia_ulaw2linear_tab[u_val] /** * Convert 8-bit A-Law value to 8-bit U-Law value. * * @param aval 8-bit A-Law value. * @return 8-bit U-Law value. */ #define pjmedia_alaw2ulaw(aval) \ pjmedia_linear2ulaw(pjmedia_alaw2linear(aval)) /** * Convert 8-bit U-Law value to 8-bit A-Law value. * * @param uval 8-bit U-Law value. * @return 8-bit A-Law value. */ #define pjmedia_ulaw2alaw(uval) \ pjmedia_linear2alaw(pjmedia_ulaw2linear(uval)) #else /** * Convert 16-bit linear PCM value to 8-bit A-Law. * * @param pcm_val 16-bit linear PCM value. * @return 8-bit A-Law value. */ PJ_DECL(pj_uint8_t) pjmedia_linear2alaw(int pcm_val); /** * Convert 8-bit A-Law value to 16-bit linear PCM value. * * @param chara_val 8-bit A-Law value. * @return 16-bit linear PCM value. */ PJ_DECL(int) pjmedia_alaw2linear(unsigned chara_val); /** * Convert 16-bit linear PCM value to 8-bit U-Law. * * @param pcm_val 16-bit linear PCM value. * @return U-bit A-Law value. */ PJ_DECL(unsigned char) pjmedia_linear2ulaw(int pcm_val); /** * Convert 8-bit U-Law value to 16-bit linear PCM value. * * @param u_val 8-bit U-Law value. * @return 16-bit linear PCM value. */ PJ_DECL(int) pjmedia_ulaw2linear(unsigned char u_val); /** * Convert 8-bit A-Law value to 8-bit U-Law value. * * @param aval 8-bit A-Law value. * @return 8-bit U-Law value. */ PJ_DECL(unsigned char) pjmedia_alaw2ulaw(unsigned char aval); /** * Convert 8-bit U-Law value to 8-bit A-Law value. * * @param uval 8-bit U-Law value. * @return 8-bit A-Law value. */ PJ_DECL(unsigned char) pjmedia_ulaw2alaw(unsigned char uval); #endif /** * Encode 16-bit linear PCM data to 8-bit U-Law data. * * @param dst Destination buffer for 8-bit U-Law data. * @param src Source, 16-bit linear PCM data. * @param count Number of samples. */ PJ_INLINE(void) pjmedia_ulaw_encode(pj_uint8_t *dst, const pj_int16_t *src, pj_size_t count) { const pj_int16_t *end = src + count; while (src < end) { *dst++ = pjmedia_linear2ulaw(*src++); } } /** * Encode 16-bit linear PCM data to 8-bit A-Law data. * * @param dst Destination buffer for 8-bit A-Law data. * @param src Source, 16-bit linear PCM data. * @param count Number of samples. */ PJ_INLINE(void) pjmedia_alaw_encode(pj_uint8_t *dst, const pj_int16_t *src, pj_size_t count) { const pj_int16_t *end = src + count; while (src < end) { *dst++ = pjmedia_linear2alaw(*src++); } } /** * Decode 8-bit U-Law data to 16-bit linear PCM data. * * @param dst Destination buffer for 16-bit PCM data. * @param src Source, 8-bit U-Law data. * @param len Encoded frame/source length in bytes. */ PJ_INLINE(void) pjmedia_ulaw_decode(pj_int16_t *dst, const pj_uint8_t *src, pj_size_t len) { const pj_uint8_t *end = src + len; while (src < end) { *dst++ = pjmedia_ulaw2linear(*src++); } } /** * Decode 8-bit A-Law data to 16-bit linear PCM data. * * @param dst Destination buffer for 16-bit PCM data. * @param src Source, 8-bit A-Law data. * @param len Encoded frame/source length in bytes. */ PJ_INLINE(void) pjmedia_alaw_decode(pj_int16_t *dst, const pj_uint8_t *src, pj_size_t len) { const pj_uint8_t *end = src + len; while (src < end) { *dst++ = pjmedia_alaw2linear(*src++); } } PJ_END_DECL #endif /* __PJMEDIA_ALAW_ULAW_H__ */
26.71028
77
0.679146
c8e28577a9583957411cfd1142a7dc37cd871872
1,169
h
C
TRIdleTimer.h
etoile/StepChat
8b89dc93d1ef225397775326edded2137dda409e
[ "BSD-3-Clause" ]
1
2019-03-08T02:09:08.000Z
2019-03-08T02:09:08.000Z
TRIdleTimer.h
etoile/StepChat
8b89dc93d1ef225397775326edded2137dda409e
[ "BSD-3-Clause" ]
null
null
null
TRIdleTimer.h
etoile/StepChat
8b89dc93d1ef225397775326edded2137dda409e
[ "BSD-3-Clause" ]
2
2017-03-13T11:15:09.000Z
2020-03-12T02:56:37.000Z
// // TRIdleTimer.h // Jabber // // Created by David Chisnall on 09/01/2005. // Copyright 2005 David Chisnall. All rights reserved. // #import <Foundation/Foundation.h> #import <AppKit/AppKit.h> #ifdef MACOSX #include <Carbon/Carbon.h> #include <time.h> #endif @interface TRIdleTimer : NSObject { BOOL isValid; NSTimeInterval interval; NSInvocation * idle; NSInvocation * unidle; #ifdef MACOSX EventLoopTimerRef timer; EventHandlerRef keyHandler; EventHandlerRef mouseHandler; time_t lastEvent; BOOL fired; #endif } + (TRIdleTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds idleTarget:(id)idleTarget idleSelector:(SEL)idleSelector unidleTarget:(id)unidleTarget unidleSelector:(SEL)unidleSelector; - (id)initWithFireInterval:(NSTimeInterval)seconds idleTarget:(id)idleTarget idleSelector:(SEL)idleSelector unidleTarget:(id)unidleTarget unidleSelector:(SEL)unidleSelector; - (void) fireIdleAction; - (void) fireUnidleAction; - (void)invalidate; - (BOOL)isValid; - (void)setInterval:(NSTimeInterval)seconds; - (NSTimeInterval)timeInterval; #ifdef MACOSX - (void) idling; #endif @end
23.38
72
0.74166
c8fdfc7b48500150469c0ea999868df3d7cf8475
921
h
C
getgood/Controllers/ChatListController.h
takemurakimio/get-good-py
0d9b66b8186c3104d9f5aa38c5d55605ba6b2df8
[ "Apache-2.0" ]
1
2021-10-05T10:04:05.000Z
2021-10-05T10:04:05.000Z
getgood/Controllers/ChatListController.h
takemurakimio/get-good-py
0d9b66b8186c3104d9f5aa38c5d55605ba6b2df8
[ "Apache-2.0" ]
null
null
null
getgood/Controllers/ChatListController.h
takemurakimio/get-good-py
0d9b66b8186c3104d9f5aa38c5d55605ba6b2df8
[ "Apache-2.0" ]
null
null
null
// // ChatListController.h // getgood // // Created by Md Aminuzzaman on 22/12/17. // Copyright © 2017 PH. All rights reserved. // // // HomeActivityController.h // getgood // // Created by Md Aminuzzaman on 21/11/17. // Copyright © 2017 PH. All rights reserved. // #import <UIKit/UIKit.h> #import "XLPagerTabStripViewController.h" #import "GetGood_Dialog.h" #import "GetGood_Lesson.h" #import "ChatController.h" @interface ChatListController : UIViewController <UITableViewDelegate> { IBOutlet UILabel *labelNoItem; IBOutlet UIImageView *imageBack; IBOutlet UITableView *tableView; } @end @interface ChatListCell : UITableViewCell { } @property (nonatomic,strong) IBOutlet UILabel *labelNameView; @property (nonatomic,strong) IBOutlet UIImageView *imageNew; @property (nonatomic,strong) IBOutlet UIImageView *imageUser; @property (nonatomic,strong) IBOutlet UIImageView *imageBlock; @end
21.418605
70
0.744843
647d9899b43f3181342228013e7c5a1863e4a758
3,768
c
C
sdk_liteos/third_party/u-boot-v2019.07/u-boot-v2019.07/cmd/wdt.c
openharmony-gitee-mirror/device_bearpi_bearpi_hm_nano
c463575de065aad080f730ffbd479628eb821105
[ "BSD-3-Clause" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
sdk_liteos/third_party/u-boot-v2019.07/u-boot-v2019.07/cmd/wdt.c
openharmony-gitee-mirror/device_bearpi_bearpi_hm_nano
c463575de065aad080f730ffbd479628eb821105
[ "BSD-3-Clause" ]
null
null
null
sdk_liteos/third_party/u-boot-v2019.07/u-boot-v2019.07/cmd/wdt.c
openharmony-gitee-mirror/device_bearpi_bearpi_hm_nano
c463575de065aad080f730ffbd479628eb821105
[ "BSD-3-Clause" ]
1
2021-12-15T09:54:37.000Z
2021-12-15T09:54:37.000Z
// SPDX-License-Identifier: GPL-2.0+ /* * Watchdog commands * * Copyright (c) 2019 Michael Walle <michael@walle.cc> */ #include <common.h> #include <command.h> #include <dm.h> #include <wdt.h> static struct udevice *currdev; static int do_wdt_list(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *dev; struct uclass *uc; int ret; ret = uclass_get(UCLASS_WDT, &uc); if (ret) return CMD_RET_FAILURE; uclass_foreach_dev(dev, uc) printf("%s (%s)\n", dev->name, dev->driver->name); return CMD_RET_SUCCESS; } static int do_wdt_dev(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; if (argc > 1) { ret = uclass_get_device_by_name(UCLASS_WDT, argv[1], &currdev); if (ret) { printf("Can't get the watchdog timer: %s\n", argv[1]); return CMD_RET_FAILURE; } } else { if (!currdev) { printf("No watchdog timer device set!\n"); return CMD_RET_FAILURE; } printf("dev: %s\n", currdev->name); } return CMD_RET_SUCCESS; } static int check_currdev(void) { if (!currdev) { printf("No device set, use 'wdt dev' first\n"); return CMD_RET_FAILURE; } return 0; } static int do_wdt_start(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; u64 timeout; ulong flags = 0; if (argc < 2) return CMD_RET_USAGE; ret = check_currdev(); if (ret) return ret; timeout = simple_strtoull(argv[1], NULL, 0); if (argc > 2) flags = simple_strtoul(argv[2], NULL, 0); ret = wdt_start(currdev, timeout, flags); if (ret == -ENOSYS) { printf("Starting watchdog timer not supported.\n"); return CMD_RET_FAILURE; } else if (ret) { printf("Starting watchdog timer failed (%d)\n", ret); return CMD_RET_FAILURE; } return CMD_RET_SUCCESS; } static int do_wdt_stop(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; ret = check_currdev(); if (ret) return ret; ret = wdt_stop(currdev); if (ret == -ENOSYS) { printf("Stopping watchdog timer not supported.\n"); return CMD_RET_FAILURE; } else if (ret) { printf("Stopping watchdog timer failed (%d)\n", ret); return CMD_RET_FAILURE; } return CMD_RET_SUCCESS; } static int do_wdt_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; ret = check_currdev(); if (ret) return ret; ret = wdt_reset(currdev); if (ret == -ENOSYS) { printf("Resetting watchdog timer not supported.\n"); return CMD_RET_FAILURE; } else if (ret) { printf("Resetting watchdog timer failed (%d)\n", ret); return CMD_RET_FAILURE; } return CMD_RET_SUCCESS; } static int do_wdt_expire(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; ulong flags = 0; ret = check_currdev(); if (ret) return ret; if (argc > 1) flags = simple_strtoul(argv[1], NULL, 0); ret = wdt_expire_now(currdev, flags); if (ret == -ENOSYS) { printf("Expiring watchdog timer not supported.\n"); return CMD_RET_FAILURE; } else if (ret) { printf("Expiring watchdog timer failed (%d)\n", ret); return CMD_RET_FAILURE; } return CMD_RET_SUCCESS; } static char wdt_help_text[] = "list - list watchdog devices\n" "wdt dev [<name>] - get/set current watchdog device\n" "wdt start <timeout ms> [flags] - start watchdog timer\n" "wdt stop - stop watchdog timer\n" "wdt reset - reset watchdog timer\n" "wdt expire [flags] - expire watchdog timer immediately\n"; U_BOOT_CMD_WITH_SUBCMDS(wdt, "Watchdog sub-system", wdt_help_text, U_BOOT_SUBCMD_MKENT(list, 1, 1, do_wdt_list), U_BOOT_SUBCMD_MKENT(dev, 2, 1, do_wdt_dev), U_BOOT_SUBCMD_MKENT(start, 3, 1, do_wdt_start), U_BOOT_SUBCMD_MKENT(stop, 1, 1, do_wdt_stop), U_BOOT_SUBCMD_MKENT(reset, 1, 1, do_wdt_reset), U_BOOT_SUBCMD_MKENT(expire, 2, 1, do_wdt_expire));
21.531429
66
0.680732
3124d0779f64fcf3a70ac3ef106c31fd65d69e25
934
h
C
usr/libexec/timed/TMNtpResults.h
lechium/tvOS135Headers
46cd30d3f0f7962eaa0c3f925cd71f414c65e2ac
[ "MIT" ]
2
2020-07-26T20:30:54.000Z
2020-08-10T04:26:23.000Z
usr/libexec/timed/TMNtpResults.h
lechium/tvOS135Headers
46cd30d3f0f7962eaa0c3f925cd71f414c65e2ac
[ "MIT" ]
1
2020-07-26T20:45:31.000Z
2020-08-09T09:30:46.000Z
usr/libexec/timed/TMNtpResults.h
lechium/tvOS135Headers
46cd30d3f0f7962eaa0c3f925cd71f414c65e2ac
[ "MIT" ]
null
null
null
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Jun 10 2020 10:03:13). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> @interface TMNtpResults : NSObject { struct _TMNtpResult *_results; // 8 = 0x8 unsigned long long _capacity; // 16 = 0x10 unsigned long long _count; // 24 = 0x18 } @property(readonly, nonatomic) unsigned long long count; // @synthesize count=_count; - (void)resize:(unsigned long long)arg1; // IMP=0x00000001000132fc - (_Bool)correctnessIntervalTimestamp:(unsigned long long *)arg1 lowerBound:(double *)arg2 upperBound:(double *)arg3; // IMP=0x00000001000130e0 - (_Bool)addTimestamp:(unsigned long long)arg1 time:(double)arg2 delay:(double)arg3 dispersion:(double)arg4; // IMP=0x0000000100013030 - (void)dealloc; // IMP=0x0000000100012fe8 - (id)initWithCapacity:(unsigned long long)arg1; // IMP=0x0000000100012fa0 @end
37.36
143
0.734475
1e966e55d0f0ad535a2d57280c412d82e1290e57
700
c
C
src/ap/plan9/stat.c
gmacd/apex
69a3a102f2b8cb21fee3271b49c6ed25fb901f02
[ "LPL-1.02", "MIT" ]
29
2016-02-15T19:26:10.000Z
2022-01-19T19:10:07.000Z
src/ap/plan9/stat.c
Harvey-OS/ape
69a3a102f2b8cb21fee3271b49c6ed25fb901f02
[ "LPL-1.02", "MIT" ]
75
2016-02-23T23:52:27.000Z
2019-03-25T12:36:55.000Z
src/ap/plan9/stat.c
Harvey-OS/ape
69a3a102f2b8cb21fee3271b49c6ed25fb901f02
[ "LPL-1.02", "MIT" ]
15
2016-02-23T23:48:37.000Z
2022-01-15T19:49:20.000Z
/* * This file is part of the UCB release of Plan 9. It is subject to the license * terms in the LICENSE file found in the top-level directory of this * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No * part of the UCB release of Plan 9, including this file, may be copied, * modified, propagated, or distributed except according to the terms contained * in the LICENSE file. */ #include "lib.h" #include <sys/stat.h> #include <errno.h> #include <stdlib.h> #include "sys9.h" #include "dir.h" int __stat_ap(const char *path, struct stat *buf) { Dir *d; if((d = _dirstat(path)) == nil){ _syserrno(); return -1; } dirtostat(buf, d, 0); free(d); return 0; }
22.580645
79
0.692857
f0215aff338169922e63f28a65d1e9dfd5ab439f
643
h
C
include/die.h
horsicq/die_library
414cb51f06de5234e36da6b4af7e12e7ffdc5415
[ "MIT" ]
3
2020-06-20T05:11:32.000Z
2020-08-14T19:44:12.000Z
include/die.h
horsicq/die_library
414cb51f06de5234e36da6b4af7e12e7ffdc5415
[ "MIT" ]
null
null
null
include/die.h
horsicq/die_library
414cb51f06de5234e36da6b4af7e12e7ffdc5415
[ "MIT" ]
1
2020-08-07T00:33:40.000Z
2020-08-07T00:33:40.000Z
#ifndef DIELIB_H #define DIELIB_H #include <windows.h> // flags #define DIE_DEEPSCAN 0x00000002 #define DIE_RESULTASXML 0x00000004 #define DIE_RESULTASJSON 0x00000008 #ifdef __cplusplus extern "C" { #endif int DIE_CreateScanHandle(); void DIE_CloseScanHandle(int nHandle); char *DIE_ScanFileA(int nHandle,char *pszFileName,unsigned int nFlags); wchar_t *DIE_ScanFileW(int nHandle,wchar_t *pwszFileName,unsigned int nFlags); #ifdef UNICODE #define DIE_ScanFile DIE_ScanFileW #else #define DIE_ScanFile DIE_ScanFileA #endif #ifdef __cplusplus } #endif #endif // DIELIB_H
21.433333
79
0.723173
535627d08d29d1be362f9d4c83008dacb78e37ef
5,283
h
C
Networking/src/MultiClientSender.h
keithrausch/InterprocessMemPool
9610dbeb880b35457d5f7f050912502cde258abd
[ "MIT" ]
null
null
null
Networking/src/MultiClientSender.h
keithrausch/InterprocessMemPool
9610dbeb880b35457d5f7f050912502cde258abd
[ "MIT" ]
null
null
null
Networking/src/MultiClientSender.h
keithrausch/InterprocessMemPool
9610dbeb880b35457d5f7f050912502cde258abd
[ "MIT" ]
1
2021-08-31T00:06:22.000Z
2021-08-31T00:06:22.000Z
// Keith Rausch #ifndef MULTI_CLIENT_SENDER_H #define MULTI_CLIENT_SENDER_H #include "UtilsASIO.h" #include "listener.h" #include "shared_state.h" namespace IPC { struct MultiClientSenderArgs { std::string broadcastDestination = "255.255.255.255"; // send broadcast to all listeners unsigned short broadcastSendPort = 0; // send broadcast on any port unsigned short broadcastReceiverPort = 8081; // change me - broadcast receiver port float heartbeatPeriod_seconds = 0.5; // seconds between heartbeats std::string serverBindAddress = "0.0.0.0"; // bind server to any address unsigned short serverBindPort = 0; // bind server to any port }; struct MultiClientSender { boost::asio::io_context &ioc; std::string topic; // topic name std::shared_ptr<shared_state> sharedState; // for sending data unsigned short boundServerPort; MultiClientSenderArgs args; std::uint_fast64_t uniqueInstanceID; // establish server and get its bound addres and port MultiClientSender(boost::asio::io_context &ioc_in, const std::string &topic_in, const MultiClientSenderArgs &args_in, std::uint_fast64_t uniqueInstanceID_in = 0) : ioc(ioc_in), topic(topic_in), boundServerPort(0), args(args_in), uniqueInstanceID(uniqueInstanceID_in) { shared_state::Callbacks callbacks; callbacks.callbackRead = [](const tcp::endpoint &endpoint, const void *msgPtr, size_t msgSize) { std::stringstream ss; ss << endpoint; std::string endpointString = ss.str(); std::string msg(static_cast<const char *>(msgPtr), msgSize); std::printf("PRODUCER-READ - endpoint: %s\n%s\n", endpointString.c_str(), msg.c_str()); }; callbacks.callbackAccept = [](const tcp::endpoint &endpoint) { std::cout << "PRODUCER-ACCEPT - endpoint: " << endpoint << std::endl; }; callbacks.callbackClose = [](const tcp::endpoint &endpoint) { std::cout << "PRODUCER-CLOSE - endpoint: " << endpoint << std::endl; }; sharedState = std::make_shared<shared_state>(callbacks); // bind to any address, any port tcp::endpoint endpoint(net::ip::make_address(args.serverBindAddress), args.serverBindPort); auto listenerPtr = std::make_shared<listener>(ioc, endpoint, sharedState); if (listenerPtr) { listenerPtr->run(); boundServerPort = listenerPtr->localEndpoint.port(); } } void StartHeartbeat() { if (nullptr == sharedState) { std::cout << "NOT SENDING BROADCAST, SERVER IS DOWN\n"; return; } // this is a lambda because we update the time on every send auto broadcastMsgCreator = [this]() { using namespace std::chrono; std::stringstream ss; ss << "topic:" << topic << ",port:" << boundServerPort << ",id:" << uniqueInstanceID << ",endian:" << (uint16_t)1 << ",system_time:" << duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count() << ","; return ss.str(); }; // send broadcast auto heartbeatPtr = std::make_shared<utils_asio::Heartbeat>(ioc, broadcastMsgCreator, args.broadcastSendPort, args.broadcastDestination, args.broadcastReceiverPort, args.heartbeatPeriod_seconds); if (heartbeatPtr) heartbeatPtr->run(); } void SendAsync(void * msgPtr, size_t msgSize, shared_state::CompletionHandlerT && completionHandler = shared_state::CompletionHandlerT()) { if (sharedState) sharedState->sendAsync(msgPtr, msgSize, std::forward<shared_state::CompletionHandlerT>(completionHandler)); } // // A DANGEROUS CONVENIENCE FUNCTION THAT WILL COPY YOUR ARGS AND ASSUME THAT THE POINTER AND SIZE // // PROVIDED ARE STILL VALID. for example, if you send(string.data(), string.length(), ast string), // // the the original string will get copied and fall out of scope, and the pointer you gave will // // be invalidated / not updated to point to the copy of the string // // works fine if what youre capturing is a shared pointer // template <class ... Args> // void SendAsync( void* msgPtr, size_t msgSize, Args&&... args) // { // sharedState->sendAsync(msgPtr, msgSize, std::forward<Args>(args)...); // } // // A DANGEROUS CONVENIENCE FUNCTION THAT WILL COPY YOUR ARGS AND ASSUME THAT THE POINTER AND SIZE // // PROVIDED ARE STILL VALID. for example, if you send(string.data(), string.length(), ast string), // // the the original string will get copied and fall out of scope, and the pointer you gave will // // be invalidated / not updated to point to the copy of the string // // works fine if what youre capturing is a shared pointer // template <class ... Args> // void SendAsync(const boost::asio::ip::tcp::endpoint &endpoint, void* msgPtr, size_t msgSize, Args&&... args) // { // sharedState->sendAsync(endpoint, msgPtr, msgSize, std::forward<Args>(args)...); // } }; } // namespace #endif
39.425373
163
0.636759
7aeda268414420aebe655c448db705744e431235
753
h
C
Frameworks/DyteSdk.xcframework/ios-arm64/DyteSdk.framework/Headers/DyteMeetingView.h
dyte-in/dyte-ios-sdk
cbe3796525a6a3310f416cb1126d6adf98cbe71d
[ "Apache-2.0" ]
1
2021-11-23T13:21:39.000Z
2021-11-23T13:21:39.000Z
Frameworks/DyteSdk.xcframework/ios-arm64/DyteSdk.framework/Headers/DyteMeetingView.h
dyte-in/dyte-ios-sdk
cbe3796525a6a3310f416cb1126d6adf98cbe71d
[ "Apache-2.0" ]
22
2021-09-06T11:22:07.000Z
2022-03-28T12:45:57.000Z
Frameworks/ios-simulator.xcarchive/Products/Library/Frameworks/DyteSdk.framework/Headers/DyteMeetingView.h
dyte-in/dyte-ios-sdk
cbe3796525a6a3310f416cb1126d6adf98cbe71d
[ "Apache-2.0" ]
null
null
null
// // DyteMeeting.h // dyteClientMobile // // Created by Rohit Bhatia on 08/06/21. // #import <UIKit/UIKit.h> #import "DyteMeetingConfig.h" #import "DyteParticipant.h" @protocol DyteMeetingViewDelegate <NSObject> @optional - (void)meetingConnected; - (void)meetingDisconnect; - (void)meetingJoined; - (void)meetingEnded; - (void)activeSpeaker:(NSString*)peerId; - (void)participantLeave:(DyteParticipant*)participant; - (void)participantJoin:(DyteParticipant*)participant; - (void)participantUpdate:(DyteParticipant*)participant; @end @interface DyteMeetingView : UIView @property (nonatomic, nullable, weak) id<DyteMeetingViewDelegate> delegate; - (void)join:(DyteMeetingConfig*)config; - (void)updateUiConfig:(NSDictionary*)config; @end
20.351351
75
0.762284
15de2b4d3126bfb7a2f55bc9c9fe8ad51c316470
936
h
C
src/maxpool_edge.h
guker/convnet
c4da73ffb942577daeec4587ab22ca643fb6b7cf
[ "BSD-2-Clause" ]
1
2015-11-06T05:30:04.000Z
2015-11-06T05:30:04.000Z
src/maxpool_edge.h
guker/convnet
c4da73ffb942577daeec4587ab22ca643fb6b7cf
[ "BSD-2-Clause" ]
null
null
null
src/maxpool_edge.h
guker/convnet
c4da73ffb942577daeec4587ab22ca643fb6b7cf
[ "BSD-2-Clause" ]
null
null
null
#ifndef MAXPOOL_EDGE_H_ #define MAXPOOL_EDGE_H_ #include "edge.h" /** Implements a Max-pool edge.*/ class MaxPoolEdge : public Edge { public: MaxPoolEdge(const config::Edge& edge_config); virtual void SetTiedTo(Edge* e); virtual void AllocateMemory(bool fprop_only); virtual void ComputeUp(Matrix& input, Matrix& output, bool overwrite); virtual void ComputeDown(Matrix& deriv_output, Matrix& input, Matrix& output, Matrix& deriv_input, bool overwrite); virtual int GetNumModules() const { return num_modules_; } virtual bool RequiresMemoryForDeriv() const { return true; } virtual void SetImageSize(int image_size); virtual void FOV(int* size, int* sep, int* pad1, int* pad2) const; int GetKernelSize() const { return kernel_size_; } int GetStride() const { return stride_; } int GetPadding() const { return padding_; } private: int kernel_size_, stride_, padding_; }; #endif
33.428571
80
0.723291
9ddaff8b71ae7731b9fecc0510a04be686c5add3
42,736
c
C
runtime/libupc/portals4/gupcr_llvm_access.c
tactcomplabs/clang-upc
1d84947ce43f385b068888ade64243c1394c119a
[ "Apache-2.0" ]
null
null
null
runtime/libupc/portals4/gupcr_llvm_access.c
tactcomplabs/clang-upc
1d84947ce43f385b068888ade64243c1394c119a
[ "Apache-2.0" ]
2
2022-01-06T17:58:00.000Z
2022-01-20T05:51:19.000Z
runtime/libupc/portals4/gupcr_llvm_access.c
clangupc/clang-upc
08d86f3ecc63b7a0fc00f1754253ab4330584cc4
[ "Apache-2.0" ]
null
null
null
/*===-- upc_llvm_access.c - UPC Runtime Support Library ------------------=== |* |* The LLVM Compiler Infrastructure |* |* Copyright 2012-2015, Intrepid Technology, Inc. All rights reserved. |* This file is distributed under a BSD-style Open Source License. |* See LICENSE-INTREPID.TXT for details. |* |*===---------------------------------------------------------------------===*/ #include "gupcr_config.h" #include "gupcr_defs.h" #include "gupcr_access.h" #include "gupcr_sync.h" #include "gupcr_sup.h" #include "gupcr_portals.h" #include "gupcr_node.h" #include "gupcr_gmem.h" #include "gupcr_utils.h" /** * @file gupcr_llvm_access.c * Clang UPC compiler llvm access functions. */ /** * @addtogroup IFACE UPC Interface Routines * @{ */ //begin lib_inline_access /** * Relaxed remote "char (8 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Char (8 bits) value at the remote address given by 'p'. */ //inline u_intQI_t __getqi3 (long thread, size_t offset) { u_intQI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R QI LOCAL"); result = *(u_intQI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R QI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%x", (int) thread, (long unsigned) offset, result); return result; } /** * Relaxed remote "short (16 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Short (16 bits) value at the remote address given by 'p'. */ //inline u_intHI_t __gethi3 (long thread, size_t offset) { u_intHI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R HI LOCAL"); result = *(u_intHI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R HI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%x", (int) thread, (long unsigned) offset, result); return result; } /** * Relaxed remote "int (32 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Int (32 bits) value at the remote address given by 'p'. */ //inline u_intSI_t __getsi3 (long thread, size_t offset) { u_intSI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R SI LOCAL"); result = *(u_intSI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R SI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%x", (int) thread, (long unsigned) offset, result); return result; } /** * Relaxed remote "long (64 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Long (64 bits) value at the remote address given by 'p'. */ //inline u_intDI_t __getdi3 (long thread, size_t offset) { u_intDI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R DI LOCAL"); result = *(u_intDI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R DI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%llx", (int) thread, (long unsigned) offset, (long long unsigned) result); return result; } #if GUPCR_TARGET64 /** * Relaxed remote "long long (128 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Long long (128 bits) value at the remote address given by 'p'. */ //inline u_intTI_t __getti3 (long thread, size_t offset) { u_intTI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R TI LOCAL"); result = *(u_intTI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R TI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%llx", (int) thread, (long unsigned) offset, (long long unsigned) result); return result; } #endif /* GUPCR_TARGET64 */ /** * Relaxed remote "float" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Float value at the remote address given by 'p'. */ //inline float __getsf3 (long thread, size_t offset) { float result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R SF LOCAL"); result = *(float *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R SF REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx %6g", (int) thread, (long unsigned) offset, result); return result; } /** * Relaxed remote "double" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Double value at the remote address given by 'p'. */ //inline double __getdf3 (long thread, size_t offset) { double result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER R DF LOCAL"); result = *(double *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); } else { gupcr_trace (FC_MEM, "GET ENTER R DF REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx %6g", (int) thread, (long unsigned) offset, result); return result; } /** * Relaxed remote memory block get operation. * Copy the data at the remote address 'src' into the local memory * destination at the address 'dest'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] dest Local address of the destination memory block. * @param [in] src Remote address of the source memory block. * @param [in] n Number of bytes to transfer. */ //inline void __getblk4 (long thread, size_t offset, void *dest, size_t n) { GUPCR_OMP_CHECK (); gupcr_trace (FC_MEM, "GETBLK ENTER R"); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { GUPCR_MEM_BARRIER (); memcpy (dest, GUPCR_GMEM_OFF_TO_LOCAL (thread, offset), n); GUPCR_READ_MEM_BARRIER (); } else { gupcr_gmem_get (dest, thread, offset, n); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GETBLK EXIT R %d:0x%lx 0x%lx %lu", (int) thread, (long unsigned) offset, (long unsigned) dest, (long unsigned) n); } /** * Relaxed remote "char (8 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putqi3 (long thread, size_t offset, u_intQI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R QI LOCAL " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); *(u_intQI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R QI REMOTE " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R QI"); } /** * Relaxed remote "short (16 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __puthi3 (long thread, size_t offset, u_intHI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R HI LOCAL " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); *(u_intHI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R HI REMOTE " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R HI"); } /** * Relaxed remote "int (32 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putsi3 (long thread, size_t offset, u_intSI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R SI LOCAL " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); *(u_intSI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R SI REMOTE " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R SI"); } /** * Relaxed remote "long (64 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putdi3 (long thread, size_t offset, u_intDI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R DI LOCAL " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); *(u_intDI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R DI REMOTE " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R DI"); } #if GUPCR_TARGET64 /** * Relaxed remote "long long (128 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putti3 (long thread, size_t offset, u_intTI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R TI LOCAL " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); *(u_intTI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R TI REMOTE " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R TI"); } #endif /* GUPCR_TARGET64 */ /** * Relaxed remote "float" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putsf3 (long thread, size_t offset, float v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R SF LOCAL " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); *(float *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R SF REMOTE " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R SF"); } /** * Relaxed remote "double" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putdf3 (long thread, size_t offset, double v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER R DF LOCAL " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); *(double *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; } else { gupcr_trace (FC_MEM, "PUT ENTER R DF REMOTE " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); /* There can be only one outstanding unordered put. */ gupcr_pending_strict_put = 1; } } gupcr_trace (FC_MEM, "PUT EXIT R DF"); } /** * Relaxed remote memory block put operation. * Copy the data at the local address 'src' into the remote memory * destination at the address 'dest'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] dest Remote address of the destination memory block. * @param [in] src Local address of the source memory block. * @param [in] n Number of bytes to transfer. */ //inline void __putblk4 (void *src, long thread, size_t offset, size_t n) { GUPCR_OMP_CHECK (); gupcr_trace (FC_MEM, "PUTBLK ENTER R 0x%lx %d:0x%lx %lu", (long unsigned) src, (int) thread, (long unsigned) offset, (long unsigned) n); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { memcpy (GUPCR_GMEM_OFF_TO_LOCAL (thread, offset), src, n); } else { gupcr_gmem_put (thread, offset, src, n); } gupcr_trace (FC_MEM, "PUT_BLK EXIT R"); } /** * Relaxed remote memory block copy operation. * Copy the data at the remote address 'src' into the remote memory * destination at the address 'dest'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] dest Remote address of destination memory block. * @param [in] src Remote address of source memory block. * @param [in] n Number of bytes to transfer. */ //inline void __copyblk5 (long dthread, size_t doffset, long sthread, size_t soffset, size_t n) { GUPCR_OMP_CHECK (); gupcr_trace (FC_MEM, "COPYBLK ENTER R %d:0x%lx %d:0x%lx %lu", (int) sthread, (long unsigned) soffset, (int) dthread, (long unsigned) doffset, (long unsigned) n); gupcr_assert (dthread < THREADS); gupcr_assert (doffset != 0); gupcr_assert (sthread < THREADS); gupcr_assert (soffset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (dthread) && GUPCR_GMEM_IS_LOCAL (sthread)) { memcpy (GUPCR_GMEM_OFF_TO_LOCAL (dthread, doffset), GUPCR_GMEM_OFF_TO_LOCAL (sthread, soffset), n); } else if (GUPCR_GMEM_IS_LOCAL (dthread)) { gupcr_gmem_get (GUPCR_GMEM_OFF_TO_LOCAL (dthread, doffset), sthread, soffset, n); gupcr_gmem_sync_gets (); } else if (GUPCR_GMEM_IS_LOCAL (sthread)) { gupcr_gmem_put (dthread, doffset, GUPCR_GMEM_OFF_TO_LOCAL (sthread, soffset), n); } else { gupcr_gmem_copy (dthread, doffset, sthread, soffset, n); } gupcr_trace (FC_MEM, "COPY_BLK EXIT R"); } /** * Strict remote "char (8 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Char (8 bits) value at the remote address given by 'p'. */ //inline u_intQI_t __getsqi3 (long thread, size_t offset) { u_intQI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S QI LOCAL"); GUPCR_MEM_BARRIER (); result = *(u_intQI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S QI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%x", (int) thread, (long unsigned) offset, result); return result; } /** * Strict remote "short (16 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Short (16 bits) value at the remote address given by 'p'. */ //inline u_intHI_t __getshi3 (long thread, size_t offset) { u_intHI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S HI LOCAL"); GUPCR_MEM_BARRIER (); result = *(u_intHI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S HI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%x", (int) thread, (long unsigned) offset, result); return result; } /** * Strict remote "int (32 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Int (32 bits) value at the remote address given by 'p'. */ //inline u_intSI_t __getssi3 (long thread, size_t offset) { u_intSI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S SI LOCAL"); GUPCR_MEM_BARRIER (); result = *(u_intSI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S SI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%x", (int) thread, (long unsigned) offset, result); return result; } /** * Strict remote "long (64 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Long (64 bits) value at the remote address given by 'p'. */ //inline u_intDI_t __getsdi3 (long thread, size_t offset) { u_intDI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S DI LOCAL"); GUPCR_MEM_BARRIER (); result = *(u_intDI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S DI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%llx", (int) thread, (long unsigned) offset, (long long unsigned) result); return result; } #if GUPCR_TARGET64 /** * Strict remote "long long (128 bits)" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Long long (128 bits) value at the remote address given by 'p'. */ //inline u_intTI_t __getsti3 (long thread, size_t offset) { u_intTI_t result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S TI LOCAL"); GUPCR_MEM_BARRIER (); result = *(u_intTI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S TI REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx 0x%llx", (int) thread, (long unsigned) offset, (long long unsigned) result); return result; } #endif /* GUPCR_TARGET64 */ /** * Strict remote "float" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Float value at the remote address given by 'p'. */ //inline float __getssf3 (long thread, size_t offset) { float result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S SF LOCAL"); GUPCR_MEM_BARRIER (); result = *(float *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S SF REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx %6g", (int) thread, (long unsigned) offset, result); return result; } /** * Strict remote "double" get operation. * Return the value at the remote address 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the source operand. * @return Double value at the remote address given by 'p'. */ //inline double __getsdf3 (long thread, size_t offset) { double result; GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "GET ENTER S DF LOCAL"); GUPCR_MEM_BARRIER (); result = *(double *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset); GUPCR_READ_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "GET ENTER S DF REMOTE"); gupcr_gmem_get (&result, thread, offset, sizeof (result)); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GET EXIT %d:0x%lx %6g", (int) thread, (long unsigned) offset, result); return result; } /** * Strict remote memory block get operation. * Copy the data at the remote address 'src' into the local memory * destination at the address 'dest'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] dest Local address of the destination memory block. * @param [in] src Remote address of the source memory block. * @param [in] n Number of bytes to transfer. */ //inline void __getsblk4 (long thread, size_t offset, void *dest, size_t n) { GUPCR_OMP_CHECK (); gupcr_trace (FC_MEM, "GETBLK ENTER S"); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { GUPCR_MEM_BARRIER (); memcpy (dest, GUPCR_GMEM_OFF_TO_LOCAL (thread, offset), n); GUPCR_READ_MEM_BARRIER (); } else { gupcr_gmem_get (dest, thread, offset, n); /* All 'get' operations are synchronous. */ gupcr_gmem_sync_gets (); } gupcr_trace (FC_MEM, "GETBLK EXIT S %d:0x%lx 0x%lx %lu", (int) thread, (long unsigned) offset, (long unsigned) dest, (long unsigned) n); } /** * Strict remote "char (8 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putsqi3 (long thread, size_t offset, u_intQI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S QI LOCAL " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(u_intQI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S QI REMOTE " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S QI"); } /** * Strict remote "short (16 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putshi3 (long thread, size_t offset, u_intHI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S HI LOCAL " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(u_intHI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S HI REMOTE " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S HI"); } /** * Strict remote "int (32 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putssi3 (long thread, size_t offset, u_intSI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S SI LOCAL " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(u_intSI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S SI REMOTE " "0x%x %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S SI"); } /** * Strict remote "long (64 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putsdi3 (long thread, size_t offset, u_intDI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S DI LOCAL " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(u_intDI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S DI REMOTE " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S DI"); } #if GUPCR_TARGET64 /** * Strict remote "long long (128 bits)" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putsti3 (long thread, size_t offset, u_intTI_t v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S TI LOCAL " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(u_intTI_t *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S TI REMOTE " "0x%llx %d:0x%lx", (long long unsigned) v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S TI"); } #endif /* GUPCR_TARGET64 */ /** * Strict remote "float" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putssf3 (long thread, size_t offset, float v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S SF LOCAL " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(float *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S SF REMOTE " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S SF"); } /** * Strict remote "double" put operation. * Store the value given by 'v' into the remote memory destination at 'p'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] p Remote address of the destination address. * @param [in] v Source value. */ //inline void __putsdf3 (long thread, size_t offset, double v) { GUPCR_OMP_CHECK (); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { gupcr_trace (FC_MEM, "PUT ENTER S DF LOCAL " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); GUPCR_WRITE_MEM_BARRIER (); *(double *) GUPCR_GMEM_OFF_TO_LOCAL (thread, offset) = v; GUPCR_MEM_BARRIER (); } else { gupcr_trace (FC_MEM, "PUT ENTER S DF REMOTE " "%6g %d:0x%lx", v, (int) thread, (long unsigned) offset); if (sizeof (v) <= (size_t) GUPCR_MAX_PUT_ORDERED_SIZE) { /* Ordered puts can proceed in parallel. */ gupcr_gmem_put (thread, offset, &v, sizeof (v)); } else { /* Wait for any outstanding 'put' operation. */ gupcr_gmem_sync_puts (); gupcr_gmem_put (thread, offset, &v, sizeof (v)); } gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT EXIT S DF"); } /** * Strict remote memory block put operation. * Copy the data at the local address 'src' into the remote memory * destination at the address 'dest'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] dest Remote address of the destination memory block. * @param [in] src Local address of the source memory block. * @param [in] n Number of bytes to transfer. */ //inline void __putsblk4 (void *src, long thread, size_t offset, size_t n) { GUPCR_OMP_CHECK (); gupcr_trace (FC_MEM, "PUTBLK ENTER S 0x%lx %d:0x%lx %lu", (long unsigned) src, (int) thread, (long unsigned) offset, (long unsigned) n); gupcr_assert (thread < THREADS); gupcr_assert (offset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (thread)) { GUPCR_WRITE_MEM_BARRIER (); memcpy (GUPCR_GMEM_OFF_TO_LOCAL (thread, offset), src, n); GUPCR_MEM_BARRIER (); } else { gupcr_gmem_put (thread, offset, src, n); gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "PUT_BLK EXIT S"); } /** * Strict remote memory block copy operation. * Copy the data at the remote address 'src' into the remote memory * destination at the address 'dest'. * * The interface to this procedure is defined by the UPC compiler API. * * @param [in] dest Remote address of destination memory block. * @param [in] src Remote address of source memory block. * @param [in] n Number of bytes to transfer. */ //inline void __copysblk5 (long dthread, size_t doffset, long sthread, size_t soffset, size_t n) { GUPCR_OMP_CHECK (); gupcr_trace (FC_MEM, "COPYBLK ENTER S %d:0x%lx %d:0x%lx %lu", (int) sthread, (long unsigned) soffset, (int) dthread, (long unsigned) doffset, (long unsigned) n); gupcr_assert (dthread < THREADS); gupcr_assert (doffset != 0); gupcr_assert (sthread < THREADS); gupcr_assert (soffset != 0); if (gupcr_pending_strict_put) gupcr_gmem_sync_puts (); if (GUPCR_GMEM_IS_LOCAL (dthread) && GUPCR_GMEM_IS_LOCAL (sthread)) { GUPCR_WRITE_MEM_BARRIER (); memcpy (GUPCR_GMEM_OFF_TO_LOCAL (dthread, doffset), GUPCR_GMEM_OFF_TO_LOCAL (sthread, soffset), n); GUPCR_MEM_BARRIER (); } else if (GUPCR_GMEM_IS_LOCAL (dthread)) { gupcr_gmem_get (GUPCR_GMEM_OFF_TO_LOCAL (dthread, doffset), sthread, soffset, n); gupcr_gmem_sync_gets (); } else if (GUPCR_GMEM_IS_LOCAL (sthread)) { gupcr_gmem_put (dthread, doffset, GUPCR_GMEM_OFF_TO_LOCAL (sthread, soffset), n); gupcr_pending_strict_put = 1; } else { gupcr_gmem_copy (dthread, doffset, sthread, soffset, n); gupcr_pending_strict_put = 1; } gupcr_trace (FC_MEM, "COPY_BLK EXIT S"); } //end lib_inline_access /** @} */
29.21121
79
0.656355
a5a1d02ae56dc5406d609090952790c2cf9269d6
165
c
C
C01/ex00/main0.c
tahaerel/42-Ecole
bce9398f88eb286d4386eae108983a9ec7851102
[ "MIT" ]
null
null
null
C01/ex00/main0.c
tahaerel/42-Ecole
bce9398f88eb286d4386eae108983a9ec7851102
[ "MIT" ]
null
null
null
C01/ex00/main0.c
tahaerel/42-Ecole
bce9398f88eb286d4386eae108983a9ec7851102
[ "MIT" ]
null
null
null
#include <stdio.h> void ft_ft(int *nbr); int main (void) { int *p_nbr; int nbr; nbr = 21; p_nbr = &nbr; ft_ft(p_nbr); printf("%d\n", nbr); return (0); }
9.705882
21
0.569697
9d86ad2e25dca241443d744f416abdcc50016440
6,558
c
C
plugins/out_stackdriver/gce_metadata.c
StevenYCChou/fluent-bit
27b25a16ad5e808b296b44b352d468a5dfde59b1
[ "Apache-2.0" ]
null
null
null
plugins/out_stackdriver/gce_metadata.c
StevenYCChou/fluent-bit
27b25a16ad5e808b296b44b352d468a5dfde59b1
[ "Apache-2.0" ]
null
null
null
plugins/out_stackdriver/gce_metadata.c
StevenYCChou/fluent-bit
27b25a16ad5e808b296b44b352d468a5dfde59b1
[ "Apache-2.0" ]
null
null
null
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019-2020 The Fluent Bit Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <fluent-bit/flb_output_plugin.h> #include <fluent-bit/flb_http_client.h> #include <fluent-bit/flb_pack.h> #include <fluent-bit/flb_utils.h> #include <fluent-bit/flb_time.h> #include <fluent-bit/flb_oauth2.h> #include <msgpack.h> #include "gce_metadata.h" #include "stackdriver.h" #include "stackdriver_conf.h" static int fetch_metadata(struct flb_stackdriver *ctx, struct flb_upstream *upstream, char *uri, char *payload) { int ret; int ret_code; size_t b_sent; struct flb_upstream_conn *metadata_conn; struct flb_http_client *c; /* If runtime test mode is enabled, add test data */ if (ctx->ins->test_mode == FLB_TRUE) { if (strcmp(uri, FLB_STD_METADATA_PROJECT_ID_URI) == 0) { flb_sds_cat(payload, "fluent-bit-test", 9); return 0; } else if (strcmp(uri, FLB_STD_METADATA_ZONE_URI) == 0) { flb_sds_cat(payload, "projects/0123456789/zones/fluent", 32); return 0; } else if (strcmp(uri, FLB_STD_METADATA_INSTANCE_ID_URI) == 0) { flb_sds_cat(payload, "333222111", 9); return 0; } return -1; } /* Get metadata connection */ metadata_conn = flb_upstream_conn_get(upstream); if (!metadata_conn) { flb_plg_error(ctx->ins, "failed to create metadata connection"); return -1; } /* Compose HTTP Client request */ c = flb_http_client(metadata_conn, FLB_HTTP_GET, uri, "", 0, NULL, 0, NULL, 0); flb_http_buffer_size(c, 4096); flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10); flb_http_add_header(c, "Content-Type", 12, "application/text", 16); flb_http_add_header(c, "Metadata-Flavor", 15, "Google", 6); /* Send HTTP request */ ret = flb_http_do(c, &b_sent); /* validate response */ if (ret != 0) { flb_plg_warn(ctx->ins, "http_do=%i", ret); ret_code = -1; } else { /* The request was issued successfully, validate the 'error' field */ flb_plg_debug(ctx->ins, "HTTP Status=%i", c->resp.status); if (c->resp.status == 200) { ret_code = 0; flb_sds_copy(payload, c->resp.payload, c->resp.payload_size); } else { if (c->resp.payload_size > 0) { /* we got an error */ flb_plg_warn(ctx->ins, "error\n%s", c->resp.payload); } else { flb_plg_debug(ctx->ins, "response\n%s", c->resp.payload); } ret_code = -1; } } /* Cleanup */ flb_http_client_destroy(c); flb_upstream_conn_release(metadata_conn); return ret_code; } int gce_metadata_read_token(struct flb_stackdriver *ctx) { int ret; flb_sds_t uri = flb_sds_create(FLB_STD_METADATA_SERVICE_ACCOUNT_URI); flb_sds_t payload = flb_sds_create_size(4096); uri = flb_sds_cat(uri, ctx->client_email, flb_sds_len(ctx->client_email)); uri = flb_sds_cat(uri, "/token", 6); ret = fetch_metadata(ctx, ctx->metadata_u, uri, payload); if (ret != 0) { flb_plg_error(ctx->ins, "can't fetch token from the metadata server"); flb_sds_destroy(payload); flb_sds_destroy(uri); return -1; } ret = flb_oauth2_parse_json_response(payload, flb_sds_len(payload), ctx->o); flb_sds_destroy(payload); flb_sds_destroy(uri); if (ret != 0) { flb_plg_error(ctx->ins, "unable to parse token body"); return -1; } ctx->o->expires = time(NULL) + ctx->o->expires_in; return 0; } int gce_metadata_read_zone(struct flb_stackdriver *ctx) { int ret; int i; int j; int part = 0; flb_sds_t payload = flb_sds_create_size(4096); flb_sds_t zone = NULL; ret = fetch_metadata(ctx, ctx->metadata_u, FLB_STD_METADATA_ZONE_URI, payload); if (ret != 0) { flb_plg_error(ctx->ins, "can't fetch zone from the metadata server"); flb_sds_destroy(payload); return -1; } /* Data returned in the format projects/{project-id}/zones/{name} */ for (i = 0; i < flb_sds_len(payload); ++i) { if (payload[i] == '/') { part++; } if (part == 3) { i++; break; } } if (part != 3) { flb_plg_error(ctx->ins, "wrong format of zone response"); flb_sds_destroy(payload); return -1; } zone = flb_sds_create_size(flb_sds_len(payload) - i); j = 0; while (i != flb_sds_len(payload)) { zone[j] = payload[i]; i++; j++; } zone[j] = '\0'; ctx->zone = flb_sds_create(zone); flb_sds_destroy(zone); flb_sds_destroy(payload); return 0; } int gce_metadata_read_project_id(struct flb_stackdriver *ctx) { int ret; flb_sds_t payload = flb_sds_create_size(4096); ret = fetch_metadata(ctx, ctx->metadata_u, FLB_STD_METADATA_PROJECT_ID_URI, payload); if (ret != 0) { flb_plg_error(ctx->ins, "can't fetch project id from the metadata server"); flb_sds_destroy(payload); return -1; } ctx->project_id = flb_sds_create(payload); flb_sds_destroy(payload); return 0; } int gce_metadata_read_instance_id(struct flb_stackdriver *ctx) { int ret; flb_sds_t payload = flb_sds_create_size(4096); ret = fetch_metadata(ctx, ctx->metadata_u, FLB_STD_METADATA_INSTANCE_ID_URI, payload); if (ret != 0) { flb_plg_error(ctx->ins, "can't fetch instance id from the metadata server"); flb_sds_destroy(payload); return -1; } ctx->instance_id = flb_sds_create(payload); flb_sds_destroy(payload); return 0; }
29.408072
84
0.606587
4f7dd40b54f243d204d3a6f4ef9a747e01355d6a
208
c
C
717-2_erb-2-2.c
TROLLyBUS/timp-717-2_erb
025563a67b88ccbe15ca8b668859d149ad9f04b1
[ "BSD-3-Clause" ]
null
null
null
717-2_erb-2-2.c
TROLLyBUS/timp-717-2_erb
025563a67b88ccbe15ca8b668859d149ad9f04b1
[ "BSD-3-Clause" ]
null
null
null
717-2_erb-2-2.c
TROLLyBUS/timp-717-2_erb
025563a67b88ccbe15ca8b668859d149ad9f04b1
[ "BSD-3-Clause" ]
null
null
null
#include <stdio.h> #include <math.h> int main() { int n, x; int S = 0; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &x); if (i % 2 != 0) { S += pow(x, 3); } } printf("%d", S); }
13
30
0.413462
a032c192ef1d6f0b149c52c13308b4fdc0a750a5
51,633
c
C
drivers/crypto/hisilicon/hpre/hpre_crypto.c
jainsakshi2395/linux
7ccb860232bb83fb60cd6bcf5aaf0c008d903acb
[ "Linux-OpenIB" ]
null
null
null
drivers/crypto/hisilicon/hpre/hpre_crypto.c
jainsakshi2395/linux
7ccb860232bb83fb60cd6bcf5aaf0c008d903acb
[ "Linux-OpenIB" ]
1
2021-01-27T01:29:47.000Z
2021-01-27T01:29:47.000Z
drivers/crypto/hisilicon/hpre/hpre_crypto.c
jainsakshi2395/linux
7ccb860232bb83fb60cd6bcf5aaf0c008d903acb
[ "Linux-OpenIB" ]
null
null
null
// SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2019 HiSilicon Limited. */ #include <crypto/akcipher.h> #include <crypto/curve25519.h> #include <crypto/dh.h> #include <crypto/ecc_curve.h> #include <crypto/ecdh.h> #include <crypto/rng.h> #include <crypto/internal/akcipher.h> #include <crypto/internal/kpp.h> #include <crypto/internal/rsa.h> #include <crypto/kpp.h> #include <crypto/scatterwalk.h> #include <linux/dma-mapping.h> #include <linux/fips.h> #include <linux/module.h> #include <linux/time.h> #include "hpre.h" struct hpre_ctx; #define HPRE_CRYPTO_ALG_PRI 1000 #define HPRE_ALIGN_SZ 64 #define HPRE_BITS_2_BYTES_SHIFT 3 #define HPRE_RSA_512BITS_KSZ 64 #define HPRE_RSA_1536BITS_KSZ 192 #define HPRE_CRT_PRMS 5 #define HPRE_CRT_Q 2 #define HPRE_CRT_P 3 #define HPRE_CRT_INV 4 #define HPRE_DH_G_FLAG 0x02 #define HPRE_TRY_SEND_TIMES 100 #define HPRE_INVLD_REQ_ID (-1) #define HPRE_SQE_ALG_BITS 5 #define HPRE_SQE_DONE_SHIFT 30 #define HPRE_DH_MAX_P_SZ 512 #define HPRE_DFX_SEC_TO_US 1000000 #define HPRE_DFX_US_TO_NS 1000 /* due to nist p521 */ #define HPRE_ECC_MAX_KSZ 66 /* size in bytes of the n prime */ #define HPRE_ECC_NIST_P192_N_SIZE 24 #define HPRE_ECC_NIST_P256_N_SIZE 32 #define HPRE_ECC_NIST_P384_N_SIZE 48 /* size in bytes */ #define HPRE_ECC_HW256_KSZ_B 32 #define HPRE_ECC_HW384_KSZ_B 48 typedef void (*hpre_cb)(struct hpre_ctx *ctx, void *sqe); struct hpre_rsa_ctx { /* low address: e--->n */ char *pubkey; dma_addr_t dma_pubkey; /* low address: d--->n */ char *prikey; dma_addr_t dma_prikey; /* low address: dq->dp->q->p->qinv */ char *crt_prikey; dma_addr_t dma_crt_prikey; struct crypto_akcipher *soft_tfm; }; struct hpre_dh_ctx { /* * If base is g we compute the public key * ya = g^xa mod p; [RFC2631 sec 2.1.1] * else if base if the counterpart public key we * compute the shared secret * ZZ = yb^xa mod p; [RFC2631 sec 2.1.1] * low address: d--->n, please refer to Hisilicon HPRE UM */ char *xa_p; dma_addr_t dma_xa_p; char *g; /* m */ dma_addr_t dma_g; }; struct hpre_ecdh_ctx { /* low address: p->a->k->b */ unsigned char *p; dma_addr_t dma_p; /* low address: x->y */ unsigned char *g; dma_addr_t dma_g; }; struct hpre_curve25519_ctx { /* low address: p->a->k */ unsigned char *p; dma_addr_t dma_p; /* gx coordinate */ unsigned char *g; dma_addr_t dma_g; }; struct hpre_ctx { struct hisi_qp *qp; struct device *dev; struct hpre_asym_request **req_list; struct hpre *hpre; spinlock_t req_lock; unsigned int key_sz; bool crt_g2_mode; struct idr req_idr; union { struct hpre_rsa_ctx rsa; struct hpre_dh_ctx dh; struct hpre_ecdh_ctx ecdh; struct hpre_curve25519_ctx curve25519; }; /* for ecc algorithms */ unsigned int curve_id; }; struct hpre_asym_request { char *src; char *dst; struct hpre_sqe req; struct hpre_ctx *ctx; union { struct akcipher_request *rsa; struct kpp_request *dh; struct kpp_request *ecdh; struct kpp_request *curve25519; } areq; int err; int req_id; hpre_cb cb; struct timespec64 req_time; }; static int hpre_alloc_req_id(struct hpre_ctx *ctx) { unsigned long flags; int id; spin_lock_irqsave(&ctx->req_lock, flags); id = idr_alloc(&ctx->req_idr, NULL, 0, QM_Q_DEPTH, GFP_ATOMIC); spin_unlock_irqrestore(&ctx->req_lock, flags); return id; } static void hpre_free_req_id(struct hpre_ctx *ctx, int req_id) { unsigned long flags; spin_lock_irqsave(&ctx->req_lock, flags); idr_remove(&ctx->req_idr, req_id); spin_unlock_irqrestore(&ctx->req_lock, flags); } static int hpre_add_req_to_ctx(struct hpre_asym_request *hpre_req) { struct hpre_ctx *ctx; struct hpre_dfx *dfx; int id; ctx = hpre_req->ctx; id = hpre_alloc_req_id(ctx); if (unlikely(id < 0)) return -EINVAL; ctx->req_list[id] = hpre_req; hpre_req->req_id = id; dfx = ctx->hpre->debug.dfx; if (atomic64_read(&dfx[HPRE_OVERTIME_THRHLD].value)) ktime_get_ts64(&hpre_req->req_time); return id; } static void hpre_rm_req_from_ctx(struct hpre_asym_request *hpre_req) { struct hpre_ctx *ctx = hpre_req->ctx; int id = hpre_req->req_id; if (hpre_req->req_id >= 0) { hpre_req->req_id = HPRE_INVLD_REQ_ID; ctx->req_list[id] = NULL; hpre_free_req_id(ctx, id); } } static struct hisi_qp *hpre_get_qp_and_start(u8 type) { struct hisi_qp *qp; int ret; qp = hpre_create_qp(type); if (!qp) { pr_err("Can not create hpre qp!\n"); return ERR_PTR(-ENODEV); } ret = hisi_qm_start_qp(qp, 0); if (ret < 0) { hisi_qm_free_qps(&qp, 1); pci_err(qp->qm->pdev, "Can not start qp!\n"); return ERR_PTR(-EINVAL); } return qp; } static int hpre_get_data_dma_addr(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len, int is_src, dma_addr_t *tmp) { struct device *dev = hpre_req->ctx->dev; enum dma_data_direction dma_dir; if (is_src) { hpre_req->src = NULL; dma_dir = DMA_TO_DEVICE; } else { hpre_req->dst = NULL; dma_dir = DMA_FROM_DEVICE; } *tmp = dma_map_single(dev, sg_virt(data), len, dma_dir); if (unlikely(dma_mapping_error(dev, *tmp))) { dev_err(dev, "dma map data err!\n"); return -ENOMEM; } return 0; } static int hpre_prepare_dma_buf(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len, int is_src, dma_addr_t *tmp) { struct hpre_ctx *ctx = hpre_req->ctx; struct device *dev = ctx->dev; void *ptr; int shift; shift = ctx->key_sz - len; if (unlikely(shift < 0)) return -EINVAL; ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, GFP_KERNEL); if (unlikely(!ptr)) return -ENOMEM; if (is_src) { scatterwalk_map_and_copy(ptr + shift, data, 0, len, 0); hpre_req->src = ptr; } else { hpre_req->dst = ptr; } return 0; } static int hpre_hw_data_init(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len, int is_src, int is_dh) { struct hpre_sqe *msg = &hpre_req->req; struct hpre_ctx *ctx = hpre_req->ctx; dma_addr_t tmp = 0; int ret; /* when the data is dh's source, we should format it */ if ((sg_is_last(data) && len == ctx->key_sz) && ((is_dh && !is_src) || !is_dh)) ret = hpre_get_data_dma_addr(hpre_req, data, len, is_src, &tmp); else ret = hpre_prepare_dma_buf(hpre_req, data, len, is_src, &tmp); if (unlikely(ret)) return ret; if (is_src) msg->in = cpu_to_le64(tmp); else msg->out = cpu_to_le64(tmp); return 0; } static void hpre_hw_data_clr_all(struct hpre_ctx *ctx, struct hpre_asym_request *req, struct scatterlist *dst, struct scatterlist *src) { struct device *dev = ctx->dev; struct hpre_sqe *sqe = &req->req; dma_addr_t tmp; tmp = le64_to_cpu(sqe->in); if (unlikely(dma_mapping_error(dev, tmp))) return; if (src) { if (req->src) dma_free_coherent(dev, ctx->key_sz, req->src, tmp); else dma_unmap_single(dev, tmp, ctx->key_sz, DMA_TO_DEVICE); } tmp = le64_to_cpu(sqe->out); if (unlikely(dma_mapping_error(dev, tmp))) return; if (req->dst) { if (dst) scatterwalk_map_and_copy(req->dst, dst, 0, ctx->key_sz, 1); dma_free_coherent(dev, ctx->key_sz, req->dst, tmp); } else { dma_unmap_single(dev, tmp, ctx->key_sz, DMA_FROM_DEVICE); } } static int hpre_alg_res_post_hf(struct hpre_ctx *ctx, struct hpre_sqe *sqe, void **kreq) { struct hpre_asym_request *req; unsigned int err, done, alg; int id; #define HPRE_NO_HW_ERR 0 #define HPRE_HW_TASK_DONE 3 #define HREE_HW_ERR_MASK GENMASK(10, 0) #define HREE_SQE_DONE_MASK GENMASK(1, 0) #define HREE_ALG_TYPE_MASK GENMASK(4, 0) id = (int)le16_to_cpu(sqe->tag); req = ctx->req_list[id]; hpre_rm_req_from_ctx(req); *kreq = req; err = (le32_to_cpu(sqe->dw0) >> HPRE_SQE_ALG_BITS) & HREE_HW_ERR_MASK; done = (le32_to_cpu(sqe->dw0) >> HPRE_SQE_DONE_SHIFT) & HREE_SQE_DONE_MASK; if (likely(err == HPRE_NO_HW_ERR && done == HPRE_HW_TASK_DONE)) return 0; alg = le32_to_cpu(sqe->dw0) & HREE_ALG_TYPE_MASK; dev_err_ratelimited(ctx->dev, "alg[0x%x] error: done[0x%x], etype[0x%x]\n", alg, done, err); return -EINVAL; } static int hpre_ctx_set(struct hpre_ctx *ctx, struct hisi_qp *qp, int qlen) { struct hpre *hpre; if (!ctx || !qp || qlen < 0) return -EINVAL; spin_lock_init(&ctx->req_lock); ctx->qp = qp; ctx->dev = &qp->qm->pdev->dev; hpre = container_of(ctx->qp->qm, struct hpre, qm); ctx->hpre = hpre; ctx->req_list = kcalloc(qlen, sizeof(void *), GFP_KERNEL); if (!ctx->req_list) return -ENOMEM; ctx->key_sz = 0; ctx->crt_g2_mode = false; idr_init(&ctx->req_idr); return 0; } static void hpre_ctx_clear(struct hpre_ctx *ctx, bool is_clear_all) { if (is_clear_all) { idr_destroy(&ctx->req_idr); kfree(ctx->req_list); hisi_qm_free_qps(&ctx->qp, 1); } ctx->crt_g2_mode = false; ctx->key_sz = 0; } static bool hpre_is_bd_timeout(struct hpre_asym_request *req, u64 overtime_thrhld) { struct timespec64 reply_time; u64 time_use_us; ktime_get_ts64(&reply_time); time_use_us = (reply_time.tv_sec - req->req_time.tv_sec) * HPRE_DFX_SEC_TO_US + (reply_time.tv_nsec - req->req_time.tv_nsec) / HPRE_DFX_US_TO_NS; if (time_use_us <= overtime_thrhld) return false; return true; } static void hpre_dh_cb(struct hpre_ctx *ctx, void *resp) { struct hpre_dfx *dfx = ctx->hpre->debug.dfx; struct hpre_asym_request *req; struct kpp_request *areq; u64 overtime_thrhld; int ret; ret = hpre_alg_res_post_hf(ctx, resp, (void **)&req); areq = req->areq.dh; areq->dst_len = ctx->key_sz; overtime_thrhld = atomic64_read(&dfx[HPRE_OVERTIME_THRHLD].value); if (overtime_thrhld && hpre_is_bd_timeout(req, overtime_thrhld)) atomic64_inc(&dfx[HPRE_OVER_THRHLD_CNT].value); hpre_hw_data_clr_all(ctx, req, areq->dst, areq->src); kpp_request_complete(areq, ret); atomic64_inc(&dfx[HPRE_RECV_CNT].value); } static void hpre_rsa_cb(struct hpre_ctx *ctx, void *resp) { struct hpre_dfx *dfx = ctx->hpre->debug.dfx; struct hpre_asym_request *req; struct akcipher_request *areq; u64 overtime_thrhld; int ret; ret = hpre_alg_res_post_hf(ctx, resp, (void **)&req); overtime_thrhld = atomic64_read(&dfx[HPRE_OVERTIME_THRHLD].value); if (overtime_thrhld && hpre_is_bd_timeout(req, overtime_thrhld)) atomic64_inc(&dfx[HPRE_OVER_THRHLD_CNT].value); areq = req->areq.rsa; areq->dst_len = ctx->key_sz; hpre_hw_data_clr_all(ctx, req, areq->dst, areq->src); akcipher_request_complete(areq, ret); atomic64_inc(&dfx[HPRE_RECV_CNT].value); } static void hpre_alg_cb(struct hisi_qp *qp, void *resp) { struct hpre_ctx *ctx = qp->qp_ctx; struct hpre_dfx *dfx = ctx->hpre->debug.dfx; struct hpre_sqe *sqe = resp; struct hpre_asym_request *req = ctx->req_list[le16_to_cpu(sqe->tag)]; if (unlikely(!req)) { atomic64_inc(&dfx[HPRE_INVALID_REQ_CNT].value); return; } req->cb(ctx, resp); } static void hpre_stop_qp_and_put(struct hisi_qp *qp) { hisi_qm_stop_qp(qp); hisi_qm_free_qps(&qp, 1); } static int hpre_ctx_init(struct hpre_ctx *ctx, u8 type) { struct hisi_qp *qp; int ret; qp = hpre_get_qp_and_start(type); if (IS_ERR(qp)) return PTR_ERR(qp); qp->qp_ctx = ctx; qp->req_cb = hpre_alg_cb; ret = hpre_ctx_set(ctx, qp, QM_Q_DEPTH); if (ret) hpre_stop_qp_and_put(qp); return ret; } static int hpre_msg_request_set(struct hpre_ctx *ctx, void *req, bool is_rsa) { struct hpre_asym_request *h_req; struct hpre_sqe *msg; int req_id; void *tmp; if (is_rsa) { struct akcipher_request *akreq = req; if (akreq->dst_len < ctx->key_sz) { akreq->dst_len = ctx->key_sz; return -EOVERFLOW; } tmp = akcipher_request_ctx(akreq); h_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); h_req->cb = hpre_rsa_cb; h_req->areq.rsa = akreq; msg = &h_req->req; memset(msg, 0, sizeof(*msg)); } else { struct kpp_request *kreq = req; if (kreq->dst_len < ctx->key_sz) { kreq->dst_len = ctx->key_sz; return -EOVERFLOW; } tmp = kpp_request_ctx(kreq); h_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); h_req->cb = hpre_dh_cb; h_req->areq.dh = kreq; msg = &h_req->req; memset(msg, 0, sizeof(*msg)); msg->key = cpu_to_le64(ctx->dh.dma_xa_p); } msg->in = cpu_to_le64(DMA_MAPPING_ERROR); msg->out = cpu_to_le64(DMA_MAPPING_ERROR); msg->dw0 |= cpu_to_le32(0x1 << HPRE_SQE_DONE_SHIFT); msg->task_len1 = (ctx->key_sz >> HPRE_BITS_2_BYTES_SHIFT) - 1; h_req->ctx = ctx; req_id = hpre_add_req_to_ctx(h_req); if (req_id < 0) return -EBUSY; msg->tag = cpu_to_le16((u16)req_id); return 0; } static int hpre_send(struct hpre_ctx *ctx, struct hpre_sqe *msg) { struct hpre_dfx *dfx = ctx->hpre->debug.dfx; int ctr = 0; int ret; do { atomic64_inc(&dfx[HPRE_SEND_CNT].value); ret = hisi_qp_send(ctx->qp, msg); if (ret != -EBUSY) break; atomic64_inc(&dfx[HPRE_SEND_BUSY_CNT].value); } while (ctr++ < HPRE_TRY_SEND_TIMES); if (likely(!ret)) return ret; if (ret != -EBUSY) atomic64_inc(&dfx[HPRE_SEND_FAIL_CNT].value); return ret; } static int hpre_dh_compute_value(struct kpp_request *req) { struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); void *tmp = kpp_request_ctx(req); struct hpre_asym_request *hpre_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); struct hpre_sqe *msg = &hpre_req->req; int ret; ret = hpre_msg_request_set(ctx, req, false); if (unlikely(ret)) return ret; if (req->src) { ret = hpre_hw_data_init(hpre_req, req->src, req->src_len, 1, 1); if (unlikely(ret)) goto clear_all; } else { msg->in = cpu_to_le64(ctx->dh.dma_g); } ret = hpre_hw_data_init(hpre_req, req->dst, req->dst_len, 0, 1); if (unlikely(ret)) goto clear_all; if (ctx->crt_g2_mode && !req->src) msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_DH_G2); else msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_DH); /* success */ ret = hpre_send(ctx, msg); if (likely(!ret)) return -EINPROGRESS; clear_all: hpre_rm_req_from_ctx(hpre_req); hpre_hw_data_clr_all(ctx, hpre_req, req->dst, req->src); return ret; } static int hpre_is_dh_params_length_valid(unsigned int key_sz) { #define _HPRE_DH_GRP1 768 #define _HPRE_DH_GRP2 1024 #define _HPRE_DH_GRP5 1536 #define _HPRE_DH_GRP14 2048 #define _HPRE_DH_GRP15 3072 #define _HPRE_DH_GRP16 4096 switch (key_sz) { case _HPRE_DH_GRP1: case _HPRE_DH_GRP2: case _HPRE_DH_GRP5: case _HPRE_DH_GRP14: case _HPRE_DH_GRP15: case _HPRE_DH_GRP16: return 0; default: return -EINVAL; } } static int hpre_dh_set_params(struct hpre_ctx *ctx, struct dh *params) { struct device *dev = ctx->dev; unsigned int sz; if (params->p_size > HPRE_DH_MAX_P_SZ) return -EINVAL; if (hpre_is_dh_params_length_valid(params->p_size << HPRE_BITS_2_BYTES_SHIFT)) return -EINVAL; sz = ctx->key_sz = params->p_size; ctx->dh.xa_p = dma_alloc_coherent(dev, sz << 1, &ctx->dh.dma_xa_p, GFP_KERNEL); if (!ctx->dh.xa_p) return -ENOMEM; memcpy(ctx->dh.xa_p + sz, params->p, sz); /* If g equals 2 don't copy it */ if (params->g_size == 1 && *(char *)params->g == HPRE_DH_G_FLAG) { ctx->crt_g2_mode = true; return 0; } ctx->dh.g = dma_alloc_coherent(dev, sz, &ctx->dh.dma_g, GFP_KERNEL); if (!ctx->dh.g) { dma_free_coherent(dev, sz << 1, ctx->dh.xa_p, ctx->dh.dma_xa_p); ctx->dh.xa_p = NULL; return -ENOMEM; } memcpy(ctx->dh.g + (sz - params->g_size), params->g, params->g_size); return 0; } static void hpre_dh_clear_ctx(struct hpre_ctx *ctx, bool is_clear_all) { struct device *dev = ctx->dev; unsigned int sz = ctx->key_sz; if (is_clear_all) hisi_qm_stop_qp(ctx->qp); if (ctx->dh.g) { dma_free_coherent(dev, sz, ctx->dh.g, ctx->dh.dma_g); ctx->dh.g = NULL; } if (ctx->dh.xa_p) { memzero_explicit(ctx->dh.xa_p, sz); dma_free_coherent(dev, sz << 1, ctx->dh.xa_p, ctx->dh.dma_xa_p); ctx->dh.xa_p = NULL; } hpre_ctx_clear(ctx, is_clear_all); } static int hpre_dh_set_secret(struct crypto_kpp *tfm, const void *buf, unsigned int len) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); struct dh params; int ret; if (crypto_dh_decode_key(buf, len, &params) < 0) return -EINVAL; /* Free old secret if any */ hpre_dh_clear_ctx(ctx, false); ret = hpre_dh_set_params(ctx, &params); if (ret < 0) goto err_clear_ctx; memcpy(ctx->dh.xa_p + (ctx->key_sz - params.key_size), params.key, params.key_size); return 0; err_clear_ctx: hpre_dh_clear_ctx(ctx, false); return ret; } static unsigned int hpre_dh_max_size(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); return ctx->key_sz; } static int hpre_dh_init_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); return hpre_ctx_init(ctx, HPRE_V2_ALG_TYPE); } static void hpre_dh_exit_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); hpre_dh_clear_ctx(ctx, true); } static void hpre_rsa_drop_leading_zeros(const char **ptr, size_t *len) { while (!**ptr && *len) { (*ptr)++; (*len)--; } } static bool hpre_rsa_key_size_is_support(unsigned int len) { unsigned int bits = len << HPRE_BITS_2_BYTES_SHIFT; #define _RSA_1024BITS_KEY_WDTH 1024 #define _RSA_2048BITS_KEY_WDTH 2048 #define _RSA_3072BITS_KEY_WDTH 3072 #define _RSA_4096BITS_KEY_WDTH 4096 switch (bits) { case _RSA_1024BITS_KEY_WDTH: case _RSA_2048BITS_KEY_WDTH: case _RSA_3072BITS_KEY_WDTH: case _RSA_4096BITS_KEY_WDTH: return true; default: return false; } } static int hpre_rsa_enc(struct akcipher_request *req) { struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); void *tmp = akcipher_request_ctx(req); struct hpre_asym_request *hpre_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); struct hpre_sqe *msg = &hpre_req->req; int ret; /* For 512 and 1536 bits key size, use soft tfm instead */ if (ctx->key_sz == HPRE_RSA_512BITS_KSZ || ctx->key_sz == HPRE_RSA_1536BITS_KSZ) { akcipher_request_set_tfm(req, ctx->rsa.soft_tfm); ret = crypto_akcipher_encrypt(req); akcipher_request_set_tfm(req, tfm); return ret; } if (unlikely(!ctx->rsa.pubkey)) return -EINVAL; ret = hpre_msg_request_set(ctx, req, true); if (unlikely(ret)) return ret; msg->dw0 |= cpu_to_le32(HPRE_ALG_NC_NCRT); msg->key = cpu_to_le64(ctx->rsa.dma_pubkey); ret = hpre_hw_data_init(hpre_req, req->src, req->src_len, 1, 0); if (unlikely(ret)) goto clear_all; ret = hpre_hw_data_init(hpre_req, req->dst, req->dst_len, 0, 0); if (unlikely(ret)) goto clear_all; /* success */ ret = hpre_send(ctx, msg); if (likely(!ret)) return -EINPROGRESS; clear_all: hpre_rm_req_from_ctx(hpre_req); hpre_hw_data_clr_all(ctx, hpre_req, req->dst, req->src); return ret; } static int hpre_rsa_dec(struct akcipher_request *req) { struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); void *tmp = akcipher_request_ctx(req); struct hpre_asym_request *hpre_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); struct hpre_sqe *msg = &hpre_req->req; int ret; /* For 512 and 1536 bits key size, use soft tfm instead */ if (ctx->key_sz == HPRE_RSA_512BITS_KSZ || ctx->key_sz == HPRE_RSA_1536BITS_KSZ) { akcipher_request_set_tfm(req, ctx->rsa.soft_tfm); ret = crypto_akcipher_decrypt(req); akcipher_request_set_tfm(req, tfm); return ret; } if (unlikely(!ctx->rsa.prikey)) return -EINVAL; ret = hpre_msg_request_set(ctx, req, true); if (unlikely(ret)) return ret; if (ctx->crt_g2_mode) { msg->key = cpu_to_le64(ctx->rsa.dma_crt_prikey); msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_NC_CRT); } else { msg->key = cpu_to_le64(ctx->rsa.dma_prikey); msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_NC_NCRT); } ret = hpre_hw_data_init(hpre_req, req->src, req->src_len, 1, 0); if (unlikely(ret)) goto clear_all; ret = hpre_hw_data_init(hpre_req, req->dst, req->dst_len, 0, 0); if (unlikely(ret)) goto clear_all; /* success */ ret = hpre_send(ctx, msg); if (likely(!ret)) return -EINPROGRESS; clear_all: hpre_rm_req_from_ctx(hpre_req); hpre_hw_data_clr_all(ctx, hpre_req, req->dst, req->src); return ret; } static int hpre_rsa_set_n(struct hpre_ctx *ctx, const char *value, size_t vlen, bool private) { const char *ptr = value; hpre_rsa_drop_leading_zeros(&ptr, &vlen); ctx->key_sz = vlen; /* if invalid key size provided, we use software tfm */ if (!hpre_rsa_key_size_is_support(ctx->key_sz)) return 0; ctx->rsa.pubkey = dma_alloc_coherent(ctx->dev, vlen << 1, &ctx->rsa.dma_pubkey, GFP_KERNEL); if (!ctx->rsa.pubkey) return -ENOMEM; if (private) { ctx->rsa.prikey = dma_alloc_coherent(ctx->dev, vlen << 1, &ctx->rsa.dma_prikey, GFP_KERNEL); if (!ctx->rsa.prikey) { dma_free_coherent(ctx->dev, vlen << 1, ctx->rsa.pubkey, ctx->rsa.dma_pubkey); ctx->rsa.pubkey = NULL; return -ENOMEM; } memcpy(ctx->rsa.prikey + vlen, ptr, vlen); } memcpy(ctx->rsa.pubkey + vlen, ptr, vlen); /* Using hardware HPRE to do RSA */ return 1; } static int hpre_rsa_set_e(struct hpre_ctx *ctx, const char *value, size_t vlen) { const char *ptr = value; hpre_rsa_drop_leading_zeros(&ptr, &vlen); if (!ctx->key_sz || !vlen || vlen > ctx->key_sz) return -EINVAL; memcpy(ctx->rsa.pubkey + ctx->key_sz - vlen, ptr, vlen); return 0; } static int hpre_rsa_set_d(struct hpre_ctx *ctx, const char *value, size_t vlen) { const char *ptr = value; hpre_rsa_drop_leading_zeros(&ptr, &vlen); if (!ctx->key_sz || !vlen || vlen > ctx->key_sz) return -EINVAL; memcpy(ctx->rsa.prikey + ctx->key_sz - vlen, ptr, vlen); return 0; } static int hpre_crt_para_get(char *para, size_t para_sz, const char *raw, size_t raw_sz) { const char *ptr = raw; size_t len = raw_sz; hpre_rsa_drop_leading_zeros(&ptr, &len); if (!len || len > para_sz) return -EINVAL; memcpy(para + para_sz - len, ptr, len); return 0; } static int hpre_rsa_setkey_crt(struct hpre_ctx *ctx, struct rsa_key *rsa_key) { unsigned int hlf_ksz = ctx->key_sz >> 1; struct device *dev = ctx->dev; u64 offset; int ret; ctx->rsa.crt_prikey = dma_alloc_coherent(dev, hlf_ksz * HPRE_CRT_PRMS, &ctx->rsa.dma_crt_prikey, GFP_KERNEL); if (!ctx->rsa.crt_prikey) return -ENOMEM; ret = hpre_crt_para_get(ctx->rsa.crt_prikey, hlf_ksz, rsa_key->dq, rsa_key->dq_sz); if (ret) goto free_key; offset = hlf_ksz; ret = hpre_crt_para_get(ctx->rsa.crt_prikey + offset, hlf_ksz, rsa_key->dp, rsa_key->dp_sz); if (ret) goto free_key; offset = hlf_ksz * HPRE_CRT_Q; ret = hpre_crt_para_get(ctx->rsa.crt_prikey + offset, hlf_ksz, rsa_key->q, rsa_key->q_sz); if (ret) goto free_key; offset = hlf_ksz * HPRE_CRT_P; ret = hpre_crt_para_get(ctx->rsa.crt_prikey + offset, hlf_ksz, rsa_key->p, rsa_key->p_sz); if (ret) goto free_key; offset = hlf_ksz * HPRE_CRT_INV; ret = hpre_crt_para_get(ctx->rsa.crt_prikey + offset, hlf_ksz, rsa_key->qinv, rsa_key->qinv_sz); if (ret) goto free_key; ctx->crt_g2_mode = true; return 0; free_key: offset = hlf_ksz * HPRE_CRT_PRMS; memzero_explicit(ctx->rsa.crt_prikey, offset); dma_free_coherent(dev, hlf_ksz * HPRE_CRT_PRMS, ctx->rsa.crt_prikey, ctx->rsa.dma_crt_prikey); ctx->rsa.crt_prikey = NULL; ctx->crt_g2_mode = false; return ret; } /* If it is clear all, all the resources of the QP will be cleaned. */ static void hpre_rsa_clear_ctx(struct hpre_ctx *ctx, bool is_clear_all) { unsigned int half_key_sz = ctx->key_sz >> 1; struct device *dev = ctx->dev; if (is_clear_all) hisi_qm_stop_qp(ctx->qp); if (ctx->rsa.pubkey) { dma_free_coherent(dev, ctx->key_sz << 1, ctx->rsa.pubkey, ctx->rsa.dma_pubkey); ctx->rsa.pubkey = NULL; } if (ctx->rsa.crt_prikey) { memzero_explicit(ctx->rsa.crt_prikey, half_key_sz * HPRE_CRT_PRMS); dma_free_coherent(dev, half_key_sz * HPRE_CRT_PRMS, ctx->rsa.crt_prikey, ctx->rsa.dma_crt_prikey); ctx->rsa.crt_prikey = NULL; } if (ctx->rsa.prikey) { memzero_explicit(ctx->rsa.prikey, ctx->key_sz); dma_free_coherent(dev, ctx->key_sz << 1, ctx->rsa.prikey, ctx->rsa.dma_prikey); ctx->rsa.prikey = NULL; } hpre_ctx_clear(ctx, is_clear_all); } /* * we should judge if it is CRT or not, * CRT: return true, N-CRT: return false . */ static bool hpre_is_crt_key(struct rsa_key *key) { u16 len = key->p_sz + key->q_sz + key->dp_sz + key->dq_sz + key->qinv_sz; #define LEN_OF_NCRT_PARA 5 /* N-CRT less than 5 parameters */ return len > LEN_OF_NCRT_PARA; } static int hpre_rsa_setkey(struct hpre_ctx *ctx, const void *key, unsigned int keylen, bool private) { struct rsa_key rsa_key; int ret; hpre_rsa_clear_ctx(ctx, false); if (private) ret = rsa_parse_priv_key(&rsa_key, key, keylen); else ret = rsa_parse_pub_key(&rsa_key, key, keylen); if (ret < 0) return ret; ret = hpre_rsa_set_n(ctx, rsa_key.n, rsa_key.n_sz, private); if (ret <= 0) return ret; if (private) { ret = hpre_rsa_set_d(ctx, rsa_key.d, rsa_key.d_sz); if (ret < 0) goto free; if (hpre_is_crt_key(&rsa_key)) { ret = hpre_rsa_setkey_crt(ctx, &rsa_key); if (ret < 0) goto free; } } ret = hpre_rsa_set_e(ctx, rsa_key.e, rsa_key.e_sz); if (ret < 0) goto free; if ((private && !ctx->rsa.prikey) || !ctx->rsa.pubkey) { ret = -EINVAL; goto free; } return 0; free: hpre_rsa_clear_ctx(ctx, false); return ret; } static int hpre_rsa_setpubkey(struct crypto_akcipher *tfm, const void *key, unsigned int keylen) { struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); int ret; ret = crypto_akcipher_set_pub_key(ctx->rsa.soft_tfm, key, keylen); if (ret) return ret; return hpre_rsa_setkey(ctx, key, keylen, false); } static int hpre_rsa_setprivkey(struct crypto_akcipher *tfm, const void *key, unsigned int keylen) { struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); int ret; ret = crypto_akcipher_set_priv_key(ctx->rsa.soft_tfm, key, keylen); if (ret) return ret; return hpre_rsa_setkey(ctx, key, keylen, true); } static unsigned int hpre_rsa_max_size(struct crypto_akcipher *tfm) { struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); /* For 512 and 1536 bits key size, use soft tfm instead */ if (ctx->key_sz == HPRE_RSA_512BITS_KSZ || ctx->key_sz == HPRE_RSA_1536BITS_KSZ) return crypto_akcipher_maxsize(ctx->rsa.soft_tfm); return ctx->key_sz; } static int hpre_rsa_init_tfm(struct crypto_akcipher *tfm) { struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); int ret; ctx->rsa.soft_tfm = crypto_alloc_akcipher("rsa-generic", 0, 0); if (IS_ERR(ctx->rsa.soft_tfm)) { pr_err("Can not alloc_akcipher!\n"); return PTR_ERR(ctx->rsa.soft_tfm); } ret = hpre_ctx_init(ctx, HPRE_V2_ALG_TYPE); if (ret) crypto_free_akcipher(ctx->rsa.soft_tfm); return ret; } static void hpre_rsa_exit_tfm(struct crypto_akcipher *tfm) { struct hpre_ctx *ctx = akcipher_tfm_ctx(tfm); hpre_rsa_clear_ctx(ctx, true); crypto_free_akcipher(ctx->rsa.soft_tfm); } static void hpre_key_to_big_end(u8 *data, int len) { int i, j; u8 tmp; for (i = 0; i < len / 2; i++) { j = len - i - 1; tmp = data[j]; data[j] = data[i]; data[i] = tmp; } } static void hpre_ecc_clear_ctx(struct hpre_ctx *ctx, bool is_clear_all, bool is_ecdh) { struct device *dev = ctx->dev; unsigned int sz = ctx->key_sz; unsigned int shift = sz << 1; if (is_clear_all) hisi_qm_stop_qp(ctx->qp); if (is_ecdh && ctx->ecdh.p) { /* ecdh: p->a->k->b */ memzero_explicit(ctx->ecdh.p + shift, sz); dma_free_coherent(dev, sz << 3, ctx->ecdh.p, ctx->ecdh.dma_p); ctx->ecdh.p = NULL; } else if (!is_ecdh && ctx->curve25519.p) { /* curve25519: p->a->k */ memzero_explicit(ctx->curve25519.p + shift, sz); dma_free_coherent(dev, sz << 2, ctx->curve25519.p, ctx->curve25519.dma_p); ctx->curve25519.p = NULL; } hpre_ctx_clear(ctx, is_clear_all); } /* * The bits of 192/224/256/384/521 are supported by HPRE, * and convert the bits like: * bits<=256, bits=256; 256<bits<=384, bits=384; 384<bits<=576, bits=576; * If the parameter bit width is insufficient, then we fill in the * high-order zeros by soft, so TASK_LENGTH1 is 0x3/0x5/0x8; */ static unsigned int hpre_ecdh_supported_curve(unsigned short id) { switch (id) { case ECC_CURVE_NIST_P192: case ECC_CURVE_NIST_P256: return HPRE_ECC_HW256_KSZ_B; case ECC_CURVE_NIST_P384: return HPRE_ECC_HW384_KSZ_B; default: break; } return 0; } static void fill_curve_param(void *addr, u64 *param, unsigned int cur_sz, u8 ndigits) { unsigned int sz = cur_sz - (ndigits - 1) * sizeof(u64); u8 i = 0; while (i < ndigits - 1) { memcpy(addr + sizeof(u64) * i, &param[i], sizeof(u64)); i++; } memcpy(addr + sizeof(u64) * i, &param[ndigits - 1], sz); hpre_key_to_big_end((u8 *)addr, cur_sz); } static int hpre_ecdh_fill_curve(struct hpre_ctx *ctx, struct ecdh *params, unsigned int cur_sz) { unsigned int shifta = ctx->key_sz << 1; unsigned int shiftb = ctx->key_sz << 2; void *p = ctx->ecdh.p + ctx->key_sz - cur_sz; void *a = ctx->ecdh.p + shifta - cur_sz; void *b = ctx->ecdh.p + shiftb - cur_sz; void *x = ctx->ecdh.g + ctx->key_sz - cur_sz; void *y = ctx->ecdh.g + shifta - cur_sz; const struct ecc_curve *curve = ecc_get_curve(ctx->curve_id); char *n; if (unlikely(!curve)) return -EINVAL; n = kzalloc(ctx->key_sz, GFP_KERNEL); if (!n) return -ENOMEM; fill_curve_param(p, curve->p, cur_sz, curve->g.ndigits); fill_curve_param(a, curve->a, cur_sz, curve->g.ndigits); fill_curve_param(b, curve->b, cur_sz, curve->g.ndigits); fill_curve_param(x, curve->g.x, cur_sz, curve->g.ndigits); fill_curve_param(y, curve->g.y, cur_sz, curve->g.ndigits); fill_curve_param(n, curve->n, cur_sz, curve->g.ndigits); if (params->key_size == cur_sz && memcmp(params->key, n, cur_sz) >= 0) { kfree(n); return -EINVAL; } kfree(n); return 0; } static unsigned int hpre_ecdh_get_curvesz(unsigned short id) { switch (id) { case ECC_CURVE_NIST_P192: return HPRE_ECC_NIST_P192_N_SIZE; case ECC_CURVE_NIST_P256: return HPRE_ECC_NIST_P256_N_SIZE; case ECC_CURVE_NIST_P384: return HPRE_ECC_NIST_P384_N_SIZE; default: break; } return 0; } static int hpre_ecdh_set_param(struct hpre_ctx *ctx, struct ecdh *params) { struct device *dev = ctx->dev; unsigned int sz, shift, curve_sz; int ret; ctx->key_sz = hpre_ecdh_supported_curve(ctx->curve_id); if (!ctx->key_sz) return -EINVAL; curve_sz = hpre_ecdh_get_curvesz(ctx->curve_id); if (!curve_sz || params->key_size > curve_sz) return -EINVAL; sz = ctx->key_sz; if (!ctx->ecdh.p) { ctx->ecdh.p = dma_alloc_coherent(dev, sz << 3, &ctx->ecdh.dma_p, GFP_KERNEL); if (!ctx->ecdh.p) return -ENOMEM; } shift = sz << 2; ctx->ecdh.g = ctx->ecdh.p + shift; ctx->ecdh.dma_g = ctx->ecdh.dma_p + shift; ret = hpre_ecdh_fill_curve(ctx, params, curve_sz); if (ret) { dev_err(dev, "failed to fill curve_param, ret = %d!\n", ret); dma_free_coherent(dev, sz << 3, ctx->ecdh.p, ctx->ecdh.dma_p); ctx->ecdh.p = NULL; return ret; } return 0; } static bool hpre_key_is_zero(char *key, unsigned short key_sz) { int i; for (i = 0; i < key_sz; i++) if (key[i]) return false; return true; } static int ecdh_gen_privkey(struct hpre_ctx *ctx, struct ecdh *params) { struct device *dev = ctx->dev; int ret; ret = crypto_get_default_rng(); if (ret) { dev_err(dev, "failed to get default rng, ret = %d!\n", ret); return ret; } ret = crypto_rng_get_bytes(crypto_default_rng, (u8 *)params->key, params->key_size); crypto_put_default_rng(); if (ret) dev_err(dev, "failed to get rng, ret = %d!\n", ret); return ret; } static int hpre_ecdh_set_secret(struct crypto_kpp *tfm, const void *buf, unsigned int len) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); struct device *dev = ctx->dev; char key[HPRE_ECC_MAX_KSZ]; unsigned int sz, sz_shift; struct ecdh params; int ret; if (crypto_ecdh_decode_key(buf, len, &params) < 0) { dev_err(dev, "failed to decode ecdh key!\n"); return -EINVAL; } /* Use stdrng to generate private key */ if (!params.key || !params.key_size) { params.key = key; params.key_size = hpre_ecdh_get_curvesz(ctx->curve_id); ret = ecdh_gen_privkey(ctx, &params); if (ret) return ret; } if (hpre_key_is_zero(params.key, params.key_size)) { dev_err(dev, "Invalid hpre key!\n"); return -EINVAL; } hpre_ecc_clear_ctx(ctx, false, true); ret = hpre_ecdh_set_param(ctx, &params); if (ret < 0) { dev_err(dev, "failed to set hpre param, ret = %d!\n", ret); return ret; } sz = ctx->key_sz; sz_shift = (sz << 1) + sz - params.key_size; memcpy(ctx->ecdh.p + sz_shift, params.key, params.key_size); return 0; } static void hpre_ecdh_hw_data_clr_all(struct hpre_ctx *ctx, struct hpre_asym_request *req, struct scatterlist *dst, struct scatterlist *src) { struct device *dev = ctx->dev; struct hpre_sqe *sqe = &req->req; dma_addr_t dma; dma = le64_to_cpu(sqe->in); if (unlikely(dma_mapping_error(dev, dma))) return; if (src && req->src) dma_free_coherent(dev, ctx->key_sz << 2, req->src, dma); dma = le64_to_cpu(sqe->out); if (unlikely(dma_mapping_error(dev, dma))) return; if (req->dst) dma_free_coherent(dev, ctx->key_sz << 1, req->dst, dma); if (dst) dma_unmap_single(dev, dma, ctx->key_sz << 1, DMA_FROM_DEVICE); } static void hpre_ecdh_cb(struct hpre_ctx *ctx, void *resp) { unsigned int curve_sz = hpre_ecdh_get_curvesz(ctx->curve_id); struct hpre_dfx *dfx = ctx->hpre->debug.dfx; struct hpre_asym_request *req = NULL; struct kpp_request *areq; u64 overtime_thrhld; char *p; int ret; ret = hpre_alg_res_post_hf(ctx, resp, (void **)&req); areq = req->areq.ecdh; areq->dst_len = ctx->key_sz << 1; overtime_thrhld = atomic64_read(&dfx[HPRE_OVERTIME_THRHLD].value); if (overtime_thrhld && hpre_is_bd_timeout(req, overtime_thrhld)) atomic64_inc(&dfx[HPRE_OVER_THRHLD_CNT].value); p = sg_virt(areq->dst); memmove(p, p + ctx->key_sz - curve_sz, curve_sz); memmove(p + curve_sz, p + areq->dst_len - curve_sz, curve_sz); hpre_ecdh_hw_data_clr_all(ctx, req, areq->dst, areq->src); kpp_request_complete(areq, ret); atomic64_inc(&dfx[HPRE_RECV_CNT].value); } static int hpre_ecdh_msg_request_set(struct hpre_ctx *ctx, struct kpp_request *req) { struct hpre_asym_request *h_req; struct hpre_sqe *msg; int req_id; void *tmp; if (req->dst_len < ctx->key_sz << 1) { req->dst_len = ctx->key_sz << 1; return -EINVAL; } tmp = kpp_request_ctx(req); h_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); h_req->cb = hpre_ecdh_cb; h_req->areq.ecdh = req; msg = &h_req->req; memset(msg, 0, sizeof(*msg)); msg->in = cpu_to_le64(DMA_MAPPING_ERROR); msg->out = cpu_to_le64(DMA_MAPPING_ERROR); msg->key = cpu_to_le64(ctx->ecdh.dma_p); msg->dw0 |= cpu_to_le32(0x1U << HPRE_SQE_DONE_SHIFT); msg->task_len1 = (ctx->key_sz >> HPRE_BITS_2_BYTES_SHIFT) - 1; h_req->ctx = ctx; req_id = hpre_add_req_to_ctx(h_req); if (req_id < 0) return -EBUSY; msg->tag = cpu_to_le16((u16)req_id); return 0; } static int hpre_ecdh_src_data_init(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len) { struct hpre_sqe *msg = &hpre_req->req; struct hpre_ctx *ctx = hpre_req->ctx; struct device *dev = ctx->dev; unsigned int tmpshift; dma_addr_t dma = 0; void *ptr; int shift; /* Src_data include gx and gy. */ shift = ctx->key_sz - (len >> 1); if (unlikely(shift < 0)) return -EINVAL; ptr = dma_alloc_coherent(dev, ctx->key_sz << 2, &dma, GFP_KERNEL); if (unlikely(!ptr)) return -ENOMEM; tmpshift = ctx->key_sz << 1; scatterwalk_map_and_copy(ptr + tmpshift, data, 0, len, 0); memcpy(ptr + shift, ptr + tmpshift, len >> 1); memcpy(ptr + ctx->key_sz + shift, ptr + tmpshift + (len >> 1), len >> 1); hpre_req->src = ptr; msg->in = cpu_to_le64(dma); return 0; } static int hpre_ecdh_dst_data_init(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len) { struct hpre_sqe *msg = &hpre_req->req; struct hpre_ctx *ctx = hpre_req->ctx; struct device *dev = ctx->dev; dma_addr_t dma; if (unlikely(!data || !sg_is_last(data) || len != ctx->key_sz << 1)) { dev_err(dev, "data or data length is illegal!\n"); return -EINVAL; } hpre_req->dst = NULL; dma = dma_map_single(dev, sg_virt(data), len, DMA_FROM_DEVICE); if (unlikely(dma_mapping_error(dev, dma))) { dev_err(dev, "dma map data err!\n"); return -ENOMEM; } msg->out = cpu_to_le64(dma); return 0; } static int hpre_ecdh_compute_value(struct kpp_request *req) { struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); struct device *dev = ctx->dev; void *tmp = kpp_request_ctx(req); struct hpre_asym_request *hpre_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); struct hpre_sqe *msg = &hpre_req->req; int ret; ret = hpre_ecdh_msg_request_set(ctx, req); if (unlikely(ret)) { dev_err(dev, "failed to set ecdh request, ret = %d!\n", ret); return ret; } if (req->src) { ret = hpre_ecdh_src_data_init(hpre_req, req->src, req->src_len); if (unlikely(ret)) { dev_err(dev, "failed to init src data, ret = %d!\n", ret); goto clear_all; } } else { msg->in = cpu_to_le64(ctx->ecdh.dma_g); } ret = hpre_ecdh_dst_data_init(hpre_req, req->dst, req->dst_len); if (unlikely(ret)) { dev_err(dev, "failed to init dst data, ret = %d!\n", ret); goto clear_all; } msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_ECC_MUL); ret = hpre_send(ctx, msg); if (likely(!ret)) return -EINPROGRESS; clear_all: hpre_rm_req_from_ctx(hpre_req); hpre_ecdh_hw_data_clr_all(ctx, hpre_req, req->dst, req->src); return ret; } static unsigned int hpre_ecdh_max_size(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); /* max size is the pub_key_size, include x and y */ return ctx->key_sz << 1; } static int hpre_ecdh_nist_p192_init_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); ctx->curve_id = ECC_CURVE_NIST_P192; return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE); } static int hpre_ecdh_nist_p256_init_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); ctx->curve_id = ECC_CURVE_NIST_P256; return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE); } static int hpre_ecdh_nist_p384_init_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); ctx->curve_id = ECC_CURVE_NIST_P384; return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE); } static void hpre_ecdh_exit_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); hpre_ecc_clear_ctx(ctx, true, true); } static void hpre_curve25519_fill_curve(struct hpre_ctx *ctx, const void *buf, unsigned int len) { u8 secret[CURVE25519_KEY_SIZE] = { 0 }; unsigned int sz = ctx->key_sz; const struct ecc_curve *curve; unsigned int shift = sz << 1; void *p; /* * The key from 'buf' is in little-endian, we should preprocess it as * the description in rfc7748: "k[0] &= 248, k[31] &= 127, k[31] |= 64", * then convert it to big endian. Only in this way, the result can be * the same as the software curve-25519 that exists in crypto. */ memcpy(secret, buf, len); curve25519_clamp_secret(secret); hpre_key_to_big_end(secret, CURVE25519_KEY_SIZE); p = ctx->curve25519.p + sz - len; curve = ecc_get_curve25519(); /* fill curve parameters */ fill_curve_param(p, curve->p, len, curve->g.ndigits); fill_curve_param(p + sz, curve->a, len, curve->g.ndigits); memcpy(p + shift, secret, len); fill_curve_param(p + shift + sz, curve->g.x, len, curve->g.ndigits); memzero_explicit(secret, CURVE25519_KEY_SIZE); } static int hpre_curve25519_set_param(struct hpre_ctx *ctx, const void *buf, unsigned int len) { struct device *dev = ctx->dev; unsigned int sz = ctx->key_sz; unsigned int shift = sz << 1; /* p->a->k->gx */ if (!ctx->curve25519.p) { ctx->curve25519.p = dma_alloc_coherent(dev, sz << 2, &ctx->curve25519.dma_p, GFP_KERNEL); if (!ctx->curve25519.p) return -ENOMEM; } ctx->curve25519.g = ctx->curve25519.p + shift + sz; ctx->curve25519.dma_g = ctx->curve25519.dma_p + shift + sz; hpre_curve25519_fill_curve(ctx, buf, len); return 0; } static int hpre_curve25519_set_secret(struct crypto_kpp *tfm, const void *buf, unsigned int len) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); struct device *dev = ctx->dev; int ret = -EINVAL; if (len != CURVE25519_KEY_SIZE || !crypto_memneq(buf, curve25519_null_point, CURVE25519_KEY_SIZE)) { dev_err(dev, "key is null or key len is not 32bytes!\n"); return ret; } /* Free old secret if any */ hpre_ecc_clear_ctx(ctx, false, false); ctx->key_sz = CURVE25519_KEY_SIZE; ret = hpre_curve25519_set_param(ctx, buf, CURVE25519_KEY_SIZE); if (ret) { dev_err(dev, "failed to set curve25519 param, ret = %d!\n", ret); hpre_ecc_clear_ctx(ctx, false, false); return ret; } return 0; } static void hpre_curve25519_hw_data_clr_all(struct hpre_ctx *ctx, struct hpre_asym_request *req, struct scatterlist *dst, struct scatterlist *src) { struct device *dev = ctx->dev; struct hpre_sqe *sqe = &req->req; dma_addr_t dma; dma = le64_to_cpu(sqe->in); if (unlikely(dma_mapping_error(dev, dma))) return; if (src && req->src) dma_free_coherent(dev, ctx->key_sz, req->src, dma); dma = le64_to_cpu(sqe->out); if (unlikely(dma_mapping_error(dev, dma))) return; if (req->dst) dma_free_coherent(dev, ctx->key_sz, req->dst, dma); if (dst) dma_unmap_single(dev, dma, ctx->key_sz, DMA_FROM_DEVICE); } static void hpre_curve25519_cb(struct hpre_ctx *ctx, void *resp) { struct hpre_dfx *dfx = ctx->hpre->debug.dfx; struct hpre_asym_request *req = NULL; struct kpp_request *areq; u64 overtime_thrhld; int ret; ret = hpre_alg_res_post_hf(ctx, resp, (void **)&req); areq = req->areq.curve25519; areq->dst_len = ctx->key_sz; overtime_thrhld = atomic64_read(&dfx[HPRE_OVERTIME_THRHLD].value); if (overtime_thrhld && hpre_is_bd_timeout(req, overtime_thrhld)) atomic64_inc(&dfx[HPRE_OVER_THRHLD_CNT].value); hpre_key_to_big_end(sg_virt(areq->dst), CURVE25519_KEY_SIZE); hpre_curve25519_hw_data_clr_all(ctx, req, areq->dst, areq->src); kpp_request_complete(areq, ret); atomic64_inc(&dfx[HPRE_RECV_CNT].value); } static int hpre_curve25519_msg_request_set(struct hpre_ctx *ctx, struct kpp_request *req) { struct hpre_asym_request *h_req; struct hpre_sqe *msg; int req_id; void *tmp; if (unlikely(req->dst_len < ctx->key_sz)) { req->dst_len = ctx->key_sz; return -EINVAL; } tmp = kpp_request_ctx(req); h_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); h_req->cb = hpre_curve25519_cb; h_req->areq.curve25519 = req; msg = &h_req->req; memset(msg, 0, sizeof(*msg)); msg->in = cpu_to_le64(DMA_MAPPING_ERROR); msg->out = cpu_to_le64(DMA_MAPPING_ERROR); msg->key = cpu_to_le64(ctx->curve25519.dma_p); msg->dw0 |= cpu_to_le32(0x1U << HPRE_SQE_DONE_SHIFT); msg->task_len1 = (ctx->key_sz >> HPRE_BITS_2_BYTES_SHIFT) - 1; h_req->ctx = ctx; req_id = hpre_add_req_to_ctx(h_req); if (req_id < 0) return -EBUSY; msg->tag = cpu_to_le16((u16)req_id); return 0; } static void hpre_curve25519_src_modulo_p(u8 *ptr) { int i; for (i = 0; i < CURVE25519_KEY_SIZE - 1; i++) ptr[i] = 0; /* The modulus is ptr's last byte minus '0xed'(last byte of p) */ ptr[i] -= 0xed; } static int hpre_curve25519_src_init(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len) { struct hpre_sqe *msg = &hpre_req->req; struct hpre_ctx *ctx = hpre_req->ctx; struct device *dev = ctx->dev; u8 p[CURVE25519_KEY_SIZE] = { 0 }; const struct ecc_curve *curve; dma_addr_t dma = 0; u8 *ptr; if (len != CURVE25519_KEY_SIZE) { dev_err(dev, "sourc_data len is not 32bytes, len = %u!\n", len); return -EINVAL; } ptr = dma_alloc_coherent(dev, ctx->key_sz, &dma, GFP_KERNEL); if (unlikely(!ptr)) return -ENOMEM; scatterwalk_map_and_copy(ptr, data, 0, len, 0); if (!crypto_memneq(ptr, curve25519_null_point, CURVE25519_KEY_SIZE)) { dev_err(dev, "gx is null!\n"); goto err; } /* * Src_data(gx) is in little-endian order, MSB in the final byte should * be masked as described in RFC7748, then transform it to big-endian * form, then hisi_hpre can use the data. */ ptr[31] &= 0x7f; hpre_key_to_big_end(ptr, CURVE25519_KEY_SIZE); curve = ecc_get_curve25519(); fill_curve_param(p, curve->p, CURVE25519_KEY_SIZE, curve->g.ndigits); /* * When src_data equals (2^255 - 19) ~ (2^255 - 1), it is out of p, * we get its modulus to p, and then use it. */ if (memcmp(ptr, p, ctx->key_sz) == 0) { dev_err(dev, "gx is p!\n"); return -EINVAL; } else if (memcmp(ptr, p, ctx->key_sz) > 0) { hpre_curve25519_src_modulo_p(ptr); } hpre_req->src = ptr; msg->in = cpu_to_le64(dma); return 0; err: dma_free_coherent(dev, ctx->key_sz, ptr, dma); return -EINVAL; } static int hpre_curve25519_dst_init(struct hpre_asym_request *hpre_req, struct scatterlist *data, unsigned int len) { struct hpre_sqe *msg = &hpre_req->req; struct hpre_ctx *ctx = hpre_req->ctx; struct device *dev = ctx->dev; dma_addr_t dma; if (!data || !sg_is_last(data) || len != ctx->key_sz) { dev_err(dev, "data or data length is illegal!\n"); return -EINVAL; } hpre_req->dst = NULL; dma = dma_map_single(dev, sg_virt(data), len, DMA_FROM_DEVICE); if (unlikely(dma_mapping_error(dev, dma))) { dev_err(dev, "dma map data err!\n"); return -ENOMEM; } msg->out = cpu_to_le64(dma); return 0; } static int hpre_curve25519_compute_value(struct kpp_request *req) { struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); struct device *dev = ctx->dev; void *tmp = kpp_request_ctx(req); struct hpre_asym_request *hpre_req = PTR_ALIGN(tmp, HPRE_ALIGN_SZ); struct hpre_sqe *msg = &hpre_req->req; int ret; ret = hpre_curve25519_msg_request_set(ctx, req); if (unlikely(ret)) { dev_err(dev, "failed to set curve25519 request, ret = %d!\n", ret); return ret; } if (req->src) { ret = hpre_curve25519_src_init(hpre_req, req->src, req->src_len); if (unlikely(ret)) { dev_err(dev, "failed to init src data, ret = %d!\n", ret); goto clear_all; } } else { msg->in = cpu_to_le64(ctx->curve25519.dma_g); } ret = hpre_curve25519_dst_init(hpre_req, req->dst, req->dst_len); if (unlikely(ret)) { dev_err(dev, "failed to init dst data, ret = %d!\n", ret); goto clear_all; } msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | HPRE_ALG_CURVE25519_MUL); ret = hpre_send(ctx, msg); if (likely(!ret)) return -EINPROGRESS; clear_all: hpre_rm_req_from_ctx(hpre_req); hpre_curve25519_hw_data_clr_all(ctx, hpre_req, req->dst, req->src); return ret; } static unsigned int hpre_curve25519_max_size(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); return ctx->key_sz; } static int hpre_curve25519_init_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); return hpre_ctx_init(ctx, HPRE_V3_ECC_ALG_TYPE); } static void hpre_curve25519_exit_tfm(struct crypto_kpp *tfm) { struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); hpre_ecc_clear_ctx(ctx, true, false); } static struct akcipher_alg rsa = { .sign = hpre_rsa_dec, .verify = hpre_rsa_enc, .encrypt = hpre_rsa_enc, .decrypt = hpre_rsa_dec, .set_pub_key = hpre_rsa_setpubkey, .set_priv_key = hpre_rsa_setprivkey, .max_size = hpre_rsa_max_size, .init = hpre_rsa_init_tfm, .exit = hpre_rsa_exit_tfm, .reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ, .base = { .cra_ctxsize = sizeof(struct hpre_ctx), .cra_priority = HPRE_CRYPTO_ALG_PRI, .cra_name = "rsa", .cra_driver_name = "hpre-rsa", .cra_module = THIS_MODULE, }, }; static struct kpp_alg dh = { .set_secret = hpre_dh_set_secret, .generate_public_key = hpre_dh_compute_value, .compute_shared_secret = hpre_dh_compute_value, .max_size = hpre_dh_max_size, .init = hpre_dh_init_tfm, .exit = hpre_dh_exit_tfm, .reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ, .base = { .cra_ctxsize = sizeof(struct hpre_ctx), .cra_priority = HPRE_CRYPTO_ALG_PRI, .cra_name = "dh", .cra_driver_name = "hpre-dh", .cra_module = THIS_MODULE, }, }; static struct kpp_alg ecdh_nist_p192 = { .set_secret = hpre_ecdh_set_secret, .generate_public_key = hpre_ecdh_compute_value, .compute_shared_secret = hpre_ecdh_compute_value, .max_size = hpre_ecdh_max_size, .init = hpre_ecdh_nist_p192_init_tfm, .exit = hpre_ecdh_exit_tfm, .reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ, .base = { .cra_ctxsize = sizeof(struct hpre_ctx), .cra_priority = HPRE_CRYPTO_ALG_PRI, .cra_name = "ecdh-nist-p192", .cra_driver_name = "hpre-ecdh-nist-p192", .cra_module = THIS_MODULE, }, }; static struct kpp_alg ecdh_nist_p256 = { .set_secret = hpre_ecdh_set_secret, .generate_public_key = hpre_ecdh_compute_value, .compute_shared_secret = hpre_ecdh_compute_value, .max_size = hpre_ecdh_max_size, .init = hpre_ecdh_nist_p256_init_tfm, .exit = hpre_ecdh_exit_tfm, .reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ, .base = { .cra_ctxsize = sizeof(struct hpre_ctx), .cra_priority = HPRE_CRYPTO_ALG_PRI, .cra_name = "ecdh-nist-p256", .cra_driver_name = "hpre-ecdh-nist-p256", .cra_module = THIS_MODULE, }, }; static struct kpp_alg ecdh_nist_p384 = { .set_secret = hpre_ecdh_set_secret, .generate_public_key = hpre_ecdh_compute_value, .compute_shared_secret = hpre_ecdh_compute_value, .max_size = hpre_ecdh_max_size, .init = hpre_ecdh_nist_p384_init_tfm, .exit = hpre_ecdh_exit_tfm, .reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ, .base = { .cra_ctxsize = sizeof(struct hpre_ctx), .cra_priority = HPRE_CRYPTO_ALG_PRI, .cra_name = "ecdh-nist-p384", .cra_driver_name = "hpre-ecdh-nist-p384", .cra_module = THIS_MODULE, }, }; static struct kpp_alg curve25519_alg = { .set_secret = hpre_curve25519_set_secret, .generate_public_key = hpre_curve25519_compute_value, .compute_shared_secret = hpre_curve25519_compute_value, .max_size = hpre_curve25519_max_size, .init = hpre_curve25519_init_tfm, .exit = hpre_curve25519_exit_tfm, .reqsize = sizeof(struct hpre_asym_request) + HPRE_ALIGN_SZ, .base = { .cra_ctxsize = sizeof(struct hpre_ctx), .cra_priority = HPRE_CRYPTO_ALG_PRI, .cra_name = "curve25519", .cra_driver_name = "hpre-curve25519", .cra_module = THIS_MODULE, }, }; static int hpre_register_ecdh(void) { int ret; ret = crypto_register_kpp(&ecdh_nist_p192); if (ret) return ret; ret = crypto_register_kpp(&ecdh_nist_p256); if (ret) goto unregister_ecdh_p192; ret = crypto_register_kpp(&ecdh_nist_p384); if (ret) goto unregister_ecdh_p256; return 0; unregister_ecdh_p256: crypto_unregister_kpp(&ecdh_nist_p256); unregister_ecdh_p192: crypto_unregister_kpp(&ecdh_nist_p192); return ret; } static void hpre_unregister_ecdh(void) { crypto_unregister_kpp(&ecdh_nist_p384); crypto_unregister_kpp(&ecdh_nist_p256); crypto_unregister_kpp(&ecdh_nist_p192); } int hpre_algs_register(struct hisi_qm *qm) { int ret; rsa.base.cra_flags = 0; ret = crypto_register_akcipher(&rsa); if (ret) return ret; ret = crypto_register_kpp(&dh); if (ret) goto unreg_rsa; if (qm->ver >= QM_HW_V3) { ret = hpre_register_ecdh(); if (ret) goto unreg_dh; ret = crypto_register_kpp(&curve25519_alg); if (ret) goto unreg_ecdh; } return 0; unreg_ecdh: hpre_unregister_ecdh(); unreg_dh: crypto_unregister_kpp(&dh); unreg_rsa: crypto_unregister_akcipher(&rsa); return ret; } void hpre_algs_unregister(struct hisi_qm *qm) { if (qm->ver >= QM_HW_V3) { crypto_unregister_kpp(&curve25519_alg); hpre_unregister_ecdh(); } crypto_unregister_kpp(&dh); crypto_unregister_akcipher(&rsa); }
24.004184
85
0.701857
53bf07f028729cd612cb1771cf6694df7aca75ab
4,928
h
C
include/retdec/llvmir2hll/hll/bir_writer.h
Andrik-555/retdec
1ac63a520da02912daf836b924f41d95b1b5fa10
[ "MIT", "BSD-3-Clause" ]
1
2021-07-04T16:14:07.000Z
2021-07-04T16:14:07.000Z
include/retdec/llvmir2hll/hll/bir_writer.h
Andrik-555/retdec
1ac63a520da02912daf836b924f41d95b1b5fa10
[ "MIT", "BSD-3-Clause" ]
null
null
null
include/retdec/llvmir2hll/hll/bir_writer.h
Andrik-555/retdec
1ac63a520da02912daf836b924f41d95b1b5fa10
[ "MIT", "BSD-3-Clause" ]
null
null
null
/** * @file include/retdec/llvmir2hll/hll/bir_writer.h * @brief Class for writing BIR to stdout. * @copyright (c) 2018 Avast Software, licensed under the MIT license */ #ifndef RETDEC_LLVMIR2HLL_HLL_BIR_WRITER_H #define RETDEC_LLVMIR2HLL_HLL_BIR_WRITER_H #include <cstddef> #include <string> #include <sstream> #include "retdec/llvmir2hll/ir/module.h" #include "retdec/llvmir2hll/support/smart_ptr.h" #include "retdec/llvmir2hll/support/types.h" #include "retdec/llvmir2hll/support/visitor.h" namespace retdec { namespace llvmir2hll { class BIRWriter: public Visitor { public: BIRWriter(); virtual ~BIRWriter() override; void emit(ShPtr<Module> m, const std::string& fileName = ""); protected: void emitGlobals(); void emitFunctions(); void emitIndent(unsigned indent); void emitCurrentIndent(); void emitLabel(ShPtr<Statement> stmt); public: virtual void visit(ShPtr<GlobalVarDef> varDef) override; virtual void visit(ShPtr<Function> func) override; // Statements virtual void visit(ShPtr<AssignStmt> stmt) override; virtual void visit(ShPtr<BreakStmt> stmt) override; virtual void visit(ShPtr<CallStmt> stmt) override; virtual void visit(ShPtr<ContinueStmt> stmt) override; virtual void visit(ShPtr<EmptyStmt> stmt) override; virtual void visit(ShPtr<ForLoopStmt> stmt) override; virtual void visit(ShPtr<UForLoopStmt> stmt) override; virtual void visit(ShPtr<GotoStmt> stmt) override; virtual void visit(ShPtr<IfStmt> stmt) override; virtual void visit(ShPtr<ReturnStmt> stmt) override; virtual void visit(ShPtr<SwitchStmt> stmt) override; virtual void visit(ShPtr<UnreachableStmt> stmt) override; virtual void visit(ShPtr<VarDefStmt> stmt) override; virtual void visit(ShPtr<WhileLoopStmt> stmt) override; // Expressions virtual void visit(ShPtr<AddOpExpr> expr) override; virtual void visit(ShPtr<AddressOpExpr> expr) override; virtual void visit(ShPtr<AndOpExpr> expr) override; virtual void visit(ShPtr<ArrayIndexOpExpr> expr) override; virtual void visit(ShPtr<AssignOpExpr> expr) override; virtual void visit(ShPtr<BitAndOpExpr> expr) override; virtual void visit(ShPtr<BitOrOpExpr> expr) override; virtual void visit(ShPtr<BitShlOpExpr> expr) override; virtual void visit(ShPtr<BitShrOpExpr> expr) override; virtual void visit(ShPtr<BitXorOpExpr> expr) override; virtual void visit(ShPtr<CallExpr> expr) override; virtual void visit(ShPtr<CommaOpExpr> expr) override; virtual void visit(ShPtr<DerefOpExpr> expr) override; virtual void visit(ShPtr<DivOpExpr> expr) override; virtual void visit(ShPtr<EqOpExpr> expr) override; virtual void visit(ShPtr<GtEqOpExpr> expr) override; virtual void visit(ShPtr<GtOpExpr> expr) override; virtual void visit(ShPtr<LtEqOpExpr> expr) override; virtual void visit(ShPtr<LtOpExpr> expr) override; virtual void visit(ShPtr<ModOpExpr> expr) override; virtual void visit(ShPtr<MulOpExpr> expr) override; virtual void visit(ShPtr<NegOpExpr> expr) override; virtual void visit(ShPtr<NeqOpExpr> expr) override; virtual void visit(ShPtr<NotOpExpr> expr) override; virtual void visit(ShPtr<OrOpExpr> expr) override; virtual void visit(ShPtr<StructIndexOpExpr> expr) override; virtual void visit(ShPtr<SubOpExpr> expr) override; virtual void visit(ShPtr<TernaryOpExpr> expr) override; virtual void visit(ShPtr<Variable> var) override; // Casts virtual void visit(ShPtr<BitCastExpr> expr) override; virtual void visit(ShPtr<ExtCastExpr> expr) override; virtual void visit(ShPtr<FPToIntCastExpr> expr) override; virtual void visit(ShPtr<IntToFPCastExpr> expr) override; virtual void visit(ShPtr<IntToPtrCastExpr> expr) override; virtual void visit(ShPtr<PtrToIntCastExpr> expr) override; virtual void visit(ShPtr<TruncCastExpr> expr) override; // Constants virtual void visit(ShPtr<ConstArray> constant) override; virtual void visit(ShPtr<ConstBool> constant) override; virtual void visit(ShPtr<ConstFloat> constant) override; virtual void visit(ShPtr<ConstInt> constant) override; virtual void visit(ShPtr<ConstNullPointer> constant) override; virtual void visit(ShPtr<ConstString> constant) override; virtual void visit(ShPtr<ConstStruct> constant) override; virtual void visit(ShPtr<ConstSymbol> constant) override; // Types virtual void visit(ShPtr<ArrayType> type) override; virtual void visit(ShPtr<FloatType> type) override; virtual void visit(ShPtr<IntType> type) override; virtual void visit(ShPtr<PointerType> type) override; virtual void visit(ShPtr<StringType> type) override; virtual void visit(ShPtr<StructType> type) override; virtual void visit(ShPtr<FunctionType> type) override; virtual void visit(ShPtr<VoidType> type) override; virtual void visit(ShPtr<UnknownType> type) override; protected: /// The module to be written. ShPtr<Module> module; /// The output stream. std::stringstream out; unsigned currIndent = 0; }; } // namespace llvmir2hll } // namespace retdec #endif
39.424
68
0.787744
991351ed4c94f05dc5ff0204aa7a8cb06a542ad1
349
h
C
DataGraph.framework/Versions/A/Headers/DGStructures.h
HildrethResearchGroup/Graphs
86ee4bf8635dfc81c59a446fa1ada2b4165b5d7a
[ "MIT" ]
5
2020-11-23T21:30:49.000Z
2022-03-11T16:58:14.000Z
DataGraph.framework/Versions/A/Headers/DGStructures.h
HildrethResearchGroup/Graphs
86ee4bf8635dfc81c59a446fa1ada2b4165b5d7a
[ "MIT" ]
null
null
null
DataGraph.framework/Versions/A/Headers/DGStructures.h
HildrethResearchGroup/Graphs
86ee4bf8635dfc81c59a446fa1ada2b4165b5d7a
[ "MIT" ]
null
null
null
// // DGStructures.h // Created by David Adalsteinsson on 3/8/09. // Copyright 2009-2013, Visual Data Tools Inc. All rights reserved. // typedef struct _DGRange { double minV,maxV; } DGRange; static __inline__ DGRange DGMakeRange(double x,double y) { DGRange r; r.minV = (x<y ? x : y); r.maxV = (x<y ? y : x); return r; }
18.368421
68
0.633238
3fcf7c536fa6fcac25440f3f09f14f0d765593cd
38,840
c
C
framework/src/araui/utils/emoji/__emoji_u1F63E.c
ziyik/TizenRT-1
d510c03303fcfa605bc12c60f826fa5642bbe406
[ "Apache-2.0" ]
511
2017-03-29T09:14:09.000Z
2022-03-30T23:10:29.000Z
framework/src/araui/utils/emoji/__emoji_u1F63E.c
ziyik/TizenRT-1
d510c03303fcfa605bc12c60f826fa5642bbe406
[ "Apache-2.0" ]
4,673
2017-03-29T10:43:43.000Z
2022-03-31T08:33:44.000Z
framework/src/araui/utils/emoji/__emoji_u1F63E.c
ziyik/TizenRT-1
d510c03303fcfa605bc12c60f826fa5642bbe406
[ "Apache-2.0" ]
642
2017-03-30T20:45:33.000Z
2022-03-24T17:07:33.000Z
#include <stdint.h> const uint8_t __emoji_u1F63E[6456] = { 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x9b, 0x20, 0x49, 0xcd, 0x9b, 0x22, 0x53, 0xd1, 0xa0, 0x25, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xa1, 0x27, 0x04, 0xcf, 0x9d, 0x23, 0x45, 0xca, 0x98, 0x1f, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0x98, 0x1c, 0xe2, 0xca, 0x95, 0x20, 0xff, 0xca, 0x97, 0x21, 0xed, 0xcc, 0x99, 0x22, 0x86, 0xce, 0x9d, 0x24, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xa1, 0x24, 0x0a, 0xcd, 0x9c, 0x24, 0x6f, 0xcc, 0x99, 0x22, 0xdf, 0xca, 0x95, 0x20, 0xff, 0xc9, 0x95, 0x1d, 0xfe, 0xc1, 0x90, 0x12, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x95, 0x11, 0x14, 0xc6, 0x90, 0x1f, 0xfe, 0xba, 0x7d, 0x28, 0xff, 0xbc, 0x81, 0x27, 0xff, 0xc5, 0x8e, 0x24, 0xff, 0xcc, 0x98, 0x22, 0xf2, 0xcc, 0x9a, 0x23, 0x7f, 0xd2, 0xa2, 0x21, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd5, 0xa5, 0x22, 0x03, 0xce, 0x9d, 0x25, 0x63, 0xcd, 0x9a, 0x22, 0xe4, 0xc7, 0x90, 0x23, 0xff, 0xbe, 0x83, 0x27, 0xff, 0xb9, 0x7d, 0x28, 0xff, 0xc2, 0x8b, 0x21, 0xff, 0xc0, 0x8d, 0x16, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x91, 0x15, 0x34, 0xc4, 0x8c, 0x22, 0xff, 0xb6, 0x78, 0x2a, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xb7, 0x7a, 0x29, 0xff, 0xbf, 0x84, 0x27, 0xff, 0xca, 0x94, 0x22, 0xff, 0xcd, 0x9a, 0x22, 0xe1, 0xcc, 0x9a, 0x25, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x9e, 0x26, 0x36, 0xcf, 0x9d, 0x23, 0xcd, 0xcb, 0x96, 0x22, 0xff, 0xc1, 0x87, 0x26, 0xff, 0xb8, 0x7b, 0x29, 0xff, 0xb5, 0x77, 0x2b, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xbf, 0x86, 0x24, 0xff, 0xc1, 0x8e, 0x17, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x91, 0x16, 0x51, 0xc2, 0x8b, 0x22, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xb6, 0x77, 0x2b, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xb6, 0x78, 0x2a, 0xff, 0xbb, 0x7e, 0x28, 0xff, 0xc6, 0x8d, 0x24, 0xff, 0xcd, 0x99, 0x20, 0xff, 0xcd, 0x9b, 0x23, 0xa9, 0xcc, 0x9a, 0x26, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xa2, 0x25, 0x06, 0xd0, 0x9e, 0x25, 0x88, 0xd0, 0x9c, 0x21, 0xfb, 0xc8, 0x90, 0x23, 0xff, 0xbc, 0x80, 0x28, 0xff, 0xb7, 0x78, 0x2a, 0xff, 0xb5, 0x77, 0x2b, 0xff, 0xb5, 0x77, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xbe, 0x85, 0x24, 0xff, 0xc1, 0x8e, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x92, 0x15, 0x62, 0xc2, 0x8a, 0x22, 0xff, 0xb5, 0x77, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xb7, 0x77, 0x2a, 0xff, 0xb9, 0x7a, 0x29, 0xff, 0xc0, 0x85, 0x25, 0xff, 0xd3, 0xa1, 0x28, 0xff, 0xe0, 0xb6, 0x3b, 0xe1, 0xfe, 0xe2, 0x64, 0x75, 0xff, 0xe5, 0x67, 0x90, 0xff, 0xe7, 0x6b, 0xa4, 0xff, 0xe7, 0x6a, 0xad, 0xff, 0xe7, 0x6a, 0xad, 0xff, 0xe7, 0x6a, 0xa4, 0xff, 0xe6, 0x67, 0x92, 0xff, 0xe5, 0x66, 0x71, 0xe6, 0xc1, 0x45, 0xca, 0xd7, 0xa7, 0x2c, 0xff, 0xc4, 0x8a, 0x24, 0xff, 0xb9, 0x7b, 0x29, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xb6, 0x77, 0x2a, 0xff, 0xb5, 0x77, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xbe, 0x85, 0x24, 0xff, 0xc1, 0x8e, 0x17, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x91, 0x15, 0x6b, 0xc3, 0x8b, 0x21, 0xff, 0xb5, 0x77, 0x29, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb6, 0x76, 0x2a, 0xff, 0xbe, 0x82, 0x2f, 0xff, 0xdb, 0xad, 0x44, 0xff, 0xf6, 0xd2, 0x54, 0xff, 0xff, 0xe2, 0x5e, 0xff, 0xff, 0xe4, 0x63, 0xff, 0xff, 0xe8, 0x6a, 0xff, 0xff, 0xeb, 0x71, 0xff, 0xff, 0xed, 0x75, 0xff, 0xff, 0xef, 0x78, 0xff, 0xff, 0xef, 0x78, 0xff, 0xff, 0xee, 0x76, 0xff, 0xff, 0xeb, 0x71, 0xff, 0xff, 0xe9, 0x6c, 0xff, 0xff, 0xe5, 0x64, 0xff, 0xff, 0xe3, 0x60, 0xff, 0xf7, 0xd7, 0x59, 0xff, 0xdd, 0xb0, 0x45, 0xff, 0xbd, 0x82, 0x2f, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb5, 0x76, 0x2a, 0xff, 0xb4, 0x76, 0x2a, 0xff, 0xb4, 0x76, 0x2a, 0xff, 0xbf, 0x86, 0x23, 0xff, 0xc1, 0x8e, 0x17, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x91, 0x14, 0x6a, 0xc5, 0x8e, 0x1f, 0xff, 0xb6, 0x78, 0x29, 0xff, 0xb4, 0x76, 0x2a, 0xff, 0xb7, 0x79, 0x2b, 0xff, 0xdd, 0xad, 0x41, 0xff, 0xfd, 0xd9, 0x55, 0xff, 0xff, 0xdd, 0x55, 0xff, 0xff, 0xe1, 0x5c, 0xff, 0xff, 0xe6, 0x66, 0xff, 0xff, 0xeb, 0x72, 0xff, 0xff, 0xf0, 0x7c, 0xff, 0xff, 0xf4, 0x85, 0xff, 0xff, 0xf8, 0x8c, 0xff, 0xff, 0xf9, 0x8f, 0xff, 0xff, 0xf9, 0x8f, 0xff, 0xff, 0xf8, 0x8b, 0xff, 0xff, 0xf4, 0x85, 0xff, 0xff, 0xf0, 0x7c, 0xff, 0xff, 0xeb, 0x71, 0xff, 0xff, 0xe6, 0x66, 0xff, 0xff, 0xe1, 0x5c, 0xff, 0xff, 0xde, 0x56, 0xff, 0xfd, 0xdb, 0x55, 0xff, 0xdd, 0xae, 0x44, 0xff, 0xb6, 0x78, 0x2b, 0xff, 0xb4, 0x75, 0x2a, 0xff, 0xb4, 0x77, 0x29, 0xff, 0xc1, 0x88, 0x21, 0xff, 0xc1, 0x8e, 0x15, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x91, 0x13, 0x5c, 0xc7, 0x90, 0x1c, 0xff, 0xb6, 0x79, 0x28, 0xff, 0xbd, 0x83, 0x2f, 0xff, 0xf2, 0xc8, 0x4c, 0xff, 0xff, 0xd8, 0x4e, 0xff, 0xff, 0xda, 0x51, 0xff, 0xff, 0xdd, 0x57, 0xff, 0xff, 0xe3, 0x62, 0xff, 0xff, 0xe8, 0x6f, 0xff, 0xff, 0xee, 0x7b, 0xff, 0xff, 0xf2, 0x83, 0xff, 0xff, 0xf6, 0x8a, 0xff, 0xff, 0xf8, 0x8d, 0xff, 0xff, 0xf8, 0x8d, 0xff, 0xff, 0xf8, 0x8d, 0xff, 0xff, 0xf7, 0x8c, 0xff, 0xff, 0xf5, 0x89, 0xff, 0xff, 0xf2, 0x83, 0xff, 0xff, 0xed, 0x79, 0xff, 0xff, 0xe8, 0x6e, 0xff, 0xff, 0xe2, 0x61, 0xff, 0xff, 0xdd, 0x56, 0xff, 0xff, 0xd9, 0x4e, 0xff, 0xfe, 0xd7, 0x4c, 0xff, 0xf1, 0xc9, 0x51, 0xff, 0xbc, 0x81, 0x30, 0xff, 0xb4, 0x77, 0x28, 0xff, 0xc3, 0x8c, 0x1f, 0xff, 0xc0, 0x8d, 0x14, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x8e, 0x12, 0x41, 0xc8, 0x92, 0x18, 0xff, 0xc2, 0x8a, 0x2c, 0xff, 0xcb, 0xad, 0x50, 0xff, 0xa9, 0x90, 0x40, 0xff, 0xab, 0x93, 0x3d, 0xff, 0xbf, 0xa7, 0x45, 0xff, 0xec, 0xd1, 0x59, 0xff, 0xff, 0xe6, 0x6a, 0xff, 0xff, 0xea, 0x75, 0xff, 0xff, 0xef, 0x7f, 0xff, 0xff, 0xf3, 0x87, 0xff, 0xff, 0xf5, 0x8b, 0xff, 0xff, 0xf6, 0x8d, 0xff, 0xff, 0xf7, 0x8d, 0xff, 0xff, 0xf6, 0x8d, 0xff, 0xff, 0xf6, 0x8c, 0xff, 0xff, 0xf5, 0x8a, 0xff, 0xff, 0xf2, 0x85, 0xff, 0xff, 0xee, 0x7e, 0xff, 0xff, 0xe9, 0x73, 0xff, 0xff, 0xe4, 0x68, 0xff, 0xf8, 0xda, 0x59, 0xff, 0xce, 0xb3, 0x45, 0xff, 0xb1, 0x99, 0x3b, 0xff, 0xac, 0x94, 0x3d, 0xff, 0xbb, 0xa0, 0x4d, 0xff, 0xbf, 0x87, 0x2d, 0xff, 0xc4, 0x8f, 0x1b, 0xff, 0xbf, 0x8b, 0x13, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x8b, 0x0f, 0x1e, 0xc9, 0x94, 0x19, 0xff, 0xef, 0xc5, 0x45, 0xff, 0xd8, 0xb8, 0x45, 0xff, 0x92, 0x80, 0x3c, 0xff, 0x5d, 0x53, 0x32, 0xff, 0x52, 0x47, 0x2a, 0xff, 0x4f, 0x44, 0x26, 0xff, 0x74, 0x68, 0x37, 0xff, 0xd2, 0xc2, 0x65, 0xff, 0xff, 0xef, 0x83, 0xff, 0xff, 0xf2, 0x89, 0xff, 0xff, 0xf5, 0x8f, 0xff, 0xff, 0xf7, 0x92, 0xff, 0xff, 0xf7, 0x92, 0xff, 0xff, 0xf7, 0x92, 0xff, 0xff, 0xf6, 0x90, 0xff, 0xff, 0xf4, 0x8d, 0xff, 0xff, 0xf1, 0x87, 0xff, 0xff, 0xed, 0x80, 0xff, 0xeb, 0xd8, 0x6c, 0xff, 0x8a, 0x7b, 0x3d, 0xff, 0x51, 0x45, 0x28, 0xff, 0x50, 0x45, 0x29, 0xff, 0x51, 0x47, 0x2e, 0xff, 0x7f, 0x70, 0x39, 0xff, 0xba, 0xa1, 0x42, 0xff, 0xf0, 0xc7, 0x4b, 0xff, 0xc7, 0x93, 0x1a, 0xff, 0xbc, 0x88, 0x12, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x88, 0x0e, 0x02, 0xe0, 0xb2, 0x38, 0xee, 0xf2, 0xc8, 0x40, 0xff, 0xf5, 0xcc, 0x42, 0xff, 0xfa, 0xd1, 0x4a, 0xff, 0xfc, 0xd8, 0x57, 0xff, 0xc9, 0xb2, 0x54, 0xff, 0x82, 0x74, 0x3c, 0xff, 0x59, 0x4b, 0x25, 0xff, 0x51, 0x45, 0x25, 0xff, 0xad, 0xa0, 0x57, 0xff, 0xff, 0xf2, 0x8b, 0xff, 0xff, 0xf5, 0x91, 0xff, 0xff, 0xf7, 0x95, 0xff, 0xff, 0xf8, 0x97, 0xff, 0xff, 0xf8, 0x96, 0xff, 0xff, 0xf6, 0x93, 0xff, 0xff, 0xf3, 0x8e, 0xff, 0xff, 0xf0, 0x88, 0xff, 0xd3, 0xc4, 0x68, 0xff, 0x55, 0x4a, 0x29, 0xff, 0x58, 0x4b, 0x26, 0xff, 0x6d, 0x61, 0x32, 0xff, 0xb1, 0x9d, 0x49, 0xff, 0xf2, 0xcf, 0x50, 0xff, 0xf9, 0xd1, 0x45, 0xff, 0xf5, 0xcc, 0x3e, 0xff, 0xf2, 0xc9, 0x3f, 0xff, 0xe2, 0xb6, 0x3b, 0xff, 0xb6, 0x82, 0x0e, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xc2, 0x52, 0x17, 0xec, 0xc1, 0x3f, 0xf3, 0xf0, 0xc5, 0x3c, 0xff, 0xf5, 0xcc, 0x45, 0xff, 0xfa, 0xd2, 0x52, 0xff, 0xfe, 0xd7, 0x5c, 0xff, 0xff, 0xdb, 0x65, 0xff, 0xff, 0xe1, 0x6d, 0xff, 0xbb, 0xab, 0x58, 0xff, 0x63, 0x56, 0x2d, 0xff, 0x4d, 0x43, 0x26, 0xff, 0xc7, 0xba, 0x68, 0xff, 0xff, 0xf2, 0x8f, 0xff, 0xff, 0xf4, 0x94, 0xff, 0xff, 0xf5, 0x95, 0xff, 0xff, 0xf5, 0x95, 0xff, 0xff, 0xf3, 0x92, 0xff, 0xff, 0xf1, 0x8c, 0xff, 0xeb, 0xdb, 0x79, 0xff, 0x54, 0x48, 0x28, 0xff, 0x5c, 0x50, 0x2b, 0xff, 0x9f, 0x90, 0x47, 0xff, 0xfd, 0xdf, 0x66, 0xff, 0xff, 0xd9, 0x5d, 0xff, 0xfd, 0xd5, 0x55, 0xff, 0xf9, 0xd0, 0x4b, 0xff, 0xf5, 0xcb, 0x40, 0xff, 0xf0, 0xc5, 0x39, 0xff, 0xef, 0xc5, 0x43, 0xfe, 0xf1, 0xcb, 0x57, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0xbd, 0x4c, 0x88, 0xe9, 0xbb, 0x37, 0xff, 0xee, 0xc3, 0x3c, 0xff, 0xf5, 0xcc, 0x4b, 0xff, 0xfa, 0xd2, 0x57, 0xff, 0xfe, 0xd7, 0x60, 0xff, 0xff, 0xda, 0x67, 0xff, 0xc0, 0xa9, 0x53, 0xff, 0x15, 0x11, 0x0a, 0xff, 0x20, 0x1a, 0x0f, 0xff, 0x65, 0x5a, 0x32, 0xff, 0x67, 0x5c, 0x33, 0xff, 0xff, 0xef, 0x8a, 0xff, 0xff, 0xef, 0x8c, 0xff, 0xff, 0xf0, 0x8e, 0xff, 0xff, 0xef, 0x8d, 0xff, 0xff, 0xee, 0x8a, 0xff, 0xff, 0xeb, 0x85, 0xff, 0x96, 0x89, 0x4b, 0xff, 0x60, 0x56, 0x32, 0xff, 0x3f, 0x36, 0x1b, 0xff, 0x1f, 0x1c, 0x19, 0xff, 0x8b, 0x78, 0x39, 0xff, 0xfe, 0xd7, 0x5c, 0xff, 0xfc, 0xd3, 0x56, 0xff, 0xf8, 0xd0, 0x4e, 0xff, 0xf4, 0xcb, 0x45, 0xff, 0xee, 0xc3, 0x38, 0xff, 0xe9, 0xbc, 0x35, 0xff, 0xea, 0xbe, 0x44, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0xbb, 0x5c, 0x08, 0xe6, 0xb4, 0x3a, 0xec, 0xe8, 0xb7, 0x31, 0xff, 0xee, 0xc3, 0x40, 0xff, 0xf5, 0xcc, 0x50, 0xff, 0xfa, 0xd1, 0x5a, 0xff, 0xfd, 0xd5, 0x61, 0xff, 0xff, 0xda, 0x67, 0xff, 0x4d, 0x43, 0x24, 0xff, 0x3a, 0x36, 0x2f, 0xff, 0x52, 0x4f, 0x4a, 0xff, 0x71, 0x65, 0x32, 0xff, 0xd9, 0xc7, 0x6f, 0xff, 0xff, 0xe8, 0x81, 0xff, 0xff, 0xe8, 0x84, 0xff, 0xff, 0xe9, 0x85, 0xff, 0xff, 0xe9, 0x84, 0xff, 0xff, 0xe7, 0x81, 0xff, 0xff, 0xe5, 0x7d, 0xff, 0xe1, 0xcb, 0x6d, 0xff, 0xaf, 0x9d, 0x4d, 0xff, 0x25, 0x21, 0x1b, 0xff, 0x5d, 0x59, 0x52, 0xff, 0x1e, 0x18, 0x0f, 0xff, 0xf3, 0xd0, 0x5d, 0xff, 0xfb, 0xd2, 0x56, 0xff, 0xf7, 0xcf, 0x50, 0xff, 0xf3, 0xca, 0x48, 0xff, 0xee, 0xc3, 0x3b, 0xff, 0xe8, 0xb7, 0x2e, 0xff, 0xe6, 0xb4, 0x35, 0xf9, 0xe8, 0xb9, 0x4e, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0xae, 0x45, 0x51, 0xe1, 0xa9, 0x28, 0xff, 0xe6, 0xb3, 0x2e, 0xff, 0xee, 0xc4, 0x44, 0xff, 0xf4, 0xcc, 0x52, 0xff, 0xf8, 0xd0, 0x5b, 0xff, 0xfc, 0xd3, 0x61, 0xff, 0xfe, 0xd9, 0x68, 0xff, 0x25, 0x1f, 0x13, 0xff, 0x2b, 0x25, 0x1c, 0xff, 0x2a, 0x25, 0x1b, 0xff, 0x43, 0x37, 0x19, 0xff, 0xff, 0xe2, 0x78, 0xff, 0xff, 0xe1, 0x79, 0xff, 0xff, 0xe2, 0x7c, 0xff, 0xff, 0xe2, 0x7c, 0xff, 0xff, 0xe2, 0x7b, 0xff, 0xff, 0xe1, 0x79, 0xff, 0xff, 0xdf, 0x75, 0xff, 0xff, 0xdd, 0x70, 0xff, 0x82, 0x6f, 0x33, 0xff, 0x2a, 0x24, 0x1b, 0xff, 0x2e, 0x28, 0x1e, 0xff, 0x1b, 0x17, 0x10, 0xff, 0xce, 0xb0, 0x51, 0xff, 0xf8, 0xcf, 0x55, 0xff, 0xf6, 0xcc, 0x50, 0xff, 0xf2, 0xc9, 0x49, 0xff, 0xee, 0xc4, 0x3e, 0xff, 0xe6, 0xb5, 0x2d, 0xff, 0xe2, 0xaa, 0x27, 0xff, 0xe4, 0xad, 0x3b, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xa3, 0x33, 0xa3, 0xdf, 0xa1, 0x1c, 0xff, 0xe6, 0xb4, 0x31, 0xff, 0xee, 0xc5, 0x47, 0xff, 0xf3, 0xca, 0x54, 0xff, 0xf7, 0xce, 0x5b, 0xff, 0xf9, 0xd1, 0x60, 0xff, 0xfd, 0xd7, 0x67, 0xff, 0x25, 0x1f, 0x13, 0xff, 0x36, 0x30, 0x27, 0xff, 0x33, 0x2d, 0x24, 0xff, 0x40, 0x33, 0x16, 0xff, 0xff, 0xde, 0x73, 0xff, 0xff, 0xdc, 0x74, 0xff, 0xff, 0xdd, 0x75, 0xff, 0xff, 0xdd, 0x76, 0xff, 0xff, 0xdd, 0x74, 0xff, 0xff, 0xdc, 0x72, 0xff, 0xff, 0xda, 0x6f, 0xff, 0xff, 0xd9, 0x6b, 0xff, 0x7a, 0x68, 0x2e, 0xff, 0x2f, 0x29, 0x20, 0xff, 0x35, 0x2e, 0x26, 0xff, 0x1a, 0x16, 0x0f, 0xff, 0xcc, 0xae, 0x50, 0xff, 0xf6, 0xcd, 0x54, 0xff, 0xf4, 0xcb, 0x50, 0xff, 0xf1, 0xc7, 0x4a, 0xff, 0xed, 0xc3, 0x40, 0xff, 0xe6, 0xb5, 0x2f, 0xff, 0xe0, 0xa4, 0x1d, 0xff, 0xe1, 0xa3, 0x2c, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xb7, 0x70, 0x01, 0xe0, 0xa0, 0x2b, 0xe6, 0xe0, 0xa3, 0x1d, 0xff, 0xe6, 0xb8, 0x36, 0xff, 0xec, 0xc3, 0x49, 0xff, 0xf1, 0xc8, 0x53, 0xff, 0xf5, 0xcc, 0x5b, 0xff, 0xf7, 0xcf, 0x5f, 0xff, 0xfa, 0xd2, 0x63, 0xff, 0x51, 0x48, 0x2a, 0xff, 0x26, 0x21, 0x18, 0xff, 0x24, 0x20, 0x17, 0xff, 0x68, 0x57, 0x29, 0xff, 0xff, 0xd8, 0x6f, 0xff, 0xff, 0xd9, 0x70, 0xff, 0xff, 0xd9, 0x71, 0xff, 0xff, 0xd9, 0x71, 0xff, 0xff, 0xd8, 0x70, 0xff, 0xfe, 0xd8, 0x6e, 0xff, 0xfe, 0xd6, 0x6b, 0xff, 0xfd, 0xd5, 0x67, 0xff, 0xa0, 0x86, 0x3c, 0xff, 0x24, 0x1f, 0x16, 0xff, 0x27, 0x22, 0x19, 0xff, 0x1f, 0x1b, 0x12, 0xff, 0xed, 0xc9, 0x5a, 0xff, 0xf4, 0xcb, 0x53, 0xff, 0xf2, 0xc8, 0x4f, 0xff, 0xef, 0xc5, 0x49, 0xff, 0xeb, 0xc1, 0x41, 0xff, 0xe6, 0xb8, 0x32, 0xff, 0xdf, 0xa4, 0x1d, 0xff, 0xdf, 0xa0, 0x28, 0xf7, 0xea, 0xb2, 0x64, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xab, 0x55, 0x22, 0xde, 0x9d, 0x21, 0xff, 0xdf, 0xa6, 0x20, 0xff, 0xe6, 0xb9, 0x39, 0xff, 0xeb, 0xc1, 0x48, 0xff, 0xef, 0xc6, 0x52, 0xff, 0xf3, 0xca, 0x5a, 0xff, 0xf5, 0xcc, 0x5e, 0xff, 0xf7, 0xce, 0x61, 0xff, 0xbc, 0xa6, 0x5b, 0xff, 0x3e, 0x42, 0x3b, 0xff, 0x39, 0x3b, 0x32, 0xff, 0xcb, 0xac, 0x55, 0xff, 0xfd, 0xd4, 0x6d, 0xff, 0xfd, 0xd5, 0x6d, 0xff, 0xfd, 0xd5, 0x6d, 0xff, 0xfd, 0xd7, 0x6e, 0xff, 0xfd, 0xd6, 0x6d, 0xff, 0xfc, 0xd3, 0x6a, 0xff, 0xfb, 0xd3, 0x68, 0xff, 0xfa, 0xd2, 0x65, 0xff, 0xed, 0xc6, 0x5c, 0xff, 0x41, 0x3e, 0x2e, 0xff, 0x3b, 0x3c, 0x35, 0xff, 0x7c, 0x6f, 0x3f, 0xff, 0xf4, 0xca, 0x55, 0xff, 0xf1, 0xc8, 0x52, 0xff, 0xf0, 0xc6, 0x4e, 0xff, 0xec, 0xc2, 0x48, 0xff, 0xe9, 0xbf, 0x40, 0xff, 0xe5, 0xb8, 0x34, 0xff, 0xdf, 0xa7, 0x21, 0xff, 0xdd, 0x9e, 0x1e, 0xff, 0xe3, 0xa8, 0x4a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xa4, 0x41, 0x52, 0xdd, 0x9c, 0x1a, 0xff, 0xdf, 0xa8, 0x23, 0xff, 0xe6, 0xba, 0x39, 0xff, 0xeb, 0xc0, 0x46, 0xff, 0xef, 0xc5, 0x51, 0xff, 0xf2, 0xc8, 0x58, 0xff, 0xf3, 0xc9, 0x5d, 0xff, 0xf4, 0xcb, 0x60, 0xff, 0xf6, 0xce, 0x64, 0xff, 0xc8, 0xae, 0x5d, 0xff, 0xce, 0xb0, 0x58, 0xff, 0xf9, 0xd1, 0x6a, 0xff, 0xf9, 0xd1, 0x6a, 0xff, 0xe4, 0xc1, 0x65, 0xff, 0xa1, 0x8a, 0x5a, 0xff, 0x94, 0x7d, 0x5b, 0xff, 0x95, 0x7e, 0x5c, 0xff, 0xa4, 0x8b, 0x5a, 0xff, 0xe4, 0xbf, 0x60, 0xff, 0xf7, 0xce, 0x62, 0xff, 0xf6, 0xcd, 0x60, 0xff, 0xda, 0xb7, 0x55, 0xff, 0xab, 0x94, 0x4a, 0xff, 0xf0, 0xc9, 0x5a, 0xff, 0xf0, 0xc7, 0x54, 0xff, 0xef, 0xc5, 0x50, 0xff, 0xed, 0xc3, 0x4c, 0xff, 0xeb, 0xc1, 0x46, 0xff, 0xe8, 0xbd, 0x3e, 0xff, 0xe4, 0xb8, 0x34, 0xff, 0xdf, 0xa9, 0x23, 0xff, 0xdd, 0x9d, 0x1a, 0xff, 0xe0, 0xa3, 0x3b, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x97, 0x36, 0x74, 0xc6, 0x8d, 0x18, 0xff, 0xc0, 0x92, 0x22, 0xff, 0xbd, 0x98, 0x31, 0xff, 0xbe, 0x9a, 0x39, 0xff, 0xc0, 0x9d, 0x41, 0xff, 0xc2, 0xa0, 0x46, 0xff, 0xc7, 0xa4, 0x4d, 0xff, 0xcc, 0xa9, 0x51, 0xff, 0xd5, 0xb1, 0x57, 0xff, 0xf2, 0xc9, 0x63, 0xff, 0xf5, 0xcc, 0x65, 0xff, 0xf5, 0xcc, 0x66, 0xff, 0xf6, 0xcd, 0x66, 0xff, 0x97, 0x7c, 0x4d, 0xff, 0x8d, 0x72, 0x56, 0xff, 0x99, 0x7c, 0x5e, 0xff, 0x99, 0x7c, 0x5e, 0xff, 0x8f, 0x74, 0x58, 0xff, 0x97, 0x7b, 0x4a, 0xff, 0xf3, 0xca, 0x5f, 0xff, 0xf3, 0xc9, 0x5e, 0xff, 0xf2, 0xc8, 0x5b, 0xff, 0xf1, 0xc7, 0x58, 0xff, 0xed, 0xc4, 0x55, 0xff, 0xd0, 0xab, 0x49, 0xff, 0xc6, 0xa2, 0x44, 0xff, 0xc1, 0x9e, 0x3f, 0xff, 0xbe, 0x9b, 0x3a, 0xff, 0xba, 0x97, 0x34, 0xff, 0xba, 0x96, 0x2d, 0xff, 0xbc, 0x91, 0x21, 0xff, 0xc1, 0x8a, 0x19, 0xff, 0xc3, 0x8d, 0x31, 0x92, 0x25, 0x1f, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x1f, 0x18, 0x03, 0xce, 0x94, 0x32, 0x8e, 0xb1, 0x7e, 0x17, 0xff, 0xa8, 0x81, 0x1f, 0xff, 0xa8, 0x87, 0x2b, 0xff, 0xa9, 0x89, 0x32, 0xff, 0xaf, 0x8e, 0x39, 0xff, 0xb6, 0x95, 0x40, 0xff, 0xbf, 0x9d, 0x47, 0xff, 0xc9, 0xa6, 0x4d, 0xff, 0xd1, 0xad, 0x52, 0xff, 0xd6, 0xb1, 0x56, 0xff, 0xeb, 0xc3, 0x5e, 0xff, 0xf1, 0xc8, 0x60, 0xff, 0xf1, 0xc8, 0x60, 0xff, 0xa8, 0x88, 0x49, 0xff, 0x78, 0x5d, 0x42, 0xff, 0x8b, 0x6d, 0x4f, 0xff, 0x8b, 0x6d, 0x4f, 0xff, 0x79, 0x5d, 0x42, 0xff, 0xa7, 0x87, 0x47, 0xff, 0xef, 0xc5, 0x5a, 0xff, 0xef, 0xc5, 0x59, 0xff, 0xee, 0xc4, 0x57, 0xff, 0xe1, 0xba, 0x51, 0xff, 0xcd, 0xa8, 0x49, 0xff, 0xc8, 0xa4, 0x45, 0xff, 0xc2, 0x9f, 0x40, 0xff, 0xb9, 0x97, 0x3b, 0xff, 0xb2, 0x90, 0x34, 0xff, 0xac, 0x8b, 0x2e, 0xff, 0xa8, 0x87, 0x28, 0xff, 0xa7, 0x80, 0x1f, 0xff, 0xab, 0x7b, 0x19, 0xff, 0xc0, 0x8a, 0x2d, 0xa2, 0x26, 0x20, 0x19, 0x0b, 0x26, 0x20, 0x19, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x20, 0x19, 0x07, 0x26, 0x20, 0x19, 0x28, 0xaa, 0x7a, 0x2a, 0xa5, 0xcc, 0x90, 0x16, 0xff, 0x9e, 0x79, 0x1d, 0xff, 0x92, 0x75, 0x25, 0xff, 0x96, 0x79, 0x2a, 0xff, 0x9b, 0x7d, 0x30, 0xff, 0xa2, 0x84, 0x36, 0xff, 0xae, 0x8d, 0x3c, 0xff, 0xbb, 0x99, 0x43, 0xff, 0xca, 0xa6, 0x4a, 0xff, 0xd6, 0xb0, 0x50, 0xff, 0xea, 0xc1, 0x57, 0xff, 0xec, 0xc2, 0x58, 0xff, 0xec, 0xc2, 0x57, 0xff, 0xe9, 0xbe, 0x54, 0xff, 0x6c, 0x55, 0x2a, 0xff, 0x65, 0x4e, 0x37, 0xff, 0x6e, 0x54, 0x3c, 0xff, 0x6c, 0x54, 0x29, 0xff, 0xe8, 0xbd, 0x50, 0xff, 0xeb, 0xc0, 0x52, 0xff, 0xea, 0xc0, 0x51, 0xff, 0xe9, 0xbf, 0x50, 0xff, 0xe3, 0xb9, 0x4c, 0xff, 0xca, 0xa5, 0x44, 0xff, 0xc1, 0x9d, 0x3f, 0xff, 0xb4, 0x92, 0x39, 0xff, 0xa8, 0x88, 0x32, 0xff, 0x9f, 0x80, 0x2d, 0xff, 0x98, 0x7a, 0x28, 0xff, 0x92, 0x75, 0x23, 0xff, 0x9a, 0x77, 0x1d, 0xff, 0xc5, 0x8c, 0x19, 0xff, 0xb1, 0x7f, 0x2b, 0xb5, 0x26, 0x20, 0x19, 0x34, 0x26, 0x20, 0x19, 0x18, 0x00, 0x00, 0x00, 0x00, 0x26, 0x20, 0x19, 0x01, 0x26, 0x20, 0x19, 0x09, 0x26, 0x20, 0x19, 0x21, 0x84, 0x60, 0x27, 0xa4, 0xa4, 0x74, 0x16, 0xff, 0xce, 0x9b, 0x1b, 0xff, 0xd9, 0xab, 0x26, 0xff, 0xda, 0xad, 0x2d, 0xff, 0xdc, 0xb0, 0x34, 0xff, 0xdf, 0xb2, 0x3b, 0xff, 0xe1, 0xb5, 0x41, 0xff, 0xe3, 0xb7, 0x45, 0xff, 0xe5, 0xb9, 0x48, 0xff, 0xe5, 0xba, 0x4a, 0xff, 0xe6, 0xba, 0x4b, 0xff, 0xe6, 0xbb, 0x4b, 0xff, 0xe6, 0xbb, 0x4b, 0xff, 0xe7, 0xbb, 0x4b, 0xff, 0xe7, 0xbb, 0x4b, 0xff, 0xb6, 0x90, 0x3c, 0xff, 0xb7, 0x91, 0x3c, 0xff, 0xe7, 0xbb, 0x49, 0xff, 0xe6, 0xba, 0x48, 0xff, 0xe6, 0xba, 0x48, 0xff, 0xe5, 0xba, 0x47, 0xff, 0xe5, 0xb9, 0x46, 0xff, 0xe2, 0xb6, 0x44, 0xff, 0xe1, 0xb6, 0x42, 0xff, 0xe3, 0xb7, 0x40, 0xff, 0xe0, 0xb4, 0x3b, 0xff, 0xdf, 0xb2, 0x36, 0xff, 0xdc, 0xb0, 0x30, 0xff, 0xda, 0xad, 0x2a, 0xff, 0xda, 0xab, 0x24, 0xff, 0xd1, 0x9e, 0x1e, 0xff, 0xac, 0x7b, 0x1c, 0xff, 0x81, 0x5f, 0x27, 0xb9, 0x26, 0x20, 0x19, 0x42, 0x26, 0x20, 0x19, 0x09, 0x26, 0x20, 0x19, 0x08, 0x26, 0x20, 0x19, 0x01, 0x26, 0x20, 0x19, 0x25, 0x26, 0x20, 0x19, 0x20, 0xdf, 0xa0, 0x3b, 0x58, 0xd9, 0x97, 0x17, 0xff, 0xd5, 0x9c, 0x17, 0xff, 0xd3, 0xa4, 0x1e, 0xff, 0xd5, 0xa7, 0x23, 0xff, 0xd8, 0xaa, 0x29, 0xff, 0xda, 0xad, 0x2f, 0xff, 0xdc, 0xae, 0x34, 0xff, 0xdd, 0xb0, 0x38, 0xff, 0xde, 0xb2, 0x3a, 0xff, 0xdf, 0xb3, 0x3c, 0xff, 0xe0, 0xb3, 0x3d, 0xff, 0xdf, 0xb1, 0x36, 0xff, 0xda, 0xac, 0x2b, 0xff, 0xbf, 0x94, 0x22, 0xff, 0x9d, 0x79, 0x1a, 0xff, 0x88, 0x68, 0x14, 0xff, 0x86, 0x66, 0x14, 0xff, 0x98, 0x74, 0x18, 0xff, 0xb8, 0x8e, 0x1f, 0xff, 0xd7, 0xa8, 0x29, 0xff, 0xde, 0xb0, 0x34, 0xff, 0xdf, 0xb3, 0x3a, 0xff, 0xdf, 0xb2, 0x39, 0xff, 0xdd, 0xb1, 0x37, 0xff, 0xdd, 0xb0, 0x34, 0xff, 0xdb, 0xae, 0x31, 0xff, 0xd9, 0xac, 0x2c, 0xff, 0xd7, 0xaa, 0x27, 0xff, 0xd5, 0xa8, 0x23, 0xff, 0xd5, 0xa4, 0x20, 0xff, 0xd6, 0x9e, 0x1b, 0xff, 0xd9, 0x99, 0x1d, 0xff, 0xde, 0x9f, 0x3a, 0x71, 0x26, 0x20, 0x19, 0x0c, 0x26, 0x20, 0x19, 0x36, 0x26, 0x20, 0x19, 0x10, 0x26, 0x20, 0x19, 0x05, 0x26, 0x20, 0x19, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe2, 0xa5, 0x50, 0x19, 0xd9, 0x97, 0x1e, 0xfc, 0xd5, 0x98, 0x13, 0xff, 0xd0, 0x9e, 0x19, 0xff, 0xd1, 0xa2, 0x1b, 0xff, 0xd3, 0xa4, 0x1e, 0xff, 0xd5, 0xa6, 0x22, 0xff, 0xd7, 0xa8, 0x27, 0xff, 0xd8, 0xaa, 0x2a, 0xff, 0xd9, 0xab, 0x2c, 0xff, 0xd8, 0xa8, 0x25, 0xff, 0x9c, 0x77, 0x13, 0xff, 0x4d, 0x39, 0x09, 0xff, 0x15, 0x10, 0x06, 0xff, 0x05, 0x05, 0x04, 0xff, 0x06, 0x05, 0x04, 0xff, 0x06, 0x05, 0x04, 0xff, 0x06, 0x05, 0x04, 0xff, 0x06, 0x05, 0x05, 0xff, 0x06, 0x05, 0x04, 0xff, 0x10, 0x0c, 0x05, 0xff, 0x41, 0x30, 0x08, 0xff, 0x8b, 0x69, 0x11, 0xff, 0xd4, 0xa5, 0x22, 0xff, 0xd9, 0xab, 0x2a, 0xff, 0xd8, 0xaa, 0x29, 0xff, 0xd7, 0xa8, 0x25, 0xff, 0xd5, 0xa7, 0x22, 0xff, 0xd4, 0xa5, 0x1f, 0xff, 0xd2, 0xa3, 0x1e, 0xff, 0xd2, 0xa0, 0x1c, 0xff, 0xd5, 0x9a, 0x18, 0xff, 0xd9, 0x98, 0x22, 0xff, 0xe0, 0xa2, 0x49, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x20, 0x19, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xda, 0x99, 0x2b, 0xb5, 0xd6, 0x95, 0x12, 0xff, 0xcf, 0x98, 0x15, 0xff, 0xcc, 0x9c, 0x16, 0xff, 0xce, 0x9f, 0x16, 0xff, 0xd0, 0xa0, 0x19, 0xff, 0xd2, 0xa3, 0x1b, 0xff, 0xd3, 0xa4, 0x1d, 0xff, 0xc2, 0x95, 0x17, 0xff, 0x3a, 0x2c, 0x08, 0xff, 0x06, 0x05, 0x04, 0xff, 0x04, 0x03, 0x03, 0xff, 0x02, 0x02, 0x01, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x01, 0x01, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x02, 0x02, 0x01, 0xff, 0x04, 0x04, 0x03, 0xff, 0x05, 0x05, 0x04, 0xff, 0x26, 0x1c, 0x07, 0xff, 0xae, 0x84, 0x15, 0xff, 0xd3, 0xa4, 0x1e, 0xff, 0xd2, 0xa3, 0x1c, 0xff, 0xd1, 0xa1, 0x1b, 0xff, 0xd0, 0xa0, 0x1b, 0xff, 0xce, 0x9d, 0x19, 0xff, 0xd0, 0x9a, 0x18, 0xff, 0xd6, 0x96, 0x18, 0xff, 0xdb, 0x99, 0x2e, 0xd0, 0xe7, 0xad, 0x62, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x9d, 0x3e, 0x32, 0xd7, 0x94, 0x1c, 0xfb, 0xd2, 0x94, 0x12, 0xff, 0xca, 0x96, 0x14, 0xff, 0xca, 0x99, 0x13, 0xff, 0xcc, 0x9b, 0x13, 0xff, 0xcd, 0x9d, 0x13, 0xff, 0xd0, 0x9f, 0x14, 0xff, 0x37, 0x29, 0x09, 0xff, 0x05, 0x05, 0x03, 0xff, 0x00, 0x00, 0x00, 0xff, 0x24, 0x1e, 0x0b, 0xff, 0x74, 0x5f, 0x21, 0xff, 0xa7, 0x87, 0x2a, 0xff, 0xc7, 0x9f, 0x2f, 0xff, 0xd3, 0xa9, 0x31, 0xff, 0xd4, 0xaa, 0x32, 0xff, 0xcb, 0xa2, 0x32, 0xff, 0xae, 0x8d, 0x2d, 0xff, 0x7f, 0x68, 0x24, 0xff, 0x33, 0x2b, 0x10, 0xff, 0x00, 0x00, 0x00, 0xff, 0x04, 0x03, 0x02, 0xff, 0x18, 0x12, 0x07, 0xff, 0xc3, 0x94, 0x13, 0xff, 0xce, 0x9e, 0x16, 0xff, 0xcd, 0x9c, 0x17, 0xff, 0xcb, 0x9b, 0x17, 0xff, 0xcc, 0x98, 0x16, 0xff, 0xd2, 0x95, 0x16, 0xff, 0xd7, 0x96, 0x21, 0xff, 0xdd, 0x9e, 0x3e, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xda, 0x98, 0x31, 0x7b, 0xd6, 0x93, 0x16, 0xff, 0xcf, 0x92, 0x12, 0xff, 0xc7, 0x93, 0x14, 0xff, 0xc7, 0x96, 0x12, 0xff, 0xc9, 0x98, 0x11, 0xff, 0xbd, 0x8f, 0x10, 0xff, 0x05, 0x05, 0x05, 0xff, 0x0d, 0x0a, 0x03, 0xff, 0x8e, 0x6e, 0x13, 0xff, 0xd4, 0xa4, 0x19, 0xff, 0xcf, 0x9e, 0x13, 0xff, 0xcd, 0x9c, 0x12, 0xff, 0xcb, 0x99, 0x13, 0xff, 0xcb, 0x99, 0x13, 0xff, 0xca, 0x99, 0x14, 0xff, 0xca, 0x98, 0x13, 0xff, 0xcb, 0x99, 0x12, 0xff, 0xce, 0x9d, 0x12, 0xff, 0xd5, 0xa4, 0x1a, 0xff, 0xa0, 0x7e, 0x19, 0xff, 0x19, 0x13, 0x04, 0xff, 0x07, 0x06, 0x05, 0xff, 0x8b, 0x69, 0x0e, 0xff, 0xca, 0x99, 0x14, 0xff, 0xc9, 0x97, 0x14, 0xff, 0xc8, 0x94, 0x15, 0xff, 0xce, 0x93, 0x14, 0xff, 0xd5, 0x94, 0x1a, 0xff, 0xdb, 0x99, 0x34, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xaa, 0x5e, 0x01, 0xda, 0x98, 0x2e, 0x9a, 0xd5, 0x92, 0x14, 0xff, 0xcd, 0x90, 0x12, 0xff, 0xc5, 0x90, 0x13, 0xff, 0xc4, 0x92, 0x11, 0xff, 0xc8, 0x96, 0x10, 0xff, 0x88, 0x6a, 0x1c, 0xff, 0xb2, 0x88, 0x14, 0xff, 0xca, 0x99, 0x0e, 0xff, 0xcc, 0x9a, 0x0f, 0xff, 0xcd, 0x9b, 0x10, 0xff, 0xcc, 0x9a, 0x0f, 0xff, 0xcb, 0x9a, 0x10, 0xff, 0xcc, 0x9b, 0x0f, 0xff, 0xcc, 0x9b, 0x10, 0xff, 0xcc, 0x9a, 0x10, 0xff, 0xcb, 0x99, 0x0f, 0xff, 0xcc, 0x9b, 0x0f, 0xff, 0xcc, 0x9a, 0x0f, 0xff, 0xca, 0x99, 0x0e, 0xff, 0xbf, 0x91, 0x12, 0xff, 0x75, 0x5b, 0x18, 0xff, 0xc0, 0x92, 0x16, 0xff, 0xc6, 0x94, 0x12, 0xff, 0xc6, 0x91, 0x14, 0xff, 0xcc, 0x91, 0x14, 0xff, 0xd5, 0x92, 0x18, 0xff, 0xd9, 0x98, 0x2f, 0xb7, 0xe3, 0xa6, 0x54, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0xa9, 0x5c, 0x02, 0xda, 0x98, 0x30, 0x88, 0xd6, 0x92, 0x1c, 0xfe, 0xcf, 0x8f, 0x12, 0xff, 0xc4, 0x8d, 0x13, 0xff, 0xc2, 0x8e, 0x11, 0xff, 0xc3, 0x90, 0x10, 0xff, 0xc5, 0x92, 0x0e, 0xff, 0xc7, 0x94, 0x0e, 0xff, 0xc8, 0x95, 0x0e, 0xff, 0xc8, 0x96, 0x0e, 0xff, 0xc9, 0x97, 0x0e, 0xff, 0xc9, 0x97, 0x0e, 0xff, 0xca, 0x98, 0x0e, 0xff, 0xca, 0x97, 0x0e, 0xff, 0xc9, 0x97, 0x0e, 0xff, 0xc9, 0x97, 0x0e, 0xff, 0xc9, 0x96, 0x0e, 0xff, 0xc8, 0x95, 0x0e, 0xff, 0xc7, 0x94, 0x0e, 0xff, 0xc6, 0x93, 0x0f, 0xff, 0xc5, 0x92, 0x11, 0xff, 0xc4, 0x90, 0x13, 0xff, 0xc6, 0x8f, 0x14, 0xff, 0xce, 0x90, 0x15, 0xff, 0xd5, 0x93, 0x1e, 0xff, 0xda, 0x98, 0x32, 0xa5, 0xe3, 0xa6, 0x56, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x9f, 0x51, 0x55, 0xd9, 0x9a, 0x41, 0xee, 0xd2, 0x91, 0x20, 0xff, 0xc7, 0x8c, 0x12, 0xff, 0xc1, 0x8b, 0x12, 0xff, 0xc1, 0x8d, 0x10, 0xff, 0xc2, 0x8e, 0x0f, 0xff, 0xc3, 0x90, 0x0e, 0xff, 0xc5, 0x91, 0x0e, 0xff, 0xc5, 0x92, 0x0e, 0xff, 0xc5, 0x92, 0x0e, 0xff, 0xc6, 0x93, 0x0e, 0xff, 0xc6, 0x93, 0x0e, 0xff, 0xc5, 0x92, 0x0e, 0xff, 0xc5, 0x92, 0x0e, 0xff, 0xc5, 0x92, 0x0e, 0xff, 0xc4, 0x90, 0x0e, 0xff, 0xc3, 0x8f, 0x11, 0xff, 0xc3, 0x8e, 0x13, 0xff, 0xc3, 0x8d, 0x16, 0xff, 0xc8, 0x8e, 0x19, 0xff, 0xd1, 0x91, 0x24, 0xff, 0xd8, 0x9a, 0x3f, 0xf7, 0xdc, 0x9f, 0x4f, 0x6d, 0xe6, 0xab, 0x63, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xab, 0x6f, 0x1c, 0xdd, 0xa5, 0x64, 0xb2, 0xd8, 0x9a, 0x42, 0xff, 0xce, 0x8e, 0x1a, 0xff, 0xc4, 0x8a, 0x12, 0xff, 0xbf, 0x8a, 0x12, 0xff, 0xc0, 0x8b, 0x11, 0xff, 0xc1, 0x8c, 0x10, 0xff, 0xc1, 0x8d, 0x0f, 0xff, 0xc2, 0x8e, 0x0f, 0xff, 0xc2, 0x8e, 0x0e, 0xff, 0xc2, 0x8e, 0x0e, 0xff, 0xc2, 0x8d, 0x0e, 0xff, 0xc1, 0x8d, 0x0f, 0xff, 0xc0, 0x8c, 0x0f, 0xff, 0xc0, 0x8b, 0x12, 0xff, 0xc2, 0x8c, 0x18, 0xff, 0xc5, 0x8c, 0x1b, 0xff, 0xcd, 0x90, 0x24, 0xff, 0xd6, 0x99, 0x42, 0xff, 0xdc, 0xa4, 0x61, 0xc4, 0xe0, 0xaa, 0x6d, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0xb2, 0x80, 0x50, 0xde, 0xaa, 0x6e, 0xdb, 0xd6, 0x99, 0x41, 0xff, 0xcc, 0x8d, 0x1d, 0xff, 0xc4, 0x89, 0x16, 0xff, 0xbf, 0x88, 0x13, 0xff, 0xbe, 0x88, 0x12, 0xff, 0xbe, 0x88, 0x11, 0xff, 0xbe, 0x89, 0x10, 0xff, 0xbe, 0x89, 0x10, 0xff, 0xbe, 0x89, 0x11, 0xff, 0xbd, 0x88, 0x11, 0xff, 0xbf, 0x88, 0x14, 0xff, 0xc5, 0x8b, 0x1d, 0xff, 0xcd, 0x8f, 0x26, 0xff, 0xd5, 0x99, 0x43, 0xff, 0xdd, 0xa8, 0x6a, 0xe4, 0xe1, 0xb0, 0x7b, 0x60, 0xe7, 0xb8, 0x85, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0xbf, 0x97, 0x06, 0xe4, 0xb9, 0x8f, 0x6c, 0xdf, 0xae, 0x79, 0xe6, 0xd7, 0x9c, 0x4c, 0xff, 0xcf, 0x90, 0x27, 0xff, 0xc8, 0x8a, 0x18, 0xff, 0xc4, 0x89, 0x18, 0xff, 0xc2, 0x88, 0x17, 0xff, 0xc2, 0x88, 0x18, 0xff, 0xc3, 0x88, 0x16, 0xff, 0xc7, 0x8a, 0x19, 0xff, 0xce, 0x91, 0x2e, 0xff, 0xd7, 0x9d, 0x50, 0xff, 0xdf, 0xad, 0x76, 0xec, 0xe3, 0xb6, 0x8a, 0x78, 0xe7, 0xbd, 0x93, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0xc3, 0x9f, 0x0a, 0xe6, 0xbd, 0x98, 0x6c, 0xe1, 0xb3, 0x85, 0xdc, 0xdb, 0xa5, 0x65, 0xff, 0xd6, 0x9a, 0x48, 0xff, 0xd3, 0x95, 0x3d, 0xff, 0xd3, 0x95, 0x3d, 0xff, 0xd6, 0x9a, 0x47, 0xff, 0xdb, 0xa5, 0x64, 0xff, 0xe1, 0xb2, 0x84, 0xe1, 0xe5, 0xbc, 0x96, 0x75, 0xe9, 0xc2, 0x9f, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0xc4, 0xa2, 0x03, 0xe7, 0xc0, 0x9c, 0x46, 0xe4, 0xbb, 0x95, 0x9a, 0xe3, 0xb8, 0x8f, 0xd8, 0xe3, 0xb8, 0x8f, 0xd9, 0xe4, 0xbb, 0x95, 0x9d, 0xe7, 0xc0, 0x9c, 0x4a, 0xea, 0xc4, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
826.382979
960
0.666014
e23866a728f2086d08ac4c1002c43e651eac59c7
27,906
c
C
utils/1l/asm.c
kryptine/inferno-3
a0249d7e6e3176eff94b4fab5a68bbab3aa479de
[ "MIT" ]
4
2021-03-24T20:50:09.000Z
2021-03-26T20:24:57.000Z
utils/1l/asm.c
kryptine/inferno-3
a0249d7e6e3176eff94b4fab5a68bbab3aa479de
[ "MIT" ]
null
null
null
utils/1l/asm.c
kryptine/inferno-3
a0249d7e6e3176eff94b4fab5a68bbab3aa479de
[ "MIT" ]
1
2021-08-08T07:20:04.000Z
2021-08-08T07:20:04.000Z
#include "l.h" short opa[20]; short *op; long entryvalue(void) { char *a; Sym *s; a = INITENTRY; if(*a >= '0' && *a <= '9') return atolwhex(a); s = lookup(a, 0); if(s->type == 0) return INITTEXT; if(s->type != STEXT) diag("entry not text: %s", s->name); return s->value; } void asmb(void) { Prog *p; long v; int a; short *op1; if(debug['v']) Bprint(&bso, "%5.2f asmb\n", cputime()); Bflush(&bso); seek(cout, HEADR, 0); pc = INITTEXT; curp = firstp; for(p = firstp; p != P; p = p->link) { if(p->as == ATEXT) curtext = p; if(p->pc != pc) { if(!debug['a']) print("%P\n", curp); diag("phase error %.4lux sb %.4lux in %s\n", p->pc, pc, TNAME); pc = p->pc; } curp = p; if(debug['a']) Bprint(&bso, "%lux:%P\n", pc, curp); asmins(p); if(cbc < sizeof(opa)) cflush(); for(op1 = opa; op1 < op; op1++) { a = *op1; *cbp++ = a >> 8; *cbp++ = a; } a = 2*(op - opa); pc += a; cbc -= a; if(debug['a']) { for(op1 = opa; op1 < op; op1++) if(op1 == opa) Bprint(&bso, "\t\t%4ux", *op1 & 0xffff); else Bprint(&bso, " %4ux", *op1 & 0xffff); if(op != opa) Bprint(&bso, "\n"); } } cflush(); switch(HEADTYPE) { case 0: /* this is garbage */ seek(cout, rnd(HEADR+textsize, 8192), 0); break; case 1: /* plan9 boot data goes into text */ seek(cout, rnd(HEADR+textsize, INITRND), 0); break; case 2: /* plan 9 */ seek(cout, HEADR+textsize, 0); break; case 3: /* next boot */ seek(cout, HEADR+rnd(textsize, INITRND), 0); break; case 4: /* preprocess pilot */ seek(cout, HEADR+textsize, 0); break; } if(debug['v']) Bprint(&bso, "%5.2f datblk\n", cputime()); Bflush(&bso); for(v = 0; v < datsize; v += sizeof(buf)-100) { if(datsize-v > sizeof(buf)-100) datblk(v, sizeof(buf)-100); else datblk(v, datsize-v); } symsize = 0; spsize = 0; lcsize = 0; relocsize = 0; Bflush(&bso); switch(HEADTYPE) { default: seek(cout, rnd(HEADR+textsize, 8192)+datsize, 0); break; case 1: /* plan9 boot data goes into text */ seek(cout, rnd(HEADR+textsize, INITRND)+datsize, 0); break; case 2: /* plan 9 */ seek(cout, HEADR+textsize+datsize, 0); break; case 3: /* next boot */ seek(cout, HEADR+rnd(textsize, INITRND)+datsize, 0); break; case 4: /* preprocess pilot */ seek(cout, HEADR+textsize+datsize, 0); break; } if(!debug['s']) { if(debug['v']) Bprint(&bso, "%5.2f sym\n", cputime()); asmsym(); } Bflush(&bso); if(!debug['s']) { if(debug['v']) Bprint(&bso, "%5.2f sp\n", cputime()); asmsp(); } Bflush(&bso); if(!debug['s']) { if(debug['v']) Bprint(&bso, "%5.2f pc\n", cputime()); asmlc(); } Bflush(&bso); if(!debug['s']) { if(debug['v']) Bprint(&bso, "%5.2f reloc\n", cputime()); asmreloc(); } cflush(); if(debug['v']) Bprint(&bso, "%5.2f headr\n", cputime()); Bflush(&bso); seek(cout, 0L, 0); switch(HEADTYPE) { default: lput(0x160L<<16); /* magic and sections */ lput(0L); /* time and date */ lput(rnd(HEADR+textsize, 4096)+datsize); lput(symsize); /* nsyms */ lput((0x38L<<16)|7L); /* size of optional hdr and flags */ lput((0413<<16)|0437L); /* magic and version */ lput(rnd(HEADR+textsize, 4096)); /* sizes */ lput(datsize); lput(bsssize); lput(entryvalue()); /* va of entry */ lput(INITTEXT-HEADR); /* va of base of text */ lput(INITDAT); /* va of base of data */ lput(INITDAT+datsize); /* va of base of bss */ lput(~0L); /* gp reg mask */ lput(0L); lput(0L); lput(0L); lput(0L); lput(~0L); /* gp value ?? */ break; case 1: /* plan9 boot data goes into text */ lput(0407); /* magic */ lput(rnd(HEADR+textsize, INITRND)-HEADR+datsize); /* sizes */ lput(0); lput(bsssize); lput(symsize); /* nsyms */ lput(entryvalue()); /* va of entry */ lput(spsize); /* sp offsets */ lput(lcsize); /* line offsets */ break; case 2: /* plan 9 */ lput(0407); /* magic */ lput(textsize); /* sizes */ lput(datsize); lput(bsssize); lput(symsize); /* nsyms */ lput(entryvalue()); /* va of entry */ lput(spsize); /* sp offsets */ lput(lcsize); /* line offsets */ break; case 3: /* next boot */ /* header */ lput(0xfeedfaceL); /* magic */ lput(6); /* 68040 */ lput(1); /* more 68040 */ lput(5); /* file type 'boot' */ lput(HEADTYPE); /* number commands */ lput(HEADR-7*4); /* sizeof commands */ lput(1); /* no undefineds */ /* command 1 text */ lput(1); /* command = 'segment' */ lput(124); /* command size */ s16put("__TEXT"); /* botch?? entryvalue() */ lput(INITTEXT); /* va of start */ lput(rnd(textsize, 8192)); /* va size */ lput(HEADR); /* file offset */ lput(rnd(textsize, 8192)); /* file size */ lput(7); /* max prot */ lput(7); /* init prot */ lput(1); /* number of sections */ lput(0); /* flags */ /* text section */ s16put("__text"); s16put("__TEXT"); /* botch?? entryvalue() */ lput(INITTEXT); /* va of start */ lput(textsize); /* va size */ lput(HEADR); /* file offset */ lput(2); /* align */ lput(0); /* reloff */ lput(0); /* nreloc */ lput(0); /* flags */ lput(0); /* reserved1 */ lput(0); /* reserved2 */ /* command 1 data */ lput(1); /* command = 'segment' */ lput(192); /* command size */ s16put("__DATA"); lput(INITDAT); /* va of start */ lput(rnd(datsize, 8192)); /* va size */ lput(HEADR+rnd(textsize, 8192)); /* file offset */ lput(rnd(datsize, 8192)); /* file size */ lput(7); /* max prot */ lput(7); /* init prot */ lput(2); /* number of sections */ lput(0); /* flags */ /* data section */ s16put("__data"); s16put("__DATA"); lput(INITDAT); /* va of start */ lput(datsize); /* va size */ lput(HEADR+rnd(textsize, 8192)); /* file offset */ lput(2); /* align */ lput(0); /* reloff */ lput(0); /* nreloc */ lput(0); /* flags */ lput(0); /* reserved1 */ lput(0); /* reserved2 */ /* bss section */ s16put("__bss"); s16put("__DATA"); lput(INITDAT+datsize); /* va of start */ lput(bsssize); /* va size */ lput(0); /* file offset */ lput(2); /* align */ lput(0); /* reloff */ lput(0); /* nreloc */ lput(1); /* flags = zero fill */ lput(0); /* reserved1 */ lput(0); /* reserved2 */ /* command 2 symbol */ lput(2); /* command = 'symbol' */ lput(24); /* command size */ lput(HEADR+rnd(textsize, INITRND) +datsize); /* symoff */ lput(symsize); /* nsyms */ lput(spsize); /* sp offsets */ lput(lcsize); /* line offsets */ break; case 4: /* preprocess pilot */ lput(0407); /* magic */ lput(textsize); /* sizes */ lput(datsize); lput(bsssize); lput(symsize); /* nsyms */ lput(entryvalue()); /* va of entry */ lput(spsize); /* sp offsets */ lput(lcsize); /* line offsets */ lput(relocsize); /* relocation */ break; } cflush(); } void asmins(Prog *p) { Optab *o; int t, a, b; long v; op = opa + 1; if(special[p->from.type]) switch(p->from.type) { case D_CCR: if(p->as != AMOVW) goto bad; a = asmea(p, &p->to); if((a & 0170) == 010) goto bad; opa[0] = 0x42c0 | a; /* mov from ccr */ return; case D_SR: if(p->as != AMOVW) goto bad; a = asmea(p, &p->to); if((a & 0170) == 010) goto bad; opa[0] = 0x40c0 | a; /* mov from sr */ return; case D_USP: if(p->as != AMOVL) goto bad; a = asmea(p, &p->to); if((a & 0170) == 010) { opa[0] = 0x4e68|(a&7); /* mov usp An */ return; } t = 0x800; goto movec1; case D_SFC: t = 0x000; goto movec1; case D_DFC: t = 0x001; goto movec1; case D_CACR: t = 0x002; goto movec1; case D_TC: t = 0x003; goto movec1; case D_ITT0: t = 0x004; goto movec1; case D_ITT1: t = 0x005; goto movec1; case D_DTT0: t = 0x006; goto movec1; case D_DTT1: t = 0x007; goto movec1; case D_VBR: t = 0x801; goto movec1; case D_CAAR: t = 0x802; goto movec1; case D_MSP: t = 0x803; goto movec1; case D_ISP: t = 0x804; goto movec1; case D_MMUSR: t = 0x805; goto movec1; case D_URP: t = 0x806; goto movec1; case D_SRP: t = 0x807; goto movec1; movec1: if(p->as != AMOVL) goto bad; opa[0] = 0x4e7a; /* mov spc Dn */ a = asmea(p, &p->to); b = a & 0170; if(b == 0 || b == 010) { *op++ = (a<<12) | t; return; } goto bad; case D_FPCR: t = 0xb000; goto movec3; case D_FPSR: t = 0xa800; goto movec3; case D_FPIAR: t = 0xa400; movec3: if(p->as != AMOVL) goto bad; op++; a = asmea(p, &p->to); opa[0] = optab[AFMOVEL].opcode0 | a; opa[1] = t; return; } if(special[p->to.type]) switch(p->to.type) { case D_CCR: if(p->as != AMOVW) /* botch, needs and, eor etc. */ goto bad; a = asmea(p, &p->from); if((a & 0170) == 010) goto bad; opa[0] = 0x44c0 | a; /* mov to ccr */ return; case D_SR: if(p->as != AMOVW) /* botch, needs and, eor etc. */ goto bad; a = asmea(p, &p->from); if((a & 0170) == 010) goto bad; opa[0] = 0x46c0 | a; /* mov to sr */ return; case D_USP: if(p->as != AMOVL) goto bad; a = asmea(p, &p->from); if((a & 0170) == 010) { opa[0] = 0x4e60|(a&7); /* mov An usp */ return; } t = 0x800; goto movec2; case D_SFC: t = 0x000; goto movec2; case D_DFC: t = 0x001; goto movec2; case D_CACR: t = 0x002; goto movec2; case D_TC: t = 0x003; goto movec2; case D_ITT0: t = 0x004; goto movec2; case D_ITT1: t = 0x005; goto movec2; case D_DTT0: t = 0x006; goto movec2; case D_DTT1: t = 0x007; goto movec2; case D_VBR: t = 0x801; goto movec2; case D_CAAR: t = 0x802; goto movec2; case D_MSP: t = 0x803; goto movec2; case D_ISP: t = 0x804; goto movec2; case D_MMUSR: t = 0x805; goto movec2; case D_URP: t = 0x806; goto movec2; case D_SRP: t = 0x807; goto movec2; movec2: if(p->as != AMOVL) goto bad; opa[0] = 0x4e7b; /* mov Dn spc */ a = asmea(p, &p->from); b = a & 0170; if(b == 0 || b == 010) { *op++ = (a<<12) | t; return; } goto bad; case D_FPCR: t = 0x9000; goto movec4; case D_FPSR: t = 0x8800; goto movec4; case D_FPIAR: t = 0x8400; movec4: if(p->as != AMOVL) goto bad; op++; a = asmea(p, &p->from); opa[0] = optab[AFMOVEL].opcode0 | a; opa[1] = t; return; } o = &optab[p->as]; t = o->opcode0; switch(o->optype) { case 0: /* pseudo ops */ if(p->as != ATEXT && p->as != ANOP) { if(!debug['a']) print("%P\n", p); diag("unimplemented instruction in %s\n", TNAME); return; } op = opa; return; case 1: /* branches */ if(p->to.type != D_BRANCH) goto bad; a = asmea(p, &p->to); if(a == 071) t = o->opcode1; t |= a; break; case 2: /* move */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((a & 0170) == 0110) { /* src quick */ t = o->opcode1; if((b & 0170) != 0) goto bad; t |= a >> 7; t |= b << 9; break; } t |= a; t |= (b&7) << 9; t |= (b&070) << 3; break; case 3: /* add */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((a & 0170) == 0110) { /* src quick */ t = o->opcode1; t |= (a&01600) << 2; t |= b; break; } if((b & 0170) == 0) { /* dst Dn */ t |= a; t |= (b & 7) << 9; break; } if((b & 0170) == 010) { /* dst An */ if((t & 0xc0) == 0) goto bad; t = o->opcode2; t |= a; t |= (b & 7) << 9; break; } if((a & 0170) == 0) { /* src Dn */ t |= 0x100; t |= (a & 7) << 9; t |= b; break; } if((a & 0177) == 074) { /* src immed */ t = o->opcode3; t |= b; break; } goto bad; case 4: /* no operands */ break; case 5: /* tst */ t |= asmea(p, &p->to); if((t&0170) == 010) goto bad; break; case 6: /* lea */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((b & 0170) != 010) goto bad; t |= a; t |= (b & 7) << 9; break; case 7: /* cmp */ b = asmea(p, &p->to); a = asmea(p, &p->from); if((a & 0170) == 010) { /* dst An */ t = o->opcode1; if(t == 0) /* cmpb illegal */ goto bad; t |= 0xc0; t |= b; t |= (a & 7) << 9; break; } if((b & 0177) == 074) { /* src immed */ t = o->opcode2; t |= a; break; } if((a & 0170) == 0) { /* dst Dn */ t |= b; t |= (a&7) << 9; break; } if((b&0170) == 030 && (a&0170) == 030) { /* (A)+,(A)+ */ t = o->opcode3; t |= b & 7; t |= (a & 7) << 9; break; } goto bad; case 8: /* svc */ *op++ = optab[ARTS].opcode0; break; case 9: /* and */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((a & 0170) == 010) goto bad; if((b & 0170) == 0) { /* dst Dn */ t |= a; t |= (b&7) << 9; break; } if((a & 0170) == 0) { /* src Dn */ t = o->opcode1; t |= b; t |= (a&7) << 9; break; } if((a & 0177) == 074) { /* src immed */ t = o->opcode2; t |= b; break; } goto bad; case 10: /* eor */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((a & 0170) == 010) goto bad; if((a & 0170) == 0) { /* src Dn */ t |= b; t |= (a&7) << 9; break; } if((a & 0177) == 074) { /* src immed */ t = o->opcode1; t |= b; break; } goto bad; case 11: /* ext */ b = asmea(p, &p->to); if((b & 0170) == 0) { /* dst Dn */ t |= b; break; } goto bad; case 12: /* shift */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((b & 0170) == 0) { /* dst Dn */ if((a & 0177) == 0110) { /* src quick */ t |= (a & 01600) << 2; t |= b; break; } if((a & 0170) == 0) { /* src Dn */ t |= 0x20; t |= a << 9; t |= b; break; } goto bad; } goto bad; case 13: /* mul, div short */ a = asmea(p, &p->from); b = asmea(p, &p->to); if((b & 0170) == 0) { /* dst Dn */ if((a & 0170) == 010) goto bad; t |= a; t |= b << 9; break; } goto bad; case 14: /* mul, div long */ *op++ = o->opcode1; a = asmea(p, &p->from); b = asmea(p, &p->to); if((b & 0170) == 0) { /* dst Dn */ if((a & 0170) == 010) goto bad; t |= a; opa[1] |= b << 12; opa[1] |= b+1; break; } goto bad; case 15: /* dec and branch */ if(p->to.type != D_BRANCH) goto bad; v = p->pcond->pc - p->pc - 2; if(v < -32768L || v >= 32768L) goto bad; *op++ = v; a = asmea(p, &p->from); if((a & 0170) != 0) goto bad; t |= a; break; case 16: /* fmove */ *op++ = o->opcode1; a = asmea(p, &p->from); b = asmea(p, &p->to); if((a & 0170) == 0100) { /* src Fn */ if((b & 0170) == 0100) { /* both Fn */ opa[1] |= (a&7) << 10; opa[1] |= (b&7) << 7; break; } t |= b; opa[1] = o->opcode2; opa[1] |= (a&7) << 7; break; } if((b & 0170) != 0100) /* dst Fn */ goto bad; t |= a; opa[1] = o->opcode3; opa[1] |= (b&7) << 7; break; case 17: /* floating ea,Fn */ *op++ = o->opcode1; a = asmea(p, &p->from); b = asmea(p, &p->to); if((b & 0170) != 0100) /* dst Fn */ goto bad; if((a & 0170) == 0100) { /* both Fn */ opa[1] |= (a&7) << 10; opa[1] |= (b&7) << 7; break; } t |= a; opa[1] = o->opcode2; opa[1] |= (b&7) << 7; break; case 18: /* floating branchs */ if(p->to.type != D_BRANCH) goto bad; v = p->pcond->pc - p->pc - 2; if(v < -32768L || v >= 32768L) goto bad; *op++ = v; break; case 19: /* floating dec and branch */ if(p->to.type != D_BRANCH) goto bad; *op++ = o->opcode1; v = p->pcond->pc - p->pc - 2; if(v < -32768L || v >= 32768L) goto bad; *op++ = v; a = asmea(p, &p->from); if((a & 0170) != 0) goto bad; t |= a; break; case 20: /* ftst ea */ *op++ = o->opcode1; if(p->from.type != D_NONE) goto bad; a = asmea(p, &p->to); if((a & 0170) == 0100) { /* Fn */ opa[1] |= (a&7) << 10; break; } t |= a; opa[1] = o->opcode2; break; case 21: /* fneg */ *op++ = o->opcode1; if(p->from.type == D_NONE) { b = asmea(p, &p->to); a = b; } else { a = asmea(p, &p->from); b = asmea(p, &p->to); } if((b & 0170) != 0100) /* dst Fn */ goto bad; if((a & 0170) == 0100) { /* both Fn */ opa[1] |= (a&7) << 10; opa[1] |= (b&7) << 7; break; } t |= a; opa[1] = o->opcode2; opa[1] |= (b&7) << 7; break; case 22: /* floating cmp Fn,ea */ *op++ = o->opcode1; a = asmea(p, &p->from); b = asmea(p, &p->to); if((a & 0170) != 0100) /* dst Fn */ goto bad; if((b & 0170) == 0100) { /* both Fn */ opa[1] |= (b&7) << 10; opa[1] |= (a&7) << 7; break; } t |= b; opa[1] = o->opcode2; opa[1] |= (a&7) << 7; break; case 23: /* word, long */ op = opa; a = asmea(p, &p->to); if(a == ((7<<3)|4)) return; if(a == ((7<<3)|1)) { if(p->as == AWORD) { op = opa; *op++ = opa[1]; } return; } if(a == ((7<<3)|0)) { if(p->as == ALONG) { *op++ = opa[0]; opa[0] = 0; } return; } goto bad; case 24: /* bit field */ a = ((p->to.field&31)<<6) | (p->from.field&31); if(p->as == ABFINS) { b = asmea(p, &p->from); if((b&0170) != 0) goto bad; a |= b<<12; *op++ = a; a = asmea(p, &p->to); } else { if(p->to.type != D_NONE) { b = asmea(p, &p->to); if((b&0170) != 0) goto bad; a |= b<<12; } *op++ = a; a = asmea(p, &p->from); } t |= a; a &= 0170; if(a == 010 || a == 030 || a == 040 || a == 074) goto bad; break; case 25: /* movem */ if(p->from.type == D_CONST) { /* registers -> memory */ asmea(p, &p->from); a = asmea(p, &p->to); if(a == 074) goto bad; b = a & 0170; if(b == 000 || b == 010 || b == 030) goto bad; t |= a; break; } if(p->to.type == D_CONST) { /* memory -> registers */ t |= 0x400; asmea(p, &p->to); a = asmea(p, &p->from); if(a == 074) goto bad; b = a & 0170; if(b == 000 || b == 010 || b == 040) goto bad; t |= a; break; } goto bad; case 26: /* chk */ a = asmea(p, &p->from); if((a&0170) == 010) goto bad; b = asmea(p, &p->to); if((b&0170) != 0) goto bad; t |= a; t |= b<<9; break; case 27: /* btst */ a = asmea(p, &p->from); if(a == 074) { t = o->opcode1; } else if((a&0170) != 0) goto bad; b = asmea(p, &p->to); if(b == 074 || (b&0170) == 010) goto bad; t |= b; break; case 28: /* fmovem */ if(p->from.type == D_CONST) { /* registers -> memory */ b = p->from.offset & 0xff; b |= 0xf000; /* control or postinc */ *op++ = b; a = asmea(p, &p->to); if(a == 074) goto bad; b = a & 0170; if(b == 000 || b == 010 || b == 030) goto bad; if(b == 040) op[-1] &= ~0x1000; /* predec */ t |= a; break; } if(p->to.type == D_CONST) { /* memory -> registers */ b = p->to.offset & 0xff; b |= 0xd000; /* control or postinc */ *op++ = b; a = asmea(p, &p->from); if(a == 074) goto bad; b = a & 0170; if(b == 000 || b == 010 || b == 040) goto bad; t |= a; break; } goto bad; case 29: /* fmovemc */ if(p->from.type == D_CONST) { /* registers -> memory */ b = (p->from.offset & 0x7) << 10; b |= 0xa000; *op++ = b; a = asmea(p, &p->to); if(a == 074) goto bad; b = a & 0170; if(b == 000 || b == 010 || b == 030) goto bad; t |= a; break; } if(p->to.type == D_CONST) { /* memory -> registers */ b = (p->to.offset & 0x7) << 10; b |= 0x8000; *op++ = b; a = asmea(p, &p->from); if(a == 074) goto bad; b = a & 0170; if(b == 000 || b == 010 || b == 040) goto bad; t |= a; break; } goto bad; case 30: /* trap */ if(p->to.type == D_CONST) { t |= p->to.offset & 0xf; break; } goto bad; case 31: /* chk2, cmp2 */ b = asmea(p, &p->to); a = b & 0170; if(a == 000 || a == 010) { *op++ = o->opcode1 | (b << 12); t |= asmea(p, &p->from); break; } goto bad; case 32: /* casew */ /* jmp (0,pc,r0.w*1) */ casepc = p->pc; *op++ = o->opcode1; break; case 34: /* moves */ op++; a = asmea(p, &p->from); b = a & 0170; if(b == 0 || b == 010) { opa[1] = (a << 12) | 0x800; b = asmea(p, &p->to); a = b & 0170; if(a == 0 || a == 010) goto bad; t |= b; break; } t |= a; b = asmea(p, &p->to); a = b & 0170; if(a != 0 && a != 010) goto bad; opa[1] = (b << 12); break; case 35: /* swap */ a = asmea(p, &p->to); if((a & 0170) == 0) { t |= a; break; } goto bad; } opa[0] = t; return; bad: if(!debug['a']) print("%P\n", p); diag("bad combination of addressing in %s\n", TNAME); opa[0] = 0; } int asmea(Prog *p, Adr *a) { Optab *o; int f, t, r, i; long v; t = a->type; r = simple[t]; v = a->offset; if(r != 0177) { if(v == 0) return r; if((r & 070) != 020) return r; if(v >= -32768L && v < 32768L) { *op++ = v; return t-D_A0-I_INDIR+050; /* d(Ax) */ } goto toobig; } f = 0; if(a == &p->from) f++; o = &optab[p->as]; switch(t) { case D_TOS: if(f) { if(o->srcsp) return (3<<3) | 7; /* (A7)+ */ } else if(o->dstsp) return (4<<3) | 7; /* -(A7) */ return (2<<3) | 7; /* (A7) */ case D_BRANCH: v = p->pcond->pc - p->pc - 2; if(v < -32768L || v >= 32768L) { if(p->as == ABSR || p->as == ABRA) { v = p->pcond->pc; *op++ = v>>16; *op++ = v; return (7<<3) | 1; } goto toobig; } if(v < -128 || v >= 128 || p->mark == 4) { *op++ = v; return 0; } return v & 0xff; case I_ADDR|D_STATIC: case I_ADDR|D_EXTERN: t = a->sym->type; if(t == 0 || t == SXREF) { diag("undefined external: %s in %s\n", a->sym->name, TNAME); a->sym->type = SDATA; } v = a->sym->value + a->offset; if(t != STEXT) v += INITDAT; if(strcmp(a->sym->name, "a6base")) break; case D_CONST: switch(f? o->srcsp: o->dstsp) { case 4: *op++ = v>>16; case 2: *op++ = v; break; default: diag("unknown srcsp asmea in %s\n", TNAME); } return (7<<3) | 4; case D_FCONST: r = f? o->srcsp: o->dstsp; for(i=0; i<r; i++) ((char*)op)[i] = gnuxi(&a->ieee, i, r); op += r/2; return (7<<3) | 4; case D_QUICK: v = a->offset & 0xff; return 0110 | (v<<7); case D_STACK: case D_AUTO: case D_PARAM: if(v == 0) return (2<<3) | 7; /* (A7) */ if(v >= -32768L && v < 32768L) { *op++ = v; return (5<<3) | 7; /* d(A7) */ } goto toobig; case I_INDIR|D_CONST: if(v >= -32768L && v < 32768L) { *op++ = v; return (7<<3) | 0; } *op++ = v>>16; *op++ = v; return (7<<3) | 1; case D_STATIC: case D_EXTERN: t = a->sym->type; if(t == 0 || t == SXREF) { diag("undefined external: %s in %s\n", a->sym->name, TNAME); a->sym->type = SDATA; } if(t == STEXT) { if(HEADTYPE == 4) { v = a->sym->value + a->offset - p->pc - 2; if(v >= -32768L && v < 32768L) { *op++ = v; return (7<<3) | 2; } goto toobig; } v = a->sym->value + a->offset; *op++ = v>>16; *op++ = v; return (7<<3) | 1; } v = a->sym->value + a->offset - A6OFFSET; if(v < -32768L || v >= 32768L) { v += INITDAT + A6OFFSET; if(v >= -32768L && v < 32768L) { *op++ = v; return (7<<3) | 0; } *op++ = v>>16; *op++ = v; return (7<<3) | 1; } if(v == 0) return (2<<3) | 6; *op++ = v; return (5<<3) | 6; } if(!debug['a']) print("%P\n", p); diag("unknown addressing mode: %d in %s", t, TNAME); return 0; if(!debug['a']) print("%P\n", p); diag("bad operand in %s", TNAME); return 0; toobig: if(!debug['a']) print("%P\n", p); diag("addressing mode >> 2^16: %d in %s", t, TNAME); return 0; } void lput(long l) { CPUT(l>>24) CPUT(l>>16) CPUT(l>>8) CPUT(l) } void s16put(char *n) { char name[16]; int i; strncpy(name, n, sizeof(name)); for(i=0; i<sizeof(name); i++) CPUT(name[i]) } void cflush(void) { int n; n = sizeof(buf.cbuf) - cbc; if(n) write(cout, buf.cbuf, n); cbp = buf.cbuf; cbc = sizeof(buf.cbuf); } void datblk(long s, long n) { Prog *p; char *cast; long l, fl, j; int i, c; memset(buf.dbuf, 0, n+100); for(p = datap; p != P; p = p->link) { curp = p; l = p->from.sym->value + p->from.offset - s; c = p->from.displace; i = 0; if(l < 0) { if(l+c <= 0) continue; while(l < 0) { l++; i++; } } if(l >= n) continue; for(j=l+(c-i)-1; j>=l; j--) if(buf.dbuf[j]) { print("%P\n", p); diag("multiple initialization\n"); break; } switch(p->to.type) { case D_FCONST: switch(c) { default: case 4: fl = ieeedtof(&p->to.ieee); cast = (char*)&fl; if(debug['a'] && i == 0) { Bprint(&bso, "%lux:%P\n\t\t", l+s+INITDAT, curp); for(j=0; j<c; j++) Bprint(&bso, "%.2ux", cast[fnuxi8[j+4]] & 0xff); Bprint(&bso, "\n"); } for(; i<c; i++) { buf.dbuf[l] = cast[fnuxi8[i+4]]; l++; } break; case 8: cast = (char*)&p->to.ieee; if(debug['a'] && i == 0) { Bprint(&bso, "%lux:%P\n\t\t", l+s+INITDAT, curp); for(j=0; j<c; j++) Bprint(&bso, "%.2ux", cast[fnuxi8[j]] & 0xff); Bprint(&bso, "\n"); } for(; i<c; i++) { buf.dbuf[l] = cast[fnuxi8[i]]; l++; } break; } break; case D_SCONST: if(debug['a'] && i == 0) { Bprint(&bso, "%.4lux:%P\n\t\t", l+s+INITDAT, curp); for(j=0; j<c; j++) Bprint(&bso, "%.2ux", p->to.scon[j] & 0xff); Bprint(&bso, "\n"); } for(; i<c; i++) { buf.dbuf[l] = p->to.scon[i]; l++; } break; default: fl = p->to.offset; if(p->to.sym) { if(p->to.sym->type == STEXT) fl += p->to.sym->value; if(p->to.sym->type == SDATA) fl += p->to.sym->value + INITDAT; if(p->to.sym->type == SBSS) fl += p->to.sym->value + INITDAT; } cast = (char*)&fl; switch(c) { default: diag("bad nuxi %d %d\n%P\n", c, i, curp); break; case 1: if(debug['a'] && i == 0) { Bprint(&bso, "%.4lux:%P\n\t\t", l+s+INITDAT, curp); for(j=0; j<c; j++) Bprint(&bso, "%.2ux",cast[inuxi1[j]] & 0xff); Bprint(&bso, "\n"); } for(; i<c; i++) { buf.dbuf[l] = cast[inuxi1[i]]; l++; } break; case 2: if(debug['a'] && i == 0) { Bprint(&bso, "%.4lux:%P\n\t\t", l+s+INITDAT, curp); for(j=0; j<c; j++) Bprint(&bso, "%.2ux",cast[inuxi2[j]] & 0xff); Bprint(&bso, "\n"); } for(; i<c; i++) { buf.dbuf[l] = cast[inuxi2[i]]; l++; } break; case 4: if(debug['a'] && i == 0) { Bprint(&bso, "%.4lux:%P\n\t\t", l+s+INITDAT, curp); for(j=0; j<c; j++) Bprint(&bso, "%.2ux",cast[inuxi4[j]] & 0xff); Bprint(&bso, "\n"); } for(; i<c; i++) { buf.dbuf[l] = cast[inuxi4[i]]; l++; } break; } break; } } write(cout, buf.dbuf, n); } void asmreloc(void) { Prog *p; Sym *s1, *s2; int c1, c2, c3; long v; if(HEADTYPE != 4) return; for(p = datap; p != P; p = p->link) { curp = p; s1 = p->to.sym; if(s1 == S) continue; c1 = 'D'; c3 = p->from.displace; s2 = p->from.sym; v = s2->value + INITDAT; switch(s1->type) { default: diag("unknown reloc %d", s1->type); continue; case STEXT: c2 = 'T'; break; case SDATA: c2 = 'D'; break; case SBSS: c2 = 'B'; break; } CPUT(c1); CPUT(c2); CPUT(c3); lput(v); if(debug['a']) Bprint(&bso, "r %c%c%d %.8lux %s $%s\n", c1, c2, c3, v, s2->name, s1->name); relocsize += 7; } } int gnuxi(Ieee *d, int i, int c) { char *p; long l; switch(c) { default: diag("bad nuxi %d %d\n%P\n", c, i, curp); return 0; /* * 2301 vax * 0123 68k */ case 4: l = ieeedtof(d); p = (char*)&l; i = gnuxi8[i+4]; break; /* * 67452301 vax * 45670123 68k */ case 8: p = (char*)d; i = gnuxi8[i]; break; } return p[i]; } long rnd(long v, long r) { long c; if(r <= 0) return v; v += r - 1; c = v % r; if(c < 0) c += r; v -= c; return v; }
18.179805
66
0.472766
e9b6bffe87b823120df242dfdf2d2894c84635a7
1,322
h
C
OTVideoPlayerDemo/OTVideoPlayerDemo/Util/UIView+Extension.h
irobbin1024/OTVideoPlayer
4d5fc87567502e5b4e7dad5b151a03df41a00d85
[ "MIT" ]
1
2018-03-05T15:04:48.000Z
2018-03-05T15:04:48.000Z
OTVideoPlayerDemo/OTVideoPlayerDemo/Util/UIView+Extension.h
irobbin1024/OTVideoPlayer
4d5fc87567502e5b4e7dad5b151a03df41a00d85
[ "MIT" ]
null
null
null
OTVideoPlayerDemo/OTVideoPlayerDemo/Util/UIView+Extension.h
irobbin1024/OTVideoPlayer
4d5fc87567502e5b4e7dad5b151a03df41a00d85
[ "MIT" ]
null
null
null
// // UIView+Extension.h // yolo // // Created by Eli on 7/10/14. // Copyright (c) 2014 EliTsai. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Extension) @property (assign, nonatomic) CGFloat x; @property (assign, nonatomic) CGFloat y; @property (assign, nonatomic) CGSize size; @property (assign, nonatomic) CGPoint origin; /** * Shortcut for frame.origin.x. * * Sets frame.origin.x = left */ @property (nonatomic) CGFloat left; /** * Shortcut for frame.origin.y * * Sets frame.origin.y = top */ @property (nonatomic) CGFloat top; /** * Shortcut for frame.origin.x + frame.size.width * * Sets frame.origin.x = right - frame.size.width */ @property (nonatomic) CGFloat right; /** * Shortcut for frame.origin.y + frame.size.height * * Sets frame.origin.y = bottom - frame.size.height */ @property (nonatomic) CGFloat bottom; /** * Shortcut for frame.size.width * * Sets frame.size.width = width */ @property (nonatomic) CGFloat width; /** * Shortcut for frame.size.height * * Sets frame.size.height = height */ @property (nonatomic) CGFloat height; /** * Shortcut for center.x * * Sets center.x = centerX */ @property (nonatomic) CGFloat centerX; /** * Shortcut for center.y * * Sets center.y = centerY */ @property (nonatomic) CGFloat centerY; @end
16.948718
52
0.673222
5faf6921e392b9d9d4e8a26a385809083ab28cf9
8,945
h
C
hetlib.h
rahimazizarab/sand-dyn75
f5462445ce53b9b769e295928cc1e9203bce78b1
[ "BSD-2-Clause" ]
1
2020-03-14T01:38:44.000Z
2020-03-14T01:38:44.000Z
hetlib.h
rahimazizarab/sand-dyn75
f5462445ce53b9b769e295928cc1e9203bce78b1
[ "BSD-2-Clause" ]
null
null
null
hetlib.h
rahimazizarab/sand-dyn75
f5462445ce53b9b769e295928cc1e9203bce78b1
[ "BSD-2-Clause" ]
null
null
null
/* HETLIB.C (c) Copyright Leland Lucius, 2000-2012 */ /* Header for the Hercules Emulated Tape library */ /* */ /* Released under "The Q Public License Version 1" */ /* (http://www.hercules-390.org/herclic.html) as modifications to */ /* Hercules. */ #if !defined( _HETLIB_H_ ) #define _HETLIB_H_ /* || ---------------------------------------------------------------------------- || || HETLIB.H (c) Copyright Leland Lucius, 2000-2009 || Released under terms of the Q Public License. || || Header for the Hercules Emulated Tape library. || || ---------------------------------------------------------------------------- */ #ifndef _HETLIB_C_ #ifndef _HTAPE_DLL_ #define HET_DLL_IMPORT DLL_IMPORT #else /* _HUTIL_DLL_ */ #define HET_DLL_IMPORT extern #endif /* _HUTIL_DLL_ */ #else #define HET_DLL_IMPORT DLL_EXPORT #endif #if !defined( TRUE ) #define TRUE (1L) #endif #if !defined( FALSE ) #define FALSE (0L) #endif /* || Chunk header for an HET. Physically compatable with AWSTAPE format. */ typedef struct _hethdr { uint8_t clen[ 2 ]; /* Length of current block */ uint8_t plen[ 2 ]; /* Length of previous block */ uint8_t flags1; /* Flags byte 1 */ uint8_t flags2; /* Flags byte 2 */ } HETHDR; /* || Macros for accessing current and previous sizes - accept ptr to HETHDR */ #define HETHDR_CLEN( h ) ( ( (h)->chdr.clen[ 1 ] << 8 ) + (h)->chdr.clen[ 0 ] ) #define HETHDR_PLEN( h ) ( ( (h)->chdr.plen[ 1 ] << 8 ) + (h)->chdr.plen[ 0 ] ) /* || Definitions for HETHDR flags byte 1 (compression incompatable with AWSTAPE) */ #define HETHDR_FLAGS1_BOR 0x80 /* Start of new record */ #define HETHDR_FLAGS1_TAPEMARK 0x40 /* Tape mark */ #define HETHDR_FLAGS1_EOR 0x20 /* End of record */ #define HETHDR_FLAGS1_COMPRESS 0x03 /* Compression method mask */ #define HETHDR_FLAGS1_BZLIB 0x02 /* BZLIB compression */ #define HETHDR_FLAGS1_ZLIB 0x01 /* ZLIB compression */ /* || Definitions for HETHDR flags byte 2 (incompatable with AWSTAPE and HET) */ #define HETHDR_FLAGS2_COMPRESS 0x80 /* Compression method mask */ #define HETHDR_FLAGS2_ZLIB_BUSTECH 0x80 /* Bus-Tech ZLIB compression */ /* || Control block for Hercules Emulated Tape files */ typedef struct _hetb { FILE *fd; /* Tape file descriptor */ uint32_t chksize; /* Size of output chunks */ uint32_t ublksize; /* Current block compressed size */ uint32_t cblksize; /* Current block uncompressed size */ uint32_t cblk; /* Current block number */ HETHDR chdr; /* Current block header */ u_int writeprotect:1; /* TRUE=write protected */ u_int readlast:1; /* TRUE=last i/o was read */ u_int truncated:1; /* TRUE=file truncated */ u_int compress:1; /* TRUE=compress written data */ u_int decompress:1; /* TRUE=decompress read data */ u_int method:2; /* 1=ZLIB, 2=BZLIB compresion */ u_int level:4; /* 1=<n<=9 compression level */ u_int created:1; /* TRUE = CREATED */ } HETB; /* || Compression methods */ #define HETMETH_ZLIB 1 /* ZLIB compression */ #define HETMETH_BZLIB 2 /* BZLIB compression */ /* || Limits */ #define HETMIN_METHOD 1 /* Minimum compression method */ #if defined( HET_BZIP2 ) #define HETMAX_METHOD 2 /* Maximum compression method */ #else #define HETMAX_METHOD 1 /* Maximum compression method */ #endif /* defined( HET_BZIP2 ) */ #define HETMIN_LEVEL 1 /* Minimum compression level */ #define HETMAX_LEVEL 9 /* Maximum compression level */ #define HETMIN_CHUNKSIZE 4096 /* Minimum chunksize */ #define HETMAX_CHUNKSIZE 65535 /* Maximum chunksize */ #define HETMIN_BLOCKSIZE 1 /* Minimum blocksize */ #define HETMAX_BLOCKSIZE 65535 /* Maximum blocksize */ /* || Default settings */ #define HETDFLT_COMPRESS TRUE /* Compress written data */ #define HETDFLT_DECOMPRESS TRUE /* Decompress read data */ #define HETDFLT_METHOD HETMETH_ZLIB /* Use ZLIB compression */ #define HETDFLT_LEVEL 4 /* Middle of the road */ #define HETDFLT_CHKSIZE HETMAX_BLOCKSIZE /* As big as it gets */ /* || Flags for het_open() */ #define HETOPEN_CREATE 0x01 /* Create NL tape, if file missing */ #define HETOPEN_READONLY 0x02 /* Force the open read-only */ /* || Modes for het_cntl() */ #define HETCNTL_GET 0<<8 /* OR with func code to get value */ #define HETCNTL_SET 1<<8 /* OR with func code to set value */ /* || Function codes for het_cntl() */ #define HETCNTL_COMPRESS 1 /* TRUE=write compression on */ #define HETCNTL_DECOMPRESS 2 /* TRUE=read decomporession on */ #define HETCNTL_METHOD 3 /* Compression method */ #define HETCNTL_LEVEL 4 /* Compression level */ #define HETCNTL_CHUNKSIZE 5 /* Chunk size */ /* || Error definitions */ #define HETE_OK 0 /* No error */ #define HETE_ERROR -1 /* File error (check errno) */ #define HETE_TAPEMARK -2 /* Tapemark read */ #define HETE_BOT -3 /* Beginning of tape */ #define HETE_EOT -4 /* End of tape */ #define HETE_BADBOR -5 /* BOR not found */ #define HETE_BADEOR -6 /* EOR not found */ #define HETE_BADMARK -7 /* Unexpected tapemark */ #define HETE_OVERFLOW -8 /* Buffer not big enough */ #define HETE_PREMEOF -9 /* Premature EOF */ #define HETE_DECERR -10 /* Decompression error */ #define HETE_UNKMETH -11 /* Unknown compression method */ #define HETE_COMPERR -12 /* Compression error */ #define HETE_BADLEN -13 /* Specified length to big */ #define HETE_PROTECTED -14 /* Write protected */ #define HETE_BADFUNC -15 /* Bad function code passed */ #define HETE_BADMETHOD -16 /* Bad compression method */ #define HETE_BADLEVEL -17 /* Bad compression level */ #define HETE_BADSIZE -18 /* Bad write chunk size */ #define HETE_BADDIR -19 /* Invalid direction specified */ #define HETE_NOMEM -20 /* Insufficient memory */ #define HETE_BADHDR -21 /* Couldn't read block header */ #define HETE_BADCOMPRESS -22 /* Inconsistent compression flags */ #define HETE_BADBLOCK -23 // unused #define HETE_BADLOC -24 // unused /* || Public functions */ HET_DLL_IMPORT int het_open( HETB **hetb, char *filename, int flags ); HET_DLL_IMPORT int het_close( HETB **hetb ); HET_DLL_IMPORT int het_read_header( HETB *hetb ); HET_DLL_IMPORT int het_read( HETB *hetb, void *sbuf ); HET_DLL_IMPORT int het_write_header( HETB *hetb, int len, int flags1, int flags2 ); HET_DLL_IMPORT int het_write( HETB *hetb, void *sbuf, int slen ); HET_DLL_IMPORT int het_tapemark( HETB *hetb ); HET_DLL_IMPORT int het_sync( HETB *hetb ); HET_DLL_IMPORT int het_cntl( HETB *hetb, int func, unsigned long val ); HET_DLL_IMPORT int het_locate( HETB *hetb, int block ); HET_DLL_IMPORT int het_bsb( HETB *hetb ); HET_DLL_IMPORT int het_fsb( HETB *hetb ); HET_DLL_IMPORT int het_bsf( HETB *hetb ); HET_DLL_IMPORT int het_fsf( HETB *hetb ); HET_DLL_IMPORT int het_rewind( HETB *hetb ); HET_DLL_IMPORT const char *het_error( int rc ); HET_DLL_IMPORT off_t het_tell ( HETB *hetb ); #endif /* defined( _HETLIB_H_ ) */
44.949749
83
0.526551
583b779f9e900335968462148820ce71d243c21a
430
c
C
libsrc/common/rewind.c
cvemu/cc65
11be575b6dddeba424c0bf02d848f6dd143ada8d
[ "Zlib" ]
1
2015-01-01T14:15:28.000Z
2015-01-01T14:15:28.000Z
libsrc/common/rewind.c
cvemu/cc65
11be575b6dddeba424c0bf02d848f6dd143ada8d
[ "Zlib" ]
null
null
null
libsrc/common/rewind.c
cvemu/cc65
11be575b6dddeba424c0bf02d848f6dd143ada8d
[ "Zlib" ]
null
null
null
/* * rewind.c * * Christian Groessler, 07-Aug-2000 */ #include <stdio.h> /*****************************************************************************/ /* Code */ /*****************************************************************************/ void __fastcall__ rewind (FILE* f) { fseek(f, 0L, SEEK_SET); clearerr(f); }
16.538462
79
0.239535
168ba43b49f2c1665276cd2a0dc4f46ca70fc60d
733
h
C
Hardware.h
stnkl/FastLEDManager
b63262b436b9f1acdd28ba4028f7b789453b254c
[ "MIT" ]
4
2019-10-23T18:02:13.000Z
2021-12-11T12:43:20.000Z
Hardware.h
stnkl/FastLEDManager
b63262b436b9f1acdd28ba4028f7b789453b254c
[ "MIT" ]
2
2020-01-26T21:58:32.000Z
2021-12-11T12:42:44.000Z
Hardware.h
stnkl/FastLEDManager
b63262b436b9f1acdd28ba4028f7b789453b254c
[ "MIT" ]
null
null
null
#pragma once #include <Arduino.h> #include <Ticker.h> // Suppress FastLED warnings #define FASTLED_INTERNAL #include "FastLED.h" #include "Animation.h" #include "Fade.h" #define NUM_LEDS 6 #define LIGHTSTRIP_PIN 5 #define BUTTON_PIN 4 #define MAX_BETTER_HUE 1535 extern CRGB leds[NUM_LEDS]; extern CRGB brightnessCorrectedLeds[NUM_LEDS]; extern int16_t brightness10; extern float filteredBrightness; void initHardware(); void showshow(); void betterShow(int16_t newBrightness = -1); void betterClear(); CRGB betterHue(uint16_t fract1535, int16_t sat = -1, uint8_t val = 255); uint16_t getPotiBrightness(); void handleInput(); struct FastLEDDummy { static void show() { betterShow(); }; }; #define FastLED \ FastLEDDummy {}
20.361111
72
0.765348
16c48163b217e0b92822b51a556f6f9d7e105f8a
3,452
c
C
Project 0/lab0.c
ioneone/UCLA-CS-111
a899c858ff250fff79e4180a83577796478eaefa
[ "MIT" ]
1
2019-04-23T21:26:27.000Z
2019-04-23T21:26:27.000Z
Project 0/lab0.c
ioneone/UCLA-CS-111
a899c858ff250fff79e4180a83577796478eaefa
[ "MIT" ]
null
null
null
Project 0/lab0.c
ioneone/UCLA-CS-111
a899c858ff250fff79e4180a83577796478eaefa
[ "MIT" ]
1
2020-12-19T01:19:40.000Z
2020-12-19T01:19:40.000Z
// Name : Junhong Wang // ID : 504941113 // Email : oneone@g.ucla.edu #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <getopt.h> #include <errno.h> #include <string.h> #include <signal.h> char* getUsage() { return "\ Usage: ./lab0 [OPTION]...\n\ write a program that copies its standard input to its standard output\n\ by reading from file descriptor 0 (until encountering an end of file)\n\ and writing to file descriptor 1\n\ \n\ --input=filename use the specified file as standard input\n\ --output=filename create the specified file and use it as standard output\n\ --segfault force a segmentation fault\n\ --catch catch the segmentation fault and log an error message\n\ "; } // segmentation fault handler void handle_segfault() { // fprint or fprintf cause unspecified behavior // in signal handling write(2, "Segmentation fault detected\n", 28); exit(4); } void handle_input_option() { int fd; // open a file from --input fd = open(optarg, O_RDONLY); if (fd == -1) { fprintf(stderr, "Error opening %s: %s\n", optarg, strerror(errno)); exit(2); } // redirect the opened file to file descriptor 0 if (dup2(fd, 0) == -1) { fprintf(stderr, "Error redirecting stdin: %s\n", strerror(errno)); exit(-1); } close(fd); } void handle_output_option() { int fd; // create a file from --output w/ rw-r--r-- permissions fd = creat(optarg, 0644); if (fd == -1) { fprintf(stderr, "Error creating %s: %s\n", optarg, strerror(errno)); exit(3); } // redirect the created file to file descriptor 1 if (dup2(fd, 1) == -1) { fprintf(stderr, "Error redirecting stdout: %s\n", strerror(errno)); exit(-1); } close(fd); } void lazy_write() { char buf; int io_flag; // reading from file descriptor 0 (until encountering an end of file) // and writing to file descriptor 1 while (1) { io_flag = read(0, &buf, sizeof(char)); // reaches EOF if (io_flag == 0) break; if (io_flag < 0) { fprintf(stderr, "Error reading stdin: %s\n", strerror(errno)); exit(-1); } io_flag = write(1, &buf, sizeof(char)); if (io_flag < 0) { fprintf(stderr, "Error writing to stdout: %s\n", strerror(errno)); exit(-1); } } } int main(int argc, char** argv) { int option; int segfault_flag = 0; int catch_flag = 0; struct option options[] = { {"input", required_argument, NULL, 'i'}, {"output", required_argument, NULL, 'o'}, {"segfault", no_argument, NULL, 's'}, {"catch", no_argument, NULL, 'c'}, {0, 0, 0, 0} }; while (1) { // iteratively parse option option = getopt_long(argc, argv, "", options, NULL); // no more options to parse if (option == -1) break; switch (option) { case 'i': // input handle_input_option(); break; case 'o': // output handle_output_option(); break; case 's': // segfault segfault_flag = 1; break; case 'c': // catch catch_flag = 1; break; default: fprintf(stderr, "Unrecognized argument detected\n%s\n", getUsage()); exit(1); break; } } // catch segfault if (catch_flag) signal(SIGSEGV, handle_segfault); // cause segfault if (segfault_flag) { char *ptr = NULL; *ptr = 'a'; } lazy_write(); exit(0); }
21.177914
80
0.598494
ce4c7502ab25b40dd06d248de1322f25e53cdf2a
254
h
C
src/main/hook/patch/usb-mnt.h
pumpitupdev/pumptools
6c27b8164cfe9708b2f8d823e94530e934eec38c
[ "Unlicense" ]
1
2022-03-10T11:24:31.000Z
2022-03-10T11:24:31.000Z
src/main/hook/patch/usb-mnt.h
pumpitupdev/pumptools
6c27b8164cfe9708b2f8d823e94530e934eec38c
[ "Unlicense" ]
1
2021-08-15T17:18:08.000Z
2021-08-15T17:20:14.000Z
src/main/hook/patch/usb-mnt.h
pumpitupdev/pumptools
6c27b8164cfe9708b2f8d823e94530e934eec38c
[ "Unlicense" ]
null
null
null
/** * Ensures that the mount points /mnt/0 and /mnt/1 exist to allow mounting * of connected usb sticks with profile data */ #ifndef PATCH_USB_MNT_H #define PATCH_USB_MNT_H /** * Initialize the patch module */ void patch_usb_mnt_init(void); #endif
19.538462
74
0.740157
cee913a949ba3c22b750d2690afc11eda6aa5c58
410
h
C
init.h
Razzaz/djik-path
6cb03eb3b603358f3ce4276069f366ab9337ffea
[ "MIT" ]
1
2020-12-13T05:29:02.000Z
2020-12-13T05:29:02.000Z
init.h
MWLKR/djik-path
f9e08bf9d31c446aa13ed68e3f9eb48f8cc1541c
[ "MIT" ]
null
null
null
init.h
MWLKR/djik-path
f9e08bf9d31c446aa13ed68e3f9eb48f8cc1541c
[ "MIT" ]
6
2018-12-22T12:09:15.000Z
2019-10-16T06:35:05.000Z
#define N 6 #define IN 99 int traffic[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int trafficCon[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int weightNodes[10] = {16, 2, 1, 4, 11, 13, 2, 4, 5, 6}; int flag = 0; int source, target,x,y; int flagger(int flag); int dijkstra(int cost[][N], int source, int target); int queueSys(int loc, int des); void works(), map(), input(); int a,b,k,kk = 0; int cost[N][N],i,j,w,ch,co;
25.625
56
0.580488
e1af9cbc20a29ac6c3938881e848cd5265206f1e
36
c
C
test/cases/T1.c
rodrigogribeiro/typedef
0fceb0221c3f16e25a8eaff2f8be54f80068e7b0
[ "BSD-3-Clause" ]
1
2016-02-11T12:00:29.000Z
2016-02-11T12:00:29.000Z
test/cases/T1.c
rodrigogribeiro/typedef
0fceb0221c3f16e25a8eaff2f8be54f80068e7b0
[ "BSD-3-Clause" ]
12
2015-09-07T16:25:31.000Z
2017-11-17T21:55:08.000Z
test/cases/T1.c
rodrigogribeiro/typedef
0fceb0221c3f16e25a8eaff2f8be54f80068e7b0
[ "BSD-3-Clause" ]
null
null
null
int foo (T i) { return *i + 1; }
9
17
0.444444
e07ae9fa5905cbcd793bdf93dbb06a788def3954
2,781
h
C
src/rtv1.h
logankaser/rtv1
5219f7826f13a3db17a620ee42899708bbe52456
[ "MIT" ]
null
null
null
src/rtv1.h
logankaser/rtv1
5219f7826f13a3db17a620ee42899708bbe52456
[ "MIT" ]
null
null
null
src/rtv1.h
logankaser/rtv1
5219f7826f13a3db17a620ee42899708bbe52456
[ "MIT" ]
1
2019-12-08T10:46:51.000Z
2019-12-08T10:46:51.000Z
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* rtv1.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: lkaser <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/09/18 11:03:56 by lkaser #+# #+# */ /* Updated: 2018/02/03 18:19:49 by dhill ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef RTV1_H # define RTV1_H # define WIN_X 1024 # define WIN_Y 1024 # define FOV 40 # define CONE_ANGLE 30 # include "wrapper.h" # include <fcntl.h> # include <math.h> # include <stdlib.h> typedef struct s_ray { t_vec3 o; t_vec3 d; } t_ray; typedef enum e_type { t_plane = 1, t_cylinder, t_sphere, t_cone } t_type; typedef struct s_object { t_type type; t_vec3 position; t_vec3 rotation; double radius; unsigned color; } t_obj; typedef struct s_light { t_vec3 position; double intensity; } t_light; typedef struct s_camera { t_vec3 pos; t_vec3 dir; } t_camera; typedef struct s_rt { t_ctx *c; t_list *objs; t_list *lights; double scale; double aspect; t_mat cam; } t_rt; /* ** intersect.c */ t_bool intersect_sphere(t_ray ray, t_obj *obj, double *dis); t_bool intersect_plane(t_ray ray, t_obj *obj, double *dis); t_bool intersect_cylinder(t_ray ray, t_obj *obj, double *dis); t_bool intersect_cone(t_ray ray, t_obj *obj, double *dis); void quadratic_intersect(double *result, double a, double b, double c); /* ** normal.c */ t_vec3 normal_sphere(t_obj *hit_obj, t_vec3 hp); t_vec3 normal_plane(t_obj *hit_obj, t_vec3 hp); t_vec3 normal_cylinder(t_obj *hit_obj, t_vec3 hp); t_vec3 normal_cone(t_obj *cone, t_vec3 hp); /* ** mlx.c */ int close_window(t_rt *rt); int hook_keys(int key, t_rt *rt); void look_at(t_vec3 from, t_vec3 to, t_mat *cam); /* ** parse.c & parse_help.c */ void parse(char *file, t_rt *rt); void get_vec3(char *p1, char *p2, char *p3, t_vec3 *var); void parse_sphere(char **split, t_obj *obj); void parse_plane(char **split, t_obj *obj); void parse_cone_cylinder(char **split, t_obj *obj); /* ** helper.c */ void ft_err(char *s); unsigned int ft_htou(const char *str); int ft_iswhitespace(char c); unsigned color_mult(unsigned c, const float x); #endif
24.830357
80
0.497303
0d772be2ebe89899e6abe2ff2cb6e225627da287
136
h
C
src/BLEMIDI_Defs.h
yoelkastro/Arduino-BLE-MIDI
75e7b903c756301691aa02ca55e781bcbcd2ee64
[ "MIT" ]
1
2022-02-16T11:40:28.000Z
2022-02-16T11:40:28.000Z
src/BLEMIDI_Defs.h
alf45tar/Arduino-BLE-MIDI
3f9b48cb1a5548d1ccfbd952732387ffe36ba55b
[ "MIT" ]
null
null
null
src/BLEMIDI_Defs.h
alf45tar/Arduino-BLE-MIDI
3f9b48cb1a5548d1ccfbd952732387ffe36ba55b
[ "MIT" ]
null
null
null
#pragma once #include "BLEMIDI_Namespace.h" #if ARDUINO #include <Arduino.h> #else #include <inttypes.h> typedef uint8_t byte; #endif
12.363636
30
0.75
b49ffcea79c94566fa09104e5cfa3b6a0f503c87
654
h
C
Kiez ToGo/K2GFSLocation.h
kiez/togo
19f88b596480aee21d0c6fcbfa1b0476db1821c5
[ "MIT" ]
1
2015-02-05T16:59:39.000Z
2015-02-05T16:59:39.000Z
Kiez ToGo/K2GFSLocation.h
kiez/togo
19f88b596480aee21d0c6fcbfa1b0476db1821c5
[ "MIT" ]
null
null
null
Kiez ToGo/K2GFSLocation.h
kiez/togo
19f88b596480aee21d0c6fcbfa1b0476db1821c5
[ "MIT" ]
null
null
null
// // K2GFSLocation.h // Kiez ToGo // // Created by Christian Beer on 16.05.14. // Copyright (c) 2014 kiez e.V. GmbH (i.G.). All rights reserved. // #import <Foundation/Foundation.h> @interface K2GFSLocation : NSObject @property (nonatomic, strong) NSString *address; @property (nonatomic, strong) NSString *cc; @property (nonatomic, strong) NSString *city; @property (nonatomic, strong) NSString *country; @property (nonatomic, strong) NSString *crossStreet; @property (nonatomic, assign) NSInteger distance; @property (nonatomic, assign) CLLocationCoordinate2D location; - (instancetype) initWithFoursquareDictionary:(NSDictionary*)dict; @end
27.25
66
0.749235
8feee18ece41dd79753c4c617535158d185b4f43
741
h
C
resources/usr/lib/root/etc/dictpch/io/gfal/inc/LinkDef.h
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
null
null
null
resources/usr/lib/root/etc/dictpch/io/gfal/inc/LinkDef.h
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
null
null
null
resources/usr/lib/root/etc/dictpch/io/gfal/inc/LinkDef.h
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
1
2020-05-28T23:01:44.000Z
2020-05-28T23:01:44.000Z
/* @(#)root/gfal:$Id$ */ /************************************************************************* * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class TGFALFile; #pragma link C++ class TGFALSystem; #endif
35.285714
75
0.398111
3783f60c4430fa7b5f46e61eff3ea539a7ed7026
54
c
C
semantic-analysis/system-test/additional-examples/d050e2487be2d5c9dba1c3f03af69300/d050e2487be2d5c9dba1c3f03af69300.c
fgulan/p-p-j
cb66c0a3e51eaf4199fe590d8a6f06507d42a619
[ "MIT" ]
1
2017-10-21T09:07:10.000Z
2017-10-21T09:07:10.000Z
semantic-analysis/system-test/additional-examples/d050e2487be2d5c9dba1c3f03af69300/d050e2487be2d5c9dba1c3f03af69300.c
fgulan/p-p-j
cb66c0a3e51eaf4199fe590d8a6f06507d42a619
[ "MIT" ]
null
null
null
semantic-analysis/system-test/additional-examples/d050e2487be2d5c9dba1c3f03af69300/d050e2487be2d5c9dba1c3f03af69300.c
fgulan/p-p-j
cb66c0a3e51eaf4199fe590d8a6f06507d42a619
[ "MIT" ]
1
2019-11-10T18:04:17.000Z
2019-11-10T18:04:17.000Z
int main(void) { int a[10] = {2,3,4}; return 0; }
7.714286
21
0.5
a660b4631286ec76a725a3e6b819e29c36416da9
2,398
h
C
chrome/browser/ui/views/file_system_access/file_system_access_restricted_directory_dialog_view.h
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
chrome/browser/ui/views/file_system_access/file_system_access_restricted_directory_dialog_view.h
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
chrome/browser/ui/views/file_system_access/file_system_access_restricted_directory_dialog_view.h
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_VIEWS_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_RESTRICTED_DIRECTORY_DIALOG_VIEW_H_ #define CHROME_BROWSER_UI_VIEWS_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_RESTRICTED_DIRECTORY_DIALOG_VIEW_H_ #include <string> #include "base/macros.h" #include "content/public/browser/file_system_access_permission_context.h" #include "ui/views/metadata/metadata_header_macros.h" #include "ui/views/window/dialog_delegate.h" namespace base { class FilePath; } namespace content { class WebContents; } // namespace content namespace url { class Origin; } // namespace url namespace views { class Widget; } // namespace views // A dialog that informs the user that they can't give a website access to a // specific folder. class FileSystemAccessRestrictedDirectoryDialogView : public views::DialogDelegateView { public: METADATA_HEADER(FileSystemAccessRestrictedDirectoryDialogView); using SensitiveDirectoryResult = content::FileSystemAccessPermissionContext::SensitiveDirectoryResult; FileSystemAccessRestrictedDirectoryDialogView( const FileSystemAccessRestrictedDirectoryDialogView&) = delete; FileSystemAccessRestrictedDirectoryDialogView& operator=( const FileSystemAccessRestrictedDirectoryDialogView&) = delete; ~FileSystemAccessRestrictedDirectoryDialogView() override; // Creates and shows the dialog. The |callback| is called when the dialog is // dismissed. static views::Widget* ShowDialog( const url::Origin& origin, const base::FilePath& path, content::FileSystemAccessPermissionContext::HandleType handle_type, base::OnceCallback<void(SensitiveDirectoryResult)> callback, content::WebContents* web_contents); private: FileSystemAccessRestrictedDirectoryDialogView( const url::Origin& origin, const base::FilePath& path, content::FileSystemAccessPermissionContext::HandleType handle_type, base::OnceCallback<void(SensitiveDirectoryResult)> callback); const content::FileSystemAccessPermissionContext::HandleType handle_type_; base::OnceCallback<void(SensitiveDirectoryResult)> callback_; }; #endif // CHROME_BROWSER_UI_VIEWS_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_RESTRICTED_DIRECTORY_DIALOG_VIEW_H_
35.264706
108
0.806922
8168c96e83e67591abd04ff48ab7be81b3da4e38
875
h
C
Dependencies/CB/PayUCustomBrowser.framework/Headers/CBConstant.h
ShubhGar/PayUMoney-IOS-SDK
fd9c03aa13c46fad6bed9e9e6d2801a5b95b429a
[ "MIT" ]
14
2017-03-07T02:42:02.000Z
2021-11-16T11:03:09.000Z
Dependencies/CB/PayUCustomBrowser.framework/Headers/CBConstant.h
ShubhGar/PayUMoney-IOS-SDK
fd9c03aa13c46fad6bed9e9e6d2801a5b95b429a
[ "MIT" ]
56
2017-01-19T10:07:01.000Z
2021-10-30T17:03:09.000Z
Dependencies/CB/PayUCustomBrowser.framework/Headers/CBConstant.h
ShubhGar/PayUMoney-IOS-SDK
fd9c03aa13c46fad6bed9e9e6d2801a5b95b429a
[ "MIT" ]
25
2017-01-19T07:40:21.000Z
2022-02-10T13:09:27.000Z
// // CBConstant.h // iOSCustomeBrowser // // Created by Suryakant Sharma on 15/04/15. // Copyright (c) 2015 PayU, India. All rights reserved. // #ifndef iOSCustomeBrowser_CBConstant_h #define iOSCustomeBrowser_CBConstant_h //Macros To prevent instantiation of class by standard methods #define ATTRIBUTE_ALLOC __attribute__((unavailable("alloc not available, call sharedSingletonInstance instead"))) #define ATTRIBUTE_INIT __attribute__((unavailable("init not available, call sharedSingletonInstance instead"))) #define ATTRIBUTE_NEW __attribute__((unavailable("new not available, call sharedSingletonInstance instead"))) #define ATTRIBUTE_COPY __attribute__((unavailable("copy not available, call sharedSingletonInstance instead"))) //Constants for web didFailLoad params #define FAIL_URL_STRING @"failUrlString" #define FAIL_ERROR @"failError" #endif
38.043478
113
0.795429
54e72c9166b8e2d9355a91b0f11b106e26a2cbf1
424
c
C
glibc-2.21/sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c
LinuxUser404/smack-glibc
75137ec47348317a8dbb431774b74dbb7bd2ec4f
[ "MIT" ]
null
null
null
glibc-2.21/sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c
LinuxUser404/smack-glibc
75137ec47348317a8dbb431774b74dbb7bd2ec4f
[ "MIT" ]
null
null
null
glibc-2.21/sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c
LinuxUser404/smack-glibc
75137ec47348317a8dbb431774b74dbb7bd2ec4f
[ "MIT" ]
null
null
null
/* * __isinf_nsl(x) returns != 0 if x is ±inf, else 0; * no branching! * slightly dodgy in relying on signed shift right copying sign bit */ #include <math.h> #include <math_private.h> int __isinf_nsl (long double x) { double xhi; int64_t hx, mask; xhi = ldbl_high (x); EXTRACT_WORDS64 (hx, xhi); mask = (hx & 0x7fffffffffffffffLL) ^ 0x7ff0000000000000LL; mask |= -mask; mask >>= 63; return ~mask; }
17.666667
67
0.660377
c2b0e9b7d87a22e0cdb8077381f546c0c747ac26
3,325
h
C
source/core/search-manager/DocumentIterator.h
izenecloud/sf1r-lite
8de9aa83c38c9cd05a80b216579552e89609f136
[ "Apache-2.0" ]
77
2015-02-12T20:59:20.000Z
2022-03-05T18:40:49.000Z
source/core/search-manager/DocumentIterator.h
fytzzh/sf1r-lite
8de9aa83c38c9cd05a80b216579552e89609f136
[ "Apache-2.0" ]
1
2017-04-28T08:55:47.000Z
2017-07-10T10:10:53.000Z
source/core/search-manager/DocumentIterator.h
fytzzh/sf1r-lite
8de9aa83c38c9cd05a80b216579552e89609f136
[ "Apache-2.0" ]
33
2015-01-05T03:03:05.000Z
2022-02-06T04:22:46.000Z
/** * @file sf1r/search-manager/DocumentIterator.h * @author Yingfeng Zhang * @date Created <2009-09-21> * @brief Interface for DocumentIterator */ #ifndef DOCUMENT_ITERATOR_H #define DOCUMENT_ITERATOR_H #include <common/type_defs.h> #include <ranking-manager/RankingManager.h> #include <ranking-manager/RankQueryProperty.h> #include <ranking-manager/RankDocumentProperty.h> #define MAX_DOC_ID 0xFFFFFFFF #define MAX_COUNT 0xFFFFFFFF // max value of count_t type #define PREFETCH_TERMID 1 #define SKIP_ENABLED 1 namespace sf1r { class VirtualPropertyTermDocumentIterator; class DocumentIterator { public: DocumentIterator():current_(false), not_(false), scorer_(false) {} virtual ~DocumentIterator() {} public: virtual void add(DocumentIterator* pDocIterator) = 0; virtual void add(VirtualPropertyTermDocumentIterator* pDocIterator) {}; virtual bool next() = 0; virtual docid_t doc() = 0; ///propIndex is only used for VirtualTermDocIterator, which is a cross property iterator virtual void doc_item(RankDocumentProperty& rankDocumentProperty, unsigned propIndex = 0) = 0; virtual void df_cmtf(DocumentFrequencyInProperties& dfmap, CollectionTermFrequencyInProperties& ctfmap, MaxTermFrequencyInProperties& maxtfmap) = 0; virtual count_t tf() = 0; ///if skip list is supported within index, this function would be a virtual one, too virtual docid_t skipTo(docid_t target) { docid_t currDoc; do { if(!next()) return MAX_DOC_ID; currDoc = doc(); } while(target > currDoc); return currDoc; } virtual void queryBoosting(double& score, double& weight) {} virtual void print(int level = 0) {} virtual double score( const RankQueryProperty& rankQueryProperty, const boost::shared_ptr<PropertyRanker>& propertyRanker ) { return 0.0f; } virtual double score( const std::vector<RankQueryProperty>& rankQueryProperties, const std::vector<boost::shared_ptr<PropertyRanker> >& propertyRankers ) { return 0.0f; } virtual void setThreshold(float) { return; } virtual void setUB( bool useOriginalQuery , UpperBoundInProperties& ubmap) { return; } virtual float getUB() { return 0.0; } virtual const char* getProperty() { return NULL; } virtual void initThreshold(float threshold) { return; } void setMissRate(float missRate) { missRate_ = missRate; } void setCurrent(bool current) { current_ = current; } bool isCurrent() { return current_; } void setNot(bool isNot) { not_ = isNot; } bool isNot() { return not_; } bool isScorer() { return scorer_; } protected: bool current_; bool not_; ///whether it is NOT iterator bool scorer_; float missRate_; ///for WAND overlap fearture }; } #endif
21.451613
99
0.601805
b05d26819d770dd4ed206b2b729d8b0aaa6ab7bb
854
h
C
labs/lab5/task2/string/ReverseIteratorImpl.h
denis-petrov/oop
6bd2679e8f2f39f41cf6520cbbeafa8c01c7bc96
[ "MIT" ]
null
null
null
labs/lab5/task2/string/ReverseIteratorImpl.h
denis-petrov/oop
6bd2679e8f2f39f41cf6520cbbeafa8c01c7bc96
[ "MIT" ]
null
null
null
labs/lab5/task2/string/ReverseIteratorImpl.h
denis-petrov/oop
6bd2679e8f2f39f41cf6520cbbeafa8c01c7bc96
[ "MIT" ]
null
null
null
#pragma once #include "stdafx.h" class CReverseIteratorImpl { public: CReverseIteratorImpl(char* ptr = nullptr); CReverseIteratorImpl& operator++(); CReverseIteratorImpl& operator--(); CReverseIteratorImpl operator++(int); CReverseIteratorImpl operator--(int); CReverseIteratorImpl& operator+=(ptrdiff_t const& rhs); CReverseIteratorImpl& operator-=(ptrdiff_t const& rhs); CReverseIteratorImpl operator+(ptrdiff_t const& rhs); CReverseIteratorImpl operator-(ptrdiff_t const& rhs); ptrdiff_t operator-(CReverseIteratorImpl const& it); operator bool() const; friend bool operator==(CReverseIteratorImpl const& lhs, CReverseIteratorImpl const& rhs) { return lhs.m_ptr == rhs.m_ptr; }; friend bool operator!=(CReverseIteratorImpl const& lhs, CReverseIteratorImpl const& rhs) { return lhs.m_ptr != rhs.m_ptr; }; protected: char* m_ptr; };
30.5
125
0.770492
b0a835cce087089e563f8a414da9099a4748ca94
457
h
C
OrderingS/BMKOpenOption.h
yihongmingfeng/OrderingS
e33bafe6412789d08e41567353ee2a17fac790e8
[ "MIT" ]
null
null
null
OrderingS/BMKOpenOption.h
yihongmingfeng/OrderingS
e33bafe6412789d08e41567353ee2a17fac790e8
[ "MIT" ]
null
null
null
OrderingS/BMKOpenOption.h
yihongmingfeng/OrderingS
e33bafe6412789d08e41567353ee2a17fac790e8
[ "MIT" ]
null
null
null
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @class NSString; @interface BMKOpenOption : NSObject { _Bool isSupportWeb; NSString *appScheme; } @property(nonatomic) _Bool isSupportWeb; // @synthesize isSupportWeb; @property(retain, nonatomic) NSString *appScheme; // @synthesize appScheme; - (void).cxx_destruct; - (id)init; @end
19.041667
83
0.693654
fc8de2958653c7cc70b9db92387d94d6ec3990ff
3,010
c
C
Theory/vektor.c
MartinTam/PA1
486c35574ea1d55233451f69056bd2ae955e63db
[ "MIT" ]
null
null
null
Theory/vektor.c
MartinTam/PA1
486c35574ea1d55233451f69056bd2ae955e63db
[ "MIT" ]
null
null
null
Theory/vektor.c
MartinTam/PA1
486c35574ea1d55233451f69056bd2ae955e63db
[ "MIT" ]
null
null
null
/* _____ _______ _ _ * |_ _|__ __| | | | | * | | | |_ __ ___| |___ _____ _ __| | __ ___ ____ * | | | | '_ \ / _ \ __\ \ /\ / / _ \| '__| |/ / / __|_ / * _| |_ | | | | | __/ |_ \ V V / (_) | | | < | (__ / / * |_____| |_|_| |_|\___|\__| \_/\_/ \___/|_| |_|\_(_)___/___| * * IT ZPRAVODAJSTVÍ <> PROGRAMOVÁNÍ <> HW A SW <> KOMUNITA * * Tento zdrojový kód je součástí výukových seriálů na * IT sociální síti WWW.ITNETWORK.CZ * * Kód spadá pod licenci prémiového obsahu a vznikl díky podpoře * našich členů. Je určen pouze pro osobní užití a nesmí být šířen. */ #include <stdio.h> #include <stdlib.h> #define VYCHOZI_KAPACITA 10; // Struktura pro snažší předávání parametrů vektoru typedef struct { int pocet; // Počet obsazených prvků int kapacita; // Délka pole prvků int* pole; // Pole prvků } VEKTOR; // TODO: V článku zmínit že by byla velká chyba udělat VEKTOR vektor; pak & a pak to vrátit // Vytvoří nový vektor a vrátí ukazatel na něj VEKTOR *vytvor_vektor() { VEKTOR *p_vektor = (VEKTOR *) malloc(sizeof(VEKTOR)); p_vektor->kapacita = VYCHOZI_KAPACITA; p_vektor->pole = (int *) malloc(sizeof(int) * p_vektor->kapacita); p_vektor->pocet = 0; return p_vektor; } // Uvolní paměť po vektoru void uvolni_vektor(VEKTOR *p_vektor) { free(p_vektor->pole); free(p_vektor); } // Zvětší vektor na dvojnásobek jeho velikosti void zvetsi_vektor(VEKTOR *p_vektor) { int* nove_pole = realloc(p_vektor->pole, sizeof(int) * (p_vektor->kapacita * 2)); if (nove_pole != NULL) { p_vektor->kapacita *= 2; p_vektor->pole = nove_pole; } else { printf("Chyba - Nedostatek paměti."); exit(1); } } // Přidá nový prvek na konec vektoru void pridej_do_vektoru(VEKTOR *p_vektor, int hodnota) { // Pokud je pole plné, zvětšíme ho if (p_vektor->pocet == p_vektor->kapacita) zvetsi_vektor(p_vektor); p_vektor->pole[p_vektor->pocet] = hodnota; p_vektor->pocet++; } // Uloží prvek na daný index ve vektoru void uloz_do_vektoru(VEKTOR *p_vektor, int index, int hodnota) { p_vektor->pole[index] = hodnota; } // Načte prvek z vektoru na daném indexu int nacti_z_vektoru(VEKTOR *p_vektor, int index) { return p_vektor->pole[index]; } int main(int argc, char** argv) { // Vytvoření vektoru VEKTOR *p_vektor = vytvor_vektor(p_vektor); // Zkouška vektoru - přidáme do něj 1000 prvků int i; for (i = 0; i < 1000; i++) { pridej_do_vektoru(p_vektor, i); // Přidá na konec pole číslo i } // Nyní prvky z vektoru vypíšeme for (i = 0; i < 1000; i++) { printf("%d ", nacti_z_vektoru(p_vektor, i)); } // Vypišme prvek veprostřed printf("\n\n%d", nacti_z_vektoru(p_vektor, p_vektor->pocet/2)); // Uvolnění vektoru uvolni_vektor(p_vektor); return (EXIT_SUCCESS); }
27.87037
91
0.6
1168eb8ff6f0312b886bb76d126749902e5de7ec
18,726
h
C
include/app_common.h
Coquinho/tizenfx-stub
37d3f68ac20cd43800ace87c78637abd43577c01
[ "Apache-2.0" ]
1
2018-02-26T04:42:28.000Z
2018-02-26T04:42:28.000Z
include/app_common.h
Coquinho/tizenfx-stub
37d3f68ac20cd43800ace87c78637abd43577c01
[ "Apache-2.0" ]
null
null
null
include/app_common.h
Coquinho/tizenfx-stub
37d3f68ac20cd43800ace87c78637abd43577c01
[ "Apache-2.0" ]
4
2019-05-24T11:58:53.000Z
2021-11-04T23:38:04.000Z
/* * Copyright (c) 2017 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __TIZEN_APPFW_APP_COMMON_H__ #define __TIZEN_APPFW_APP_COMMON_H__ #include <app_types.h> #ifdef __cplusplus extern "C" { #endif /** * @file app_common.h */ /** * @addtogroup CAPI_APP_COMMON_MODULE * @{ */ /** * @brief Enumeration for system events. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { APP_EVENT_LOW_MEMORY, /**< The low memory event */ APP_EVENT_LOW_BATTERY, /**< The low battery event */ APP_EVENT_LANGUAGE_CHANGED, /**< The system language changed event */ APP_EVENT_DEVICE_ORIENTATION_CHANGED, /**< The device orientation changed event */ APP_EVENT_REGION_FORMAT_CHANGED, /**< The region format changed event */ APP_EVENT_SUSPENDED_STATE_CHANGED, /**< The suspended state changed event of the application (since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) @see app_event_get_suspended_state */ APP_EVENT_UPDATE_REQUESTED, /**< The update requested event (Since 3.0) This event can occur when an app needs to be updated. It is dependent on target devices. */ } app_event_type_e; /** * @brief Enumeration for device orientation. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { APP_DEVICE_ORIENTATION_0 = 0, /**< The device is oriented in a natural position */ APP_DEVICE_ORIENTATION_90 = 90, /**< The device's left side is at the top */ APP_DEVICE_ORIENTATION_180 = 180, /**< The device is upside down */ APP_DEVICE_ORIENTATION_270 = 270, /**< The device's right side is at the top */ } app_device_orientation_e; /** * @brief Enumeration for low memory status. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { APP_EVENT_LOW_MEMORY_NORMAL = 0x01, /**< Normal status */ APP_EVENT_LOW_MEMORY_SOFT_WARNING = 0x02, /**< Soft warning status */ APP_EVENT_LOW_MEMORY_HARD_WARNING = 0x04, /**< Hard warning status */ } app_event_low_memory_status_e; /** * @brief Enumeration for battery status. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { APP_EVENT_LOW_BATTERY_POWER_OFF = 1, /**< The battery status is under 1% */ APP_EVENT_LOW_BATTERY_CRITICAL_LOW, /**< The battery status is under 5% */ } app_event_low_battery_status_e; /** * @brief Enumeration for suspended state. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { APP_SUSPENDED_STATE_WILL_ENTER = 0, /**< Application will enter the suspended state */ APP_SUSPENDED_STATE_DID_EXIT, /**< Application did exit from the suspended state */ } app_suspended_state_e; /** * @brief The event handler that returned from add event handler function to handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @see app_event_type_e * @see app_add_event_handler * @see app_remove_event_handler * @see app_event_info_h */ typedef struct app_event_handler *app_event_handler_h; /** * @brief The system event information handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @see app_event_get_low_memory_status * @see app_event_get_low_battery_status * @see app_event_get_language * @see app_event_get_region_format * @see app_event_get_device_orientation * @see app_event_get_suspended_state */ typedef struct app_event_info *app_event_info_h; /** * @brief The system event callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] event_info The system event information * @param[in] user_data The user data passed from the add event handler function * @see app_add_event_handler * @see app_event_info_h * @remarks If the given @a event_info has #APP_SUSPENDED_STATE_WILL_ENTER value, * the application should not call any asynchronous operations in this callback. * After the callback returns, process of the application will be changed to suspended * state immediately. Thus, asynchronous operations may work incorrectly. (since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */ typedef void (*app_event_cb)(app_event_info_h event_info, void *user_data); /** * @brief Gets the low memory status from the given event info. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] event_info The system event info * @param[out] status The low memory status * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT Invalid event context * @see app_event_info_h * @see app_event_low_memory_status_e */ int app_event_get_low_memory_status(app_event_info_h event_info, app_event_low_memory_status_e *status); /** * @brief Gets the low battery status from given event info. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] event_info The system event info * @param[out] status The low battery status * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT Invalid event context * @see app_event_info_h * @see app_event_low_battery_status_e */ int app_event_get_low_battery_status(app_event_info_h event_info, app_event_low_battery_status_e *status); /** * @brief Gets the language from the given event info. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks @a lang must be released using free(). * @param[in] event_info The system event info * @param[out] lang The language changed * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT Invalid event context * @see app_event_info_h */ int app_event_get_language(app_event_info_h event_info, char **lang); /** * @brief Gets the region format from the given event info. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks @a region must be released using free(). * @param[in] event_info The system event info * @param[out] region The region format changed * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT Invalid event context * @see app_event_info_h */ int app_event_get_region_format(app_event_info_h event_info, char **region); /** * @brief Gets the device orientation from the given event info. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] event_info The system event info * @param[out] orientation The device orientation changed * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT Invalid event context * @see app_event_info_h * @see app_device_orientation_e */ int app_event_get_device_orientation(app_event_info_h event_info, app_device_orientation_e *orientation); /** * @brief Gets the suspended state of the application from the given event info. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @remarks The application should not use any asynchronous operations in #APP_SUSPENDED_STATE_WILL_ENTER event. * Because applications will be changed to suspended state just after #APP_SUSPENDED_STATE_WILL_ENTER, asynchronous calls are not guaranteed to work properly. * @param[in] event_info The handle for getting the suspended state * @param[out] state The suspended state of the application * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT Invalid event context */ int app_event_get_suspended_state(app_event_info_h event_info, app_suspended_state_e *state); /** * @brief Gets the ID of the application. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks @a id must be released using free(). * @param[out] id The ID of the application * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system * @retval #APP_ERROR_OUT_OF_MEMORY Out of memory */ int app_get_id(char **id); /** * @brief Gets the localized name of the application. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks @a name must be released using free(). * @param[out] name The name of the application * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system * @retval #APP_ERROR_OUT_OF_MEMORY Out of memory */ int app_get_name(char **name); /** * @brief Gets the version of the application package. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks @a version must be released using free(). * @param[out] version The version of the application * @return @c 0 on success, * otherwise a negative error value * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system * @retval #APP_ERROR_OUT_OF_MEMORY Out of memory */ int app_get_version(char **version); /** * @brief Gets the absolute path to the application's data directory which is used to store private data of the application. * @details An application can read and write its own files in the application's data directory. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. * @return The absolute path to the application's data directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_data_path(void); /** * @brief Gets the absolute path to the application's cache directory which is used to store temporary data of the application. * @details An application can read and write its own files in the application's cache directory. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. @n * The files stored in the application's cache directory can be removed by setting application or platform while the application is running. * @return The absolute path to the application's cache directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_cache_path(void); /** * @brief Gets the absolute path to the application resource directory. The resource files are delivered with the application package. * @details An application can only read its own files in the application's resource directory. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. * @return The absolute path to the application's resource directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_resource_path(void); /** * @brief Gets the absolute path to the application's shared data directory which is used to share data with other applications. * @details An application can read and write its own files in the application's shared data directory and others can only read the files. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/appdir.shareddata * @remarks The returned path should be released. @n * Since Tizen 3.0, an application that want to use shared/data directory must declare http://tizen.org/privilege/appdir.shareddata privilege. If the application doesn't declare the privilege, the framework will not create shared/data directory for the application. * Carefully consider the privacy implications when deciding whether to use the shared/data directory, since the application cannot control access to this directory by other applications. * If you want to share files with other applications, consider passing path via @ref CAPI_APP_CONTROL_MODULE API. * The @ref CAPI_APP_CONTROL_MODULE API supports giving permission to other applications by passing path via app_control. @n * The specific error code can be obtained using the get_last_result(). Error codes are described in Exception section. * * @return The absolute path to the application's shared data directory, @n * otherwise a null pointer if the memory is insufficient. It will return NULL for applications with api-version 3.0 or later, and set #APP_ERROR_PERMISSION_DENIED if the application does not declare the shareddata privilege. * @exception APP_ERROR_NONE Success * @exception APP_ERROR_OUT_OF_MEMORY Out of memory * @exception APP_ERROR_PERMISSION_DENIED Permission denied */ char *app_get_shared_data_path(void); /** * @brief Gets the absolute path to the application's shared resource directory which is used to share resources with other applications. * @details An application can read its own files in the application's shared resource directory, and others can only read the files. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. * @return The absolute path to the application's shared resource directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_shared_resource_path(void); /** * @brief Gets the absolute path to the application's shared trusted directory which is used to share data with a family of trusted applications. * @details An application can read and write its own files in the application's shared trusted directory * and the family applications signed with the same certificate can read and write the files in the shared trusted directory. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. * @return The absolute path to the application's shared trusted directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_shared_trusted_path(void); /** * @brief Gets the absolute path to the application's external data directory which is used to store data of the application. * @details An application can read and write its own files in the application's external data directory. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. @n * The important files stored in the application's external data directory should be encrypted because they can be exported via the external sdcard. * To access the path returned by this function requires the privilege * that is "http://tizen.org/privilege/externalstorage.appdata". * @return The absolute path to the application's external data directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_external_data_path(void); /** * @brief Gets the absolute path to the application's external cache directory which is used to store temporary data of the application. * @details An application can read and write its own files in the application's external cache directory. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The returned path should be released. @n * The files stored in the application's external cache directory can be removed by * setting application while the application is running. @n * The important files stored in the application's external cache directory should be * encrypted because they can be exported via the external sdcard. * To access the path returned by this function requires the privilege * that is "http://tizen.org/privilege/externalstorage.appdata". * @return The absolute path to the application's external cache directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_external_cache_path(void); /** * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. * @brief Gets the absolute path to the application's external shared data directory which is used to share data with other applications. * @details An application can read and write its own files in the application's external shared data directory, and others can only read the files. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The specified @a path should be released. * To access the path returned by this function requires the privilege * that is "http://tizen.org/privilege/externalstorage.appdata". * The function may not work as intended in certain devices due to some implementation issues. * @return The absolute path to the application's external shared data directory, @n * otherwise a null pointer if the memory is insufficient */ char *app_get_external_shared_data_path(void) TIZEN_DEPRECATED_API; /** * @brief Gets the absolute path to the application's TEP(Tizen Expansion Package) directory. The resource files are delivered with the expansion package. * @details An application can only read its own files in the application's TEP(Tizen Expansion Package) directory. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @remarks The returned path should be released. * @return The absolute path to the application's TEP(Tizen Expansion Package) directory, @n * otherwise a null pointer if the memory is insufficient **/ char *app_get_tep_resource_path(void); /** * @} */ #ifdef __cplusplus } #endif #endif /* __TIZEN_APPFW_APP_H__ */
44.269504
268
0.752804
f828febf7b419f8cada2702fae6cec9eca64a70c
199
h
C
PCCWFoundation/Model/PCCWModel.h
lizhihui0215/PCCWFoundation
4007bd0fb65118f32e101c61a77e5047e9136796
[ "MIT" ]
1
2018-01-05T17:36:45.000Z
2018-01-05T17:36:45.000Z
PCCWFoundation/Model/PCCWModel.h
lizhihui0215/PCCWFoundation
4007bd0fb65118f32e101c61a77e5047e9136796
[ "MIT" ]
null
null
null
PCCWFoundation/Model/PCCWModel.h
lizhihui0215/PCCWFoundation
4007bd0fb65118f32e101c61a77e5047e9136796
[ "MIT" ]
null
null
null
// // PCCWModel.h // PCCWFoundation // // Created by 李智慧 on 13/12/2016. // Copyright © 2016 PCCW. All rights reserved. // #import <JSONModel/JSONModel.h> @interface PCCWModel : JSONModel @end
14.214286
47
0.678392
f86ca49b8417026392a09b200ee06bef1601712e
1,740
h
C
include/animation/aniren.h
sonich2401/SM64_Save_File_Converter
bd6876d66cbc3177b634540c7a2241e0ae8c759c
[ "MIT-0" ]
6
2020-07-27T19:07:37.000Z
2021-08-29T19:16:07.000Z
include/animation/aniren.h
sonich2401/SM64_Save_File_Converter
bd6876d66cbc3177b634540c7a2241e0ae8c759c
[ "MIT-0" ]
2
2021-06-09T05:49:41.000Z
2022-01-30T04:06:40.000Z
include/animation/aniren.h
sonich2401/SM64_Save_File_Converter
bd6876d66cbc3177b634540c7a2241e0ae8c759c
[ "MIT-0" ]
null
null
null
/*RenDev#2616 SM64SFM Copyright (C) 2021 RenDev Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. Permission is also granted to not credit the author in any way as long as you do not take credit for this piece of software. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Contact me at vgngamingnetwork@gmail.com if you need to contact me about this licence*/ #pragma once #include "aniren.h" #include <olcPixelGameEngine.h> namespace pge { struct aniren { olc::Sprite* baseSpr = nullptr; olc::Decal* currentDisplay = nullptr; olc::PixelGameEngine* pge; aniren(olc::PixelGameEngine* olc); aniren(); //aniren(const animation_package* package); struct frameList { float frameDurration; std::vector<olc::Sprite*> Frames; }; std::map<std::string, frameList> States; std::string currentState; float timer = 0; unsigned int currentFrame = 0; void init(unsigned int width, unsigned int height); void init(olc::Sprite* p); void UpdateDecal(olc::Sprite* p); void AddState(std::string StateName, std::vector<std::string> pathNames, float frameDir); void SetState(std::string stateName); void GetNextFrame(float fElapsedTime); ~aniren(); }; }
31.636364
170
0.736782
507cd5cc252a1ac6b6e6d149ce02b1dc3f09b8e1
3,612
h
C
services/media/framework_mojo/mojo_formatting.h
smklein/motown
eb4cd4f30c134eb411f6e6390ebe1b396769e2d5
[ "BSD-3-Clause" ]
null
null
null
services/media/framework_mojo/mojo_formatting.h
smklein/motown
eb4cd4f30c134eb411f6e6390ebe1b396769e2d5
[ "BSD-3-Clause" ]
null
null
null
services/media/framework_mojo/mojo_formatting.h
smklein/motown
eb4cd4f30c134eb411f6e6390ebe1b396769e2d5
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_FORMATTING_H_ #define SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_FORMATTING_H_ #include "mojo/services/media/common/interfaces/media_common.mojom.h" #include "mojo/services/media/common/interfaces/media_transport.mojom.h" #include "mojo/services/media/common/interfaces/media_types.mojom.h" #include "mojo/services/media/common/interfaces/rate_control.mojom.h" #include "mojo/services/media/control/interfaces/media_source.mojom.h" #include "mojo/services/network/interfaces/network_service.mojom.h" #include "services/media/framework/util/formatting.h" namespace mojo { namespace media { // See services/media/framework/ostream.h for details. // Mojo defines versions of operator<< for this that produce only numbers. const char* StringFromMediaTypeMedium(MediaTypeMedium value); const char* StringFromAudioSampleFormat(AudioSampleFormat value); const char* StringFromMediaState(MediaState value); // The following overloads add newlines. template <typename T> std::ostream& operator<<(std::ostream& os, const InterfacePtr<T>& value); std::ostream& operator<<(std::ostream& os, const MediaTypePtr& value); std::ostream& operator<<(std::ostream& os, const MediaTypeSetPtr& value); std::ostream& operator<<(std::ostream& os, const MediaTypeDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const MediaTypeSetDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const AudioMediaTypeDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const AudioMediaTypeSetDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const VideoMediaTypeDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const VideoMediaTypeSetDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const TextMediaTypeDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const TextMediaTypeSetDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const SubpictureMediaTypeDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const SubpictureMediaTypeSetDetailsPtr& value); std::ostream& operator<<(std::ostream& os, const MediaSourceStreamDescriptorPtr& value); std::ostream& operator<<(std::ostream& os, const TimelineQuadPtr& value); std::ostream& operator<<(std::ostream& os, const TimelineTransformPtr& value); std::ostream& operator<<(std::ostream& os, const HttpHeaderPtr& value); std::ostream& operator<<(std::ostream& os, const URLRequestPtr& value); std::ostream& operator<<(std::ostream& os, const URLResponsePtr& value); std::ostream& operator<<(std::ostream& os, const NetworkErrorPtr& value); std::ostream& operator<<(std::ostream& os, const ScopedDataPipeConsumerHandle& value); template <typename T> std::ostream& operator<<(std::ostream& os, const Array<T>& value) { if (!value) { return os << "<nullptr>" << std::endl; } else if (value.size() == 0) { return os << "<empty>" << std::endl; } else { os << std::endl; } int index = 0; for (T& element : const_cast<Array<T>&>(value)) { os << begl << "[" << index++ << "] " << element; } return os; } } // namespace media } // namespace mojo #endif // SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_FORMATTING_H_
42.494118
80
0.700166
76ddc2557e559fb1dff194d668b873cf5e13b7fb
775
h
C
src/include/falconn/ffht/fht_header_only.h
1flei/FALCONN
abe6996fa7f7c2debbd04e41e2acb564f71f370f
[ "MIT" ]
1,068
2015-12-10T18:03:11.000Z
2022-03-29T09:05:38.000Z
src/include/falconn/ffht/fht_header_only.h
1flei/FALCONN
abe6996fa7f7c2debbd04e41e2acb564f71f370f
[ "MIT" ]
108
2015-12-10T21:14:41.000Z
2022-03-15T17:51:17.000Z
src/include/falconn/ffht/fht_header_only.h
1flei/FALCONN
abe6996fa7f7c2debbd04e41e2acb564f71f370f
[ "MIT" ]
224
2015-12-17T02:35:21.000Z
2022-03-29T09:05:40.000Z
#ifndef _FHT_H_ #define _FHT_H_ #define FHT_HEADER_ONLY #ifdef __cplusplus extern "C" { #endif int fht_float(float *buf, int log_n); int fht_double(double *buf, int log_n); int fht_float_oop(float *in, float *out, int log_n); int fht_double_oop(double *in, double *out, int log_n); #ifdef __cplusplus } #endif #ifdef __cplusplus static inline int fht(float *buf, int log_n) { return fht_float(buf, log_n); } static inline int fht(double *buf, int log_n) { return fht_double(buf, log_n); } static inline int fht(float *buf, float *out, int log_n) { return fht_float_oop(buf, out, log_n); } static inline int fht(double *buf, double *out, int log_n) { return fht_double_oop(buf, out, log_n); } #endif // #ifdef __cplusplus #include "fht_impl.h" #endif
19.871795
60
0.717419
0a0b96574dcd1225746ddd0916a6a973af79cd6b
1,523
h
C
src/openvslam/optimize/internal/gnss_vertex.h
nfynt/openvslam
ad2da9636637e8e9abc3df1776cd1e4851a50e22
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
4
2020-11-16T07:11:13.000Z
2021-12-31T13:05:52.000Z
src/openvslam/optimize/internal/gnss_vertex.h
nfynt/openvslam
ad2da9636637e8e9abc3df1776cd1e4851a50e22
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
src/openvslam/optimize/internal/gnss_vertex.h
nfynt/openvslam
ad2da9636637e8e9abc3df1776cd1e4851a50e22
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
2
2020-09-04T06:21:13.000Z
2021-03-19T05:57:38.000Z
#ifndef OPENVSLAM_OPTIMIZER_G2O_GNSS_VERTEX_H #define OPENVSLAM_OPTIMIZER_G2O_GNSS_VERTEX_H #include "openvslam/type.h" #include <g2o/core/base_vertex.h> namespace openvslam { namespace optimize { namespace internal { class gnss_vertex final : public g2o::BaseVertex<3, Vec3_t> { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW gnss_vertex(); bool read(std::istream& is) override; bool write(std::ostream& os) const override; void setToOriginImpl() override; void oplusImpl(const double* update) override; //gnss variance //double sigma_sq; }; inline gnss_vertex::gnss_vertex() : g2o::BaseVertex<3, Vec3_t>() {} inline bool gnss_vertex::read(std::istream& is) { Vec3_t lv; for (unsigned int i = 0; i < 3; ++i) { is >> _estimate(i); } return true; } inline bool gnss_vertex::write(std::ostream& os) const { const Vec3_t pos_w = estimate(); for (unsigned int i = 0; i < 3; ++i) { os << pos_w(i) << " "; } return os.good(); } inline void gnss_vertex::setToOriginImpl() { _estimate.fill(0); } inline void gnss_vertex::oplusImpl(const double* update) { Eigen::Map<const Vec3_t> v(update); _estimate += v; } } // namespace internal } // namespace optimize } // namespace openvslam #endif // OPENVSLAM_OPTIMIZER_G2O_GNSS_VERTEX_H //Added by NFYNT for GNSS vertex node for Hyper-graph optimization /* __ _ _____ ____ _ _____ | \| | __\ `v' / \| |_ _| | | ' | _| `. .'| | ' | | | |_|\__|_| !_! |_|\__| |_| */
20.039474
66
0.648063
92b453de5df2b9886bd267d9cd72bff8c08736f7
4,334
c
C
ext/rbtelldus/rbtelldus.c
kaffepanna/rbtelldus
04966f0f92ea5181472ed42f17620e7e4fb0eb1b
[ "MIT" ]
null
null
null
ext/rbtelldus/rbtelldus.c
kaffepanna/rbtelldus
04966f0f92ea5181472ed42f17620e7e4fb0eb1b
[ "MIT" ]
null
null
null
ext/rbtelldus/rbtelldus.c
kaffepanna/rbtelldus
04966f0f92ea5181472ed42f17620e7e4fb0eb1b
[ "MIT" ]
null
null
null
#include <ruby.h> #include <telldus-core.h> static VALUE rb_mTelldus; static VALUE telldus_on(VALUE self, VALUE id) { int ret; ret = tdTurnOn(FIX2INT(id)); return INT2FIX(ret); } static VALUE telldus_off(VALUE self, VALUE id) { int ret; ret = tdTurnOff(FIX2INT(id)); return INT2FIX(ret); } static VALUE telldus_dim(VALUE self, VALUE id, VALUE level) { int ret; ret = tdDim(FIX2INT(id), FIX2INT(level)); return INT2FIX(ret); } static VALUE telldus_learn(VALUE self, VALUE id) { int ret; ret = tdLearn(FIX2INT(id)); return INT2FIX(ret); } static VALUE telldus_get_name(VALUE self, VALUE id) { VALUE rname; char *name; name = tdGetName(FIX2INT(id)); if (!name) rname = rb_str_new_cstr(""); else rname = rb_str_new_cstr(name); tdReleaseString(name); return rname; } static VALUE telldus_set_name(VALUE self, VALUE id, VALUE name) { int ret; char *cname = StringValueCStr(name); ret = tdSetName(FIX2INT(id), cname); if(!ret) return Qfalse; return Qtrue; } static VALUE telldus_last_command(VALUE self, VALUE id, VALUE mask) { int ret; ret = tdLastSentCommand(FIX2INT(id), FIX2INT(mask)); return INT2FIX(ret); } static VALUE telldus_last_value(VALUE self, VALUE id) { char *ret; unsigned char value; ret = tdLastSentValue(FIX2INT(id)); value = atoi(ret); return INT2FIX(value); } static VALUE telldus_create(VALUE self) { int ret = tdAddDevice(); return INT2FIX(ret); } static VALUE telldus_remove(VALUE self, VALUE id) { int ret = tdRemoveDevice(FIX2INT(id)); if(ret) return Qtrue; return Qfalse; } static VALUE telldus_get_param(VALUE self, VALUE id, VALUE name, VALUE defaultValue) { char *value = tdGetDeviceParameter(FIX2INT(id), StringValueCStr(name), StringValueCStr(defaultValue)); VALUE val = rb_str_new_cstr(value); tdReleaseString(value); return val; } static VALUE telldus_set_param(VALUE self, VALUE id, VALUE name, VALUE value) { int ret = tdSetDeviceParameter(FIX2INT(id), StringValueCStr(name), StringValueCStr(value)); if (ret) return Qtrue; return Qfalse; } static VALUE telldus_get_model(VALUE self, VALUE id) { char *value = tdGetModel(FIX2INT(id)); VALUE val = rb_str_new_cstr(value); tdReleaseString(value); return val; } static VALUE telldus_set_model(VALUE self, VALUE id, VALUE name) { int ret = tdSetModel(FIX2INT(id), StringValueCStr(name)); if (ret) return Qtrue; return Qfalse; } static VALUE telldus_get_ids(VALUE self) { int len,i, id; VALUE ids; ids = rb_ary_new(); len = tdGetNumberOfDevices(); for (i=0; i < len; i++) { id = tdGetDeviceId(i); rb_ary_push(ids, INT2FIX(id)); } return ids; } void Init_rbtelldus(void) { rb_mTelldus = rb_define_module("Telldus"); rb_define_singleton_method(rb_mTelldus, "on", telldus_on, 1); rb_define_singleton_method(rb_mTelldus, "off", telldus_off, 1); rb_define_singleton_method(rb_mTelldus, "dim", telldus_dim, 2); rb_define_singleton_method(rb_mTelldus, "learn", telldus_learn, 1); rb_define_singleton_method(rb_mTelldus, "getName", telldus_get_name, 1); rb_define_singleton_method(rb_mTelldus, "setName", telldus_set_name, 2); rb_define_singleton_method(rb_mTelldus, "lastCommand", telldus_last_command, 2); rb_define_singleton_method(rb_mTelldus, "lastValue", telldus_last_value, 1); rb_define_singleton_method(rb_mTelldus, "getParam", telldus_get_param, 3); rb_define_singleton_method(rb_mTelldus, "setParam", telldus_set_param, 3); rb_define_singleton_method(rb_mTelldus, "create", telldus_create, 0); rb_define_singleton_method(rb_mTelldus, "remove", telldus_remove, 1); rb_define_singleton_method(rb_mTelldus, "getModel", telldus_get_model, 1); rb_define_singleton_method(rb_mTelldus, "setModel", telldus_set_model, 2); rb_define_singleton_method(rb_mTelldus, "getIds", telldus_get_ids, 0); rb_define_const(rb_mTelldus, "SUCCESS", INT2FIX(TELLSTICK_SUCCESS)); rb_define_const(rb_mTelldus, "NOT_FOUND", INT2FIX(TELLSTICK_ERROR_NOT_FOUND)); rb_define_const(rb_mTelldus, "PERMISSION_DENIED", INT2FIX(TELLSTICK_ERROR_PERMISSION_DENIED)); rb_define_const(rb_mTelldus, "METHOD_NOT_SUPPORTED", INT2FIX(TELLSTICK_ERROR_METHOD_NOT_SUPPORTED)); rb_define_const(rb_mTelldus, "TURNON", INT2FIX(TELLSTICK_TURNON)); rb_define_const(rb_mTelldus, "TURNOFF", INT2FIX(TELLSTICK_TURNOFF)); rb_define_const(rb_mTelldus, "DIM", INT2FIX(TELLSTICK_DIM)); }
25.952096
103
0.759345
25bc5e16ca98221e777caf833d9c1387e06ada4c
182
h
C
gamelogic/global_flags.h
vesan66/Nim_Qt
f2f262d1a6211b9e1b42742b4c4b81e5335d8aa4
[ "MIT" ]
null
null
null
gamelogic/global_flags.h
vesan66/Nim_Qt
f2f262d1a6211b9e1b42742b4c4b81e5335d8aa4
[ "MIT" ]
null
null
null
gamelogic/global_flags.h
vesan66/Nim_Qt
f2f262d1a6211b9e1b42742b4c4b81e5335d8aa4
[ "MIT" ]
null
null
null
#ifndef GLOBAL_FLAGS_H #define GLOBAL_FLAGS_H #define _USEQT true #define _SHOWDESTRUCTORS false #define _SHOWCONSTRUCTORS false #define _SHOWOTHERS false #endif // GLOBAL_FLAGS_H
18.2
31
0.835165
976ffbc9e087a24ef624020dcfda7ee93a9cc2f6
924
h
C
pinyinsearchdemo/ContactsHelper.h
handsomezhou/pinyin_search_library_cpp
a01600b2660c273fa0c1c2af69e5f339f8da0736
[ "Apache-2.0" ]
9
2016-03-31T06:55:21.000Z
2020-10-13T13:39:02.000Z
pinyinsearchdemo/ContactsHelper.h
handsomezhou/pinyin_search_library_cpp
a01600b2660c273fa0c1c2af69e5f339f8da0736
[ "Apache-2.0" ]
1
2016-07-12T03:40:03.000Z
2016-10-08T10:21:59.000Z
pinyinsearchdemo/ContactsHelper.h
handsomezhou/pinyin_search_library_cpp
a01600b2660c273fa0c1c2af69e5f339f8da0736
[ "Apache-2.0" ]
1
2017-01-02T05:50:01.000Z
2017-01-02T05:50:01.000Z
#ifndef CONTACTSHELPER_H #define CONTACTSHELPER_H #include <QList> #include "Contacts.h" class ContactsHelper { public: ContactsHelper(); ~ContactsHelper(); static ContactsHelper* getInstance(); void loadContacts(); QList<Contacts*> *getBaseContacts(); void setBaseContacts(QList<Contacts*> *pBaseContacts); QList<Contacts*> *getSearchContacts() const; void setSearchContacts(QList<Contacts*> *pSearchContacts); QString *getFirstNoSearchResultInput() ; void setFirstNoSearchResultInput(QString *pFirstNoSearchResultInput); void t9Search(QString keyword); void qwertySearch(QString keyword); private: static ContactsHelper* instance; QList <Contacts*> *m_pBaseContacts=NULL; QList <Contacts*> *m_pSearchContacts=NULL; QString *m_pFirstNoSearchResultInput=NULL; void initContactsHelper(); void freeContactsHelper(); }; #endif // CONTACTSHELPER_H
24.972973
73
0.742424
1c80b9b1e3181614fa69b4e5cc43ab39f4990350
2,522
h
C
plugins/newarc.ex/Modules/7z/Include/7z.File.h
MKadaner/FarManager
c99a14c12e3481dd25ce71451ecd264656f631bb
[ "BSD-3-Clause" ]
1,256
2015-07-07T12:19:17.000Z
2022-03-31T18:41:41.000Z
plugins/newarc.ex/Modules/7z/Include/7z.File.h
MKadaner/FarManager
c99a14c12e3481dd25ce71451ecd264656f631bb
[ "BSD-3-Clause" ]
305
2017-11-01T18:58:50.000Z
2022-03-22T11:07:23.000Z
plugins/newarc.ex/Modules/7z/Include/7z.File.h
MKadaner/FarManager
c99a14c12e3481dd25ce71451ecd264656f631bb
[ "BSD-3-Clause" ]
183
2017-10-28T11:31:14.000Z
2022-03-30T16:46:24.000Z
#pragma once #include "7z.h" class CInFile : public IInStream { private: HANDLE m_hFile; int m_nRefCount; string m_strFileName; public: CInFile(const TCHAR *lpFileName); ~CInFile(); bool Open(); bool Create(); void Close(); bool GetFindData(WIN32_FIND_DATA& fData); const TCHAR *GetName(); virtual HRESULT __stdcall QueryInterface(REFIID iid, void ** ppvObject); virtual ULONG __stdcall AddRef(); virtual ULONG __stdcall Release(); virtual HRESULT __stdcall Read(void *data, unsigned int size, unsigned int *processedSize); virtual HRESULT __stdcall Seek(__int64 offset, unsigned int seekOrigin, unsigned __int64 *newPosition); }; class COutFile : public IOutStream { private: HANDLE m_hFile; int m_nRefCount; string m_strFileName; public: COutFile(const TCHAR *lpFileName); ~COutFile(); bool Open(); void Close(); bool SetTime(const FILETIME* lpCreationTime, const FILETIME* lpLastAccessTime, const FILETIME* lpLastWriteTime); bool SetAttributes(DWORD dwFileAttributes); virtual HRESULT __stdcall QueryInterface(const IID &iid, void** ppvObject); virtual ULONG __stdcall AddRef(); virtual ULONG __stdcall Release(); //ISequentialOutStream virtual HRESULT __stdcall Write(const void *data, unsigned int size, unsigned int* processedSize); //IOutStream virtual HRESULT __stdcall Seek(__int64 offset, unsigned int seekOrigin, unsigned __int64 *newPosition); virtual HRESULT __stdcall SetSize(__int64 newSize); }; struct VolumeInfo { COutFile* stream; string strFileName; unsigned __int64 pos; unsigned __int64 realSize; }; class CVolumeOutFile : public IOutStream { private: int _streamIndex; // required stream unsigned __int64 _offsetPos; // offset from start of _streamIndex index unsigned __int64 _absPos; unsigned __int64 _length; ObjectArray<VolumeInfo*> m_streams; unsigned __int64 m_uVolumeSize; string m_strFileName; int m_nRefCount; public: CVolumeOutFile(const TCHAR* lpFileName, unsigned __int64 uVolumeSize); ~CVolumeOutFile(); bool Open() { return true; } void Close(); virtual HRESULT __stdcall QueryInterface(const IID &iid, void** ppvObject); virtual ULONG __stdcall AddRef(); virtual ULONG __stdcall Release(); //ISequentialOutStream virtual HRESULT __stdcall Write(const void *data, unsigned int size, unsigned int* processedSize); //IOutStream virtual HRESULT __stdcall Seek(__int64 offset, unsigned int seekOrigin, unsigned __int64 *newPosition); virtual HRESULT __stdcall SetSize(__int64 newSize); };
22.720721
113
0.770024
59ea02ef96b0baf0ae4f55dcf5bd9080718a5269
355
h
C
compiler/extensions/cpp/runtime/src/zserio/pmr/Set.h
dkBrazz/zserio
29dd8145b7d851fac682d3afe991185ea2eac318
[ "BSD-3-Clause" ]
86
2018-09-06T09:30:53.000Z
2022-03-27T01:12:36.000Z
compiler/extensions/cpp/runtime/src/zserio/pmr/Set.h
dkBrazz/zserio
29dd8145b7d851fac682d3afe991185ea2eac318
[ "BSD-3-Clause" ]
362
2018-09-04T20:21:24.000Z
2022-03-30T15:14:38.000Z
compiler/extensions/cpp/runtime/src/zserio/pmr/Set.h
dkBrazz/zserio
29dd8145b7d851fac682d3afe991185ea2eac318
[ "BSD-3-Clause" ]
20
2018-09-10T15:59:02.000Z
2021-12-01T15:38:22.000Z
#ifndef ZSERIO_PMR_SET_H_INC #define ZSERIO_PMR_SET_H_INC #include <set> #include "zserio/pmr/PolymorphicAllocator.h" namespace zserio { namespace pmr { template <typename T, typename COMPARE = std::less<T>> using set = std::set<T, COMPARE, PropagatingPolymorphicAllocator<T>>; } // namespace pmr } // namespace zserio #endif // ZSERIO_PMR_SET_H_INC
18.684211
69
0.766197
ee9c8aaab2b1e905a87d3dc7a38404a0e92e2d6e
2,903
c
C
tests/capture/capture_concat1.c
data-man/libfsm
90eb0e0794f4eee2e65584549104023f224fed89
[ "BSD-2-Clause" ]
766
2017-02-01T21:47:09.000Z
2022-03-30T23:14:02.000Z
tests/capture/capture_concat1.c
data-man/libfsm
90eb0e0794f4eee2e65584549104023f224fed89
[ "BSD-2-Clause" ]
174
2017-02-02T18:11:46.000Z
2022-02-24T23:06:17.000Z
tests/capture/capture_concat1.c
data-man/libfsm
90eb0e0794f4eee2e65584549104023f224fed89
[ "BSD-2-Clause" ]
52
2017-02-01T21:45:45.000Z
2022-01-25T09:21:30.000Z
/* * Copyright 2020 Scott Vokes * * See LICENCE for the full copyright terms. */ #include <assert.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <fsm/fsm.h> #include <fsm/capture.h> #include <fsm/bool.h> #include "captest.h" /* concat /(ab)/ and /(cde)/ */ static struct fsm * build(unsigned *cb_a, unsigned *cb_b); static void check(const struct fsm *fsm, const char *input, unsigned end_id, unsigned cb_ab, size_t exp_start_ab, size_t exp_end_ab, unsigned cb_cde, size_t exp_start_cde, size_t exp_end_cde); int main(void) { unsigned cb_ab, cb_cde; /* capture base */ struct fsm *abcde = build(&cb_ab, &cb_cde); check(abcde, "abcde", 1, cb_ab, 0, 2, cb_cde, 2, 5); fsm_free(abcde); return EXIT_SUCCESS; } static struct fsm * build(unsigned *cb_a, unsigned *cb_b) { struct fsm *ab = captest_fsm_of_string("ab", 0); struct fsm *cde = captest_fsm_of_string("cde", 1); struct fsm *abcde; struct fsm_combine_info ci; size_t cc_ab, cc_cde, cc_abcde; assert(ab); assert(cde); if (!fsm_capture_set_path(ab, 0, 0, 2)) { assert(!"path 0"); } if (!fsm_capture_set_path(cde, 0, 0, 3)) { assert(!"path 1"); } cc_ab = fsm_countcaptures(ab); assert(cc_ab == 1); cc_cde = fsm_countcaptures(cde); assert(cc_cde == 1); abcde = fsm_concat(ab, cde, &ci); assert(abcde); *cb_a = ci.capture_base_a; *cb_b = ci.capture_base_b; cc_abcde = fsm_countcaptures(abcde); assert(cc_abcde == cc_ab + cc_cde); #if LOG_INTERMEDIATE_FSMS fprintf(stderr, "==== after concat: cb_ab %u, cb_cde %u\n", *cb_a, *cb_b); fsm_print_fsm(stderr, abcde); fsm_capture_dump(stderr, "#### after concat", abcde); fprintf(stderr, "==== determinise\n"); #endif if (!fsm_determinise(abcde)) { assert(!"determinise"); } #if LOG_INTERMEDIATE_FSMS fprintf(stderr, "==== after determinise\n"); fsm_print_fsm(stderr, abcde); assert(fsm_countcaptures(abcde) == cc_abcde); fsm_capture_dump(stderr, "#### after det", abcde); #endif assert(fsm_countcaptures(abcde) == cc_abcde); return abcde; } static void check(const struct fsm *fsm, const char *input, unsigned end_id, unsigned cb_ab, size_t exp_start_ab, size_t exp_end_ab, unsigned cb_cde, size_t exp_start_cde, size_t exp_end_cde) { struct captest_input ci; fsm_state_t end; int exec_res; struct fsm_capture captures[MAX_TEST_CAPTURES]; ci.string = input; ci.pos = 0; exec_res = fsm_exec(fsm, captest_getc, &ci, &end, captures); if (exec_res != 1) { fprintf(stderr, "exec_res: %d\n", exec_res); exit(EXIT_FAILURE); } { const char *msg; if (!captest_check_single_end_id(fsm, end, end_id, &msg)) { fprintf(stderr, "%s\n", msg); exit(EXIT_FAILURE); } } assert(captures[cb_ab].pos[0] == exp_start_ab); assert(captures[cb_ab].pos[1] == exp_end_ab); assert(captures[cb_cde].pos[0] == exp_start_cde); assert(captures[cb_cde].pos[1] == exp_end_cde); }
21.664179
64
0.686876
2d9a050d5202ccbc8cb8ee8c06b7ed8bea9d63db
880
h
C
lib/nacl/NDArray.h
pcrane70/furious.js
dfd2d68ab567220f6d51f067a66f6244998bf101
[ "MIT" ]
77
2015-01-18T11:16:27.000Z
2021-08-20T20:32:41.000Z
lib/nacl/NDArray.h
pcrane70/furious.js
dfd2d68ab567220f6d51f067a66f6244998bf101
[ "MIT" ]
1
2015-01-18T11:18:01.000Z
2017-09-25T10:38:11.000Z
lib/nacl/NDArray.h
pcrane70/furious.js
dfd2d68ab567220f6d51f067a66f6244998bf101
[ "MIT" ]
13
2015-10-21T19:04:58.000Z
2022-01-12T23:27:45.000Z
#pragma once #include <stdint.h> #include "Interfaces.h" #include "DataType.h" struct NDArray { enum FJS_DataType dataType; void* data; uint32_t length; uint32_t dimensions; }; struct NDArray* FJS_NDArray_Create(uint32_t dimensions, uint32_t length, const uint32_t shape[static dimensions], enum FJS_DataType dataType); struct NDArray* FJS_NDArray_ReShape(struct NDArray* array, uint32_t newDimensions, const uint32_t newShape[static newDimensions]); void FJS_NDArray_Delete(struct NDArray* array); inline static uint32_t* FJS_NDArray_GetShape(struct NDArray* array) { if (array == NULL) { return NULL; } else { return (uint32_t*)(array + 1); } } inline static void* FJS_NDArray_GetData(struct NDArray* array) { if (array == NULL) { return NULL; } else { return array->data; } } extern int32_t FJS_NDArray_Allocations; extern int32_t FJS_Byte_Allocations;
24.444444
142
0.763636
eed6da66577b78d6eb4f004cc4ba141a2f27bae7
8,521
h
C
Dependencies/Include/cml/vector/vector_unroller.h
prophecy/Pillar
a60b07857e66312ee94d69678b1ca8c97b1a19eb
[ "MIT" ]
89
2015-12-11T12:05:02.000Z
2022-03-10T15:07:05.000Z
Foreign/cml-1_0_2/cml/vector/vector_unroller.h
yorung/XLE
083ce4c9d3fe32002ff5168e571cada2715bece4
[ "MIT" ]
4
2017-05-03T00:28:58.000Z
2020-01-30T12:32:16.000Z
Foreign/cml-1_0_2/cml/vector/vector_unroller.h
yorung/XLE
083ce4c9d3fe32002ff5168e571cada2715bece4
[ "MIT" ]
16
2017-10-29T12:11:33.000Z
2022-03-14T04:07:13.000Z
/* -*- C++ -*- ------------------------------------------------------------ Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ The Configurable Math Library (CML) is distributed under the terms of the Boost Software License, v1.0 (see cml/LICENSE for details). *-----------------------------------------------------------------------*/ /** @file * @brief * * Defines vector unrollers. * * @todo Add unrolling for dynamic vectors, and for vectors longer than * CML_VECTOR_UNROLL_LIMIT. * * @todo Does it make sense to unroll an assignment if either side of the * assignment has a fixed size, or just when the target vector is fixed * size? */ #ifndef vector_unroller_h #define vector_unroller_h #include <cml/et/traits.h> #include <cml/et/size_checking.h> #include <cml/et/scalar_ops.h> #if !defined(CML_VECTOR_UNROLL_LIMIT) #error "CML_VECTOR_UNROLL_LIMIT is undefined." #endif namespace cml { namespace et { namespace detail { /** Unroll a binary assignment operator on a fixed-size vector. * * This uses forward iteration to make efficient use of the cache. * * @sa cml::vector * @sa cml::et::OpAssign * * @bug Need to verify that OpT is actually an assignment operator. */ template<class OpT, typename E, class AT, class SrcT> class VectorAssignmentUnroller { protected: /* Forward declare: */ template<int N, int Last, bool can_unroll> struct Eval; /* The vector type being assigned to: */ typedef cml::vector<E,AT> vector_type; /* Record traits for the arguments: */ typedef ExprTraits<vector_type> dest_traits; typedef ExprTraits<SrcT> src_traits; /** Evaluate the binary operator for the first Len-1 elements. */ template<int N, int Last> struct Eval<N,Last,true> { void operator()(vector_type& dest, const SrcT& src) const { /* Apply to current N: */ OpT().apply(dest[N], src_traits().get(src,N)); /* Note: we don't need get(), since dest is a vector. */ /* Apply to N+1: */ Eval<N+1,Last,true>()(dest, src); } }; /** Evaluate the binary operator at element Last. */ template<int Last> struct Eval<Last,Last,true> { void operator()(vector_type& dest, const SrcT& src) const { /* Apply to last element: */ OpT().apply(dest[Last], src_traits().get(src,Last)); /* Note: we don't need get(), since dest is a vector. */ } }; /** Evaluate the binary operator using a loop. * * This is used when the vector's length is longer than * CML_VECTOR_UNROLL_LIMIT */ template<int N, int Last> struct Eval<N,Last,false> { void operator()(vector_type& dest, const SrcT& src) const { for(size_t i = 0; i <= Last; ++i) { OpT().apply(dest[i], src_traits().get(src,i)); /* Note: we don't need get(), since dest is a vector. */ } } }; public: /** Unroll assignment to a fixed-sized vector. */ void operator()(vector_type& dest, const SrcT& src, cml::fixed_size_tag) { typedef cml::vector<E,AT> vector_type; enum { Len = vector_type::array_size }; typedef typename VectorAssignmentUnroller<OpT,E,AT,SrcT>::template Eval<0, Len-1, (Len <= CML_VECTOR_UNROLL_LIMIT)> Unroller; /* Note: Len is the array size, so Len-1 is the last element. */ /* Use a run-time check if src is a run-time sized expression: */ typedef typename ExprTraits<SrcT>::size_tag src_size; typedef typename select_if< same_type<src_size,dynamic_size_tag>::is_true, dynamic_size_tag, fixed_size_tag>::result size_tag; /* Check the expression size (the returned size isn't needed): */ CheckedSize(dest,src,size_tag()); /* Note: for two fixed-size expressions, the if-statements and * comparisons should be completely eliminated as dead code. If src * is a dynamic-sized expression, the check will still happen. */ /* Now, call the unroller: */ Unroller()(dest,src); } private: /* XXX Blah, a temp. hack to fix the auto-resizing stuff below. */ size_t CheckOrResize( vector_type& dest, const SrcT& src, cml::resizable_tag) { #if defined(CML_AUTOMATIC_VECTOR_RESIZE_ON_ASSIGNMENT) /* Get the size of src. This also causes src to check its size: */ size_t N = std::max(dest.size(),src_traits().size(src)); /* Set the destination vector's size: */ cml::et::detail::Resize(dest,N); #else size_t N = CheckedSize(dest,src,dynamic_size_tag()); #endif return N; } size_t CheckOrResize( vector_type& dest, const SrcT& src, cml::not_resizable_tag) { return CheckedSize(dest,src,dynamic_size_tag()); } /* XXX Blah, a temp. hack to fix the auto-resizing stuff below. */ public: /** Just use a loop to assign to a runtime-sized vector. */ void operator()(vector_type& dest, const SrcT& src, cml::dynamic_size_tag) { /* Shorthand: */ typedef ExprTraits<SrcT> src_traits; size_t N = this->CheckOrResize( dest,src,typename vector_type::resizing_tag()); for(size_t i = 0; i < N; ++i) { OpT().apply(dest[i], src_traits().get(src,i)); /* Note: we don't need get(), since dest is a vector. */ } } }; /** Unroll a vector accumulation/reduction operator. * * This uses forward iteration to make efficient use of the cache. */ template<class AccumT, class OpT, class LeftT, class RightT> struct VectorAccumulateUnroller { /* Forward declare: */ template<int N, int Last, bool can_unroll> struct Eval; /* Record traits for the arguments: */ typedef ExprTraits<LeftT> left_traits; typedef ExprTraits<RightT> right_traits; /* Figure out the return type: */ typedef typename AccumT::value_type result_type; /** Evaluate for the first Len-1 elements. */ template<int N, int Last> struct Eval<N,Last,true> { result_type operator()( const LeftT& left, const RightT& right) const { /* Apply to last value: */ return AccumT().apply( OpT().apply(left[N], right_traits().get(right,N)), Eval<N+1,Last,true>()(left, right)); /* Note: we don't need get(), since dest is a vector. */ } }; /** Evaluate the binary operator at element Last. */ template<int Last> struct Eval<Last,Last,true> { result_type operator()( const LeftT& left, const RightT& right) const { return OpT().apply(left[Last],right_traits().get(right,Last)); /* Note: we don't need get(), since dest is a vector. */ } }; /** Evaluate using a loop. */ template<int N, int Last> struct Eval<N,Last,false> { result_type operator()( const LeftT& left, const RightT& right) const { result_type accum = OpT().apply(left[0],right[0]); for(size_t i = 1; i <= Last; ++i) { /* XXX This might not be optimized properly by some compilers, * but to do anything else requires changing the requirements * of a scalar operator. */ accum = AccumT().apply(accum, OpT().apply( left[i],right_traits().get(right,i))); /* Note: we don't need get(), since dest is a vector. */ } } }; }; } /** Construct an assignment unroller. * * The operator must be an assignment op, otherwise, this doesn't make any * sense. * * @bug Need to verify that OpT is actually an assignment operator. */ template<class OpT, class SrcT, typename E, class AT> inline void UnrollAssignment(cml::vector<E,AT>& dest, const SrcT& src) { /* Record the destination vector type, and the expression traits: */ typedef cml::vector<E,AT> vector_type; /* Record the type of the unroller: */ typedef detail::VectorAssignmentUnroller<OpT,E,AT,SrcT> unroller; /* Do the unroll call: */ unroller()(dest, src, typename vector_type::size_tag()); /* XXX It may make sense to unroll if either side is a fixed size. */ } } // namespace et } // namespace cml #endif // ------------------------------------------------------------------------- // vim:ft=cpp
32.773077
78
0.598404