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
ff2e993d77a0f6b26b5dc043d6efa0b6a0bbe187
5,407
c
C
tests/test_ioerror.c
dorind/iointf
5a0b509dff366357a4997aa75ee0d12dbc8332c1
[ "BSD-3-Clause" ]
null
null
null
tests/test_ioerror.c
dorind/iointf
5a0b509dff366357a4997aa75ee0d12dbc8332c1
[ "BSD-3-Clause" ]
null
null
null
tests/test_ioerror.c
dorind/iointf
5a0b509dff366357a4997aa75ee0d12dbc8332c1
[ "BSD-3-Clause" ]
null
null
null
/* Copyright(c) Dorin Duminica. 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. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define IOINTF_ERROR_TRACK_ALLOCS #include "../ctests/ctests.h" #include "../iointf.h" CTEST_NEW("ioerror_new") { size_t cnt_alloc = GIOINTF_ERROR_CNT_ALLOC; size_t cnt_free = GIOINTF_ERROR_CNT_FREE; // create a new ioerror_t object ioerror_t *err = ioerror_new(__FILE__, __FUNCTION__, __LINE__, __FILE__, KIOERROR_EOF, "ioerror_new", NULL, NULL); // should be non-null ASSERT_TRUE(err != NULL); // should have one additional ioerror_t instance ASSERT_EQ(cnt_alloc + 1, GIOINTF_ERROR_CNT_ALLOC); // should have same number of freed ioerror_t instances ASSERT_EQ(cnt_free, GIOINTF_ERROR_CNT_FREE); // free ioerror_t instance ioerror_free(err); // check that the number of GIOINTF_ERROR_CNT_FREE // is incremented by one ASSERT_EQ(cnt_free +1, GIOINTF_ERROR_CNT_FREE); // should have equal number of allocs and free ASSERT_EQ(GIOINTF_ERROR_CNT_ALLOC, GIOINTF_ERROR_CNT_FREE); } CTEST_NEW("ioerror_clear") { size_t cnt_alloc = GIOINTF_ERROR_CNT_ALLOC; // create a new ioerror_t object ioerror_t *err = ioerror_new(__FILE__, __FUNCTION__, __LINE__, __FILE__, KIOERROR_EOF, "ioerror_clear", NULL, NULL); // should be non-null ASSERT_TRUE(err != NULL); // should have one alloc more than free ASSERT_GT(GIOINTF_ERROR_CNT_ALLOC, cnt_alloc); // clear error ioerror_clear(&err); // err should be null ASSERT_TRUE(err == NULL) // should have equal number of allocs and free ASSERT_EQ(GIOINTF_ERROR_CNT_ALLOC, GIOINTF_ERROR_CNT_FREE); } CTEST_NEW("ioerror_is") { // create a new ioerror_t object ioerror_t *err = ioerror_new(__FILE__, __FUNCTION__, __LINE__, __FILE__, KIOERROR_EOF, "ioerror_is", NULL, NULL); // this should be true ASSERT_TRUE(ioerror_has(err, KIOERROR_EOF)); // free and clear err var ioerror_clear(&err); // should have equal number of allocs and free ASSERT_EQ(GIOINTF_ERROR_CNT_ALLOC, GIOINTF_ERROR_CNT_FREE); } CTEST_NEW("ioerror_origin_is") { // create a new ioerror_t object ioerror_t *orig_err = ioerror_new(__FILE__, __FUNCTION__, __LINE__, __FILE__, KIOERROR_EOF, "ioerror_origin_is", NULL, NULL); ioerror_ref err = &orig_err; // wrap once ioerror_wrap(err); // wrap twice ioerror_wrap(err); // wrap once more ioerror_wrap(err); // this should be true ASSERT_TRUE(ioerror_origin_is(*err, KIOERROR_EOF)); // this should be true ASSERT_TRUE(ioerror_has((*err), KIOERROR_EOF)); // this should be false ASSERT_FALSE(ioerror_has(*err, "non_existing_error_id")); // orig_err has changed due to ioerror_wrap() calls above ASSERT_NE(0, strcmp(KIOERROR_EOF, orig_err->error_id)); // free and clear err var ioerror_clear(err); // err should be null ASSERT_TRUE(*err == NULL) // should have equal number of allocs and free ASSERT_EQ(GIOINTF_ERROR_CNT_ALLOC, GIOINTF_ERROR_CNT_FREE); } CTEST_NEW("ioerror_has_library_id") { const char *KSAMPLE_LIBRARY_ID = "KSAMPLE_LIBRARY_ID"; // create a new ioerror_t object ioerror_t *orig_err = ioerror_new(__FILE__, __FUNCTION__, __LINE__, KSAMPLE_LIBRARY_ID, KIOERROR_EOF, "ioerror_has_library_id", NULL, NULL); ioerror_ref err = &orig_err; // this should be true ASSERT_TRUE(ioerror_has_library_id(*err, KSAMPLE_LIBRARY_ID)); // wrap once ioerror_wrap(err); // this should be true ASSERT_TRUE(ioerror_has_library_id(*err, KSAMPLE_LIBRARY_ID)); // wrap twice ioerror_wrap(err); // this should be true ASSERT_TRUE(ioerror_has_library_id(*err, KSAMPLE_LIBRARY_ID)); // free and clear err var ioerror_clear(err); // err should be null ASSERT_TRUE(*err == NULL) // should have equal number of allocs and free ASSERT_EQ(GIOINTF_ERROR_CNT_ALLOC, GIOINTF_ERROR_CNT_FREE); } CTEST_MAIN();
38.899281
90
0.736453
36ba9a708d895e1f426a1ddd3c2d498eb9eadf9e
3,519
h
C
FreeBSD/sys/dev/fb/splashreg.h
TigerBSD/FreeBSD-Custom-ThinkPad
3d092f261b362f73170871403397fc5d6b89d1dc
[ "0BSD" ]
4
2016-08-22T22:02:55.000Z
2017-03-04T22:56:44.000Z
FreeBSD/sys/dev/fb/splashreg.h
TigerBSD/FreeBSD-Custom-ThinkPad
3d092f261b362f73170871403397fc5d6b89d1dc
[ "0BSD" ]
21
2016-08-11T09:43:43.000Z
2017-01-29T12:52:56.000Z
FreeBSD/sys/dev/fb/splashreg.h
TigerBSD/TigerBSD
3d092f261b362f73170871403397fc5d6b89d1dc
[ "0BSD" ]
null
null
null
/*- * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> * 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 as * the first lines of this file unmodified. * 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. * * 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. * * $FreeBSD$ */ #ifndef _DEV_FB_SPLASHREG_H_ #define _DEV_FB_SPLASHREG_H_ #define SPLASH_IMAGE "splash_image_data" struct video_adapter; struct image_decoder { char *name; int (*init)(struct video_adapter *adp); int (*term)(struct video_adapter *adp); int (*splash)(struct video_adapter *adp, int on); char *data_type; void *data; size_t data_size; }; typedef struct image_decoder splash_decoder_t; typedef struct image_decoder scrn_saver_t; #define SPLASH_DECODER(name, sw) \ static int name##_modevent(module_t mod, int type, void *data) \ { \ switch ((modeventtype_t)type) { \ case MOD_LOAD: \ return splash_register(&sw); \ case MOD_UNLOAD: \ return splash_unregister(&sw); \ default: \ return EOPNOTSUPP; \ break; \ } \ return 0; \ } \ static moduledata_t name##_mod = { \ #name, \ name##_modevent, \ NULL \ }; \ DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); \ MODULE_DEPEND(name, splash, 1, 1, 1) #define SAVER_MODULE(name, sw) \ static int name##_modevent(module_t mod, int type, void *data) \ { \ switch ((modeventtype_t)type) { \ case MOD_LOAD: \ return splash_register(&sw); \ case MOD_UNLOAD: \ return splash_unregister(&sw); \ default: \ return EOPNOTSUPP; \ break; \ } \ return 0; \ } \ static moduledata_t name##_mod = { \ #name, \ name##_modevent, \ NULL \ }; \ DECLARE_MODULE(name, name##_mod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE); \ MODULE_DEPEND(name, splash, 1, 1, 1) /* entry point for the splash image decoder */ int splash_register(splash_decoder_t *decoder); int splash_unregister(splash_decoder_t *decoder); /* entry points for the console driver */ int splash_init(video_adapter_t *adp, int (*callback)(int, void *), void *arg); int splash_term(video_adapter_t *adp); int splash(video_adapter_t *adp, int on); /* event types for the callback function */ #define SPLASH_INIT 0 #define SPLASH_TERM 1 #endif /* _DEV_FB_SPLASHREG_H_ */
32.583333
77
0.696505
324b188ff3ff69cd35cc5eafbb9879b2363233a9
2,196
h
C
Sprout/Pods/VTAcknowledgementsViewController/Classes/VTAcknowledgementsParser.h
Sproutpic/Prototype
1d313d266b9361b2feaf94391e8311de75a66d8b
[ "FSFAP" ]
null
null
null
Sprout/Pods/VTAcknowledgementsViewController/Classes/VTAcknowledgementsParser.h
Sproutpic/Prototype
1d313d266b9361b2feaf94391e8311de75a66d8b
[ "FSFAP" ]
null
null
null
Sprout/Pods/VTAcknowledgementsViewController/Classes/VTAcknowledgementsParser.h
Sproutpic/Prototype
1d313d266b9361b2feaf94391e8311de75a66d8b
[ "FSFAP" ]
null
null
null
// // VTAcknowledgementsParser.h // // Copyright (c) 2013-2016 Vincent Tourraine (http://www.vtourraine.net) // // 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. #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif @class VTAcknowledgement; /** `VTAcknowledgementsParser` is a subclass of `NSObject` that parses a CocoaPods acknowledgements plist file. */ @interface VTAcknowledgementsParser : NSObject /** The header parsed from the plist file. */ @property (readonly, copy, nullable) NSString *header; /** The footer parsed from the plist file. */ @property (readonly, copy, nullable) NSString *footer; /** The acknowledgements parsed from the plist file. */ @property (readonly, copy, nullable) NSArray <VTAcknowledgement *> *acknowledgements; /** Initializes a parser and parses the content of an acknowledgements plist file. @param acknowledgementsPlistPath The path to the acknowledgements plist file. @return A newly created `VTAcknowledgementsParser` instance. */ - (nonnull instancetype)initWithAcknowledgementsPlistPath:(nonnull NSString *)acknowledgementsPlistPath NS_DESIGNATED_INITIALIZER; @end
33.784615
130
0.770036
c572a1cd93a1d2db0e05eb7d31f9687d5a7baa5d
3,924
h
C
src/appleseed.shaders/include/appleseed/pattern/as_pattern_helpers.h
PaulDoessel/appleseed
142908e05609cd802b3ab937ff27ef2b73dd3088
[ "MIT" ]
null
null
null
src/appleseed.shaders/include/appleseed/pattern/as_pattern_helpers.h
PaulDoessel/appleseed
142908e05609cd802b3ab937ff27ef2b73dd3088
[ "MIT" ]
null
null
null
src/appleseed.shaders/include/appleseed/pattern/as_pattern_helpers.h
PaulDoessel/appleseed
142908e05609cd802b3ab937ff27ef2b73dd3088
[ "MIT" ]
null
null
null
// // This source file is part of appleseed. // Visit http://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2016 Luis Barrancos, The appleseedhq Organization // // 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. // // Taken from patterns.h, adjusted to better suite appleseed (and OSL). /************************************************************************ * patterns.h - Some handy functions for various patterns. Wherever * possible, antialiased versions will also be given. * * Author: Larry Gritz (gritzl@acm.org) * * $Revision: #1 $ $Date: 2009/03/10 $ * ************************************************************************/ #ifndef AS_PATTERN_HELPERS_H #define AS_PATTERN_HELPERS_H #include "appleseed/math/as_math_helpers.h" // Ref: Towards Automatic Band-Limited Procedural Shaders, from // https://www.cs.virginia.edu/~connelly/publications/2015_bandlimit.pdf float filtered_abs(float x, float dx) { float A = x * erf(x / dx * M_SQRT2); float B = dx * sqrt(M_2_PI) * exp(-sqr(x) / 2 * sqr(dx)); return A * B; } float filtered_step(float a, float x, float dx) { return 0.5 * (1 + erf((x - a) / dx * M_SQRT2)); } float filtered_clamp(float x, float dx) { float A = x * erf(x / dx * M_SQRT2); float B = (x - 1) * erf((x - 1) / dx * M_SQRT2); float C = exp(-sqr(x) / 2 * sqr(dx)); float D = exp(-sqr(x - 1) / 2 * sqr(dx)); return 0.5 * (A - B + dx * sqrt(M_2_PI) * (C - D) + 1); } float filtered_smoothstep( float edge0, float edge1, float x, float dx) { float integral(float x) { return -0.5 * sqr(x) * (sqr(x) + x); } float edgediff = edge1 - edge0; float x0 = (x - edge0) / edgediff; float fw = dx / edgediff; x0 -= 0.5 * fw; float x1 = x0 + fw; float out = 0; if (x0 < 1 && x1 > 0) { out += integral(min(1, x1)) - integral(max(0, x0)); } if (x1 > 1) { out += x1 - max(1, x0); } return out / fw; } float filtered_smoothpulse( float edge0, float edge1, float edge2, float edge3, float x, float dx) { return filtered_smoothstep(edge0, edge1, x, dx) - filtered_smoothstep(edge2, edge3, x, dx); } float filtered_pulsetrain( float edge, float period, float x, float dx) { float integral(float x, float nedge) { return ((1 - nedge) * floor(x) + max(0, x - floor(x) - nedge)); } float invPeriod = 1 / period; float w = dx * invPeriod; float x0 = x * invPeriod - 0.5 * w; float x1 = x0 + w; float nedge = edge * invPeriod; if (x0 != x1) { return (integral(x1, nedge) - integral(x0, nedge)) / w; } else { return (x0 - floor(x0) < nedge) ? 0 : 1; } } #endif // AS_PATTERN_HELPERS_H
27.25
80
0.609072
302be185749c2b4b47fe1a9a46e1be547444c8d7
9,020
h
C
include/pola/utils/TypeHelpers.h
lij0511/pandora
5988618f29d2f1ba418ef54a02e227903c1e7108
[ "Apache-2.0" ]
null
null
null
include/pola/utils/TypeHelpers.h
lij0511/pandora
5988618f29d2f1ba418ef54a02e227903c1e7108
[ "Apache-2.0" ]
null
null
null
include/pola/utils/TypeHelpers.h
lij0511/pandora
5988618f29d2f1ba418ef54a02e227903c1e7108
[ "Apache-2.0" ]
null
null
null
/* * Copyright (C) 2005 The Android Open Source Project * * 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 POLA_TYPEHELPERS_H_ #define POLA_TYPEHELPERS_H_ #include <new> #include <stdint.h> #include <string.h> #include <sys/types.h> // --------------------------------------------------------------------------- namespace pola { namespace utils { /* * Types traits */ template <typename T> struct trait_trivial_ctor { enum { value = false }; }; template <typename T> struct trait_trivial_dtor { enum { value = false }; }; template <typename T> struct trait_trivial_copy { enum { value = false }; }; template <typename T> struct trait_trivial_move { enum { value = false }; }; template <typename T> struct trait_pointer { enum { value = false }; }; template <typename T> struct trait_pointer<T*> { enum { value = true }; }; template <typename TYPE> struct traits { enum { // whether this type is a pointer is_pointer = trait_pointer<TYPE>::value, // whether this type's constructor is a no-op has_trivial_ctor = is_pointer || trait_trivial_ctor<TYPE>::value, // whether this type's destructor is a no-op has_trivial_dtor = is_pointer || trait_trivial_dtor<TYPE>::value, // whether this type type can be copy-constructed with memcpy has_trivial_copy = is_pointer || trait_trivial_copy<TYPE>::value, // whether this type can be moved with memmove has_trivial_move = is_pointer || trait_trivial_move<TYPE>::value }; }; template <typename T, typename U> struct aggregate_traits { enum { is_pointer = false, has_trivial_ctor = traits<T>::has_trivial_ctor && traits<U>::has_trivial_ctor, has_trivial_dtor = traits<T>::has_trivial_dtor && traits<U>::has_trivial_dtor, has_trivial_copy = traits<T>::has_trivial_copy && traits<U>::has_trivial_copy, has_trivial_move = traits<T>::has_trivial_move && traits<U>::has_trivial_move }; }; #define POLA_TRIVIAL_CTOR_TRAIT( T ) \ template<> struct trait_trivial_ctor< T > { enum { value = true }; }; #define POLA_TRIVIAL_DTOR_TRAIT( T ) \ template<> struct trait_trivial_dtor< T > { enum { value = true }; }; #define POLA_TRIVIAL_COPY_TRAIT( T ) \ template<> struct trait_trivial_copy< T > { enum { value = true }; }; #define POLA_TRIVIAL_MOVE_TRAIT( T ) \ template<> struct trait_trivial_move< T > { enum { value = true }; }; #define POLA_BASIC_TYPES_TRAITS( T ) \ POLA_TRIVIAL_CTOR_TRAIT( T ) \ POLA_TRIVIAL_DTOR_TRAIT( T ) \ POLA_TRIVIAL_COPY_TRAIT( T ) \ POLA_TRIVIAL_MOVE_TRAIT( T ) // --------------------------------------------------------------------------- /* * basic types traits */ POLA_BASIC_TYPES_TRAITS( void ) POLA_BASIC_TYPES_TRAITS( bool ) POLA_BASIC_TYPES_TRAITS( char ) POLA_BASIC_TYPES_TRAITS( unsigned char ) POLA_BASIC_TYPES_TRAITS( short ) POLA_BASIC_TYPES_TRAITS( unsigned short ) POLA_BASIC_TYPES_TRAITS( int ) POLA_BASIC_TYPES_TRAITS( unsigned int ) POLA_BASIC_TYPES_TRAITS( long ) POLA_BASIC_TYPES_TRAITS( unsigned long ) POLA_BASIC_TYPES_TRAITS( long long ) POLA_BASIC_TYPES_TRAITS( unsigned long long ) POLA_BASIC_TYPES_TRAITS( float ) POLA_BASIC_TYPES_TRAITS( double ) // --------------------------------------------------------------------------- /* * compare and order types */ template<typename TYPE> inline int strictly_order_type(const TYPE& lhs, const TYPE& rhs) { return (lhs < rhs) ? 1 : 0; } template<typename TYPE> inline int compare_type(const TYPE& lhs, const TYPE& rhs) { return strictly_order_type(rhs, lhs) - strictly_order_type(lhs, rhs); } /* * create, destroy, copy and move types... */ template<typename TYPE> inline void construct_type(TYPE* p, size_t n) { if (!traits<TYPE>::has_trivial_ctor) { while (n--) { new(p++) TYPE; } } } template<typename TYPE> inline void destroy_type(TYPE* p, size_t n) { if (!traits<TYPE>::has_trivial_dtor) { while (n--) { p->~TYPE(); p++; } } } template<typename TYPE> inline void copy_type(TYPE* d, const TYPE* s, size_t n) { if (!traits<TYPE>::has_trivial_copy) { while (n--) { new(d) TYPE(*s); d++, s++; } } else { memcpy(d,s,n*sizeof(TYPE)); } } template<typename TYPE> inline void splat_type(TYPE* where, const TYPE* what, size_t n) { if (!traits<TYPE>::has_trivial_copy) { while (n--) { new(where) TYPE(*what); where++; } } else { while (n--) { *where++ = *what; } } } template<typename TYPE> inline void move_forward_type(TYPE* d, const TYPE* s, size_t n = 1) { if ((traits<TYPE>::has_trivial_dtor && traits<TYPE>::has_trivial_copy) || traits<TYPE>::has_trivial_move) { memmove(d,s,n*sizeof(TYPE)); } else { d += n; s += n; while (n--) { --d, --s; if (!traits<TYPE>::has_trivial_copy) { new(d) TYPE(*s); } else { *d = *s; } if (!traits<TYPE>::has_trivial_dtor) { s->~TYPE(); } } } } template<typename TYPE> inline void move_backward_type(TYPE* d, const TYPE* s, size_t n = 1) { if ((traits<TYPE>::has_trivial_dtor && traits<TYPE>::has_trivial_copy) || traits<TYPE>::has_trivial_move) { memmove(d,s,n*sizeof(TYPE)); } else { while (n--) { if (!traits<TYPE>::has_trivial_copy) { new(d) TYPE(*s); } else { *d = *s; } if (!traits<TYPE>::has_trivial_dtor) { s->~TYPE(); } d++, s++; } } } // --------------------------------------------------------------------------- /* * a key/value pair */ template <typename KEY, typename VALUE> struct key_value_pair_t { typedef KEY key_t; typedef VALUE value_t; KEY key; VALUE value; key_value_pair_t() { } key_value_pair_t(const key_value_pair_t& o) : key(o.key), value(o.value) { } key_value_pair_t(const KEY& k, const VALUE& v) : key(k), value(v) { } key_value_pair_t(const KEY& k) : key(k) { } inline bool operator < (const key_value_pair_t& o) const { return strictly_order_type(key, o.key); } inline const KEY& getKey() const { return key; } inline const VALUE& getValue() const { return value; } }; template <typename K, typename V> struct trait_trivial_ctor< key_value_pair_t<K, V> > { enum { value = aggregate_traits<K,V>::has_trivial_ctor }; }; template <typename K, typename V> struct trait_trivial_dtor< key_value_pair_t<K, V> > { enum { value = aggregate_traits<K,V>::has_trivial_dtor }; }; template <typename K, typename V> struct trait_trivial_copy< key_value_pair_t<K, V> > { enum { value = aggregate_traits<K,V>::has_trivial_copy }; }; template <typename K, typename V> struct trait_trivial_move< key_value_pair_t<K, V> > { enum { value = aggregate_traits<K,V>::has_trivial_move }; }; // --------------------------------------------------------------------------- /* * Hash codes. */ typedef uint32_t hash_t; template <typename TKey> hash_t hash_type(const TKey& key); /* Built-in hash code specializations. * Assumes pointers are 32bit. */ #define POLA_INT32_HASH(T) \ template <> inline hash_t hash_type(const T& value) { return hash_t(value); } #define POLA_INT64_HASH(T) \ template <> inline hash_t hash_type(const T& value) { \ return hash_t((value >> 32) ^ value); } #define POLA_REINTERPRET_HASH(T, R) \ template <> inline hash_t hash_type(const T& value) { \ return hash_type(*reinterpret_cast<const R*>(&value)); } POLA_INT32_HASH(bool) POLA_INT32_HASH(int8_t) POLA_INT32_HASH(uint8_t) POLA_INT32_HASH(int16_t) POLA_INT32_HASH(uint16_t) POLA_INT32_HASH(int32_t) POLA_INT32_HASH(uint32_t) POLA_INT64_HASH(int64_t) POLA_INT64_HASH(uint64_t) POLA_REINTERPRET_HASH(float, uint32_t) POLA_REINTERPRET_HASH(double, uint64_t) template <typename T> inline hash_t hash_type(T* const & value) { return hash_type(uintptr_t(value)); } } }; // --------------------------------------------------------------------------- #endif // POLA_TYPEHELPERS_H_
29.57377
85
0.603104
fdf86010f5fa53ce9017bb0d6360537ca8e3c811
1,872
h
C
kernel/include/tasking/tasking.h
somerandomdev49/oneOS
e37bc4b5c7ec2573bd9022ecaa2c12a58a46869f
[ "BSD-2-Clause" ]
null
null
null
kernel/include/tasking/tasking.h
somerandomdev49/oneOS
e37bc4b5c7ec2573bd9022ecaa2c12a58a46869f
[ "BSD-2-Clause" ]
null
null
null
kernel/include/tasking/tasking.h
somerandomdev49/oneOS
e37bc4b5c7ec2573bd9022ecaa2c12a58a46869f
[ "BSD-2-Clause" ]
null
null
null
/* * Copyright (C) 2020-2021 Nikita Melekhin. All rights reserved. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_TASKING_TASKING_H #define _KERNEL_TASKING_TASKING_H #include <drivers/generic/fpu.h> #include <fs/vfs.h> #include <libkern/types.h> #include <mem/vmm/vmm.h> #include <mem/vmm/zoner.h> #include <platform/generic/tasking/context.h> #include <platform/generic/tasking/trapframe.h> #include <tasking/bits/cpu.h> #include <tasking/proc.h> #include <tasking/thread.h> #define MAX_PROCESS_COUNT 1024 #define MAX_DYING_PROCESS_COUNT 8 #define MAX_OPENED_FILES 16 #define SIGNALS_CNT 32 extern proc_t proc[MAX_PROCESS_COUNT]; extern uint32_t nxt_proc; extern uint32_t ended_proc; proc_t* tasking_get_proc(uint32_t pid); proc_t* tasking_get_proc_by_pdir(pdirectory_t* pdir); /** * CPU FUNCTIONS */ void switchuvm(thread_t* p); /** * TASK LOADING FUNCTIONS */ void tasking_start_init_proc(); proc_t* tasking_create_kernel_thread(void* entry_point, void* data); /** * TASKING RELATED FUNCTIONS */ void tasking_init(); void tasking_kill_dying(); /** * SYSCALL IMPLEMENTATION */ void tasking_fork(trapframe_t* tf); int tasking_exec(const char* path, const char** argv, const char** env); void tasking_exit(int exit_code); int tasking_waitpid(int pid); int tasking_kill(thread_t* thread, int signo); /** * SIGNALS */ void signal_init(); int signal_set_handler(thread_t* thread, int signo, void* handler); int signal_set_allow(thread_t* thread, int signo); int signal_set_private(thread_t* thread, int signo); int signal_set_pending(thread_t* thread, int signo); int signal_rem_pending(thread_t* thread, int signo); int signal_restore_thread_after_handling_signal(thread_t* thread); int signal_dispatch_pending(thread_t* thread); #endif // _KERNEL_TASKING_TASKING_H
23.696203
73
0.771902
a98d3066314dfb14d6631f0b0d947e50be3d168b
10,466
h
C
bsbolt/External/HTSLIB/header.h
HarryZhang1224/BSBolt
a5df4db8497d7c0274f5f12041c87472c06ff78e
[ "MIT" ]
560
2015-01-09T16:01:11.000Z
2022-03-24T12:08:50.000Z
bsbolt/External/HTSLIB/header.h
HarryZhang1224/BSBolt
a5df4db8497d7c0274f5f12041c87472c06ff78e
[ "MIT" ]
1,046
2015-01-03T03:29:17.000Z
2022-03-30T23:30:35.000Z
bsbolt/External/HTSLIB/header.h
HarryZhang1224/BSBolt
a5df4db8497d7c0274f5f12041c87472c06ff78e
[ "MIT" ]
470
2015-01-06T15:42:36.000Z
2022-03-25T03:05:36.000Z
/* Copyright (c) 2013-2019 Genome Research Ltd. Authors: James Bonfield <jkb@sanger.ac.uk>, Valeriu Ohan <vo2@sanger.ac.uk> 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. Neither the names Genome Research Ltd and Wellcome Trust Sanger Institute nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file * SAM header parsing. * * These functions can be shared between SAM, BAM and CRAM file * formats as all three internally use the same string encoding for * header fields. */ #ifndef HEADER_H_ #define HEADER_H_ #include <stdarg.h> #include "cram/string_alloc.h" #include "cram/pooled_alloc.h" #include "htslib/khash.h" #include "htslib/kstring.h" #include "htslib/sam.h" #ifdef __cplusplus extern "C" { #endif /*! Make a single integer out of a two-letter type code */ static inline khint32_t TYPEKEY(const char *type) { unsigned int u0 = (unsigned char) type[0]; unsigned int u1 = (unsigned char) type[1]; return (u0 << 8) | u1; } /* * Proposed new SAM header parsing 1 @SQ ID:foo LN:100 2 @SQ ID:bar LN:200 3 @SQ ID:ram LN:300 UR:xyz 4 @RG ID:r ... 5 @RG ID:s ... Hash table for 2-char @keys without dup entries. If dup lines, we form a circular linked list. Ie hash keys = {RG, SQ}. HASH("SQ")--\ | (3) <-> 1 <-> 2 <-> 3 <-> (1) HASH("RG")--\ | (5) <-> 4 <-> 5 <-> (4) Items stored in the hash values also form their own linked lists: Ie SQ->ID(foo)->LN(100) SQ->ID(bar)->LN(200) SQ->ID(ram)->LN(300)->UR(xyz) RG->ID(r) */ /*! A single key:value pair on a header line * * These form a linked list and hold strings. The strings are * allocated from a string_alloc_t pool referenced in the master * sam_hrecs_t structure. Do not attempt to free, malloc or manipulate * these strings directly. */ typedef struct sam_hrec_tag_s { struct sam_hrec_tag_s *next; const char *str; int len; } sam_hrec_tag_t; /*! The parsed version of the SAM header string. * * Each header type (SQ, RG, HD, etc) points to its own sam_hdr_type * struct via the main hash table h in the sam_hrecs_t struct. * * These in turn consist of circular bi-directional linked lists (ie * rings) to hold the multiple instances of the same header type * code. For example if we have 5 \@SQ lines the primary hash table * will key on \@SQ pointing to the first sam_hdr_type and that in turn * will be part of a ring of 5 elements. * * For each sam_hdr_type structure we also point to a sam_hdr_tag * structure which holds the tokenised attributes; the tab separated * key:value pairs per line. */ typedef struct sam_hrec_type_s { struct sam_hrec_type_s *next; // circular list of this type struct sam_hrec_type_s *prev; // circular list of this type struct sam_hrec_type_s *global_next; // circular list of all lines struct sam_hrec_type_s *global_prev; // circular list of all lines sam_hrec_tag_t *tag; // first tag khint32_t type; // Two-letter type code as an int } sam_hrec_type_t; /*! Parsed \@SQ lines */ typedef struct { const char *name; hts_pos_t len; sam_hrec_type_t *ty; } sam_hrec_sq_t; /*! Parsed \@RG lines */ typedef struct { const char *name; sam_hrec_type_t *ty; int name_len; int id; // numerical ID } sam_hrec_rg_t; /*! Parsed \@PG lines */ typedef struct { const char *name; sam_hrec_type_t *ty; int name_len; int id; // numerical ID int prev_id; // -1 if none } sam_hrec_pg_t; /*! Sort order parsed from @HD line */ enum sam_sort_order { ORDER_UNKNOWN =-1, ORDER_UNSORTED = 0, ORDER_NAME = 1, ORDER_COORD = 2 //ORDER_COLLATE = 3 // maybe one day! }; enum sam_group_order { ORDER_NONE =-1, ORDER_QUERY = 0, ORDER_REFERENCE = 1 }; KHASH_MAP_INIT_INT(sam_hrecs_t, sam_hrec_type_t*) KHASH_MAP_INIT_STR(m_s2i, int) /*! Primary structure for header manipulation * * The initial header text is held in the text kstring_t, but is also * parsed out into SQ, RG and PG arrays. These have a hash table * associated with each to allow lookup by ID or SN fields instead of * their numeric array indices. Additionally PG has an array to hold * the linked list start points (the last in a PP chain). * * Use the appropriate sam_hdr_* functions to edit the header, and * call sam_hdr_rebuild() any time the textual form needs to be * updated again. */ struct sam_hrecs_t { khash_t(sam_hrecs_t) *h; sam_hrec_type_t *first_line; //!< First line (usually @HD) string_alloc_t *str_pool; //!< Pool of sam_hdr_tag->str strings pool_alloc_t *type_pool;//!< Pool of sam_hdr_type structs pool_alloc_t *tag_pool; //!< Pool of sam_hdr_tag structs // @SQ lines / references int nref; //!< Number of \@SQ lines int ref_sz; //!< Number of entries available in ref[] sam_hrec_sq_t *ref; //!< Array of parsed \@SQ lines khash_t(m_s2i) *ref_hash; //!< Maps SQ SN field to ref[] index // @RG lines / read-groups int nrg; //!< Number of \@RG lines int rg_sz; //!< number of entries available in rg[] sam_hrec_rg_t *rg; //!< Array of parsed \@RG lines khash_t(m_s2i) *rg_hash; //!< Maps RG ID field to rg[] index // @PG lines / programs int npg; //!< Number of \@PG lines int pg_sz; //!< Number of entries available in pg[] int npg_end; //!< Number of terminating \@PG lines int npg_end_alloc; //!< Size of pg_end field sam_hrec_pg_t *pg; //!< Array of parsed \@PG lines khash_t(m_s2i) *pg_hash; //!< Maps PG ID field to pg[] index int *pg_end; //!< \@PG chain termination IDs // @cond internal char *ID_buf; // temporary buffer for sam_hdr_pg_id uint32_t ID_buf_sz; int ID_cnt; // @endcond int dirty; // marks the header as modified, so it can be rebuilt int refs_changed; // Index of first changed ref (-1 if unchanged) int pgs_changed; // New PG line added int type_count; char (*type_order)[3]; }; /*! * Method for parsing the header text and populating the * internal hash tables. After calling this method, the * parsed representation becomes the single source of truth. * * @param bh Header structure, previously initialised by a * sam_hdr_init call * @return 0 on success, -1 on failure */ int sam_hdr_fill_hrecs(sam_hdr_t *bh); /*! * Reconstructs the text representation of the header from * the hash table data after a change has been performed on * the header. * * @return 0 on success, -1 on failure */ int sam_hdr_rebuild(sam_hdr_t *bh); /*! Creates an empty SAM header, ready to be populated. * * @return * Returns a sam_hrecs_t struct on success (free with sam_hrecs_free()) * NULL on failure */ sam_hrecs_t *sam_hrecs_new(void); /*! Produces a duplicate copy of hrecs and returns it. * @return * Returns NULL on failure */ sam_hrecs_t *sam_hrecs_dup(sam_hrecs_t *hrecs); /*! Update sam_hdr_t target_name and target_len arrays * * sam_hdr_t and sam_hrecs_t are specified separately so that sam_hdr_dup * can use it to construct target arrays from the source header. * * @return 0 on success; -1 on failure */ int sam_hdr_update_target_arrays(sam_hdr_t *bh, const sam_hrecs_t *hrecs, int refs_changed); /*! Reconstructs a kstring from the header hash table. * * @return * Returns 0 on success * -1 on failure */ int sam_hrecs_rebuild_text(const sam_hrecs_t *hrecs, kstring_t *ks); /*! Deallocates all storage used by a sam_hrecs_t struct. * * This also decrements the header reference count. If after decrementing * it is still non-zero then the header is assumed to be in use by another * caller and the free is not done. */ void sam_hrecs_free(sam_hrecs_t *hrecs); /*! * @return * Returns the first header item matching 'type'. If ID is non-NULL it checks * for the tag ID: and compares against the specified ID. * * Returns NULL if no type/ID is found */ sam_hrec_type_t *sam_hrecs_find_type_id(sam_hrecs_t *hrecs, const char *type, const char *ID_key, const char *ID_value); sam_hrec_tag_t *sam_hrecs_find_key(sam_hrec_type_t *type, const char *key, sam_hrec_tag_t **prev); int sam_hrecs_remove_key(sam_hrecs_t *hrecs, sam_hrec_type_t *type, const char *key); /*! Looks up a read-group by name and returns a pointer to the start of the * associated tag list. * * @return * Returns NULL on failure */ sam_hrec_rg_t *sam_hrecs_find_rg(sam_hrecs_t *hrecs, const char *rg); /*! Returns the sort order from the @HD SO: field */ enum sam_sort_order sam_hrecs_sort_order(sam_hrecs_t *hrecs); /*! Returns the group order from the @HD SO: field */ enum sam_group_order sam_hrecs_group_order(sam_hrecs_t *hrecs); #ifdef __cplusplus } #endif #endif /* HEADER_H_ */
32.70625
83
0.680489
65172b8a55c8adab197d060b59c96a352126c17a
4,001
h
C
ArrQManagerOne/ArrQManagerOne/ArrQManager/YYCategory/NSMutableAttributedString+BgAttStr.h
ArrQ/ArrQManager
4c4cdc056f88dcecc1d320d4f5535eb005ab9dc3
[ "MIT" ]
null
null
null
ArrQManagerOne/ArrQManagerOne/ArrQManager/YYCategory/NSMutableAttributedString+BgAttStr.h
ArrQ/ArrQManager
4c4cdc056f88dcecc1d320d4f5535eb005ab9dc3
[ "MIT" ]
null
null
null
ArrQManagerOne/ArrQManagerOne/ArrQManager/YYCategory/NSMutableAttributedString+BgAttStr.h
ArrQ/ArrQManager
4c4cdc056f88dcecc1d320d4f5535eb005ab9dc3
[ "MIT" ]
null
null
null
// // NSMutableAttributedString+BgAttStr.h // YYTools // // Created by admin on 2019/1/21. // Copyright © 2019年 ArrQ. All rights reserved. // //NSFontAttributeName 字号 UIFont //NSParagraphStyleAttributeName 段落样式 NSParagraphStyle //NSForegroundColorAttributeName 前景色 UIColor //NSBackgroundColorAttributeName 背景色 UIColor //NSObliquenessAttributeName 字体倾斜 NSNumber //NSExpansionAttributeName 字体加粗 NSNumber 比例 0就是不变 1增加一倍 //NSKernAttributeName 字间距 CGFloat //NSUnderlineStyleAttributeName 下划线 1或0 //NSUnderlineColorAttributeName 下划线颜色 //NSStrikethroughStyleAttributeName 删除线 NSUnderlineStyleNone 不设置删除线 NSUnderlineStyleSingle 设置删除线为细单实线 NSUnderlineStyleThick 设置删除线为粗单实线NSUnderlineStyleDouble 设置删除线为细双实线 //NSStrikethroughColorAttributeName 某种颜色 //NSStrokeColorAttributeName same as ForegroundColor //NSStrokeWidthAttributeName CGFloat //NSLigatureAttributeName 连笔字取值为NSNumber对象 //NSShadowAttributeName 阴影 NSShawdow //NSTextEffectAttributeName 设置文本特殊效果,取值为 NSString 对象,目前只有图版印刷效果可用: //NSAttachmentAttributeName NSTextAttachment 设置文本附件,常用插入图片 //NSLinkAttributeName 链接 NSURL (preferred) or NSString //NSBaselineOffsetAttributeName 基准线偏移 NSNumber //NSWritingDirectionAttributeName 文字方向 @[@(1),@(2)] 分别代表不同的文字出现方向等等,我想你一定用不到它 - - //NSVerticalGlyphFormAttributeName 水平或者竖直文本 1竖直 0水平 在iOS没卵用,不支持竖版 #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface NSMutableAttributedString (BgAttStr) - (void)getSetColor:(UIColor *)color range:(NSRange)range; - (void)getSetFont:(UIFont *)font range:(NSRange)range; - (void)getSetUnderline:(NSRange)range; #pragma mark - 一句话中的某些字的颜色(多种颜色) // 两种 颜色 +(NSMutableAttributedString *)getTwoTextColorWithColor:(UIColor *)color string:(NSString *)str andSubString:(NSArray *)subStringArr andTwoString:(NSArray *)TwoString andTwoColor:(UIColor *)TwoColor; +(NSMutableAttributedString *)getMoreTextColorWithColor:(UIColor *)color string:(NSString *)str andSubString:(NSArray *)subStringArr andTwoString:(NSArray *)TwoString andThreeString:(NSArray *)ThreeString andForthString:(NSArray *)ForthString andFifthString:(NSArray *)FifthString andTwoColor:(UIColor *)TwoColor andThreeColor:(UIColor *)ThreeColor andForthString:(UIColor *)ForthColor andFifthString:(UIColor *)FifthColor; #pragma mark - 单纯改变一句话中的某些字的颜色(一种颜色) /** * 单纯改变一句话中的某些字的颜色(一种颜色) * * @param color 需要改变成的颜色 * @param str 总的字符串 * @param subStringArr 需要改变颜色的文字数组(字符串中所有的 相同的字) * * @return 生成的富文本 */ +(NSMutableAttributedString *)changeTextColorWithColor:(UIColor *)color string:(NSString *)str andSubString:(NSArray *)subStringArr; #pragma mark - 获取某个子字符串在某个总字符串中位置数组 /** * 获取某个字符串中子字符串的位置数组 (字符串中所有的 相同的字) * * @param totalString 总的字符串 * @param subString 子字符串 * * @return 位置数组 */ + (NSMutableArray *)getRangeWithTotalString:(NSString *)totalString SubString:(NSString *)subString; #pragma mark - 改变某些文字的颜色 并单独设置其字体 /** * 改变某些文字的颜色 并单独设置其字体 * * @param font 设置的字体 * @param color 颜色 * @param totalString 总的字符串 * @param subArray 想要变色的字符数组 * * @return 生成的富文本 */ + (NSMutableAttributedString *)changeFontAndColor:(UIFont *)font Color:(UIColor *)color TotalString:(NSString *)totalString SubStringArray:(NSArray *)subArray; #pragma mark - 改变富文本中某个字符串字体的大小 + (NSMutableAttributedString *)changeFont:(UIFont *)font Color:(UIColor *)color WithAttributedString:(NSMutableAttributedString *)attributString WithOriginString:(NSString *)originString SubString:(NSString *)subString; #pragma mark - 为某些文字下面画线 (中画线 / 下画线) /** * 为某些文字下面画线 * * @param totalString 总的字符串 * @param subArray 需要画线的文字数组 * @param lineColor 线条的颜色 * @return 生成的富文本 */ + (NSMutableAttributedString *)addLinkWithTotalString:(NSString *)totalString andLineColor:(UIColor *)lineColor SubStringArray:(NSArray *)subArray; @end NS_ASSUME_NONNULL_END
34.196581
423
0.753812
45763ec3e25778394a6bedaca80f212b1a7874b3
20,344
c
C
src/libpfm4/examples/showevtinfo.c
jqswang/papi-5.5.0-tx
550f07834b24cd63f7aa17828811c035df83b0cd
[ "BSD-3-Clause" ]
21
2018-01-20T14:01:13.000Z
2021-11-03T03:17:39.000Z
src/libpfm4/examples/showevtinfo.c
jqswang/papi-5.5.0-tx
550f07834b24cd63f7aa17828811c035df83b0cd
[ "BSD-3-Clause" ]
2
2021-08-14T14:06:32.000Z
2021-11-11T10:38:03.000Z
src/libpfm4/examples/showevtinfo.c
jqswang/papi-5.5.0-tx
550f07834b24cd63f7aa17828811c035df83b0cd
[ "BSD-3-Clause" ]
3
2015-09-05T05:21:14.000Z
2019-10-28T16:17:37.000Z
/* * showevtinfo.c - show event information * * Copyright (c) 2010 Google, Inc * Contributed by Stephane Eranian <eranian@gmail.com> * * 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. * * This file is part of libpfm, a performance monitoring support library for * applications on Linux. */ #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <stdarg.h> #include <errno.h> #include <unistd.h> #include <string.h> #include <regex.h> #include <perfmon/err.h> #include <perfmon/pfmlib.h> #define MAXBUF 1024 #define COMBO_MAX 18 static struct { int compact; int sort; int encode; int combo; int combo_lim; int desc; char *csv_sep; pfm_event_info_t efilter; pfm_event_attr_info_t ufilter; pfm_os_t os; uint64_t mask; } options; typedef struct { uint64_t code; int idx; } code_info_t; static void show_event_info_compact(pfm_event_info_t *info); static const char *srcs[PFM_ATTR_CTRL_MAX]={ [PFM_ATTR_CTRL_UNKNOWN] = "???", [PFM_ATTR_CTRL_PMU] = "PMU", [PFM_ATTR_CTRL_PERF_EVENT] = "perf_event", }; #ifdef PFMLIB_WINDOWS int set_env_var(const char *var, const char *value, int ov) { size_t len; char *str; int ret; len = strlen(var) + 1 + strlen(value) + 1; str = malloc(len); if (!str) return PFM_ERR_NOMEM; sprintf(str, "%s=%s", var, value); ret = putenv(str); free(str); return ret ? PFM_ERR_INVAL : PFM_SUCCESS; } #else static inline int set_env_var(const char *var, const char *value, int ov) { return setenv(var, value, ov); } #endif static int event_has_pname(char *s) { char *p; return (p = strchr(s, ':')) && *(p+1) == ':'; } static int print_codes(char *buf, int plm, int max_encoding) { uint64_t *codes = NULL; int j, ret, count = 0; ret = pfm_get_event_encoding(buf, PFM_PLM0|PFM_PLM3, NULL, NULL, &codes, &count); if (ret != PFM_SUCCESS) { if (ret == PFM_ERR_NOTFOUND) errx(1, "encoding failed, try setting env variable LIBPFM_ENCODE_INACTIVE=1"); return -1; } for(j = 0; j < max_encoding; j++) { if (j < count) printf("0x%"PRIx64, codes[j]); printf("%s", options.csv_sep); } free(codes); return 0; } static int check_valid(char *buf, int plm) { uint64_t *codes = NULL; int ret, count = 0; ret = pfm_get_event_encoding(buf, PFM_PLM0|PFM_PLM3, NULL, NULL, &codes, &count); if (ret != PFM_SUCCESS) return -1; free(codes); return 0; } static int match_ufilters(pfm_event_attr_info_t *info) { uint32_t ufilter1 = 0; uint32_t ufilter2 = 0; if (options.ufilter.is_dfl) ufilter1 |= 0x1; if (info->is_dfl) ufilter2 |= 0x1; if (options.ufilter.is_precise) ufilter1 |= 0x2; if (info->is_precise) ufilter2 |= 0x2; if (!ufilter1) return 1; /* at least one filter matches */ return ufilter1 & ufilter2; } static int match_efilters(pfm_event_info_t *info) { pfm_event_attr_info_t ainfo; int n = 0; int i, ret; if (options.efilter.is_precise && !info->is_precise) return 0; memset(&ainfo, 0, sizeof(ainfo)); ainfo.size = sizeof(ainfo); pfm_for_each_event_attr(i, info) { ret = pfm_get_event_attr_info(info->idx, i, options.os, &ainfo); if (ret != PFM_SUCCESS) continue; if (match_ufilters(&ainfo)) return 1; if (ainfo.type == PFM_ATTR_UMASK) n++; } return n ? 0 : 1; } static void show_event_info_combo(pfm_event_info_t *info) { pfm_event_attr_info_t *ainfo; pfm_pmu_info_t pinfo; char buf[MAXBUF]; size_t len; int numasks = 0; int i, j, ret; uint64_t total, m, u; memset(&pinfo, 0, sizeof(pinfo)); pinfo.size = sizeof(pinfo); ret = pfm_get_pmu_info(info->pmu, &pinfo); if (ret != PFM_SUCCESS) errx(1, "cannot get PMU info"); ainfo = calloc(info->nattrs, sizeof(*ainfo)); if (!ainfo) err(1, "event %s : ", info->name); /* * extract attribute information and count number * of umasks * * we cannot just drop non umasks because we need * to keep attributes in order for the enumeration * of 2^n */ pfm_for_each_event_attr(i, info) { ainfo[i].size = sizeof(*ainfo); ret = pfm_get_event_attr_info(info->idx, i, options.os, &ainfo[i]); if (ret != PFM_SUCCESS) errx(1, "cannot get attribute info: %s", pfm_strerror(ret)); if (ainfo[i].type == PFM_ATTR_UMASK) numasks++; } if (numasks > options.combo_lim) { warnx("event %s has too many umasks to print all combinations, dropping to simple enumeration", info->name); free(ainfo); show_event_info_compact(info); return; } if (numasks) { if (info->nattrs > (int)((sizeof(total)<<3))) { warnx("too many umasks, cannot show all combinations for event %s", info->name); goto end; } total = 1ULL << info->nattrs; for (u = 1; u < total; u++) { len = sizeof(buf); len -= snprintf(buf, len, "%s::%s", pinfo.name, info->name); if (len <= 0) { warnx("event name too long%s", info->name); goto end; } for(m = u, j = 0; m; m >>=1, j++) { if (m & 0x1ULL) { /* we have hit a non umasks attribute, skip */ if (ainfo[j].type != PFM_ATTR_UMASK) break; if (len < (1 + strlen(ainfo[j].name))) { warnx("umasks combination too long for event %s", buf); break; } strncat(buf, ":", len-1);buf[len-1] = '\0'; len--; strncat(buf, ainfo[j].name, len-1);buf[len-1] = '\0'; len -= strlen(ainfo[j].name); } } /* if found a valid umask combination, check encoding */ if (m == 0) { if (options.encode) ret = print_codes(buf, PFM_PLM0|PFM_PLM3, pinfo.max_encoding); else ret = check_valid(buf, PFM_PLM0|PFM_PLM3); if (!ret) printf("%s\n", buf); } } } else { snprintf(buf, sizeof(buf)-1, "%s::%s", pinfo.name, info->name); buf[sizeof(buf)-1] = '\0'; ret = options.encode ? print_codes(buf, PFM_PLM0|PFM_PLM3, pinfo.max_encoding) : 0; if (!ret) printf("%s\n", buf); } end: free(ainfo); } static void show_event_info_compact(pfm_event_info_t *info) { pfm_event_attr_info_t ainfo; pfm_pmu_info_t pinfo; char buf[MAXBUF]; int i, ret, um = 0; memset(&ainfo, 0, sizeof(ainfo)); memset(&pinfo, 0, sizeof(pinfo)); pinfo.size = sizeof(pinfo); ainfo.size = sizeof(ainfo); ret = pfm_get_pmu_info(info->pmu, &pinfo); if (ret != PFM_SUCCESS) errx(1, "cannot get pmu info: %s", pfm_strerror(ret)); pfm_for_each_event_attr(i, info) { ret = pfm_get_event_attr_info(info->idx, i, options.os, &ainfo); if (ret != PFM_SUCCESS) errx(1, "cannot get attribute info: %s", pfm_strerror(ret)); if (ainfo.type != PFM_ATTR_UMASK) continue; if (!match_ufilters(&ainfo)) continue; snprintf(buf, sizeof(buf)-1, "%s::%s:%s", pinfo.name, info->name, ainfo.name); buf[sizeof(buf)-1] = '\0'; ret = 0; if (options.encode) { ret = print_codes(buf, PFM_PLM0|PFM_PLM3, pinfo.max_encoding); } if (!ret) { printf("%s", buf); if (options.desc) { printf("%s", options.csv_sep); printf("\"%s. %s.\"", info->desc, ainfo.desc); } putchar('\n'); } um++; } if (um == 0) { if (!match_efilters(info)) return; snprintf(buf, sizeof(buf)-1, "%s::%s", pinfo.name, info->name); buf[sizeof(buf)-1] = '\0'; if (options.encode) { ret = print_codes(buf, PFM_PLM0|PFM_PLM3, pinfo.max_encoding); if (ret) return; } printf("%s", buf); if (options.desc) { printf("%s", options.csv_sep); printf("\"%s.\"", info->desc); } putchar('\n'); } } int compare_codes(const void *a, const void *b) { const code_info_t *aa = a; const code_info_t *bb = b; uint64_t m = options.mask; if ((aa->code & m) < (bb->code &m)) return -1; if ((aa->code & m) == (bb->code & m)) return 0; return 1; } static void print_event_flags(pfm_event_info_t *info) { int n = 0; if (info->is_precise) { printf("[precise] "); n++; } if (!n) printf("None"); } static void print_attr_flags(pfm_event_attr_info_t *info) { int n = 0; if (info->is_dfl) { printf("[default] "); n++; } if (info->is_precise) { printf("[precise] "); n++; } if (!n) printf("None "); } static void show_event_info(pfm_event_info_t *info) { pfm_event_attr_info_t ainfo; pfm_pmu_info_t pinfo; int mod = 0, um = 0; int i, ret; const char *src; memset(&ainfo, 0, sizeof(ainfo)); memset(&pinfo, 0, sizeof(pinfo)); pinfo.size = sizeof(pinfo); ainfo.size = sizeof(ainfo); if (!match_efilters(info)) return; ret = pfm_get_pmu_info(info->pmu, &pinfo); if (ret) errx(1, "cannot get pmu info: %s", pfm_strerror(ret)); printf("#-----------------------------\n" "IDX : %d\n" "PMU name : %s (%s)\n" "Name : %s\n" "Equiv : %s\n", info->idx, pinfo.name, pinfo.desc, info->name, info->equiv ? info->equiv : "None"); printf("Flags : "); print_event_flags(info); putchar('\n'); printf("Desc : %s\n", info->desc ? info->desc : "no description available"); printf("Code : 0x%"PRIx64"\n", info->code); pfm_for_each_event_attr(i, info) { ret = pfm_get_event_attr_info(info->idx, i, options.os, &ainfo); if (ret != PFM_SUCCESS) errx(1, "cannot retrieve event %s attribute info: %s", info->name, pfm_strerror(ret)); if (ainfo.ctrl >= PFM_ATTR_CTRL_MAX) { warnx("event: %s has unsupported attribute source %d", info->name, ainfo.ctrl); ainfo.ctrl = PFM_ATTR_CTRL_UNKNOWN; } src = srcs[ainfo.ctrl]; switch(ainfo.type) { case PFM_ATTR_UMASK: if (!match_ufilters(&ainfo)) continue; printf("Umask-%02u : 0x%02"PRIx64" : %s : [%s] : ", um, ainfo.code, src, ainfo.name); print_attr_flags(&ainfo); putchar(':'); if (ainfo.equiv) printf(" Alias to %s", ainfo.equiv); else printf(" %s", ainfo.desc); putchar('\n'); um++; break; case PFM_ATTR_MOD_BOOL: printf("Modif-%02u : 0x%02"PRIx64" : %s : [%s] : %s (boolean)\n", mod, ainfo.code, src, ainfo.name, ainfo.desc); mod++; break; case PFM_ATTR_MOD_INTEGER: printf("Modif-%02u : 0x%02"PRIx64" : %s : [%s] : %s (integer)\n", mod, ainfo.code, src, ainfo.name, ainfo.desc); mod++; break; default: printf("Attr-%02u : 0x%02"PRIx64" : %s : [%s] : %s\n", i, ainfo.code, ainfo.name, src, ainfo.desc); } } } static int show_info(char *event, regex_t *preg) { pfm_pmu_info_t pinfo; pfm_event_info_t info; int i, j, ret, match = 0, pname; size_t len, l = 0; char *fullname = NULL; memset(&pinfo, 0, sizeof(pinfo)); memset(&info, 0, sizeof(info)); pinfo.size = sizeof(pinfo); info.size = sizeof(info); pname = event_has_pname(event); /* * scan all supported events, incl. those * from undetected PMU models */ pfm_for_all_pmus(j) { ret = pfm_get_pmu_info(j, &pinfo); if (ret != PFM_SUCCESS) continue; /* no pmu prefix, just look for detected PMU models */ if (!pname && !pinfo.is_present) continue; for (i = pinfo.first_event; i != -1; i = pfm_get_event_next(i)) { ret = pfm_get_event_info(i, options.os, &info); if (ret != PFM_SUCCESS) errx(1, "cannot get event info: %s", pfm_strerror(ret)); len = strlen(info.name) + strlen(pinfo.name) + 1 + 2; if (len > l) { l = len; fullname = realloc(fullname, l); if (!fullname) err(1, "cannot allocate memory"); } sprintf(fullname, "%s::%s", pinfo.name, info.name); if (regexec(preg, fullname, 0, NULL, 0) == 0) { if (options.compact) if (options.combo) show_event_info_combo(&info); else show_event_info_compact(&info); else show_event_info(&info); match++; } } } if (fullname) free(fullname); return match; } static int show_info_sorted(char *event, regex_t *preg) { pfm_pmu_info_t pinfo; pfm_event_info_t info; unsigned int j; int i, ret, n, match = 0; size_t len, l = 0; char *fullname = NULL; code_info_t *codes; memset(&pinfo, 0, sizeof(pinfo)); memset(&info, 0, sizeof(info)); pinfo.size = sizeof(pinfo); info.size = sizeof(info); pfm_for_all_pmus(j) { ret = pfm_get_pmu_info(j, &pinfo); if (ret != PFM_SUCCESS) continue; codes = malloc(pinfo.nevents * sizeof(*codes)); if (!codes) err(1, "cannot allocate memory\n"); /* scans all supported events */ n = 0; for (i = pinfo.first_event; i != -1; i = pfm_get_event_next(i)) { ret = pfm_get_event_info(i, options.os, &info); if (ret != PFM_SUCCESS) errx(1, "cannot get event info: %s", pfm_strerror(ret)); if (info.pmu != j) continue; codes[n].idx = info.idx; codes[n].code = info.code; n++; } qsort(codes, n, sizeof(*codes), compare_codes); for(i=0; i < n; i++) { ret = pfm_get_event_info(codes[i].idx, options.os, &info); if (ret != PFM_SUCCESS) errx(1, "cannot get event info: %s", pfm_strerror(ret)); len = strlen(info.name) + strlen(pinfo.name) + 1 + 2; if (len > l) { l = len; fullname = realloc(fullname, l); if (!fullname) err(1, "cannot allocate memory"); } sprintf(fullname, "%s::%s", pinfo.name, info.name); if (regexec(preg, fullname, 0, NULL, 0) == 0) { if (options.compact) show_event_info_compact(&info); else show_event_info(&info); match++; } } free(codes); } if (fullname) free(fullname); return match; } static void usage(void) { printf("showevtinfo [-L] [-E] [-h] [-s] [-m mask]\n" "-L\t\tlist one event per line (compact mode)\n" "-E\t\tlist one event per line with encoding (compact mode)\n" "-M\t\tdisplay all valid unit masks combination (use with -L or -E)\n" "-h\t\tget help\n" "-s\t\tsort event by PMU and by code based on -m mask\n" "-l\t\tmaximum number of umasks to list all combinations (default: %d)\n" "-F\t\tshow only events and attributes with certain flags (precise,...)\n" "-m mask\t\thexadecimal event code mask, bits to match when sorting\n" "-x sep\t\tuse sep as field separator in compact mode\n" "-D\t\t\tprint event description in compact mode\n" "-O os\t\tshow attributes for the specific operating system\n", COMBO_MAX); } /* * keep: [pmu::]event * drop everything else */ static void drop_event_attributes(char *str) { char *p; p = strchr(str, ':'); if (!p) return; str = p+1; /* keep PMU name */ if (*str == ':') str++; /* stop string at 1st attribute */ p = strchr(str, ':'); if (p) *p = '\0'; } #define EVENT_FLAGS(n, f, l) { .name = n, .ebit = f, .ubit = l } struct attr_flags { const char *name; int ebit; /* bit position in pfm_event_info_t.flags, -1 means ignore */ int ubit; /* bit position in pfm_event_attr_info_t.flags, -1 means ignore */ }; static const struct attr_flags event_flags[]={ EVENT_FLAGS("precise", 0, 1), EVENT_FLAGS("pebs", 0, 1), EVENT_FLAGS("default", -1, 0), EVENT_FLAGS("dfl", -1, 0), EVENT_FLAGS(NULL, 0, 0) }; static void parse_filters(char *arg) { const struct attr_flags *attr; char *p; while (arg) { p = strchr(arg, ','); if (p) *p++ = 0; for (attr = event_flags; attr->name; attr++) { if (!strcasecmp(attr->name, arg)) { switch(attr->ebit) { case 0: options.efilter.is_precise = 1; break; case -1: break; default: errx(1, "unknown event flag %d", attr->ebit); } switch (attr->ubit) { case 0: options.ufilter.is_dfl = 1; break; case 1: options.ufilter.is_precise = 1; break; case -1: break; default: errx(1, "unknown umaks flag %d", attr->ubit); } break; } } arg = p; } } static const struct { char *name; pfm_os_t os; } supported_oses[]={ { .name = "none", .os = PFM_OS_NONE }, { .name = "raw", .os = PFM_OS_NONE }, { .name = "pmu", .os = PFM_OS_NONE }, { .name = "perf", .os = PFM_OS_PERF_EVENT}, { .name = "perf_ext", .os = PFM_OS_PERF_EVENT_EXT}, { .name = NULL, } }; static const char *pmu_types[]={ "unknown type", "core", "uncore", "OS generic", }; static void setup_os(char *ostr) { int i; for (i = 0; supported_oses[i].name; i++) { if (!strcmp(supported_oses[i].name, ostr)) { options.os = supported_oses[i].os; return; } } fprintf(stderr, "unknown OS layer %s, choose from:", ostr); for (i = 0; supported_oses[i].name; i++) { if (i) fputc(',', stderr); fprintf(stderr, " %s", supported_oses[i].name); } fputc('\n', stderr); exit(1); } int main(int argc, char **argv) { static char *argv_all[2] = { ".*", NULL }; pfm_pmu_info_t pinfo; char *endptr = NULL; char default_sep[2] = "\t"; char *ostr = NULL; char **args; int i, match; regex_t preg; int ret, c; memset(&pinfo, 0, sizeof(pinfo)); pinfo.size = sizeof(pinfo); while ((c=getopt(argc, argv,"hELsm:Ml:F:x:DO:")) != -1) { switch(c) { case 'L': options.compact = 1; break; case 'F': parse_filters(optarg); break; case 'E': options.compact = 1; options.encode = 1; break; case 'M': options.combo = 1; break; case 's': options.sort = 1; break; case 'D': options.desc = 1; break; case 'l': options.combo_lim = atoi(optarg); break; case 'x': options.csv_sep = optarg; break; case 'O': ostr = optarg; break; case 'm': options.mask = strtoull(optarg, &endptr, 16); if (*endptr) errx(1, "mask must be in hexadecimal\n"); break; case 'h': usage(); exit(0); default: errx(1, "unknown option error"); } } /* to allow encoding of events from non detected PMU models */ ret = set_env_var("LIBPFM_ENCODE_INACTIVE", "1", 1); if (ret != PFM_SUCCESS) errx(1, "cannot force inactive encoding"); ret = pfm_initialize(); if (ret != PFM_SUCCESS) errx(1, "cannot initialize libpfm: %s", pfm_strerror(ret)); if (options.mask == 0) options.mask = ~0; if (optind == argc) { args = argv_all; } else { args = argv + optind; } if (!options.csv_sep) options.csv_sep = default_sep; /* avoid combinatorial explosion */ if (options.combo_lim == 0) options.combo_lim = COMBO_MAX; if (ostr) setup_os(ostr); else options.os = PFM_OS_NONE; if (!options.compact) { int total_supported_events = 0; int total_available_events = 0; printf("Supported PMU models:\n"); pfm_for_all_pmus(i) { ret = pfm_get_pmu_info(i, &pinfo); if (ret != PFM_SUCCESS) continue; printf("\t[%d, %s, \"%s\"]\n", i, pinfo.name, pinfo.desc); } printf("Detected PMU models:\n"); pfm_for_all_pmus(i) { ret = pfm_get_pmu_info(i, &pinfo); if (ret != PFM_SUCCESS) continue; if (pinfo.is_present) { if (pinfo.type >= PFM_PMU_TYPE_MAX) pinfo.type = PFM_PMU_TYPE_UNKNOWN; printf("\t[%d, %s, \"%s\", %d events, %d max encoding, %d counters, %s PMU]\n", i, pinfo.name, pinfo.desc, pinfo.nevents, pinfo.max_encoding, pinfo.num_cntrs + pinfo.num_fixed_cntrs, pmu_types[pinfo.type]); total_supported_events += pinfo.nevents; } total_available_events += pinfo.nevents; } printf("Total events: %d available, %d supported\n", total_available_events, total_supported_events); } while(*args) { /* drop umasks and modifiers */ drop_event_attributes(*args); if (regcomp(&preg, *args, REG_ICASE)) errx(1, "error in regular expression for event \"%s\"", *argv); if (options.sort) match = show_info_sorted(*args, &preg); else match = show_info(*args, &preg); if (match == 0) errx(1, "event %s not found", *args); args++; } regfree(&preg); pfm_terminate(); return 0; }
22.258206
115
0.627359
ca016fe21af8c33f4280167daa455e4e0b564958
1,632
c
C
src/defender.c
luamfb/rugby-game
a5b1e4f5ac8b893eac59e0088f4f987179362c19
[ "MIT" ]
null
null
null
src/defender.c
luamfb/rugby-game
a5b1e4f5ac8b893eac59e0088f4f987179362c19
[ "MIT" ]
null
null
null
src/defender.c
luamfb/rugby-game
a5b1e4f5ac8b893eac59e0088f4f987179362c19
[ "MIT" ]
null
null
null
// Standard headers #include <stdio.h> #include <stdlib.h> // Internal headers #include "direction.h" #include "position.h" #include "spy.h" // Main header #include "defender.h" // Macros #define UNUSED(x) (void)(x) // Auxiliary to avoid error of unused parameter // extern functions // implemented in attacker.c extern void initialize_random_seed_if_needed(void); /*----------------------------------------------------------------------------*/ /* PRIVATE FUNCTIONS */ /*----------------------------------------------------------------------------*/ static direction_t defender_choose_direction(void) { int random_value = rand() % 20; if (random_value == 0) { return (direction_t) DIR_UP; } if (random_value == 1) { return (direction_t) DIR_DOWN; } return (direction_t) DIR_STAY; } /*----------------------------------------------------------------------------*/ /* PUBLIC FUNCTIONS */ /*----------------------------------------------------------------------------*/ direction_t execute_defender_strategy( position_t defender_position, Spy attacker_spy) { // I don't even know the grid size, so I won't bother with spying on // the attacker either UNUSED(attacker_spy); // This defender is mostly stationary, so even if it hit an obstacle and // couldn't move last turn, that's OK UNUSED(defender_position); initialize_random_seed_if_needed(); return defender_choose_direction(); } /*----------------------------------------------------------------------------*/
29.142857
80
0.492034
ca175ebd6b8993d2b49da014434d04aa65180e6e
4,539
h
C
emulator/src/devices/machine/nsc810.h
rjw57/tiw-computer
5ef1c79893165b8622d1114d81cd0cded58910f0
[ "MIT" ]
1
2022-01-15T21:38:38.000Z
2022-01-15T21:38:38.000Z
emulator/src/devices/machine/nsc810.h
rjw57/tiw-computer
5ef1c79893165b8622d1114d81cd0cded58910f0
[ "MIT" ]
null
null
null
emulator/src/devices/machine/nsc810.h
rjw57/tiw-computer
5ef1c79893165b8622d1114d81cd0cded58910f0
[ "MIT" ]
null
null
null
// license:BSD-3-Clause // copyright-holders:Barry Rodewald /* * nsc810.h * * Created on: 10/03/2014 */ #ifndef MAME_MACHINE_NSC810_H #define MAME_MACHINE_NSC810_H #pragma once class nsc810_device : public device_t { public: // construction/destruction nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template <class Object> devcb_base &set_portA_read_callback(Object &&cb) { return m_portA_r.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_portB_read_callback(Object &&cb) { return m_portB_r.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_portC_read_callback(Object &&cb) { return m_portC_r.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_portA_write_callback(Object &&cb) { return m_portA_w.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_portB_write_callback(Object &&cb) { return m_portB_w.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_portC_write_callback(Object &&cb) { return m_portC_w.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_timer0_callback(Object &&cb) { return m_timer0_out.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_timer1_callback(Object &&cb) { return m_timer1_out.set_callback(std::forward<Object>(cb)); } void set_timer0_clock(uint32_t clk) { m_timer0_clock = clk; } void set_timer0_clock(const XTAL &clk) { set_timer0_clock(clk.value()); } void set_timer1_clock(uint32_t clk) { m_timer1_clock = clk; } void set_timer1_clock(const XTAL &clk) { set_timer1_clock(clk.value()); } DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: uint8_t m_portA_latch; uint8_t m_portB_latch; uint8_t m_portC_latch; uint8_t m_ddrA; uint8_t m_ddrB; uint8_t m_ddrC; uint8_t m_mode; emu_timer* m_timer0; emu_timer* m_timer1; uint8_t m_timer0_mode; uint8_t m_timer1_mode; uint16_t m_timer0_counter; uint16_t m_timer1_counter; uint16_t m_timer0_base; uint16_t m_timer1_base; bool m_timer0_running; bool m_timer1_running; uint32_t m_timer0_clock; uint32_t m_timer1_clock; bool m_ramselect; devcb_read8 m_portA_r; devcb_read8 m_portB_r; devcb_read8 m_portC_r; devcb_write8 m_portA_w; devcb_write8 m_portB_w; devcb_write8 m_portC_w; devcb_write_line m_timer0_out; devcb_write_line m_timer1_out; static constexpr device_timer_id TIMER0_CLOCK = 0; static constexpr device_timer_id TIMER1_CLOCK = 1; enum { REG_PORTA = 0x00, REG_PORTB, REG_PORTC, REG_DDRA = 0x04, REG_DDRB, REG_DDRC, REG_MODE_DEF, REG_PORTA_BITCLR, REG_PORTB_BITCLR, REG_PORTC_BITCLR, REG_PORTA_BITSET = 0x0c, REG_PORTB_BITSET, REG_PORTC_BITSET, REG_TIMER0_LOW = 0x10, REG_TIMER0_HIGH, REG_TIMER1_LOW, REG_TIMER1_HIGH, REG_TIMER0_STOP, REG_TIMER0_START, REG_TIMER1_STOP, REG_TIMER1_START, REG_MODE_TIMER0, REG_MODE_TIMER1 }; }; #define MCFG_NSC810_ADD(_tag, _t0clk, _t1clk) \ MCFG_DEVICE_ADD(_tag, NSC810, 0) \ downcast<nsc810_device *>(device)->set_timer0_clock(_t0clk); \ downcast<nsc810_device *>(device)->set_timer1_clock(_t1clk); #define MCFG_NSC810_PORTA_READ(_read) \ devcb = &downcast<nsc810_device &>(*device).set_portA_read_callback(DEVCB_##_read); #define MCFG_NSC810_PORTB_READ(_read) \ devcb = &downcast<nsc810_device &>(*device).set_portB_read_callback(DEVCB_##_read); #define MCFG_NSC810_PORTC_READ(_read) \ devcb = &downcast<nsc810_device &>(*device).set_portC_read_callback(DEVCB_##_read); #define MCFG_NSC810_PORTA_WRITE(_write) \ devcb = &downcast<nsc810_device &>(*device).set_portA_write_callback(DEVCB_##_write); #define MCFG_NSC810_PORTB_WRITE(_write) \ devcb = &downcast<nsc810_device &>(*device).set_portB_write_callback(DEVCB_##_write); #define MCFG_NSC810_PORTC_WRITE(_write) \ devcb = &downcast<nsc810_device &>(*device).set_portC_write_callback(DEVCB_##_write); #define MCFG_NSC810_TIMER0_OUT(_write) \ devcb = &downcast<nsc810_device &>(*device).set_timer0_callback(DEVCB_##_write); #define MCFG_NSC810_TIMER1_OUT(_write) \ devcb = &downcast<nsc810_device &>(*device).set_timer1_callback(DEVCB_##_write); // device type definition DECLARE_DEVICE_TYPE(NSC810, nsc810_device) #endif // MAME_MACHINE_NSC810_H
32.891304
135
0.779907
ca74321c1212f3974c1e2c7ffbf3c2c976d42a3c
93,849
h
C
src/wrapped/generated/wrapper.h
kokizzu/box64
6392550208eadf07419692920acc2955bb844af7
[ "MIT" ]
null
null
null
src/wrapped/generated/wrapper.h
kokizzu/box64
6392550208eadf07419692920acc2955bb844af7
[ "MIT" ]
null
null
null
src/wrapped/generated/wrapper.h
kokizzu/box64
6392550208eadf07419692920acc2955bb844af7
[ "MIT" ]
null
null
null
/******************************************************************* * File automatically generated by rebuild_wrappers.py (v2.1.0.16) * *******************************************************************/ #ifndef __WRAPPER_H_ #define __WRAPPER_H_ #include <stdint.h> #include <string.h> typedef struct x64emu_s x64emu_t; // the generic wrapper pointer functions typedef void (*wrapper_t)(x64emu_t* emu, uintptr_t fnc); // list of defined wrapper // E = current x86emu struct // v = void // C = unsigned byte c = char // W = unsigned short w = short // u = uint32, i = int32 // U = uint64, I = int64 // L = unsigned long, l = signed long (long is an int with the size of a pointer) // H = Huge 128bits value/struct // p = pointer, P = void* on the stack // f = float, d = double, D = long double, K = fake long double // V = vaargs // O = libc O_ flags bitfield // o = stdout // S = _IO_2_1_stdXXX_ pointer (or FILE*) // N = ... automatically sending 1 arg // M = ... automatically sending 2 args // A = va_list // 0 = constant 0, 1 = constant 1 void vFE(x64emu_t *emu, uintptr_t fnc); void vFv(x64emu_t *emu, uintptr_t fnc); void vFi(x64emu_t *emu, uintptr_t fnc); void vFu(x64emu_t *emu, uintptr_t fnc); void vFU(x64emu_t *emu, uintptr_t fnc); void vFf(x64emu_t *emu, uintptr_t fnc); void vFd(x64emu_t *emu, uintptr_t fnc); void vFl(x64emu_t *emu, uintptr_t fnc); void vFL(x64emu_t *emu, uintptr_t fnc); void vFp(x64emu_t *emu, uintptr_t fnc); void vFS(x64emu_t *emu, uintptr_t fnc); void cFv(x64emu_t *emu, uintptr_t fnc); void cFi(x64emu_t *emu, uintptr_t fnc); void cFu(x64emu_t *emu, uintptr_t fnc); void cFf(x64emu_t *emu, uintptr_t fnc); void cFp(x64emu_t *emu, uintptr_t fnc); void wFp(x64emu_t *emu, uintptr_t fnc); void iFE(x64emu_t *emu, uintptr_t fnc); void iFv(x64emu_t *emu, uintptr_t fnc); void iFw(x64emu_t *emu, uintptr_t fnc); void iFi(x64emu_t *emu, uintptr_t fnc); void iFI(x64emu_t *emu, uintptr_t fnc); void iFC(x64emu_t *emu, uintptr_t fnc); void iFW(x64emu_t *emu, uintptr_t fnc); void iFu(x64emu_t *emu, uintptr_t fnc); void iFU(x64emu_t *emu, uintptr_t fnc); void iFf(x64emu_t *emu, uintptr_t fnc); void iFd(x64emu_t *emu, uintptr_t fnc); void iFD(x64emu_t *emu, uintptr_t fnc); void iFl(x64emu_t *emu, uintptr_t fnc); void iFL(x64emu_t *emu, uintptr_t fnc); void iFp(x64emu_t *emu, uintptr_t fnc); void iFO(x64emu_t *emu, uintptr_t fnc); void iFS(x64emu_t *emu, uintptr_t fnc); void IFv(x64emu_t *emu, uintptr_t fnc); void IFi(x64emu_t *emu, uintptr_t fnc); void IFI(x64emu_t *emu, uintptr_t fnc); void IFf(x64emu_t *emu, uintptr_t fnc); void IFd(x64emu_t *emu, uintptr_t fnc); void IFp(x64emu_t *emu, uintptr_t fnc); void CFC(x64emu_t *emu, uintptr_t fnc); void CFp(x64emu_t *emu, uintptr_t fnc); void WFi(x64emu_t *emu, uintptr_t fnc); void WFW(x64emu_t *emu, uintptr_t fnc); void WFp(x64emu_t *emu, uintptr_t fnc); void uFv(x64emu_t *emu, uintptr_t fnc); void uFi(x64emu_t *emu, uintptr_t fnc); void uFu(x64emu_t *emu, uintptr_t fnc); void uFd(x64emu_t *emu, uintptr_t fnc); void uFl(x64emu_t *emu, uintptr_t fnc); void uFL(x64emu_t *emu, uintptr_t fnc); void uFp(x64emu_t *emu, uintptr_t fnc); void UFv(x64emu_t *emu, uintptr_t fnc); void UFu(x64emu_t *emu, uintptr_t fnc); void UFp(x64emu_t *emu, uintptr_t fnc); void UFV(x64emu_t *emu, uintptr_t fnc); void fFi(x64emu_t *emu, uintptr_t fnc); void fFf(x64emu_t *emu, uintptr_t fnc); void fFp(x64emu_t *emu, uintptr_t fnc); void dFv(x64emu_t *emu, uintptr_t fnc); void dFi(x64emu_t *emu, uintptr_t fnc); void dFu(x64emu_t *emu, uintptr_t fnc); void dFd(x64emu_t *emu, uintptr_t fnc); void dFp(x64emu_t *emu, uintptr_t fnc); void lFE(x64emu_t *emu, uintptr_t fnc); void lFv(x64emu_t *emu, uintptr_t fnc); void lFi(x64emu_t *emu, uintptr_t fnc); void lFl(x64emu_t *emu, uintptr_t fnc); void lFp(x64emu_t *emu, uintptr_t fnc); void LFv(x64emu_t *emu, uintptr_t fnc); void LFu(x64emu_t *emu, uintptr_t fnc); void LFL(x64emu_t *emu, uintptr_t fnc); void LFp(x64emu_t *emu, uintptr_t fnc); void pFE(x64emu_t *emu, uintptr_t fnc); void pFv(x64emu_t *emu, uintptr_t fnc); void pFw(x64emu_t *emu, uintptr_t fnc); void pFi(x64emu_t *emu, uintptr_t fnc); void pFI(x64emu_t *emu, uintptr_t fnc); void pFC(x64emu_t *emu, uintptr_t fnc); void pFW(x64emu_t *emu, uintptr_t fnc); void pFu(x64emu_t *emu, uintptr_t fnc); void pFU(x64emu_t *emu, uintptr_t fnc); void pFd(x64emu_t *emu, uintptr_t fnc); void pFl(x64emu_t *emu, uintptr_t fnc); void pFL(x64emu_t *emu, uintptr_t fnc); void pFp(x64emu_t *emu, uintptr_t fnc); void pFV(x64emu_t *emu, uintptr_t fnc); void HFi(x64emu_t *emu, uintptr_t fnc); void HFp(x64emu_t *emu, uintptr_t fnc); void vFEp(x64emu_t *emu, uintptr_t fnc); void vFii(x64emu_t *emu, uintptr_t fnc); void vFiI(x64emu_t *emu, uintptr_t fnc); void vFiu(x64emu_t *emu, uintptr_t fnc); void vFiU(x64emu_t *emu, uintptr_t fnc); void vFif(x64emu_t *emu, uintptr_t fnc); void vFid(x64emu_t *emu, uintptr_t fnc); void vFip(x64emu_t *emu, uintptr_t fnc); void vFWW(x64emu_t *emu, uintptr_t fnc); void vFWp(x64emu_t *emu, uintptr_t fnc); void vFui(x64emu_t *emu, uintptr_t fnc); void vFuu(x64emu_t *emu, uintptr_t fnc); void vFuU(x64emu_t *emu, uintptr_t fnc); void vFuf(x64emu_t *emu, uintptr_t fnc); void vFud(x64emu_t *emu, uintptr_t fnc); void vFul(x64emu_t *emu, uintptr_t fnc); void vFup(x64emu_t *emu, uintptr_t fnc); void vFUi(x64emu_t *emu, uintptr_t fnc); void vFfi(x64emu_t *emu, uintptr_t fnc); void vFff(x64emu_t *emu, uintptr_t fnc); void vFfp(x64emu_t *emu, uintptr_t fnc); void vFdd(x64emu_t *emu, uintptr_t fnc); void vFlp(x64emu_t *emu, uintptr_t fnc); void vFLL(x64emu_t *emu, uintptr_t fnc); void vFLp(x64emu_t *emu, uintptr_t fnc); void vFpc(x64emu_t *emu, uintptr_t fnc); void vFpi(x64emu_t *emu, uintptr_t fnc); void vFpI(x64emu_t *emu, uintptr_t fnc); void vFpC(x64emu_t *emu, uintptr_t fnc); void vFpW(x64emu_t *emu, uintptr_t fnc); void vFpu(x64emu_t *emu, uintptr_t fnc); void vFpU(x64emu_t *emu, uintptr_t fnc); void vFpf(x64emu_t *emu, uintptr_t fnc); void vFpd(x64emu_t *emu, uintptr_t fnc); void vFpl(x64emu_t *emu, uintptr_t fnc); void vFpL(x64emu_t *emu, uintptr_t fnc); void vFpp(x64emu_t *emu, uintptr_t fnc); void vFpS(x64emu_t *emu, uintptr_t fnc); void vFSi(x64emu_t *emu, uintptr_t fnc); void cFpp(x64emu_t *emu, uintptr_t fnc); void iFEi(x64emu_t *emu, uintptr_t fnc); void iFEp(x64emu_t *emu, uintptr_t fnc); void iFwp(x64emu_t *emu, uintptr_t fnc); void iFii(x64emu_t *emu, uintptr_t fnc); void iFiu(x64emu_t *emu, uintptr_t fnc); void iFil(x64emu_t *emu, uintptr_t fnc); void iFiL(x64emu_t *emu, uintptr_t fnc); void iFip(x64emu_t *emu, uintptr_t fnc); void iFiS(x64emu_t *emu, uintptr_t fnc); void iFIi(x64emu_t *emu, uintptr_t fnc); void iFui(x64emu_t *emu, uintptr_t fnc); void iFuu(x64emu_t *emu, uintptr_t fnc); void iFuL(x64emu_t *emu, uintptr_t fnc); void iFup(x64emu_t *emu, uintptr_t fnc); void iFUp(x64emu_t *emu, uintptr_t fnc); void iFli(x64emu_t *emu, uintptr_t fnc); void iFlp(x64emu_t *emu, uintptr_t fnc); void iFLu(x64emu_t *emu, uintptr_t fnc); void iFLL(x64emu_t *emu, uintptr_t fnc); void iFLp(x64emu_t *emu, uintptr_t fnc); void iFpw(x64emu_t *emu, uintptr_t fnc); void iFpi(x64emu_t *emu, uintptr_t fnc); void iFpI(x64emu_t *emu, uintptr_t fnc); void iFpC(x64emu_t *emu, uintptr_t fnc); void iFpW(x64emu_t *emu, uintptr_t fnc); void iFpu(x64emu_t *emu, uintptr_t fnc); void iFpU(x64emu_t *emu, uintptr_t fnc); void iFpf(x64emu_t *emu, uintptr_t fnc); void iFpd(x64emu_t *emu, uintptr_t fnc); void iFpl(x64emu_t *emu, uintptr_t fnc); void iFpL(x64emu_t *emu, uintptr_t fnc); void iFpp(x64emu_t *emu, uintptr_t fnc); void iFpO(x64emu_t *emu, uintptr_t fnc); void iFSi(x64emu_t *emu, uintptr_t fnc); void IFEp(x64emu_t *emu, uintptr_t fnc); void IFpi(x64emu_t *emu, uintptr_t fnc); void IFpu(x64emu_t *emu, uintptr_t fnc); void IFpd(x64emu_t *emu, uintptr_t fnc); void CFip(x64emu_t *emu, uintptr_t fnc); void CFui(x64emu_t *emu, uintptr_t fnc); void CFpi(x64emu_t *emu, uintptr_t fnc); void CFpu(x64emu_t *emu, uintptr_t fnc); void CFpp(x64emu_t *emu, uintptr_t fnc); void WFpp(x64emu_t *emu, uintptr_t fnc); void uFEp(x64emu_t *emu, uintptr_t fnc); void uFii(x64emu_t *emu, uintptr_t fnc); void uFiu(x64emu_t *emu, uintptr_t fnc); void uFip(x64emu_t *emu, uintptr_t fnc); void uFui(x64emu_t *emu, uintptr_t fnc); void uFuu(x64emu_t *emu, uintptr_t fnc); void uFup(x64emu_t *emu, uintptr_t fnc); void uFUp(x64emu_t *emu, uintptr_t fnc); void uFpw(x64emu_t *emu, uintptr_t fnc); void uFpi(x64emu_t *emu, uintptr_t fnc); void uFpu(x64emu_t *emu, uintptr_t fnc); void uFpU(x64emu_t *emu, uintptr_t fnc); void uFpf(x64emu_t *emu, uintptr_t fnc); void uFpL(x64emu_t *emu, uintptr_t fnc); void uFpp(x64emu_t *emu, uintptr_t fnc); void UFEp(x64emu_t *emu, uintptr_t fnc); void UFuu(x64emu_t *emu, uintptr_t fnc); void UFUp(x64emu_t *emu, uintptr_t fnc); void UFpi(x64emu_t *emu, uintptr_t fnc); void UFpp(x64emu_t *emu, uintptr_t fnc); void fFEp(x64emu_t *emu, uintptr_t fnc); void fFif(x64emu_t *emu, uintptr_t fnc); void fFfi(x64emu_t *emu, uintptr_t fnc); void fFff(x64emu_t *emu, uintptr_t fnc); void fFfD(x64emu_t *emu, uintptr_t fnc); void fFfp(x64emu_t *emu, uintptr_t fnc); void fFpp(x64emu_t *emu, uintptr_t fnc); void dFid(x64emu_t *emu, uintptr_t fnc); void dFdi(x64emu_t *emu, uintptr_t fnc); void dFdd(x64emu_t *emu, uintptr_t fnc); void dFdD(x64emu_t *emu, uintptr_t fnc); void dFdp(x64emu_t *emu, uintptr_t fnc); void dFll(x64emu_t *emu, uintptr_t fnc); void dFpi(x64emu_t *emu, uintptr_t fnc); void dFpd(x64emu_t *emu, uintptr_t fnc); void dFpp(x64emu_t *emu, uintptr_t fnc); void DFDi(x64emu_t *emu, uintptr_t fnc); void DFDD(x64emu_t *emu, uintptr_t fnc); void DFDp(x64emu_t *emu, uintptr_t fnc); void DFpp(x64emu_t *emu, uintptr_t fnc); void lFii(x64emu_t *emu, uintptr_t fnc); void lFll(x64emu_t *emu, uintptr_t fnc); void lFpi(x64emu_t *emu, uintptr_t fnc); void lFpp(x64emu_t *emu, uintptr_t fnc); void LFEL(x64emu_t *emu, uintptr_t fnc); void LFii(x64emu_t *emu, uintptr_t fnc); void LFuu(x64emu_t *emu, uintptr_t fnc); void LFLi(x64emu_t *emu, uintptr_t fnc); void LFLL(x64emu_t *emu, uintptr_t fnc); void LFpi(x64emu_t *emu, uintptr_t fnc); void LFpL(x64emu_t *emu, uintptr_t fnc); void LFpp(x64emu_t *emu, uintptr_t fnc); void pFEi(x64emu_t *emu, uintptr_t fnc); void pFEp(x64emu_t *emu, uintptr_t fnc); void pFii(x64emu_t *emu, uintptr_t fnc); void pFiI(x64emu_t *emu, uintptr_t fnc); void pFiu(x64emu_t *emu, uintptr_t fnc); void pFip(x64emu_t *emu, uintptr_t fnc); void pFui(x64emu_t *emu, uintptr_t fnc); void pFuC(x64emu_t *emu, uintptr_t fnc); void pFuu(x64emu_t *emu, uintptr_t fnc); void pFup(x64emu_t *emu, uintptr_t fnc); void pFUi(x64emu_t *emu, uintptr_t fnc); void pFUU(x64emu_t *emu, uintptr_t fnc); void pFdi(x64emu_t *emu, uintptr_t fnc); void pFdd(x64emu_t *emu, uintptr_t fnc); void pFlp(x64emu_t *emu, uintptr_t fnc); void pFLu(x64emu_t *emu, uintptr_t fnc); void pFLL(x64emu_t *emu, uintptr_t fnc); void pFLp(x64emu_t *emu, uintptr_t fnc); void pFpi(x64emu_t *emu, uintptr_t fnc); void pFpC(x64emu_t *emu, uintptr_t fnc); void pFpu(x64emu_t *emu, uintptr_t fnc); void pFpU(x64emu_t *emu, uintptr_t fnc); void pFpd(x64emu_t *emu, uintptr_t fnc); void pFpl(x64emu_t *emu, uintptr_t fnc); void pFpL(x64emu_t *emu, uintptr_t fnc); void pFpp(x64emu_t *emu, uintptr_t fnc); void pFpV(x64emu_t *emu, uintptr_t fnc); void pFSi(x64emu_t *emu, uintptr_t fnc); void HFII(x64emu_t *emu, uintptr_t fnc); void HFll(x64emu_t *emu, uintptr_t fnc); void HFpi(x64emu_t *emu, uintptr_t fnc); void vFEpi(x64emu_t *emu, uintptr_t fnc); void vFEpu(x64emu_t *emu, uintptr_t fnc); void vFEpp(x64emu_t *emu, uintptr_t fnc); void vFEpV(x64emu_t *emu, uintptr_t fnc); void vFiii(x64emu_t *emu, uintptr_t fnc); void vFiiu(x64emu_t *emu, uintptr_t fnc); void vFiip(x64emu_t *emu, uintptr_t fnc); void vFiII(x64emu_t *emu, uintptr_t fnc); void vFiui(x64emu_t *emu, uintptr_t fnc); void vFiuu(x64emu_t *emu, uintptr_t fnc); void vFiup(x64emu_t *emu, uintptr_t fnc); void vFiUU(x64emu_t *emu, uintptr_t fnc); void vFiff(x64emu_t *emu, uintptr_t fnc); void vFidd(x64emu_t *emu, uintptr_t fnc); void vFilp(x64emu_t *emu, uintptr_t fnc); void vFipi(x64emu_t *emu, uintptr_t fnc); void vFipu(x64emu_t *emu, uintptr_t fnc); void vFipp(x64emu_t *emu, uintptr_t fnc); void vFuii(x64emu_t *emu, uintptr_t fnc); void vFuiI(x64emu_t *emu, uintptr_t fnc); void vFuiu(x64emu_t *emu, uintptr_t fnc); void vFuiU(x64emu_t *emu, uintptr_t fnc); void vFuif(x64emu_t *emu, uintptr_t fnc); void vFuid(x64emu_t *emu, uintptr_t fnc); void vFuip(x64emu_t *emu, uintptr_t fnc); void vFuui(x64emu_t *emu, uintptr_t fnc); void vFuuu(x64emu_t *emu, uintptr_t fnc); void vFuuf(x64emu_t *emu, uintptr_t fnc); void vFuud(x64emu_t *emu, uintptr_t fnc); void vFuup(x64emu_t *emu, uintptr_t fnc); void vFuff(x64emu_t *emu, uintptr_t fnc); void vFufp(x64emu_t *emu, uintptr_t fnc); void vFudd(x64emu_t *emu, uintptr_t fnc); void vFull(x64emu_t *emu, uintptr_t fnc); void vFulp(x64emu_t *emu, uintptr_t fnc); void vFuLp(x64emu_t *emu, uintptr_t fnc); void vFupu(x64emu_t *emu, uintptr_t fnc); void vFupp(x64emu_t *emu, uintptr_t fnc); void vFfff(x64emu_t *emu, uintptr_t fnc); void vFfpp(x64emu_t *emu, uintptr_t fnc); void vFddd(x64emu_t *emu, uintptr_t fnc); void vFdpp(x64emu_t *emu, uintptr_t fnc); void vFLpL(x64emu_t *emu, uintptr_t fnc); void vFLpp(x64emu_t *emu, uintptr_t fnc); void vFpii(x64emu_t *emu, uintptr_t fnc); void vFpiI(x64emu_t *emu, uintptr_t fnc); void vFpiC(x64emu_t *emu, uintptr_t fnc); void vFpiu(x64emu_t *emu, uintptr_t fnc); void vFpif(x64emu_t *emu, uintptr_t fnc); void vFpid(x64emu_t *emu, uintptr_t fnc); void vFpip(x64emu_t *emu, uintptr_t fnc); void vFpui(x64emu_t *emu, uintptr_t fnc); void vFpuI(x64emu_t *emu, uintptr_t fnc); void vFpuu(x64emu_t *emu, uintptr_t fnc); void vFpup(x64emu_t *emu, uintptr_t fnc); void vFpUi(x64emu_t *emu, uintptr_t fnc); void vFpUu(x64emu_t *emu, uintptr_t fnc); void vFpUU(x64emu_t *emu, uintptr_t fnc); void vFpUp(x64emu_t *emu, uintptr_t fnc); void vFpff(x64emu_t *emu, uintptr_t fnc); void vFpdd(x64emu_t *emu, uintptr_t fnc); void vFpll(x64emu_t *emu, uintptr_t fnc); void vFpLi(x64emu_t *emu, uintptr_t fnc); void vFpLu(x64emu_t *emu, uintptr_t fnc); void vFpLL(x64emu_t *emu, uintptr_t fnc); void vFpLp(x64emu_t *emu, uintptr_t fnc); void vFppi(x64emu_t *emu, uintptr_t fnc); void vFppu(x64emu_t *emu, uintptr_t fnc); void vFppU(x64emu_t *emu, uintptr_t fnc); void vFppd(x64emu_t *emu, uintptr_t fnc); void vFppl(x64emu_t *emu, uintptr_t fnc); void vFppL(x64emu_t *emu, uintptr_t fnc); void vFppp(x64emu_t *emu, uintptr_t fnc); void iFEiw(x64emu_t *emu, uintptr_t fnc); void iFEip(x64emu_t *emu, uintptr_t fnc); void iFEWW(x64emu_t *emu, uintptr_t fnc); void iFEup(x64emu_t *emu, uintptr_t fnc); void iFEUU(x64emu_t *emu, uintptr_t fnc); void iFEpi(x64emu_t *emu, uintptr_t fnc); void iFEpL(x64emu_t *emu, uintptr_t fnc); void iFEpp(x64emu_t *emu, uintptr_t fnc); void iFEpV(x64emu_t *emu, uintptr_t fnc); void iFEpA(x64emu_t *emu, uintptr_t fnc); void iFESp(x64emu_t *emu, uintptr_t fnc); void iFwww(x64emu_t *emu, uintptr_t fnc); void iFwpp(x64emu_t *emu, uintptr_t fnc); void iFiwC(x64emu_t *emu, uintptr_t fnc); void iFiii(x64emu_t *emu, uintptr_t fnc); void iFiiu(x64emu_t *emu, uintptr_t fnc); void iFiil(x64emu_t *emu, uintptr_t fnc); void iFiip(x64emu_t *emu, uintptr_t fnc); void iFiiO(x64emu_t *emu, uintptr_t fnc); void iFiuu(x64emu_t *emu, uintptr_t fnc); void iFill(x64emu_t *emu, uintptr_t fnc); void iFiLi(x64emu_t *emu, uintptr_t fnc); void iFiLp(x64emu_t *emu, uintptr_t fnc); void iFiLN(x64emu_t *emu, uintptr_t fnc); void iFipi(x64emu_t *emu, uintptr_t fnc); void iFipu(x64emu_t *emu, uintptr_t fnc); void iFipL(x64emu_t *emu, uintptr_t fnc); void iFipp(x64emu_t *emu, uintptr_t fnc); void iFipO(x64emu_t *emu, uintptr_t fnc); void iFCiW(x64emu_t *emu, uintptr_t fnc); void iFuwp(x64emu_t *emu, uintptr_t fnc); void iFuui(x64emu_t *emu, uintptr_t fnc); void iFuuu(x64emu_t *emu, uintptr_t fnc); void iFuup(x64emu_t *emu, uintptr_t fnc); void iFuff(x64emu_t *emu, uintptr_t fnc); void iFuLL(x64emu_t *emu, uintptr_t fnc); void iFuLp(x64emu_t *emu, uintptr_t fnc); void iFupL(x64emu_t *emu, uintptr_t fnc); void iFupp(x64emu_t *emu, uintptr_t fnc); void iFfff(x64emu_t *emu, uintptr_t fnc); void iFlip(x64emu_t *emu, uintptr_t fnc); void iFLip(x64emu_t *emu, uintptr_t fnc); void iFLLi(x64emu_t *emu, uintptr_t fnc); void iFLpp(x64emu_t *emu, uintptr_t fnc); void iFpwp(x64emu_t *emu, uintptr_t fnc); void iFpii(x64emu_t *emu, uintptr_t fnc); void iFpiI(x64emu_t *emu, uintptr_t fnc); void iFpiu(x64emu_t *emu, uintptr_t fnc); void iFpiU(x64emu_t *emu, uintptr_t fnc); void iFpiL(x64emu_t *emu, uintptr_t fnc); void iFpip(x64emu_t *emu, uintptr_t fnc); void iFpIi(x64emu_t *emu, uintptr_t fnc); void iFpII(x64emu_t *emu, uintptr_t fnc); void iFpCp(x64emu_t *emu, uintptr_t fnc); void iFpui(x64emu_t *emu, uintptr_t fnc); void iFpuu(x64emu_t *emu, uintptr_t fnc); void iFpuU(x64emu_t *emu, uintptr_t fnc); void iFpuL(x64emu_t *emu, uintptr_t fnc); void iFpup(x64emu_t *emu, uintptr_t fnc); void iFpUi(x64emu_t *emu, uintptr_t fnc); void iFpUU(x64emu_t *emu, uintptr_t fnc); void iFpUp(x64emu_t *emu, uintptr_t fnc); void iFpfu(x64emu_t *emu, uintptr_t fnc); void iFpff(x64emu_t *emu, uintptr_t fnc); void iFpdd(x64emu_t *emu, uintptr_t fnc); void iFpli(x64emu_t *emu, uintptr_t fnc); void iFpll(x64emu_t *emu, uintptr_t fnc); void iFplp(x64emu_t *emu, uintptr_t fnc); void iFpLi(x64emu_t *emu, uintptr_t fnc); void iFpLu(x64emu_t *emu, uintptr_t fnc); void iFpLL(x64emu_t *emu, uintptr_t fnc); void iFpLp(x64emu_t *emu, uintptr_t fnc); void iFppi(x64emu_t *emu, uintptr_t fnc); void iFppI(x64emu_t *emu, uintptr_t fnc); void iFppC(x64emu_t *emu, uintptr_t fnc); void iFppW(x64emu_t *emu, uintptr_t fnc); void iFppu(x64emu_t *emu, uintptr_t fnc); void iFppd(x64emu_t *emu, uintptr_t fnc); void iFppl(x64emu_t *emu, uintptr_t fnc); void iFppL(x64emu_t *emu, uintptr_t fnc); void iFppp(x64emu_t *emu, uintptr_t fnc); void iFpOu(x64emu_t *emu, uintptr_t fnc); void iFpOM(x64emu_t *emu, uintptr_t fnc); void iFSpL(x64emu_t *emu, uintptr_t fnc); void IFiIi(x64emu_t *emu, uintptr_t fnc); void IFpIi(x64emu_t *emu, uintptr_t fnc); void IFppi(x64emu_t *emu, uintptr_t fnc); void IFppI(x64emu_t *emu, uintptr_t fnc); void IFppu(x64emu_t *emu, uintptr_t fnc); void IFSIi(x64emu_t *emu, uintptr_t fnc); void uFEpW(x64emu_t *emu, uintptr_t fnc); void uFEpu(x64emu_t *emu, uintptr_t fnc); void uFEpU(x64emu_t *emu, uintptr_t fnc); void uFEpp(x64emu_t *emu, uintptr_t fnc); void uFipu(x64emu_t *emu, uintptr_t fnc); void uFuip(x64emu_t *emu, uintptr_t fnc); void uFuuu(x64emu_t *emu, uintptr_t fnc); void uFuup(x64emu_t *emu, uintptr_t fnc); void uFufp(x64emu_t *emu, uintptr_t fnc); void uFupu(x64emu_t *emu, uintptr_t fnc); void uFupp(x64emu_t *emu, uintptr_t fnc); void uFpii(x64emu_t *emu, uintptr_t fnc); void uFpip(x64emu_t *emu, uintptr_t fnc); void uFpCi(x64emu_t *emu, uintptr_t fnc); void uFpWi(x64emu_t *emu, uintptr_t fnc); void uFpWu(x64emu_t *emu, uintptr_t fnc); void uFpWf(x64emu_t *emu, uintptr_t fnc); void uFpWp(x64emu_t *emu, uintptr_t fnc); void uFpui(x64emu_t *emu, uintptr_t fnc); void uFpuC(x64emu_t *emu, uintptr_t fnc); void uFpuu(x64emu_t *emu, uintptr_t fnc); void uFpup(x64emu_t *emu, uintptr_t fnc); void uFpfu(x64emu_t *emu, uintptr_t fnc); void uFpLp(x64emu_t *emu, uintptr_t fnc); void uFppi(x64emu_t *emu, uintptr_t fnc); void uFppu(x64emu_t *emu, uintptr_t fnc); void uFppp(x64emu_t *emu, uintptr_t fnc); void UFUUU(x64emu_t *emu, uintptr_t fnc); void UFpiU(x64emu_t *emu, uintptr_t fnc); void UFppi(x64emu_t *emu, uintptr_t fnc); void UFppu(x64emu_t *emu, uintptr_t fnc); void fFull(x64emu_t *emu, uintptr_t fnc); void fFfff(x64emu_t *emu, uintptr_t fnc); void fFffp(x64emu_t *emu, uintptr_t fnc); void fFppi(x64emu_t *emu, uintptr_t fnc); void fFppL(x64emu_t *emu, uintptr_t fnc); void fFppp(x64emu_t *emu, uintptr_t fnc); void dFddd(x64emu_t *emu, uintptr_t fnc); void dFddp(x64emu_t *emu, uintptr_t fnc); void dFpdd(x64emu_t *emu, uintptr_t fnc); void dFppi(x64emu_t *emu, uintptr_t fnc); void dFppp(x64emu_t *emu, uintptr_t fnc); void DFppi(x64emu_t *emu, uintptr_t fnc); void DFppp(x64emu_t *emu, uintptr_t fnc); void lFili(x64emu_t *emu, uintptr_t fnc); void lFilL(x64emu_t *emu, uintptr_t fnc); void lFipi(x64emu_t *emu, uintptr_t fnc); void lFipL(x64emu_t *emu, uintptr_t fnc); void lFlll(x64emu_t *emu, uintptr_t fnc); void lFlpi(x64emu_t *emu, uintptr_t fnc); void lFpli(x64emu_t *emu, uintptr_t fnc); void lFpLu(x64emu_t *emu, uintptr_t fnc); void lFpLp(x64emu_t *emu, uintptr_t fnc); void lFppi(x64emu_t *emu, uintptr_t fnc); void lFppL(x64emu_t *emu, uintptr_t fnc); void lFppp(x64emu_t *emu, uintptr_t fnc); void lFSpl(x64emu_t *emu, uintptr_t fnc); void LFEpA(x64emu_t *emu, uintptr_t fnc); void LFipL(x64emu_t *emu, uintptr_t fnc); void LFLLl(x64emu_t *emu, uintptr_t fnc); void LFLpu(x64emu_t *emu, uintptr_t fnc); void LFLpL(x64emu_t *emu, uintptr_t fnc); void LFpii(x64emu_t *emu, uintptr_t fnc); void LFpip(x64emu_t *emu, uintptr_t fnc); void LFpLi(x64emu_t *emu, uintptr_t fnc); void LFpLp(x64emu_t *emu, uintptr_t fnc); void LFppi(x64emu_t *emu, uintptr_t fnc); void LFppL(x64emu_t *emu, uintptr_t fnc); void LFppp(x64emu_t *emu, uintptr_t fnc); void LFSpL(x64emu_t *emu, uintptr_t fnc); void pFEip(x64emu_t *emu, uintptr_t fnc); void pFEiV(x64emu_t *emu, uintptr_t fnc); void pFEup(x64emu_t *emu, uintptr_t fnc); void pFEpi(x64emu_t *emu, uintptr_t fnc); void pFEpu(x64emu_t *emu, uintptr_t fnc); void pFEpp(x64emu_t *emu, uintptr_t fnc); void pFEpV(x64emu_t *emu, uintptr_t fnc); void pFEpA(x64emu_t *emu, uintptr_t fnc); void pFiii(x64emu_t *emu, uintptr_t fnc); void pFiiu(x64emu_t *emu, uintptr_t fnc); void pFiip(x64emu_t *emu, uintptr_t fnc); void pFiIi(x64emu_t *emu, uintptr_t fnc); void pFiIp(x64emu_t *emu, uintptr_t fnc); void pFipi(x64emu_t *emu, uintptr_t fnc); void pFipL(x64emu_t *emu, uintptr_t fnc); void pFipp(x64emu_t *emu, uintptr_t fnc); void pFIpi(x64emu_t *emu, uintptr_t fnc); void pFCiW(x64emu_t *emu, uintptr_t fnc); void pFWWW(x64emu_t *emu, uintptr_t fnc); void pFuii(x64emu_t *emu, uintptr_t fnc); void pFuui(x64emu_t *emu, uintptr_t fnc); void pFuuu(x64emu_t *emu, uintptr_t fnc); void pFupi(x64emu_t *emu, uintptr_t fnc); void pFupL(x64emu_t *emu, uintptr_t fnc); void pFUpi(x64emu_t *emu, uintptr_t fnc); void pFdip(x64emu_t *emu, uintptr_t fnc); void pFdUU(x64emu_t *emu, uintptr_t fnc); void pFddd(x64emu_t *emu, uintptr_t fnc); void pFDip(x64emu_t *emu, uintptr_t fnc); void pFLup(x64emu_t *emu, uintptr_t fnc); void pFpii(x64emu_t *emu, uintptr_t fnc); void pFpiu(x64emu_t *emu, uintptr_t fnc); void pFpid(x64emu_t *emu, uintptr_t fnc); void pFpil(x64emu_t *emu, uintptr_t fnc); void pFpiL(x64emu_t *emu, uintptr_t fnc); void pFpip(x64emu_t *emu, uintptr_t fnc); void pFpCC(x64emu_t *emu, uintptr_t fnc); void pFpCu(x64emu_t *emu, uintptr_t fnc); void pFpWW(x64emu_t *emu, uintptr_t fnc); void pFpui(x64emu_t *emu, uintptr_t fnc); void pFpuu(x64emu_t *emu, uintptr_t fnc); void pFpuL(x64emu_t *emu, uintptr_t fnc); void pFpup(x64emu_t *emu, uintptr_t fnc); void pFpUi(x64emu_t *emu, uintptr_t fnc); void pFpUp(x64emu_t *emu, uintptr_t fnc); void pFpdu(x64emu_t *emu, uintptr_t fnc); void pFplC(x64emu_t *emu, uintptr_t fnc); void pFplu(x64emu_t *emu, uintptr_t fnc); void pFpll(x64emu_t *emu, uintptr_t fnc); void pFplp(x64emu_t *emu, uintptr_t fnc); void pFpLu(x64emu_t *emu, uintptr_t fnc); void pFpLL(x64emu_t *emu, uintptr_t fnc); void pFpLp(x64emu_t *emu, uintptr_t fnc); void pFppi(x64emu_t *emu, uintptr_t fnc); void pFppI(x64emu_t *emu, uintptr_t fnc); void pFppC(x64emu_t *emu, uintptr_t fnc); void pFppu(x64emu_t *emu, uintptr_t fnc); void pFppU(x64emu_t *emu, uintptr_t fnc); void pFppf(x64emu_t *emu, uintptr_t fnc); void pFppl(x64emu_t *emu, uintptr_t fnc); void pFppL(x64emu_t *emu, uintptr_t fnc); void pFppp(x64emu_t *emu, uintptr_t fnc); void pFpOM(x64emu_t *emu, uintptr_t fnc); void pFSpl(x64emu_t *emu, uintptr_t fnc); void vFEiip(x64emu_t *emu, uintptr_t fnc); void vFEipp(x64emu_t *emu, uintptr_t fnc); void vFEipV(x64emu_t *emu, uintptr_t fnc); void vFEipA(x64emu_t *emu, uintptr_t fnc); void vFELLp(x64emu_t *emu, uintptr_t fnc); void vFEpii(x64emu_t *emu, uintptr_t fnc); void vFEpip(x64emu_t *emu, uintptr_t fnc); void vFEpup(x64emu_t *emu, uintptr_t fnc); void vFEpUp(x64emu_t *emu, uintptr_t fnc); void vFEppp(x64emu_t *emu, uintptr_t fnc); void vFEppV(x64emu_t *emu, uintptr_t fnc); void vFEppA(x64emu_t *emu, uintptr_t fnc); void vFiiii(x64emu_t *emu, uintptr_t fnc); void vFiiip(x64emu_t *emu, uintptr_t fnc); void vFiIII(x64emu_t *emu, uintptr_t fnc); void vFiuiu(x64emu_t *emu, uintptr_t fnc); void vFiuip(x64emu_t *emu, uintptr_t fnc); void vFiuuu(x64emu_t *emu, uintptr_t fnc); void vFiulp(x64emu_t *emu, uintptr_t fnc); void vFiupu(x64emu_t *emu, uintptr_t fnc); void vFiupV(x64emu_t *emu, uintptr_t fnc); void vFiUUU(x64emu_t *emu, uintptr_t fnc); void vFifff(x64emu_t *emu, uintptr_t fnc); void vFiddd(x64emu_t *emu, uintptr_t fnc); void vFilpp(x64emu_t *emu, uintptr_t fnc); void vFipii(x64emu_t *emu, uintptr_t fnc); void vFipup(x64emu_t *emu, uintptr_t fnc); void vFippi(x64emu_t *emu, uintptr_t fnc); void vFippu(x64emu_t *emu, uintptr_t fnc); void vFippp(x64emu_t *emu, uintptr_t fnc); void vFuiii(x64emu_t *emu, uintptr_t fnc); void vFuiiu(x64emu_t *emu, uintptr_t fnc); void vFuiip(x64emu_t *emu, uintptr_t fnc); void vFuiII(x64emu_t *emu, uintptr_t fnc); void vFuiui(x64emu_t *emu, uintptr_t fnc); void vFuiuu(x64emu_t *emu, uintptr_t fnc); void vFuiup(x64emu_t *emu, uintptr_t fnc); void vFuiUU(x64emu_t *emu, uintptr_t fnc); void vFuifi(x64emu_t *emu, uintptr_t fnc); void vFuiff(x64emu_t *emu, uintptr_t fnc); void vFuidd(x64emu_t *emu, uintptr_t fnc); void vFuill(x64emu_t *emu, uintptr_t fnc); void vFuilp(x64emu_t *emu, uintptr_t fnc); void vFuipi(x64emu_t *emu, uintptr_t fnc); void vFuipu(x64emu_t *emu, uintptr_t fnc); void vFuipp(x64emu_t *emu, uintptr_t fnc); void vFuuii(x64emu_t *emu, uintptr_t fnc); void vFuuiu(x64emu_t *emu, uintptr_t fnc); void vFuuil(x64emu_t *emu, uintptr_t fnc); void vFuuip(x64emu_t *emu, uintptr_t fnc); void vFuuui(x64emu_t *emu, uintptr_t fnc); void vFuuuu(x64emu_t *emu, uintptr_t fnc); void vFuuuf(x64emu_t *emu, uintptr_t fnc); void vFuuud(x64emu_t *emu, uintptr_t fnc); void vFuuup(x64emu_t *emu, uintptr_t fnc); void vFuulp(x64emu_t *emu, uintptr_t fnc); void vFuupi(x64emu_t *emu, uintptr_t fnc); void vFuupp(x64emu_t *emu, uintptr_t fnc); void vFufff(x64emu_t *emu, uintptr_t fnc); void vFuddd(x64emu_t *emu, uintptr_t fnc); void vFulil(x64emu_t *emu, uintptr_t fnc); void vFulip(x64emu_t *emu, uintptr_t fnc); void vFullp(x64emu_t *emu, uintptr_t fnc); void vFulpi(x64emu_t *emu, uintptr_t fnc); void vFulpu(x64emu_t *emu, uintptr_t fnc); void vFulpp(x64emu_t *emu, uintptr_t fnc); void vFupii(x64emu_t *emu, uintptr_t fnc); void vFuppi(x64emu_t *emu, uintptr_t fnc); void vFUUpi(x64emu_t *emu, uintptr_t fnc); void vFffff(x64emu_t *emu, uintptr_t fnc); void vFdddd(x64emu_t *emu, uintptr_t fnc); void vFpiii(x64emu_t *emu, uintptr_t fnc); void vFpiiu(x64emu_t *emu, uintptr_t fnc); void vFpiip(x64emu_t *emu, uintptr_t fnc); void vFpiuu(x64emu_t *emu, uintptr_t fnc); void vFpiuL(x64emu_t *emu, uintptr_t fnc); void vFpiup(x64emu_t *emu, uintptr_t fnc); void vFpiUu(x64emu_t *emu, uintptr_t fnc); void vFpiUU(x64emu_t *emu, uintptr_t fnc); void vFpifi(x64emu_t *emu, uintptr_t fnc); void vFpipi(x64emu_t *emu, uintptr_t fnc); void vFpipp(x64emu_t *emu, uintptr_t fnc); void vFpIdi(x64emu_t *emu, uintptr_t fnc); void vFpCiW(x64emu_t *emu, uintptr_t fnc); void vFpuip(x64emu_t *emu, uintptr_t fnc); void vFpuui(x64emu_t *emu, uintptr_t fnc); void vFpuuu(x64emu_t *emu, uintptr_t fnc); void vFpuup(x64emu_t *emu, uintptr_t fnc); void vFpudd(x64emu_t *emu, uintptr_t fnc); void vFpupp(x64emu_t *emu, uintptr_t fnc); void vFpUui(x64emu_t *emu, uintptr_t fnc); void vFpUuu(x64emu_t *emu, uintptr_t fnc); void vFpUup(x64emu_t *emu, uintptr_t fnc); void vFpUUi(x64emu_t *emu, uintptr_t fnc); void vFpUUp(x64emu_t *emu, uintptr_t fnc); void vFpUpp(x64emu_t *emu, uintptr_t fnc); void vFpfff(x64emu_t *emu, uintptr_t fnc); void vFpdii(x64emu_t *emu, uintptr_t fnc); void vFpdip(x64emu_t *emu, uintptr_t fnc); void vFpddi(x64emu_t *emu, uintptr_t fnc); void vFpddd(x64emu_t *emu, uintptr_t fnc); void vFpLLL(x64emu_t *emu, uintptr_t fnc); void vFppii(x64emu_t *emu, uintptr_t fnc); void vFppiu(x64emu_t *emu, uintptr_t fnc); void vFppid(x64emu_t *emu, uintptr_t fnc); void vFppiL(x64emu_t *emu, uintptr_t fnc); void vFppip(x64emu_t *emu, uintptr_t fnc); void vFppui(x64emu_t *emu, uintptr_t fnc); void vFppuu(x64emu_t *emu, uintptr_t fnc); void vFppup(x64emu_t *emu, uintptr_t fnc); void vFppfi(x64emu_t *emu, uintptr_t fnc); void vFppdu(x64emu_t *emu, uintptr_t fnc); void vFppdd(x64emu_t *emu, uintptr_t fnc); void vFppdp(x64emu_t *emu, uintptr_t fnc); void vFpplp(x64emu_t *emu, uintptr_t fnc); void vFppLp(x64emu_t *emu, uintptr_t fnc); void vFpppi(x64emu_t *emu, uintptr_t fnc); void vFpppI(x64emu_t *emu, uintptr_t fnc); void vFpppu(x64emu_t *emu, uintptr_t fnc); void vFpppU(x64emu_t *emu, uintptr_t fnc); void vFpppd(x64emu_t *emu, uintptr_t fnc); void vFpppL(x64emu_t *emu, uintptr_t fnc); void vFpppp(x64emu_t *emu, uintptr_t fnc); void cFpiii(x64emu_t *emu, uintptr_t fnc); void iFEiip(x64emu_t *emu, uintptr_t fnc); void iFEiiN(x64emu_t *emu, uintptr_t fnc); void iFEipp(x64emu_t *emu, uintptr_t fnc); void iFEipV(x64emu_t *emu, uintptr_t fnc); void iFEupp(x64emu_t *emu, uintptr_t fnc); void iFEpii(x64emu_t *emu, uintptr_t fnc); void iFEpip(x64emu_t *emu, uintptr_t fnc); void iFEpiV(x64emu_t *emu, uintptr_t fnc); void iFEpiA(x64emu_t *emu, uintptr_t fnc); void iFEpUp(x64emu_t *emu, uintptr_t fnc); void iFEpLi(x64emu_t *emu, uintptr_t fnc); void iFEpLp(x64emu_t *emu, uintptr_t fnc); void iFEppi(x64emu_t *emu, uintptr_t fnc); void iFEppd(x64emu_t *emu, uintptr_t fnc); void iFEppL(x64emu_t *emu, uintptr_t fnc); void iFEppp(x64emu_t *emu, uintptr_t fnc); void iFEppV(x64emu_t *emu, uintptr_t fnc); void iFEppA(x64emu_t *emu, uintptr_t fnc); void iFEpOu(x64emu_t *emu, uintptr_t fnc); void iFwwww(x64emu_t *emu, uintptr_t fnc); void iFwppp(x64emu_t *emu, uintptr_t fnc); void iFiiii(x64emu_t *emu, uintptr_t fnc); void iFiiiu(x64emu_t *emu, uintptr_t fnc); void iFiiip(x64emu_t *emu, uintptr_t fnc); void iFiiiN(x64emu_t *emu, uintptr_t fnc); void iFiiui(x64emu_t *emu, uintptr_t fnc); void iFiill(x64emu_t *emu, uintptr_t fnc); void iFiipi(x64emu_t *emu, uintptr_t fnc); void iFiipp(x64emu_t *emu, uintptr_t fnc); void iFiuwp(x64emu_t *emu, uintptr_t fnc); void iFiuii(x64emu_t *emu, uintptr_t fnc); void iFiupp(x64emu_t *emu, uintptr_t fnc); void iFilli(x64emu_t *emu, uintptr_t fnc); void iFillu(x64emu_t *emu, uintptr_t fnc); void iFipii(x64emu_t *emu, uintptr_t fnc); void iFipip(x64emu_t *emu, uintptr_t fnc); void iFipui(x64emu_t *emu, uintptr_t fnc); void iFipup(x64emu_t *emu, uintptr_t fnc); void iFipLi(x64emu_t *emu, uintptr_t fnc); void iFipLu(x64emu_t *emu, uintptr_t fnc); void iFipLp(x64emu_t *emu, uintptr_t fnc); void iFippi(x64emu_t *emu, uintptr_t fnc); void iFippL(x64emu_t *emu, uintptr_t fnc); void iFippp(x64emu_t *emu, uintptr_t fnc); void iFipON(x64emu_t *emu, uintptr_t fnc); void iFuipu(x64emu_t *emu, uintptr_t fnc); void iFuipp(x64emu_t *emu, uintptr_t fnc); void iFuuff(x64emu_t *emu, uintptr_t fnc); void iFuupi(x64emu_t *emu, uintptr_t fnc); void iFupLp(x64emu_t *emu, uintptr_t fnc); void iFuppi(x64emu_t *emu, uintptr_t fnc); void iFuppp(x64emu_t *emu, uintptr_t fnc); void iFLLiW(x64emu_t *emu, uintptr_t fnc); void iFpwww(x64emu_t *emu, uintptr_t fnc); void iFpwpp(x64emu_t *emu, uintptr_t fnc); void iFpiii(x64emu_t *emu, uintptr_t fnc); void iFpiiI(x64emu_t *emu, uintptr_t fnc); void iFpiiu(x64emu_t *emu, uintptr_t fnc); void iFpiid(x64emu_t *emu, uintptr_t fnc); void iFpiiL(x64emu_t *emu, uintptr_t fnc); void iFpiip(x64emu_t *emu, uintptr_t fnc); void iFpiuu(x64emu_t *emu, uintptr_t fnc); void iFpiuL(x64emu_t *emu, uintptr_t fnc); void iFpiup(x64emu_t *emu, uintptr_t fnc); void iFpiUp(x64emu_t *emu, uintptr_t fnc); void iFpild(x64emu_t *emu, uintptr_t fnc); void iFpipi(x64emu_t *emu, uintptr_t fnc); void iFpipC(x64emu_t *emu, uintptr_t fnc); void iFpipu(x64emu_t *emu, uintptr_t fnc); void iFpipL(x64emu_t *emu, uintptr_t fnc); void iFpipp(x64emu_t *emu, uintptr_t fnc); void iFpipV(x64emu_t *emu, uintptr_t fnc); void iFpIip(x64emu_t *emu, uintptr_t fnc); void iFpCCC(x64emu_t *emu, uintptr_t fnc); void iFpCpi(x64emu_t *emu, uintptr_t fnc); void iFpWWu(x64emu_t *emu, uintptr_t fnc); void iFpuwp(x64emu_t *emu, uintptr_t fnc); void iFpuiL(x64emu_t *emu, uintptr_t fnc); void iFpuip(x64emu_t *emu, uintptr_t fnc); void iFpuui(x64emu_t *emu, uintptr_t fnc); void iFpuuu(x64emu_t *emu, uintptr_t fnc); void iFpuup(x64emu_t *emu, uintptr_t fnc); void iFpuUp(x64emu_t *emu, uintptr_t fnc); void iFpuLL(x64emu_t *emu, uintptr_t fnc); void iFpuLp(x64emu_t *emu, uintptr_t fnc); void iFpupi(x64emu_t *emu, uintptr_t fnc); void iFpupu(x64emu_t *emu, uintptr_t fnc); void iFpupU(x64emu_t *emu, uintptr_t fnc); void iFpupL(x64emu_t *emu, uintptr_t fnc); void iFpupp(x64emu_t *emu, uintptr_t fnc); void iFpupV(x64emu_t *emu, uintptr_t fnc); void iFpUup(x64emu_t *emu, uintptr_t fnc); void iFpUUU(x64emu_t *emu, uintptr_t fnc); void iFpUpp(x64emu_t *emu, uintptr_t fnc); void iFplii(x64emu_t *emu, uintptr_t fnc); void iFplip(x64emu_t *emu, uintptr_t fnc); void iFpLii(x64emu_t *emu, uintptr_t fnc); void iFpLip(x64emu_t *emu, uintptr_t fnc); void iFpLLu(x64emu_t *emu, uintptr_t fnc); void iFpLpi(x64emu_t *emu, uintptr_t fnc); void iFpLpf(x64emu_t *emu, uintptr_t fnc); void iFpLpd(x64emu_t *emu, uintptr_t fnc); void iFpLpD(x64emu_t *emu, uintptr_t fnc); void iFpLpL(x64emu_t *emu, uintptr_t fnc); void iFpLpp(x64emu_t *emu, uintptr_t fnc); void iFppii(x64emu_t *emu, uintptr_t fnc); void iFppiu(x64emu_t *emu, uintptr_t fnc); void iFppiL(x64emu_t *emu, uintptr_t fnc); void iFppip(x64emu_t *emu, uintptr_t fnc); void iFppIL(x64emu_t *emu, uintptr_t fnc); void iFppCC(x64emu_t *emu, uintptr_t fnc); void iFppuw(x64emu_t *emu, uintptr_t fnc); void iFppui(x64emu_t *emu, uintptr_t fnc); void iFppuu(x64emu_t *emu, uintptr_t fnc); void iFppup(x64emu_t *emu, uintptr_t fnc); void iFppdp(x64emu_t *emu, uintptr_t fnc); void iFppll(x64emu_t *emu, uintptr_t fnc); void iFpplp(x64emu_t *emu, uintptr_t fnc); void iFppLi(x64emu_t *emu, uintptr_t fnc); void iFppLL(x64emu_t *emu, uintptr_t fnc); void iFppLp(x64emu_t *emu, uintptr_t fnc); void iFpppi(x64emu_t *emu, uintptr_t fnc); void iFpppC(x64emu_t *emu, uintptr_t fnc); void iFpppu(x64emu_t *emu, uintptr_t fnc); void iFpppU(x64emu_t *emu, uintptr_t fnc); void iFpppL(x64emu_t *emu, uintptr_t fnc); void iFpppp(x64emu_t *emu, uintptr_t fnc); void IFEpIi(x64emu_t *emu, uintptr_t fnc); void IFpIip(x64emu_t *emu, uintptr_t fnc); void IFppii(x64emu_t *emu, uintptr_t fnc); void IFppip(x64emu_t *emu, uintptr_t fnc); void IFpppp(x64emu_t *emu, uintptr_t fnc); void IFSIii(x64emu_t *emu, uintptr_t fnc); void uFEipp(x64emu_t *emu, uintptr_t fnc); void uFEupp(x64emu_t *emu, uintptr_t fnc); void uFEpup(x64emu_t *emu, uintptr_t fnc); void uFEppp(x64emu_t *emu, uintptr_t fnc); void uFifff(x64emu_t *emu, uintptr_t fnc); void uFuuuu(x64emu_t *emu, uintptr_t fnc); void uFpipu(x64emu_t *emu, uintptr_t fnc); void uFpipp(x64emu_t *emu, uintptr_t fnc); void uFpCCC(x64emu_t *emu, uintptr_t fnc); void uFpuip(x64emu_t *emu, uintptr_t fnc); void uFpuuu(x64emu_t *emu, uintptr_t fnc); void uFpuup(x64emu_t *emu, uintptr_t fnc); void uFpupu(x64emu_t *emu, uintptr_t fnc); void uFppiu(x64emu_t *emu, uintptr_t fnc); void uFppLp(x64emu_t *emu, uintptr_t fnc); void uFpppi(x64emu_t *emu, uintptr_t fnc); void uFpppu(x64emu_t *emu, uintptr_t fnc); void uFpppp(x64emu_t *emu, uintptr_t fnc); void UFpipp(x64emu_t *emu, uintptr_t fnc); void UFppii(x64emu_t *emu, uintptr_t fnc); void UFppip(x64emu_t *emu, uintptr_t fnc); void UFpppp(x64emu_t *emu, uintptr_t fnc); void dFpppp(x64emu_t *emu, uintptr_t fnc); void lFEipV(x64emu_t *emu, uintptr_t fnc); void lFEpip(x64emu_t *emu, uintptr_t fnc); void lFEppL(x64emu_t *emu, uintptr_t fnc); void lFEppp(x64emu_t *emu, uintptr_t fnc); void lFiiLu(x64emu_t *emu, uintptr_t fnc); void lFiipL(x64emu_t *emu, uintptr_t fnc); void lFipil(x64emu_t *emu, uintptr_t fnc); void lFipLi(x64emu_t *emu, uintptr_t fnc); void lFipLI(x64emu_t *emu, uintptr_t fnc); void lFipLu(x64emu_t *emu, uintptr_t fnc); void lFipLl(x64emu_t *emu, uintptr_t fnc); void lFipLL(x64emu_t *emu, uintptr_t fnc); void lFipLp(x64emu_t *emu, uintptr_t fnc); void lFippL(x64emu_t *emu, uintptr_t fnc); void lFuipp(x64emu_t *emu, uintptr_t fnc); void lFpili(x64emu_t *emu, uintptr_t fnc); void lFpilp(x64emu_t *emu, uintptr_t fnc); void lFppii(x64emu_t *emu, uintptr_t fnc); void lFppip(x64emu_t *emu, uintptr_t fnc); void lFpppL(x64emu_t *emu, uintptr_t fnc); void LFEppp(x64emu_t *emu, uintptr_t fnc); void LFippL(x64emu_t *emu, uintptr_t fnc); void LFippp(x64emu_t *emu, uintptr_t fnc); void LFpuuu(x64emu_t *emu, uintptr_t fnc); void LFpLCL(x64emu_t *emu, uintptr_t fnc); void LFpLLp(x64emu_t *emu, uintptr_t fnc); void LFpLpL(x64emu_t *emu, uintptr_t fnc); void LFpLpp(x64emu_t *emu, uintptr_t fnc); void LFppii(x64emu_t *emu, uintptr_t fnc); void LFppip(x64emu_t *emu, uintptr_t fnc); void LFppLL(x64emu_t *emu, uintptr_t fnc); void LFppLp(x64emu_t *emu, uintptr_t fnc); void LFpppi(x64emu_t *emu, uintptr_t fnc); void LFpppp(x64emu_t *emu, uintptr_t fnc); void pFEipp(x64emu_t *emu, uintptr_t fnc); void pFEupp(x64emu_t *emu, uintptr_t fnc); void pFELpV(x64emu_t *emu, uintptr_t fnc); void pFELpA(x64emu_t *emu, uintptr_t fnc); void pFEpii(x64emu_t *emu, uintptr_t fnc); void pFEpip(x64emu_t *emu, uintptr_t fnc); void pFEppi(x64emu_t *emu, uintptr_t fnc); void pFEppp(x64emu_t *emu, uintptr_t fnc); void pFEppV(x64emu_t *emu, uintptr_t fnc); void pFiiii(x64emu_t *emu, uintptr_t fnc); void pFiiiu(x64emu_t *emu, uintptr_t fnc); void pFiiuu(x64emu_t *emu, uintptr_t fnc); void pFiiup(x64emu_t *emu, uintptr_t fnc); void pFiipi(x64emu_t *emu, uintptr_t fnc); void pFiipp(x64emu_t *emu, uintptr_t fnc); void pFiIIi(x64emu_t *emu, uintptr_t fnc); void pFipii(x64emu_t *emu, uintptr_t fnc); void pFipip(x64emu_t *emu, uintptr_t fnc); void pFippi(x64emu_t *emu, uintptr_t fnc); void pFippu(x64emu_t *emu, uintptr_t fnc); void pFuiii(x64emu_t *emu, uintptr_t fnc); void pFulli(x64emu_t *emu, uintptr_t fnc); void pFullu(x64emu_t *emu, uintptr_t fnc); void pFffff(x64emu_t *emu, uintptr_t fnc); void pFdipp(x64emu_t *emu, uintptr_t fnc); void pFdddd(x64emu_t *emu, uintptr_t fnc); void pFDipp(x64emu_t *emu, uintptr_t fnc); void pFlfff(x64emu_t *emu, uintptr_t fnc); void pFLiip(x64emu_t *emu, uintptr_t fnc); void pFpiii(x64emu_t *emu, uintptr_t fnc); void pFpiip(x64emu_t *emu, uintptr_t fnc); void pFpiuu(x64emu_t *emu, uintptr_t fnc); void pFpiLL(x64emu_t *emu, uintptr_t fnc); void pFpipi(x64emu_t *emu, uintptr_t fnc); void pFpipd(x64emu_t *emu, uintptr_t fnc); void pFpipp(x64emu_t *emu, uintptr_t fnc); void pFpCWp(x64emu_t *emu, uintptr_t fnc); void pFpCuW(x64emu_t *emu, uintptr_t fnc); void pFpCuu(x64emu_t *emu, uintptr_t fnc); void pFpuii(x64emu_t *emu, uintptr_t fnc); void pFpuip(x64emu_t *emu, uintptr_t fnc); void pFpuWp(x64emu_t *emu, uintptr_t fnc); void pFpuuC(x64emu_t *emu, uintptr_t fnc); void pFpuuu(x64emu_t *emu, uintptr_t fnc); void pFpuup(x64emu_t *emu, uintptr_t fnc); void pFpupi(x64emu_t *emu, uintptr_t fnc); void pFpupu(x64emu_t *emu, uintptr_t fnc); void pFpdIU(x64emu_t *emu, uintptr_t fnc); void pFplpl(x64emu_t *emu, uintptr_t fnc); void pFplpp(x64emu_t *emu, uintptr_t fnc); void pFpLip(x64emu_t *emu, uintptr_t fnc); void pFpLpL(x64emu_t *emu, uintptr_t fnc); void pFppii(x64emu_t *emu, uintptr_t fnc); void pFppiu(x64emu_t *emu, uintptr_t fnc); void pFppiL(x64emu_t *emu, uintptr_t fnc); void pFppip(x64emu_t *emu, uintptr_t fnc); void pFppuW(x64emu_t *emu, uintptr_t fnc); void pFppuu(x64emu_t *emu, uintptr_t fnc); void pFppuL(x64emu_t *emu, uintptr_t fnc); void pFppup(x64emu_t *emu, uintptr_t fnc); void pFppUU(x64emu_t *emu, uintptr_t fnc); void pFppdd(x64emu_t *emu, uintptr_t fnc); void pFppll(x64emu_t *emu, uintptr_t fnc); void pFppLL(x64emu_t *emu, uintptr_t fnc); void pFppLp(x64emu_t *emu, uintptr_t fnc); void pFpppi(x64emu_t *emu, uintptr_t fnc); void pFpppu(x64emu_t *emu, uintptr_t fnc); void pFpppL(x64emu_t *emu, uintptr_t fnc); void pFpppp(x64emu_t *emu, uintptr_t fnc); void pFSppi(x64emu_t *emu, uintptr_t fnc); void vFEiipV(x64emu_t *emu, uintptr_t fnc); void vFEiipA(x64emu_t *emu, uintptr_t fnc); void vFEippp(x64emu_t *emu, uintptr_t fnc); void vFEpipV(x64emu_t *emu, uintptr_t fnc); void vFEpipA(x64emu_t *emu, uintptr_t fnc); void vFEpuup(x64emu_t *emu, uintptr_t fnc); void vFEpuuV(x64emu_t *emu, uintptr_t fnc); void vFEpupp(x64emu_t *emu, uintptr_t fnc); void vFEpupA(x64emu_t *emu, uintptr_t fnc); void vFEpLLp(x64emu_t *emu, uintptr_t fnc); void vFEppip(x64emu_t *emu, uintptr_t fnc); void vFEppiV(x64emu_t *emu, uintptr_t fnc); void vFEppup(x64emu_t *emu, uintptr_t fnc); void vFEpppp(x64emu_t *emu, uintptr_t fnc); void vFiiiii(x64emu_t *emu, uintptr_t fnc); void vFiiiiu(x64emu_t *emu, uintptr_t fnc); void vFiiuup(x64emu_t *emu, uintptr_t fnc); void vFiipii(x64emu_t *emu, uintptr_t fnc); void vFiIIII(x64emu_t *emu, uintptr_t fnc); void vFiuiip(x64emu_t *emu, uintptr_t fnc); void vFiuipi(x64emu_t *emu, uintptr_t fnc); void vFiuuuu(x64emu_t *emu, uintptr_t fnc); void vFiulpp(x64emu_t *emu, uintptr_t fnc); void vFiuppu(x64emu_t *emu, uintptr_t fnc); void vFiUUUU(x64emu_t *emu, uintptr_t fnc); void vFiffff(x64emu_t *emu, uintptr_t fnc); void vFidddd(x64emu_t *emu, uintptr_t fnc); void vFilill(x64emu_t *emu, uintptr_t fnc); void vFipipu(x64emu_t *emu, uintptr_t fnc); void vFipipp(x64emu_t *emu, uintptr_t fnc); void vFipupi(x64emu_t *emu, uintptr_t fnc); void vFiplli(x64emu_t *emu, uintptr_t fnc); void vFiplll(x64emu_t *emu, uintptr_t fnc); void vFuiiii(x64emu_t *emu, uintptr_t fnc); void vFuiiiu(x64emu_t *emu, uintptr_t fnc); void vFuiiip(x64emu_t *emu, uintptr_t fnc); void vFuiifi(x64emu_t *emu, uintptr_t fnc); void vFuiIII(x64emu_t *emu, uintptr_t fnc); void vFuiuii(x64emu_t *emu, uintptr_t fnc); void vFuiuiu(x64emu_t *emu, uintptr_t fnc); void vFuiuip(x64emu_t *emu, uintptr_t fnc); void vFuiuuu(x64emu_t *emu, uintptr_t fnc); void vFuiuup(x64emu_t *emu, uintptr_t fnc); void vFuiull(x64emu_t *emu, uintptr_t fnc); void vFuiupi(x64emu_t *emu, uintptr_t fnc); void vFuiUUU(x64emu_t *emu, uintptr_t fnc); void vFuifff(x64emu_t *emu, uintptr_t fnc); void vFuiddd(x64emu_t *emu, uintptr_t fnc); void vFuipii(x64emu_t *emu, uintptr_t fnc); void vFuipip(x64emu_t *emu, uintptr_t fnc); void vFuipup(x64emu_t *emu, uintptr_t fnc); void vFuippp(x64emu_t *emu, uintptr_t fnc); void vFuuiii(x64emu_t *emu, uintptr_t fnc); void vFuuiiu(x64emu_t *emu, uintptr_t fnc); void vFuuiui(x64emu_t *emu, uintptr_t fnc); void vFuuiuu(x64emu_t *emu, uintptr_t fnc); void vFuuiup(x64emu_t *emu, uintptr_t fnc); void vFuuipi(x64emu_t *emu, uintptr_t fnc); void vFuuipu(x64emu_t *emu, uintptr_t fnc); void vFuuipp(x64emu_t *emu, uintptr_t fnc); void vFuuuii(x64emu_t *emu, uintptr_t fnc); void vFuuuiu(x64emu_t *emu, uintptr_t fnc); void vFuuuip(x64emu_t *emu, uintptr_t fnc); void vFuuuui(x64emu_t *emu, uintptr_t fnc); void vFuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuuuup(x64emu_t *emu, uintptr_t fnc); void vFuuull(x64emu_t *emu, uintptr_t fnc); void vFuulll(x64emu_t *emu, uintptr_t fnc); void vFuullp(x64emu_t *emu, uintptr_t fnc); void vFuulpp(x64emu_t *emu, uintptr_t fnc); void vFuupii(x64emu_t *emu, uintptr_t fnc); void vFuffff(x64emu_t *emu, uintptr_t fnc); void vFudddd(x64emu_t *emu, uintptr_t fnc); void vFulill(x64emu_t *emu, uintptr_t fnc); void vFullip(x64emu_t *emu, uintptr_t fnc); void vFupupi(x64emu_t *emu, uintptr_t fnc); void vFuppip(x64emu_t *emu, uintptr_t fnc); void vFupppp(x64emu_t *emu, uintptr_t fnc); void vFUUppp(x64emu_t *emu, uintptr_t fnc); void vFfffff(x64emu_t *emu, uintptr_t fnc); void vFddddp(x64emu_t *emu, uintptr_t fnc); void vFpiiii(x64emu_t *emu, uintptr_t fnc); void vFpiiiI(x64emu_t *emu, uintptr_t fnc); void vFpiiiu(x64emu_t *emu, uintptr_t fnc); void vFpiiip(x64emu_t *emu, uintptr_t fnc); void vFpiiII(x64emu_t *emu, uintptr_t fnc); void vFpiiff(x64emu_t *emu, uintptr_t fnc); void vFpiipp(x64emu_t *emu, uintptr_t fnc); void vFpiIiI(x64emu_t *emu, uintptr_t fnc); void vFpiIII(x64emu_t *emu, uintptr_t fnc); void vFpipii(x64emu_t *emu, uintptr_t fnc); void vFpipiu(x64emu_t *emu, uintptr_t fnc); void vFpuiip(x64emu_t *emu, uintptr_t fnc); void vFpuipp(x64emu_t *emu, uintptr_t fnc); void vFpuuuu(x64emu_t *emu, uintptr_t fnc); void vFpuuup(x64emu_t *emu, uintptr_t fnc); void vFpuupp(x64emu_t *emu, uintptr_t fnc); void vFpuUUu(x64emu_t *emu, uintptr_t fnc); void vFpuddd(x64emu_t *emu, uintptr_t fnc); void vFpupup(x64emu_t *emu, uintptr_t fnc); void vFpUuiu(x64emu_t *emu, uintptr_t fnc); void vFpUUuu(x64emu_t *emu, uintptr_t fnc); void vFpUUup(x64emu_t *emu, uintptr_t fnc); void vFpUUUu(x64emu_t *emu, uintptr_t fnc); void vFpUUUp(x64emu_t *emu, uintptr_t fnc); void vFpffff(x64emu_t *emu, uintptr_t fnc); void vFpdiII(x64emu_t *emu, uintptr_t fnc); void vFpddii(x64emu_t *emu, uintptr_t fnc); void vFpdddd(x64emu_t *emu, uintptr_t fnc); void vFpddpp(x64emu_t *emu, uintptr_t fnc); void vFpliil(x64emu_t *emu, uintptr_t fnc); void vFplppp(x64emu_t *emu, uintptr_t fnc); void vFpLLpp(x64emu_t *emu, uintptr_t fnc); void vFppiii(x64emu_t *emu, uintptr_t fnc); void vFppiiu(x64emu_t *emu, uintptr_t fnc); void vFppiip(x64emu_t *emu, uintptr_t fnc); void vFppiup(x64emu_t *emu, uintptr_t fnc); void vFppiff(x64emu_t *emu, uintptr_t fnc); void vFppipi(x64emu_t *emu, uintptr_t fnc); void vFppipp(x64emu_t *emu, uintptr_t fnc); void vFppWui(x64emu_t *emu, uintptr_t fnc); void vFppuui(x64emu_t *emu, uintptr_t fnc); void vFppuuu(x64emu_t *emu, uintptr_t fnc); void vFppuup(x64emu_t *emu, uintptr_t fnc); void vFppupi(x64emu_t *emu, uintptr_t fnc); void vFppupp(x64emu_t *emu, uintptr_t fnc); void vFpppii(x64emu_t *emu, uintptr_t fnc); void vFpppip(x64emu_t *emu, uintptr_t fnc); void vFpppuu(x64emu_t *emu, uintptr_t fnc); void vFpppup(x64emu_t *emu, uintptr_t fnc); void vFppppi(x64emu_t *emu, uintptr_t fnc); void vFppppu(x64emu_t *emu, uintptr_t fnc); void vFppppL(x64emu_t *emu, uintptr_t fnc); void vFppppp(x64emu_t *emu, uintptr_t fnc); void iFEiipp(x64emu_t *emu, uintptr_t fnc); void iFEiipV(x64emu_t *emu, uintptr_t fnc); void iFEippi(x64emu_t *emu, uintptr_t fnc); void iFEippL(x64emu_t *emu, uintptr_t fnc); void iFEippp(x64emu_t *emu, uintptr_t fnc); void iFEpiii(x64emu_t *emu, uintptr_t fnc); void iFEpipi(x64emu_t *emu, uintptr_t fnc); void iFEpipp(x64emu_t *emu, uintptr_t fnc); void iFEpipV(x64emu_t *emu, uintptr_t fnc); void iFEpUup(x64emu_t *emu, uintptr_t fnc); void iFEpLpp(x64emu_t *emu, uintptr_t fnc); void iFEpLpV(x64emu_t *emu, uintptr_t fnc); void iFEpLpA(x64emu_t *emu, uintptr_t fnc); void iFEppii(x64emu_t *emu, uintptr_t fnc); void iFEppip(x64emu_t *emu, uintptr_t fnc); void iFEppiV(x64emu_t *emu, uintptr_t fnc); void iFEppiA(x64emu_t *emu, uintptr_t fnc); void iFEpplp(x64emu_t *emu, uintptr_t fnc); void iFEpppi(x64emu_t *emu, uintptr_t fnc); void iFEpppp(x64emu_t *emu, uintptr_t fnc); void iFEpppV(x64emu_t *emu, uintptr_t fnc); void iFiiipu(x64emu_t *emu, uintptr_t fnc); void iFiiipp(x64emu_t *emu, uintptr_t fnc); void iFiiupp(x64emu_t *emu, uintptr_t fnc); void iFiipup(x64emu_t *emu, uintptr_t fnc); void iFiuLip(x64emu_t *emu, uintptr_t fnc); void iFiLLLL(x64emu_t *emu, uintptr_t fnc); void iFipiii(x64emu_t *emu, uintptr_t fnc); void iFipiup(x64emu_t *emu, uintptr_t fnc); void iFipipi(x64emu_t *emu, uintptr_t fnc); void iFipipu(x64emu_t *emu, uintptr_t fnc); void iFipuip(x64emu_t *emu, uintptr_t fnc); void iFipuui(x64emu_t *emu, uintptr_t fnc); void iFipLup(x64emu_t *emu, uintptr_t fnc); void iFippip(x64emu_t *emu, uintptr_t fnc); void iFippLi(x64emu_t *emu, uintptr_t fnc); void iFippLp(x64emu_t *emu, uintptr_t fnc); void iFipppi(x64emu_t *emu, uintptr_t fnc); void iFipppp(x64emu_t *emu, uintptr_t fnc); void iFuppLp(x64emu_t *emu, uintptr_t fnc); void iFpwwww(x64emu_t *emu, uintptr_t fnc); void iFpwppp(x64emu_t *emu, uintptr_t fnc); void iFpiiii(x64emu_t *emu, uintptr_t fnc); void iFpiiiu(x64emu_t *emu, uintptr_t fnc); void iFpiiiL(x64emu_t *emu, uintptr_t fnc); void iFpiiip(x64emu_t *emu, uintptr_t fnc); void iFpiiui(x64emu_t *emu, uintptr_t fnc); void iFpiiuu(x64emu_t *emu, uintptr_t fnc); void iFpiipi(x64emu_t *emu, uintptr_t fnc); void iFpiipp(x64emu_t *emu, uintptr_t fnc); void iFpiIip(x64emu_t *emu, uintptr_t fnc); void iFpiuwp(x64emu_t *emu, uintptr_t fnc); void iFpipii(x64emu_t *emu, uintptr_t fnc); void iFpipiL(x64emu_t *emu, uintptr_t fnc); void iFpipip(x64emu_t *emu, uintptr_t fnc); void iFpippi(x64emu_t *emu, uintptr_t fnc); void iFpippW(x64emu_t *emu, uintptr_t fnc); void iFpippp(x64emu_t *emu, uintptr_t fnc); void iFpCCCC(x64emu_t *emu, uintptr_t fnc); void iFpuill(x64emu_t *emu, uintptr_t fnc); void iFpuipi(x64emu_t *emu, uintptr_t fnc); void iFpuuip(x64emu_t *emu, uintptr_t fnc); void iFpuuui(x64emu_t *emu, uintptr_t fnc); void iFpuuup(x64emu_t *emu, uintptr_t fnc); void iFpuuLL(x64emu_t *emu, uintptr_t fnc); void iFpuupp(x64emu_t *emu, uintptr_t fnc); void iFpupiU(x64emu_t *emu, uintptr_t fnc); void iFpuppp(x64emu_t *emu, uintptr_t fnc); void iFplluu(x64emu_t *emu, uintptr_t fnc); void iFpLiLi(x64emu_t *emu, uintptr_t fnc); void iFpLlpp(x64emu_t *emu, uintptr_t fnc); void iFpLppi(x64emu_t *emu, uintptr_t fnc); void iFppiiu(x64emu_t *emu, uintptr_t fnc); void iFppiip(x64emu_t *emu, uintptr_t fnc); void iFppiup(x64emu_t *emu, uintptr_t fnc); void iFppiLi(x64emu_t *emu, uintptr_t fnc); void iFppiLL(x64emu_t *emu, uintptr_t fnc); void iFppipi(x64emu_t *emu, uintptr_t fnc); void iFppipp(x64emu_t *emu, uintptr_t fnc); void iFppuwp(x64emu_t *emu, uintptr_t fnc); void iFppuip(x64emu_t *emu, uintptr_t fnc); void iFppupi(x64emu_t *emu, uintptr_t fnc); void iFppupp(x64emu_t *emu, uintptr_t fnc); void iFppllp(x64emu_t *emu, uintptr_t fnc); void iFpplpp(x64emu_t *emu, uintptr_t fnc); void iFppLip(x64emu_t *emu, uintptr_t fnc); void iFppLpi(x64emu_t *emu, uintptr_t fnc); void iFppLpL(x64emu_t *emu, uintptr_t fnc); void iFppLpp(x64emu_t *emu, uintptr_t fnc); void iFpppii(x64emu_t *emu, uintptr_t fnc); void iFpppiL(x64emu_t *emu, uintptr_t fnc); void iFpppip(x64emu_t *emu, uintptr_t fnc); void iFpppui(x64emu_t *emu, uintptr_t fnc); void iFpppLi(x64emu_t *emu, uintptr_t fnc); void iFpppLp(x64emu_t *emu, uintptr_t fnc); void iFppppi(x64emu_t *emu, uintptr_t fnc); void iFppppL(x64emu_t *emu, uintptr_t fnc); void iFppppp(x64emu_t *emu, uintptr_t fnc); void IFppIII(x64emu_t *emu, uintptr_t fnc); void uFEippp(x64emu_t *emu, uintptr_t fnc); void uFEpipp(x64emu_t *emu, uintptr_t fnc); void uFEppuu(x64emu_t *emu, uintptr_t fnc); void uFEpppp(x64emu_t *emu, uintptr_t fnc); void uFiuuuu(x64emu_t *emu, uintptr_t fnc); void uFipipp(x64emu_t *emu, uintptr_t fnc); void uFuiiiu(x64emu_t *emu, uintptr_t fnc); void uFpCCCC(x64emu_t *emu, uintptr_t fnc); void uFpWuip(x64emu_t *emu, uintptr_t fnc); void uFpuuuu(x64emu_t *emu, uintptr_t fnc); void uFpupuu(x64emu_t *emu, uintptr_t fnc); void uFppiip(x64emu_t *emu, uintptr_t fnc); void uFppipp(x64emu_t *emu, uintptr_t fnc); void uFppuup(x64emu_t *emu, uintptr_t fnc); void uFppupp(x64emu_t *emu, uintptr_t fnc); void uFpplip(x64emu_t *emu, uintptr_t fnc); void uFppLpp(x64emu_t *emu, uintptr_t fnc); void uFppppu(x64emu_t *emu, uintptr_t fnc); void uFppppp(x64emu_t *emu, uintptr_t fnc); void UFuiiii(x64emu_t *emu, uintptr_t fnc); void lFipili(x64emu_t *emu, uintptr_t fnc); void lFipLli(x64emu_t *emu, uintptr_t fnc); void lFipLLi(x64emu_t *emu, uintptr_t fnc); void lFipLpp(x64emu_t *emu, uintptr_t fnc); void LFELppi(x64emu_t *emu, uintptr_t fnc); void LFEpppp(x64emu_t *emu, uintptr_t fnc); void LFpuipp(x64emu_t *emu, uintptr_t fnc); void LFpuppi(x64emu_t *emu, uintptr_t fnc); void LFpLLLp(x64emu_t *emu, uintptr_t fnc); void LFpLppL(x64emu_t *emu, uintptr_t fnc); void LFpLppp(x64emu_t *emu, uintptr_t fnc); void LFppLLp(x64emu_t *emu, uintptr_t fnc); void LFpppii(x64emu_t *emu, uintptr_t fnc); void LFppppp(x64emu_t *emu, uintptr_t fnc); void pFEpiii(x64emu_t *emu, uintptr_t fnc); void pFEpipL(x64emu_t *emu, uintptr_t fnc); void pFEpipp(x64emu_t *emu, uintptr_t fnc); void pFEpipV(x64emu_t *emu, uintptr_t fnc); void pFEpipA(x64emu_t *emu, uintptr_t fnc); void pFEpupp(x64emu_t *emu, uintptr_t fnc); void pFEppii(x64emu_t *emu, uintptr_t fnc); void pFEppip(x64emu_t *emu, uintptr_t fnc); void pFEppLp(x64emu_t *emu, uintptr_t fnc); void pFEpppi(x64emu_t *emu, uintptr_t fnc); void pFEpppu(x64emu_t *emu, uintptr_t fnc); void pFEpppp(x64emu_t *emu, uintptr_t fnc); void pFiiiii(x64emu_t *emu, uintptr_t fnc); void pFipipL(x64emu_t *emu, uintptr_t fnc); void pFipppu(x64emu_t *emu, uintptr_t fnc); void pFuiiiu(x64emu_t *emu, uintptr_t fnc); void pFuiipp(x64emu_t *emu, uintptr_t fnc); void pFpiiii(x64emu_t *emu, uintptr_t fnc); void pFpiiip(x64emu_t *emu, uintptr_t fnc); void pFpiiuu(x64emu_t *emu, uintptr_t fnc); void pFpiipi(x64emu_t *emu, uintptr_t fnc); void pFpiipp(x64emu_t *emu, uintptr_t fnc); void pFpiCCC(x64emu_t *emu, uintptr_t fnc); void pFpiuuu(x64emu_t *emu, uintptr_t fnc); void pFpippi(x64emu_t *emu, uintptr_t fnc); void pFpippp(x64emu_t *emu, uintptr_t fnc); void pFpCpup(x64emu_t *emu, uintptr_t fnc); void pFpCppp(x64emu_t *emu, uintptr_t fnc); void pFpuiii(x64emu_t *emu, uintptr_t fnc); void pFpuiip(x64emu_t *emu, uintptr_t fnc); void pFpuWWW(x64emu_t *emu, uintptr_t fnc); void pFpuuip(x64emu_t *emu, uintptr_t fnc); void pFpuuWW(x64emu_t *emu, uintptr_t fnc); void pFpuuup(x64emu_t *emu, uintptr_t fnc); void pFpuppp(x64emu_t *emu, uintptr_t fnc); void pFpUdii(x64emu_t *emu, uintptr_t fnc); void pFpdddd(x64emu_t *emu, uintptr_t fnc); void pFplppp(x64emu_t *emu, uintptr_t fnc); void pFppiii(x64emu_t *emu, uintptr_t fnc); void pFppiip(x64emu_t *emu, uintptr_t fnc); void pFppiup(x64emu_t *emu, uintptr_t fnc); void pFppipi(x64emu_t *emu, uintptr_t fnc); void pFppipp(x64emu_t *emu, uintptr_t fnc); void pFppuuu(x64emu_t *emu, uintptr_t fnc); void pFppuup(x64emu_t *emu, uintptr_t fnc); void pFppddi(x64emu_t *emu, uintptr_t fnc); void pFppLii(x64emu_t *emu, uintptr_t fnc); void pFppLLp(x64emu_t *emu, uintptr_t fnc); void pFpppii(x64emu_t *emu, uintptr_t fnc); void pFpppip(x64emu_t *emu, uintptr_t fnc); void pFpppui(x64emu_t *emu, uintptr_t fnc); void pFpppuu(x64emu_t *emu, uintptr_t fnc); void pFpppup(x64emu_t *emu, uintptr_t fnc); void pFpppLi(x64emu_t *emu, uintptr_t fnc); void pFppppi(x64emu_t *emu, uintptr_t fnc); void pFppppp(x64emu_t *emu, uintptr_t fnc); void vFEiiipp(x64emu_t *emu, uintptr_t fnc); void vFEpiLpp(x64emu_t *emu, uintptr_t fnc); void vFEpippp(x64emu_t *emu, uintptr_t fnc); void vFEpuipp(x64emu_t *emu, uintptr_t fnc); void vFEpupup(x64emu_t *emu, uintptr_t fnc); void vFEpLLpp(x64emu_t *emu, uintptr_t fnc); void vFEppipV(x64emu_t *emu, uintptr_t fnc); void vFEppipA(x64emu_t *emu, uintptr_t fnc); void vFEppupp(x64emu_t *emu, uintptr_t fnc); void vFEppppp(x64emu_t *emu, uintptr_t fnc); void vFiiiiii(x64emu_t *emu, uintptr_t fnc); void vFiiiuil(x64emu_t *emu, uintptr_t fnc); void vFiiuiil(x64emu_t *emu, uintptr_t fnc); void vFiililp(x64emu_t *emu, uintptr_t fnc); void vFiiplli(x64emu_t *emu, uintptr_t fnc); void vFiiplll(x64emu_t *emu, uintptr_t fnc); void vFiuippp(x64emu_t *emu, uintptr_t fnc); void vFiffiff(x64emu_t *emu, uintptr_t fnc); void vFiddidd(x64emu_t *emu, uintptr_t fnc); void vFipllli(x64emu_t *emu, uintptr_t fnc); void vFuiiiii(x64emu_t *emu, uintptr_t fnc); void vFuiiiil(x64emu_t *emu, uintptr_t fnc); void vFuiiiip(x64emu_t *emu, uintptr_t fnc); void vFuiiilp(x64emu_t *emu, uintptr_t fnc); void vFuiiuii(x64emu_t *emu, uintptr_t fnc); void vFuiiuup(x64emu_t *emu, uintptr_t fnc); void vFuiIIII(x64emu_t *emu, uintptr_t fnc); void vFuiuiii(x64emu_t *emu, uintptr_t fnc); void vFuiuiip(x64emu_t *emu, uintptr_t fnc); void vFuiuiuu(x64emu_t *emu, uintptr_t fnc); void vFuiuuip(x64emu_t *emu, uintptr_t fnc); void vFuiuuuu(x64emu_t *emu, uintptr_t fnc); void vFuiupii(x64emu_t *emu, uintptr_t fnc); void vFuiupiu(x64emu_t *emu, uintptr_t fnc); void vFuiUUUU(x64emu_t *emu, uintptr_t fnc); void vFuiffff(x64emu_t *emu, uintptr_t fnc); void vFuidddd(x64emu_t *emu, uintptr_t fnc); void vFuuiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiiiu(x64emu_t *emu, uintptr_t fnc); void vFuuiuii(x64emu_t *emu, uintptr_t fnc); void vFuuiuiu(x64emu_t *emu, uintptr_t fnc); void vFuuiuup(x64emu_t *emu, uintptr_t fnc); void vFuuuiup(x64emu_t *emu, uintptr_t fnc); void vFuuuipi(x64emu_t *emu, uintptr_t fnc); void vFuuuipp(x64emu_t *emu, uintptr_t fnc); void vFuuuuii(x64emu_t *emu, uintptr_t fnc); void vFuuuuip(x64emu_t *emu, uintptr_t fnc); void vFuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuuuuff(x64emu_t *emu, uintptr_t fnc); void vFuuuppi(x64emu_t *emu, uintptr_t fnc); void vFuuuppp(x64emu_t *emu, uintptr_t fnc); void vFuuffff(x64emu_t *emu, uintptr_t fnc); void vFuudddd(x64emu_t *emu, uintptr_t fnc); void vFuulppp(x64emu_t *emu, uintptr_t fnc); void vFuffiip(x64emu_t *emu, uintptr_t fnc); void vFufffff(x64emu_t *emu, uintptr_t fnc); void vFuddiip(x64emu_t *emu, uintptr_t fnc); void vFulilli(x64emu_t *emu, uintptr_t fnc); void vFulilll(x64emu_t *emu, uintptr_t fnc); void vFulplup(x64emu_t *emu, uintptr_t fnc); void vFupupip(x64emu_t *emu, uintptr_t fnc); void vFuppppu(x64emu_t *emu, uintptr_t fnc); void vFuppppp(x64emu_t *emu, uintptr_t fnc); void vFffffff(x64emu_t *emu, uintptr_t fnc); void vFdddddd(x64emu_t *emu, uintptr_t fnc); void vFpiiiii(x64emu_t *emu, uintptr_t fnc); void vFpiiipp(x64emu_t *emu, uintptr_t fnc); void vFpiiuuu(x64emu_t *emu, uintptr_t fnc); void vFpiippp(x64emu_t *emu, uintptr_t fnc); void vFpiUuup(x64emu_t *emu, uintptr_t fnc); void vFpipipV(x64emu_t *emu, uintptr_t fnc); void vFpipppi(x64emu_t *emu, uintptr_t fnc); void vFpuiiii(x64emu_t *emu, uintptr_t fnc); void vFpuiiiu(x64emu_t *emu, uintptr_t fnc); void vFpuiipp(x64emu_t *emu, uintptr_t fnc); void vFpuuuiu(x64emu_t *emu, uintptr_t fnc); void vFpuuppp(x64emu_t *emu, uintptr_t fnc); void vFpudddd(x64emu_t *emu, uintptr_t fnc); void vFpupuuu(x64emu_t *emu, uintptr_t fnc); void vFpupppp(x64emu_t *emu, uintptr_t fnc); void vFpUiuup(x64emu_t *emu, uintptr_t fnc); void vFpUiUup(x64emu_t *emu, uintptr_t fnc); void vFpUipup(x64emu_t *emu, uintptr_t fnc); void vFpUUiup(x64emu_t *emu, uintptr_t fnc); void vFpdddii(x64emu_t *emu, uintptr_t fnc); void vFpddddd(x64emu_t *emu, uintptr_t fnc); void vFppiiii(x64emu_t *emu, uintptr_t fnc); void vFppiiip(x64emu_t *emu, uintptr_t fnc); void vFppiiui(x64emu_t *emu, uintptr_t fnc); void vFppiipi(x64emu_t *emu, uintptr_t fnc); void vFppiipp(x64emu_t *emu, uintptr_t fnc); void vFppilpp(x64emu_t *emu, uintptr_t fnc); void vFppippi(x64emu_t *emu, uintptr_t fnc); void vFppippp(x64emu_t *emu, uintptr_t fnc); void vFppuuuu(x64emu_t *emu, uintptr_t fnc); void vFppupii(x64emu_t *emu, uintptr_t fnc); void vFppuppp(x64emu_t *emu, uintptr_t fnc); void vFppdidd(x64emu_t *emu, uintptr_t fnc); void vFpplppi(x64emu_t *emu, uintptr_t fnc); void vFpplppp(x64emu_t *emu, uintptr_t fnc); void vFppLppi(x64emu_t *emu, uintptr_t fnc); void vFppLppp(x64emu_t *emu, uintptr_t fnc); void vFpppiii(x64emu_t *emu, uintptr_t fnc); void vFpppiip(x64emu_t *emu, uintptr_t fnc); void vFpppiff(x64emu_t *emu, uintptr_t fnc); void vFpppipu(x64emu_t *emu, uintptr_t fnc); void vFpppuii(x64emu_t *emu, uintptr_t fnc); void vFppppii(x64emu_t *emu, uintptr_t fnc); void vFpppppi(x64emu_t *emu, uintptr_t fnc); void vFpppppu(x64emu_t *emu, uintptr_t fnc); void vFpppppL(x64emu_t *emu, uintptr_t fnc); void vFpppppp(x64emu_t *emu, uintptr_t fnc); void cFppLppi(x64emu_t *emu, uintptr_t fnc); void iFEiippi(x64emu_t *emu, uintptr_t fnc); void iFEiippp(x64emu_t *emu, uintptr_t fnc); void iFElpppp(x64emu_t *emu, uintptr_t fnc); void iFEpiipp(x64emu_t *emu, uintptr_t fnc); void iFEpiipV(x64emu_t *emu, uintptr_t fnc); void iFEpilpV(x64emu_t *emu, uintptr_t fnc); void iFEpippi(x64emu_t *emu, uintptr_t fnc); void iFEpuppp(x64emu_t *emu, uintptr_t fnc); void iFEpUppp(x64emu_t *emu, uintptr_t fnc); void iFEppppp(x64emu_t *emu, uintptr_t fnc); void iFiiiiii(x64emu_t *emu, uintptr_t fnc); void iFiiiiip(x64emu_t *emu, uintptr_t fnc); void iFiiiuwp(x64emu_t *emu, uintptr_t fnc); void iFiuiipi(x64emu_t *emu, uintptr_t fnc); void iFipiipi(x64emu_t *emu, uintptr_t fnc); void iFipuufp(x64emu_t *emu, uintptr_t fnc); void iFipupup(x64emu_t *emu, uintptr_t fnc); void iFipuppp(x64emu_t *emu, uintptr_t fnc); void iFuppppp(x64emu_t *emu, uintptr_t fnc); void iFdipppL(x64emu_t *emu, uintptr_t fnc); void iFDipppL(x64emu_t *emu, uintptr_t fnc); void iFlpippp(x64emu_t *emu, uintptr_t fnc); void iFLppipp(x64emu_t *emu, uintptr_t fnc); void iFpiiiii(x64emu_t *emu, uintptr_t fnc); void iFpiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiiipp(x64emu_t *emu, uintptr_t fnc); void iFpiipip(x64emu_t *emu, uintptr_t fnc); void iFpiippu(x64emu_t *emu, uintptr_t fnc); void iFpiippp(x64emu_t *emu, uintptr_t fnc); void iFpiuuup(x64emu_t *emu, uintptr_t fnc); void iFpiuupp(x64emu_t *emu, uintptr_t fnc); void iFpiUUpp(x64emu_t *emu, uintptr_t fnc); void iFpipipi(x64emu_t *emu, uintptr_t fnc); void iFpippip(x64emu_t *emu, uintptr_t fnc); void iFpipppL(x64emu_t *emu, uintptr_t fnc); void iFpipppp(x64emu_t *emu, uintptr_t fnc); void iFpCpipu(x64emu_t *emu, uintptr_t fnc); void iFpWpppp(x64emu_t *emu, uintptr_t fnc); void iFpuiCpp(x64emu_t *emu, uintptr_t fnc); void iFpuippp(x64emu_t *emu, uintptr_t fnc); void iFpupuui(x64emu_t *emu, uintptr_t fnc); void iFpUuupp(x64emu_t *emu, uintptr_t fnc); void iFpUUUip(x64emu_t *emu, uintptr_t fnc); void iFpUUUUp(x64emu_t *emu, uintptr_t fnc); void iFpLLppp(x64emu_t *emu, uintptr_t fnc); void iFppiiii(x64emu_t *emu, uintptr_t fnc); void iFppiiip(x64emu_t *emu, uintptr_t fnc); void iFppiiuu(x64emu_t *emu, uintptr_t fnc); void iFppiipi(x64emu_t *emu, uintptr_t fnc); void iFppiipp(x64emu_t *emu, uintptr_t fnc); void iFppipii(x64emu_t *emu, uintptr_t fnc); void iFppipiL(x64emu_t *emu, uintptr_t fnc); void iFppipip(x64emu_t *emu, uintptr_t fnc); void iFppIipp(x64emu_t *emu, uintptr_t fnc); void iFppIppp(x64emu_t *emu, uintptr_t fnc); void iFppuiii(x64emu_t *emu, uintptr_t fnc); void iFppuiiL(x64emu_t *emu, uintptr_t fnc); void iFppuipp(x64emu_t *emu, uintptr_t fnc); void iFppuIII(x64emu_t *emu, uintptr_t fnc); void iFppuupp(x64emu_t *emu, uintptr_t fnc); void iFppupip(x64emu_t *emu, uintptr_t fnc); void iFppuppp(x64emu_t *emu, uintptr_t fnc); void iFppUipp(x64emu_t *emu, uintptr_t fnc); void iFppUUup(x64emu_t *emu, uintptr_t fnc); void iFppdidd(x64emu_t *emu, uintptr_t fnc); void iFpplppi(x64emu_t *emu, uintptr_t fnc); void iFppLupp(x64emu_t *emu, uintptr_t fnc); void iFppLpLp(x64emu_t *emu, uintptr_t fnc); void iFpppiuu(x64emu_t *emu, uintptr_t fnc); void iFpppipi(x64emu_t *emu, uintptr_t fnc); void iFpppipp(x64emu_t *emu, uintptr_t fnc); void iFpppuii(x64emu_t *emu, uintptr_t fnc); void iFpppupu(x64emu_t *emu, uintptr_t fnc); void iFpppLpp(x64emu_t *emu, uintptr_t fnc); void iFppppii(x64emu_t *emu, uintptr_t fnc); void iFppppiu(x64emu_t *emu, uintptr_t fnc); void iFppppip(x64emu_t *emu, uintptr_t fnc); void iFppppup(x64emu_t *emu, uintptr_t fnc); void iFpppppi(x64emu_t *emu, uintptr_t fnc); void iFpppppL(x64emu_t *emu, uintptr_t fnc); void iFpppppp(x64emu_t *emu, uintptr_t fnc); void uFEiippp(x64emu_t *emu, uintptr_t fnc); void uFEiuppp(x64emu_t *emu, uintptr_t fnc); void uFEpCppp(x64emu_t *emu, uintptr_t fnc); void uFEpuppp(x64emu_t *emu, uintptr_t fnc); void uFpippup(x64emu_t *emu, uintptr_t fnc); void uFpWuwCp(x64emu_t *emu, uintptr_t fnc); void uFpWuipp(x64emu_t *emu, uintptr_t fnc); void uFpWuuCp(x64emu_t *emu, uintptr_t fnc); void uFpuippp(x64emu_t *emu, uintptr_t fnc); void uFppippp(x64emu_t *emu, uintptr_t fnc); void uFppuuup(x64emu_t *emu, uintptr_t fnc); void uFppuupu(x64emu_t *emu, uintptr_t fnc); void uFpppppi(x64emu_t *emu, uintptr_t fnc); void uFpppppp(x64emu_t *emu, uintptr_t fnc); void UFpippup(x64emu_t *emu, uintptr_t fnc); void lFEpippp(x64emu_t *emu, uintptr_t fnc); void lFipipLu(x64emu_t *emu, uintptr_t fnc); void lFipLipu(x64emu_t *emu, uintptr_t fnc); void lFipLipp(x64emu_t *emu, uintptr_t fnc); void lFipLpLL(x64emu_t *emu, uintptr_t fnc); void LFEupppp(x64emu_t *emu, uintptr_t fnc); void LFELpppi(x64emu_t *emu, uintptr_t fnc); void LFEppppi(x64emu_t *emu, uintptr_t fnc); void LFpipipi(x64emu_t *emu, uintptr_t fnc); void LFpLippp(x64emu_t *emu, uintptr_t fnc); void LFSpLiip(x64emu_t *emu, uintptr_t fnc); void pFEpiupp(x64emu_t *emu, uintptr_t fnc); void pFEpippp(x64emu_t *emu, uintptr_t fnc); void pFEpuipp(x64emu_t *emu, uintptr_t fnc); void pFEpuupp(x64emu_t *emu, uintptr_t fnc); void pFEpuppp(x64emu_t *emu, uintptr_t fnc); void pFEpLLiN(x64emu_t *emu, uintptr_t fnc); void pFEppLLp(x64emu_t *emu, uintptr_t fnc); void pFEpppLp(x64emu_t *emu, uintptr_t fnc); void pFEppppi(x64emu_t *emu, uintptr_t fnc); void pFEppppp(x64emu_t *emu, uintptr_t fnc); void pFEppppV(x64emu_t *emu, uintptr_t fnc); void pFEppApp(x64emu_t *emu, uintptr_t fnc); void pFiiiiii(x64emu_t *emu, uintptr_t fnc); void pFiCiiCi(x64emu_t *emu, uintptr_t fnc); void pFdddddd(x64emu_t *emu, uintptr_t fnc); void pFpiiiiu(x64emu_t *emu, uintptr_t fnc); void pFpiiCCC(x64emu_t *emu, uintptr_t fnc); void pFpiUUUU(x64emu_t *emu, uintptr_t fnc); void pFpippip(x64emu_t *emu, uintptr_t fnc); void pFpipppp(x64emu_t *emu, uintptr_t fnc); void pFpCuuCC(x64emu_t *emu, uintptr_t fnc); void pFpCuuWW(x64emu_t *emu, uintptr_t fnc); void pFpCuuup(x64emu_t *emu, uintptr_t fnc); void pFpuuwwu(x64emu_t *emu, uintptr_t fnc); void pFpuuuuu(x64emu_t *emu, uintptr_t fnc); void pFpuuupu(x64emu_t *emu, uintptr_t fnc); void pFplpppp(x64emu_t *emu, uintptr_t fnc); void pFppiiii(x64emu_t *emu, uintptr_t fnc); void pFppiipp(x64emu_t *emu, uintptr_t fnc); void pFppiCCC(x64emu_t *emu, uintptr_t fnc); void pFppippi(x64emu_t *emu, uintptr_t fnc); void pFppippp(x64emu_t *emu, uintptr_t fnc); void pFpppiii(x64emu_t *emu, uintptr_t fnc); void pFpppiui(x64emu_t *emu, uintptr_t fnc); void pFpppupp(x64emu_t *emu, uintptr_t fnc); void pFppppii(x64emu_t *emu, uintptr_t fnc); void pFpppppi(x64emu_t *emu, uintptr_t fnc); void pFpppppu(x64emu_t *emu, uintptr_t fnc); void pFpppppp(x64emu_t *emu, uintptr_t fnc); void pFSpiiii(x64emu_t *emu, uintptr_t fnc); void vFEpipppp(x64emu_t *emu, uintptr_t fnc); void vFEpuipuV(x64emu_t *emu, uintptr_t fnc); void vFEpppppp(x64emu_t *emu, uintptr_t fnc); void vFiiiiiip(x64emu_t *emu, uintptr_t fnc); void vFiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFiiffffp(x64emu_t *emu, uintptr_t fnc); void vFiipllli(x64emu_t *emu, uintptr_t fnc); void vFuiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuiiiuip(x64emu_t *emu, uintptr_t fnc); void vFuiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuiiliip(x64emu_t *emu, uintptr_t fnc); void vFuiililp(x64emu_t *emu, uintptr_t fnc); void vFuiuiiii(x64emu_t *emu, uintptr_t fnc); void vFuiuiiip(x64emu_t *emu, uintptr_t fnc); void vFuiuiiuu(x64emu_t *emu, uintptr_t fnc); void vFuiupiiu(x64emu_t *emu, uintptr_t fnc); void vFuilliip(x64emu_t *emu, uintptr_t fnc); void vFuipiiii(x64emu_t *emu, uintptr_t fnc); void vFuipffff(x64emu_t *emu, uintptr_t fnc); void vFuipdddd(x64emu_t *emu, uintptr_t fnc); void vFuuiiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiiiip(x64emu_t *emu, uintptr_t fnc); void vFuuiiiui(x64emu_t *emu, uintptr_t fnc); void vFuuiiiuu(x64emu_t *emu, uintptr_t fnc); void vFuuiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuiuiii(x64emu_t *emu, uintptr_t fnc); void vFuuipppp(x64emu_t *emu, uintptr_t fnc); void vFuuuiiii(x64emu_t *emu, uintptr_t fnc); void vFuuuiiip(x64emu_t *emu, uintptr_t fnc); void vFuuuiuii(x64emu_t *emu, uintptr_t fnc); void vFuuuiupi(x64emu_t *emu, uintptr_t fnc); void vFuuuuiip(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuuuufff(x64emu_t *emu, uintptr_t fnc); void vFuuuffff(x64emu_t *emu, uintptr_t fnc); void vFuuudddd(x64emu_t *emu, uintptr_t fnc); void vFuuffiip(x64emu_t *emu, uintptr_t fnc); void vFuuddiip(x64emu_t *emu, uintptr_t fnc); void vFuuppppu(x64emu_t *emu, uintptr_t fnc); void vFuuppppp(x64emu_t *emu, uintptr_t fnc); void vFuffffff(x64emu_t *emu, uintptr_t fnc); void vFudddddd(x64emu_t *emu, uintptr_t fnc); void vFulillli(x64emu_t *emu, uintptr_t fnc); void vFulipulp(x64emu_t *emu, uintptr_t fnc); void vFulpiill(x64emu_t *emu, uintptr_t fnc); void vFlipuiip(x64emu_t *emu, uintptr_t fnc); void vFpiiiipp(x64emu_t *emu, uintptr_t fnc); void vFpiiliip(x64emu_t *emu, uintptr_t fnc); void vFpiipCpp(x64emu_t *emu, uintptr_t fnc); void vFpipipii(x64emu_t *emu, uintptr_t fnc); void vFpipppii(x64emu_t *emu, uintptr_t fnc); void vFpuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFpuuUUuu(x64emu_t *emu, uintptr_t fnc); void vFpuupppp(x64emu_t *emu, uintptr_t fnc); void vFpUiUiup(x64emu_t *emu, uintptr_t fnc); void vFpUUUUuu(x64emu_t *emu, uintptr_t fnc); void vFpddiidd(x64emu_t *emu, uintptr_t fnc); void vFpdddddd(x64emu_t *emu, uintptr_t fnc); void vFpLiLiLp(x64emu_t *emu, uintptr_t fnc); void vFppiiiii(x64emu_t *emu, uintptr_t fnc); void vFppiiiip(x64emu_t *emu, uintptr_t fnc); void vFppiiipi(x64emu_t *emu, uintptr_t fnc); void vFppiipii(x64emu_t *emu, uintptr_t fnc); void vFppiipuu(x64emu_t *emu, uintptr_t fnc); void vFppiippp(x64emu_t *emu, uintptr_t fnc); void vFppilppi(x64emu_t *emu, uintptr_t fnc); void vFppiLiLp(x64emu_t *emu, uintptr_t fnc); void vFppipiip(x64emu_t *emu, uintptr_t fnc); void vFppipipp(x64emu_t *emu, uintptr_t fnc); void vFppipppp(x64emu_t *emu, uintptr_t fnc); void vFppLpppi(x64emu_t *emu, uintptr_t fnc); void vFppLpppp(x64emu_t *emu, uintptr_t fnc); void vFpppiiii(x64emu_t *emu, uintptr_t fnc); void vFpppiipi(x64emu_t *emu, uintptr_t fnc); void vFpppiipp(x64emu_t *emu, uintptr_t fnc); void vFpppippi(x64emu_t *emu, uintptr_t fnc); void vFpppuuuu(x64emu_t *emu, uintptr_t fnc); void vFppppiii(x64emu_t *emu, uintptr_t fnc); void vFppppiip(x64emu_t *emu, uintptr_t fnc); void vFppppipi(x64emu_t *emu, uintptr_t fnc); void vFpppppip(x64emu_t *emu, uintptr_t fnc); void vFppppppi(x64emu_t *emu, uintptr_t fnc); void vFppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpupppp(x64emu_t *emu, uintptr_t fnc); void iFEpUuppp(x64emu_t *emu, uintptr_t fnc); void iFEpLiLpV(x64emu_t *emu, uintptr_t fnc); void iFEppuppp(x64emu_t *emu, uintptr_t fnc); void iFEppLpIi(x64emu_t *emu, uintptr_t fnc); void iFEpppiiu(x64emu_t *emu, uintptr_t fnc); void iFEpppppL(x64emu_t *emu, uintptr_t fnc); void iFEpppppp(x64emu_t *emu, uintptr_t fnc); void iFiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiiiiii(x64emu_t *emu, uintptr_t fnc); void iFpiiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiiiuwp(x64emu_t *emu, uintptr_t fnc); void iFpiiuuiu(x64emu_t *emu, uintptr_t fnc); void iFpiipppp(x64emu_t *emu, uintptr_t fnc); void iFpiuiipp(x64emu_t *emu, uintptr_t fnc); void iFpiupiii(x64emu_t *emu, uintptr_t fnc); void iFpiupppp(x64emu_t *emu, uintptr_t fnc); void iFpipipip(x64emu_t *emu, uintptr_t fnc); void iFpippLpp(x64emu_t *emu, uintptr_t fnc); void iFpippppW(x64emu_t *emu, uintptr_t fnc); void iFpippppp(x64emu_t *emu, uintptr_t fnc); void iFpIIpppp(x64emu_t *emu, uintptr_t fnc); void iFpWppppW(x64emu_t *emu, uintptr_t fnc); void iFpuiCuCp(x64emu_t *emu, uintptr_t fnc); void iFpuuiuui(x64emu_t *emu, uintptr_t fnc); void iFpuupppp(x64emu_t *emu, uintptr_t fnc); void iFpupuuui(x64emu_t *emu, uintptr_t fnc); void iFpupupui(x64emu_t *emu, uintptr_t fnc); void iFpuppppp(x64emu_t *emu, uintptr_t fnc); void iFpLipipi(x64emu_t *emu, uintptr_t fnc); void iFppiiiip(x64emu_t *emu, uintptr_t fnc); void iFppiiuui(x64emu_t *emu, uintptr_t fnc); void iFppiipii(x64emu_t *emu, uintptr_t fnc); void iFppiipiL(x64emu_t *emu, uintptr_t fnc); void iFppiuppi(x64emu_t *emu, uintptr_t fnc); void iFppipiip(x64emu_t *emu, uintptr_t fnc); void iFppipipi(x64emu_t *emu, uintptr_t fnc); void iFppipipp(x64emu_t *emu, uintptr_t fnc); void iFppippip(x64emu_t *emu, uintptr_t fnc); void iFppipppi(x64emu_t *emu, uintptr_t fnc); void iFppipppp(x64emu_t *emu, uintptr_t fnc); void iFppuipiL(x64emu_t *emu, uintptr_t fnc); void iFppLiipp(x64emu_t *emu, uintptr_t fnc); void iFpppiiii(x64emu_t *emu, uintptr_t fnc); void iFpppiiuu(x64emu_t *emu, uintptr_t fnc); void iFpppiiup(x64emu_t *emu, uintptr_t fnc); void iFpppiipi(x64emu_t *emu, uintptr_t fnc); void iFpppiuwu(x64emu_t *emu, uintptr_t fnc); void iFpppippi(x64emu_t *emu, uintptr_t fnc); void iFpppippp(x64emu_t *emu, uintptr_t fnc); void iFpppuiii(x64emu_t *emu, uintptr_t fnc); void iFppppiii(x64emu_t *emu, uintptr_t fnc); void iFppppipp(x64emu_t *emu, uintptr_t fnc); void iFppppdpi(x64emu_t *emu, uintptr_t fnc); void iFpppppip(x64emu_t *emu, uintptr_t fnc); void iFpppppup(x64emu_t *emu, uintptr_t fnc); void iFppppppi(x64emu_t *emu, uintptr_t fnc); void iFppppppp(x64emu_t *emu, uintptr_t fnc); void uFEiipppp(x64emu_t *emu, uintptr_t fnc); void uFEpiippp(x64emu_t *emu, uintptr_t fnc); void uFEpuuppp(x64emu_t *emu, uintptr_t fnc); void uFuippppp(x64emu_t *emu, uintptr_t fnc); void uFppiuppp(x64emu_t *emu, uintptr_t fnc); void uFppuuuup(x64emu_t *emu, uintptr_t fnc); void LFEppLppU(x64emu_t *emu, uintptr_t fnc); void LFEpppppu(x64emu_t *emu, uintptr_t fnc); void pFEpLiiii(x64emu_t *emu, uintptr_t fnc); void pFEpLiiiI(x64emu_t *emu, uintptr_t fnc); void pFEpLiiil(x64emu_t *emu, uintptr_t fnc); void pFEppuipp(x64emu_t *emu, uintptr_t fnc); void pFEppppip(x64emu_t *emu, uintptr_t fnc); void pFEpppppi(x64emu_t *emu, uintptr_t fnc); void pFifffppp(x64emu_t *emu, uintptr_t fnc); void pFuupupup(x64emu_t *emu, uintptr_t fnc); void pFdiiiIiI(x64emu_t *emu, uintptr_t fnc); void pFpiiUdii(x64emu_t *emu, uintptr_t fnc); void pFpCuwwWW(x64emu_t *emu, uintptr_t fnc); void pFpCuWCCC(x64emu_t *emu, uintptr_t fnc); void pFpCuuwwp(x64emu_t *emu, uintptr_t fnc); void pFpCuuuuu(x64emu_t *emu, uintptr_t fnc); void pFpCpWWup(x64emu_t *emu, uintptr_t fnc); void pFpuuuwwu(x64emu_t *emu, uintptr_t fnc); void pFpuupwwC(x64emu_t *emu, uintptr_t fnc); void pFplppppp(x64emu_t *emu, uintptr_t fnc); void pFpLppiip(x64emu_t *emu, uintptr_t fnc); void pFppiiipp(x64emu_t *emu, uintptr_t fnc); void pFppiiCCC(x64emu_t *emu, uintptr_t fnc); void pFppiippp(x64emu_t *emu, uintptr_t fnc); void pFppipipp(x64emu_t *emu, uintptr_t fnc); void pFppuuppp(x64emu_t *emu, uintptr_t fnc); void pFppLiiip(x64emu_t *emu, uintptr_t fnc); void pFppLipip(x64emu_t *emu, uintptr_t fnc); void pFpppccci(x64emu_t *emu, uintptr_t fnc); void pFpppiiii(x64emu_t *emu, uintptr_t fnc); void pFpppiipp(x64emu_t *emu, uintptr_t fnc); void pFpppIIIi(x64emu_t *emu, uintptr_t fnc); void pFpppCCCi(x64emu_t *emu, uintptr_t fnc); void pFpppuuui(x64emu_t *emu, uintptr_t fnc); void pFpppuupp(x64emu_t *emu, uintptr_t fnc); void pFpppUUUi(x64emu_t *emu, uintptr_t fnc); void pFpppfffi(x64emu_t *emu, uintptr_t fnc); void pFpppdddi(x64emu_t *emu, uintptr_t fnc); void pFpppllli(x64emu_t *emu, uintptr_t fnc); void pFpppLLLi(x64emu_t *emu, uintptr_t fnc); void pFppppuuu(x64emu_t *emu, uintptr_t fnc); void pFpppppuu(x64emu_t *emu, uintptr_t fnc); void pFppppppi(x64emu_t *emu, uintptr_t fnc); void pFppppppp(x64emu_t *emu, uintptr_t fnc); void vFEiippppV(x64emu_t *emu, uintptr_t fnc); void vFEiupippp(x64emu_t *emu, uintptr_t fnc); void vFEipAippp(x64emu_t *emu, uintptr_t fnc); void vFEppipppp(x64emu_t *emu, uintptr_t fnc); void vFEpppuipV(x64emu_t *emu, uintptr_t fnc); void vFEpppppuu(x64emu_t *emu, uintptr_t fnc); void vFiiiiuuip(x64emu_t *emu, uintptr_t fnc); void vFiilliilp(x64emu_t *emu, uintptr_t fnc); void vFilipufip(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuiiiiill(x64emu_t *emu, uintptr_t fnc); void vFuiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuiuiiiii(x64emu_t *emu, uintptr_t fnc); void vFuiuiiiip(x64emu_t *emu, uintptr_t fnc); void vFuiulplpp(x64emu_t *emu, uintptr_t fnc); void vFuipuliuf(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiiiuip(x64emu_t *emu, uintptr_t fnc); void vFuuiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuiiuupp(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiip(x64emu_t *emu, uintptr_t fnc); void vFuuuiiiii(x64emu_t *emu, uintptr_t fnc); void vFuuuiuiii(x64emu_t *emu, uintptr_t fnc); void vFuuuipipp(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuuuuufff(x64emu_t *emu, uintptr_t fnc); void vFulllplip(x64emu_t *emu, uintptr_t fnc); void vFffffffff(x64emu_t *emu, uintptr_t fnc); void vFlipuiuip(x64emu_t *emu, uintptr_t fnc); void vFpiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFpiiiipii(x64emu_t *emu, uintptr_t fnc); void vFpiiULipp(x64emu_t *emu, uintptr_t fnc); void vFpiUuupup(x64emu_t *emu, uintptr_t fnc); void vFpippiiuu(x64emu_t *emu, uintptr_t fnc); void vFpippiipi(x64emu_t *emu, uintptr_t fnc); void vFpUiUiupi(x64emu_t *emu, uintptr_t fnc); void vFpUuuUUUi(x64emu_t *emu, uintptr_t fnc); void vFppiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppiiipii(x64emu_t *emu, uintptr_t fnc); void vFppipipii(x64emu_t *emu, uintptr_t fnc); void vFppipppui(x64emu_t *emu, uintptr_t fnc); void vFppippppi(x64emu_t *emu, uintptr_t fnc); void vFppippppp(x64emu_t *emu, uintptr_t fnc); void vFpplppppi(x64emu_t *emu, uintptr_t fnc); void vFpplppppp(x64emu_t *emu, uintptr_t fnc); void vFppppiipi(x64emu_t *emu, uintptr_t fnc); void vFpppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpippppp(x64emu_t *emu, uintptr_t fnc); void iFEpuuLppp(x64emu_t *emu, uintptr_t fnc); void iFEppipppp(x64emu_t *emu, uintptr_t fnc); void iFEppppipp(x64emu_t *emu, uintptr_t fnc); void iFiiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFiiupiupi(x64emu_t *emu, uintptr_t fnc); void iFuipuuluf(x64emu_t *emu, uintptr_t fnc); void iFuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void iFullfpppp(x64emu_t *emu, uintptr_t fnc); void iFpCCWWpWu(x64emu_t *emu, uintptr_t fnc); void iFpWCuWCuu(x64emu_t *emu, uintptr_t fnc); void iFpWWipppp(x64emu_t *emu, uintptr_t fnc); void iFpuiipppp(x64emu_t *emu, uintptr_t fnc); void iFpuippLpp(x64emu_t *emu, uintptr_t fnc); void iFpuuiiiii(x64emu_t *emu, uintptr_t fnc); void iFpupppWWu(x64emu_t *emu, uintptr_t fnc); void iFpupppppp(x64emu_t *emu, uintptr_t fnc); void iFpUuuLpUi(x64emu_t *emu, uintptr_t fnc); void iFpdiiiIiI(x64emu_t *emu, uintptr_t fnc); void iFpLpipppp(x64emu_t *emu, uintptr_t fnc); void iFppiiiiiu(x64emu_t *emu, uintptr_t fnc); void iFppIIIppp(x64emu_t *emu, uintptr_t fnc); void iFpppiiipi(x64emu_t *emu, uintptr_t fnc); void iFpppiippp(x64emu_t *emu, uintptr_t fnc); void iFpppipipi(x64emu_t *emu, uintptr_t fnc); void iFppppiipi(x64emu_t *emu, uintptr_t fnc); void iFppppippp(x64emu_t *emu, uintptr_t fnc); void iFppppppii(x64emu_t *emu, uintptr_t fnc); void iFpppppppi(x64emu_t *emu, uintptr_t fnc); void iFpppppppp(x64emu_t *emu, uintptr_t fnc); void uFEipipppp(x64emu_t *emu, uintptr_t fnc); void uFEpiupppp(x64emu_t *emu, uintptr_t fnc); void uFEppipppp(x64emu_t *emu, uintptr_t fnc); void uFEpppuppp(x64emu_t *emu, uintptr_t fnc); void uFEppppppp(x64emu_t *emu, uintptr_t fnc); void uFuipppppp(x64emu_t *emu, uintptr_t fnc); void uFpupuuuCp(x64emu_t *emu, uintptr_t fnc); void uFppuuuupp(x64emu_t *emu, uintptr_t fnc); void uFppuuuppi(x64emu_t *emu, uintptr_t fnc); void uFppuppppp(x64emu_t *emu, uintptr_t fnc); void LFELpLpLpi(x64emu_t *emu, uintptr_t fnc); void LFEpiupppp(x64emu_t *emu, uintptr_t fnc); void pFEpiuCppp(x64emu_t *emu, uintptr_t fnc); void pFEppLiiip(x64emu_t *emu, uintptr_t fnc); void pFEpppuipV(x64emu_t *emu, uintptr_t fnc); void pFEpppppiV(x64emu_t *emu, uintptr_t fnc); void pFEppppppi(x64emu_t *emu, uintptr_t fnc); void pFEppppppp(x64emu_t *emu, uintptr_t fnc); void pFiipppppp(x64emu_t *emu, uintptr_t fnc); void pFuiiiuuuu(x64emu_t *emu, uintptr_t fnc); void pFuupupipp(x64emu_t *emu, uintptr_t fnc); void pFpiiiiiuu(x64emu_t *emu, uintptr_t fnc); void pFpiUdiiUi(x64emu_t *emu, uintptr_t fnc); void pFpipiiiip(x64emu_t *emu, uintptr_t fnc); void pFpipppppp(x64emu_t *emu, uintptr_t fnc); void pFpCCuuwwC(x64emu_t *emu, uintptr_t fnc); void pFpCuwwWWu(x64emu_t *emu, uintptr_t fnc); void pFpCuuuCup(x64emu_t *emu, uintptr_t fnc); void pFpWWiCpup(x64emu_t *emu, uintptr_t fnc); void pFpuuWWCuu(x64emu_t *emu, uintptr_t fnc); void pFpuuuuupp(x64emu_t *emu, uintptr_t fnc); void pFpuuuupup(x64emu_t *emu, uintptr_t fnc); void pFpuuupwwp(x64emu_t *emu, uintptr_t fnc); void pFpdwwWWui(x64emu_t *emu, uintptr_t fnc); void pFplpppppp(x64emu_t *emu, uintptr_t fnc); void pFppiiiiii(x64emu_t *emu, uintptr_t fnc); void pFpppuuLLu(x64emu_t *emu, uintptr_t fnc); void pFpppppupp(x64emu_t *emu, uintptr_t fnc); void vFEpiiiiipp(x64emu_t *emu, uintptr_t fnc); void vFEpippippV(x64emu_t *emu, uintptr_t fnc); void vFEpippippA(x64emu_t *emu, uintptr_t fnc); void vFEppiipppp(x64emu_t *emu, uintptr_t fnc); void vFEpppiippp(x64emu_t *emu, uintptr_t fnc); void vFiiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFiiiiillli(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiuip(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuiiiillli(x64emu_t *emu, uintptr_t fnc); void vFuiiilliip(x64emu_t *emu, uintptr_t fnc); void vFuiiillilp(x64emu_t *emu, uintptr_t fnc); void vFuiuiiiiip(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiiip(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuuiiiiip(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuffffffff(x64emu_t *emu, uintptr_t fnc); void vFffuuuufff(x64emu_t *emu, uintptr_t fnc); void vFddddddddd(x64emu_t *emu, uintptr_t fnc); void vFlipuiuiip(x64emu_t *emu, uintptr_t fnc); void vFpipiuiipp(x64emu_t *emu, uintptr_t fnc); void vFpipippppi(x64emu_t *emu, uintptr_t fnc); void vFpipppiipi(x64emu_t *emu, uintptr_t fnc); void vFppiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppiiiiipi(x64emu_t *emu, uintptr_t fnc); void vFppiiipiii(x64emu_t *emu, uintptr_t fnc); void vFppiipiiii(x64emu_t *emu, uintptr_t fnc); void vFppipppiii(x64emu_t *emu, uintptr_t fnc); void vFppipppiip(x64emu_t *emu, uintptr_t fnc); void vFppuuiiiii(x64emu_t *emu, uintptr_t fnc); void vFpplpppppi(x64emu_t *emu, uintptr_t fnc); void vFpppiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppppipiip(x64emu_t *emu, uintptr_t fnc); void vFpppppippp(x64emu_t *emu, uintptr_t fnc); void iFEpiiiiipi(x64emu_t *emu, uintptr_t fnc); void iFEpppipppp(x64emu_t *emu, uintptr_t fnc); void iFEppplPPPP(x64emu_t *emu, uintptr_t fnc); void iFEpppppupp(x64emu_t *emu, uintptr_t fnc); void iFEppPPPPPP(x64emu_t *emu, uintptr_t fnc); void iFiiiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFiiiipiiip(x64emu_t *emu, uintptr_t fnc); void iFipiipippi(x64emu_t *emu, uintptr_t fnc); void iFuilpluluf(x64emu_t *emu, uintptr_t fnc); void iFdddpppppp(x64emu_t *emu, uintptr_t fnc); void iFpipLpiiip(x64emu_t *emu, uintptr_t fnc); void iFpuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void iFpdiiiUiUp(x64emu_t *emu, uintptr_t fnc); void iFppiiiiiii(x64emu_t *emu, uintptr_t fnc); void iFppiuiippL(x64emu_t *emu, uintptr_t fnc); void iFppLpiippp(x64emu_t *emu, uintptr_t fnc); void iFpppiiipip(x64emu_t *emu, uintptr_t fnc); void iFpppiiuuii(x64emu_t *emu, uintptr_t fnc); void iFpppiipiiu(x64emu_t *emu, uintptr_t fnc); void iFppppiiupp(x64emu_t *emu, uintptr_t fnc); void iFppppppppu(x64emu_t *emu, uintptr_t fnc); void iFppppppppp(x64emu_t *emu, uintptr_t fnc); void uFEipippppp(x64emu_t *emu, uintptr_t fnc); void uFEpppufppp(x64emu_t *emu, uintptr_t fnc); void uFppppppppp(x64emu_t *emu, uintptr_t fnc); void LFEppppppii(x64emu_t *emu, uintptr_t fnc); void pFEppiiuuLi(x64emu_t *emu, uintptr_t fnc); void pFEppuippuu(x64emu_t *emu, uintptr_t fnc); void pFEpppppiiV(x64emu_t *emu, uintptr_t fnc); void pFEpppppppi(x64emu_t *emu, uintptr_t fnc); void pFEpppppppp(x64emu_t *emu, uintptr_t fnc); void pFpiiiiuuuu(x64emu_t *emu, uintptr_t fnc); void pFpCuWCCuuu(x64emu_t *emu, uintptr_t fnc); void pFpuuwwWWww(x64emu_t *emu, uintptr_t fnc); void pFpupuuuuup(x64emu_t *emu, uintptr_t fnc); void pFppiiiiiip(x64emu_t *emu, uintptr_t fnc); void pFppiiuuuLL(x64emu_t *emu, uintptr_t fnc); void pFppipppppp(x64emu_t *emu, uintptr_t fnc); void pFpppiiiiii(x64emu_t *emu, uintptr_t fnc); void pFpppiipppp(x64emu_t *emu, uintptr_t fnc); void pFpppppiipp(x64emu_t *emu, uintptr_t fnc); void vFEiippppppp(x64emu_t *emu, uintptr_t fnc); void vFEpippppppp(x64emu_t *emu, uintptr_t fnc); void vFEpppiipppp(x64emu_t *emu, uintptr_t fnc); void vFiiiiiiiiiu(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiill(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuiiiillllp(x64emu_t *emu, uintptr_t fnc); void vFuiuiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuipulipiuf(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiuip(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiiiip(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuiii(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuffiiffiip(x64emu_t *emu, uintptr_t fnc); void vFuddiiddiip(x64emu_t *emu, uintptr_t fnc); void vFffffffffff(x64emu_t *emu, uintptr_t fnc); void vFpipippppip(x64emu_t *emu, uintptr_t fnc); void vFppiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppiiiiipip(x64emu_t *emu, uintptr_t fnc); void vFppiipppiip(x64emu_t *emu, uintptr_t fnc); void vFppiippppii(x64emu_t *emu, uintptr_t fnc); void vFppipppiiii(x64emu_t *emu, uintptr_t fnc); void vFppuuuuiiuu(x64emu_t *emu, uintptr_t fnc); void vFppdddddddd(x64emu_t *emu, uintptr_t fnc); void vFpppppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpiiiiippp(x64emu_t *emu, uintptr_t fnc); void iFEpupppLppL(x64emu_t *emu, uintptr_t fnc); void iFEppppppipp(x64emu_t *emu, uintptr_t fnc); void iFEppppppppp(x64emu_t *emu, uintptr_t fnc); void iFiiiiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiipiiipip(x64emu_t *emu, uintptr_t fnc); void iFpuupiuiipp(x64emu_t *emu, uintptr_t fnc); void iFpddpippppp(x64emu_t *emu, uintptr_t fnc); void iFppuuiiiiii(x64emu_t *emu, uintptr_t fnc); void iFppuuiiuupi(x64emu_t *emu, uintptr_t fnc); void iFpppiiipipi(x64emu_t *emu, uintptr_t fnc); void iFpppLLipppp(x64emu_t *emu, uintptr_t fnc); void iFppppiiuuii(x64emu_t *emu, uintptr_t fnc); void iFpppppppipi(x64emu_t *emu, uintptr_t fnc); void uFpppppppppp(x64emu_t *emu, uintptr_t fnc); void pFEiippppppp(x64emu_t *emu, uintptr_t fnc); void pFEpiiiiiipp(x64emu_t *emu, uintptr_t fnc); void pFEpippppppp(x64emu_t *emu, uintptr_t fnc); void pFpCuWCCuuCW(x64emu_t *emu, uintptr_t fnc); void pFpuwwWWuCuu(x64emu_t *emu, uintptr_t fnc); void pFpuuuwwwwWW(x64emu_t *emu, uintptr_t fnc); void pFpuuuWWWCCi(x64emu_t *emu, uintptr_t fnc); void pFplllllllll(x64emu_t *emu, uintptr_t fnc); void pFppuiipuuii(x64emu_t *emu, uintptr_t fnc); void pFpppppppppp(x64emu_t *emu, uintptr_t fnc); void vFEpiiiupupup(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiiiip(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiiuip(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuiiiillliip(x64emu_t *emu, uintptr_t fnc); void vFuiiiilllilp(x64emu_t *emu, uintptr_t fnc); void vFuiuiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuiuiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuuupupppppp(x64emu_t *emu, uintptr_t fnc); void vFuuffiiffiip(x64emu_t *emu, uintptr_t fnc); void vFuufffffffff(x64emu_t *emu, uintptr_t fnc); void vFuuddiiddiip(x64emu_t *emu, uintptr_t fnc); void vFuffffffffff(x64emu_t *emu, uintptr_t fnc); void vFpipipiipiii(x64emu_t *emu, uintptr_t fnc); void vFpipppiiiipi(x64emu_t *emu, uintptr_t fnc); void vFpupiiupupup(x64emu_t *emu, uintptr_t fnc); void vFppiiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppiiiiipiii(x64emu_t *emu, uintptr_t fnc); void vFppiiiiddddi(x64emu_t *emu, uintptr_t fnc); void vFppiipppiiii(x64emu_t *emu, uintptr_t fnc); void vFppipppiiiii(x64emu_t *emu, uintptr_t fnc); void vFppipppuiiii(x64emu_t *emu, uintptr_t fnc); void vFppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpppipppppp(x64emu_t *emu, uintptr_t fnc); void iFEppppiiiiuu(x64emu_t *emu, uintptr_t fnc); void iFiiiiiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFpiippiiipip(x64emu_t *emu, uintptr_t fnc); void iFppippipppip(x64emu_t *emu, uintptr_t fnc); void iFppppiiuuiiL(x64emu_t *emu, uintptr_t fnc); void uFEpLiupppLuV(x64emu_t *emu, uintptr_t fnc); void uFEpLippppLup(x64emu_t *emu, uintptr_t fnc); void uFEpLippppLuA(x64emu_t *emu, uintptr_t fnc); void uFEppppppippp(x64emu_t *emu, uintptr_t fnc); void uFppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFEpipppppppi(x64emu_t *emu, uintptr_t fnc); void pFEppiiLpppip(x64emu_t *emu, uintptr_t fnc); void pFEppuiipuuii(x64emu_t *emu, uintptr_t fnc); void pFpppppppiipp(x64emu_t *emu, uintptr_t fnc); void pFppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFuiiiillliilp(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiiiiui(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiiiuip(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFffffffffffff(x64emu_t *emu, uintptr_t fnc); void vFpipppiiiipii(x64emu_t *emu, uintptr_t fnc); void vFpippppiiiipi(x64emu_t *emu, uintptr_t fnc); void vFppiiiiddddii(x64emu_t *emu, uintptr_t fnc); void vFppiiuuuiupup(x64emu_t *emu, uintptr_t fnc); void vFppiipppiiiii(x64emu_t *emu, uintptr_t fnc); void vFpppiiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFpppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFEpppippppppp(x64emu_t *emu, uintptr_t fnc); void iFEppppiiiiuui(x64emu_t *emu, uintptr_t fnc); void iFpipllipppppp(x64emu_t *emu, uintptr_t fnc); void iFpipppppppppp(x64emu_t *emu, uintptr_t fnc); void iFpppllipppppp(x64emu_t *emu, uintptr_t fnc); void iFpppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFEppiiuuuipii(x64emu_t *emu, uintptr_t fnc); void pFEppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFWWiCCCCiipup(x64emu_t *emu, uintptr_t fnc); void pFpCuuWWwwCCup(x64emu_t *emu, uintptr_t fnc); void pFpuuuWWWWWWWW(x64emu_t *emu, uintptr_t fnc); void pFppiiuuuiupLp(x64emu_t *emu, uintptr_t fnc); void pFpppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFEpppppppiippp(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiiiiuup(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuuuuuuu(x64emu_t *emu, uintptr_t fnc); void vFuffffffffffff(x64emu_t *emu, uintptr_t fnc); void vFpipppiiiiiiuu(x64emu_t *emu, uintptr_t fnc); void vFpippppppppppp(x64emu_t *emu, uintptr_t fnc); void vFppiiiiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppiipppiiiiii(x64emu_t *emu, uintptr_t fnc); void vFppppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFddddpppddpppp(x64emu_t *emu, uintptr_t fnc); void iFpippuuuiipppp(x64emu_t *emu, uintptr_t fnc); void iFpupiiiipppppp(x64emu_t *emu, uintptr_t fnc); void uFppppuuupppppp(x64emu_t *emu, uintptr_t fnc); void pFpCuuwwWWWWuup(x64emu_t *emu, uintptr_t fnc); void pFpuupppwwwwWWC(x64emu_t *emu, uintptr_t fnc); void pFppppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFuffiiffiiffiip(x64emu_t *emu, uintptr_t fnc); void vFuddiiddiiddiip(x64emu_t *emu, uintptr_t fnc); void vFppiipppiiiiiii(x64emu_t *emu, uintptr_t fnc); void iFpipppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFuuiiiiuuiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFfffffffffffffff(x64emu_t *emu, uintptr_t fnc); void vFpppippppppppppp(x64emu_t *emu, uintptr_t fnc); void vFppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFpuiippppppppppp(x64emu_t *emu, uintptr_t fnc); void pFppipppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFpppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFpppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFpuuWWWWWWwwCCCuu(x64emu_t *emu, uintptr_t fnc); void pFppipipipipipipip(x64emu_t *emu, uintptr_t fnc); void vFppiiiiddddiiiiiuu(x64emu_t *emu, uintptr_t fnc); void pFppippipipipipipip(x64emu_t *emu, uintptr_t fnc); void vFppuiiiiipuiiiiiiii(x64emu_t *emu, uintptr_t fnc); void vFpppipppppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFpppppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void LFpppppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFippppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void vFpiiiiiiiiiiiiiiiiii(x64emu_t *emu, uintptr_t fnc); void pFiiiippppppppppppppp(x64emu_t *emu, uintptr_t fnc); void pFpippppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFpppppppppppppppppppppp(x64emu_t *emu, uintptr_t fnc); void iFpppppppppppppppppppppppppppppppppp(x64emu_t *emu, uintptr_t fnc); #if defined(HAVE_LD80BITS) void DFD(x64emu_t *emu, uintptr_t fnc); void vFppippDDC(x64emu_t *emu, uintptr_t fnc); #endif #if !defined(HAVE_LD80BITS) void KFK(x64emu_t *emu, uintptr_t fnc); void KFKK(x64emu_t *emu, uintptr_t fnc); void KFKp(x64emu_t *emu, uintptr_t fnc); void vFppippKKC(x64emu_t *emu, uintptr_t fnc); #endif #if defined(NOALIGN) void iFipiip(x64emu_t *emu, uintptr_t fnc); #endif #if !defined(NOALIGN) void iFELp(x64emu_t *emu, uintptr_t fnc); void iFEppu(x64emu_t *emu, uintptr_t fnc); void iFEiiip(x64emu_t *emu, uintptr_t fnc); void iFEipii(x64emu_t *emu, uintptr_t fnc); void iFEipiip(x64emu_t *emu, uintptr_t fnc); #endif void vFEv(x64emu_t *emu, uintptr_t fnc); void iFEv(x64emu_t *emu, uintptr_t fnc); void lFEv(x64emu_t *emu, uintptr_t fnc); void pFEv(x64emu_t *emu, uintptr_t fnc); void iFEvpp(x64emu_t *emu, uintptr_t fnc); void pFEppv(x64emu_t *emu, uintptr_t fnc); void iFEpvpp(x64emu_t *emu, uintptr_t fnc); void iFEpvvppp(x64emu_t *emu, uintptr_t fnc); void iFEpLvvpp(x64emu_t *emu, uintptr_t fnc); void iFEpuvvppp(x64emu_t *emu, uintptr_t fnc); int isSimpleWrapper(wrapper_t fun); #endif // __WRAPPER_H_
43.813725
81
0.771995
30a8a561f41e8234ed51b3b4fe138779c08a4943
15,064
h
C
misc/objects/gear.h
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
2
2020-01-04T23:44:10.000Z
2020-07-12T17:10:09.000Z
misc/objects/gear.h
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
null
null
null
misc/objects/gear.h
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
1
2022-03-16T05:43:33.000Z
2022-03-16T05:43:33.000Z
#ifndef __obj_gear #define __obj_gear #define render_gear { \ glInterleavedArrays (GL_N3F_V3F, 0, gearInterleavedQuads); \ glDrawArrays (GL_QUADS, 0, gearNumQuads*4); \ glInterleavedArrays (GL_N3F_V3F, 0, gearInterleavedQuadStrips); \ for (int i = 0; i < gearNumQuadStrips; i++) { \ glDrawArrays (GL_QUAD_STRIP, gearQuadStripIndices[i]/6, \ (gearQuadStripIndices[i+1] - gearQuadStripIndices[i])/6); \ } \ } static int gearNumQuads = 48; static float gearInterleavedQuads[1152] = { 0.981, 0.195, -0.000, 0.375, 0.155, 0.087, 0.981, 0.195, -0.000, 0.406, -0.000, 0.087, 0.981, 0.195, -0.000, 0.406, -0.000, -0.087, 0.981, 0.195, -0.000, 0.375, 0.155, -0.087, 0.556, 0.831, -0.000, 0.155, 0.375, 0.087, 0.556, 0.831, -0.000, 0.287, 0.287, 0.087, 0.556, 0.831, -0.000, 0.287, 0.287, -0.087, 0.556, 0.831, -0.000, 0.155, 0.375, -0.087, -0.195, 0.981, -0.000,-0.155, 0.375, 0.087, -0.195, 0.981, -0.000, 0.000, 0.406, 0.087, -0.195, 0.981, -0.000, 0.000, 0.406, -0.087, -0.195, 0.981, -0.000,-0.155, 0.375, -0.087, -0.831, 0.556, -0.000,-0.375, 0.155, 0.087, -0.831, 0.556, -0.000,-0.287, 0.287, 0.087, -0.831, 0.556, -0.000,-0.287, 0.287, -0.087, -0.831, 0.556, -0.000,-0.375, 0.155, -0.087, -0.981, -0.195, 0.000,-0.375, -0.155, 0.087, -0.981, -0.195, 0.000,-0.406, 0.000, 0.087, -0.981, -0.195, 0.000,-0.406, 0.000, -0.087, -0.981, -0.195, 0.000,-0.375, -0.155, -0.087, -0.556, -0.831, 0.000,-0.155, -0.375, 0.087, -0.556, -0.831, 0.000,-0.287, -0.287, 0.087, -0.556, -0.831, 0.000,-0.287, -0.287, -0.087, -0.556, -0.831, 0.000,-0.155, -0.375, -0.087, 0.195, -0.981, 0.000, 0.155, -0.375, 0.087, 0.195, -0.981, 0.000,-0.000, -0.406, 0.087, 0.195, -0.981, 0.000,-0.000, -0.406, -0.087, 0.195, -0.981, 0.000, 0.155, -0.375, -0.087, 0.831, -0.556, 0.000, 0.375, -0.155, 0.087, 0.831, -0.556, 0.000, 0.287, -0.287, 0.087, 0.831, -0.556, 0.000, 0.287, -0.287, -0.087, 0.831, -0.556, 0.000, 0.375, -0.155, -0.087, -0.021, -1.000, 0.000, 0.534, -0.159, -0.056, -0.021, -1.000, 0.000, 0.534, -0.159, 0.056, -0.021, -1.000, 0.000, 0.375, -0.155, 0.087, -0.021, -1.000, 0.000, 0.375, -0.155, -0.087, 0.187, -0.037, -0.982, 0.554, -0.058, -0.056, 0.187, -0.037, -0.982, 0.534, -0.159, -0.056, 0.143, -0.046, -0.989, 0.375, -0.155, -0.087, 0.149, -0.012, -0.989, 0.406, -0.000, -0.087, 0.363, 0.932, -0.000, 0.554, -0.058, 0.056, 0.363, 0.932, -0.000, 0.554, -0.058, -0.056, 0.363, 0.932, -0.000, 0.406, -0.000, -0.087, 0.363, 0.932, -0.000, 0.406, -0.000, 0.087, 0.981, -0.195, 0.000, 0.554, -0.058, 0.056, 0.981, -0.195, 0.000, 0.534, -0.159, 0.056, 0.981, -0.195, 0.000, 0.534, -0.159, -0.056, 0.981, -0.195, 0.000, 0.554, -0.058, -0.056, 0.187, -0.037, 0.982, 0.534, -0.159, 0.056, 0.187, -0.037, 0.982, 0.554, -0.058, 0.056, 0.149, -0.012, 0.989, 0.406, -0.000, 0.087, 0.143, -0.046, 0.989, 0.375, -0.155, 0.087, -0.722, -0.692, 0.000, 0.266, -0.490, -0.056, -0.722, -0.692, 0.000, 0.266, -0.490, 0.056, -0.722, -0.692, 0.000, 0.155, -0.375, 0.087, -0.722, -0.692, 0.000, 0.155, -0.375, -0.087, 0.106, -0.159, -0.982, 0.351, -0.433, -0.056, 0.106, -0.159, -0.982, 0.266, -0.490, -0.056, 0.069, -0.133, -0.989, 0.155, -0.375, -0.087, 0.097, -0.114, -0.989, 0.287, -0.287, -0.087, 0.916, 0.402, -0.000, 0.351, -0.433, 0.056, 0.916, 0.402, -0.000, 0.351, -0.433, -0.056, 0.916, 0.402, -0.000, 0.287, -0.287, -0.087, 0.916, 0.402, -0.000, 0.287, -0.287, 0.087, 0.556, -0.831, 0.000, 0.351, -0.433, 0.056, 0.556, -0.831, 0.000, 0.266, -0.490, 0.056, 0.556, -0.831, 0.000, 0.266, -0.490, -0.056, 0.556, -0.831, 0.000, 0.351, -0.433, -0.056, 0.106, -0.159, 0.982, 0.266, -0.490, 0.056, 0.106, -0.159, 0.982, 0.351, -0.433, 0.056, 0.097, -0.114, 0.989, 0.287, -0.287, 0.087, 0.069, -0.133, 0.989, 0.155, -0.375, 0.087, -1.000, 0.021, -0.000,-0.159, -0.534, -0.056, -1.000, 0.021, -0.000,-0.159, -0.534, 0.056, -1.000, 0.021, -0.000,-0.155, -0.375, 0.087, -1.000, 0.021, -0.000,-0.155, -0.375, -0.087, -0.037, -0.187, -0.982,-0.058, -0.554, -0.056, -0.037, -0.187, -0.982,-0.159, -0.534, -0.056, -0.046, -0.143, -0.989,-0.155, -0.375, -0.087, -0.012, -0.149, -0.989,-0.000, -0.406, -0.087, 0.932, -0.363, 0.000,-0.058, -0.554, 0.056, 0.932, -0.363, 0.000,-0.058, -0.554, -0.056, 0.932, -0.363, 0.000,-0.000, -0.406, -0.087, 0.932, -0.363, 0.000,-0.000, -0.406, 0.087, -0.195, -0.981, 0.000,-0.058, -0.554, 0.056, -0.195, -0.981, 0.000,-0.159, -0.534, 0.056, -0.195, -0.981, 0.000,-0.159, -0.534, -0.056, -0.195, -0.981, 0.000,-0.058, -0.554, -0.056, -0.037, -0.187, 0.982,-0.159, -0.534, 0.056, -0.037, -0.187, 0.982,-0.058, -0.554, 0.056, -0.012, -0.149, 0.989,-0.000, -0.406, 0.087, -0.046, -0.143, 0.989,-0.155, -0.375, 0.087, -0.692, 0.722, -0.000,-0.490, -0.266, -0.056, -0.692, 0.722, -0.000,-0.490, -0.266, 0.056, -0.692, 0.722, -0.000,-0.375, -0.155, 0.087, -0.692, 0.722, -0.000,-0.375, -0.155, -0.087, -0.159, -0.106, -0.982,-0.433, -0.351, -0.056, -0.159, -0.106, -0.982,-0.490, -0.266, -0.056, -0.133, -0.069, -0.989,-0.375, -0.155, -0.087, -0.114, -0.097, -0.989,-0.287, -0.287, -0.087, 0.402, -0.916, 0.000,-0.433, -0.351, 0.056, 0.402, -0.916, 0.000,-0.433, -0.351, -0.056, 0.402, -0.916, 0.000,-0.287, -0.287, -0.087, 0.402, -0.916, 0.000,-0.287, -0.287, 0.087, -0.831, -0.556, 0.000,-0.433, -0.351, 0.056, -0.831, -0.556, 0.000,-0.490, -0.266, 0.056, -0.831, -0.556, 0.000,-0.490, -0.266, -0.056, -0.831, -0.556, 0.000,-0.433, -0.351, -0.056, -0.159, -0.106, 0.982,-0.490, -0.266, 0.056, -0.159, -0.106, 0.982,-0.433, -0.351, 0.056, -0.114, -0.097, 0.989,-0.287, -0.287, 0.087, -0.133, -0.069, 0.989,-0.375, -0.155, 0.087, 0.021, 1.000, -0.000,-0.534, 0.159, -0.056, 0.021, 1.000, -0.000,-0.534, 0.159, 0.056, 0.021, 1.000, -0.000,-0.375, 0.155, 0.087, 0.021, 1.000, -0.000,-0.375, 0.155, -0.087, -0.187, 0.037, -0.982,-0.554, 0.058, -0.056, -0.187, 0.037, -0.982,-0.534, 0.159, -0.056, -0.143, 0.046, -0.989,-0.375, 0.155, -0.087, -0.149, 0.012, -0.989,-0.406, 0.000, -0.087, -0.363, -0.932, 0.000,-0.554, 0.058, 0.056, -0.363, -0.932, 0.000,-0.554, 0.058, -0.056, -0.363, -0.932, 0.000,-0.406, 0.000, -0.087, -0.363, -0.932, 0.000,-0.406, 0.000, 0.087, -0.981, 0.195, -0.000,-0.554, 0.058, 0.056, -0.981, 0.195, -0.000,-0.534, 0.159, 0.056, -0.981, 0.195, -0.000,-0.534, 0.159, -0.056, -0.981, 0.195, -0.000,-0.554, 0.058, -0.056, -0.187, 0.037, 0.982,-0.534, 0.159, 0.056, -0.187, 0.037, 0.982,-0.554, 0.058, 0.056, -0.149, 0.012, 0.989,-0.406, 0.000, 0.087, -0.143, 0.046, 0.989,-0.375, 0.155, 0.087, 0.722, 0.692, -0.000,-0.266, 0.490, -0.056, 0.722, 0.692, -0.000,-0.266, 0.490, 0.056, 0.722, 0.692, -0.000,-0.155, 0.375, 0.087, 0.722, 0.692, -0.000,-0.155, 0.375, -0.087, -0.106, 0.159, -0.982,-0.351, 0.433, -0.056, -0.106, 0.159, -0.982,-0.266, 0.490, -0.056, -0.069, 0.133, -0.989,-0.155, 0.375, -0.087, -0.097, 0.114, -0.989,-0.287, 0.287, -0.087, -0.916, -0.402, 0.000,-0.351, 0.433, 0.056, -0.916, -0.402, 0.000,-0.351, 0.433, -0.056, -0.916, -0.402, 0.000,-0.287, 0.287, -0.087, -0.916, -0.402, 0.000,-0.287, 0.287, 0.087, -0.556, 0.831, -0.000,-0.351, 0.433, 0.056, -0.556, 0.831, -0.000,-0.266, 0.490, 0.056, -0.556, 0.831, -0.000,-0.266, 0.490, -0.056, -0.556, 0.831, -0.000,-0.351, 0.433, -0.056, -0.106, 0.159, 0.982,-0.266, 0.490, 0.056, -0.106, 0.159, 0.982,-0.351, 0.433, 0.056, -0.097, 0.114, 0.989,-0.287, 0.287, 0.087, -0.069, 0.133, 0.989,-0.155, 0.375, 0.087, 1.000, -0.021, 0.000, 0.159, 0.534, -0.056, 1.000, -0.021, 0.000, 0.159, 0.534, 0.056, 1.000, -0.021, 0.000, 0.155, 0.375, 0.087, 1.000, -0.021, 0.000, 0.155, 0.375, -0.087, 0.037, 0.187, -0.982, 0.058, 0.554, -0.056, 0.037, 0.187, -0.982, 0.159, 0.534, -0.056, 0.046, 0.143, -0.989, 0.155, 0.375, -0.087, 0.012, 0.149, -0.989, 0.000, 0.406, -0.087, -0.932, 0.363, -0.000, 0.058, 0.554, 0.056, -0.932, 0.363, -0.000, 0.058, 0.554, -0.056, -0.932, 0.363, -0.000, 0.000, 0.406, -0.087, -0.932, 0.363, -0.000, 0.000, 0.406, 0.087, 0.195, 0.981, -0.000, 0.058, 0.554, 0.056, 0.195, 0.981, -0.000, 0.159, 0.534, 0.056, 0.195, 0.981, -0.000, 0.159, 0.534, -0.056, 0.195, 0.981, -0.000, 0.058, 0.554, -0.056, 0.037, 0.187, 0.982, 0.159, 0.534, 0.056, 0.037, 0.187, 0.982, 0.058, 0.554, 0.056, 0.012, 0.149, 0.989, 0.000, 0.406, 0.087, 0.046, 0.143, 0.989, 0.155, 0.375, 0.087, 0.692, -0.722, 0.000, 0.490, 0.266, -0.056, 0.692, -0.722, 0.000, 0.490, 0.266, 0.056, 0.692, -0.722, 0.000, 0.375, 0.155, 0.087, 0.692, -0.722, 0.000, 0.375, 0.155, -0.087, 0.159, 0.106, -0.982, 0.433, 0.351, -0.056, 0.159, 0.106, -0.982, 0.490, 0.266, -0.056, 0.133, 0.069, -0.989, 0.375, 0.155, -0.087, 0.114, 0.097, -0.989, 0.287, 0.287, -0.087, -0.402, 0.916, -0.000, 0.433, 0.351, 0.056, -0.402, 0.916, -0.000, 0.433, 0.351, -0.056, -0.402, 0.916, -0.000, 0.287, 0.287, -0.087, -0.402, 0.916, -0.000, 0.287, 0.287, 0.087, 0.831, 0.556, -0.000, 0.433, 0.351, 0.056, 0.831, 0.556, -0.000, 0.490, 0.266, 0.056, 0.831, 0.556, -0.000, 0.490, 0.266, -0.056, 0.831, 0.556, -0.000, 0.433, 0.351, -0.056, 0.159, 0.106, 0.982, 0.490, 0.266, 0.056, 0.159, 0.106, 0.982, 0.433, 0.351, 0.056, 0.114, 0.097, 0.989, 0.287, 0.287, 0.087, 0.133, 0.069, 0.989, 0.375, 0.155, 0.087, }; static int gearNumQuadStrips = 3; static int gearQuadStripIndices[4] = { 0, 216, 432, 648 }; static float gearInterleavedQuadStrips[648] = { 0.120, -0.050, 0.991, 0.208, -0.086, 0.111, 0.143, -0.046, 0.989, 0.375, -0.155, 0.087, 0.130, 0.000, 0.991, 0.226, 0.000, 0.111, 0.149, -0.012, 0.989, 0.406, -0.000, 0.087, 0.120, 0.050, 0.991, 0.208, 0.086, 0.111, 0.133, 0.069, 0.989, 0.375, 0.155, 0.087, 0.092, 0.092, 0.991, 0.160, 0.160, 0.111, 0.114, 0.097, 0.989, 0.287, 0.287, 0.087, 0.050, 0.120, 0.991, 0.086, 0.208, 0.111, 0.046, 0.143, 0.989, 0.155, 0.375, 0.087, -0.000, 0.130, 0.991, -0.000, 0.226, 0.111, 0.012, 0.149, 0.989, 0.000, 0.406, 0.087, -0.050, 0.120, 0.991, -0.086, 0.208, 0.111, -0.069, 0.133, 0.989, -0.155, 0.375, 0.087, -0.092, 0.092, 0.991, -0.160, 0.160, 0.111, -0.097, 0.114, 0.989, -0.287, 0.287, 0.087, -0.120, 0.050, 0.991, -0.208, 0.086, 0.111, -0.143, 0.046, 0.989, -0.375, 0.155, 0.087, -0.130, 0.000, 0.991, -0.226, 0.000, 0.111, -0.149, 0.012, 0.989, -0.406, 0.000, 0.087, -0.120, -0.050, 0.991, -0.208, -0.086, 0.111, -0.133, -0.069, 0.989, -0.375, -0.155, 0.087, -0.092, -0.092, 0.991, -0.160, -0.160, 0.111, -0.114, -0.097, 0.989, -0.287, -0.287, 0.087, -0.050, -0.120, 0.991, -0.086, -0.208, 0.111, -0.046, -0.143, 0.989, -0.155, -0.375, 0.087, 0.000, -0.130, 0.991, 0.000, -0.226, 0.111, -0.012, -0.149, 0.989, -0.000, -0.406, 0.087, 0.050, -0.120, 0.991, 0.086, -0.208, 0.111, 0.069, -0.133, 0.989, 0.155, -0.375, 0.087, 0.092, -0.092, 0.991, 0.160, -0.160, 0.111, 0.097, -0.114, 0.989, 0.287, -0.287, 0.087, 0.120, -0.050, 0.991, 0.208, -0.086, 0.111, 0.143, -0.046, 0.989, 0.375, -0.155, 0.087, 0.130, 0.000, 0.991, 0.226, 0.000, 0.111, 0.149, -0.012, 0.989, 0.406, -0.000, 0.087, -1.000, -0.000, -0.000, 0.226, -0.000, -0.111, -1.000, -0.000, -0.000, 0.226, 0.000, 0.111, -0.924, -0.383, 0.000, 0.208, 0.086, -0.111, -0.924, -0.383, 0.000, 0.208, 0.086, 0.111, -0.707, -0.707, 0.000, 0.160, 0.160, -0.111, -0.707, -0.707, 0.000, 0.160, 0.160, 0.111, -0.383, -0.924, 0.000, 0.086, 0.208, -0.111, -0.383, -0.924, 0.000, 0.086, 0.208, 0.111, 0.000, -1.000, 0.000, -0.000, 0.226, -0.111, 0.000, -1.000, 0.000, -0.000, 0.226, 0.111, 0.383, -0.924, 0.000, -0.086, 0.208, -0.111, 0.383, -0.924, 0.000, -0.086, 0.208, 0.111, 0.707, -0.707, 0.000, -0.160, 0.160, -0.111, 0.707, -0.707, 0.000, -0.160, 0.160, 0.111, 0.924, -0.383, 0.000, -0.208, 0.086, -0.111, 0.924, -0.383, 0.000, -0.208, 0.086, 0.111, 1.000, 0.000, 0.000, -0.226, -0.000, -0.111, 1.000, 0.000, 0.000, -0.226, 0.000, 0.111, 0.924, 0.383, -0.000, -0.208, -0.086, -0.111, 0.924, 0.383, -0.000, -0.208, -0.086, 0.111, 0.707, 0.707, -0.000, -0.160, -0.160, -0.111, 0.707, 0.707, -0.000, -0.160, -0.160, 0.111, 0.383, 0.924, -0.000, -0.086, -0.208, -0.111, 0.383, 0.924, -0.000, -0.086, -0.208, 0.111, -0.000, 1.000, -0.000, 0.000, -0.226, -0.111, -0.000, 1.000, -0.000, 0.000, -0.226, 0.111, -0.383, 0.924, -0.000, 0.086, -0.208, -0.111, -0.383, 0.924, -0.000, 0.086, -0.208, 0.111, -0.707, 0.707, -0.000, 0.160, -0.160, -0.111, -0.707, 0.707, -0.000, 0.160, -0.160, 0.111, -0.924, 0.383, -0.000, 0.208, -0.086, -0.111, -0.924, 0.383, -0.000, 0.208, -0.086, 0.111, -1.000, -0.000, -0.000, 0.226, -0.000, -0.111, -1.000, -0.000, -0.000, 0.226, 0.000, 0.111, -0.924, -0.383, 0.000, 0.208, 0.086, -0.111, -0.924, -0.383, 0.000, 0.208, 0.086, 0.111, 0.149, -0.012, -0.989, 0.406, -0.000, -0.087, 0.130, -0.000, -0.991, 0.226, -0.000, -0.111, 0.133, 0.069, -0.989, 0.375, 0.155, -0.087, 0.120, 0.050, -0.991, 0.208, 0.086, -0.111, 0.114, 0.097, -0.989, 0.287, 0.287, -0.087, 0.092, 0.092, -0.991, 0.160, 0.160, -0.111, 0.046, 0.143, -0.989, 0.155, 0.375, -0.087, 0.050, 0.120, -0.991, 0.086, 0.208, -0.111, 0.012, 0.149, -0.989, 0.000, 0.406, -0.087, -0.000, 0.130, -0.991, -0.000, 0.226, -0.111, -0.069, 0.133, -0.989, -0.155, 0.375, -0.087, -0.050, 0.120, -0.991, -0.086, 0.208, -0.111, -0.097, 0.114, -0.989, -0.287, 0.287, -0.087, -0.092, 0.092, -0.991, -0.160, 0.160, -0.111, -0.143, 0.046, -0.989, -0.375, 0.155, -0.087, -0.120, 0.050, -0.991, -0.208, 0.086, -0.111, -0.149, 0.012, -0.989, -0.406, 0.000, -0.087, -0.130, -0.000, -0.991, -0.226, -0.000, -0.111, -0.133, -0.069, -0.989, -0.375, -0.155, -0.087, -0.120, -0.050, -0.991, -0.208, -0.086, -0.111, -0.114, -0.097, -0.989, -0.287, -0.287, -0.087, -0.092, -0.092, -0.991, -0.160, -0.160, -0.111, -0.046, -0.143, -0.989, -0.155, -0.375, -0.087, -0.050, -0.120, -0.991, -0.086, -0.208, -0.111, -0.012, -0.149, -0.989, -0.000, -0.406, -0.087, 0.000, -0.130, -0.991, 0.000, -0.226, -0.111, 0.069, -0.133, -0.989, 0.155, -0.375, -0.087, 0.050, -0.120, -0.991, 0.086, -0.208, -0.111, 0.097, -0.114, -0.989, 0.287, -0.287, -0.087, 0.092, -0.092, -0.991, 0.160, -0.160, -0.111, 0.143, -0.046, -0.989, 0.375, -0.155, -0.087, 0.120, -0.050, -0.991, 0.208, -0.086, -0.111, 0.149, -0.012, -0.989, 0.406, -0.000, -0.087, 0.130, -0.000, -0.991, 0.226, -0.000, -0.111, 0.133, 0.069, -0.989, 0.375, 0.155, -0.087, 0.120, 0.050, -0.991, 0.208, 0.086, -0.111, }; #endif // __obj_gear
40.713514
95
0.510157
aa7d13d91963f7ba1f08b76f9a74a82db36ca2f1
13,111
c
C
tools/testing/selftests/core/close_range_test.c
rajkinkhabwala/linux
bbb30aa9e76b23422327d886527014449b79099a
[ "Linux-OpenIB" ]
null
null
null
tools/testing/selftests/core/close_range_test.c
rajkinkhabwala/linux
bbb30aa9e76b23422327d886527014449b79099a
[ "Linux-OpenIB" ]
1
2021-01-27T01:29:47.000Z
2021-01-27T01:29:47.000Z
tools/testing/selftests/core/close_range_test.c
SunOS-Linux/kernel
2557890ec8bf1bcba83dc337f91c0854e7184fcc
[ "MIT" ]
null
null
null
// SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <linux/kernel.h> #include <limits.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syscall.h> #include <unistd.h> #include <sys/resource.h> #include "../kselftest_harness.h" #include "../clone3/clone3_selftests.h" #ifndef __NR_close_range #if defined __alpha__ #define __NR_close_range 546 #elif defined _MIPS_SIM #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ #define __NR_close_range (436 + 4000) #endif #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ #define __NR_close_range (436 + 6000) #endif #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ #define __NR_close_range (436 + 5000) #endif #elif defined __ia64__ #define __NR_close_range (436 + 1024) #else #define __NR_close_range 436 #endif #endif #ifndef CLOSE_RANGE_UNSHARE #define CLOSE_RANGE_UNSHARE (1U << 1) #endif #ifndef CLOSE_RANGE_CLOEXEC #define CLOSE_RANGE_CLOEXEC (1U << 2) #endif static inline int sys_close_range(unsigned int fd, unsigned int max_fd, unsigned int flags) { return syscall(__NR_close_range, fd, max_fd, flags); } #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif TEST(core_close_range) { int i, ret; int open_fds[101]; for (i = 0; i < ARRAY_SIZE(open_fds); i++) { int fd; fd = open("/dev/null", O_RDONLY | O_CLOEXEC); ASSERT_GE(fd, 0) { if (errno == ENOENT) SKIP(return, "Skipping test since /dev/null does not exist"); } open_fds[i] = fd; } EXPECT_EQ(-1, sys_close_range(open_fds[0], open_fds[100], -1)) { if (errno == ENOSYS) SKIP(return, "close_range() syscall not supported"); } EXPECT_EQ(0, sys_close_range(open_fds[0], open_fds[50], 0)); for (i = 0; i <= 50; i++) EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); for (i = 51; i <= 100; i++) EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); /* create a couple of gaps */ close(57); close(78); close(81); close(82); close(84); close(90); EXPECT_EQ(0, sys_close_range(open_fds[51], open_fds[92], 0)); for (i = 51; i <= 92; i++) EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); for (i = 93; i <= 100; i++) EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); /* test that the kernel caps and still closes all fds */ EXPECT_EQ(0, sys_close_range(open_fds[93], open_fds[99], 0)); for (i = 93; i <= 99; i++) EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); EXPECT_EQ(0, sys_close_range(open_fds[100], open_fds[100], 0)); EXPECT_EQ(-1, fcntl(open_fds[100], F_GETFL)); } TEST(close_range_unshare) { int i, ret, status; pid_t pid; int open_fds[101]; struct __clone_args args = { .flags = CLONE_FILES, .exit_signal = SIGCHLD, }; for (i = 0; i < ARRAY_SIZE(open_fds); i++) { int fd; fd = open("/dev/null", O_RDONLY | O_CLOEXEC); ASSERT_GE(fd, 0) { if (errno == ENOENT) SKIP(return, "Skipping test since /dev/null does not exist"); } open_fds[i] = fd; } pid = sys_clone3(&args, sizeof(args)); ASSERT_GE(pid, 0); if (pid == 0) { ret = sys_close_range(open_fds[0], open_fds[50], CLOSE_RANGE_UNSHARE); if (ret) exit(EXIT_FAILURE); for (i = 0; i <= 50; i++) if (fcntl(open_fds[i], F_GETFL) != -1) exit(EXIT_FAILURE); for (i = 51; i <= 100; i++) if (fcntl(open_fds[i], F_GETFL) == -1) exit(EXIT_FAILURE); /* create a couple of gaps */ close(57); close(78); close(81); close(82); close(84); close(90); ret = sys_close_range(open_fds[51], open_fds[92], CLOSE_RANGE_UNSHARE); if (ret) exit(EXIT_FAILURE); for (i = 51; i <= 92; i++) if (fcntl(open_fds[i], F_GETFL) != -1) exit(EXIT_FAILURE); for (i = 93; i <= 100; i++) if (fcntl(open_fds[i], F_GETFL) == -1) exit(EXIT_FAILURE); /* test that the kernel caps and still closes all fds */ ret = sys_close_range(open_fds[93], open_fds[99], CLOSE_RANGE_UNSHARE); if (ret) exit(EXIT_FAILURE); for (i = 93; i <= 99; i++) if (fcntl(open_fds[i], F_GETFL) != -1) exit(EXIT_FAILURE); if (fcntl(open_fds[100], F_GETFL) == -1) exit(EXIT_FAILURE); ret = sys_close_range(open_fds[100], open_fds[100], CLOSE_RANGE_UNSHARE); if (ret) exit(EXIT_FAILURE); if (fcntl(open_fds[100], F_GETFL) != -1) exit(EXIT_FAILURE); exit(EXIT_SUCCESS); } EXPECT_EQ(waitpid(pid, &status, 0), pid); EXPECT_EQ(true, WIFEXITED(status)); EXPECT_EQ(0, WEXITSTATUS(status)); } TEST(close_range_unshare_capped) { int i, ret, status; pid_t pid; int open_fds[101]; struct __clone_args args = { .flags = CLONE_FILES, .exit_signal = SIGCHLD, }; for (i = 0; i < ARRAY_SIZE(open_fds); i++) { int fd; fd = open("/dev/null", O_RDONLY | O_CLOEXEC); ASSERT_GE(fd, 0) { if (errno == ENOENT) SKIP(return, "Skipping test since /dev/null does not exist"); } open_fds[i] = fd; } pid = sys_clone3(&args, sizeof(args)); ASSERT_GE(pid, 0); if (pid == 0) { ret = sys_close_range(open_fds[0], UINT_MAX, CLOSE_RANGE_UNSHARE); if (ret) exit(EXIT_FAILURE); for (i = 0; i <= 100; i++) if (fcntl(open_fds[i], F_GETFL) != -1) exit(EXIT_FAILURE); exit(EXIT_SUCCESS); } EXPECT_EQ(waitpid(pid, &status, 0), pid); EXPECT_EQ(true, WIFEXITED(status)); EXPECT_EQ(0, WEXITSTATUS(status)); } TEST(close_range_cloexec) { int i, ret; int open_fds[101]; struct rlimit rlimit; for (i = 0; i < ARRAY_SIZE(open_fds); i++) { int fd; fd = open("/dev/null", O_RDONLY); ASSERT_GE(fd, 0) { if (errno == ENOENT) SKIP(return, "Skipping test since /dev/null does not exist"); } open_fds[i] = fd; } ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC); if (ret < 0) { if (errno == ENOSYS) SKIP(return, "close_range() syscall not supported"); if (errno == EINVAL) SKIP(return, "close_range() doesn't support CLOSE_RANGE_CLOEXEC"); } /* Ensure the FD_CLOEXEC bit is set also with a resource limit in place. */ ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlimit)); rlimit.rlim_cur = 25; ASSERT_EQ(0, setrlimit(RLIMIT_NOFILE, &rlimit)); /* Set close-on-exec for two ranges: [0-50] and [75-100]. */ ret = sys_close_range(open_fds[0], open_fds[50], CLOSE_RANGE_CLOEXEC); ASSERT_EQ(0, ret); ret = sys_close_range(open_fds[75], open_fds[100], CLOSE_RANGE_CLOEXEC); ASSERT_EQ(0, ret); for (i = 0; i <= 50; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); } for (i = 51; i <= 74; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); } for (i = 75; i <= 100; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); } /* Test a common pattern. */ ret = sys_close_range(3, UINT_MAX, CLOSE_RANGE_CLOEXEC); for (i = 0; i <= 100; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); } } TEST(close_range_cloexec_unshare) { int i, ret; int open_fds[101]; struct rlimit rlimit; for (i = 0; i < ARRAY_SIZE(open_fds); i++) { int fd; fd = open("/dev/null", O_RDONLY); ASSERT_GE(fd, 0) { if (errno == ENOENT) SKIP(return, "Skipping test since /dev/null does not exist"); } open_fds[i] = fd; } ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC); if (ret < 0) { if (errno == ENOSYS) SKIP(return, "close_range() syscall not supported"); if (errno == EINVAL) SKIP(return, "close_range() doesn't support CLOSE_RANGE_CLOEXEC"); } /* Ensure the FD_CLOEXEC bit is set also with a resource limit in place. */ ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlimit)); rlimit.rlim_cur = 25; ASSERT_EQ(0, setrlimit(RLIMIT_NOFILE, &rlimit)); /* Set close-on-exec for two ranges: [0-50] and [75-100]. */ ret = sys_close_range(open_fds[0], open_fds[50], CLOSE_RANGE_CLOEXEC | CLOSE_RANGE_UNSHARE); ASSERT_EQ(0, ret); ret = sys_close_range(open_fds[75], open_fds[100], CLOSE_RANGE_CLOEXEC | CLOSE_RANGE_UNSHARE); ASSERT_EQ(0, ret); for (i = 0; i <= 50; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); } for (i = 51; i <= 74; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); } for (i = 75; i <= 100; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); } /* Test a common pattern. */ ret = sys_close_range(3, UINT_MAX, CLOSE_RANGE_CLOEXEC | CLOSE_RANGE_UNSHARE); for (i = 0; i <= 100; i++) { int flags = fcntl(open_fds[i], F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); } } /* * Regression test for syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com */ TEST(close_range_cloexec_syzbot) { int fd1, fd2, fd3, flags, ret, status; pid_t pid; struct __clone_args args = { .flags = CLONE_FILES, .exit_signal = SIGCHLD, }; /* Create a huge gap in the fd table. */ fd1 = open("/dev/null", O_RDWR); EXPECT_GT(fd1, 0); fd2 = dup2(fd1, 1000); EXPECT_GT(fd2, 0); pid = sys_clone3(&args, sizeof(args)); ASSERT_GE(pid, 0); if (pid == 0) { ret = sys_close_range(3, ~0U, CLOSE_RANGE_CLOEXEC); if (ret) exit(EXIT_FAILURE); /* * We now have a private file descriptor table and all * our open fds should still be open but made * close-on-exec. */ flags = fcntl(fd1, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); flags = fcntl(fd2, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); fd3 = dup2(fd1, 42); EXPECT_GT(fd3, 0); /* * Duplicating the file descriptor must remove the * FD_CLOEXEC flag. */ flags = fcntl(fd3, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); exit(EXIT_SUCCESS); } EXPECT_EQ(waitpid(pid, &status, 0), pid); EXPECT_EQ(true, WIFEXITED(status)); EXPECT_EQ(0, WEXITSTATUS(status)); /* * We had a shared file descriptor table before along with requesting * close-on-exec so the original fds must not be close-on-exec. */ flags = fcntl(fd1, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); flags = fcntl(fd2, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); fd3 = dup2(fd1, 42); EXPECT_GT(fd3, 0); flags = fcntl(fd3, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); EXPECT_EQ(close(fd1), 0); EXPECT_EQ(close(fd2), 0); EXPECT_EQ(close(fd3), 0); } /* * Regression test for syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com */ TEST(close_range_cloexec_unshare_syzbot) { int i, fd1, fd2, fd3, flags, ret, status; pid_t pid; struct __clone_args args = { .flags = CLONE_FILES, .exit_signal = SIGCHLD, }; /* * Create a huge gap in the fd table. When we now call * CLOSE_RANGE_UNSHARE with a shared fd table and and with ~0U as upper * bound the kernel will only copy up to fd1 file descriptors into the * new fd table. If the kernel is buggy and doesn't handle * CLOSE_RANGE_CLOEXEC correctly it will not have copied all file * descriptors and we will oops! * * On a buggy kernel this should immediately oops. But let's loop just * to be sure. */ fd1 = open("/dev/null", O_RDWR); EXPECT_GT(fd1, 0); fd2 = dup2(fd1, 1000); EXPECT_GT(fd2, 0); for (i = 0; i < 100; i++) { pid = sys_clone3(&args, sizeof(args)); ASSERT_GE(pid, 0); if (pid == 0) { ret = sys_close_range(3, ~0U, CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC); if (ret) exit(EXIT_FAILURE); /* * We now have a private file descriptor table and all * our open fds should still be open but made * close-on-exec. */ flags = fcntl(fd1, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); flags = fcntl(fd2, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, FD_CLOEXEC); fd3 = dup2(fd1, 42); EXPECT_GT(fd3, 0); /* * Duplicating the file descriptor must remove the * FD_CLOEXEC flag. */ flags = fcntl(fd3, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); EXPECT_EQ(close(fd1), 0); EXPECT_EQ(close(fd2), 0); EXPECT_EQ(close(fd3), 0); exit(EXIT_SUCCESS); } EXPECT_EQ(waitpid(pid, &status, 0), pid); EXPECT_EQ(true, WIFEXITED(status)); EXPECT_EQ(0, WEXITSTATUS(status)); } /* * We created a private file descriptor table before along with * requesting close-on-exec so the original fds must not be * close-on-exec. */ flags = fcntl(fd1, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); flags = fcntl(fd2, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); fd3 = dup2(fd1, 42); EXPECT_GT(fd3, 0); flags = fcntl(fd3, F_GETFD); EXPECT_GT(flags, -1); EXPECT_EQ(flags & FD_CLOEXEC, 0); EXPECT_EQ(close(fd1), 0); EXPECT_EQ(close(fd2), 0); EXPECT_EQ(close(fd3), 0); } TEST_HARNESS_MAIN
22.961471
77
0.651743
ecfedc452431de546f64905ea655b3d1f4ed874f
925
c
C
exec.c
taka-tuos/teocpu-vm
dd535442b44263f8dd853ccb13b9d83343e8915b
[ "MIT" ]
3
2018-04-25T10:47:15.000Z
2021-11-03T18:15:02.000Z
exec.c
taka-tuos/teocpu-vm
dd535442b44263f8dd853ccb13b9d83343e8915b
[ "MIT" ]
null
null
null
exec.c
taka-tuos/teocpu-vm
dd535442b44263f8dd853ccb13b9d83343e8915b
[ "MIT" ]
null
null
null
#include "teocpu-vm.h" #include <stdlib.h> #include <stdio.h> uint32_t callback_syscall(uint32_t a, uint32_t d, uint8_t rw) { //printf("R/W REQ(%s)\n", rw ? "R" : "W"); if(!rw) { putchar(d); fflush(stdout); } //if(!rw && d == 0x0a) exit(0); return 0; } int main(int argc, char *argv[]) { if(argc < 2) { puts("usage>exec-teocpu <binary>"); return 1; } teocpu_t c; c.m = malloc(1024*1024); c.cb = callback_syscall; c.r[64] = 0; c.r[65] = 0x1ffff; c.r[66] = 0x80000; FILE *fp = fopen(argv[1],"rb"); fread(c.m + 0x10000,1,65536,fp); teocpu_pagedesc *pd = (teocpu_pagedesc *)(&c.m[0x80000]); teocpu_write32_unpaged(pd->p_pagelist,0x80000+sizeof(teocpu_pagedesc)); teocpu_write32_unpaged(pd->pagesize,0x80000); teocpu_write32_unpaged(pd->pagelist_len,1); teocpu_write32_unpaged(&c.m[0x80000+sizeof(teocpu_pagedesc)], 0x10000); fclose(fp); while(1) teocpu_execute(&c); return 0; }
19.680851
72
0.650811
805b5cfae2f21f4b829767a78d6d76f3ffd5b641
519
h
C
YLCleaner/Xcode-RuntimeHeaders/DTGraphKit/DTGroupGraph.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
1
2019-02-15T02:16:35.000Z
2019-02-15T02:16:35.000Z
YLCleaner/Xcode-RuntimeHeaders/DTGraphKit/DTGroupGraph.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
YLCleaner/Xcode-RuntimeHeaders/DTGraphKit/DTGroupGraph.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <DTGraphKit/DTGraph.h> @class NSArray; @interface DTGroupGraph : DTGraph { NSArray *_graphTypes; } - (void)drawRect:(struct CGRect)arg1; - (void)setFrameSize:(struct CGSize)arg1; - (void)setGraphTypes:(id)arg1; - (void)setAttributes:(id)arg1; - (void)setModel:(id)arg1; - (void)clearCache; - (void)_createViewsInSize:(struct CGSize)arg1; - (void)dealloc; @end
19.222222
83
0.689788
b7aa16fcf5f733c0c4f355c55c9bb7d96aef22af
3,242
h
C
src/Initializer/BatchRecorders/Recorders.h
7bits-register/SeisSol
84dc91a4942cd97ad813285019c02e6c5da66c45
[ "BSD-3-Clause" ]
null
null
null
src/Initializer/BatchRecorders/Recorders.h
7bits-register/SeisSol
84dc91a4942cd97ad813285019c02e6c5da66c45
[ "BSD-3-Clause" ]
null
null
null
src/Initializer/BatchRecorders/Recorders.h
7bits-register/SeisSol
84dc91a4942cd97ad813285019c02e6c5da66c45
[ "BSD-3-Clause" ]
null
null
null
#ifndef SEISSOL_RECORDERS_H #define SEISSOL_RECORDERS_H #include "DataTypes/ConditionalTable.hpp" #include "utils/logger.h" #include <Initializer/LTS.h> #include <Initializer/tree/Layer.hpp> #include <Kernels/Interface.hpp> #include <vector> namespace seissol { namespace initializers { namespace recording { class AbstractRecorder { public: virtual ~AbstractRecorder() = default; virtual void record(LTS &handler, Layer &layer) = 0; protected: void checkKey(const ConditionalKey &key) { if (currentTable->find(key) != currentTable->end()) { logError() << "Table key conflict detected. Problems with hashing in batch recording subsystem"; } } void setUpContext(LTS &handler, Layer &layer) { currentTable = &(layer.getCondBatchTable()); currentHandler = &(handler); currentLayer = &(layer); idofsAddressCounter = 0; derivativesAddressCounter = 0; } ConditionalBatchTableT *currentTable{nullptr}; LTS *currentHandler{nullptr}; Layer *currentLayer{nullptr}; size_t idofsAddressCounter{0}; size_t derivativesAddressCounter{0}; }; class CompositeRecorder : public AbstractRecorder { public: ~CompositeRecorder() override { for (auto recorder : concreteRecorders) delete recorder; } void record(LTS &handler, Layer &layer) override { for (auto recorder : concreteRecorders) { recorder->record(handler, layer); } } void addRecorder(AbstractRecorder *recorder) { concreteRecorders.push_back(recorder); } void removeRecorder(size_t recorderIndex) { if (recorderIndex < concreteRecorders.size()) { concreteRecorders.erase(concreteRecorders.begin() + recorderIndex); } } private: std::vector<AbstractRecorder *> concreteRecorders{}; }; class LocalIntegrationRecorder : public AbstractRecorder { public: void record(LTS &handler, Layer &layer) override; private: void setUpContext(LTS &handler, Layer &layer, kernels::LocalData::Loader &loader) { currentLoader = &loader; AbstractRecorder::setUpContext(handler, layer); } kernels::LocalData::Loader *currentLoader{nullptr}; void recordTimeAndVolumeIntegrals(); void recordLocalFluxIntegral(); void recordDisplacements(); std::unordered_map<size_t, real *> idofsAddressRegistry{}; }; class NeighIntegrationRecorder : public AbstractRecorder { public: void record(LTS &handler, Layer &layer) override; private: void setUpContext(LTS &handler, Layer &layer, kernels::NeighborData::Loader &loader) { currentLoader = &loader; AbstractRecorder::setUpContext(handler, layer); } void recordDofsTimeEvaluation(); void recordNeighbourFluxIntegrals(); kernels::NeighborData::Loader *currentLoader{nullptr}; std::unordered_map<real *, real *> idofsAddressRegistry{}; }; class PlasticityRecorder : public AbstractRecorder { public: void setUpContext(LTS &handler, Layer &layer, kernels::LocalData::Loader &loader) { currentLoader = &loader; AbstractRecorder::setUpContext(handler, layer); } void record(LTS &handler, Layer &layer) override; kernels::LocalData::Loader *currentLoader{nullptr}; }; } // namespace recording } // namespace initializers } // namespace seissol #endif // SEISSOL_RECORDERS_H
25.936
95
0.732572
c8499ef5d9867ed6587917564d019ccbf49cd73d
2,503
h
C
hardware/user_config.h
NF6X/hp85disk
be24c4fe3b3d3539b8fe8b0e2b72ea51bdf10f0e
[ "MIT" ]
14
2017-05-05T03:28:12.000Z
2021-05-25T18:06:18.000Z
hardware/user_config.h
NF6X/hp85disk
be24c4fe3b3d3539b8fe8b0e2b72ea51bdf10f0e
[ "MIT" ]
null
null
null
hardware/user_config.h
NF6X/hp85disk
be24c4fe3b3d3539b8fe8b0e2b72ea51bdf10f0e
[ "MIT" ]
4
2018-12-15T04:16:05.000Z
2021-09-10T16:50:55.000Z
/** @file user_config.h @brief Master Include for FatFs, RTC, Timers AVR8 - Part of HP85 disk emulator. @par Edit History - [1.0] [Mike Gore] Initial revision of file. @par Copyright &copy; 2014-2020 Mike Gore, Inc. All rights reserved. */ #ifndef _USER_CONFIG_H_ #define _USER_CONFIG_H_ #define AVR 1 #define MEMSPACE /**/ #define SYSTEM_TASK_HZ 1000L #define HAVE_HIRES_TIMER 1 // FATFS #ifdef AVR #ifndef MMC_SLOW #define MMC_SLOW (500000UL) #endif #ifndef MMC_FAST #define MMC_FAST (5000000UL) #endif #endif // AVR #define NO_SCANF #if !defined(F_CPU) #error F_CPU undefined #endif #include <hardware/cpu.h> /// standard includes ///#include <stdio.h> #include <stdlib.h> #include <string.h> #include <inttypes.h> #include <stdint.h> #include <stddef.h> #include <stdarg.h> #include <ctype.h> #include <avr/pgmspace.h> #include <avr/portpins.h> #include <avr/io.h> #include <assert.h> #include <avr/interrupt.h> #include "hardware/gpio-1284p.h" #include "hardware/hal.h" #include "hardware/bits.h" #include "hardware/delay.h" #include "hardware/ram.h" #include <util/twi.h> #include "lib/parsing.h" #include "lib/stringsup.h" #include "printf/mathio.h" #define printf(format, args...) printf_P(PSTR(format), ##args) #define snprintf(s, size, format, args...) snprintf_P(s, size, PSTR(format), ##args) #define sprintf(s, format, args...) sprintf_P(s, PSTR(format), ##args) void copyright( void ); #include "lib/time.h" #include "lib/timer.h" #include "lib/queue.h" #include "hardware/rtc.h" #include "fatfs.sup/fatfs.h" #ifndef NULL #define NULL ((void *) 0) #endif typedef enum { false, true } bool; #ifndef _SIZE_T #define _SIZE_T typedef unsigned long int size_t; #endif #define Mem_Clear(a) memset(a, 0, sizeof(a)) #define Mem_Set(a,b) memset(a, (int) b, sizeof(a)) #define UART_DEVICE_CNT 1 /**< UART device number */ #include "ram.h" #include "rs232.h" #include "spi.h" #include "rtc.h" // #include "TWI_AVR8.h" #ifdef I2C_SUPPORT #include "i2c.h" #endif #ifdef LCD_SUPPORT // #include "LCD.h" // #include "display/lcd_printf.h" #endif #include "posix/posix.h" #include "gpib/debug.h" #ifdef PORTIO_TESTS #include "portio.h" #endif // sys.c defines alternative safe functions #ifndef free #define free(p) safefree(p) #endif #ifndef calloc #define calloc(n,s) safecalloc(n,s) #endif #ifndef malloc #define malloc(s) safemalloc(s) #endif #endif
18.540741
84
0.680384
0829cf9b25bc421ea48f80b40997cdbae75860b6
2,154
c
C
ee/math/src/ellpef.c
Based-Skid/ps2sdk
15277ec11ce5bde8ba444b907f598cb32a980181
[ "AFL-2.0" ]
4
2016-02-08T12:45:36.000Z
2021-04-08T18:02:32.000Z
ee/math/src/ellpef.c
belek666/ps2sdk
f23f376e5a99c4826ce94a2b4b5f1ba5affe4207
[ "AFL-2.0" ]
1
2018-11-18T09:51:23.000Z
2018-11-18T09:51:23.000Z
ee/math/src/ellpef.c
belek666/ps2sdk
f23f376e5a99c4826ce94a2b4b5f1ba5affe4207
[ "AFL-2.0" ]
4
2016-02-28T14:33:07.000Z
2019-11-29T05:34:03.000Z
/* ellpef.c * * Complete elliptic integral of the second kind * * * * SYNOPSIS: * * float m1, y, ellpef(); * * y = ellpef( m1 ); * * * * DESCRIPTION: * * Approximates the integral * * * pi/2 * - * | | 2 * E(m) = | sqrt( 1 - m sin t ) dt * | | * - * 0 * * Where m = 1 - m1, using the approximation * * P(x) - x log x Q(x). * * Though there are no singularities, the argument m1 is used * rather than m for compatibility with ellpk(). * * E(1) = 1; E(0) = pi/2. * * * ACCURACY: * * Relative error: * arithmetic domain # trials peak rms * IEEE 0, 1 30000 1.1e-7 3.9e-8 * * * ERROR MESSAGES: * * message condition value returned * ellpef domain x<0, x>1 0.0 * */ /* ellpe.c */ /* Elliptic integral of second kind */ /* Cephes Math Library, Release 2.1: February, 1989 Copyright 1984, 1987, 1989 by Stephen L. Moshier Direct inquiries to 30 Frost Street, Cambridge, MA 02140 */ #include "mconf.h" static float P[] = { 1.53552577301013293365E-4, 2.50888492163602060990E-3, 8.68786816565889628429E-3, 1.07350949056076193403E-2, 7.77395492516787092951E-3, 7.58395289413514708519E-3, 1.15688436810574127319E-2, 2.18317996015557253103E-2, 5.68051945617860553470E-2, 4.43147180560990850618E-1, 1.00000000000000000299E0 }; static float Q[] = { 3.27954898576485872656E-5, 1.00962792679356715133E-3, 6.50609489976927491433E-3, 1.68862163993311317300E-2, 2.61769742454493659583E-2, 3.34833904888224918614E-2, 4.27180926518931511717E-2, 5.85936634471101055642E-2, 9.37499997197644278445E-2, 2.49999999999888314361E-1 }; #ifdef ANSIC float polevlf(float, float *, int), logf(float); float ellpef( float xx) #else float polevlf(), logf(); float ellpef(xx) double xx; #endif { float x; x = xx; if( (x <= 0.0) || (x > 1.0) ) { if( x == 0.0 ) return( 1.0 ); mtherr( "ellpef", DOMAIN ); return( 0.0 ); } return( polevlf(x,P,10) - logf(x) * (x * polevlf(x,Q,9)) ); }
19.232143
61
0.586351
bd7da996c20c2e1eaa051cd26cdcc6bc2a5d4b4f
1,696
c
C
lib/libm/src/w_j1f.c
calmsacibis995/minix
dfba95598f553b6560131d35a76658f1f8c9cf38
[ "Unlicense" ]
16
2019-03-14T19:45:02.000Z
2022-02-06T19:18:08.000Z
src/w_j1f.c
tyler569/sortix-libm
ef1af806e3e0a17e4b4e362e963af5985f694e57
[ "BSD-2-Clause-NetBSD" ]
1
2020-05-08T08:40:02.000Z
2020-05-08T13:27:59.000Z
src/w_j1f.c
tyler569/sortix-libm
ef1af806e3e0a17e4b4e362e963af5985f694e57
[ "BSD-2-Clause-NetBSD" ]
3
2021-12-02T11:09:09.000Z
2022-01-25T21:31:23.000Z
/* w_j1f.c -- float version of w_j1.c. * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ #include <sys/cdefs.h> #if defined(LIBM_SCCS) && !defined(lint) __RCSID("$NetBSD: w_j1f.c,v 1.6 2002/05/26 22:02:01 wiz Exp $"); #endif /* * wrapper of j1f,y1f */ #include "math.h" #include "math_private.h" float j1f(float x) /* wrapper j1f */ { #ifdef _IEEE_LIBM return __ieee754_j1f(x); #else float z; z = __ieee754_j1f(x); if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; if(fabsf(x)>(float)X_TLOSS) { /* j1(|x|>X_TLOSS) */ return (float)__kernel_standard((double)x,(double)x,136); } else return z; #endif } float y1f(float x) /* wrapper y1f */ { #ifdef _IEEE_LIBM return __ieee754_y1f(x); #else float z; z = __ieee754_y1f(x); if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z; if(x <= (float)0.0){ if(x==(float)0.0) /* d= -one/(x-x); */ return (float)__kernel_standard((double)x,(double)x,110); else /* d = zero/(x-x); */ return (float)__kernel_standard((double)x,(double)x,111); } if(x>(float)X_TLOSS) { /* y1(x>X_TLOSS) */ return (float)__kernel_standard((double)x,(double)x,137); } else return z; #endif }
24.57971
77
0.56309
832b56cc3e91403a4220eed52c47808dae2203ae
1,403
h
C
viewer/MiniEngine/Core/pch.h
Qarterd/Raycoin
569d77f36573e6ef10eaa2c650805a61d5026e29
[ "MIT" ]
2
2019-01-20T18:12:32.000Z
2021-07-20T13:13:09.000Z
viewer/MiniEngine/Core/pch.h
Qarterd/Raycoin
569d77f36573e6ef10eaa2c650805a61d5026e29
[ "MIT" ]
null
null
null
viewer/MiniEngine/Core/pch.h
Qarterd/Raycoin
569d77f36573e6ef10eaa2c650805a61d5026e29
[ "MIT" ]
2
2019-02-02T05:15:26.000Z
2019-04-23T07:02:02.000Z
// // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. // // Developed by Minigraph // // Author: James Stanard // #pragma once #pragma warning(disable:4201) // nonstandard extension used : nameless struct/union #pragma warning(disable:4328) // nonstandard extension used : class rvalue used as lvalue #pragma warning(disable:4324) // structure was padded due to __declspec(align()) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef NOMINMAX #define NOMINMAX #endif #include <windows.h> #include <d3d12.h> #pragma comment(lib, "d3d12.lib") #pragma comment(lib, "dxgi.lib") #define MY_IID_PPV_ARGS IID_PPV_ARGS #define D3D12_GPU_VIRTUAL_ADDRESS_NULL ((D3D12_GPU_VIRTUAL_ADDRESS)0) #define D3D12_GPU_VIRTUAL_ADDRESS_UNKNOWN ((D3D12_GPU_VIRTUAL_ADDRESS)-1) #include "d3dx12.h" #include <cstdint> #include <cstdio> #include <cstdarg> #include <vector> #include <memory> #include <string> #include <exception> #include <wrl.h> #include <ppltasks.h> #include "Utility.h" #include "VectorMath.h" #include "EngineTuning.h" #include "EngineProfiling.h"
25.981481
90
0.725588
03f301478dc68a64ad5dd71fdd7be6e3d1267212
3,895
h
C
die-tk/objects/Dimension_impl.h
thinlizzy/die-tk
eba597d9453318b03e44f15753323be80ecb3a4e
[ "Artistic-2.0" ]
11
2015-11-06T01:35:35.000Z
2021-05-01T18:34:50.000Z
die-tk/objects/Dimension_impl.h
thinlizzy/die-tk
eba597d9453318b03e44f15753323be80ecb3a4e
[ "Artistic-2.0" ]
null
null
null
die-tk/objects/Dimension_impl.h
thinlizzy/die-tk
eba597d9453318b03e44f15753323be80ecb3a4e
[ "Artistic-2.0" ]
2
2017-07-06T16:05:51.000Z
2019-07-04T01:17:15.000Z
/** explicitly converts a dimension type to another, converting the dimension values to DimType * @param d the source dimension * @note useful for converting int dimensions to size_t dimensions */ template<typename T> template<typename U> basic_dimension<T> & basic_dimension<T>::assign(basic_dimension<U> const & d) { width = DimType(d.width); height = DimType(d.height); return *this; } /** @return true if it is an empty dimension */ template<typename T> bool basic_dimension<T>::empty() const { return width == 0 && height == 0; } /** @return true if all dimensions are positive */ template<typename T> bool basic_dimension<T>::isRectangle() const { return width > 0 && height > 0; } /** @return dimension area */ template<typename T> size_t basic_dimension<T>::area() const { return size_t(width)*size_t(height); } /** vector sum (a,b) += (c,d) == (a+c,b+d) * @param d the dimension object to be added * @return reference to *this */ template<typename T> basic_dimension<T> & basic_dimension<T>::operator+=(basic_dimension<T> const & d) { width += d.width; height += d.height; return *this; } /** vector minus (a,b) -= (c,d) == (a-c,b-d) * @param d the dimension object to be subtracted * @return reference to *this */ template<typename T> basic_dimension<T> & basic_dimension<T>::operator-=(basic_dimension<T> const & d) { width -= d.width; height -= d.height; return *this; } /** performs a sort of dot product (a,b) *= (c,d) == (a*c,b*d) * @param d the dimension object to be multiplied * @return reference to *this */ template<typename T> basic_dimension<T> & basic_dimension<T>::operator*=(basic_dimension<T> const & d) { width *= d.width; height *= d.height; return *this; } /** performs a sort of dot product (a,b) /= (c,d) == (a/c,b/d) * @param d the dimension object to be divided * @return reference to *this */ template<typename T> basic_dimension<T> & basic_dimension<T>::operator/=(basic_dimension<T> const & d) { width /= d.width; height /= d.height; return *this; } /** scales the dimensions by a factor * @param f the scale factor * @return reference to *this */ template<typename T> template<typename U> basic_dimension<T> & basic_dimension<T>::operator*=(U f) { width *= f; height *= f; return *this; } /** divides the dimensions by a factor * @param f the shrinking factor * @return reference to *this */ template<typename T> template<typename U> basic_dimension<T> & basic_dimension<T>::operator/=(U f) { width /= f; height /= f; return *this; } /** @return true if dimension values are equal */ template<typename T> bool operator==(basic_dimension<T> const & d1, basic_dimension<T> const & d2) { return d1.width == d2.width && d1.height == d2.height; } /** @return true if dimension values are different */ template<typename T> bool operator!=(basic_dimension<T> const & d1, basic_dimension<T> const & d2) { return ! operator==(d1,d2); } /** @return vector product of the two operators: (a,b) * (c,d) == (a*c,b*d) */ template<typename T> basic_dimension<T> operator*(basic_dimension<T> const & d1, basic_dimension<T> const & d2) { return basic_dimension<T>(d1)*=d2; } /** @return vector product of the two operators: (a,b) / (c,d) == (a/c,b/d) */ template<typename T> basic_dimension<T> operator/(basic_dimension<T> const & d1, basic_dimension<T> const & d2) { return basic_dimension<T>(d1)/=d2; } template<typename T, typename U> constexpr basic_dimension<T> operator*(basic_dimension<T> const & d1, U f) { return basic_dimension<T>(d1.width*f,d1.height*f); } template<typename T, typename U> constexpr basic_dimension<T> operator*(U f, basic_dimension<T> const & d1) { return basic_dimension<T>(d1.width*f,d1.height*f); } /** @return dimension scaled: (a,b) / f == (a/f,b/f) */ template<typename T, typename U> basic_dimension<T> operator/(basic_dimension<T> const & d1, U f) { return basic_dimension<T>(d1)/=f; }
24.496855
95
0.690372
8ac0af9d5e16ecbab02338d4764916d8e7f9c35c
12,438
h
C
iOS/Classes/Native/UnityEngine_UnityEngine_SocialPlatforms_GameCenter3570684786.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/UnityEngine_UnityEngine_SocialPlatforms_GameCenter3570684786.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/UnityEngine_UnityEngine_SocialPlatforms_GameCenter3570684786.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> // System.Action`1<System.Boolean> struct Action_1_t872614854; // System.Action`1<UnityEngine.SocialPlatforms.IAchievementDescription[]> struct Action_1_t229750097; // System.Action`1<UnityEngine.SocialPlatforms.IAchievement[]> struct Action_1_t2349069933; // System.Action`1<UnityEngine.SocialPlatforms.IScore[]> struct Action_1_t645920862; // System.Action`1<UnityEngine.SocialPlatforms.IUserProfile[]> struct Action_1_t3814920354; // UnityEngine.SocialPlatforms.Impl.AchievementDescription[] struct AchievementDescriptionU5BU5D_t759444790; // UnityEngine.SocialPlatforms.Impl.UserProfile[] struct UserProfileU5BU5D_t2378268441; // UnityEngine.SocialPlatforms.Impl.LocalUser struct LocalUser_t1307362368; // System.Collections.Generic.List`1<UnityEngine.SocialPlatforms.GameCenter.GcLeaderboard> struct List_1_t3189060351; #include "mscorlib_System_Object4170816371.h" #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform struct GameCenterPlatform_t3570684786 : public Il2CppObject { public: public: }; struct GameCenterPlatform_t3570684786_StaticFields { public: // System.Action`1<System.Boolean> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_AuthenticateCallback Action_1_t872614854 * ___s_AuthenticateCallback_0; // System.Action`1<System.Boolean> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_FriendsCallback Action_1_t872614854 * ___s_FriendsCallback_1; // System.Action`1<UnityEngine.SocialPlatforms.IAchievementDescription[]> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_AchievementDescriptionLoaderCallback Action_1_t229750097 * ___s_AchievementDescriptionLoaderCallback_2; // System.Action`1<UnityEngine.SocialPlatforms.IAchievement[]> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_AchievementLoaderCallback Action_1_t2349069933 * ___s_AchievementLoaderCallback_3; // System.Action`1<System.Boolean> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_ProgressCallback Action_1_t872614854 * ___s_ProgressCallback_4; // System.Action`1<System.Boolean> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_ScoreCallback Action_1_t872614854 * ___s_ScoreCallback_5; // System.Action`1<UnityEngine.SocialPlatforms.IScore[]> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_ScoreLoaderCallback Action_1_t645920862 * ___s_ScoreLoaderCallback_6; // System.Action`1<System.Boolean> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_LeaderboardCallback Action_1_t872614854 * ___s_LeaderboardCallback_7; // System.Action`1<UnityEngine.SocialPlatforms.IUserProfile[]> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_UsersCallback Action_1_t3814920354 * ___s_UsersCallback_8; // UnityEngine.SocialPlatforms.Impl.AchievementDescription[] UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_adCache AchievementDescriptionU5BU5D_t759444790* ___s_adCache_9; // UnityEngine.SocialPlatforms.Impl.UserProfile[] UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_friends UserProfileU5BU5D_t2378268441* ___s_friends_10; // UnityEngine.SocialPlatforms.Impl.UserProfile[] UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_users UserProfileU5BU5D_t2378268441* ___s_users_11; // System.Action`1<System.Boolean> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::s_ResetAchievements Action_1_t872614854 * ___s_ResetAchievements_12; // UnityEngine.SocialPlatforms.Impl.LocalUser UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::m_LocalUser LocalUser_t1307362368 * ___m_LocalUser_13; // System.Collections.Generic.List`1<UnityEngine.SocialPlatforms.GameCenter.GcLeaderboard> UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform::m_GcBoards List_1_t3189060351 * ___m_GcBoards_14; public: inline static int32_t get_offset_of_s_AuthenticateCallback_0() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_AuthenticateCallback_0)); } inline Action_1_t872614854 * get_s_AuthenticateCallback_0() const { return ___s_AuthenticateCallback_0; } inline Action_1_t872614854 ** get_address_of_s_AuthenticateCallback_0() { return &___s_AuthenticateCallback_0; } inline void set_s_AuthenticateCallback_0(Action_1_t872614854 * value) { ___s_AuthenticateCallback_0 = value; Il2CppCodeGenWriteBarrier(&___s_AuthenticateCallback_0, value); } inline static int32_t get_offset_of_s_FriendsCallback_1() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_FriendsCallback_1)); } inline Action_1_t872614854 * get_s_FriendsCallback_1() const { return ___s_FriendsCallback_1; } inline Action_1_t872614854 ** get_address_of_s_FriendsCallback_1() { return &___s_FriendsCallback_1; } inline void set_s_FriendsCallback_1(Action_1_t872614854 * value) { ___s_FriendsCallback_1 = value; Il2CppCodeGenWriteBarrier(&___s_FriendsCallback_1, value); } inline static int32_t get_offset_of_s_AchievementDescriptionLoaderCallback_2() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_AchievementDescriptionLoaderCallback_2)); } inline Action_1_t229750097 * get_s_AchievementDescriptionLoaderCallback_2() const { return ___s_AchievementDescriptionLoaderCallback_2; } inline Action_1_t229750097 ** get_address_of_s_AchievementDescriptionLoaderCallback_2() { return &___s_AchievementDescriptionLoaderCallback_2; } inline void set_s_AchievementDescriptionLoaderCallback_2(Action_1_t229750097 * value) { ___s_AchievementDescriptionLoaderCallback_2 = value; Il2CppCodeGenWriteBarrier(&___s_AchievementDescriptionLoaderCallback_2, value); } inline static int32_t get_offset_of_s_AchievementLoaderCallback_3() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_AchievementLoaderCallback_3)); } inline Action_1_t2349069933 * get_s_AchievementLoaderCallback_3() const { return ___s_AchievementLoaderCallback_3; } inline Action_1_t2349069933 ** get_address_of_s_AchievementLoaderCallback_3() { return &___s_AchievementLoaderCallback_3; } inline void set_s_AchievementLoaderCallback_3(Action_1_t2349069933 * value) { ___s_AchievementLoaderCallback_3 = value; Il2CppCodeGenWriteBarrier(&___s_AchievementLoaderCallback_3, value); } inline static int32_t get_offset_of_s_ProgressCallback_4() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_ProgressCallback_4)); } inline Action_1_t872614854 * get_s_ProgressCallback_4() const { return ___s_ProgressCallback_4; } inline Action_1_t872614854 ** get_address_of_s_ProgressCallback_4() { return &___s_ProgressCallback_4; } inline void set_s_ProgressCallback_4(Action_1_t872614854 * value) { ___s_ProgressCallback_4 = value; Il2CppCodeGenWriteBarrier(&___s_ProgressCallback_4, value); } inline static int32_t get_offset_of_s_ScoreCallback_5() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_ScoreCallback_5)); } inline Action_1_t872614854 * get_s_ScoreCallback_5() const { return ___s_ScoreCallback_5; } inline Action_1_t872614854 ** get_address_of_s_ScoreCallback_5() { return &___s_ScoreCallback_5; } inline void set_s_ScoreCallback_5(Action_1_t872614854 * value) { ___s_ScoreCallback_5 = value; Il2CppCodeGenWriteBarrier(&___s_ScoreCallback_5, value); } inline static int32_t get_offset_of_s_ScoreLoaderCallback_6() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_ScoreLoaderCallback_6)); } inline Action_1_t645920862 * get_s_ScoreLoaderCallback_6() const { return ___s_ScoreLoaderCallback_6; } inline Action_1_t645920862 ** get_address_of_s_ScoreLoaderCallback_6() { return &___s_ScoreLoaderCallback_6; } inline void set_s_ScoreLoaderCallback_6(Action_1_t645920862 * value) { ___s_ScoreLoaderCallback_6 = value; Il2CppCodeGenWriteBarrier(&___s_ScoreLoaderCallback_6, value); } inline static int32_t get_offset_of_s_LeaderboardCallback_7() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_LeaderboardCallback_7)); } inline Action_1_t872614854 * get_s_LeaderboardCallback_7() const { return ___s_LeaderboardCallback_7; } inline Action_1_t872614854 ** get_address_of_s_LeaderboardCallback_7() { return &___s_LeaderboardCallback_7; } inline void set_s_LeaderboardCallback_7(Action_1_t872614854 * value) { ___s_LeaderboardCallback_7 = value; Il2CppCodeGenWriteBarrier(&___s_LeaderboardCallback_7, value); } inline static int32_t get_offset_of_s_UsersCallback_8() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_UsersCallback_8)); } inline Action_1_t3814920354 * get_s_UsersCallback_8() const { return ___s_UsersCallback_8; } inline Action_1_t3814920354 ** get_address_of_s_UsersCallback_8() { return &___s_UsersCallback_8; } inline void set_s_UsersCallback_8(Action_1_t3814920354 * value) { ___s_UsersCallback_8 = value; Il2CppCodeGenWriteBarrier(&___s_UsersCallback_8, value); } inline static int32_t get_offset_of_s_adCache_9() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_adCache_9)); } inline AchievementDescriptionU5BU5D_t759444790* get_s_adCache_9() const { return ___s_adCache_9; } inline AchievementDescriptionU5BU5D_t759444790** get_address_of_s_adCache_9() { return &___s_adCache_9; } inline void set_s_adCache_9(AchievementDescriptionU5BU5D_t759444790* value) { ___s_adCache_9 = value; Il2CppCodeGenWriteBarrier(&___s_adCache_9, value); } inline static int32_t get_offset_of_s_friends_10() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_friends_10)); } inline UserProfileU5BU5D_t2378268441* get_s_friends_10() const { return ___s_friends_10; } inline UserProfileU5BU5D_t2378268441** get_address_of_s_friends_10() { return &___s_friends_10; } inline void set_s_friends_10(UserProfileU5BU5D_t2378268441* value) { ___s_friends_10 = value; Il2CppCodeGenWriteBarrier(&___s_friends_10, value); } inline static int32_t get_offset_of_s_users_11() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_users_11)); } inline UserProfileU5BU5D_t2378268441* get_s_users_11() const { return ___s_users_11; } inline UserProfileU5BU5D_t2378268441** get_address_of_s_users_11() { return &___s_users_11; } inline void set_s_users_11(UserProfileU5BU5D_t2378268441* value) { ___s_users_11 = value; Il2CppCodeGenWriteBarrier(&___s_users_11, value); } inline static int32_t get_offset_of_s_ResetAchievements_12() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___s_ResetAchievements_12)); } inline Action_1_t872614854 * get_s_ResetAchievements_12() const { return ___s_ResetAchievements_12; } inline Action_1_t872614854 ** get_address_of_s_ResetAchievements_12() { return &___s_ResetAchievements_12; } inline void set_s_ResetAchievements_12(Action_1_t872614854 * value) { ___s_ResetAchievements_12 = value; Il2CppCodeGenWriteBarrier(&___s_ResetAchievements_12, value); } inline static int32_t get_offset_of_m_LocalUser_13() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___m_LocalUser_13)); } inline LocalUser_t1307362368 * get_m_LocalUser_13() const { return ___m_LocalUser_13; } inline LocalUser_t1307362368 ** get_address_of_m_LocalUser_13() { return &___m_LocalUser_13; } inline void set_m_LocalUser_13(LocalUser_t1307362368 * value) { ___m_LocalUser_13 = value; Il2CppCodeGenWriteBarrier(&___m_LocalUser_13, value); } inline static int32_t get_offset_of_m_GcBoards_14() { return static_cast<int32_t>(offsetof(GameCenterPlatform_t3570684786_StaticFields, ___m_GcBoards_14)); } inline List_1_t3189060351 * get_m_GcBoards_14() const { return ___m_GcBoards_14; } inline List_1_t3189060351 ** get_address_of_m_GcBoards_14() { return &___m_GcBoards_14; } inline void set_m_GcBoards_14(List_1_t3189060351 * value) { ___m_GcBoards_14 = value; Il2CppCodeGenWriteBarrier(&___m_GcBoards_14, value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif
56.027027
212
0.848207
0059bf9b1757afe2e3cabf48994e21a38aab3447
1,791
h
C
src/blahpd.h
JaimeFrey/BLAH
84e6add38534bf3c576c33a2c6ae25ad1953a9d7
[ "Apache-2.0" ]
1
2021-07-01T15:36:49.000Z
2021-07-01T15:36:49.000Z
src/blahpd.h
JaimeFrey/BLAH
84e6add38534bf3c576c33a2c6ae25ad1953a9d7
[ "Apache-2.0" ]
31
2019-07-24T18:55:01.000Z
2021-09-22T12:17:21.000Z
src/blahpd.h
JaimeFrey/BLAH
84e6add38534bf3c576c33a2c6ae25ad1953a9d7
[ "Apache-2.0" ]
6
2020-02-10T23:08:02.000Z
2021-08-18T17:42:32.000Z
/* # File: blahpd.h # # Author: David Rebatto # e-mail: David.Rebatto@mi.infn.it # # # Copyright (c) Members of the EGEE Collaboration. 2007-2010. # # See http://www.eu-egee.org/partners/ for details on the copyright # holders. # # 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 BLAHPD_H_INCLUDED #define BLAHPD_H_INCLUDED #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include "config.h" #define RCSID_VERSION "$GahpVersion: %s Mar 31 2008 INFN\\ blahpd\\ (%s) $" #define DEFAULT_GLITE_LOCATION "/usr" #define DEFAULT_GLEXEC_COMMAND "/usr/sbin/glexec" #define DEFAULT_SUDO_COMMAND "/usr/bin/sudo" /* Change this in order to select the default batch system * (overridden by BLAH_LRMS env variable)*/ #define DEFAULT_LRMS "lsf" #define BLAHPD_CRLF "\r\n" #define POLL_INTERVAL 3 #define MALLOC_ERROR 1 #define JOBID_MAX_LEN 256 #define ERROR_MAX_LEN 256 #define RESLN_MAX_LEN 2048 #define MAX_JOB_NUMBER 10 #ifdef DEBUG #define BLAHDBG(format, message) fprintf(stderr, format, message) #else #define BLAHDBG(format, message) #endif /* Job states * */ typedef enum job_states { UNDEFINED, IDLE, RUNNING, REMOVED, COMPLETED, HELD } job_status_t; #endif /* defined BLAHPD_H_INCLUDED */
23.25974
78
0.71971
bb0e3e568337b94eddc7a515de3fd3ebafbb1f8f
348
h
C
grammer/Node/ExpressionListNode.h
OneNameNameN/NKC
61bafa50ba68c9a1403595ba7308b81b751827ba
[ "Apache-2.0" ]
1
2022-03-09T07:06:55.000Z
2022-03-09T07:06:55.000Z
grammer/Node/ExpressionListNode.h
OneNameNameN/NKC
61bafa50ba68c9a1403595ba7308b81b751827ba
[ "Apache-2.0" ]
null
null
null
grammer/Node/ExpressionListNode.h
OneNameNameN/NKC
61bafa50ba68c9a1403595ba7308b81b751827ba
[ "Apache-2.0" ]
null
null
null
#ifndef GRAMMER_EXPRESSIONLISTNODE_H #define GRAMMER_EXPRESSIONLISTNODE_H #include "AbstractNode.h" class ExpressionListNode:public AbstractNode{ public: AbstractNode* expression; AbstractNode* expressionList; ExpressionListNode(AbstractNode* expression,AbstractNode* expressionList); void printInfo(int deep) override; }; #endif
24.857143
78
0.810345
154d239c6480680eeeba6b360fceee0b59d60b4c
257
h
C
utils/Read_world_from_file.h
dcesini/Darwin
7bc0f7fe136bc69063055fcb0cb859ad579084c0
[ "Apache-2.0" ]
null
null
null
utils/Read_world_from_file.h
dcesini/Darwin
7bc0f7fe136bc69063055fcb0cb859ad579084c0
[ "Apache-2.0" ]
null
null
null
utils/Read_world_from_file.h
dcesini/Darwin
7bc0f7fe136bc69063055fcb0cb859ad579084c0
[ "Apache-2.0" ]
null
null
null
#ifndef READ_WORLD_H #define READ_WORLD_H #include "include/Constants.h" #include "include/Commons.h" #include <iostream> #include <fstream> #include "include/World.h" #include <string> extern "C" world* read_world_from_file(std::string filename); #endif
19.769231
61
0.770428
c627d98da87b40216b9247804f74bc1793708b21
1,309
h
C
BlinkEngine/src/Blink/Log.h
buryakig/BlinkEngine
ba939980a93b7c653c786bb0de2cfcc30305cb49
[ "Apache-2.0" ]
null
null
null
BlinkEngine/src/Blink/Log.h
buryakig/BlinkEngine
ba939980a93b7c653c786bb0de2cfcc30305cb49
[ "Apache-2.0" ]
null
null
null
BlinkEngine/src/Blink/Log.h
buryakig/BlinkEngine
ba939980a93b7c653c786bb0de2cfcc30305cb49
[ "Apache-2.0" ]
null
null
null
#pragma once #include <memory> #include "Core.h" #include "spdlog/spdlog.h" #include "blinkpch.h" #include "spdlog/fmt/ostr.h" namespace Blink { class BLINK_API Log { public: static void Init(); inline static std::shared_ptr<spdlog::logger>& GetCoreLogger() { return s_CoreLogger; } inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return s_ClentLogger; } private: static std::shared_ptr<spdlog::logger> s_CoreLogger; static std::shared_ptr<spdlog::logger> s_ClentLogger; }; } #define BLINK_CORE_ERROR(...) Blink::Log::GetCoreLogger()->error(__VA_ARGS__) #define BLINK_CORE_WARN(...) Blink::Log::GetCoreLogger()->warn(__VA_ARGS__) #define BLINK_CORE_INFO(...) Blink::Log::GetCoreLogger()->info(__VA_ARGS__) #define BLINK_CORE_TRACE(...) Blink::Log::GetCoreLogger()->trace(__VA_ARGS__) #define BLINK_CORE_FATAL(...) Blink::Log::GetCoreLogger()->fatal(__VA_ARGS__) #define BLINK_CLIENT_ERROR(...) Blink::Log::GetClientLogger()->error(__VA_ARGS__) #define BLINK_CLIENT_WARN(...) Blink::Log::GetClientLogger()->warn(__VA_ARGS__) #define BLINK_CLIENT_INFO(...) Blink::Log::GetClientLogger()->info(__VA_ARGS__) #define BLINK_CLIENT_TRACE(...) Blink::Log::GetClientLogger()->trace(__VA_ARGS__) #define BLINK_CLIENT_FATAL(...) Blink::Log::GetClientLogger()->fatal(__VA_ARGS__)
35.378378
92
0.747135
18bbcf547019cb6149ea7b7fdecc10c26a6a1ff7
5,440
c
C
stsdas/pkg/hst_calib/nicmos/calnicb/n_math.c
iraf-community/stsdas
043c173fd5497c18c2b1bfe8bcff65180bca3996
[ "BSD-3-Clause" ]
1
2020-12-20T10:06:48.000Z
2020-12-20T10:06:48.000Z
stsdas/pkg/hst_calib/nicmos/calnicb/n_math.c
spacetelescope/stsdas_stripped
043c173fd5497c18c2b1bfe8bcff65180bca3996
[ "BSD-3-Clause" ]
null
null
null
stsdas/pkg/hst_calib/nicmos/calnicb/n_math.c
spacetelescope/stsdas_stripped
043c173fd5497c18c2b1bfe8bcff65180bca3996
[ "BSD-3-Clause" ]
2
2019-10-12T20:01:16.000Z
2020-11-19T08:04:30.000Z
# include <math.h> # include <hstio.h> /* defines HST I/O functions */ # include "calnic.h" /* defines NICMOS data structure */ # include "calnicb.h" /* defines CALNICB data structure */ /* N_MATH: Contains general utilities for performing arithmetic ** on NICMOS two-dimensional data groups. Errors and DQ are updated. ** SAMP and TIME arrays are unchanged. ** ** Revision history: ** H.Bushouse Oct. 1996 Build 1 */ int n_aadd (SingleNicmosGroup *a, SingleNicmosGroup *b) { /* Add two SingleNicmosGroups, leaving the result in the first. (*a) += (*b) The science data arrays are added together; the error arrays are combined; the data quality arrays are "or'ed". */ int i, j; /* array indexes */ float aerr; /* a error */ float berr; /* b error */ for (j=0; j < a->sci.data.ny; j++) { for (i=0; i < a->sci.data.nx; i++) { /* error data */ aerr = Pix(a->err.data,i,j); berr = Pix(b->err.data,i,j); Pix(a->err.data,i,j) = sqrt(aerr*aerr + berr*berr); /* science data */ Pix(a->sci.data,i,j) = Pix(a->sci.data,i,j) + Pix(b->sci.data,i,j); /* data quality */ DQSetPix(a->dq.data,i,j, DQPix(a->dq.data,i,j) | DQPix(b->dq.data,i,j) ); } } return (status = 0); } int n_asub (SingleNicmosGroup *a, SingleNicmosGroup *b) { /* Subtract two SingleNicmosGroups, leaving the result in the first. (*a) -= (*b) The science data arrays are subtracted; the error arrays are combined; the data quality arrays are "or'ed". */ int i, j; /* array indexes */ float aerr; /* a error */ float berr; /* b error */ for (j=0; j < a->sci.data.ny; j++) { for (i=0; i < a->sci.data.nx; i++) { /* error data */ aerr = Pix(a->err.data,i,j); berr = Pix(b->err.data,i,j); Pix(a->err.data,i,j) = sqrt(aerr*aerr + berr*berr); /* science data */ Pix(a->sci.data,i,j) = Pix(a->sci.data,i,j) - Pix(b->sci.data,i,j); /* data quality */ DQSetPix(a->dq.data,i,j, DQPix(a->dq.data,i,j) | DQPix(b->dq.data,i,j) ); } } return (status = 0); } int n_amul (SingleNicmosGroup *a, SingleNicmosGroup *b) { /* Multiply two SingleNicmosGroups, leaving the result in the first. (*a) *= (*b) The science data arrays are multiplied together; the error arrays are combined; the data quality arrays are "or'ed". */ int i, j; /* array indexes */ float a_db; /* a value * b error */ float b_da; /* b value * a error */ for (j=0; j < a->sci.data.ny; j++) { for (i=0; i < a->sci.data.nx; i++) { /* error data */ a_db = Pix(a->sci.data,i,j) * Pix(b->err.data,i,j); b_da = Pix(b->sci.data,i,j) * Pix(a->err.data,i,j); Pix(a->err.data,i,j) = sqrt (a_db*a_db + b_da*b_da); /* science data */ Pix(a->sci.data,i,j) = Pix(a->sci.data,i,j) * Pix(b->sci.data,i,j); /* data quality */ DQSetPix(a->dq.data,i,j, DQPix(a->dq.data,i,j) | DQPix(b->dq.data,i,j) ); } } return (status = 0); } int n_adiv (SingleNicmosGroup *a, SingleNicmosGroup *b) { /* Divide two SingleNicmosGroups, leaving the result in the first. (*a) /= (*b) The science data arrays are divided; the error arrays are combined; the data quality arrays are "or'ed". */ int i, j; /* array indexes */ float asci; /* a science */ float bsci; /* b science */ float bsci2; /* b science squared */ float aerr; /* a error */ float berr; /* b error */ for (j=0; j < a->sci.data.ny; j++) { for (i=0; i < a->sci.data.nx; i++) { /* error and science data */ asci = Pix(a->sci.data,i,j); bsci = Pix(b->sci.data,i,j); bsci2 = bsci*bsci; aerr = Pix(a->err.data,i,j); berr = Pix(b->err.data,i,j); Pix(a->err.data,i,j) = sqrt(aerr*aerr/bsci2 + asci*asci*berr*berr/(bsci2*bsci2)); Pix(a->sci.data,i,j) = asci / bsci; /* data quality */ DQSetPix(a->dq.data,i,j, DQPix(a->dq.data,i,j) | DQPix(b->dq.data,i,j) ); } } return (status = 0); } int n_asubk (SingleNicmosGroup *a, float b) { /* Subtract in-place a constant from a SingleNicmosGroup. (*a) -= b The constant is subtracted from the science data array only; the error and data quality arrays are unchanged. */ int i, j; /* array indexes */ for (j=0; j < a->sci.data.ny; j++) { for (i=0; i < a->sci.data.nx; i++) { /* science data */ Pix(a->sci.data,i,j) = Pix(a->sci.data,i,j) - b; } } return (status = 0); } int n_amulk (SingleNicmosGroup *a, float b) { /* Multiply in-place a SingleNicmosGroup by a constant. (*a) *= b The science and error data arrays are multiplied by the constant; the data quality array is unchanged. */ int i, j; /* array indexes */ for (j=0; j < a->sci.data.ny; j++) { for (i=0; i < a->sci.data.nx; i++) { /* science data */ Pix(a->sci.data,i,j) = Pix(a->sci.data,i,j) * b; /* error data */ Pix(a->err.data,i,j) = Pix(a->err.data,i,j) * b; } } return (status = 0); } int n_aor (SingleNicmosGroup *a, SingleNicmosGroup *b) { /* Take the logical OR of two SingleNicmosGroup DQ arrays, leaving the result ** in the first. (*a.dq) = (*a.dq) | (*b.dq) The science and error data arrays are unchanged. */ int i, j; /* array indexes */ /* data quality */ for (j=0; j < a->dq.data.ny; j++) { for (i=0; i < a->dq.data.nx; i++) { DQSetPix (a->dq.data,i,j, DQPix (a->dq.data,i,j) | DQPix (b->dq.data,i,j) ); } } return (status = 0); }
22.761506
78
0.580882
1738d632646c33a55047d92fa905e031cfd6f877
851
c
C
Sem1/EndSem/1.c
shashi-kant10/nit_lab
2c4c587b23325c26bbf4958b9a19636486ee4b00
[ "MIT" ]
null
null
null
Sem1/EndSem/1.c
shashi-kant10/nit_lab
2c4c587b23325c26bbf4958b9a19636486ee4b00
[ "MIT" ]
null
null
null
Sem1/EndSem/1.c
shashi-kant10/nit_lab
2c4c587b23325c26bbf4958b9a19636486ee4b00
[ "MIT" ]
1
2021-12-23T08:08:04.000Z
2021-12-23T08:08:04.000Z
#include <stdio.h> #include <math.h> void main() { double a, b, c, d, x1, x2; printf("For roots in quadratic equation ax^2 + bx + c = 0\n"); printf("Enter the value of a,b,c : \n"); scanf("%lf %lf %lf", &a, &b, &c); printf("Roots of the quadratic equation %0.lfx^2+%0.lfx+%0.lf=0\n", a, b, c); d = b * b - 4 * a * c; if (d > 0) //both roots are real. { x1 = (-b + sqrt(d)) / (2 * a); x2 = (-b - sqrt(d)) / (2 * a); printf("\tx = %.2lf , %.2lf", x1, x2); } if (d == 0) //both roots are equal. { x1 = x1 = -b / (2 * a); printf("\tx = %.0lf", x1); } if (d < 0) //both roots are imagnary & complex. { d = -d; printf(" x = (-%.0lf+%.1lfi)/%.0lf", b, sqrt(d), (2 * a)); printf(", (-%.0lf-%.1lfi)/%.0lf", b, sqrt(d), (2 * a)); } }
28.366667
81
0.427732
a517affb093b54155694b4bd39afedc73706b9af
398
c
C
chapter07/project15.c
lenablechmann/C-Modern-Approach-by-K.N.-King-Solutions-
7fbe7e1176594f70103e7aaaaf36501152e3dc75
[ "MIT" ]
null
null
null
chapter07/project15.c
lenablechmann/C-Modern-Approach-by-K.N.-King-Solutions-
7fbe7e1176594f70103e7aaaaf36501152e3dc75
[ "MIT" ]
null
null
null
chapter07/project15.c
lenablechmann/C-Modern-Approach-by-K.N.-King-Solutions-
7fbe7e1176594f70103e7aaaaf36501152e3dc75
[ "MIT" ]
null
null
null
#include <stdio.h> #include <math.h> // just in case // computes the factorial of a positive int, int main(void) { int x; long long fact = 1; printf("Enter a positive integer: "); scanf("%d", &x); if (x < 0) { printf("nope, try again"); return 1; } for (int i = 1; i <= x; i++) { fact *= i; } printf("the factorial is %lld\n", fact); return 0; }
14.740741
45
0.530151
9d1e89b1640f0437883bdcb84992259d513a116a
1,524
c
C
lists/lists_env/env_lst_two.c
LuigiEnzoFerrari/minishell
f3c418486c206685f9fec735c163ed3112c66742
[ "MIT" ]
1
2022-03-18T14:26:53.000Z
2022-03-18T14:26:53.000Z
lists/lists_env/env_lst_two.c
LuigiEnzoFerrari/minishell
f3c418486c206685f9fec735c163ed3112c66742
[ "MIT" ]
8
2022-03-04T00:47:03.000Z
2022-03-11T16:30:49.000Z
lists/lists_env/env_lst_two.c
LuigiEnzoFerrari/minishell
f3c418486c206685f9fec735c163ed3112c66742
[ "MIT" ]
1
2022-03-18T14:27:08.000Z
2022-03-18T14:27:08.000Z
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* env_lst_two.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: lenzo-pe <lenzo-pe@student.42sp.org.br> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/27 19:38:46 by lenzo-pe #+# #+# */ /* Updated: 2022/02/27 22:54:02 by lenzo-pe ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" t_environ *get_env(t_environ *envs, char *key) { while (envs != NULL) { if (ft_strcmp(key, envs->key) == 0) return (envs); envs = envs->next; } return (NULL); } void update_env(t_environ *envs, char *key, char *value) { while (envs != NULL) { if (ft_strcmp(envs->key, key) == 0) { free(envs->value); envs->value = ft_strdup(value); return ; } envs = envs->next; } } char *get_env_value(t_environ *envs, char *key) { while (envs != NULL) { if (ft_strcmp(envs->key, key) == 0) break ; envs = envs->next; } if (envs == NULL) return (NULL); return (envs->value); }
29.307692
80
0.316273
77ca902291de61ee5d45313c21b0c62592ff72d3
423
h
C
Stack/stack.h
JV-Amorim/Data-Structures-C
dbdfcfd78cd969cad844720b6907fefae924b380
[ "MIT" ]
1
2020-06-13T19:54:48.000Z
2020-06-13T19:54:48.000Z
Stack/stack.h
JV-Amorim/Data-Structures-C
dbdfcfd78cd969cad844720b6907fefae924b380
[ "MIT" ]
null
null
null
Stack/stack.h
JV-Amorim/Data-Structures-C
dbdfcfd78cd969cad844720b6907fefae924b380
[ "MIT" ]
null
null
null
#ifndef STACK_H #define STACK_H typedef struct _Stack Stack; struct _Stack { int capacity; int top; void **elements; }; Stack* StackFactory(int capacity); int IsTheStackEmpty(Stack* stack); void Push(Stack* stack, void* newElement); void* Pop(Stack* stack); void DesallocateStack(Stack* stack, void (*ElementDesallocationFunction)()); void ShowStackStatus(Stack* stack); void GrowStack(Stack* stack); #endif
20.142857
76
0.744681
a030e9aee6543ec6dfde7822060f6d6594f6c2e5
732
h
C
QMXMFunModule/Classes/XMFun/DeviceConfigManager/DoorConfig/DoorUnlockConfig/DoorUnlockConfig.h
wangdongyang/QMXMFunModule
9dd9537051f2235884e988bdec023ee130475f34
[ "MIT" ]
null
null
null
QMXMFunModule/Classes/XMFun/DeviceConfigManager/DoorConfig/DoorUnlockConfig/DoorUnlockConfig.h
wangdongyang/QMXMFunModule
9dd9537051f2235884e988bdec023ee130475f34
[ "MIT" ]
null
null
null
QMXMFunModule/Classes/XMFun/DeviceConfigManager/DoorConfig/DoorUnlockConfig/DoorUnlockConfig.h
wangdongyang/QMXMFunModule
9dd9537051f2235884e988bdec023ee130475f34
[ "MIT" ]
null
null
null
// // DoorUnlockConfig.h // FunSDKDemo // // Created by XM on 2019/4/9. // Copyright © 2019年 XM. All rights reserved. // /******* 门锁的远程开锁功能 1、获取设备UnlockID 2、通过设备UnlockID和开锁密码进行开锁 ******/ @protocol DoorUnlockDelegate <NSObject> @optional //获取门锁ID回调信息 - (void)DoorUnlockConfigGetResult:(NSInteger)result; //远程开锁回调 - (void)DoorUnlockConfigSetResult:(NSInteger)result; @end #import "ConfigControllerBase.h" NS_ASSUME_NONNULL_BEGIN @interface DoorUnlockConfig : ConfigControllerBase @property (nonatomic, assign) id <DoorUnlockDelegate> delegate; #pragma mark 获取门锁远程开锁的doorUnlockID,调用前需要先判断远程开锁能力级 - (void)getDoorUnlockIDConfig; #pragma mark 远程开锁 - (void)setDoorUnlock:(NSString*)password; @end NS_ASSUME_NONNULL_END
18.3
63
0.765027
a042dcef2e4cc82a2fe3ada253004314a9ee27ea
844
c
C
pre-test/03/main.c
4amup/data-structure-zju
6fd17d006578f53fb5f45539d14bdcf97907a178
[ "MIT" ]
null
null
null
pre-test/03/main.c
4amup/data-structure-zju
6fd17d006578f53fb5f45539d14bdcf97907a178
[ "MIT" ]
null
null
null
pre-test/03/main.c
4amup/data-structure-zju
6fd17d006578f53fb5f45539d14bdcf97907a178
[ "MIT" ]
null
null
null
#include <stdio.h> #define MAXSIZE 100 void moveArray(int *array, int length); int main(int argc, char const *argv[]) { int N; int M; int array[MAXSIZE]; // 参数赋值 scanf("%d %d", &N, &M); // 数组赋值 for (int i = 0; i < N; i++) { scanf("%d", &array[i]); } // 循环往右移动,超过数组长度只需要移动超过的次数 int count = M % N; // N=6,M=2, 数组是123456 for (int i = 0; i < count; i++) { moveArray(array, N); } // 输出数组 for (int i = 0; i < N; i++) { printf("%d", array[i]); if (i < (N - 1)) { printf(" "); } } return 0; } void moveArray(int *array, int length) { int max_idx = length - 1; int max = array[max_idx]; for (int i = max_idx - 1; i >= 0; i--) { array[i + 1] = array[i]; } array[0] = max; };
16.54902
42
0.444313
3fbc2ade5e9285b93a06b86c6b26c0397f460923
1,245
c
C
modules/SysTimer/src/platform/x86_64/pc/plat.c
himanshugoel2797/Cardinal-semicolon
9af4aedb61a1452ceffd256d82cfd39502c1269c
[ "MIT" ]
6
2017-08-21T15:27:59.000Z
2021-12-15T00:23:42.000Z
modules/SysTimer/src/platform/x86_64/pc/plat.c
himanshugoel2797/Cardinal-semicolon
9af4aedb61a1452ceffd256d82cfd39502c1269c
[ "MIT" ]
2
2018-01-01T16:02:12.000Z
2021-06-18T19:44:51.000Z
modules/SysTimer/src/platform/x86_64/pc/plat.c
himanshugoel2797/Cardinal-semicolon
9af4aedb61a1452ceffd256d82cfd39502c1269c
[ "MIT" ]
null
null
null
/** * Copyright (c) 2017 Himanshu Goel * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #include "priv_timers.h" #include "SysInterrupts/interrupts.h" int timer_platform_gettimercount() { return hpet_getcount() + (use_tsc() ? 2 : 0) + 2; } int timer_platform_init() { //Disable the PIT outb(0x43, 0x30); outb(0x40, 0x00); outb(0x40, 0x00); //If TSC timer is constant rate + consistent and the rate is known, just use APIC timer in TSC mode if(use_tsc()) { DEBUG_PRINT("TSC Usable\r\n"); if(tsc_init() != 0) PANIC("TSC Init Error!\r\n"); } else { DEBUG_PRINT("TSC Unusable\r\n"); //Initialize HPET timer - use as reference if(hpet_init() != 0) { //Initialize PIT timer - use as reference if HPET is not available pit_init(); } //Initialize APIC timer as a periodic timer apic_timer_init(); } //Initialize RTC timer - absolute timer/clock rtc_init(); return 0; } int timer_mp_init() { if(use_tsc()) { tsc_mp_init(); } else { apic_timer_init(); } return 0; }
23.942308
104
0.569478
f5e136be6a34b112928c69038304144a79953a1b
1,413
h
C
Vector2D.h
gru2/SmallLA
54695df1289efbab062fc2ddfdffda9c8f71f2d5
[ "MIT" ]
null
null
null
Vector2D.h
gru2/SmallLA
54695df1289efbab062fc2ddfdffda9c8f71f2d5
[ "MIT" ]
null
null
null
Vector2D.h
gru2/SmallLA
54695df1289efbab062fc2ddfdffda9c8f71f2d5
[ "MIT" ]
null
null
null
#ifndef __VECTOR2D_H #define __VECTOR2D_H #include <math.h> class Vector2D { public: double x; double y; Vector2D() { x = 0; y = 0; } Vector2D(double a) { x = a; y = a; } Vector2D(double ax, double ay) { x = ax; y = ay; } Vector2D(const Vector2D &a) { x = a.x; y = a.y; } Vector2D uminus() { return Vector2D(-x, -y); } Vector2D plus(const Vector2D &v) { return Vector2D(x + v.x, y + v.y); } void plusEquals(const Vector2D &v) { x += v.x; y += v.y; } Vector2D minus(const Vector2D &v) { return Vector2D(x - v.x, y - v.y); } void minusEquals(const Vector2D &v) { x -= v.x; y -= v.y; } Vector2D times(double ax) { return Vector2D(x * ax, y * ax); } void timesEquals(double ax) { x *= ax; y *= ax; } Vector2D divide(double ax) { return times(1.0/ax); } void divideEquals(double ax) { timesEquals(1.0/ax); } double dot(const Vector2D &v) { double s = x * v.x + y * v.y; return s; } Vector2D normalize() { return divide(length()); } void normalizeInPlace() { divideEquals(length()); } double length() { return sqrt(squaredLength()); } double squaredLength() { double s = 0; s += x * x; s += y * y; return s; } double distance(const Vector2D &v) { return sqrt(squaredDistance(v)); } double squaredDistance(const Vector2D &v) { double s = (x - v.x) * (x - v.x) + (y - v.y) * (y - v.y); return s; } }; #endif
16.623529
44
0.579618
64cff52da7f98c471292d8977dc9be3d8302e73e
1,584
h
C
IL2CPP/Il2CppOutputProject/IL2CPP/external/mono/mono/utils/mono-codeman.h
dngoins/AutographTheWorld-MR
24e567c8030b73a6942e25b36b7370667c649b90
[ "MIT" ]
172
2018-10-31T13:47:10.000Z
2022-02-21T12:08:20.000Z
IL2CPP/Il2CppOutputProject/IL2CPP/external/mono/mono/utils/mono-codeman.h
dngoins/AutographTheWorld-MR
24e567c8030b73a6942e25b36b7370667c649b90
[ "MIT" ]
51
2018-11-01T12:46:25.000Z
2021-12-14T15:16:15.000Z
IL2CPP/Il2CppOutputProject/IL2CPP/external/mono/mono/utils/mono-codeman.h
dngoins/AutographTheWorld-MR
24e567c8030b73a6942e25b36b7370667c649b90
[ "MIT" ]
72
2018-10-31T13:50:02.000Z
2022-03-14T09:10:35.000Z
/** * \file */ #ifndef __MONO_CODEMAN_H__ #define __MONO_CODEMAN_H__ #include <mono/utils/mono-publib.h> typedef struct _MonoCodeManager MonoCodeManager; typedef struct { void (*chunk_new) (void *chunk, int size); void (*chunk_destroy) (void *chunk); } MonoCodeManagerCallbacks; MONO_API MonoCodeManager* mono_code_manager_new (void); MONO_API MonoCodeManager* mono_code_manager_new_dynamic (void); MONO_API void mono_code_manager_destroy (MonoCodeManager *cman); MONO_API void mono_code_manager_invalidate (MonoCodeManager *cman); MONO_API void mono_code_manager_set_read_only (MonoCodeManager *cman); MONO_API void* mono_code_manager_reserve_align (MonoCodeManager *cman, int size, int alignment); MONO_API void* mono_code_manager_reserve (MonoCodeManager *cman, int size); MONO_API void mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsize); MONO_API int mono_code_manager_size (MonoCodeManager *cman, int *used_size); MONO_API void mono_code_manager_init (void); MONO_API void mono_code_manager_cleanup (void); MONO_API void mono_code_manager_install_callbacks (MonoCodeManagerCallbacks* callbacks); /* find the extra block allocated to resolve branches close to code */ typedef int (*MonoCodeManagerFunc) (void *data, int csize, int size, void *user_data); void mono_code_manager_foreach (MonoCodeManager *cman, MonoCodeManagerFunc func, void *user_data); #endif /* __MONO_CODEMAN_H__ */
41.684211
111
0.738005
64ef0ea2d7d682a4cf6c09b6fade77d3d7a7a7e0
4,577
c
C
Lab07/ex07_03.c
ThomasVitale/Operating-Systems-05CJCOA-
e5a52204f719769b5dfc2ecae09a1a946f4ff5aa
[ "MIT" ]
null
null
null
Lab07/ex07_03.c
ThomasVitale/Operating-Systems-05CJCOA-
e5a52204f719769b5dfc2ecae09a1a946f4ff5aa
[ "MIT" ]
null
null
null
Lab07/ex07_03.c
ThomasVitale/Operating-Systems-05CJCOA-
e5a52204f719769b5dfc2ecae09a1a946f4ff5aa
[ "MIT" ]
null
null
null
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> #define MAXPATH 200 #define MAXSIZE 1000 void* tf(void*); int* read_file(char*, int*); void sort (int*, int); int merge(int*, int*, int*, int, int); void print(int*, int); void write_file(int*, int, char*); int **matrix; int *thFlags; struct threadargs { int id; char filein[MAXPATH]; }; typedef struct threadargs threadArgs; int main(int argc, char* argv[]) { int i, n, m, indexr, indexc, index; pthread_t *tid; threadArgs *ta; int ndone=0; int t=0; int *vettMerge; int sizeMerge=0; int *vt, vtSize, *vtmp, vtmpSize; if (argc != 3) { fprintf(stderr, "Errore numero argomenti.\n"); return -1; } /* Numero file */ n = atoi(argv[1]); /* Alloco tid */ tid = (pthread_t*) malloc(n*sizeof(pthread_t)); /* Alloco e inizializzo flags */ thFlags = (int*) malloc(n*sizeof(int)); for(m=0; m<n; m++) { thFlags[m] = 0; } /* Alloco matrix */ fprintf(stdout, "Alloco matrix.\n"); matrix = malloc(n*sizeof(int*)); for(index=0; index<n; index++) { matrix[index] = malloc(MAXSIZE*sizeof(int)); } /* Inizializzo matrix */ fprintf(stdout, "Inizializzo matrix.\n"); for (indexr=0; indexr<n; indexr++) { for(indexc=0; indexc<MAXSIZE; indexc++) { matrix[indexr][indexc] = 0; } } /* Ciclo thread */ for (i=0; i<n; i++) { fprintf(stdout, "Creo thread.\n"); /* Alloco struct */ ta = (threadArgs*) malloc(sizeof(threadArgs)); ta->id = i; /* Genero nomi file */ sprintf(ta->filein, "%s", (char*) argv[2]); sprintf(ta->filein, "%s%d%s", ta->filein, i+1, ".txt"); /* Creo thread */ pthread_create(&tid[i], NULL, tf, (void*) ta); } /* Alloco vettMerge */ vettMerge = (int*) malloc((MAXSIZE*n)*sizeof(int)); /* Inizializzo vettMerge */ for (m=0; m<(MAXSIZE*n); m++) { vettMerge[m] = 0; } fprintf(stdout, "Inizio operazioni di merging: n=%d\n", n); /* Operazione merge */ while(ndone < n) { if (thFlags[t] == 1) { thFlags[t] = 0; vt = (int*) (matrix[t]+1); vtSize = matrix[t][0]; vtmpSize = sizeMerge; /* Alloco vtmp */ vtmp = (int*) malloc((MAXSIZE*n)*sizeof(int)); /* Inizializzo vtmp tramite vettMerge */ for (m=0; m<vtmpSize; m++) { vtmp[m] = vettMerge[m]; } sizeMerge = merge(vt, vtmp, vettMerge, vtSize, vtmpSize); free(vtmp); fprintf(stdout, "Step %d: vett merge= ", ndone); print(vettMerge, sizeMerge); ndone++; } t++; t = t%n; sleep(1); } write_file(vettMerge, sizeMerge, "finaloutput.txt"); /* Libera memoria */ free(vettMerge); for(index=0; index<n; index++) { free(matrix[index]); } free(matrix); free(tid); return 0; } void* tf(void* arg) { threadArgs *ta; char* filename; int size, *vett=NULL; int i; ta = (threadArgs*) arg; filename = ta->filein; vett = read_file(filename, &size); sort(vett, size); /* Copia vettore in matrix */ matrix[ta->id][0] = size; for (i=1; i<=size; i++) { matrix[ta->id][i] = vett[i-1]; } thFlags[ta->id] = 1; free(vett); free(ta); pthread_exit((int*)NULL); } int* read_file(char* filename, int* size) { FILE* fp; int* vett; int i=0, v, N; if ((fp = fopen(filename, "r")) == NULL) { fprintf(stderr, "Errore apertura file in lettura.\n"); exit(-1); } fscanf(fp, "%d", &N); vett = (int*) malloc(N*sizeof(int)); while (fscanf(fp, "%d", &v) > 0) { vett[i] = v; i++; } *size = N; fclose(fp); return vett; } void sort (int* vett, int size) { int i,j, tmp; for(i=0; i<size-1; i++) { for(j=0; j<size-1-i; j++) { if (vett[j]>vett[j+1]) { tmp = vett[j]; vett[j] = vett[j+1]; vett[j+1] = tmp; } } } return; } int merge(int* v1, int* v2, int* vettMerge, int size_v1, int size_v2) { int size_vettMerge; int i,j,k; i=j=k=0; while (i<size_v1 && j<size_v2) { if (v1[i]<v2[j]) vettMerge[k++] = v1[i++]; else vettMerge[k++] = v2[j++]; } while (i<size_v1) { vettMerge[k++] = v1[i++]; } while (j<size_v2) { vettMerge[k++] = v2[j++]; } size_vettMerge = size_v1+size_v2; return size_vettMerge; } void print(int* vett, int size) { int i; for(i=0; i<size; i++) { fprintf(stdout, "%d ", vett[i]); } fprintf(stdout, "\n"); return; } void write_file(int* vett, int size, char* filename) { FILE* fp; int i; if ((fp = fopen(filename, "w+")) == NULL) { fprintf(stderr, "Errore apertura file in scrittura.\n"); exit(-2); } for(i=0; i<size; i++) { fprintf(fp, "%d\n", vett[i]); } fclose(fp); }
16.951852
71
0.569369
3a6d81d3bc88fa8ba07f0c76044036c1516adfc6
42
c
C
host/src/nrf_stubs.c
crownstone/bluenet
3ec3cb54712b8761e1ed03804d77d1d7aaee1b1e
[ "Apache-2.0", "MIT" ]
45
2016-06-17T02:40:19.000Z
2022-01-19T00:21:49.000Z
host/src/nrf_stubs.c
crownstone/bluenet
3ec3cb54712b8761e1ed03804d77d1d7aaee1b1e
[ "Apache-2.0", "MIT" ]
111
2016-06-06T16:18:06.000Z
2022-03-25T14:31:20.000Z
host/src/nrf_stubs.c
crownstone/bluenet
3ec3cb54712b8761e1ed03804d77d1d7aaee1b1e
[ "Apache-2.0", "MIT" ]
31
2016-07-27T21:33:10.000Z
2021-11-17T09:40:11.000Z
#include <nrf_stubs.h> #include <nrf.h>
8.4
22
0.666667
07ee7c2657848e9bfe5aeaaa78ec116bf685fd23
4,473
h
C
phasta/phOutput.h
zhang-alvin/core
e4235b451a175fdebc3077b2d5dcde47ba292d82
[ "BSD-3-Clause" ]
6
2019-02-28T12:41:25.000Z
2019-05-24T06:50:32.000Z
phasta/phOutput.h
zhang-alvin/core
e4235b451a175fdebc3077b2d5dcde47ba292d82
[ "BSD-3-Clause" ]
null
null
null
phasta/phOutput.h
zhang-alvin/core
e4235b451a175fdebc3077b2d5dcde47ba292d82
[ "BSD-3-Clause" ]
1
2021-08-20T18:10:14.000Z
2021-08-20T18:10:14.000Z
#ifndef PH_OUTPUT_H #define PH_OUTPUT_H #include "phInput.h" #include "phBlock.h" #include "phBC.h" namespace apf { class Mesh; class MeshEntity; } struct GRStream; namespace ph { struct EnsaArrays { double* coordinates; /* describes inter-part connectivity, see ph::encodeILWORK */ int* ilwork; /* describes inter-part element connectivity, see ph::encodeILWORKF */ int* ilworkf; /* periodic masters array, one per node... */ int* iper; /* note: int will overflow at about 2 billion total nodes */ int* globalNodeNumbers; /* ien[i][j][k] is the local vertex id of vertex k of element j of interior block i */ int*** ien; /* ienb[i][j][k] is the local vertex id of vertex k of element j of boundary block i */ int*** ienb; /* ienif0,1[i][j][k] are the local vertex id of vertex k of element j of interface block i ienif0 and ienif1 correspond to the two elements on the interface */ int*** ienif0; int*** ienif1; /* mattype[i][j] is the material type of element j of interior block i */ int** mattype; /* mattypeb[i][j] is the material type of element j of boundary block i */ int** mattypeb; /* mattypeif0,1[i][j] are the material types of element j of interface blocks 0,1 i */ int** mattypeif0; int** mattypeif1; /* ibcb[i][j][k] is the natural boundary condition status code number k in [0,1] of element j of boundary block i */ /* ibcb (part 0) has these bits: MF NP TV HF TW F1 F2 F3 F4 TVM 0 1 2 3 4 5 6 7 8 9 part 1 is just the value of SID */ int*** ibcb; /* bcb[i][j][k] is the natural boundary condition value for boundary condition k of element j of boundary block i */ /* bcb is organized as follows: MF NP TV HF F1 F2 F3 F4 --TVM--- 0 1 2 3 4 5 6 7 8 9 10 11 12 */ double*** bcb; /* nbc[i] is the index into essential boundary condition arrays of local node i (probably ;) */ int* nbc; /* ibc[i] is the essential boundary condition status code of essential BC node i */ /* ibc bits are as follows: var: rho t p u v w sc1 sc2 sc3 sc4 perio --NULL-- eu ev ew bit: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ int* ibc; /* bc[i][j] is the essential boundary condition value of essential boundary condition j of essential BC node i */ /* bc is organized as follows: var: rho t p c11 c12 c13 m1 c21 c22 c23 m2 theta sc1 sc2 sc3 sc4 ec11 ec12 ec13 em1 ec21 ec22 ec23 em2 idx: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */ double** bc; /* encodes part-local element to element connectivity */ int* ienneigh; /* encodes parallel communication between mesh edges */ int* ilworkl; /* tetrahedra to local edges, already in FORTRAN order and from 1 */ int* iel; /* edges to tetrahedra offsets */ int* ileo; /* edges to tetrahedra adjacencies */ int* ile; /* layered mesh growth curves: first layer thickness */ double* gcflt; /* layered mesh growth curves: growth ratio */ double* gcgr; /* layered mesh growth curves: number of vertices on each growth curve */ int* igcnv; /* layered mesh growth curves: list of vertices */ apf::MeshEntity** igclv; /* layered mesh growth curves: list of vertice IDs */ int* igclvid; /* mesh to geometry, classification info (dim and tag) */ int* m2gClsfcn; /* mesh to geometry, parametric coordinate */ double* m2gParCoord; /* an integer to indicate if a vertex is on interface */ int* interfaceFlag; /* IDs of rigid bodies */ int* rigidBodyIDs; /* model tags of rigid bodies */ int* rigidBodyMTs; /* an integer to indicate rigid body tag of a vertex */ int* rigidBodyTag; }; struct Output { ~Output(); Input* in; apf::Mesh* mesh; int nOverlapNodes; int nOwnedNodes; int nBoundaryElements; int nInterfaceElements; int nMaxElementNodes; int nEssentialBCNodes; int nOverlapEdges; int nlwork; /* size of arrays.ilwork */ int nlworkf; /* size of arrays.ilworkf */ int nlworkl; /* size of arrays.ilworkl */ int nGrowthCurves; /* number of growth curves */ int nLayeredMeshVertices; /* number of layered mesh vertices */ bool hasDGInterface; bool numRigidBody; FILE* (*openfile_write)(Output& out, const char* path); GRStream* grs; AllBlocks blocks; EnsaArrays arrays; }; void generateOutput(Input& in, BCs& bcs, apf::Mesh* mesh, Output& o); void writeGeomBC(Output& o, std::string path, int timestep_or_dat = 0); } #endif
27.441718
106
0.67002
07636470b64436c8cde139adc3a8a218f3b1b41d
1,179
h
C
src/OrbitGl/TrackTestData.h
ioperations/orbit
c7935085023cce1abb70ce96dd03339f47a1c826
[ "BSD-2-Clause" ]
716
2017-09-22T11:50:40.000Z
2020-03-14T21:52:22.000Z
src/OrbitGl/TrackTestData.h
ioperations/orbit
c7935085023cce1abb70ce96dd03339f47a1c826
[ "BSD-2-Clause" ]
132
2017-09-24T11:48:18.000Z
2020-03-17T17:39:45.000Z
src/OrbitGl/TrackTestData.h
ioperations/orbit
c7935085023cce1abb70ce96dd03339f47a1c826
[ "BSD-2-Clause" ]
49
2017-09-23T10:23:59.000Z
2020-03-14T09:27:49.000Z
// Copyright (c) 2021 The Orbit 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 ORBIT_GL_TRACK_TEST_DATA_H_ #define ORBIT_GL_TRACK_TEST_DATA_H_ #include <cstdint> #include <memory> #include <vector> #include "ClientData/CaptureData.h" #include "ClientProtos/capture_data.pb.h" namespace orbit_gl { struct TrackTestData { static constexpr uint64_t kCallstackId = 1; static constexpr uint64_t kFunctionAbsoluteAddress = 0x30; static constexpr uint64_t kInstructionAbsoluteAddress = 0x31; static constexpr int32_t kThreadId = 42; static constexpr const char* kFunctionName = "example function"; static constexpr const char* kModuleName = "example module"; static constexpr const char* kThreadName = "example thread"; static constexpr size_t kTimerOnlyThreadId = 128; static constexpr const char* kTimerOnlyThreadName = "timer only thread"; static std::unique_ptr<orbit_client_data::CaptureData> GenerateTestCaptureData(); static std::vector<orbit_client_protos::TimerInfo> GenerateTimers(); }; } // namespace orbit_gl #endif // ORBIT_GL_TRACK_TEST_DATA_H_
33.685714
83
0.78626
e08fce581a98b5f096d816ae4a14c12ba9e7e513
775
h
C
src/err/exceptions.h
JamsRamen/Polycube
e2f4233361e1a87f461fb879e02964dff6a708d6
[ "MIT" ]
2
2020-09-09T16:36:36.000Z
2021-11-01T17:59:06.000Z
src/err/exceptions.h
jamesrayman/Polycube
e2f4233361e1a87f461fb879e02964dff6a708d6
[ "MIT" ]
9
2020-09-15T15:57:51.000Z
2021-06-07T23:18:13.000Z
src/err/exceptions.h
jamesrayman/Polycube
e2f4233361e1a87f461fb879e02964dff6a708d6
[ "MIT" ]
null
null
null
#pragma once #include <exception> #include <string> namespace err { class Exception : public std::exception { protected: std::string message; public: virtual const char* what() const throw(); }; class CliOptions : public Exception { public: CliOptions (const std::string&); }; class FileNotFound : public Exception { public: FileNotFound (const std::string&); }; class PuzzleFormat : public Exception { public: PuzzleFormat (const std::string&); }; class PolycubeName : public Exception { public: PolycubeName (const std::string&); }; class PolycubeNotFound : public Exception { public: PolycubeNotFound (const std::string&); }; }
19.375
49
0.603871
a681260086b9dc8686a4da151590f9bfbb2166a5
154
h
C
src/socket/packet_hook.h
YanayGoor/MyRootkit
4e34665275f9ace34edad34c2262570a02b7b6e3
[ "MIT" ]
3
2020-08-27T19:19:32.000Z
2021-04-22T10:07:42.000Z
src/socket/packet_hook.h
YanayGoor/MyRootkit
4e34665275f9ace34edad34c2262570a02b7b6e3
[ "MIT" ]
4
2020-10-11T20:27:38.000Z
2021-04-03T17:37:59.000Z
src/socket/packet_hook.h
YanayGoor/MyRootkit
4e34665275f9ace34edad34c2262570a02b7b6e3
[ "MIT" ]
1
2021-03-19T12:28:09.000Z
2021-03-19T12:28:09.000Z
#ifndef PACKET_HOOK_H int is_packet_sock(struct socket *sock); void hook_packet_sock(struct socket *sock); #define PACKET_HOOK_H #endif // PACKET_HOOK_H
22
43
0.811688
8163740b0f1545c80ba1aaf76e9c2990c6e4f176
1,393
h
C
FWDraggableSwipePlayer/src/FWDraggablePlayerManager.h
TheLittleBoy/FWPlayer
10e04764af4d22444bf1d8185f2d0af307b51830
[ "MIT" ]
90
2015-01-26T09:59:49.000Z
2021-05-20T07:46:56.000Z
FWDraggableSwipePlayer/src/FWDraggablePlayerManager.h
TheLittleBoy/FWPlayer
10e04764af4d22444bf1d8185f2d0af307b51830
[ "MIT" ]
2
2015-04-23T13:16:18.000Z
2015-06-04T17:36:08.000Z
FWDraggableSwipePlayer/src/FWDraggablePlayerManager.h
TheLittleBoy/FWPlayer
10e04764af4d22444bf1d8185f2d0af307b51830
[ "MIT" ]
22
2015-01-29T02:26:13.000Z
2019-07-17T13:36:30.000Z
// // FWDraggablePlayerManager.h // FWDraggableSwipePlayer // // Created by Filly Wang on 20/1/15. // Copyright (c) 2015 Filly Wang. All rights reserved. // #import <Foundation/Foundation.h> #import "FWSwipePlayerBackgroundView.h" #import "FWSwipePlayerViewController.h" #import "FWSwipePlayerConfig.h" @class MovieDetailView; extern NSString *FWSwipePlayerViewStateChange; typedef enum _FWSwipeState { FWSwipeNone = 0, FWSwipeUp = 1, FWSwipeDown = 2, FWSwipeLeft = 3, FWSwipeRight = 4 } FWSwipeState; @interface FWDraggablePlayerManager : NSObject<UIGestureRecognizerDelegate, FWPlayerDelegate> @property (nonatomic, strong) FWSwipePlayerBackgroundView *backgroundView; @property (nonatomic, strong) FWSwipePlayerViewController *playerController; @property (nonatomic, assign) FWSwipeState swipeState; @property (nonatomic, strong) MovieDetailView *detailView; - (id)initWithInfo:(NSDictionary *)infoDict; - (id)initWithInfo:(NSDictionary *)infoDict Config:(FWSwipePlayerConfig*)config; - (id)initWithList:(NSArray *)dataList; - (id)initWithList:(NSArray *)list Config:(FWSwipePlayerConfig*)config; - (void)updateInfo:(NSDictionary *)infoDict; - (void)showAtController:(UIViewController *)controller; - (void)showAtView:(UIView *)view; - (void)showAtControllerAndPlay:(UIViewController *)controller; - (void)showAtViewAndPlay:(UIView *)view; - (void)exit; @end
31.659091
93
0.775305
8e510f5648517611edac710dc4c324ec7f694cba
883
h
C
src/file-updater.h
stream-labs/a-files-updater
deefb0b90b7fa801bb7e7b323ef02e7efa516c49
[ "MIT" ]
4
2019-03-28T12:10:59.000Z
2021-11-08T10:24:26.000Z
src/file-updater.h
stream-labs/a-files-updater
deefb0b90b7fa801bb7e7b323ef02e7efa516c49
[ "MIT" ]
2
2018-11-27T18:10:57.000Z
2019-07-29T23:34:38.000Z
src/file-updater.h
stream-labs/a-files-updater
deefb0b90b7fa801bb7e7b323ef02e7efa516c49
[ "MIT" ]
4
2018-12-21T22:03:21.000Z
2021-10-23T00:18:53.000Z
#pragma once #include "utils.hpp" #include <filesystem> namespace fs = std::filesystem; struct update_client; struct FileUpdater { FileUpdater() = delete; FileUpdater(FileUpdater&&) = delete; FileUpdater(const FileUpdater&) = delete; FileUpdater &operator=(const FileUpdater&) = delete; FileUpdater &operator=(FileUpdater&&) = delete; explicit FileUpdater(fs::path old_files_dir, fs::path app_dir, fs::path new_files_dir, const manifest_map_t & manifest); ~FileUpdater(); void update(); bool update_entry(manifest_map_t::const_iterator &iter, fs::path & new_files_dir); bool update_entry_with_retries(manifest_map_t::const_iterator &iter, fs::path & new_files_dir); void revert(); bool reset_rights(const fs::path& path); bool backup(); private: fs::path m_old_files_dir; fs::path m_app_dir; fs::path m_new_files_dir; const manifest_map_t & m_manifest; };
25.970588
121
0.754247
fc68188be56ab2dc8159972a346192060353c4df
3,942
h
C
inc/routing_table.h
mariebidouille/Luos
3e4818707e09e8590f34d5d0055ad3dcccea9bb9
[ "Apache-2.0" ]
null
null
null
inc/routing_table.h
mariebidouille/Luos
3e4818707e09e8590f34d5d0055ad3dcccea9bb9
[ "Apache-2.0" ]
null
null
null
inc/routing_table.h
mariebidouille/Luos
3e4818707e09e8590f34d5d0055ad3dcccea9bb9
[ "Apache-2.0" ]
null
null
null
/****************************************************************************** * @file routingTable * @brief routing table descrption function * @author Luos * @version 0.0.0 ******************************************************************************/ #ifndef TABLE #define TABLE #include "luos.h" /******************************************************************************* * Definitions ******************************************************************************/ #ifndef MAX_RTB_ENTRY #define MAX_RTB_ENTRY 40 #endif typedef enum { CLEAR, // No content SERVICE, // Contain a service informations NODE, // Contain a node informations } entry_mode_t; /******************************************************************************* * Variables ******************************************************************************/ /* This structure is used to receive or send messages between services in slave * and master mode. * please refer to the documentation */ typedef struct __attribute__((__packed__)) { entry_mode_t mode; union { struct __attribute__((__packed__)) { // SERVICE mode entry uint16_t id; // Service ID. uint16_t type; // Service type. access_t access; // Service Access char alias[MAX_ALIAS_SIZE]; // Service alias. }; struct __attribute__((__packed__)) { // NODE mode entry // Watch out this structure have a lot similarities with the node_t struct. // It is similar to allow copy of a node_t struct directly in this one. // But you there is potentially a port_table size difference so // Do not replace it with node_t struct. struct __attribute__((__packed__)) { uint16_t node_id : 12; // Node id uint16_t certified : 4; // True if the node have a certificate }; uint16_t port_table[(MAX_ALIAS_SIZE + 2 + 2 + sizeof(access_t) - 2) / 2]; // Node link table }; uint8_t unmap_data[MAX_ALIAS_SIZE + 2 + 2 + sizeof(access_t)]; }; } routing_table_t; /******************************************************************************* * Function ******************************************************************************/ // ********************* routing_table search tools ************************ uint16_t RoutingTB_IDFromAlias(char *alias); uint16_t RoutingTB_IDFromType(luos_type_t type); uint16_t RoutingTB_IDFromClosestType(service_t *service, luos_type_t type); uint16_t RoutingTB_IDFromService(service_t *service); char *RoutingTB_AliasFromId(uint16_t id); luos_type_t RoutingTB_TypeFromID(uint16_t id); luos_type_t RoutingTB_TypeFromAlias(char *alias); char *RoutingTB_StringFromType(luos_type_t type); uint16_t RoutingTB_NodeIDFromID(uint16_t id); uint8_t RoutingTB_ServiceIsSensor(luos_type_t type); uint16_t RoutingTB_GetNodeNB(void); uint16_t RoutingTB_GetNodeID(uint16_t index); uint16_t RoutingTB_GetServiceNB(void); uint16_t RoutingTB_GetServiceID(uint16_t index); uint16_t RoutingTB_GetServiceIndex(uint16_t id); entry_mode_t RoutingTB_GetMode(uint16_t index); uint16_t RoutingTB_BigestID(void); // ********************* routing_table management tools ************************ void RoutingTB_ComputeRoutingTableEntryNB(void); void RoutingTB_DetectServices(service_t *service); void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node); void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service); void RoutingTB_RemoveNode(uint16_t nodeid); void RoutingTB_RemoveOnRoutingTable(uint16_t id); void RoutingTB_Erase(void); routing_table_t *RoutingTB_Get(void); uint16_t RoutingTB_GetLastService(void); uint16_t *RoutingTB_GetLastNode(void); uint16_t RoutingTB_GetLastEntry(void); #endif /* TABLE */
40.639175
104
0.581684
f9e236519804cc0617817f258f8084d2193acfdf
2,469
h
C
System/Library/PrivateFrameworks/NewsCore.framework/FCPrivateDataContext.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
2
2021-11-02T09:23:27.000Z
2022-03-28T08:21:57.000Z
System/Library/PrivateFrameworks/NewsCore.framework/FCPrivateDataContext.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/NewsCore.framework/FCPrivateDataContext.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
1
2022-03-28T08:21:59.000Z
2022-03-28T08:21:59.000Z
/* * This header is generated by classdump-dyld 1.5 * on Friday, April 30, 2021 at 11:37:37 AM Mountain Standard Time * Operating System: Version 13.5.1 (Build 17F80) * Image Source: /System/Library/PrivateFrameworks/NewsCore.framework/NewsCore * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. Updated by Kevin Bradley. */ @class FCIssueReadingHistory, FCPersonalizationData, FCPrivateChannelMembershipController, FCReadingHistory, FCReadingList, FCSubscriptionList, FCUserInfo, FCTagSettings, FCNetworkBehaviorMonitor, NSString; @protocol FCPrivateDataContext <NSObject> @property (nonatomic,readonly) FCIssueReadingHistory * issueReadingHistory; @property (nonatomic,readonly) FCPersonalizationData * personalizationData; @property (nonatomic,readonly) FCPrivateChannelMembershipController * privateChannelMembershipController; @property (nonatomic,readonly) FCReadingHistory * readingHistory; @property (nonatomic,readonly) FCReadingList * readingList; @property (nonatomic,readonly) FCSubscriptionList * subscriptionList; @property (nonatomic,readonly) FCUserInfo * userInfo; @property (nonatomic,readonly) FCTagSettings * tagSettings; @property (nonatomic,readonly) FCNetworkBehaviorMonitor * networkBehaviorMonitor; @property (nonatomic,readonly) id<FCPushNotificationHandling> privatePushNotificationHandler; @property (getter=isPrivateDataSyncingEnabled,nonatomic,readonly) BOOL privateDataSyncingEnabled; @property (nonatomic,copy,readonly) NSString * privateDataDirectory; @property (nonatomic,readonly) id<FCPrivateDataContextInternal> internalPrivateDataContext; @required -(FCUserInfo *)userInfo; -(FCPersonalizationData *)personalizationData; -(FCSubscriptionList *)subscriptionList; -(NSString *)privateDataDirectory; -(FCTagSettings *)tagSettings; -(FCPrivateChannelMembershipController *)privateChannelMembershipController; -(FCReadingHistory *)readingHistory; -(FCReadingList *)readingList; -(id<FCPrivateDataContextInternal>)internalPrivateDataContext; -(FCIssueReadingHistory *)issueReadingHistory; -(BOOL)isPrivateDataSyncingEnabled; -(id)privateStoreWithName:(id)arg1 version:(unsigned long long)arg2 options:(unsigned long long)arg3; -(id<FCPushNotificationHandling>)privatePushNotificationHandler; -(FCNetworkBehaviorMonitor *)networkBehaviorMonitor; @end
56.113636
206
0.788173
525093097aaf4e40c0e6a68796b5492af76afbb6
3,536
c
C
interp.c
Grissess/tinylisp
08150e0584076bcbc86de761175fa2dd9152bc74
[ "Apache-2.0" ]
1
2019-02-20T05:42:37.000Z
2019-02-20T05:42:37.000Z
interp.c
Grissess/tinylisp
08150e0584076bcbc86de761175fa2dd9152bc74
[ "Apache-2.0" ]
null
null
null
interp.c
Grissess/tinylisp
08150e0584076bcbc86de761175fa2dd9152bc74
[ "Apache-2.0" ]
null
null
null
#include "tinylisp.h" extern tl_init_ent __start_tl_init_ents, __stop_tl_init_ents; /** An internal macro for creating a new binding inside of a frame. */ #define _tl_frm_set(sm, obj, fm) tl_new_pair(in, tl_new_pair(in, tl_new_sym(in, sm), obj), fm) #include <stdio.h> #include <stdlib.h> static int _readf(tl_interp *in) { return getchar(); } static void _writef(tl_interp *in, const char c) { putchar(c); } static int _modloadf(tl_interp *in, const char *fn) { return 0; } static void *_reallocf(tl_interp *in, void *ptr, size_t s) { return realloc(ptr, s); } /** Initialize a TinyLISP interpreter. * * This function properly initializes the fields of a `tl_interp`, after which * the interpreter may be considered valid, and can run evaluations. (It is * undefined behavior to use an interpreter before it is initialized.) * * The source for this function is a logical place to add more language * builtins if a module would not suffice. * * Other initialization may need to follow calling this function; for example, * if the implementation wants to override IO, it may set the interpreter's * `readf` and `writef` functions. If they are to be functionally used, the * host environment probably wants to set the `modloadf` function. The ones * declared here use the simplest implementation from stdio.h (which may be * minilibc's stdio). * * This function calls tl_interp_init_alloc() with the system default * allocator, as provided through malloc and free. */ void tl_interp_init(tl_interp *in) { tl_interp_init_alloc(in, _reallocf); } /** Initialize a TinyLISP interpreter with a custom allocator. * * This function is the core of tl_interp_init() and does all of the tasks it * does, but receives two function pointers as arguments corresponding to * tl_interp::mallocf and tl_interp::freef which can be used to adjust the * allocator used for the initializing allocations done by the interpreter (and * thereafter). * * See tl_interp_init() for other details. */ void tl_interp_init_alloc(tl_interp *in, void *(*reallocf)(tl_interp *, void *, size_t)) { in->reallocf = reallocf; in->readf = _readf; in->writef = _writef; #ifdef CONFIG_MODULES in->modloadf = _modloadf; #endif tl_ns_init(in, &in->ns); in->top_alloc = NULL; in->true_ = tl_new_sym(in, "tl-#t"); in->false_ = tl_new_sym(in, "tl-#f"); in->error = NULL; in->prefixes = TL_EMPTY_LIST; in->current = TL_EMPTY_LIST; in->conts = TL_EMPTY_LIST; in->values = TL_EMPTY_LIST; in->rescue = TL_EMPTY_LIST; in->gc_events = 65536; in->ctr_events = 0; in->putback = 0; in->is_putback = 0; in->disp_sep = '\t'; in->top_env = TL_EMPTY_LIST; tl_object *top_frm = TL_EMPTY_LIST; tl_init_ent *current = &__start_tl_init_ents; top_frm = _tl_frm_set("tl-#t", in->true_, top_frm); top_frm = _tl_frm_set("tl-#f", in->false_, top_frm); while(current != &__stop_tl_init_ents) { top_frm = _tl_frm_set( current->name, current->flags & TL_EF_BYVAL ? _tl_new_cfunc_byval(in, current->fn, current->name) : _tl_new_cfunc(in, current->fn, current->name), top_frm ); current++; } in->top_env = tl_new_pair(in, top_frm, in->top_env); in->env = in->top_env; } /** Finalizes a module. * * For the most part, this frees all memory allocated by the interpreter, * leaving many of its pointers dangling. It is undefined behavior to use an * interpreter after it has been finalized. */ void tl_interp_cleanup(tl_interp *in) { while(in->top_alloc) { tl_free(in, in->top_alloc); } tl_ns_free(in, &in->ns); }
33.358491
135
0.722285
500e9482d906ff86c5f40857b0044768418846e2
734
c
C
randomgen/src/threefry32/threefry32.c
ulido/randomgen
45258d0bc13868a89ea61aea7506ac2d78d4d081
[ "NCSA" ]
null
null
null
randomgen/src/threefry32/threefry32.c
ulido/randomgen
45258d0bc13868a89ea61aea7506ac2d78d4d081
[ "NCSA" ]
null
null
null
randomgen/src/threefry32/threefry32.c
ulido/randomgen
45258d0bc13868a89ea61aea7506ac2d78d4d081
[ "NCSA" ]
null
null
null
#include "threefry32.h" extern INLINE uint64_t threefry32_next64(threefry32_state *state); extern INLINE uint32_t threefry32_next32(threefry32_state *state); extern void threefry32_jump(threefry32_state *state) { /* Advances state as-if 2^64 draws were made */ state->ctr->v[2]++; if (state->ctr->v[2] == 0) { state->ctr->v[3]++; } } extern void threefry32_advance(uint32_t *step, threefry32_state *state) { int i, carry = 0; uint32_t v_orig; for (i = 0; i < 4; i++) { if (carry == 1) { state->ctr->v[i]++; carry = state->ctr->v[i] == 0 ? 1 : 0; } v_orig = state->ctr->v[i]; state->ctr->v[i] += step[i]; if (state->ctr->v[i] < v_orig && carry == 0) { carry = 1; } } }
24.466667
73
0.594005
fd6dfb5ec0de8e5f560e72ff3754e7ea7edae395
5,254
h
C
ecmascript/js_proxy.h
openharmony-gitee-mirror/ark_js_runtime
b5ac878349b00b337c45f4702332c23aa82e1e28
[ "Apache-2.0" ]
3
2021-09-08T09:16:18.000Z
2021-12-28T21:14:06.000Z
ecmascript/js_proxy.h
openharmony-gitee-mirror/ark_js_runtime
b5ac878349b00b337c45f4702332c23aa82e1e28
[ "Apache-2.0" ]
null
null
null
ecmascript/js_proxy.h
openharmony-gitee-mirror/ark_js_runtime
b5ac878349b00b337c45f4702332c23aa82e1e28
[ "Apache-2.0" ]
1
2021-09-13T11:21:59.000Z
2021-09-13T11:21:59.000Z
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * 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 ECMASCRIPT_JSPROXY_H #define ECMASCRIPT_JSPROXY_H #include "ecmascript/tagged_array.h" #include "js_object.h" namespace panda::ecmascript { class JSProxy final : public ECMAObject { public: static JSProxy *Cast(ObjectHeader *object) { return static_cast<JSProxy *>(object); } static const JSProxy *ConstCast(const TaggedObject *object) { return static_cast<const JSProxy *>(object); } // ES6 9.5.15 ProxyCreate(target, handler) static JSHandle<JSProxy> ProxyCreate(JSThread *thread, const JSHandle<JSTaggedValue> &target, const JSHandle<JSTaggedValue> &handler); // ES6 9.5.1 [[GetPrototypeOf]] ( ) static JSTaggedValue GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy); // ES6 9.5.2 [[SetPrototypeOf]] (V) static bool SetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &proto); // ES6 9.5.3 [[IsExtensible]] ( ) static bool IsExtensible(JSThread *thread, const JSHandle<JSProxy> &proxy); // ES6 9.5.4 [[PreventExtensions]] ( ) static bool PreventExtensions(JSThread *thread, const JSHandle<JSProxy> &proxy); // ES6 9.5.5 [[GetOwnProperty]] (P) static bool GetOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc); // ES6 9.5.6 [[DefineOwnProperty]] (P, Desc) static bool DefineOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc); // ES6 9.5.7 [[HasProperty]] (P) static bool HasProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key); // ES6 9.5.8 [[Get]] (P, Receiver) static inline OperationResult GetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key) { return GetProperty(thread, proxy, key, JSHandle<JSTaggedValue>::Cast(proxy)); } static OperationResult GetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &receiver); // ES6 9.5.9 [[Set]] ( P, V, Receiver) static inline bool SetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value, bool mayThrow = false) { return SetProperty(thread, proxy, key, value, JSHandle<JSTaggedValue>::Cast(proxy), mayThrow); } static bool SetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &receiver, bool mayThrow = false); // ES6 9.5.10 [[Delete]] (P) static bool DeleteProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &key); // ES6 9.5.12 [[OwnPropertyKeys]] () static JSHandle<TaggedArray> OwnPropertyKeys(JSThread *thread, const JSHandle<JSProxy> &proxy); void SetCallable(bool callable) const { GetClass()->SetCallable(callable); } void SetConstructor(bool constructor) const { GetClass()->SetConstructor(constructor); } void SetCallTarget([[maybe_unused]] const JSThread *thread, JSMethod *p) { SetMethod(p); } JSHandle<JSTaggedValue> GetSourceTarget(JSThread *thread) const; // ES6 9.5.13 [[Call]] (thisArgument, argumentsList) static JSTaggedValue CallInternal(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedValue> &thisArg, uint32_t argc, const JSTaggedType argv[]); // ES6 9.5.14 [[Construct]] ( argumentsList, newTarget) static JSTaggedValue ConstructInternal(JSThread *thread, const JSHandle<JSProxy> &proxy, uint32_t argc, const JSTaggedType argv[], const JSHandle<JSTaggedValue> &newTarget); static constexpr size_t METHOD_OFFSET = ECMAObject::SIZE; SET_GET_NATIVE_FIELD(Method, JSMethod, METHOD_OFFSET, TARGET_OFFSET) ACCESSORS(Target, TARGET_OFFSET, HANDLER_OFFSET) ACCESSORS(Handler, HANDLER_OFFSET, SIZE) bool IsArray(JSThread *thread) const; DECL_DUMP() DECL_VISIT_OBJECT(TARGET_OFFSET, SIZE) }; } // namespace panda::ecmascript #endif // ECMASCRIPT_JSPROXY_H
45.686957
120
0.667682
76ed8fddde69aa0f080302488e50cb776396f424
330
h
C
client/DGServerManager/ViewController.h
Geek-bule/sdkLibs
9da0c164d0acbc825db884c3f321f79f80c0b4c9
[ "Apache-2.0" ]
null
null
null
client/DGServerManager/ViewController.h
Geek-bule/sdkLibs
9da0c164d0acbc825db884c3f321f79f80c0b4c9
[ "Apache-2.0" ]
null
null
null
client/DGServerManager/ViewController.h
Geek-bule/sdkLibs
9da0c164d0acbc825db884c3f321f79f80c0b4c9
[ "Apache-2.0" ]
null
null
null
// // ViewController.h // DGServerManager // // Created by apple on 2018/3/22. // Copyright © 2018年 apple. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UITableView *tablView; @property (strong, nonatomic) UIRefreshControl *refresh; @end
19.411765
59
0.733333
0a48509fe1040be6bd82997abbc000775c37ce8f
381
c
C
t/test-crc32.c
sudeepdino008/phoenixfs
6ea03d9991cb9ff5706a3daf3247fb2224bbeb86
[ "MIT" ]
44
2015-03-14T01:19:30.000Z
2022-01-20T08:46:46.000Z
t/test-crc32.c
sudeepdino008/phoenixfs
6ea03d9991cb9ff5706a3daf3247fb2224bbeb86
[ "MIT" ]
null
null
null
t/test-crc32.c
sudeepdino008/phoenixfs
6ea03d9991cb9ff5706a3daf3247fb2224bbeb86
[ "MIT" ]
6
2016-02-04T13:29:37.000Z
2022-03-17T06:12:45.000Z
#include "crc32.h" #include <stdio.h> #include <stdint.h> #include <unistd.h> #include <string.h> int main(int argc, char *argv[]) { uint32_t crc = ~0; unsigned char *data; size_t length; if (argc < 2) die("Usage: %s <input string>", argv[0]); length = strlen(argv[1]); data = (unsigned char *) argv[1]; printf("%08X\n", compute_crc32(crc, data, length)); return 0; }
18.142857
52
0.637795
a1a9aaf79107efffc415e72887f6bf85c39d7ba9
278
h
C
cuj/inc/cuj/cstd/ptx.h
AirGuanZ/cuj
81030a35e1cb8f3f2134d267d8a416aa348348cd
[ "MIT" ]
23
2021-04-24T12:08:40.000Z
2022-01-18T14:26:00.000Z
cuj/inc/cuj/cstd/ptx.h
AirGuanZ/cuj
81030a35e1cb8f3f2134d267d8a416aa348348cd
[ "MIT" ]
null
null
null
cuj/inc/cuj/cstd/ptx.h
AirGuanZ/cuj
81030a35e1cb8f3f2134d267d8a416aa348348cd
[ "MIT" ]
4
2021-04-24T12:08:56.000Z
2022-01-20T07:46:41.000Z
#pragma once #include <cuj/dsl/dsl.h> CUJ_NAMESPACE_BEGIN(cuj::cstd) i32 thread_idx_x(); i32 thread_idx_y(); i32 thread_idx_z(); i32 block_idx_x(); i32 block_idx_y(); i32 block_idx_z(); i32 block_dim_x(); i32 block_dim_y(); i32 block_dim_z(); CUJ_NAMESPACE_END(cuj::cstd)
13.9
30
0.741007
1f5f2a278322f7baeb2e475a8015ffa294ea4db9
5,558
h
C
dependencies/ethzasl_msf/msf_core/include/msf_core/msf_checkFuzzyTracking.h
sahibdhanjal/astrobee
5bc4e6e58adcf1bc7e1c3719ced736063bba276c
[ "Apache-2.0" ]
772
2015-01-06T23:59:10.000Z
2022-03-26T10:15:09.000Z
dependencies/ethzasl_msf/msf_core/include/msf_core/msf_checkFuzzyTracking.h
sahibdhanjal/astrobee
5bc4e6e58adcf1bc7e1c3719ced736063bba276c
[ "Apache-2.0" ]
121
2015-01-03T01:53:46.000Z
2021-12-06T10:18:23.000Z
dependencies/ethzasl_msf/msf_core/include/msf_core/msf_checkFuzzyTracking.h
sahibdhanjal/astrobee
5bc4e6e58adcf1bc7e1c3719ced736063bba276c
[ "Apache-2.0" ]
397
2015-01-06T10:51:39.000Z
2022-03-22T05:12:22.000Z
/* * Copyright (C) 2011-2012 Stephan Weiss, ASL, ETH Zurich, Switzerland * You can contact the author at <stephan dot weiss at ieee dot org> * Copyright (C) 2012-2013 Simon Lynen, ASL, ETH Zurich, Switzerland * You can contact the author at <slynen at ethz dot ch> * * 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 MSF_CHECKFUZZYTRACKING_H_ #define MSF_CHECKFUZZYTRACKING_H_ #include <msf_core/msf_tools.h> namespace msf_core { template<typename EKFState_T, typename NONTEMPORALDRIFTINGTYPE> class CheckFuzzyTracking { private: enum { qbuffRowsAtCompiletime = msf_tmp::StateLengthForType< const typename msf_tmp::StripConstReference<NONTEMPORALDRIFTINGTYPE>::result_t&>::value, nBuff_ = 30 ///< Buffer size for median non drifting state values. }; int nontemporaldrifting_inittimer_; ///< A counter for fuzzy tracking detection // If there is no non temporal drifting state this matrix will have zero rows, // to make use of it illegal. Eigen::Matrix<double, nBuff_, qbuffRowsAtCompiletime> qbuff_; public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW void Reset() { // Buffer for vision failure check. nontemporaldrifting_inittimer_ = 1; qbuff_ = Eigen::Matrix<double, nBuff_, qbuffRowsAtCompiletime>::Constant(0); } CheckFuzzyTracking() : nontemporaldrifting_inittimer_(0) { Reset(); } bool Check(shared_ptr<EKFState_T> delaystate, EKFState_T& buffstate, double fuzzythres) { // For now make sure the non drifting state is a quaternion. bool isfuzzy = false; const bool isquaternion = msf_tmp::IsQuaternionType< typename msf_tmp::StripConstReference<NONTEMPORALDRIFTINGTYPE>::result_t>::value; static_assert( isquaternion, "Assumed that the non drifting state is a Quaternion, " "which is not the case for the currently defined state vector. If you " "want to use an euclidean state, please first adapt qbuff and the error " "detection routines"); typedef typename EKFState_T::StateSequence_T StateSequence_T; enum { indexOfStateWithoutTemporalDrift = msf_tmp::IndexOfBestNonTemporalDriftingState< StateSequence_T>::value, /// Error state length. nErrorStatesAtCompileTime = EKFState_T::nErrorStatesAtCompileTime, /// Complete state length. nStatesAtCompileTime = EKFState_T::nStatesAtCompileTime }; // Update qbuff_ and check for fuzzy tracking. if (nontemporaldrifting_inittimer_ > nBuff_) { // should be unit quaternion if no error Eigen::Quaternion<double> errq = const_cast<const EKFState_T&>(*delaystate) .template Get<indexOfStateWithoutTemporalDrift>().conjugate() * Eigen::Quaternion<double>( GetMedian(qbuff_.template block<nBuff_, 1> (0, 3)), GetMedian(qbuff_.template block<nBuff_, 1> (0, 0)), GetMedian(qbuff_.template block<nBuff_, 1> (0, 1)), GetMedian(qbuff_.template block<nBuff_, 1> (0, 2)) ); if (std::max(errq.vec().maxCoeff(), -errq.vec().minCoeff()) / fabs(errq.w()) * 2 > fuzzythres) { // Fuzzy tracking (small angle approx). MSF_WARN_STREAM("Fuzzy tracking triggered: " << std::max(errq.vec().maxCoeff(), -errq.vec().minCoeff()) / fabs(errq.w())*2 << " limit: " << fuzzythres <<"\n"); // Copy the non propagation states back from the buffer. boost::fusion::for_each( delaystate->statevars, msf_tmp::CopyNonPropagationStates<EKFState_T>(buffstate) ); static_assert(static_cast<int>( EKFState_T::nPropagatedCoreErrorStatesAtCompileTime) == 9, "Assumed that nPropagatedCoreStates == 9, " "which is not the case"); isfuzzy = true; } else { // If tracking ok: Update mean and 3sigma of past N non drifting state values. qbuff_.template block<1, 4>(nontemporaldrifting_inittimer_ - nBuff_ - 1, 0) = Eigen::Matrix<double, 1, 4>( const_cast<const EKFState_T&>(*delaystate). template Get<indexOfStateWithoutTemporalDrift>().coeffs()); nontemporaldrifting_inittimer_ = (nontemporaldrifting_inittimer_) % nBuff_ + nBuff_ + 1; } } else { // At beginning get mean and 3sigma of past N non drifting state values. qbuff_. template block<1, 4> (nontemporaldrifting_inittimer_ - 1, 0) = Eigen::Matrix<double, 1, 4>( const_cast<const EKFState_T&>(*delaystate). template Get<indexOfStateWithoutTemporalDrift>().coeffs()); nontemporaldrifting_inittimer_++; } return isfuzzy; } }; template<typename EKFState_T> class CheckFuzzyTracking<EKFState_T, mpl_::void_> { public: bool Check(shared_ptr<EKFState_T> UNUSEDPARAM(delaystate), EKFState_T& UNUSEDPARAM(buffstate), double UNUSEDPARAM(fuzzythres)) { return false; } void Reset() { } }; } // namespace msf_core #endif // MSF_CHECKFUZZYTRACKING_H_
40.867647
97
0.68136
debb17a0e236165ea205bbcc97ca6ba0177e1c7c
487
h
C
components/csi/csi2/include/core/core_ck801.h
1847123212/YoC-open
f4e20c67256472d863ea6d118e3ecbaa1e879d4a
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
components/csi/csi2/include/core/core_ck801.h
1847123212/YoC-open
f4e20c67256472d863ea6d118e3ecbaa1e879d4a
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/csi/csi2/include/core/core_ck801.h
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file core_ck801.h * @brief CSI CK801 Core Peripheral Access Layer Header File * @version V1.0 * @date 02. June 2017 ******************************************************************************/ #ifndef __CORE_CK801_H_GENERIC #define __CORE_CK801_H_GENERIC #include <core_801.h> #endif /* __CORE_CK801_H_DEPENDANT */
25.631579
80
0.476386
50fa01c07989779650264d872bd6954d246222d6
3,484
c
C
BBB-firmware/u-boot-v2015.10-rc2/drivers/usb/host/ehci-marvell.c
guileschool/BEAGLEBONE-tutorials
eecd83e0c14941b05ad38eeb77e5a50602cc29ca
[ "MIT" ]
4
2018-09-28T04:33:26.000Z
2021-03-10T06:29:55.000Z
BBB-firmware/u-boot-v2015.10-rc2/drivers/usb/host/ehci-marvell.c
guileschool/BEAGLEBONE-tutorials
eecd83e0c14941b05ad38eeb77e5a50602cc29ca
[ "MIT" ]
4
2016-08-30T11:30:25.000Z
2020-12-27T09:58:07.000Z
BBB-firmware/u-boot-v2015.10-rc2/drivers/usb/host/ehci-marvell.c
guileschool/BEAGLEBONE-tutorials
eecd83e0c14941b05ad38eeb77e5a50602cc29ca
[ "MIT" ]
2
2016-12-30T08:02:57.000Z
2020-05-16T05:59:30.000Z
/* * (C) Copyright 2009 * Marvell Semiconductor <www.marvell.com> * Written-by: Prafulla Wadaskar <prafulla@marvell.com> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <asm/io.h> #include <usb.h> #include "ehci.h" #include <linux/mbus.h> #include <asm/arch/cpu.h> #if defined(CONFIG_KIRKWOOD) #include <asm/arch/soc.h> #elif defined(CONFIG_ORION5X) #include <asm/arch/orion5x.h> #endif DECLARE_GLOBAL_DATA_PTR; #define USB_WINDOW_CTRL(i) (0x320 + ((i) << 4)) #define USB_WINDOW_BASE(i) (0x324 + ((i) << 4)) #define USB_TARGET_DRAM 0x0 /* * USB 2.0 Bridge Address Decoding registers setup */ #ifdef CONFIG_ARMADA_XP /* * Armada XP and Armada 38x have different base addresses for * the USB 2.0 EHCI host controller. So we need to provide * a mechnism to support both here. */ #define MVUSB0_BASE \ (mvebu_soc_family() == MVEBU_SOC_A38X ? \ MVEBU_USB20_BASE : MVEBU_AXP_USB_BASE) #define MVUSB_BASE(port) MVUSB0_BASE + ((port) << 12) /* * Once all the older Marvell SoC's (Orion, Kirkwood) are converted * to the common mvebu archticture including the mbus setup, this * will be the only function needed to configure the access windows */ static void usb_brg_adrdec_setup(int index) { const struct mbus_dram_target_info *dram; int i; dram = mvebu_mbus_dram_info(); for (i = 0; i < 4; i++) { writel(0, MVUSB_BASE(index) + USB_WINDOW_CTRL(i)); writel(0, MVUSB_BASE(index) + USB_WINDOW_BASE(i)); } for (i = 0; i < dram->num_cs; i++) { const struct mbus_dram_window *cs = dram->cs + i; /* Write size, attributes and target id to control register */ writel(((cs->size - 1) & 0xffff0000) | (cs->mbus_attr << 8) | (dram->mbus_dram_target_id << 4) | 1, MVUSB_BASE(index) + USB_WINDOW_CTRL(i)); /* Write base address to base register */ writel(cs->base, MVUSB_BASE(index) + USB_WINDOW_BASE(i)); } } #else #define MVUSB_BASE(port) MVUSB0_BASE static void usb_brg_adrdec_setup(int index) { int i; u32 size, base, attrib; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { /* Enable DRAM bank */ switch (i) { case 0: attrib = MVUSB0_CPU_ATTR_DRAM_CS0; break; case 1: attrib = MVUSB0_CPU_ATTR_DRAM_CS1; break; case 2: attrib = MVUSB0_CPU_ATTR_DRAM_CS2; break; case 3: attrib = MVUSB0_CPU_ATTR_DRAM_CS3; break; default: /* invalide bank, disable access */ attrib = 0; break; } size = gd->bd->bi_dram[i].size; base = gd->bd->bi_dram[i].start; if ((size) && (attrib)) writel(MVCPU_WIN_CTRL_DATA(size, USB_TARGET_DRAM, attrib, MVCPU_WIN_ENABLE), MVUSB0_BASE + USB_WINDOW_CTRL(i)); else writel(MVCPU_WIN_DISABLE, MVUSB0_BASE + USB_WINDOW_CTRL(i)); writel(base, MVUSB0_BASE + USB_WINDOW_BASE(i)); } } #endif /* * Create the appropriate control structures to manage * a new EHCI host controller. */ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { usb_brg_adrdec_setup(index); *hccr = (struct ehci_hccr *)(MVUSB_BASE(index) + 0x100); *hcor = (struct ehci_hcor *)((uint32_t) *hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); debug("ehci-marvell: init hccr %x and hcor %x hc_length %d\n", (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); return 0; } /* * Destroy the appropriate control structures corresponding * the the EHCI host controller. */ int ehci_hcd_stop(int index) { return 0; }
24.027586
67
0.686567
f7f6cea86f5391006e378e15fc174158b0b838aa
917
h
C
control_app/joystick.h
houcy/wall-e-1
b159d05b0afa343cb161f60ec98974bc2f063afd
[ "MIT" ]
1
2021-05-05T14:11:03.000Z
2021-05-05T14:11:03.000Z
control_app/joystick.h
houcy/wall-e-1
b159d05b0afa343cb161f60ec98974bc2f063afd
[ "MIT" ]
null
null
null
control_app/joystick.h
houcy/wall-e-1
b159d05b0afa343cb161f60ec98974bc2f063afd
[ "MIT" ]
null
null
null
#ifndef JOYSTICK_H #define JOYSTICK_H #include <QObject> class QTimer; class Joystick : public QObject { Q_OBJECT struct JsEvent { std::uint32_t time; /* event timestamp in milliseconds */ std::int16_t value; /* value */ std::uint8_t type; /* event type */ std::uint8_t number; /* axis/button number */ }; int jsFile; JsEvent jsEvent; QTimer *readDataTimer; public: enum JsEventType { JS_EVENT_TYPE_BUTTON = 0x01, JS_EVENT_TYPE_AXIS = 0x02, JS_EVENT_TYPE_INIT = 0x80 }; enum JsEventAxisButtonNumber { JS_EVENT_AXIS_X_WE = 0x00, JS_EVENT_AXIS_X_NS = 0x01, }; explicit Joystick(QObject *parent = 0); ~Joystick(); signals: void joystickEvent(std::uint8_t type, std::uint8_t num, std::int16_t value); public slots: void slotReadData(); }; #endif // JOYSTICK_H
19.104167
66
0.621592
972295ce4c70388e34a89a5754d058ebc4a578cd
1,538
h
C
Testing/Gui/18_testView/testView.h
IOR-BIC/ALBA
b574968b05d9a3a2756dd2ac61d015a0d20232a4
[ "Apache-2.0", "BSD-3-Clause" ]
9
2018-11-19T10:15:29.000Z
2021-08-30T11:52:07.000Z
Testing/Gui/18_testView/testView.h
IOR-BIC/ALBA
b574968b05d9a3a2756dd2ac61d015a0d20232a4
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
Testing/Gui/18_testView/testView.h
IOR-BIC/ALBA
b574968b05d9a3a2756dd2ac61d015a0d20232a4
[ "Apache-2.0", "BSD-3-Clause" ]
3
2018-06-10T22:56:29.000Z
2019-12-12T06:22:56.000Z
/*========================================================================= Program: ALBA (Agile Library for Biomedical Applications) Module: testView Authors: Silvano Imboden Copyright (c) BIC All rights reserved. See Copyright.txt or This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #ifndef __testView_H__ #define __testView_H__ //---------------------------------------------------------------------------- // Include: //---------------------------------------------------------------------------- #include "albaViewVTK.h" //---------------------------------------------------------------------------- // forward references : //---------------------------------------------------------------------------- class albaObserver; //---------------------------------------------------------------------------- // testView : //---------------------------------------------------------------------------- /** an example view that can display every vme which self provide a VisualPipe */ class testView: public albaViewVTK { public: testView(wxString label) : albaViewVTK(label) {}; virtual albaView* Copy(albaObserver *Listener); virtual int GetNodeStatus(albaNode *vme); virtual void VmeCreatePipe(albaNode *vme); virtual void VmeDeletePipe(albaNode *vme); protected: }; #endif
34.177778
78
0.450585
c1f35befe9ffbd420c88ffc6764a2c5fc70e2b02
202
h
C
LeetCodePractice/LeetCodePractice/Easy3/LC101.h
White-White/LeetCodePractice
2d6dd3745124d7b7ea5498acfcd6cf8440637c25
[ "MIT" ]
null
null
null
LeetCodePractice/LeetCodePractice/Easy3/LC101.h
White-White/LeetCodePractice
2d6dd3745124d7b7ea5498acfcd6cf8440637c25
[ "MIT" ]
null
null
null
LeetCodePractice/LeetCodePractice/Easy3/LC101.h
White-White/LeetCodePractice
2d6dd3745124d7b7ea5498acfcd6cf8440637c25
[ "MIT" ]
null
null
null
// // LC101.h // LeetCodePractice // // Created by White on 2018/9/28. // Copyright © 2018年 White. All rights reserved. // #ifndef LC101_h #define LC101_h #include <stdio.h> #endif /* LC101_h */
13.466667
49
0.653465
3e174b62e5f933e51f4fa693d5627561f3fe26f7
517
h
C
ssl/TlsAcceptor.h
ririripley/recipes
04267c68a7424326b4aa8dd14b1a879b59ab887c
[ "BSD-3-Clause" ]
1,418
2015-01-07T09:40:09.000Z
2022-03-29T08:37:02.000Z
ssl/TlsAcceptor.h
ririripley/recipes
04267c68a7424326b4aa8dd14b1a879b59ab887c
[ "BSD-3-Clause" ]
22
2015-02-17T17:31:18.000Z
2022-02-08T07:00:29.000Z
ssl/TlsAcceptor.h
ririripley/recipes
04267c68a7424326b4aa8dd14b1a879b59ab887c
[ "BSD-3-Clause" ]
854
2015-01-03T11:56:10.000Z
2022-03-31T08:50:28.000Z
#pragma once #include "Common.h" #include "Socket.h" #include "TlsContext.h" #include <memory> class InetAddress; class TlsStream; typedef std::unique_ptr<TlsStream> TlsStreamPtr; class TlsAcceptor : noncopyable { public: TlsAcceptor(TlsConfig* config, const InetAddress& listenAddr); ~TlsAcceptor() = default; TlsAcceptor(TlsAcceptor&&) = default; TlsAcceptor& operator=(TlsAcceptor&&) = default; // thread safe TlsStreamPtr accept(); private: TlsContext context_; Socket listenSock_; };
16.15625
64
0.733075
e37dd1b4d5e9cf2060ab6b2d7e1373161f1efd63
1,482
c
C
Libft/Vector/vector_deque.c
akharrou/42-Project-Ft_ls
9bcdf21fd838d36a955ae9b020d6514db3291e4a
[ "MIT" ]
1
2020-08-09T09:05:13.000Z
2020-08-09T09:05:13.000Z
Vector/vector_deque.c
akharrou/42-Project-Libft
14a50e8706c8816d470625db4e7b027c956d89dd
[ "MIT" ]
null
null
null
Vector/vector_deque.c
akharrou/42-Project-Libft
14a50e8706c8816d470625db4e7b027c956d89dd
[ "MIT" ]
null
null
null
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* vector_deque.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: akharrou <akharrou@student.42.us.org> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/05/21 12:34:43 by akharrou #+# #+# */ /* Updated: 2019/05/21 18:05:49 by akharrou ### ########.fr */ /* */ /* ************************************************************************** */ /* ** NAME ** vector_deque -- deque the first element of a queue in a vector ** ** SYNOPSIS ** #include <libft.h> ** ** void * ** vector_deque(struct s_vector *self); ** ** PARAMETERS ** ** struct s_vector *self Pointer to a vector instance. ** ** DESCRIPTION ** De-queues the first element of the queue in the vector. ** ** RETURN VALUES ** If successful returns the dequed element; otherwise NULL. */ #include "../Includes/vector.h" void *vector_deque(struct s_vector *self) { return (self->popleft(self)); }
37.05
80
0.311066
7c5a9533d3a8d8d347da2f308557da62dc0330be
1,214
h
C
bridge/go-foreign.h
gomatcha/matcha2
d2dd1c5db1f5c1a7c0de70ead920a999e1e2bc9a
[ "Apache-2.0" ]
3,813
2017-08-01T00:53:27.000Z
2022-03-28T05:47:39.000Z
bridge/go-foreign.h
gomatcha/matcha2
d2dd1c5db1f5c1a7c0de70ead920a999e1e2bc9a
[ "Apache-2.0" ]
38
2017-08-11T15:31:20.000Z
2019-09-24T05:38:10.000Z
bridge/go-foreign.h
gomatcha/matcha2
d2dd1c5db1f5c1a7c0de70ead920a999e1e2bc9a
[ "Apache-2.0" ]
174
2017-08-11T15:48:28.000Z
2022-03-16T09:26:38.000Z
#ifndef GO_FOREIGN_H #define GO_FOREIGN_H #include <stdbool.h> #include <stdint.h> typedef int64_t FgnRef; typedef int64_t GoRef; typedef struct CGoBuffer { void *ptr; // UTF8 encoded string int64_t len; // length in bytes } CGoBuffer; FgnRef MatchaForeignNil(); bool MatchaForeignIsNil(FgnRef v); FgnRef MatchaForeignBool(bool v); bool MatchaForeignToBool(FgnRef v); FgnRef MatchaForeignInt64(int64_t v); int64_t MatchaForeignToInt64(FgnRef v); FgnRef MatchaForeignFloat64(double v); double MatchaForeignToFloat64(FgnRef v); FgnRef MatchaForeignGoRef(GoRef v); GoRef MatchaForeignToGoRef(FgnRef v); FgnRef MatchaForeignString(CGoBuffer str); // Frees the buffer CGoBuffer MatchaForeignToString(FgnRef v); FgnRef MatchaForeignBytes(CGoBuffer bytes); // Frees the buffer CGoBuffer MatchaForeignToBytes(FgnRef v); FgnRef MatchaForeignArray(CGoBuffer buf); // Frees the buffer CGoBuffer MatchaForeignToArray(FgnRef v); FgnRef MatchaForeignBridge(CGoBuffer str); // Frees the buffer // Call FgnRef MatchaForeignCall(FgnRef v, CGoBuffer str, CGoBuffer args); // Tracker void MatchaForeignUntrack(FgnRef key); int64_t MatchaForeignTrackerCount(); // Other void MatchaForeignPanic(); #endif //GO_FOREIGN_H
28.232558
66
0.80313
f6ad56b357db95d1215b5056f1da759a80f7558d
1,810
h
C
libraries/LaCOOLBoard/src/CoolFileSystem.h
TamataOcean/Workshop-Electronic
b630beb41eeda927a9e0f0d89a84d007fe79341c
[ "MIT" ]
null
null
null
libraries/LaCOOLBoard/src/CoolFileSystem.h
TamataOcean/Workshop-Electronic
b630beb41eeda927a9e0f0d89a84d007fe79341c
[ "MIT" ]
null
null
null
libraries/LaCOOLBoard/src/CoolFileSystem.h
TamataOcean/Workshop-Electronic
b630beb41eeda927a9e0f0d89a84d007fe79341c
[ "MIT" ]
null
null
null
/** * Copyright (c) 2018 La Cool Co SAS * * 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 CoolFileSystem_H #define CoolFileSystem_H #include "Arduino.h" /** * \class CoolFileSystem * * \brief This class handles the file system * */ class CoolFileSystem { public: bool begin(); bool updateConfigFiles(String answer ); bool fileUpdate(String update,const char* path); bool saveSensorData(const char* data ); bool saveSensorDataCSV(const char* data ); int isDataSaved(); String* getSensorSavedData(int& size); bool incrementsavedData(); void getsavedData(); private: /** * Number of lines to read when * retrieving saved Data */ int savedData=0; /** * Number of lines to Skip * when retrieving saved Data */ int linesToSkip=0; }; #endif
23.815789
80
0.740884
f59287ce47a94e5d9caf68b71f1650141e1511ba
9,013
h
C
dependencies/_mathLib/includes/Vector3.h
Cris-Bwls/What-The-Flock
00c047474985570d5dabadd1f4c51ca82536854f
[ "MIT" ]
null
null
null
dependencies/_mathLib/includes/Vector3.h
Cris-Bwls/What-The-Flock
00c047474985570d5dabadd1f4c51ca82536854f
[ "MIT" ]
null
null
null
dependencies/_mathLib/includes/Vector3.h
Cris-Bwls/What-The-Flock
00c047474985570d5dabadd1f4c51ca82536854f
[ "MIT" ]
null
null
null
#pragma once // STATIC/DLL Definition #ifdef CBc_LIB_STATIC #define CBc_LIB_API #else // NOT STATIC #ifdef CBc_LIB_DLL #define CBc_LIB_API __declspec(dllexport) #else #define CBc_LIB_API __declspec(dllimport) #endif // DLL #endif // STATIC struct Vector2; struct Vector4; struct Vector3 { CBc_LIB_API Vector3(); CBc_LIB_API Vector3(float x, float y, float z); CBc_LIB_API ~Vector3(); //------------------------------------------------------ // One // Sets components to 1 //------------------------------------------------------ CBc_LIB_API void One(); //------------------------------------------------------ // Zero // Sets components to 0 //------------------------------------------------------ CBc_LIB_API void Zero(); //------------------------------------------------------ // Right // Sets x to 1 // all others set to 0 //------------------------------------------------------ CBc_LIB_API void Right(); //------------------------------------------------------ // Left // Sets x to -1 // all others set to 0 //------------------------------------------------------ CBc_LIB_API void Left(); //------------------------------------------------------ // Up // Sets y to 1 // all others set to 0 //------------------------------------------------------ CBc_LIB_API void Up(); //------------------------------------------------------ // Down // Sets y to -1 // all others set to 0 //------------------------------------------------------ CBc_LIB_API void Down(); //------------------------------------------------------ // Forward // Sets z to 1 // all others set to 0 //------------------------------------------------------ CBc_LIB_API void Forward(); //------------------------------------------------------ // Back // Sets z to -1 // all others set to 0 //------------------------------------------------------ CBc_LIB_API void Back(); //------------------------------------------------------ // operator+ // Overloads - operator // // Allows Integer promotion of Vectors //------------------------------------------------------ CBc_LIB_API Vector3 operator+(); //------------------------------------------------------ // operator- // Overloads - operator // // Allows Inverse of Vector //------------------------------------------------------ CBc_LIB_API Vector3 operator-(); //------------------------------------------------------ // operator+ // Overloads + operator // // Allows Addition of Vectors //------------------------------------------------------ CBc_LIB_API Vector3 operator+(Vector3 rhs); //------------------------------------------------------ // operator- // Overloads - operator // // Allows Subtraction of Vectors //------------------------------------------------------ CBc_LIB_API Vector3 operator-(Vector3 rhs); //------------------------------------------------------ // operator* // Overloads * operator // // Allows Multiplication of Vector by rhs scalar //------------------------------------------------------ CBc_LIB_API Vector3 operator*(float scalar); //------------------------------------------------------ // operator+= // Overloads += operator // // Allows Addition assignment of Vectors //------------------------------------------------------ CBc_LIB_API Vector3& operator+=(Vector3 rhs); //------------------------------------------------------ // operator- // Overloads - operator // // Allows Subtraction assignment of Vectors //------------------------------------------------------ CBc_LIB_API Vector3& operator-=(Vector3 rhs); //------------------------------------------------------ // operator* // Overloads * operator // // Allows Multiplication assignment of Vector by // rhs scalar //------------------------------------------------------ CBc_LIB_API Vector3& operator*=(float scalar); //------------------------------------------------------ // operator== // Overloads == operator // // Allows 'Equal to' relational operator to check // Vectors against each other //------------------------------------------------------ CBc_LIB_API bool operator==(Vector3 rhs); //------------------------------------------------------ // operator> // Overloads > operator // // Allows 'greater than' relational operator to check // Vectors against each other //------------------------------------------------------ CBc_LIB_API bool operator>(Vector3 rhs); //------------------------------------------------------ // operator>= // Overloads >= operator // // Allows 'greater than or equals' relational operator to check // Vectors against each other //------------------------------------------------------ CBc_LIB_API bool operator>=(Vector3 rhs); //------------------------------------------------------ // operator< // Overloads < operator // // Allows 'less than' relational operator to check // Vectors against each other //------------------------------------------------------ CBc_LIB_API bool operator<(Vector3 rhs); //------------------------------------------------------ // operator<= // Overloads <= operator // // Allows 'less than or equals' relational operator to check // Vectors against each other //------------------------------------------------------ CBc_LIB_API bool operator<=(Vector3 rhs); //------------------------------------------------------ // operator[] // Overloads [] operator // // Converts Vector3 to float* which is then // accessed like a normal float array //------------------------------------------------------ CBc_LIB_API float& operator[](int nIndex); //------------------------------------------------------ // operator float* // Overloads float* cast operator // // Allows casting of Vector into float* //------------------------------------------------------ CBc_LIB_API explicit operator float*(); //------------------------------------------------------ // operator Vector2 // (EXPLICIT) Overloads Vector2 cast operator // // Allows casting of Vector3 into Vector2 //------------------------------------------------------ CBc_LIB_API explicit operator Vector2(); //------------------------------------------------------ // operator Vector4 // (EXPLICIT) Overloads Vector4 cast operator // // Allows casting of Vector3 into Vector4 //------------------------------------------------------ CBc_LIB_API explicit operator Vector4(); //------------------------------------------------------ // dot // Dot Product of two Vectors // // return (float): // dot product //------------------------------------------------------ CBc_LIB_API float dot(Vector3 rhs); //------------------------------------------------------ // cross // Cross Product of two Vectors // // return (Vector3): // Vector at right angle to both input vectors //------------------------------------------------------ CBc_LIB_API Vector3 cross(Vector3 rhs); //------------------------------------------------------ // magnitude // Calculates magnitude of vector // // return (float): // actual magnitude of vector //------------------------------------------------------ CBc_LIB_API float magnitude(); //------------------------------------------------------ // magnitudeSqr // Faster than magnitude // // Calculates magnitude of vector but doesnt sqrt, // only useful for checking relative vectors. // // return (float): // square of magnitude of vector //------------------------------------------------------ CBc_LIB_API float magnitudeSqr(); //------------------------------------------------------ // normalise // Normalises the vector // // return (float): // magnitude before normalisation //------------------------------------------------------ CBc_LIB_API float normalise(); //------------------------------------------------------ // Swizzle // Swizzle the vector // // xyz (char*): // only allows characters (x,X),(y,Y),(z,Z) // any other characters will cause an assert // must have 3 characters // // return (Vector3): // Swizzled Vector3 //------------------------------------------------------ CBc_LIB_API Vector3 Swizzle(const char* xyz); // Variables float x; float y; float z; }; //------------------------------------------------------ // operator* // Overloads * operator // // Allows vector multiplication with lhs scalar //------------------------------------------------------ static Vector3 operator*(float scalar, Vector3 vec) { Vector3 outVec; outVec.x = vec.x * scalar; outVec.y = vec.y * scalar; outVec.z = vec.z * scalar; return outVec; }
29.648026
67
0.376345
f5bf46c7a28389c04f7c4ee8ae0b3eb52a6c4c11
378
h
C
FSW/unused/Xbee.h
ASU-CanSat/2021-poptarts
e5b50d1be63950a2d92f4c692654b61638c44642
[ "MIT" ]
3
2021-02-14T21:43:46.000Z
2022-01-06T07:05:20.000Z
FSW/unused/Xbee.h
emilroy/Cansat-2022
7f3d7c36addd803c938c2172af6be45dc42239af
[ "MIT" ]
null
null
null
FSW/unused/Xbee.h
emilroy/Cansat-2022
7f3d7c36addd803c938c2172af6be45dc42239af
[ "MIT" ]
1
2022-01-31T19:08:38.000Z
2022-01-31T19:08:38.000Z
#ifndef Xbee_h #define Xbee_h #include "Arduino.h" namespace PopTarts { class Xbee { public: Xbee() {}; bool setup(); bool sendPacket(String packet, uint16_t destination); // destination is the source address of the recieving xbee, addr. should be string i think? String readPacket(int timeout); String readPacket(); } } // NOTE: WIP don't use #endif
21
149
0.690476
dc7380c7dc09cb36c75f629b0b12c66591958293
194
c
C
MPI/Preeti/lec1/1.helloworld.c
SunnyAH/Basics_of_HPC
48db37fb0f22ad83a3bd5d347a1287ef39c27dae
[ "Apache-2.0" ]
18
2021-01-06T05:50:15.000Z
2021-03-06T13:23:13.000Z
MPI/Preeti/lec1/1.helloworld.c
SunnyAH/Basics_of_HPC
48db37fb0f22ad83a3bd5d347a1287ef39c27dae
[ "Apache-2.0" ]
1
2021-02-21T12:08:46.000Z
2021-02-21T12:08:46.000Z
MPI/Preeti/lec1/1.helloworld.c
SunnyAH/Basics_of_HPC
48db37fb0f22ad83a3bd5d347a1287ef39c27dae
[ "Apache-2.0" ]
13
2021-01-15T07:48:49.000Z
2021-04-18T08:22:38.000Z
#include <stdio.h> #include "mpi.h" int main(int argc, char *argv[]) { // initialize MPI MPI_Init (&argc, &argv); printf ("Hello, world!\n"); // done with MPI MPI_Finalize(); }
12.125
33
0.592784
3cffefc7f1baf074ebe839d3e19eea635369fe2d
310
c
C
c03/main_ft_strlcat.c
israeloriente/orinette
b106ea6098bea185259bc07ad3e45c4c6c9503b3
[ "Unlicense", "MIT" ]
null
null
null
c03/main_ft_strlcat.c
israeloriente/orinette
b106ea6098bea185259bc07ad3e45c4c6c9503b3
[ "Unlicense", "MIT" ]
null
null
null
c03/main_ft_strlcat.c
israeloriente/orinette
b106ea6098bea185259bc07ad3e45c4c6c9503b3
[ "Unlicense", "MIT" ]
null
null
null
#include <stdio.h> #include <stdlib.h> unsigned int ft_strlcat(char *dest, char *src, unsigned int size); int main(int argc, char **argv) { char *s1 = argv[1]; char *s2 = argv[2]; unsigned int i = atoi(argv[3]); unsigned int resp = ft_strlcat(s1, s2, i); printf("%d", resp); // printf("%d", i); }
17.222222
66
0.619355
5dbe2a6abb57c1289148d3343bce6c7b2159ea51
307
h
C
resource-manager/include/walker.h
kitdallege/walden
99930f05c081ff489443bca44df36f218d92f2bd
[ "BSD-3-Clause" ]
null
null
null
resource-manager/include/walker.h
kitdallege/walden
99930f05c081ff489443bca44df36f218d92f2bd
[ "BSD-3-Clause" ]
null
null
null
resource-manager/include/walker.h
kitdallege/walden
99930f05c081ff489443bca44df36f218d92f2bd
[ "BSD-3-Clause" ]
null
null
null
#ifndef WALKER_H #define WALKER_H typedef struct Dirs { size_t count; char **paths; } Dirs; typedef struct Files { size_t count; char **paths; } Files; Dirs* find_dirs(const char *dirpath); void free_dirs(Dirs *dirs); Files* find_files(const char *dirpath); void free_files(Files *dirs); #endif
12.791667
39
0.71987
09989ab8e3f6857fa1209c53753fa69792468ff9
80
h
C
Billiards/Texture.h
AlexanderPer/Billiards
6fdf766770b531c7f134278e728601b4424b3e14
[ "MIT" ]
2
2016-11-10T21:25:40.000Z
2019-12-23T11:08:57.000Z
Billiards/Texture.h
AlexanderPer/Billiards
6fdf766770b531c7f134278e728601b4424b3e14
[ "MIT" ]
null
null
null
Billiards/Texture.h
AlexanderPer/Billiards
6fdf766770b531c7f134278e728601b4424b3e14
[ "MIT" ]
null
null
null
#pragma once #include <GL/glew.h> GLuint LoadTextureBMP(const char * filename);
20
45
0.7625
f8ec3bb4d42bee22c12a0bbf3a3938705d88e5e5
800
h
C
RJScanQRCodeDemo/ScanQRCode/RJScanQRCodePreviewViewConfiguration.h
TouchFriend/RJScanQRCodeDemo
d67eb13a2c93aa20a32c0c40a2323cafbe6247ec
[ "Apache-2.0" ]
null
null
null
RJScanQRCodeDemo/ScanQRCode/RJScanQRCodePreviewViewConfiguration.h
TouchFriend/RJScanQRCodeDemo
d67eb13a2c93aa20a32c0c40a2323cafbe6247ec
[ "Apache-2.0" ]
null
null
null
RJScanQRCodeDemo/ScanQRCode/RJScanQRCodePreviewViewConfiguration.h
TouchFriend/RJScanQRCodeDemo
d67eb13a2c93aa20a32c0c40a2323cafbe6247ec
[ "Apache-2.0" ]
null
null
null
// // RJScanQRCodePreviewViewConfiguration.h // RJScanQRCodeDemo // // Created by TouchWorld on 2019/5/23. // Copyright © 2019 RJ. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface RJScanQRCodePreviewViewConfiguration : NSObject + (instancetype)defaultConfiguration; /********* 扫描框frame *********/ @property (nonatomic, assign) CGRect rectFrame; /********* 扫描框边框颜色 默认白色 *********/ @property (nonatomic, strong) UIColor *rectBorderColor; /********* 扫描框四个角颜色 默认白色 *********/ @property (nonatomic, strong) UIColor *rectCornerColor; /********* 扫描线颜色 默认白色 *********/ @property (nonatomic, strong) UIColor *scanningLineColor; /********* 提示标题 *********/ @property (nonatomic, copy) NSString *tipTitle; @end NS_ASSUME_NONNULL_END
25
58
0.68125
5540286c0d99d0f54286f2c6b24a9e4f4260fcce
2,317
h
C
enduser/sakit/sak/plugins/saconfig/saconfig/saconfig.h
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
enduser/sakit/sak/plugins/saconfig/saconfig/saconfig.h
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
enduser/sakit/sak/plugins/saconfig/saconfig/saconfig.h
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 1999-2000 Microsoft Corporation // // Module Name: // saconfig.h // // Description: // CSAConfig class declaration // // Author: // Alp Onalan Created: Oct 6 2000 // ////////////////////////////////////////////////////////////////////////// #if !defined(AFX_SACONFIG_H__E6445EED_84C7_48B8_940D_D67F4023CD32__INCLUDED_) #define AFX_SACONFIG_H__E6445EED_84C7_48B8_940D_D67F4023CD32__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include <debug.h> #include <iostream.h> #include <windows.h> #include <winbase.h> #include <atlbase.h> #include <atlconv.h> #include <oleauto.h> #include <comdef.h> #include <lm.h> #include <satrace.h> #include <setupapi.h> #include <AppSrvcs.h> #include "saconfigcommon.h" class CSAConfig { public: CSAConfig(); virtual ~CSAConfig(); private: bool IsDefaultHostname(); bool IsDefaultAdminPassword(); bool IsFloppyPresent(); bool DoConfigFromFloppy(); bool ParseConfigFile(); HRESULT SARaiseAlert(); bool DoConfigFromRegistry(bool fDoHostname, bool fDoAdminPassword); bool ReadRegistryKeys(); BOOL SetHostname(WCHAR *wszHostname); BOOL SetAdminPassword(WCHAR *wszAdminPassword); private: WCHAR m_wszCurrentHostname[MAX_COMPUTERNAME_LENGTH]; WCHAR m_wszHostname[MAX_COMPUTERNAME_LENGTH]; //winnt limit WCHAR m_wszAdminPassword[LM20_PWLEN]; //winnt limit //TODO: Create another class for all registry read configuration // make registry related methods part of that class - better encapsulation WCHAR m_wszOEMDllName[NAMELENGTH]; WCHAR m_wszOEMFunctionName[NAMELENGTH]; WCHAR m_wszNetConfigDllName[NAMELENGTH]; WCHAR m_wszDefaultAdminPassword[LM20_PWLEN]; WCHAR m_wszDefaultHostname[MAX_COMPUTERNAME_LENGTH]; //winnt limit BOOL m_fInfKeyPresent[NUMINFKEY]; WCHAR m_wszInfConfigTable [NUMINFKEY][NAMELENGTH]; HINF m_hConfigFile; public: LPSTR GetHostname(); bool DoConfig(bool fDoHostname, bool fDoAdminPassword); }; #endif // !defined(AFX_SACONFIG_H__E6445EED_84C7_48B8_940D_D67F4023CD32__INCLUDED_)
26.329545
84
0.658179
56f89c473769d11c9f95a44c4e22b0c4e85f7ff3
1,603
c
C
src/Imagery/Segmentation/split.c
opticalloop/OCR
4b45da9d570f8227c32dea8897c8ddb349956c4e
[ "MIT" ]
16
2021-08-29T09:22:44.000Z
2022-02-11T02:45:58.000Z
src/Imagery/Segmentation/split.c
opticalloop/OCR
4b45da9d570f8227c32dea8897c8ddb349956c4e
[ "MIT" ]
9
2021-08-29T10:21:52.000Z
2021-12-06T18:04:11.000Z
src/Imagery/Segmentation/split.c
opticalloop/OCR
4b45da9d570f8227c32dea8897c8ddb349956c4e
[ "MIT" ]
4
2021-08-29T07:59:31.000Z
2021-12-08T15:56:35.000Z
#include "Imagery/Segmentation/split.h" void savesquare(Image *image, unsigned int iall, char *imagename, int hexa) { char str[200]; int dozen = iall / (hexa ? 16 : 9); int unit = iall % (hexa ? 16 : 9); snprintf(str, sizeof(str), "%s/3.%d_%d.bmp", imagename, dozen, unit); saveImage(image, str); } void split(Image *image, Image seg[], int save, char *imagename, int hexa) { const unsigned int width = image->width; const unsigned int height = image->height; const unsigned int xincrem = hexa ? width / 16 : width / 9; const unsigned int yincrem = hexa ? height / 16 : height / 9; const unsigned int nbblock = hexa ? 256 : 81; SDL_Rect block; unsigned int iall = 0; for (unsigned int y = 0; y < height && iall < nbblock; y += yincrem) { for (unsigned int x = 0; x < width && iall < nbblock; x += xincrem, iall++) { if (y + yincrem <= height && x + xincrem <= width) { block.x = x; block.y = y; block.w = xincrem; block.h = yincrem; Image imagebis = cropImage(image, &block); // imagebis free in resize Image imageresized = resize(&imagebis, 28, 28, 0); clearsquare(&imageresized); seg[iall] = imageresized; if (save) { savesquare(&imageresized, iall, imagename, hexa); } } else { iall--; } } } }
28.625
75
0.499688
b6ffd9b95023e28e9529e7e9ff661fa39c275d0d
5,297
c
C
Wobbler/Sources/Wobbler.c
ThisIsNotRocketScience/Eurorack-KDS
1e8d76e1313cc910b9dcdf8811bec15de17489eb
[ "MIT" ]
16
2016-01-02T01:20:31.000Z
2021-10-05T17:45:36.000Z
Wobbler/Sources/Wobbler.c
ThisIsNotRocketScience/Eurorack-KDS
1e8d76e1313cc910b9dcdf8811bec15de17489eb
[ "MIT" ]
1
2017-04-21T14:25:31.000Z
2017-04-21T14:25:31.000Z
Wobbler/Sources/Wobbler.c
ThisIsNotRocketScience/Eurorack-KDS
1e8d76e1313cc910b9dcdf8811bec15de17489eb
[ "MIT" ]
9
2016-01-02T01:20:44.000Z
2022-02-02T03:51:33.000Z
#include "Wobbler.h" #include <math.h> #include "../../EurorackShared/EURORACKSHARED.H" #define __max(a,b) ((a)>(b)?(a):(b)) #define __min(a,b) ((a)<(b)?(a):(b)) #ifdef __cplusplus extern "C" { #endif void Wobbler_RandomSeed(struct Wobbler_RandomGen *R, unsigned int seed) { R->RandomMemory = (long)seed; } int Wobbler_Rand(struct Wobbler_RandomGen *R) { return (((R->RandomMemory = R->RandomMemory * 214013L + 2531011L) >> 16) & 0x7fff); } void Wobbler_Init(struct Wobbler_LFO *LFO) { LFO->Output = 0; LFO->OutputPhased = 0; LFO->Phase1 = 0; LFO->Gate[0] = 0; LFO->Gate[1] = 0; LFO->EnvelopeVal = 0; LFO->PhasedCountdown = 0; LFO->EnvelopeState = WOBBLER_IDLE; } void Wobbler_Trigger(struct Wobbler_LFO *LFO, unsigned char N, struct Wobbler_Params *Params) { if (N == 0) { LFO->Phase1 = 0; Wobbler_StartTwang(LFO); } } void Wobbler_LoadSettings(struct Wobbler_Settings *settings, struct Wobbler_Params *params) { } void Wobbler_ValidateParams(struct Wobbler_Params *params) { } unsigned long LFORange(int32_t V, int32_t SR) { return 1 + V*SR* 64; // return (unsigned long)(64 * pow((int32_t)((SR * 6) / 64.0), pow((int32_t)V, 0.54f))); } unsigned long LFORange2(int32_t V) { return 1 + V*V * 256 ; // return (unsigned long)(64 * pow((int32_t)((SR * 6) / 64.0), pow((int32_t)V, 0.54f))); } void Wobbler_StartTwang(struct Wobbler_LFO *LFO) { //LFO->EnvelopeVal = 0; LFO->EnvelopeState = WOBBLER_ATTACK; } int SampleHold(struct Wobbler_LFO_SNH *sh, struct Wobbler_LFO *lfo, uint32_t phase, uint16_t mod) { int newseg = (phase >> 29); SetSVF(&sh->filt, 0x10 + mod/4, 0x150 ); if (newseg != sh->lastseg) { if (newseg == 0) { Wobbler_RandomSeed(&sh->random, lfo->Phasing); } sh->lastseg = newseg; sh->lastval = (Wobbler_Rand(&sh->random)<<14) - (1<<28); } ProcessSVF(&sh->filt, sh->lastval>>16); return sh->filt.lo; } int Twang(struct Wobbler_LFO *LFO, uint32_t phase) { return (Sine(phase) >> 16) * (LFO->EnvelopeVal >> 8); } int Wobbler_Get(struct Wobbler_LFO *LFO, struct Wobbler_Params *Params) { if (LFO->Gate[0] > 0) { LFO->Gate[0]--; } if (LFO->Gate[1] > 0) { LFO->Gate[1]--; } if (LFO->EnvelopeState != WOBBLER_IDLE) { uint32_t A = 0; uint32_t R = LFORange(128, 2000) >> 12; if (LFO->Mod < 128) { R = 1 + (LFORange(LFO->Mod, 2000) >> 12); } else { A = 1 + (LFORange(LFO->Mod - 128, 2000) >> 12); } if (LFO->EnvelopeState == WOBBLER_ATTACK) { if (A == 0) { LFO->EnvelopeState = WOBBLER_RELEASE; LFO->EnvelopeVal = 1 << 24; } else { LFO->EnvelopeVal += ((1 << 24) - 1) / A; if (LFO->EnvelopeVal >= 1 << 24) { LFO->EnvelopeVal = 1 << 24; LFO->EnvelopeState = WOBBLER_RELEASE; } } } else { LFO->EnvelopeVal -= ((1 << 24) - 1) / R; if (LFO->EnvelopeVal <= 0) { LFO->EnvelopeState = WOBBLER_IDLE; LFO->EnvelopeVal = 0; } } } uint32_t DP = LFORange2(LFO->Speed);; LFO->Phase1 += DP; uint32_t DP2 = LFO->Phasing * 0x1000000; //DP2 <<= 24; LFO->Phase2 = LFO->Phase1 + DP2; for (int i = 0; i < 12; i++) { LFO->Led[i] = 0; } if (LFO->Phase1 < LFO->OldPhase1) { LFO->Gate[1] = WOBBLER_GATECOUNTDOWN; if (LFO->PhasedCountdown > 0) { LFO->Gate[0] = WOBBLER_GATECOUNTDOWN; } LFO->PhasedCountdown = LFO->Phasing << 24; } uint32_t last = LFO->PhasedCountdown; LFO->PhasedCountdown -= __min(DP, LFO->PhasedCountdown); if (LFO->PhasedCountdown == 0 && last != 0) { LFO->Gate[0] = WOBBLER_GATECOUNTDOWN; } LFO->OldPhase1 = LFO->Phase1; LFO->OldPhase2 = LFO->Phase2; int32_t O[4]; int32_t P[4]; O[0] = BasicShapes(LFO->Phase1, LFO->Mod, &LFO->CompensationVals); O[1] = Twang(LFO, LFO->Phase1); O[2] = SampleHold(&LFO->SNH[0],LFO, LFO->Phase1, LFO->Mod); O[3] = -BasicShapes(LFO->Phase1, LFO->Mod, &LFO->CompensationVals); P[0] = BasicShapes(LFO->Phase2, LFO->Mod, &LFO->CompensationVals); P[1] = Twang(LFO, LFO->Phase2); P[2] = SampleHold(&LFO->SNH[1], LFO, LFO->Phase2, LFO->Mod); P[3] = -BasicShapes(LFO->Phase2, LFO->Mod, &LFO->CompensationVals); LFO->Output = LERP(O, 3, LFO->Shape) / (0xffff * 4); LFO->OutputPhased = LERP(P, 3, LFO->Shape) / (0xffff * 4); LFO->Output += 2048;// + (2540 - 2048); LFO->OutputPhased += 2048;// +(2540 - 2048); if (LFO->Output > 4095) LFO->Output = 4095; else if (LFO->Output < 0) LFO->Output = 0; if (LFO->OutputPhased > 4095) LFO->OutputPhased = 4095; else if (LFO->OutputPhased < 0) LFO->OutputPhased = 0; //if (LFO->Output > 1) LFO->Output = 1; else if (LFO->Output < -1) LFO->Output = -1; int32_t LedIdxB = (LFO->Output * 11); int iLedIdxB = LedIdxB >> 12; int IdxB = ((LedIdxB - (iLedIdxB << 12))) >> 4; LFO->Led[(iLedIdxB + 12) % 12] = 255 - IdxB; LFO->Led[(iLedIdxB + 13) % 12] = IdxB; int32_t LedIdxA = (LFO->OutputPhased * 11); int iLedIdxA = LedIdxA >> 12; int IdxA = ((LedIdxA - (iLedIdxA << 12))) >> 4; LFO->Led[(iLedIdxA + 12) % 12] = __max(LFO->Led[(iLedIdxA + 12) % 12], 255 - IdxA); LFO->Led[(iLedIdxA + 13) % 12] = __max(LFO->Led[(iLedIdxA + 13) % 12], IdxA); return LFO->Output; } #ifdef __cplusplus } #endif
22.831897
112
0.595809
82253961037a060a6bd59e06892970f18e600d13
335
c
C
src/my_strcmp.c
JosephCHS/my_runner
bdfb0a24b02c123031cf53e2098635554b5973d4
[ "MIT" ]
null
null
null
src/my_strcmp.c
JosephCHS/my_runner
bdfb0a24b02c123031cf53e2098635554b5973d4
[ "MIT" ]
null
null
null
src/my_strcmp.c
JosephCHS/my_runner
bdfb0a24b02c123031cf53e2098635554b5973d4
[ "MIT" ]
null
null
null
/* ** EPITECH PROJECT, 2017 ** my_strcmp.c ** File description: ** Made by Joseph Chartois */ int my_strcmp(char const *str1, char const *str2) { int idx = 0; int dif = 0; while (str1[idx] != '\0' && str2[idx] != '\0') { dif = str1[idx] - str2[idx]; if (dif == 0) { idx++; } else { return (dif); } } return (0); }
14.565217
49
0.543284
25679657a0bf99d62911917b0ed9d55f5c6b7cd0
3,927
h
C
netbsd/sys/arch/atari/include/iomap.h
MarginC/kame
2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30
[ "BSD-3-Clause" ]
91
2015-01-05T15:18:31.000Z
2022-03-11T16:43:28.000Z
netbsd/sys/arch/atari/include/iomap.h
MarginC/kame
2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30
[ "BSD-3-Clause" ]
1
2016-02-25T15:57:55.000Z
2016-02-25T16:01:02.000Z
netbsd/sys/arch/atari/include/iomap.h
MarginC/kame
2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30
[ "BSD-3-Clause" ]
21
2015-02-07T08:23:07.000Z
2021-12-14T06:01:49.000Z
/* $NetBSD: iomap.h,v 1.5 1998/12/20 14:33:07 thomas Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. * 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. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Leo Weppelman. * 4. 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. */ #ifndef _MACHINE_IOMAP_H #define _MACHINE_IOMAP_H /* * Atari TT hardware: * I/O Address maps */ #ifdef _KERNEL vaddr_t stio_addr; /* Where the st io-area is mapped */ #define AD_STIO (stio_addr) /* .. see atari_init.c */ /* * PCI KVA addresses. These are determined in atari_init.c. Except for * the config-space, they should be used for a PCI-console only. Other * cards should use the bus-functions to map io & mem spaces. * Each card gets an config area of NBPG bytes. */ vaddr_t pci_conf_addr; /* KVA base of PCI config space */ vaddr_t pci_io_addr; /* KVA base of PCI io-space */ vaddr_t pci_mem_addr; /* KVA base of PCI mem-space */ #endif /* _KERNEL */ #define PCI_CONFB_PHYS (0xA0000000L) #define PCI_CONFM_PHYS (0x00080000L) #define PCI_IO_PHYS (0xB0000000L) #define PCI_MEM_PHYS (0x80000000L) #define PCI_VGA_PHYS (0x800a0000L) #define PCI_CONF_SIZE (4 * NBPG) #define PCI_IO_SIZE (NBPG) #define PCI_VGA_SIZE (32 * 1024) #define AD_RAM (0x000000L) /* main memory */ #define AD_CART (0xFA0000L) /* expansion cartridge */ #define AD_ROM (0xFC0000L) /* system ROM */ #define STIO_SIZE (0x8000L) /* Size of mapped I/O devices */ /* * Physical address of I/O area. Use only for pte initialisation! */ #define STIO_PHYS ((machineid & ATARI_HADES) \ ? 0xffff8000L \ : 0x00ff8000L) /* * I/O addresses in the STIO area: */ #define AD_RAMCFG (AD_STIO + 0x0000) /* ram configuration */ #define AD_FAL_MON_TYPE (AD_STIO + 0x0006) /* Falcon monitor type */ #define AD_VIDEO (AD_STIO + 0x0200) /* video controller */ #define AD_RESERVED (AD_STIO + 0x0400) /* reserved */ #define AD_DMA (AD_STIO + 0x0600) /* DMA device access */ #define AD_SCSI_DMA (AD_STIO + 0x0700) /* SCSI DMA registers */ #define AD_NCR5380 (AD_STIO + 0x0780) /* SCSI controller */ #define AD_SOUND (AD_STIO + 0x0800) /* YM-2149 */ #define AD_RTC (AD_STIO + 0x0960) /* TT realtime clock */ #define AD_SCC (AD_STIO + 0x0C80) /* SCC 8530 */ #define AD_SCU (AD_STIO + 0x0E00) /* System Control Unit */ #define AD_MFP (AD_STIO + 0x7A00) /* 68901 */ #define AD_MFP2 (AD_STIO + 0x7A80) /* 68901-TT */ #define AD_ACIA (AD_STIO + 0x7C00) /* 2 * 6850 */ #endif /* _MACHINE_IOMAP_H */
41.336842
76
0.725236
b2624f9a8445b8bd3502c6d240eb5b500abfc5e9
743
h
C
rnf/modules/application/ip-traffic/ip-traffic-types.h
wilseypa/ROSS
c7f94e97238902b37ae01e30224de4ed4909435b
[ "BSD-3-Clause" ]
null
null
null
rnf/modules/application/ip-traffic/ip-traffic-types.h
wilseypa/ROSS
c7f94e97238902b37ae01e30224de4ed4909435b
[ "BSD-3-Clause" ]
null
null
null
rnf/modules/application/ip-traffic/ip-traffic-types.h
wilseypa/ROSS
c7f94e97238902b37ae01e30224de4ed4909435b
[ "BSD-3-Clause" ]
null
null
null
#ifndef INC_ip_traffic_types_h #define INC_ip_traffic_types_h #define FTP_START_EVENTS 1 #define FTP_SEND_TIME (double) 1.0 typedef enum ftp_event_states ftp_event_states; typedef struct ftp_message ftp_message; typedef struct ftp_lp_state ftp_lp_state; typedef struct ftp_statistics ftp_statistics; enum ftp_event_states { FTP_READ, FTP_SEND }; struct ftp_message { ftp_event_states type; unsigned int size; }; struct ftp_lp_state { unsigned long int bytes_read; unsigned long int bytes_sent; unsigned long int files_sent; unsigned long int files_read; }; struct ftp_statistics { unsigned long int s_bytes_read; unsigned long int s_bytes_sent; unsigned long int s_files_sent; unsigned long int s_files_read; }; #endif
16.886364
47
0.808883
ec1b5ed26879d212dbc72712aa6fc17d904f7001
1,119
c
C
OpenSSL/distribuitedSw/hash_MD5_SHA1.c
FedericoCoppo/Tools
60ebe14953c380dd6b102c6ef3354b6a63d53356
[ "MIT" ]
null
null
null
OpenSSL/distribuitedSw/hash_MD5_SHA1.c
FedericoCoppo/Tools
60ebe14953c380dd6b102c6ef3354b6a63d53356
[ "MIT" ]
null
null
null
OpenSSL/distribuitedSw/hash_MD5_SHA1.c
FedericoCoppo/Tools
60ebe14953c380dd6b102c6ef3354b6a63d53356
[ "MIT" ]
null
null
null
#include <fcntl.h> #include <openssl/evp.h> #include <string.h> #include <unistd.h> int main(int argc,char **argv) { EVP_MD_CTX *md; unsigned char md_value[EVP_MAX_MD_SIZE]; int fd,n,i,md_len; unsigned char buf[1024]; md = EVP_MD_CTX_new(); if(argc < 2) { printf("Please give a filename to compute the SHA-1 digest on\n"); return 1; } OpenSSL_add_all_digests(); EVP_MD_CTX_init(md); EVP_DigestInit_ex(md, EVP_sha1(), NULL); if((fd = open(argv[1],O_RDONLY) ) == -1) { printf("Couldnt open input file, try again\n"); return 1; } while((n = read(fd,buf,1024)) > 0) EVP_DigestUpdate(md, buf,n); if(EVP_DigestFinal_ex(md, md_value, &md_len) != 1) { printf("Digest computation problem\n"); return 1; } // EVP_MD_CTX_cleanup(&md); EVP_MD_CTX_free(md); printf("Digest is: "); for(i = 0; i < md_len; i++) printf("%02x", md_value[i]); printf("\n"); return 0; }
26.642857
82
0.525469
b3ca855fc88440cf3f22c9d20faa602d2c4d5157
670
h
C
Frameworks/UIKit.framework/_UILazyMapTable.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
36
2016-04-20T04:19:04.000Z
2018-10-08T04:12:25.000Z
Frameworks/UIKit.framework/_UILazyMapTable.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
null
null
null
Frameworks/UIKit.framework/_UILazyMapTable.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
10
2016-06-16T02:40:44.000Z
2019-01-15T03:31:45.000Z
/* Generated by RuntimeBrowser Image: /System/Library/Frameworks/UIKit.framework/UIKit */ @interface _UILazyMapTable : NSObject { NSMapTable * _keysToClientTables; NSMapTable * _keysToValues; id /* block */ _mappingBlock; NSMapTable * _valuesToKeys; } - (void).cxx_destruct; - (id)cachedObjectEnumerable; - (id)cachedObjects; - (unsigned long long)count; - (id)description; - (bool)hasCachedObjectForKey:(id)arg1; - (id)initWithMappingBlock:(id /* block */)arg1; - (id)keyEnumerable; - (id)keys; - (id)objectForKey:(id)arg1; - (void)registerClient:(id)arg1 ofObjectForKey:(id)arg2; - (void)unregisterClient:(id)arg1 ofObjectForKey:(id)arg2; @end
25.769231
58
0.725373
7e13dcad775f5477f8d0c2ccd50d783d296529e5
2,286
h
C
AVConference.framework/VCAudioStreamConfig.h
reels-research/iOS-Private-Frameworks
9a4f4534939310a51fdbf5a439dd22487efb0f01
[ "MIT" ]
4
2021-10-06T12:15:26.000Z
2022-02-21T02:26:00.000Z
AVConference.framework/VCAudioStreamConfig.h
reels-research/iOS-Private-Frameworks
9a4f4534939310a51fdbf5a439dd22487efb0f01
[ "MIT" ]
null
null
null
AVConference.framework/VCAudioStreamConfig.h
reels-research/iOS-Private-Frameworks
9a4f4534939310a51fdbf5a439dd22487efb0f01
[ "MIT" ]
1
2021-10-08T07:40:53.000Z
2021-10-08T07:40:53.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/AVConference.framework/AVConference */ @interface VCAudioStreamConfig : VCMediaStreamConfig { long long _audioStreamMode; NSMutableDictionary * _codecConfigurations; bool _enableMaxBitrateOnNoChangeCMR; bool _forceEVSWideBand; bool _latencySensitiveMode; unsigned long long _maxPtime; unsigned char _numRedundantPayloads; unsigned long long _ptime; bool _redEnabled; NSMutableSet * _supportedNumRedundantPayload; float _volume; } @property (nonatomic) long long audioStreamMode; @property (nonatomic, readonly) NSDictionary *codecConfigurations; @property (nonatomic) bool enableMaxBitrateOnNoChangeCMR; @property (nonatomic) bool forceEVSWideBand; @property (getter=isLatencySensitiveMode, nonatomic) bool latencySensitiveMode; @property (nonatomic) unsigned long long maxPtime; @property (nonatomic) unsigned char numRedundantPayloads; @property (nonatomic) unsigned long long ptime; @property (getter=isRedEnabled, nonatomic, readonly) bool redEnabled; @property (nonatomic, readonly) NSArray *supportedNumRedundantPayload; @property (nonatomic) float volume; - (void)addCodecConfiguration:(id)arg1; - (void)addSupportedNumRedundantPayload:(unsigned int)arg1; - (long long)audioStreamMode; - (id)codecConfigurations; - (void)dealloc; - (bool)enableMaxBitrateOnNoChangeCMR; - (bool)forceEVSWideBand; - (id)init; - (id)initWithClientDictionary:(id)arg1; - (bool)isLatencySensitiveMode; - (bool)isRedEnabled; - (unsigned long long)maxPtime; - (unsigned char)numRedundantPayloads; - (unsigned long long)ptime; - (void)setAudioStreamMode:(long long)arg1; - (void)setEnableMaxBitrateOnNoChangeCMR:(bool)arg1; - (void)setForceEVSWideBand:(bool)arg1; - (void)setLatencySensitiveMode:(bool)arg1; - (void)setMaxPtime:(unsigned long long)arg1; - (void)setNumRedundantPayloads:(unsigned char)arg1; - (void)setPtime:(unsigned long long)arg1; - (void)setVolume:(float)arg1; - (bool)setupCNCodecWithClientDictionary:(id)arg1; - (bool)setupCodecWithClientDictionary:(id)arg1; - (bool)setupDTMFCodecWithClientDictionary:(id)arg1; - (void)setupRedWithRxPayload:(unsigned int)arg1 txPayload:(unsigned int)arg2; - (id)supportedNumRedundantPayload; - (float)volume; @end
37.47541
79
0.792651
01b024155c1c888ae46ea13ec1a18d232c71a3f5
66
h
C
UdpNtpClient_LAN8720/hal_conf_extra.h
khoih-prog/Arduino-STM32-Ethernet-LAN8720
f5252cb7c5409e574f0db411ca2a50be83c730f0
[ "MIT" ]
19
2020-03-15T07:38:15.000Z
2022-01-14T13:50:22.000Z
UdpNtpClient_LAN8720/hal_conf_extra.h
khoih-prog/Arduino-STM32-Ethernet-LAN8720
f5252cb7c5409e574f0db411ca2a50be83c730f0
[ "MIT" ]
4
2020-03-06T17:06:47.000Z
2021-03-31T03:01:03.000Z
UdpNtpClient_LAN8720/hal_conf_extra.h
khoih-prog/Arduino-STM32-Ethernet-LAN8720
f5252cb7c5409e574f0db411ca2a50be83c730f0
[ "MIT" ]
8
2020-04-15T22:02:37.000Z
2022-01-14T13:50:40.000Z
#define HAL_ETH_MODULE_ENABLED #define LAN8742A_PHY_ADDRESS 0x01U
22
34
0.893939
0470620bfcc248fd275d1eb3df71dcd904e70110
336
h
C
src/tools/pbconfig/pbconfig.h
eerimoq/punchboot
fbdc22b6669b3f5c405f350f723fdde54c13729c
[ "BSD-3-Clause" ]
1
2019-10-30T23:40:28.000Z
2019-10-30T23:40:28.000Z
src/tools/pbconfig/pbconfig.h
eerimoq/punchboot
fbdc22b6669b3f5c405f350f723fdde54c13729c
[ "BSD-3-Clause" ]
null
null
null
src/tools/pbconfig/pbconfig.h
eerimoq/punchboot
fbdc22b6669b3f5c405f350f723fdde54c13729c
[ "BSD-3-Clause" ]
null
null
null
#ifndef __PB_CONFIG_H__ #define __PB_CONFIG_H__ #include <stdint.h> void print_configuration(void); uint32_t pbconfig_load(const char *device, uint64_t primary_offset, uint64_t backup_offset); uint32_t pbconfig_switch(uint8_t system, uint8_t counter); uint32_t pbconfig_set_verified(uint8_t system); #endif
22.4
67
0.770833
2b8d0d2873eaa31710e7dd20521cbddedf46067b
1,775
c
C
libc/bsearch.c
luckboy/uportlibc
52b0133762c02c8e6c672f0f3219478961039b00
[ "MIT" ]
null
null
null
libc/bsearch.c
luckboy/uportlibc
52b0133762c02c8e6c672f0f3219478961039b00
[ "MIT" ]
null
null
null
libc/bsearch.c
luckboy/uportlibc
52b0133762c02c8e6c672f0f3219478961039b00
[ "MIT" ]
null
null
null
/* * Copyright (c) 2016 Łukasz Szpakowski * * 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 TEST #include <stdlib.h> #else #define UPORTLIBC_BSEARCH #include "uportlibc.h" #endif #include "array.h" void *bsearch(const void *key, const void *elems, size_t elem_count, size_t elem_size, int (*cmp)(const void *, const void *)) { size_t l, r; if(elem_count <= 0) return NULL; l = 0; r = elem_count - 1; while(1) { size_t m = (l + r) >> 1; const void *elem = const_array_elem(elems, m, elem_size); int res = cmp(key, elem); if(res == 0) { return (void *) elem; } else if(res < 0) { if(l >= m) break; r = m - 1; } else { if(m >= r) break; l = m + 1; } } return NULL; }
34.134615
126
0.689014
28cb734aa136f598928062361298f24a719a870a
1,008
h
C
framework/CoreDataDrivenSequence/Headers/ModuleDDSequence.h
Daniel-Mietchen/kigs
92ab6deaf3e947465781a400c5a791ee171876c8
[ "MIT" ]
38
2020-05-08T13:39:57.000Z
2022-03-28T05:58:41.000Z
framework/CoreDataDrivenSequence/Headers/ModuleDDSequence.h
Daniel-Mietchen/kigs
92ab6deaf3e947465781a400c5a791ee171876c8
[ "MIT" ]
3
2020-06-01T14:12:36.000Z
2020-06-24T13:05:21.000Z
framework/CoreDataDrivenSequence/Headers/ModuleDDSequence.h
Daniel-Mietchen/kigs
92ab6deaf3e947465781a400c5a791ee171876c8
[ "MIT" ]
16
2020-05-04T19:20:35.000Z
2022-01-25T08:31:29.000Z
#ifndef _MODULEDDSEQUENCE_H_ #define _MODULEDDSEQUENCE_H_ #include "ModuleBase.h" #include "CoreMap.h" /*! \defgroup DataDrivenApplication * */ // **************************************** // * ModuleDDSequence class // * -------------------------------------- /** * \file ModuleDDSequence.h * \class ModuleDDSequence * \ingroup DataDrivenApplication * \ingroup Module * \brief Manage Data Driven Sequences for Data Driven Application. */ // **************************************** class ModuleDDSequence : public ModuleBase { public: DECLARE_CLASS_INFO(ModuleDDSequence, ModuleBase, CoreDataDrivenSequence) //! constructor ModuleDDSequence(const kstl::string& name, DECLARE_CLASS_NAME_TREE_ARG); //! init module void Init(KigsCore* core, const kstl::vector<CoreModifiableAttribute*>* params) override; //! close module void Close() override; //! update module void Update(const Timer& timer, void* addParam) override; }; #endif //_MODULEDDSEQUENCE_H_
22.909091
93
0.640873
f3927974f3695cd1eed3451d67a3f2e10af1b88b
625
h
C
iOSOpenDev/frameworks/OfficeImport.framework/Headers/WDListTable.h
bzxy/cydia
f8c838cdbd86e49dddf15792e7aa56e2af80548d
[ "MIT" ]
678
2017-11-17T08:33:19.000Z
2022-03-26T10:40:20.000Z
iOSOpenDev/frameworks/OfficeImport.framework/Headers/WDListTable.h
chenfanfang/Cydia
5efce785bfd5f1064b9c0f0e29a9cc05aa24cad0
[ "MIT" ]
22
2019-04-16T05:51:53.000Z
2021-11-08T06:18:45.000Z
iOSOpenDev/frameworks/OfficeImport.framework/Headers/WDListTable.h
chenfanfang/Cydia
5efce785bfd5f1064b9c0f0e29a9cc05aa24cad0
[ "MIT" ]
170
2018-06-10T07:59:20.000Z
2022-03-22T16:19:33.000Z
/** * This header is generated by class-dump-z 0.2b. * * Source: /System/Library/PrivateFrameworks/OfficeImport.framework/OfficeImport */ #import <OfficeImport/XXUnknownSuperclass.h> @class NSMutableArray, WDDocument; __attribute__((visibility("hidden"))) @interface WDListTable : XXUnknownSuperclass { @private NSMutableArray *mLists; // 4 = 0x4 WDDocument *mDocument; // 8 = 0x8 } - (id)document; // 0x12e6ad - (int)listCount; // 0xa0e41 - (id)listAt:(int)at; // 0xa0ee1 - (id)lists; // 0x28d939 - (id)addList:(id)list; // 0x13ab51 - (id)initWithDocument:(id)document; // 0x121e31 - (void)dealloc; // 0xa29a1 @end
25
80
0.7136
9346f7c5656b1bc6478b0c487687e87a57cf9e83
1,551
h
C
utils/conf/config.h
FancyKings/TinyStatus
1067c3aec751d28a0276c1a03b47b2470f143da7
[ "Apache-2.0" ]
null
null
null
utils/conf/config.h
FancyKings/TinyStatus
1067c3aec751d28a0276c1a03b47b2470f143da7
[ "Apache-2.0" ]
null
null
null
utils/conf/config.h
FancyKings/TinyStatus
1067c3aec751d28a0276c1a03b47b2470f143da7
[ "Apache-2.0" ]
null
null
null
// // Created by FancyKing on 2021/5/16. // #ifndef TINYSTATUS_CONFIG_H #define TINYSTATUS_CONFIG_H #include "vector" #include "string" class Config { public: const std::string &getName() const; void setName(const std::string &name); const std::string &getDescription() const; void setDescription(const std::string &description); const std::string &getRemoteIp() const; void setRemoteIp(const std::string &remoteIp); const std::string &getRemotePort() const; void setRemotePort(const std::string &remotePort); const std::string &getPassword() const; void setPassword(const std::string &password); const int &getInterval() const; void setInterval(const int &interval); const std::string &getLogMode() const; void setLogMode(const std::string &logMode); const std::pair<std::string, std::string> &getSubIf() const; void setSubIf(const std::pair<std::string, std::string> &subIf); const std::vector<std::pair<std::string, std::string>> &getNetInterface() const; void setNetInterface(const std::vector<std::pair<std::string, std::string>> &netInterface); private: std::string _name; std::string _description; std::string _remote_ip; std::string _remote_port; std::string _password; int _interval; std::string _log_mode; std::pair<std::string, std::string> _sub_if; std::vector<std::pair<std::string, std::string>> _net_interface; }; #endif //TINYSTATUS_CONFIG_H
24.619048
96
0.664088
94e28d0021057aad6418d4d8d84b5d4456c159e9
1,336
h
C
mqtt.h
geeewizzz/xcomfortd
443f95cf1f0acdf5bf7ff2cee659f619d24b3c0c
[ "BSD-3-Clause" ]
18
2016-04-03T13:42:12.000Z
2021-09-20T21:58:15.000Z
mqtt.h
geeewizzz/xcomfortd
443f95cf1f0acdf5bf7ff2cee659f619d24b3c0c
[ "BSD-3-Clause" ]
7
2017-08-29T11:59:24.000Z
2021-03-07T10:22:01.000Z
mqtt.h
geeewizzz/xcomfortd
443f95cf1f0acdf5bf7ff2cee659f619d24b3c0c
[ "BSD-3-Clause" ]
8
2016-10-23T19:52:50.000Z
2021-12-17T21:34:05.000Z
/* -*- Mode: C++; c-file-style: "stroustrup" -*- */ /* * Copyright 2016 Karl Anders Oygard. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _MQTT_GATEWAY_H_ #define _MQTT_GATEWAY_H_ #include "usb.h" int64_t getmseconds(); class MQTTGateway : public USB { public: MQTTGateway(bool verbose); virtual bool Init(int epoll_fd, const char* server, int port, const char* username, const char* password); virtual void Stop(); virtual int Prepoll(int epoll_fd); virtual void Poll(const epoll_event& event); protected: // Verbose logging bool verbose; // Mosquitto instance mosquitto* mosq; private: static void mqtt_connected(mosquitto* mosq, void* obj, int rc); static void mqtt_disconnected(mosquitto* mosq, void* obj, int rc); static void mqtt_message(mosquitto* mosq, void* obj, const struct mosquitto_message* message); void MQTTConnected(int rc); void MQTTDisconnected(int rc); virtual void MQTTMessage(const struct mosquitto_message* message) = 0; bool RegisterSocket(); // Time to reconnect, only set when we have been disconnected int64_t reconnect_time; }; #endif
19.362319
74
0.659431
9e42e07b4b3ca74a5aca673feff48edb0f48847b
1,798
h
C
System/Library/Frameworks/MediaPlayer.framework/MPStoreModelGenericObjectBuilder.h
lechium/tvOS145Headers
9940da19adb0017f8037853e9cfccbe01b290dd5
[ "MIT" ]
5
2021-04-29T04:31:43.000Z
2021-08-19T18:59:58.000Z
System/Library/Frameworks/MediaPlayer.framework/MPStoreModelGenericObjectBuilder.h
lechium/tvOS145Headers
9940da19adb0017f8037853e9cfccbe01b290dd5
[ "MIT" ]
null
null
null
System/Library/Frameworks/MediaPlayer.framework/MPStoreModelGenericObjectBuilder.h
lechium/tvOS145Headers
9940da19adb0017f8037853e9cfccbe01b290dd5
[ "MIT" ]
1
2022-03-19T11:16:23.000Z
2022-03-19T11:16:23.000Z
/* * This header is generated by classdump-dyld 1.5 * on Wednesday, April 28, 2021 at 9:05:44 PM Mountain Standard Time * Operating System: Version 14.5 (Build 18L204) * Image Source: /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. Updated by Kevin Bradley. */ #import <MediaPlayer/MPStoreModelObjectBuilder.h> @class NSMapTable, MPStoreModelAlbumBuilder, MPStoreModelArtistBuilder, MPStoreModelMovieBuilder, MPStoreModelPlaylistBuilder, MPStoreModelSongBuilder, MPStoreModelTVEpisodeBuilder, MPStoreModelTVSeasonBuilder, MPStoreModelTVShowBuilder, MPStoreModelRecordLabelBuilder; @interface MPStoreModelGenericObjectBuilder : MPStoreModelObjectBuilder { NSMapTable* _baseContentItemIDToOccurrenceCount; MPStoreModelAlbumBuilder* _albumBuilder; MPStoreModelArtistBuilder* _artistBuilder; MPStoreModelMovieBuilder* _movieBuilder; MPStoreModelPlaylistBuilder* _playlistBuilder; MPStoreModelSongBuilder* _songBuilder; MPStoreModelTVEpisodeBuilder* _tvEpisodeBuilder; MPStoreModelTVSeasonBuilder* _tvSeasonBuilder; MPStoreModelTVShowBuilder* _tvShowBuilder; MPStoreModelRecordLabelBuilder* _recordLabelBuilder; BOOL _shouldUsePlaylistEntry; } @property (assign,nonatomic) BOOL shouldUsePlaylistEntry; //@synthesize shouldUsePlaylistEntry=_shouldUsePlaylistEntry - In the implementation block -(id)modelObjectWithStoreItemMetadata:(id)arg1 sourceModelObject:(id)arg2 userIdentity:(id)arg3 ; -(id)_modelObjectWithUniqueContentItemIDForModelObject:(id)arg1 ; -(BOOL)shouldUsePlaylistEntry; -(void)setShouldUsePlaylistEntry:(BOOL)arg1 ; @end
49.944444
269
0.780311
7f9b38196c6bc304dd5e673479263648202b73b8
7,006
h
C
System/Library/PrivateFrameworks/Espresso.framework/EspressoFDOverfeatNetwork.h
lechium/tvOS124Headers
11d1b56dd4c0ffd88b9eac43f87a5fd6f7228475
[ "MIT" ]
4
2019-08-27T18:03:47.000Z
2021-09-18T06:29:00.000Z
System/Library/PrivateFrameworks/Espresso.framework/EspressoFDOverfeatNetwork.h
lechium/tvOS124Headers
11d1b56dd4c0ffd88b9eac43f87a5fd6f7228475
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/Espresso.framework/EspressoFDOverfeatNetwork.h
lechium/tvOS124Headers
11d1b56dd4c0ffd88b9eac43f87a5fd6f7228475
[ "MIT" ]
null
null
null
/* * This header is generated by classdump-dyld 1.0 * on Saturday, August 24, 2019 at 9:45:01 PM Mountain Standard Time * Operating System: Version 12.4 (Build 16M568) * Image Source: /System/Library/PrivateFrameworks/Espresso.framework/Espresso * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ @protocol OS_dispatch_queue, OS_dispatch_semaphore; #import <Espresso/Espresso-Structs.h> @class NSMutableDictionary, NSObject, NSString; @interface EspressoFDOverfeatNetwork : NSObject { vector<std::__1::shared_ptr<Espresso::net>, std::__1::allocator<std::__1::shared_ptr<Espresso::net> > >* gpu_nets; vector<std::__1::shared_ptr<Espresso::net>, std::__1::allocator<std::__1::shared_ptr<Espresso::net> > >* ecpu_nets; vector<std::__1::pair<unsigned long long, unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long, unsigned long long> > >* net_scales; vector<std::__1::pair<unsigned long long, unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long, unsigned long long> > >* full_scales; vector<double, std::__1::allocator<double> >* scalesc; vector<std::__1::shared_ptr<Espresso::fast_pyramid_resizer>, std::__1::allocator<std::__1::shared_ptr<Espresso::fast_pyramid_resizer> > >* resizers_for_batching; int n_resizers_for_batching; vector<std::__1::shared_ptr<Espresso::blob<float, 3> >, std::__1::allocator<std::__1::shared_ptr<Espresso::blob<float, 3> > > >* probBlobs; vector<std::__1::shared_ptr<Espresso::blob<float, 3> >, std::__1::allocator<std::__1::shared_ptr<Espresso::blob<float, 3> > > >* boxBlobs; NSMutableDictionary* _errorForLayers; pair<unsigned long long, unsigned long long> cropDims; CGColorSpaceRef colorSpace; net_strides_configuration* strideConf; int retile_stride; int retile_tile_sz; vector<int, std::__1::allocator<int> >* retile_n_outputs_v; int tile_w_1; int tile_h_1; NSObject*<OS_dispatch_queue> cpu_queue_0; NSObject*<OS_dispatch_semaphore> cpu_semaphore; BOOL _useGPUScaler; int _scalingMode; float _maxScale; int _forceMaxNScales; int _scaleConfig; int _mode; int _cpin; NSString* _basename; NSString* _weights; shared_ptr<Espresso::abstract_context>* _context_metal; shared_ptr<Espresso::abstract_context>* _context_cpu; } @property (nonatomic,retain) NSString * basename; //@synthesize basename=_basename - In the implementation block @property (nonatomic,retain) NSString * weights; //@synthesize weights=_weights - In the implementation block @property (assign,nonatomic) int scaleConfig; //@synthesize scaleConfig=_scaleConfig - In the implementation block @property (assign,nonatomic) int mode; //@synthesize mode=_mode - In the implementation block @property (assign,nonatomic) int cpin; //@synthesize cpin=_cpin - In the implementation block @property (assign,nonatomic) BOOL useGPUScaler; //@synthesize useGPUScaler=_useGPUScaler - In the implementation block @property (assign,nonatomic) int scalingMode; //@synthesize scalingMode=_scalingMode - In the implementation block @property (assign,nonatomic) float maxScale; //@synthesize maxScale=_maxScale - In the implementation block @property (assign,nonatomic) shared_ptr<Espresso::abstract_context>* context_metal; //@synthesize context_metal=_context_metal - In the implementation block @property (assign,nonatomic) shared_ptr<Espresso::abstract_context>* context_cpu; //@synthesize context_cpu=_context_cpu - In the implementation block @property (assign,nonatomic) int forceMaxNScales; //@synthesize forceMaxNScales=_forceMaxNScales - In the implementation block -(void)setWeights:(NSString *)arg1 ; -(NSString *)weights; -(net_strides_configuration*)strideConfiguration; -(float)maxScale; -(int)getNumScales; -(shared_ptr<Espresso::fast_pyramid_resizer>*)resizerAtIndex:(int)arg1 ; -(shared_ptr<Espresso::blob<float, 3> >*)probBlobForScale:(int)arg1 ; -(shared_ptr<Espresso::blob<float, 3> >*)boxBlobForScale:(int)arg1 ; -(double)getScale:(int)arg1 ; -(int)scaleConfig; -(int)cpin; -(void)setScaleConfig:(int)arg1 ; -(void)setCpin:(int)arg1 ; -(void)retryLoadingCaffeNet:(shared_ptr<Espresso::net>*)arg1 name:(id)arg2 weights:(id)arg3 context:(shared_ptr<Espresso::abstract_context>*)arg4 cp:(int)arg5 ; -(void)setup_retile; -(void)setMaxScale:(float)arg1 ; -(void)generatePyramid:(const shared_ptr<Espresso::blob<unsigned char __attribute__((ext_vector_type(4))), 2> >*)arg1 tex:(id)arg2 ; -(void)processPyramid:(shared_ptr<Espresso::fast_pyramid_resizer>*)arg1 ; -(void)processPyramid:(shared_ptr<Espresso::fast_pyramid_resizer>*)arg1 gpu_resizer:(id)arg2 ; -(void)forward_cpu_network_at_index:(int)arg1 pyr:(const shared_ptr<Espresso::fast_pyramid_resizer>*)arg2 ; -(BOOL)needRetiling:(int)arg1 ; -(void)retile_and_forward_espresso_gpu_network_at_index:(int)arg1 net:(const shared_ptr<Espresso::net>*)arg2 pyr:(const shared_ptr<Espresso::fast_pyramid_resizer>*)arg3 ; -(int)default_retile_outputs; -(void)retile_and_forward_espresso_network_at_index:(int)arg1 net:(const shared_ptr<Espresso::net>*)arg2 pyr:(const shared_ptr<Espresso::fast_pyramid_resizer>*)arg3 ; -(int)resizerCount; -(shared_ptr<Espresso::net>*)gpu_net:(int)arg1 ; -(shared_ptr<Espresso::net>*)cpu_net:(int)arg1 ; -(void)processBlob:(const shared_ptr<Espresso::blob<unsigned char __attribute__((ext_vector_type(4))), 2> >*)arg1 tex:(id)arg2 ; -(void)storeDataForPruning:(shared_ptr<Espresso::blob<float, 4> >*)arg1 prob:(float)arg2 ; -(id)errorForLayers; -(BOOL)useGPUScaler; -(void)setUseGPUScaler:(BOOL)arg1 ; -(shared_ptr<Espresso::abstract_context>*)context_metal; -(shared_ptr<Espresso::abstract_context>*)context_cpu; -(int)forceMaxNScales; -(void)setContext_metal:(shared_ptr<Espresso::abstract_context>*)arg1 ; -(void)setContext_cpu:(shared_ptr<Espresso::abstract_context>*)arg1 ; -(void)autoSetupNetBaseName:(id)arg1 weights:(id)arg2 scaleConfig:(int)arg3 setupMode:(int)arg4 computePath:(int)arg5 autoAspectRatio:(float)arg6 forceReset:(BOOL)arg7 useLowPriorityMode:(BOOL)arg8 gpuPriority:(int)arg9 ; -(void)setForceMaxNScales:(int)arg1 ; -(void)wipeLayersMemory; -(void)autoResizeForAspectRatio:(float)arg1 useLowPriorityMode:(BOOL)arg2 gpuPriority:(int)arg3 ; -(void)processBlobNoRotation:(const shared_ptr<Espresso::blob<unsigned char __attribute__((ext_vector_type(4))), 2> >*)arg1 tex:(id)arg2 doBGRA2RGBA:(BOOL)arg3 ; -(int)scalingMode; -(void)setScalingMode:(int)arg1 ; -(void)setBasename:(NSString *)arg1 ; -(NSString *)basename; -(id)init; -(void)dealloc; -(void)reset; -(int)mode; -(void)setMode:(int)arg1 ; @end
61.45614
221
0.725664
9a7da6beb2bdd8ae21cf42a55142a92f00d71e16
1,755
h
C
include/nano/function/benchmark.h
accosmin/libnan
a47c28f22df2c0943697dccb007de946090c7705
[ "MIT" ]
null
null
null
include/nano/function/benchmark.h
accosmin/libnan
a47c28f22df2c0943697dccb007de946090c7705
[ "MIT" ]
null
null
null
include/nano/function/benchmark.h
accosmin/libnan
a47c28f22df2c0943697dccb007de946090c7705
[ "MIT" ]
null
null
null
#pragma once #include <nano/function.h> #include <nano/core/factory.h> namespace nano { class benchmark_function_t; using function_factory_t = factory_t<benchmark_function_t>; using rfunction_t = std::unique_ptr<function_t>; using rfunctions_t = std::vector<rfunction_t>; enum class convexity { ignore, yes, no }; enum class smoothness { ignore, yes, no }; /// /// \brief test function useful for benchmarking numerical optimization methods. /// class NANO_PUBLIC benchmark_function_t : public function_t { public: using function_t::function_t; /// /// \brief returns the available implementations. /// static function_factory_t& all(); /// /// \brief construct test functions having: /// - the number of dimensions within the given range, /// - the given number of summands and /// - the given requirements in terms of smoothness and convexity. /// struct config_t { tensor_size_t m_min_dims{2}; ///< tensor_size_t m_max_dims{8}; ///< convexity m_convexity{convexity::ignore}; ///< smoothness m_smoothness{smoothness::ignore}; ///< tensor_size_t m_summands{1000}; ///< }; static rfunctions_t make(config_t, const std::regex& id_regex = std::regex(".+")); /// /// \brief construct a test function with the given number of free dimensions and summands (if possible). /// virtual rfunction_t make(tensor_size_t dims, tensor_size_t summands) const = 0; }; }
29.745763
113
0.577208
c576c00ddb5fcc193902f7812ddfdb51c2268075
8,044
h
C
Source/Projects/GoddamnCore/Source/GoddamnEngine/Core/Templates/SharedPtr.h
GoddamnIndustries/GoddamnEngine
018c6582f6a2ebcba2c59693c677744434d66b20
[ "MIT" ]
4
2015-07-05T16:46:12.000Z
2021-02-04T09:32:47.000Z
Source/Projects/GoddamnCore/Source/GoddamnEngine/Core/Templates/SharedPtr.h
GoddamnIndustries/GoddamnEngine
018c6582f6a2ebcba2c59693c677744434d66b20
[ "MIT" ]
null
null
null
Source/Projects/GoddamnCore/Source/GoddamnEngine/Core/Templates/SharedPtr.h
GoddamnIndustries/GoddamnEngine
018c6582f6a2ebcba2c59693c677744434d66b20
[ "MIT" ]
1
2017-01-27T22:49:12.000Z
2017-01-27T22:49:12.000Z
// ========================================================================================== // Copyright (C) Goddamn Industries 2018. All Rights Reserved. // // This software or any its part is distributed under terms of Goddamn Industries End User // License Agreement. By downloading or using this software or any its part you agree with // terms of Goddamn Industries End User License Agreement. // ========================================================================================== /*! * @file GoddamnEngine/Core/Templates/SharedPtr.h * File contains smart pointer for reference-countable classes. */ #pragma once #include <GoddamnEngine/Include.h> #include <GoddamnEngine/Core/Templates/TypeTraits.h> GD_NAMESPACE_BEGIN // **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~** // ****** SharedPtr<T> class. ****** // **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~** // **------------------------------------------------------------------------------------------** //! Implements base non-thread safe reference counting. // **------------------------------------------------------------------------------------------** template<typename TCounter = UInt32> struct TReferenceTarget : IVirtuallyDestructible { private: TCounter m_ReferenceCount = 1; public: /*! * @brief Increments reference counter for this object. * This method should be called for each copy of the pointer to the object. */ GDINL void AddRef() { ++m_ReferenceCount; } /*! * @brief Decrements reference counter for this object. * When reference counter reaches zero, object is recycled. * This method should be called for each copy of the pointer to the object. */ GDINL void Release() { --m_ReferenceCount; if (m_ReferenceCount == 0) { gd_delete this; } } }; // struct ReferenceTarget using ReferenceTarget = TReferenceTarget<>; GD_HAS_MEMBER_FUNCTION(AddRef); GD_HAS_MEMBER_FUNCTION(Release); /*! * Increments reference counter for this object (if it is non-null). */ template<typename TReferenceTargetPtr> GDINL static void SafeAddRef(TReferenceTargetPtr const& refTarget) { if (refTarget != nullptr) { refTarget->AddRef(); } } /*! * Decrements reference counter for this object (if it is non-null). */ template<typename TReferenceTargetPtr> GDINL static void SafeRelease(TReferenceTargetPtr const& refTarget) { if (refTarget != nullptr) { refTarget->Release(); } } // **------------------------------------------------------------------------------------------** //! Implements casting operations for shared pointers using @c static_cast. // **------------------------------------------------------------------------------------------** struct SharedPtrStaticCastOperation final : public TNonCreatable { /*! * Casts to types using static_cast. */ template<typename TCastTo, typename TCastFrom> GDINL static TCastTo Cast(TCastFrom castFrom) { return static_cast<TCastTo>(castFrom); } }; // struct SharedPtrStaticCastOperation // **------------------------------------------------------------------------------------------** //! Helper class that implements a reference-counting pattern for objects. // **------------------------------------------------------------------------------------------** template<typename TPointee, typename TCast = SharedPtrStaticCastOperation> struct SharedPtr final { template<typename, typename> friend struct SharedPtr; static_assert(TypeTraits::HasMemberFunction_AddRef<TPointee>::Value, "Target type for shared pointers should be contain 'AddRef' function."); static_assert(TypeTraits::HasMemberFunction_Release<TPointee>::Value, "Target type for shared pointers should be contain 'Release' function."); public: using PointeeType = TPointee; using CastType = TCast; private: TPointee* m_RawPointer; public: /*! * Initializes an empty reference-counted shared pointer. */ GDINL SharedPtr() : m_RawPointer(nullptr) { } /*! * Initializes the shared reference-counted pointer with specified raw pointer. * @param rawPointer Raw pointer. */ //! @{ GDINL implicit SharedPtr(nullptr_t rawPointer) : m_RawPointer(nullptr) { GD_NOT_USED(rawPointer); } GDINL implicit SharedPtr(TPointee* const rawPointer) : m_RawPointer(rawPointer) { } template<typename TOtherPointee> GDINL implicit SharedPtr(TOtherPointee* const rawPointer) : m_RawPointer(TCast::template Cast<TPointee*>(rawPointer)) { } //! @} /*! * Initializes an reference-counted pointer with copy of the other pointer. * @param otherSharedPtr Other automated pointer. */ //! @{ GDINL implicit SharedPtr(SharedPtr const& otherSharedPtr) : m_RawPointer(otherSharedPtr.Get()) { GD::SafeAddRef(m_RawPointer); } template<typename TOtherPointee> GDINL implicit SharedPtr(SharedPtr<TOtherPointee, TCast> const& otherSharedPtr) : m_RawPointer(TCast::template Cast<TPointee*>(otherSharedPtr.Get())) { GD::SafeAddRef(m_RawPointer); } //! @} /*! * Moves other shared pointer to this object. * @param other The other shared pointer to move here. */ GDINL SharedPtr(SharedPtr&& other) noexcept : m_RawPointer(other.m_RawPointer) { other.m_RawPointer = nullptr; } GDINL ~SharedPtr() { GD::SafeRelease(m_RawPointer); } public: /*! * Returns reference to the stored raw pointer. */ GDINL TPointee* Get() const { return m_RawPointer; } public: // shared_ptr = ... GDINL SharedPtr& operator= (TPointee* const rawPointer) { GD::SafeRelease(m_RawPointer); m_RawPointer = rawPointer; GD::SafeAddRef(m_RawPointer); return *this; } GDINL SharedPtr& operator= (SharedPtr&& other) noexcept { if (this != &other) { GD::SafeRelease(m_RawPointer); m_RawPointer = other.m_RawPointer; other.m_RawPointer = nullptr; } return *this; } GDINL SharedPtr& operator= (SharedPtr const& otherSharedPtr) { *this = otherSharedPtr.m_RawPointer; return *this; } // shared_ptr == nullptr GDINL bool operator== (nullptr_t) const { return m_RawPointer == nullptr; } GDINL bool operator!= (nullptr_t) const { return m_RawPointer != nullptr; } // shared_ptr == T* template<typename TOtherPointee> GDINL bool operator== (TOtherPointee* const rawPointer) const { return m_RawPointer == rawPointer; } template<typename TOtherPointee> GDINL bool operator!= (TOtherPointee* const rawPointer) const { return m_RawPointer != rawPointer; } // shared_ptr == shared_ptr template<typename TOtherPointee> GDINL bool operator== (SharedPtr<TOtherPointee, TCast> const& otherSharedPtr) const { return m_RawPointer == otherSharedPtr.m_RawPointer; } template<typename TOtherPointee> GDINL bool operator!= (SharedPtr<TOtherPointee, TCast> const& otherSharedPtr) const { return m_RawPointer != otherSharedPtr.m_RawPointer; } // shared_ptr-> GDINL TPointee* operator-> () const { return m_RawPointer; } GDINL TPointee& operator* () const { return *m_RawPointer; } // (shared_ptr<U>)shared_ptr<T> template<typename TOtherPointee> GDINL explicit operator SharedPtr<TOtherPointee, TCast>() const { static_assert(TypeTraits::IsBase<TOtherPointee, TPointee>::Value || TypeTraits::IsBase<TPointee, TOtherPointee>::Value, "Cast types should be related."); return TCast::template Cast<TOtherPointee*>(m_RawPointer); } GDINL implicit operator SharedPtr<TPointee const, TCast>() const { return m_RawPointer; } }; // struct SharedPtr<TPointee> /*! * Creates a shared pointer. * @param pointee Raw pointer. */ template<typename TPointee> GDINL static SharedPtr<TPointee> MakeShared(TPointee* const pointee) { return SharedPtr<TPointee>(pointee); } GD_NAMESPACE_END
27.642612
156
0.62096
5cea42cc6b2f8151b834df31d2280af110a78e2c
25,048
c
C
python-3.6.0/Modules/_bz2module.c
emacslisp/python
5b89ddcc504108f0dfa1081e338e6475cf6ccd2f
[ "Apache-2.0" ]
27
2017-04-21T14:57:04.000Z
2021-11-03T22:10:38.000Z
python-3.6.0/Modules/_bz2module.c
emacslisp/python
5b89ddcc504108f0dfa1081e338e6475cf6ccd2f
[ "Apache-2.0" ]
3
2017-04-24T13:25:31.000Z
2017-04-24T13:27:12.000Z
python-3.6.0/Modules/_bz2module.c
emacslisp/python
5b89ddcc504108f0dfa1081e338e6475cf6ccd2f
[ "Apache-2.0" ]
11
2015-01-12T14:50:00.000Z
2021-08-18T00:48:02.000Z
/* _bz2 - Low-level Python interface to libbzip2. */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifdef WITH_THREAD #include "pythread.h" #endif #include <bzlib.h> #include <stdio.h> #ifndef BZ_CONFIG_ERROR #define BZ2_bzCompress bzCompress #define BZ2_bzCompressInit bzCompressInit #define BZ2_bzCompressEnd bzCompressEnd #define BZ2_bzDecompress bzDecompress #define BZ2_bzDecompressInit bzDecompressInit #define BZ2_bzDecompressEnd bzDecompressEnd #endif /* ! BZ_CONFIG_ERROR */ #ifdef WITH_THREAD #define ACQUIRE_LOCK(obj) do { \ if (!PyThread_acquire_lock((obj)->lock, 0)) { \ Py_BEGIN_ALLOW_THREADS \ PyThread_acquire_lock((obj)->lock, 1); \ Py_END_ALLOW_THREADS \ } } while (0) #define RELEASE_LOCK(obj) PyThread_release_lock((obj)->lock) #else #define ACQUIRE_LOCK(obj) #define RELEASE_LOCK(obj) #endif typedef struct { PyObject_HEAD bz_stream bzs; int flushed; #ifdef WITH_THREAD PyThread_type_lock lock; #endif } BZ2Compressor; typedef struct { PyObject_HEAD bz_stream bzs; char eof; /* T_BOOL expects a char */ PyObject *unused_data; char needs_input; char *input_buffer; size_t input_buffer_size; /* bzs->avail_in is only 32 bit, so we store the true length separately. Conversion and looping is encapsulated in decompress_buf() */ size_t bzs_avail_in_real; #ifdef WITH_THREAD PyThread_type_lock lock; #endif } BZ2Decompressor; static PyTypeObject BZ2Compressor_Type; static PyTypeObject BZ2Decompressor_Type; /* Helper functions. */ static int catch_bz2_error(int bzerror) { switch(bzerror) { case BZ_OK: case BZ_RUN_OK: case BZ_FLUSH_OK: case BZ_FINISH_OK: case BZ_STREAM_END: return 0; #ifdef BZ_CONFIG_ERROR case BZ_CONFIG_ERROR: PyErr_SetString(PyExc_SystemError, "libbzip2 was not compiled correctly"); return 1; #endif case BZ_PARAM_ERROR: PyErr_SetString(PyExc_ValueError, "Internal error - " "invalid parameters passed to libbzip2"); return 1; case BZ_MEM_ERROR: PyErr_NoMemory(); return 1; case BZ_DATA_ERROR: case BZ_DATA_ERROR_MAGIC: PyErr_SetString(PyExc_IOError, "Invalid data stream"); return 1; case BZ_IO_ERROR: PyErr_SetString(PyExc_IOError, "Unknown I/O error"); return 1; case BZ_UNEXPECTED_EOF: PyErr_SetString(PyExc_EOFError, "Compressed file ended before the logical " "end-of-stream was detected"); return 1; case BZ_SEQUENCE_ERROR: PyErr_SetString(PyExc_RuntimeError, "Internal error - " "Invalid sequence of commands sent to libbzip2"); return 1; default: PyErr_Format(PyExc_IOError, "Unrecognized error from libbzip2: %d", bzerror); return 1; } } #if BUFSIZ < 8192 #define INITIAL_BUFFER_SIZE 8192 #else #define INITIAL_BUFFER_SIZE BUFSIZ #endif static int grow_buffer(PyObject **buf, Py_ssize_t max_length) { /* Expand the buffer by an amount proportional to the current size, giving us amortized linear-time behavior. Use a less-than-double growth factor to avoid excessive allocation. */ size_t size = PyBytes_GET_SIZE(*buf); size_t new_size = size + (size >> 3) + 6; if (max_length > 0 && new_size > (size_t) max_length) new_size = (size_t) max_length; if (new_size > size) { return _PyBytes_Resize(buf, new_size); } else { /* overflow */ PyErr_SetString(PyExc_OverflowError, "Unable to allocate buffer - output too large"); return -1; } } /* BZ2Compressor class. */ static PyObject * compress(BZ2Compressor *c, char *data, size_t len, int action) { size_t data_size = 0; PyObject *result; result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); if (result == NULL) return NULL; c->bzs.next_in = data; c->bzs.avail_in = 0; c->bzs.next_out = PyBytes_AS_STRING(result); c->bzs.avail_out = INITIAL_BUFFER_SIZE; for (;;) { char *this_out; int bzerror; /* On a 64-bit system, len might not fit in avail_in (an unsigned int). Do compression in chunks of no more than UINT_MAX bytes each. */ if (c->bzs.avail_in == 0 && len > 0) { c->bzs.avail_in = (unsigned int)Py_MIN(len, UINT_MAX); len -= c->bzs.avail_in; } /* In regular compression mode, stop when input data is exhausted. */ if (action == BZ_RUN && c->bzs.avail_in == 0) break; if (c->bzs.avail_out == 0) { size_t buffer_left = PyBytes_GET_SIZE(result) - data_size; if (buffer_left == 0) { if (grow_buffer(&result, -1) < 0) goto error; c->bzs.next_out = PyBytes_AS_STRING(result) + data_size; buffer_left = PyBytes_GET_SIZE(result) - data_size; } c->bzs.avail_out = (unsigned int)Py_MIN(buffer_left, UINT_MAX); } Py_BEGIN_ALLOW_THREADS this_out = c->bzs.next_out; bzerror = BZ2_bzCompress(&c->bzs, action); data_size += c->bzs.next_out - this_out; Py_END_ALLOW_THREADS if (catch_bz2_error(bzerror)) goto error; /* In flushing mode, stop when all buffered data has been flushed. */ if (action == BZ_FINISH && bzerror == BZ_STREAM_END) break; } if (data_size != (size_t)PyBytes_GET_SIZE(result)) if (_PyBytes_Resize(&result, data_size) < 0) goto error; return result; error: Py_XDECREF(result); return NULL; } /*[clinic input] module _bz2 class _bz2.BZ2Compressor "BZ2Compressor *" "&BZ2Compressor_Type" class _bz2.BZ2Decompressor "BZ2Decompressor *" "&BZ2Decompressor_Type" [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=dc7d7992a79f9cb7]*/ #include "clinic/_bz2module.c.h" /*[clinic input] _bz2.BZ2Compressor.compress data: Py_buffer / Provide data to the compressor object. Returns a chunk of compressed data if possible, or b'' otherwise. When you have finished providing data to the compressor, call the flush() method to finish the compression process. [clinic start generated code]*/ static PyObject * _bz2_BZ2Compressor_compress_impl(BZ2Compressor *self, Py_buffer *data) /*[clinic end generated code: output=59365426e941fbcc input=85c963218070fc4c]*/ { PyObject *result = NULL; ACQUIRE_LOCK(self); if (self->flushed) PyErr_SetString(PyExc_ValueError, "Compressor has been flushed"); else result = compress(self, data->buf, data->len, BZ_RUN); RELEASE_LOCK(self); return result; } /*[clinic input] _bz2.BZ2Compressor.flush Finish the compression process. Returns the compressed data left in internal buffers. The compressor object may not be used after this method is called. [clinic start generated code]*/ static PyObject * _bz2_BZ2Compressor_flush_impl(BZ2Compressor *self) /*[clinic end generated code: output=3ef03fc1b092a701 input=d64405d3c6f76691]*/ { PyObject *result = NULL; ACQUIRE_LOCK(self); if (self->flushed) PyErr_SetString(PyExc_ValueError, "Repeated call to flush()"); else { self->flushed = 1; result = compress(self, NULL, 0, BZ_FINISH); } RELEASE_LOCK(self); return result; } static PyObject * BZ2Compressor_getstate(BZ2Compressor *self, PyObject *noargs) { PyErr_Format(PyExc_TypeError, "cannot serialize '%s' object", Py_TYPE(self)->tp_name); return NULL; } static void* BZ2_Malloc(void* ctx, int items, int size) { if (items < 0 || size < 0) return NULL; if ((size_t)items > (size_t)PY_SSIZE_T_MAX / (size_t)size) return NULL; /* PyMem_Malloc() cannot be used: compress() and decompress() release the GIL */ return PyMem_RawMalloc(items * size); } static void BZ2_Free(void* ctx, void *ptr) { PyMem_RawFree(ptr); } /*[clinic input] _bz2.BZ2Compressor.__init__ compresslevel: int = 9 Compression level, as a number between 1 and 9. / Create a compressor object for compressing data incrementally. For one-shot compression, use the compress() function instead. [clinic start generated code]*/ static int _bz2_BZ2Compressor___init___impl(BZ2Compressor *self, int compresslevel) /*[clinic end generated code: output=c4e6adfd02963827 input=4e1ff7b8394b6e9a]*/ { int bzerror; if (!(1 <= compresslevel && compresslevel <= 9)) { PyErr_SetString(PyExc_ValueError, "compresslevel must be between 1 and 9"); return -1; } #ifdef WITH_THREAD self->lock = PyThread_allocate_lock(); if (self->lock == NULL) { PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock"); return -1; } #endif self->bzs.opaque = NULL; self->bzs.bzalloc = BZ2_Malloc; self->bzs.bzfree = BZ2_Free; bzerror = BZ2_bzCompressInit(&self->bzs, compresslevel, 0, 0); if (catch_bz2_error(bzerror)) goto error; return 0; error: #ifdef WITH_THREAD PyThread_free_lock(self->lock); self->lock = NULL; #endif return -1; } static void BZ2Compressor_dealloc(BZ2Compressor *self) { BZ2_bzCompressEnd(&self->bzs); #ifdef WITH_THREAD if (self->lock != NULL) PyThread_free_lock(self->lock); #endif Py_TYPE(self)->tp_free((PyObject *)self); } static PyMethodDef BZ2Compressor_methods[] = { _BZ2_BZ2COMPRESSOR_COMPRESS_METHODDEF _BZ2_BZ2COMPRESSOR_FLUSH_METHODDEF {"__getstate__", (PyCFunction)BZ2Compressor_getstate, METH_NOARGS}, {NULL} }; static PyTypeObject BZ2Compressor_Type = { PyVarObject_HEAD_INIT(NULL, 0) "_bz2.BZ2Compressor", /* tp_name */ sizeof(BZ2Compressor), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BZ2Compressor_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_reserved */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ _bz2_BZ2Compressor___init____doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ BZ2Compressor_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ _bz2_BZ2Compressor___init__, /* tp_init */ 0, /* tp_alloc */ PyType_GenericNew, /* tp_new */ }; /* BZ2Decompressor class. */ /* Decompress data of length d->bzs_avail_in_real in d->bzs.next_in. The output buffer is allocated dynamically and returned. At most max_length bytes are returned, so some of the input may not be consumed. d->bzs.next_in and d->bzs_avail_in_real are updated to reflect the consumed input. */ static PyObject* decompress_buf(BZ2Decompressor *d, Py_ssize_t max_length) { /* data_size is strictly positive, but because we repeatedly have to compare against max_length and PyBytes_GET_SIZE we declare it as signed */ Py_ssize_t data_size = 0; PyObject *result; bz_stream *bzs = &d->bzs; if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE) result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); else result = PyBytes_FromStringAndSize(NULL, max_length); if (result == NULL) return NULL; bzs->next_out = PyBytes_AS_STRING(result); for (;;) { int bzret; size_t avail; /* On a 64-bit system, buffer length might not fit in avail_out, so we do decompression in chunks of no more than UINT_MAX bytes each. Note that the expression for `avail` is guaranteed to be positive, so the cast is safe. */ avail = (size_t) (PyBytes_GET_SIZE(result) - data_size); bzs->avail_out = (unsigned int)Py_MIN(avail, UINT_MAX); bzs->avail_in = (unsigned int)Py_MIN(d->bzs_avail_in_real, UINT_MAX); d->bzs_avail_in_real -= bzs->avail_in; Py_BEGIN_ALLOW_THREADS bzret = BZ2_bzDecompress(bzs); data_size = bzs->next_out - PyBytes_AS_STRING(result); d->bzs_avail_in_real += bzs->avail_in; Py_END_ALLOW_THREADS if (catch_bz2_error(bzret)) goto error; if (bzret == BZ_STREAM_END) { d->eof = 1; break; } else if (d->bzs_avail_in_real == 0) { break; } else if (bzs->avail_out == 0) { if (data_size == max_length) break; if (data_size == PyBytes_GET_SIZE(result) && grow_buffer(&result, max_length) == -1) goto error; bzs->next_out = PyBytes_AS_STRING(result) + data_size; } } if (data_size != PyBytes_GET_SIZE(result)) if (_PyBytes_Resize(&result, data_size) == -1) goto error; return result; error: Py_XDECREF(result); return NULL; } static PyObject * decompress(BZ2Decompressor *d, char *data, size_t len, Py_ssize_t max_length) { char input_buffer_in_use; PyObject *result; bz_stream *bzs = &d->bzs; /* Prepend unconsumed input if necessary */ if (bzs->next_in != NULL) { size_t avail_now, avail_total; /* Number of bytes we can append to input buffer */ avail_now = (d->input_buffer + d->input_buffer_size) - (bzs->next_in + d->bzs_avail_in_real); /* Number of bytes we can append if we move existing contents to beginning of buffer (overwriting consumed input) */ avail_total = d->input_buffer_size - d->bzs_avail_in_real; if (avail_total < len) { size_t offset = bzs->next_in - d->input_buffer; char *tmp; size_t new_size = d->input_buffer_size + len - avail_now; /* Assign to temporary variable first, so we don't lose address of allocated buffer if realloc fails */ tmp = PyMem_Realloc(d->input_buffer, new_size); if (tmp == NULL) { PyErr_SetNone(PyExc_MemoryError); return NULL; } d->input_buffer = tmp; d->input_buffer_size = new_size; bzs->next_in = d->input_buffer + offset; } else if (avail_now < len) { memmove(d->input_buffer, bzs->next_in, d->bzs_avail_in_real); bzs->next_in = d->input_buffer; } memcpy((void*)(bzs->next_in + d->bzs_avail_in_real), data, len); d->bzs_avail_in_real += len; input_buffer_in_use = 1; } else { bzs->next_in = data; d->bzs_avail_in_real = len; input_buffer_in_use = 0; } result = decompress_buf(d, max_length); if(result == NULL) { bzs->next_in = NULL; return NULL; } if (d->eof) { d->needs_input = 0; if (d->bzs_avail_in_real > 0) { Py_XSETREF(d->unused_data, PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real)); if (d->unused_data == NULL) goto error; } } else if (d->bzs_avail_in_real == 0) { bzs->next_in = NULL; d->needs_input = 1; } else { d->needs_input = 0; /* If we did not use the input buffer, we now have to copy the tail from the caller's buffer into the input buffer */ if (!input_buffer_in_use) { /* Discard buffer if it's too small (resizing it may needlessly copy the current contents) */ if (d->input_buffer != NULL && d->input_buffer_size < d->bzs_avail_in_real) { PyMem_Free(d->input_buffer); d->input_buffer = NULL; } /* Allocate if necessary */ if (d->input_buffer == NULL) { d->input_buffer = PyMem_Malloc(d->bzs_avail_in_real); if (d->input_buffer == NULL) { PyErr_SetNone(PyExc_MemoryError); goto error; } d->input_buffer_size = d->bzs_avail_in_real; } /* Copy tail */ memcpy(d->input_buffer, bzs->next_in, d->bzs_avail_in_real); bzs->next_in = d->input_buffer; } } return result; error: Py_XDECREF(result); return NULL; } /*[clinic input] _bz2.BZ2Decompressor.decompress data: Py_buffer max_length: Py_ssize_t=-1 Decompress *data*, returning uncompressed data as bytes. If *max_length* is nonnegative, returns at most *max_length* bytes of decompressed data. If this limit is reached and further output can be produced, *self.needs_input* will be set to ``False``. In this case, the next call to *decompress()* may provide *data* as b'' to obtain more of the output. If all of the input data was decompressed and returned (either because this was less than *max_length* bytes, or because *max_length* was negative), *self.needs_input* will be set to True. Attempting to decompress data after the end of stream is reached raises an EOFError. Any data found after the end of the stream is ignored and saved in the unused_data attribute. [clinic start generated code]*/ static PyObject * _bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data, Py_ssize_t max_length) /*[clinic end generated code: output=23e41045deb240a3 input=52e1ffc66a8ea624]*/ { PyObject *result = NULL; ACQUIRE_LOCK(self); if (self->eof) PyErr_SetString(PyExc_EOFError, "End of stream already reached"); else result = decompress(self, data->buf, data->len, max_length); RELEASE_LOCK(self); return result; } static PyObject * BZ2Decompressor_getstate(BZ2Decompressor *self, PyObject *noargs) { PyErr_Format(PyExc_TypeError, "cannot serialize '%s' object", Py_TYPE(self)->tp_name); return NULL; } /*[clinic input] _bz2.BZ2Decompressor.__init__ Create a decompressor object for decompressing data incrementally. For one-shot decompression, use the decompress() function instead. [clinic start generated code]*/ static int _bz2_BZ2Decompressor___init___impl(BZ2Decompressor *self) /*[clinic end generated code: output=e4d2b9bb866ab8f1 input=95f6500dcda60088]*/ { int bzerror; #ifdef WITH_THREAD self->lock = PyThread_allocate_lock(); if (self->lock == NULL) { PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock"); return -1; } #endif self->needs_input = 1; self->bzs_avail_in_real = 0; self->input_buffer = NULL; self->input_buffer_size = 0; self->unused_data = PyBytes_FromStringAndSize(NULL, 0); if (self->unused_data == NULL) goto error; bzerror = BZ2_bzDecompressInit(&self->bzs, 0, 0); if (catch_bz2_error(bzerror)) goto error; return 0; error: Py_CLEAR(self->unused_data); #ifdef WITH_THREAD PyThread_free_lock(self->lock); self->lock = NULL; #endif return -1; } static void BZ2Decompressor_dealloc(BZ2Decompressor *self) { if(self->input_buffer != NULL) PyMem_Free(self->input_buffer); BZ2_bzDecompressEnd(&self->bzs); Py_CLEAR(self->unused_data); #ifdef WITH_THREAD if (self->lock != NULL) PyThread_free_lock(self->lock); #endif Py_TYPE(self)->tp_free((PyObject *)self); } static PyMethodDef BZ2Decompressor_methods[] = { _BZ2_BZ2DECOMPRESSOR_DECOMPRESS_METHODDEF {"__getstate__", (PyCFunction)BZ2Decompressor_getstate, METH_NOARGS}, {NULL} }; PyDoc_STRVAR(BZ2Decompressor_eof__doc__, "True if the end-of-stream marker has been reached."); PyDoc_STRVAR(BZ2Decompressor_unused_data__doc__, "Data found after the end of the compressed stream."); PyDoc_STRVAR(BZ2Decompressor_needs_input_doc, "True if more input is needed before more decompressed data can be produced."); static PyMemberDef BZ2Decompressor_members[] = { {"eof", T_BOOL, offsetof(BZ2Decompressor, eof), READONLY, BZ2Decompressor_eof__doc__}, {"unused_data", T_OBJECT_EX, offsetof(BZ2Decompressor, unused_data), READONLY, BZ2Decompressor_unused_data__doc__}, {"needs_input", T_BOOL, offsetof(BZ2Decompressor, needs_input), READONLY, BZ2Decompressor_needs_input_doc}, {NULL} }; static PyTypeObject BZ2Decompressor_Type = { PyVarObject_HEAD_INIT(NULL, 0) "_bz2.BZ2Decompressor", /* tp_name */ sizeof(BZ2Decompressor), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BZ2Decompressor_dealloc,/* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_reserved */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ _bz2_BZ2Decompressor___init____doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ BZ2Decompressor_methods, /* tp_methods */ BZ2Decompressor_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ _bz2_BZ2Decompressor___init__, /* tp_init */ 0, /* tp_alloc */ PyType_GenericNew, /* tp_new */ }; /* Module initialization. */ static struct PyModuleDef _bz2module = { PyModuleDef_HEAD_INIT, "_bz2", NULL, -1, NULL, NULL, NULL, NULL, NULL }; PyMODINIT_FUNC PyInit__bz2(void) { PyObject *m; if (PyType_Ready(&BZ2Compressor_Type) < 0) return NULL; if (PyType_Ready(&BZ2Decompressor_Type) < 0) return NULL; m = PyModule_Create(&_bz2module); if (m == NULL) return NULL; Py_INCREF(&BZ2Compressor_Type); PyModule_AddObject(m, "BZ2Compressor", (PyObject *)&BZ2Compressor_Type); Py_INCREF(&BZ2Decompressor_Type); PyModule_AddObject(m, "BZ2Decompressor", (PyObject *)&BZ2Decompressor_Type); return m; }
31.193026
85
0.582801
a98e9f0c3023804e5bda3100c51056db8b4af737
918
h
C
framework/demuxer/play_list/playList.h
ZhouGuixin/CicadaPlayer
ef1c21181af2a161bfd930cbea2c3fc91714e636
[ "MIT" ]
448
2020-01-13T07:21:10.000Z
2022-03-31T09:03:03.000Z
framework/demuxer/play_list/playList.h
ZhouGuixin/CicadaPlayer
ef1c21181af2a161bfd930cbea2c3fc91714e636
[ "MIT" ]
370
2020-01-13T08:12:15.000Z
2022-03-24T15:46:02.000Z
framework/demuxer/play_list/playList.h
ZhouGuixin/CicadaPlayer
ef1c21181af2a161bfd930cbea2c3fc91714e636
[ "MIT" ]
124
2020-01-13T10:56:55.000Z
2022-03-31T06:25:55.000Z
// // Created by moqi on 2018/4/25. // #ifndef FRAMEWORK_PLAYLIST_H #define FRAMEWORK_PLAYLIST_H #include <list> #include "Period.h" //using namespace std; namespace Cicada{ class Period; class playList { public: playList() { } ~playList(); void addPeriod(Period *period); void setPlaylistUrl(const std::string &); const std::string &getPlaylistUrl(); void print(); std::list<Period *> &GetPeriods() { return mPeriodList; }; void setDuration(int64_t duration) { mDuration = duration; } int64_t getDuration() { return mDuration; } void dump(); private: std::list<Period *> mPeriodList{}; int64_t mDuration = 0; std::string playlistUrl = ""; }; } #endif //FRAMEWORK_PLAYLIST_H
15.3
49
0.535948
659abc574d356e5a1ff4cc604022e7dc7abc1989
7,397
h
C
asl/base/file_functions.h
artcom/asl
d47748983678c245ac2da3b5de56245ac41768fe
[ "BSL-1.0" ]
2
2016-01-11T01:06:11.000Z
2019-07-24T02:27:13.000Z
asl/base/file_functions.h
artcom/asl
d47748983678c245ac2da3b5de56245ac41768fe
[ "BSL-1.0" ]
null
null
null
asl/base/file_functions.h
artcom/asl
d47748983678c245ac2da3b5de56245ac41768fe
[ "BSL-1.0" ]
1
2016-01-31T18:14:37.000Z
2016-01-31T18:14:37.000Z
/* __ ___ ____ _____ ______ _______ ________ _______ ______ _____ ____ ___ __ // // Copyright (C) 1993-2012, ART+COM AG Berlin, Germany <www.artcom.de> // // This file is part of the ART+COM Standard Library (asl). // // It is distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // __ ___ ____ _____ ______ _______ ________ _______ ______ _____ ____ ___ __ // // // Description: Cross Platform File I/O helper function // // __ ___ ____ _____ ______ _______ ________ _______ ______ _____ ____ ___ __ */ #ifndef _included_asl_file_functions_ #define _included_asl_file_functions_ #include "asl_base_settings.h" #include "Exception.h" #include "Block.h" #include "PlugInManager.h" #include "Path.h" #include <string> #include <sys/types.h> #include <sys/stat.h> namespace asl { /*! \addtogroup aslbase */ /* @{ */ DEFINE_EXCEPTION(FileOpenFailed, asl::Exception); DEFINE_EXCEPTION(NotADirectory, asl::Exception); DEFINE_EXCEPTION(FileNotFoundException, asl::Exception); DEFINE_EXCEPTION(CreateDirectoryFailed, asl::Exception); DEFINE_EXCEPTION(RemoveDirectoryFailed, asl::Exception); DEFINE_EXCEPTION(OpenDirectoryFailed, asl::Exception); DEFINE_EXCEPTION(GetAppDirectoryFailed, asl::Exception); DEFINE_EXCEPTION(PathException, asl::Exception); ASL_BASE_DECL std::vector<std::string> getDirectoryEntries(const std::string & thePath); /** creates a new directory in an existing directory */ ASL_BASE_DECL void createDirectory(const std::string & theDirectory); /** removes a directory, recursively or flat */ ASL_BASE_DECL void removeDirectory(const std::string & theDirectory, const bool theRecursive = false); /** list names contained in a directory in theContent, returns false on error */ ASL_BASE_DECL bool listDirectory(const std::string & theDirectory, std::vector<std::string> & theContent); /** changes to a new directory */ ASL_BASE_DECL void changeDirectory(const std::string & theDirectory); /** creates a new directory and all necessary parent directories */ ASL_BASE_DECL void createPath(const std::string & theDirectory); ASL_BASE_DECL std::string getTempDirectory(); ASL_BASE_DECL std::string getAppDataDirectory(const std::string & theAppName); ASL_BASE_DECL std::string getAppDirectory(); /// returns true if theDirectory is a readable directory, false otherwise ASL_BASE_DECL bool isDirectory(const std::string & theDirectory); /// converts backslashes to slashes & reduces double slashes to single slashes. ASL_BASE_DECL std::string normalizeDirectory(const std::string & theDirectory, bool stripTrailingSlash); /// returns the current working directory ASL_BASE_DECL std::string getCWD(); /// returns filename without directory ASL_BASE_DECL std::string getFilenamePart(const std::string & theFileName); /// returns directory without filename ASL_BASE_DECL std::string getDirectoryPart(const std::string & theFileName); /// returns path shortened by last directory component ASL_BASE_DECL std::string getParentDirectory(const std::string & theDirectoryName); /// return filename extension, or "" if none was found // @note: this function should be changed. Now it returns the extension without the "." // This is a bad idea, since the filename "foo" and "foo." both return the same string. // this makes it impossible to reconstruct the filename from its components. ASL_BASE_DECL std::string getExtension(const std::string & theFileName); /// returns theFileName without extension ASL_BASE_DECL std::string removeExtension(const std::string & theFileName); /// returns the Host:Port part of an URI // URI's are formated as protocol://login/path // where login = [username:password@]hostport // and hostport = host[:port] ASL_BASE_DECL void parseURI(const std::string & theURI, std::string * theProtocol, std::string * theLogin, std::string * thePath); /// returns the Host:Port part of an URI ASL_BASE_DECL std::string getHostPortPart(const std::string & theURI); /// returns the Host part of an URI ASL_BASE_DECL std::string getHostPart(const std::string & theURI); /// splits a delimited path list (semicolon or colon delimited) into its components ASL_BASE_DECL unsigned splitPaths(const std::string & theDelimitedPaths, std::vector<std::string> & thePathVector); /// return relative path from base directory to absolute path. ASL_BASE_DECL std::string evaluateRelativePath(const std::string & theBaseDirectory, const std::string & theAbsolutePath, bool theForceRelativePathFlag = false); /// searches a file in a semicolon-seperated list of pathes, /// returns the path + file. Embedded environment variables /// in the form ${VARNAME} are expanded. /// @deprecated see asl::PackageManager, which can also search in zip files. ASL_BASE_DECL std::string searchFile(const std::string & theFileName, const std::string & theSearchPath); /// read a complete file into a string ASL_BASE_DECL std::string readFile(const std::string& theFileName); ASL_BASE_DECL bool readFile(const std::string& theFileName, std::vector<std::string> & theLines); ASL_BASE_DECL bool readFile(const std::string& theFileName, std::string & theContent); ASL_BASE_DECL bool readFile(const std::string& theFileName, asl::ResizeableBlock & theContent); ASL_BASE_DECL bool writeFile(const std::string& theFileName, const std::string & theContent, bool theAppendFlag=false); ASL_BASE_DECL bool writeFile(const std::string& theFileName, const asl::ReadableBlock & theContent, bool theAppendFlag=false); ASL_BASE_DECL bool deleteFile(const std::string& theFileName); ASL_BASE_DECL bool copyFile(const std::string& theOldFileName, const std::string & theNewFileName); ASL_BASE_DECL bool moveFile(const std::string& theOldFileName, const std::string & theNewFileName); ASL_BASE_DECL bool setLastModified(const std::string & theFilename, time_t theModificationDate); ASL_BASE_DECL time_t getLastModified(const std::string & theFilename); #ifdef OSX # define STAT64 stat # define STAT64F stat #endif #ifdef LINUX # define STAT64 stat64 # define STAT64F stat64 #endif #ifdef _WIN32 # define STAT64 __stat64 # define STAT64F _stat64 #endif /// returns true if file or directory exists ASL_BASE_DECL bool fileExists(const std::string& theUTF8Filename); DEFINE_EXCEPTION(IO_Failure,asl::Exception) // Warning: off_t is 32 bit (at least) under windows. This function will // return incorrect values for files > 2 gb. ASL_BASE_DECL off_t getFileSize(const std::string& theUTF8Filename); /* @} */ } //Namespace asl #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 typedef struct DIR DIR; struct dirent { char *d_name; }; ASL_BASE_DECL DIR *opendir(const char *); ASL_BASE_DECL int closedir(DIR *); ASL_BASE_DECL struct dirent *readdir(DIR *); void rewinddir(DIR *); #else // Linux and Mac Os X # include <dirent.h> #endif /* Copyright Kevlin Henney, 1997, 2003. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted without fee, provided that this copyright and permissions notice appear in all copies and derivatives. This software is supplied "as is" without express or implied warranty. But that said, if there are any problems please get in touch. */ #ifdef __cplusplus } // extern C #endif #endif
36.985
161
0.768555
45dcbfda7051d7aaa338a50b2e06474634309684
7,717
c
C
controller/src/runtime_interface.c
AravindK95/tenshi
15f894abccc7c131f8964201c67ff9201f671d5d
[ "Apache-2.0" ]
null
null
null
controller/src/runtime_interface.c
AravindK95/tenshi
15f894abccc7c131f8964201c67ff9201f671d5d
[ "Apache-2.0" ]
null
null
null
controller/src/runtime_interface.c
AravindK95/tenshi
15f894abccc7c131f8964201c67ff9201f671d5d
[ "Apache-2.0" ]
null
null
null
// Licensed to Pioneers in Engineering under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. Pioneers in Engineering licenses // this file to you 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 // Interpreter #include <lua.h> #include <lualib.h> #include <lauxlib.h> #include <ngl_vm.h> #include <ngl_buffer.h> #include <ngl_package.h> #include "inc/FreeRTOS.h" #include "inc/runtime_interface.h" #include "inc/runtime.h" #include "inc/smartsensor/smartsensor.h" #include "inc/smartsensor/ssutil.h" #include "inc/smartsensor/sstype.h" #include "inc/led_driver.h" #include "inc/button_driver.h" #include "inc/radio.h" #define LUA_REGISTER(FUNC) lua_register(L, #FUNC, lua_ ## FUNC) #define LUA_REG(FUNC) {.name = #FUNC, .func = lua_ ## FUNC} // Sensor modes #define MODE_DISABLED 0x00 #define MODE_PAUSED 0x01 #define MODE_ACTIVE 0x02 int isDeviceValid(SSChannel *dev); void runtime_register(TenshiRuntimeState s) { luaL_Reg I[] = { LUA_REG(time), LUA_REG(get_device), LUA_REG(del_device), LUA_REG(query_dev_info), LUA_REG(set_radio_val), LUA_REG(get_radio_val), LUA_REG(set_status_led_val), LUA_REG(get_button_val), LUA_REG(get_switch_val), LUA_REG(set_led_val), LUA_REG(get_analog_val), LUA_REG(set_analog_val), LUA_REG(set_grizzly_val), {NULL, NULL} }; TenshiRegisterCFunctions(s, I); } void lua_register_all(lua_State *L) { LUA_REGISTER(time); LUA_REGISTER(get_device); LUA_REGISTER(del_device); LUA_REGISTER(query_dev_info); LUA_REGISTER(set_status_led_val); LUA_REGISTER(get_button_val); LUA_REGISTER(get_switch_val); LUA_REGISTER(set_led_val); LUA_REGISTER(get_analog_val); LUA_REGISTER(set_analog_val); LUA_REGISTER(set_grizzly_val); } // Runtime required // Returns time in milliseconds int lua_time(lua_State *L) { portTickType now = xTaskGetTickCount() / portTICK_RATE_MS; lua_pushunsigned(L, now); return 1; } int lua_get_device(lua_State *L) { const char *str = lua_tolstring(L, 1, NULL); lua_pop(L, 1); uint8_t id[SMART_ID_LEN]; int idLen = 0; int chan = -1; int ret = sscanf(str, SMART_ID_SCANF "%n-%x", id, id+1, id+2, id+3, id+4, id+5, id+6, id+7, &idLen, &chan); int valid = ret >= SMART_ID_LEN && idLen == SMART_ID_LEN*2; SSState *sensor = NULL; SSChannel *channel = NULL; if (valid) { sensor = ss_find_sensor(id); } if (sensor) { if (chan < 0) chan = 0; // Default to first channel // Skip all protected (not accessable by students) channels for (int i = 0, n = 0; i < sensor->channelsNum && channel == NULL; i++) { if (sensor->channels[i]->isProtected) continue; if (n == chan) channel = sensor->channels[i]; n++; } } if (channel) { SSChannel *copy = channel; // malloc(sizeof(SSChannel)); // memcpy(copy, channel, sizeof(SSChannel)); lua_pushlightuserdata(L, copy); } else { lua_pushnil(L); } return 1; } int lua_del_device(lua_State *L) { lua_pop(L, 1); // Do nothing to delete return 0; } int lua_query_dev_info(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); const char *query_type = lua_tostring(L, 2); lua_pop(L, 2); if (strcmp(query_type, "type") == 0) { // TODO(cduck): Handle device that is both an actuator and a sensor if (dev->isActuator) { lua_pushstring(L, "actuator"); } else if (dev->isSensor) { lua_pushstring(L, "sensor"); } else { lua_pushnil(L); } } else if (strcmp(query_type, "dev") == 0) { // What is our device type name? const char *name = ss_channel_name(dev); if (name) { lua_pushstring(L, name); } else { lua_pushnil(L); } } else { // Not supported lua_pushnil(L); } return 1; } // Sensor specific int isDeviceValid(SSChannel *dev) { return dev != NULL && !dev->isProtected; } int lua_set_radio_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); size_t ubjsonLen = 0; char *ubjson = lua_tolstring(L, 2, &ubjsonLen); char *ubjsonMalloc = pvPortMalloc(ubjsonLen); memcpy(ubjsonMalloc, ubjson, ubjsonLen); radioPushUbjson(ubjsonMalloc, ubjsonLen); lua_pop(L, 2); return 0; } int lua_get_radio_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); lua_pop(L, 1); size_t ubjsonLen = 0; char *ubjson = readLastUbjson(&ubjsonLen); if (ubjson) { lua_pushlstring(L, ubjson, ubjsonLen); vPortFree(ubjson); ubjson = NULL; ubjsonLen = 0; } else { lua_pushnil(L); } return 1; } int lua_set_status_led_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); int val = lua_tointeger(L, 2); lua_pop(L, 2); led_driver_set_mode(PATTERN_JUST_RED); led_driver_set_fixed(val, 0b111); // TODO(cduck): Return error code? return 0; } int lua_get_button_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); lua_pop(L, 1); int button = button_driver_get_button_state(0); lua_pushinteger(L, button); return 1; } int lua_get_switch_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); lua_pop(L, 1); if (!isDeviceValid(dev)) { lua_pushnil(L); return 1; } lua_pushnumber(L, ss_get_switch_val(dev)); return 1; } int lua_set_led_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); uint8_t val = (uint8_t)lua_tointeger(L, 2); lua_pop(L, 2); if (!isDeviceValid(dev)) { return 0; } ss_set_led_val(dev, val); return 0; } int lua_get_analog_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); lua_pop(L, 1); if (!isDeviceValid(dev)) { lua_pushnil(L); return 1; } lua_pushnumber(L, ss_get_analog_val(dev)); return 1; } int lua_set_analog_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); double val = (uint8_t)lua_tonumber(L, 2); lua_pop(L, 2); if (!isDeviceValid(dev)) { return 0; } ss_set_analog_val(dev, val); return 0; } int lua_set_grizzly_val(lua_State *L) { SSChannel *dev = lua_touserdata(L, 1); double val = lua_tonumber(L, 2); int hasMode = 0; uint8_t mode = (uint8_t)lua_tointegerx(L, 3, &hasMode); // Optional argument lua_pop(L, 2); if (!isDeviceValid(dev)) { return 0; } if (!hasMode) { mode = GRIZZLY_DEFAULT_MODE; } ss_set_grizzly_val(dev, mode, val); return 0; } // Not hooked up to lua // Sets the game mode channel on all smart sensors void setAllSmartSensorGameMode(RuntimeMode mode) { uint8_t sMode; switch (mode) { case RuntimeModeAutonomous: case RuntimeModeTeleop: sMode = MODE_ACTIVE; break; case RuntimeModePaused: sMode = MODE_PAUSED; break; case RuntimeModeUninitialized: case RuntimeModeDisabled: default: sMode = MODE_DISABLED; break; } for (int i = 0; i < numSensors; i++) { SSState *sensor = sensorArr[i]; SSChannel *channel = NULL; for (int c = 0; c < sensor->channelsNum && channel == NULL; c++) { if (sensor->channels[c]->type == CHANNEL_TYPE_MODE) { channel = sensor->channels[c]; } } if (channel) { ss_set_mode_val(channel, sMode); } } }
23.243976
79
0.669561
e7788cc1d5e89f2b89b97141a073fa62793e9ae8
241
h
C
QLCommonUtils/Classes/Catagory/NSArray+QLToJson.h
burtworld/QLCommonUtils
6ff826b8cd9d9d7ce1ee26dcb29637fc19148989
[ "MIT" ]
null
null
null
QLCommonUtils/Classes/Catagory/NSArray+QLToJson.h
burtworld/QLCommonUtils
6ff826b8cd9d9d7ce1ee26dcb29637fc19148989
[ "MIT" ]
null
null
null
QLCommonUtils/Classes/Catagory/NSArray+QLToJson.h
burtworld/QLCommonUtils
6ff826b8cd9d9d7ce1ee26dcb29637fc19148989
[ "MIT" ]
null
null
null
// // NSArray+Function.h // QLCommonUtils // // Created by Paramita on 2017/12/20. // Copyright © 2017年 Paramita. All rights reserved. // #import <Foundation/Foundation.h> @interface NSArray (QLToJson) - (NSString *)toJosnString; @end
17.214286
52
0.701245
084d82d0abd93de07f11a3b1cceb41ff548d9ec1
567
h
C
YLCleaner/Xcode-RuntimeHeaders/DVTFoundation/DVTDownloadableOperationRefreshIndex.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
1
2019-02-15T02:16:35.000Z
2019-02-15T02:16:35.000Z
YLCleaner/Xcode-RuntimeHeaders/DVTFoundation/DVTDownloadableOperationRefreshIndex.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
YLCleaner/Xcode-RuntimeHeaders/DVTFoundation/DVTDownloadableOperationRefreshIndex.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <DVTFoundation/DVTDownloadableOperation.h> @class DVTDownloadableIndex, NSURL; @interface DVTDownloadableOperationRefreshIndex : DVTDownloadableOperation { NSURL *_url; DVTDownloadableIndex *_refreshedIndex; } @property(retain) DVTDownloadableIndex *refreshedIndex; // @synthesize refreshedIndex=_refreshedIndex; - (void).cxx_destruct; - (void)downloadableOperationMain; - (id)initWithURL:(id)arg1; @end
23.625
102
0.753086
23b4151e21dac2957e9da5dfa041ffb620b7b908
1,658
c
C
snapgear_linux/lib/libldap/libraries/libldap/whoami.c
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
1
2021-02-24T13:01:00.000Z
2021-02-24T13:01:00.000Z
OpenLDAP/libraries/libldap/whoami.c
orynider/php-5.6.3x4VC9
47f9765b797279061c364e004153a0919895b23e
[ "BSD-2-Clause" ]
null
null
null
OpenLDAP/libraries/libldap/whoami.c
orynider/php-5.6.3x4VC9
47f9765b797279061c364e004153a0919895b23e
[ "BSD-2-Clause" ]
3
2016-06-13T13:20:56.000Z
2019-12-05T02:31:23.000Z
/* $OpenLDAP: pkg/ldap/libraries/libldap/whoami.c,v 1.3.2.1 2003/02/08 23:28:51 kurt Exp $ */ /* * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ #include "portable.h" #include <stdio.h> #include <ac/stdlib.h> #include <ac/string.h> #include <ac/time.h> #include "ldap-int.h" /* * LDAP Who Am I? (Extended) Operation <draft-zeilenga-ldap-authzid-xx.txt> */ int ldap_parse_whoami( LDAP *ld, LDAPMessage *res, struct berval **authzid ) { int rc; char *retoid = NULL; assert( ld != NULL ); assert( LDAP_VALID( ld ) ); assert( res != NULL ); assert( authzid != NULL ); *authzid = NULL; rc = ldap_parse_extended_result( ld, res, &retoid, authzid, 0 ); if( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_parse_whoami" ); return rc; } ber_memfree( retoid ); return rc; } int ldap_whoami( LDAP *ld, LDAPControl **sctrls, LDAPControl **cctrls, int *msgidp ) { int rc; assert( ld != NULL ); assert( LDAP_VALID( ld ) ); assert( msgidp != NULL ); rc = ldap_extended_operation( ld, LDAP_EXOP_X_WHO_AM_I, NULL, sctrls, cctrls, msgidp ); return rc; } int ldap_whoami_s( LDAP *ld, struct berval **authzid, LDAPControl **sctrls, LDAPControl **cctrls ) { int rc; int msgid; LDAPMessage *res; rc = ldap_whoami( ld, sctrls, cctrls, &msgid ); if ( rc != LDAP_SUCCESS ) return rc; if ( ldap_result( ld, msgid, 1, (struct timeval *) NULL, &res ) == -1 ) { return ld->ld_errno; } rc = ldap_parse_whoami( ld, res, authzid ); if( rc != LDAP_SUCCESS ) { ldap_msgfree( res ); return rc; } return( ldap_result2error( ld, res, 1 ) ); }
18.422222
93
0.655006
8aee5a95bbef13094d5623a1d6b9fa77fbf3198a
55,448
c
C
sgx.attest.sample/genquotes/common/remoteattestation_t.c
isabella232/microsoft-azure-attestation
ef01ad24a7d20b52d28f51e54cfcb2739283ea0c
[ "MIT" ]
null
null
null
sgx.attest.sample/genquotes/common/remoteattestation_t.c
isabella232/microsoft-azure-attestation
ef01ad24a7d20b52d28f51e54cfcb2739283ea0c
[ "MIT" ]
1
2021-02-24T03:26:26.000Z
2021-02-24T03:26:26.000Z
sgx.attest.sample/genquotes/common/remoteattestation_t.c
isabella232/microsoft-azure-attestation
ef01ad24a7d20b52d28f51e54cfcb2739283ea0c
[ "MIT" ]
null
null
null
/* * This file is auto generated by oeedger8r. DO NOT EDIT. */ #include "remoteattestation_t.h" #include <openenclave/edger8r/enclave.h> OE_EXTERNC_BEGIN /**** Trusted function IDs ****/ enum { remoteattestation_fcn_id_get_remote_report_with_pubkey = 0, remoteattestation_fcn_id_oe_get_sgx_report_ecall = 1, remoteattestation_fcn_id_oe_get_report_v2_ecall = 2, remoteattestation_fcn_id_oe_verify_local_report_ecall = 3, remoteattestation_fcn_id_oe_sgx_init_context_switchless_ecall = 4, remoteattestation_fcn_id_oe_sgx_switchless_enclave_worker_thread_ecall = 5, remoteattestation_fcn_id_trusted_call_id_max = OE_ENUM_MAX }; /**** ECALL marshalling structs. ****/ typedef struct _get_remote_report_with_pubkey_args_t { oe_result_t _result; int _retval; uint8_t** pem_key; size_t* key_size; uint8_t** remote_report; size_t* remote_report_size; } get_remote_report_with_pubkey_args_t; typedef struct _oe_get_sgx_report_ecall_args_t { oe_result_t _result; oe_result_t _retval; void* opt_params; size_t opt_params_size; sgx_report_t* report; } oe_get_sgx_report_ecall_args_t; typedef struct _oe_get_report_v2_ecall_args_t { oe_result_t _result; oe_result_t _retval; uint32_t flags; void* opt_params; size_t opt_params_size; uint8_t** report_buffer; size_t* report_buffer_size; } oe_get_report_v2_ecall_args_t; typedef struct _oe_verify_local_report_ecall_args_t { oe_result_t _result; oe_result_t _retval; uint8_t* report; size_t report_size; oe_report_t* parsed_report; } oe_verify_local_report_ecall_args_t; typedef struct _oe_sgx_init_context_switchless_ecall_args_t { oe_result_t _result; oe_result_t _retval; oe_host_worker_context_t* host_worker_contexts; uint64_t num_host_workers; } oe_sgx_init_context_switchless_ecall_args_t; typedef struct _oe_sgx_switchless_enclave_worker_thread_ecall_args_t { oe_result_t _result; oe_enclave_worker_context_t* context; } oe_sgx_switchless_enclave_worker_thread_ecall_args_t; /**** ECALL functions. ****/ static void ecall_get_remote_report_with_pubkey( uint8_t* input_buffer, size_t input_buffer_size, uint8_t* output_buffer, size_t output_buffer_size, size_t* output_bytes_written) { oe_result_t _result = OE_FAILURE; /* Prepare parameters. */ get_remote_report_with_pubkey_args_t* pargs_in = (get_remote_report_with_pubkey_args_t*)input_buffer; get_remote_report_with_pubkey_args_t* pargs_out = (get_remote_report_with_pubkey_args_t*)output_buffer; size_t input_buffer_offset = 0; size_t output_buffer_offset = 0; OE_ADD_SIZE(input_buffer_offset, sizeof(*pargs_in)); OE_ADD_SIZE(output_buffer_offset, sizeof(*pargs_out)); /* Make sure input and output buffers lie within the enclave. */ /* oe_is_within_enclave explicitly checks if buffers are null or not. */ if (!oe_is_within_enclave(input_buffer, input_buffer_size)) goto done; if (!oe_is_within_enclave(output_buffer, output_buffer_size)) goto done; /* Set in and in-out pointers. */ /* There were no in nor in-out parameters. */ /* Set out and in-out pointers. */ /* In-out parameters are copied to output buffer. */ if (pargs_in->pem_key) OE_SET_OUT_POINTER(pem_key, sizeof(uint8_t*), uint8_t**); if (pargs_in->key_size) OE_SET_OUT_POINTER(key_size, sizeof(size_t), size_t*); if (pargs_in->remote_report) OE_SET_OUT_POINTER(remote_report, sizeof(uint8_t*), uint8_t**); if (pargs_in->remote_report_size) OE_SET_OUT_POINTER(remote_report_size, sizeof(size_t), size_t*); /* Check that in/in-out strings are null terminated. */ /* There were no in nor in-out string parameters. */ /* lfence after checks. */ oe_lfence(); /* Call user function. */ pargs_out->_retval = get_remote_report_with_pubkey( pargs_in->pem_key, pargs_in->key_size, pargs_in->remote_report, pargs_in->remote_report_size); /* Success. */ _result = OE_OK; *output_bytes_written = output_buffer_offset; done: if (output_buffer_size >= sizeof(*pargs_out) && oe_is_within_enclave(pargs_out, output_buffer_size)) pargs_out->_result = _result; } static void ecall_oe_get_sgx_report_ecall( uint8_t* input_buffer, size_t input_buffer_size, uint8_t* output_buffer, size_t output_buffer_size, size_t* output_bytes_written) { oe_result_t _result = OE_FAILURE; /* Prepare parameters. */ oe_get_sgx_report_ecall_args_t* pargs_in = (oe_get_sgx_report_ecall_args_t*)input_buffer; oe_get_sgx_report_ecall_args_t* pargs_out = (oe_get_sgx_report_ecall_args_t*)output_buffer; size_t input_buffer_offset = 0; size_t output_buffer_offset = 0; OE_ADD_SIZE(input_buffer_offset, sizeof(*pargs_in)); OE_ADD_SIZE(output_buffer_offset, sizeof(*pargs_out)); /* Make sure input and output buffers lie within the enclave. */ /* oe_is_within_enclave explicitly checks if buffers are null or not. */ if (!oe_is_within_enclave(input_buffer, input_buffer_size)) goto done; if (!oe_is_within_enclave(output_buffer, output_buffer_size)) goto done; /* Set in and in-out pointers. */ if (pargs_in->opt_params) OE_SET_IN_POINTER(opt_params, pargs_in->opt_params_size, void*); /* Set out and in-out pointers. */ /* In-out parameters are copied to output buffer. */ if (pargs_in->report) OE_SET_OUT_POINTER(report, sizeof(sgx_report_t), sgx_report_t*); /* Check that in/in-out strings are null terminated. */ /* There were no in nor in-out string parameters. */ /* lfence after checks. */ oe_lfence(); /* Call user function. */ pargs_out->_retval = oe_get_sgx_report_ecall( (const void*)pargs_in->opt_params, pargs_in->opt_params_size, pargs_in->report); /* Success. */ _result = OE_OK; *output_bytes_written = output_buffer_offset; done: if (output_buffer_size >= sizeof(*pargs_out) && oe_is_within_enclave(pargs_out, output_buffer_size)) pargs_out->_result = _result; } static void ecall_oe_get_report_v2_ecall( uint8_t* input_buffer, size_t input_buffer_size, uint8_t* output_buffer, size_t output_buffer_size, size_t* output_bytes_written) { oe_result_t _result = OE_FAILURE; /* Prepare parameters. */ oe_get_report_v2_ecall_args_t* pargs_in = (oe_get_report_v2_ecall_args_t*)input_buffer; oe_get_report_v2_ecall_args_t* pargs_out = (oe_get_report_v2_ecall_args_t*)output_buffer; size_t input_buffer_offset = 0; size_t output_buffer_offset = 0; OE_ADD_SIZE(input_buffer_offset, sizeof(*pargs_in)); OE_ADD_SIZE(output_buffer_offset, sizeof(*pargs_out)); /* Make sure input and output buffers lie within the enclave. */ /* oe_is_within_enclave explicitly checks if buffers are null or not. */ if (!oe_is_within_enclave(input_buffer, input_buffer_size)) goto done; if (!oe_is_within_enclave(output_buffer, output_buffer_size)) goto done; /* Set in and in-out pointers. */ if (pargs_in->opt_params) OE_SET_IN_POINTER(opt_params, pargs_in->opt_params_size, void*); /* Set out and in-out pointers. */ /* In-out parameters are copied to output buffer. */ if (pargs_in->report_buffer) OE_SET_OUT_POINTER(report_buffer, sizeof(uint8_t*), uint8_t**); if (pargs_in->report_buffer_size) OE_SET_OUT_POINTER(report_buffer_size, sizeof(size_t), size_t*); /* Check that in/in-out strings are null terminated. */ /* There were no in nor in-out string parameters. */ /* lfence after checks. */ oe_lfence(); /* Call user function. */ pargs_out->_retval = oe_get_report_v2_ecall( pargs_in->flags, (const void*)pargs_in->opt_params, pargs_in->opt_params_size, pargs_in->report_buffer, pargs_in->report_buffer_size); /* Success. */ _result = OE_OK; *output_bytes_written = output_buffer_offset; done: if (output_buffer_size >= sizeof(*pargs_out) && oe_is_within_enclave(pargs_out, output_buffer_size)) pargs_out->_result = _result; } static void ecall_oe_verify_local_report_ecall( uint8_t* input_buffer, size_t input_buffer_size, uint8_t* output_buffer, size_t output_buffer_size, size_t* output_bytes_written) { oe_result_t _result = OE_FAILURE; /* Prepare parameters. */ oe_verify_local_report_ecall_args_t* pargs_in = (oe_verify_local_report_ecall_args_t*)input_buffer; oe_verify_local_report_ecall_args_t* pargs_out = (oe_verify_local_report_ecall_args_t*)output_buffer; size_t input_buffer_offset = 0; size_t output_buffer_offset = 0; OE_ADD_SIZE(input_buffer_offset, sizeof(*pargs_in)); OE_ADD_SIZE(output_buffer_offset, sizeof(*pargs_out)); /* Make sure input and output buffers lie within the enclave. */ /* oe_is_within_enclave explicitly checks if buffers are null or not. */ if (!oe_is_within_enclave(input_buffer, input_buffer_size)) goto done; if (!oe_is_within_enclave(output_buffer, output_buffer_size)) goto done; /* Set in and in-out pointers. */ if (pargs_in->report) OE_SET_IN_POINTER(report, pargs_in->report_size, uint8_t*); /* Set out and in-out pointers. */ /* In-out parameters are copied to output buffer. */ if (pargs_in->parsed_report) OE_SET_OUT_POINTER(parsed_report, sizeof(oe_report_t), oe_report_t*); /* Check that in/in-out strings are null terminated. */ /* There were no in nor in-out string parameters. */ /* lfence after checks. */ oe_lfence(); /* Call user function. */ pargs_out->_retval = oe_verify_local_report_ecall( (const uint8_t*)pargs_in->report, pargs_in->report_size, pargs_in->parsed_report); /* Success. */ _result = OE_OK; *output_bytes_written = output_buffer_offset; done: if (output_buffer_size >= sizeof(*pargs_out) && oe_is_within_enclave(pargs_out, output_buffer_size)) pargs_out->_result = _result; } static void ecall_oe_sgx_init_context_switchless_ecall( uint8_t* input_buffer, size_t input_buffer_size, uint8_t* output_buffer, size_t output_buffer_size, size_t* output_bytes_written) { oe_result_t _result = OE_FAILURE; /* Prepare parameters. */ oe_sgx_init_context_switchless_ecall_args_t* pargs_in = (oe_sgx_init_context_switchless_ecall_args_t*)input_buffer; oe_sgx_init_context_switchless_ecall_args_t* pargs_out = (oe_sgx_init_context_switchless_ecall_args_t*)output_buffer; size_t input_buffer_offset = 0; size_t output_buffer_offset = 0; OE_ADD_SIZE(input_buffer_offset, sizeof(*pargs_in)); OE_ADD_SIZE(output_buffer_offset, sizeof(*pargs_out)); /* Make sure input and output buffers lie within the enclave. */ /* oe_is_within_enclave explicitly checks if buffers are null or not. */ if (!oe_is_within_enclave(input_buffer, input_buffer_size)) goto done; if (!oe_is_within_enclave(output_buffer, output_buffer_size)) goto done; /* Set in and in-out pointers. */ /* There were no in nor in-out parameters. */ /* Set out and in-out pointers. */ /* In-out parameters are copied to output buffer. */ /* There were no out nor in-out parameters. */ /* Check that in/in-out strings are null terminated. */ /* There were no in nor in-out string parameters. */ /* lfence after checks. */ oe_lfence(); /* Call user function. */ pargs_out->_retval = oe_sgx_init_context_switchless_ecall( pargs_in->host_worker_contexts, pargs_in->num_host_workers); /* Success. */ _result = OE_OK; *output_bytes_written = output_buffer_offset; done: if (output_buffer_size >= sizeof(*pargs_out) && oe_is_within_enclave(pargs_out, output_buffer_size)) pargs_out->_result = _result; } static void ecall_oe_sgx_switchless_enclave_worker_thread_ecall( uint8_t* input_buffer, size_t input_buffer_size, uint8_t* output_buffer, size_t output_buffer_size, size_t* output_bytes_written) { oe_result_t _result = OE_FAILURE; /* Prepare parameters. */ oe_sgx_switchless_enclave_worker_thread_ecall_args_t* pargs_in = (oe_sgx_switchless_enclave_worker_thread_ecall_args_t*)input_buffer; oe_sgx_switchless_enclave_worker_thread_ecall_args_t* pargs_out = (oe_sgx_switchless_enclave_worker_thread_ecall_args_t*)output_buffer; size_t input_buffer_offset = 0; size_t output_buffer_offset = 0; OE_ADD_SIZE(input_buffer_offset, sizeof(*pargs_in)); OE_ADD_SIZE(output_buffer_offset, sizeof(*pargs_out)); /* Make sure input and output buffers lie within the enclave. */ /* oe_is_within_enclave explicitly checks if buffers are null or not. */ if (!oe_is_within_enclave(input_buffer, input_buffer_size)) goto done; if (!oe_is_within_enclave(output_buffer, output_buffer_size)) goto done; /* Set in and in-out pointers. */ /* There were no in nor in-out parameters. */ /* Set out and in-out pointers. */ /* In-out parameters are copied to output buffer. */ /* There were no out nor in-out parameters. */ /* Check that in/in-out strings are null terminated. */ /* There were no in nor in-out string parameters. */ /* lfence after checks. */ oe_lfence(); /* Call user function. */ oe_sgx_switchless_enclave_worker_thread_ecall( pargs_in->context); /* Success. */ _result = OE_OK; *output_bytes_written = output_buffer_offset; done: if (output_buffer_size >= sizeof(*pargs_out) && oe_is_within_enclave(pargs_out, output_buffer_size)) pargs_out->_result = _result; } /**** ECALL function table. ****/ oe_ecall_func_t __oe_ecalls_table[] = { (oe_ecall_func_t) ecall_get_remote_report_with_pubkey, (oe_ecall_func_t) ecall_oe_get_sgx_report_ecall, (oe_ecall_func_t) ecall_oe_get_report_v2_ecall, (oe_ecall_func_t) ecall_oe_verify_local_report_ecall, (oe_ecall_func_t) ecall_oe_sgx_init_context_switchless_ecall, (oe_ecall_func_t) ecall_oe_sgx_switchless_enclave_worker_thread_ecall }; size_t __oe_ecalls_table_size = OE_COUNTOF(__oe_ecalls_table); /**** Untrusted function IDs. ****/ enum { remoteattestation_fcn_id_oe_get_supported_attester_format_ids_ocall = 0, remoteattestation_fcn_id_oe_get_qetarget_info_ocall = 1, remoteattestation_fcn_id_oe_get_quote_ocall = 2, remoteattestation_fcn_id_oe_get_quote_verification_collateral_ocall = 3, remoteattestation_fcn_id_oe_sgx_get_cpuid_table_ocall = 4, remoteattestation_fcn_id_oe_sgx_backtrace_symbols_ocall = 5, remoteattestation_fcn_id_oe_sgx_thread_wake_wait_ocall = 6, remoteattestation_fcn_id_oe_sgx_wake_switchless_worker_ocall = 7, remoteattestation_fcn_id_oe_sgx_sleep_switchless_worker_ocall = 8, remoteattestation_fcn_id_untrusted_call_max = OE_ENUM_MAX }; /**** OCALL marshalling structs. ****/ typedef struct _oe_get_supported_attester_format_ids_ocall_args_t { oe_result_t _result; oe_result_t _retval; void* format_ids; size_t format_ids_size; size_t* format_ids_size_out; } oe_get_supported_attester_format_ids_ocall_args_t; typedef struct _oe_get_qetarget_info_ocall_args_t { oe_result_t _result; oe_result_t _retval; oe_uuid_t* format_id; void* opt_params; size_t opt_params_size; sgx_target_info_t* target_info; } oe_get_qetarget_info_ocall_args_t; typedef struct _oe_get_quote_ocall_args_t { oe_result_t _result; oe_result_t _retval; oe_uuid_t* format_id; void* opt_params; size_t opt_params_size; sgx_report_t* sgx_report; void* quote; size_t quote_size; size_t* quote_size_out; } oe_get_quote_ocall_args_t; typedef struct _oe_get_quote_verification_collateral_ocall_args_t { oe_result_t _result; oe_result_t _retval; uint8_t* fmspc; uint8_t collateral_provider; void* tcb_info; size_t tcb_info_size; size_t* tcb_info_size_out; void* tcb_info_issuer_chain; size_t tcb_info_issuer_chain_size; size_t* tcb_info_issuer_chain_size_out; void* pck_crl; size_t pck_crl_size; size_t* pck_crl_size_out; void* root_ca_crl; size_t root_ca_crl_size; size_t* root_ca_crl_size_out; void* pck_crl_issuer_chain; size_t pck_crl_issuer_chain_size; size_t* pck_crl_issuer_chain_size_out; void* qe_identity; size_t qe_identity_size; size_t* qe_identity_size_out; void* qe_identity_issuer_chain; size_t qe_identity_issuer_chain_size; size_t* qe_identity_issuer_chain_size_out; } oe_get_quote_verification_collateral_ocall_args_t; typedef struct _oe_sgx_get_cpuid_table_ocall_args_t { oe_result_t _result; oe_result_t _retval; void* cpuid_table_buffer; size_t cpuid_table_buffer_size; } oe_sgx_get_cpuid_table_ocall_args_t; typedef struct _oe_sgx_backtrace_symbols_ocall_args_t { oe_result_t _result; oe_result_t _retval; oe_enclave_t* oe_enclave; uint64_t* buffer; size_t size; void* symbols_buffer; size_t symbols_buffer_size; size_t* symbols_buffer_size_out; } oe_sgx_backtrace_symbols_ocall_args_t; typedef struct _oe_sgx_thread_wake_wait_ocall_args_t { oe_result_t _result; oe_enclave_t* oe_enclave; uint64_t waiter_tcs; uint64_t self_tcs; } oe_sgx_thread_wake_wait_ocall_args_t; typedef struct _oe_sgx_wake_switchless_worker_ocall_args_t { oe_result_t _result; oe_host_worker_context_t* context; } oe_sgx_wake_switchless_worker_ocall_args_t; typedef struct _oe_sgx_sleep_switchless_worker_ocall_args_t { oe_result_t _result; oe_enclave_worker_context_t* context; } oe_sgx_sleep_switchless_worker_ocall_args_t; /**** OCALL function wrappers. ****/ oe_result_t oe_get_supported_attester_format_ids_ocall( oe_result_t* _retval, void* format_ids, size_t format_ids_size, size_t* format_ids_size_out) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_get_supported_attester_format_ids_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.format_ids = (void*)format_ids; _args.format_ids_size = format_ids_size; _args.format_ids_size_out = (size_t*)format_ids_size_out; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_get_supported_attester_format_ids_ocall_args_t)); /* There were no corresponding parameters. */ /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_get_supported_attester_format_ids_ocall_args_t)); if (format_ids) OE_ADD_SIZE(_output_buffer_size, _args.format_ids_size); if (format_ids_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_get_supported_attester_format_ids_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); /* There were no in nor in-out parameters. */ /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_get_supported_attester_format_ids_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_get_supported_attester_format_ids_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ *_retval = _pargs_out->_retval; /* No pointers to restore for deep copy. */ OE_READ_OUT_PARAM(format_ids, (size_t)(_args.format_ids_size)); OE_READ_OUT_PARAM(format_ids_size_out, (size_t)(sizeof(size_t))); /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_get_qetarget_info_ocall( oe_result_t* _retval, const oe_uuid_t* format_id, const void* opt_params, size_t opt_params_size, sgx_target_info_t* target_info) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_get_qetarget_info_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.format_id = (oe_uuid_t*)format_id; _args.opt_params = (void*)opt_params; _args.opt_params_size = opt_params_size; _args.target_info = (sgx_target_info_t*)target_info; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_get_qetarget_info_ocall_args_t)); if (format_id) OE_ADD_SIZE(_input_buffer_size, sizeof(oe_uuid_t)); if (opt_params) OE_ADD_SIZE(_input_buffer_size, _args.opt_params_size); /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_get_qetarget_info_ocall_args_t)); if (target_info) OE_ADD_SIZE(_output_buffer_size, sizeof(sgx_target_info_t)); /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_get_qetarget_info_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); if (format_id) OE_WRITE_IN_PARAM(format_id, sizeof(oe_uuid_t), oe_uuid_t*); if (opt_params) OE_WRITE_IN_PARAM(opt_params, _args.opt_params_size, void*); /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_get_qetarget_info_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_get_qetarget_info_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ *_retval = _pargs_out->_retval; /* No pointers to restore for deep copy. */ OE_READ_OUT_PARAM(target_info, (size_t)(sizeof(sgx_target_info_t))); /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_get_quote_ocall( oe_result_t* _retval, const oe_uuid_t* format_id, const void* opt_params, size_t opt_params_size, const sgx_report_t* sgx_report, void* quote, size_t quote_size, size_t* quote_size_out) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_get_quote_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.format_id = (oe_uuid_t*)format_id; _args.opt_params = (void*)opt_params; _args.opt_params_size = opt_params_size; _args.sgx_report = (sgx_report_t*)sgx_report; _args.quote = (void*)quote; _args.quote_size = quote_size; _args.quote_size_out = (size_t*)quote_size_out; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_get_quote_ocall_args_t)); if (format_id) OE_ADD_SIZE(_input_buffer_size, sizeof(oe_uuid_t)); if (opt_params) OE_ADD_SIZE(_input_buffer_size, _args.opt_params_size); if (sgx_report) OE_ADD_SIZE(_input_buffer_size, sizeof(sgx_report_t)); /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_get_quote_ocall_args_t)); if (quote) OE_ADD_SIZE(_output_buffer_size, _args.quote_size); if (quote_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_get_quote_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); if (format_id) OE_WRITE_IN_PARAM(format_id, sizeof(oe_uuid_t), oe_uuid_t*); if (opt_params) OE_WRITE_IN_PARAM(opt_params, _args.opt_params_size, void*); if (sgx_report) OE_WRITE_IN_PARAM(sgx_report, sizeof(sgx_report_t), sgx_report_t*); /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_get_quote_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_get_quote_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ *_retval = _pargs_out->_retval; /* No pointers to restore for deep copy. */ OE_READ_OUT_PARAM(quote, (size_t)(_args.quote_size)); OE_READ_OUT_PARAM(quote_size_out, (size_t)(sizeof(size_t))); /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_get_quote_verification_collateral_ocall( oe_result_t* _retval, uint8_t fmspc[6], uint8_t collateral_provider, void* tcb_info, size_t tcb_info_size, size_t* tcb_info_size_out, void* tcb_info_issuer_chain, size_t tcb_info_issuer_chain_size, size_t* tcb_info_issuer_chain_size_out, void* pck_crl, size_t pck_crl_size, size_t* pck_crl_size_out, void* root_ca_crl, size_t root_ca_crl_size, size_t* root_ca_crl_size_out, void* pck_crl_issuer_chain, size_t pck_crl_issuer_chain_size, size_t* pck_crl_issuer_chain_size_out, void* qe_identity, size_t qe_identity_size, size_t* qe_identity_size_out, void* qe_identity_issuer_chain, size_t qe_identity_issuer_chain_size, size_t* qe_identity_issuer_chain_size_out) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_get_quote_verification_collateral_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.fmspc = (uint8_t*)fmspc; _args.collateral_provider = collateral_provider; _args.tcb_info = (void*)tcb_info; _args.tcb_info_size = tcb_info_size; _args.tcb_info_size_out = (size_t*)tcb_info_size_out; _args.tcb_info_issuer_chain = (void*)tcb_info_issuer_chain; _args.tcb_info_issuer_chain_size = tcb_info_issuer_chain_size; _args.tcb_info_issuer_chain_size_out = (size_t*)tcb_info_issuer_chain_size_out; _args.pck_crl = (void*)pck_crl; _args.pck_crl_size = pck_crl_size; _args.pck_crl_size_out = (size_t*)pck_crl_size_out; _args.root_ca_crl = (void*)root_ca_crl; _args.root_ca_crl_size = root_ca_crl_size; _args.root_ca_crl_size_out = (size_t*)root_ca_crl_size_out; _args.pck_crl_issuer_chain = (void*)pck_crl_issuer_chain; _args.pck_crl_issuer_chain_size = pck_crl_issuer_chain_size; _args.pck_crl_issuer_chain_size_out = (size_t*)pck_crl_issuer_chain_size_out; _args.qe_identity = (void*)qe_identity; _args.qe_identity_size = qe_identity_size; _args.qe_identity_size_out = (size_t*)qe_identity_size_out; _args.qe_identity_issuer_chain = (void*)qe_identity_issuer_chain; _args.qe_identity_issuer_chain_size = qe_identity_issuer_chain_size; _args.qe_identity_issuer_chain_size_out = (size_t*)qe_identity_issuer_chain_size_out; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_get_quote_verification_collateral_ocall_args_t)); if (fmspc) OE_ADD_SIZE(_input_buffer_size, sizeof(uint8_t[6])); /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_get_quote_verification_collateral_ocall_args_t)); if (tcb_info) OE_ADD_SIZE(_output_buffer_size, _args.tcb_info_size); if (tcb_info_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); if (tcb_info_issuer_chain) OE_ADD_SIZE(_output_buffer_size, _args.tcb_info_issuer_chain_size); if (tcb_info_issuer_chain_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); if (pck_crl) OE_ADD_SIZE(_output_buffer_size, _args.pck_crl_size); if (pck_crl_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); if (root_ca_crl) OE_ADD_SIZE(_output_buffer_size, _args.root_ca_crl_size); if (root_ca_crl_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); if (pck_crl_issuer_chain) OE_ADD_SIZE(_output_buffer_size, _args.pck_crl_issuer_chain_size); if (pck_crl_issuer_chain_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); if (qe_identity) OE_ADD_SIZE(_output_buffer_size, _args.qe_identity_size); if (qe_identity_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); if (qe_identity_issuer_chain) OE_ADD_SIZE(_output_buffer_size, _args.qe_identity_issuer_chain_size); if (qe_identity_issuer_chain_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_get_quote_verification_collateral_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); if (fmspc) OE_WRITE_IN_PARAM(fmspc, sizeof(uint8_t[6]), uint8_t*); /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_get_quote_verification_collateral_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_get_quote_verification_collateral_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ *_retval = _pargs_out->_retval; /* No pointers to restore for deep copy. */ OE_READ_OUT_PARAM(tcb_info, (size_t)(_args.tcb_info_size)); OE_READ_OUT_PARAM(tcb_info_size_out, (size_t)(sizeof(size_t))); OE_READ_OUT_PARAM(tcb_info_issuer_chain, (size_t)(_args.tcb_info_issuer_chain_size)); OE_READ_OUT_PARAM(tcb_info_issuer_chain_size_out, (size_t)(sizeof(size_t))); OE_READ_OUT_PARAM(pck_crl, (size_t)(_args.pck_crl_size)); OE_READ_OUT_PARAM(pck_crl_size_out, (size_t)(sizeof(size_t))); OE_READ_OUT_PARAM(root_ca_crl, (size_t)(_args.root_ca_crl_size)); OE_READ_OUT_PARAM(root_ca_crl_size_out, (size_t)(sizeof(size_t))); OE_READ_OUT_PARAM(pck_crl_issuer_chain, (size_t)(_args.pck_crl_issuer_chain_size)); OE_READ_OUT_PARAM(pck_crl_issuer_chain_size_out, (size_t)(sizeof(size_t))); OE_READ_OUT_PARAM(qe_identity, (size_t)(_args.qe_identity_size)); OE_READ_OUT_PARAM(qe_identity_size_out, (size_t)(sizeof(size_t))); OE_READ_OUT_PARAM(qe_identity_issuer_chain, (size_t)(_args.qe_identity_issuer_chain_size)); OE_READ_OUT_PARAM(qe_identity_issuer_chain_size_out, (size_t)(sizeof(size_t))); /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_sgx_get_cpuid_table_ocall( oe_result_t* _retval, void* cpuid_table_buffer, size_t cpuid_table_buffer_size) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_sgx_get_cpuid_table_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.cpuid_table_buffer = (void*)cpuid_table_buffer; _args.cpuid_table_buffer_size = cpuid_table_buffer_size; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_sgx_get_cpuid_table_ocall_args_t)); /* There were no corresponding parameters. */ /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_sgx_get_cpuid_table_ocall_args_t)); if (cpuid_table_buffer) OE_ADD_SIZE(_output_buffer_size, _args.cpuid_table_buffer_size); /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_sgx_get_cpuid_table_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); /* There were no in nor in-out parameters. */ /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_sgx_get_cpuid_table_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_sgx_get_cpuid_table_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ *_retval = _pargs_out->_retval; /* No pointers to restore for deep copy. */ OE_READ_OUT_PARAM(cpuid_table_buffer, (size_t)(_args.cpuid_table_buffer_size)); /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_sgx_backtrace_symbols_ocall( oe_result_t* _retval, oe_enclave_t* oe_enclave, const uint64_t* buffer, size_t size, void* symbols_buffer, size_t symbols_buffer_size, size_t* symbols_buffer_size_out) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_sgx_backtrace_symbols_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.oe_enclave = (oe_enclave_t*)oe_enclave; _args.buffer = (uint64_t*)buffer; _args.size = size; _args.symbols_buffer = (void*)symbols_buffer; _args.symbols_buffer_size = symbols_buffer_size; _args.symbols_buffer_size_out = (size_t*)symbols_buffer_size_out; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_sgx_backtrace_symbols_ocall_args_t)); if (buffer) OE_ADD_SIZE(_input_buffer_size, ((size_t)_args.size * sizeof(uint64_t))); /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_sgx_backtrace_symbols_ocall_args_t)); if (symbols_buffer) OE_ADD_SIZE(_output_buffer_size, _args.symbols_buffer_size); if (symbols_buffer_size_out) OE_ADD_SIZE(_output_buffer_size, sizeof(size_t)); /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_sgx_backtrace_symbols_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); if (buffer) OE_WRITE_IN_PARAM(buffer, ((size_t)_args.size * sizeof(uint64_t)), uint64_t*); /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_sgx_backtrace_symbols_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_sgx_backtrace_symbols_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ *_retval = _pargs_out->_retval; /* No pointers to restore for deep copy. */ OE_READ_OUT_PARAM(symbols_buffer, (size_t)(_args.symbols_buffer_size)); OE_READ_OUT_PARAM(symbols_buffer_size_out, (size_t)(sizeof(size_t))); /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_sgx_thread_wake_wait_ocall( oe_enclave_t* oe_enclave, uint64_t waiter_tcs, uint64_t self_tcs) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_sgx_thread_wake_wait_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.oe_enclave = (oe_enclave_t*)oe_enclave; _args.waiter_tcs = waiter_tcs; _args.self_tcs = self_tcs; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_sgx_thread_wake_wait_ocall_args_t)); /* There were no corresponding parameters. */ /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_sgx_thread_wake_wait_ocall_args_t)); /* There were no corresponding parameters. */ /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_sgx_thread_wake_wait_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); /* There were no in nor in-out parameters. */ /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_sgx_thread_wake_wait_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_sgx_thread_wake_wait_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ /* No return value. */ /* No pointers to restore for deep copy. */ /* There were no out nor in-out parameters. */ /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_sgx_wake_switchless_worker_ocall(oe_host_worker_context_t* context) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_sgx_wake_switchless_worker_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.context = (oe_host_worker_context_t*)context; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_sgx_wake_switchless_worker_ocall_args_t)); /* There were no corresponding parameters. */ /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_sgx_wake_switchless_worker_ocall_args_t)); /* There were no corresponding parameters. */ /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_sgx_wake_switchless_worker_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); /* There were no in nor in-out parameters. */ /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_sgx_wake_switchless_worker_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_sgx_wake_switchless_worker_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ /* No return value. */ /* No pointers to restore for deep copy. */ /* There were no out nor in-out parameters. */ /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } oe_result_t oe_sgx_sleep_switchless_worker_ocall(oe_enclave_worker_context_t* context) { oe_result_t _result = OE_FAILURE; /* If the enclave is in crashing/crashed status, new OCALL should fail immediately. */ if (oe_get_enclave_status() != OE_OK) return oe_get_enclave_status(); /* Marshalling struct. */ oe_sgx_sleep_switchless_worker_ocall_args_t _args, *_pargs_in = NULL, *_pargs_out = NULL; /* No pointers to save for deep copy. */ /* Marshalling buffer and sizes. */ size_t _input_buffer_size = 0; size_t _output_buffer_size = 0; size_t _total_buffer_size = 0; uint8_t* _buffer = NULL; uint8_t* _input_buffer = NULL; uint8_t* _output_buffer = NULL; size_t _input_buffer_offset = 0; size_t _output_buffer_offset = 0; size_t _output_bytes_written = 0; /* Fill marshalling struct. */ memset(&_args, 0, sizeof(_args)); _args.context = (oe_enclave_worker_context_t*)context; /* Compute input buffer size. Include in and in-out parameters. */ OE_ADD_SIZE(_input_buffer_size, sizeof(oe_sgx_sleep_switchless_worker_ocall_args_t)); /* There were no corresponding parameters. */ /* Compute output buffer size. Include out and in-out parameters. */ OE_ADD_SIZE(_output_buffer_size, sizeof(oe_sgx_sleep_switchless_worker_ocall_args_t)); /* There were no corresponding parameters. */ /* Allocate marshalling buffer. */ _total_buffer_size = _input_buffer_size; OE_ADD_SIZE(_total_buffer_size, _output_buffer_size); _buffer = (uint8_t*)oe_allocate_ocall_buffer(_total_buffer_size); _input_buffer = _buffer; _output_buffer = _buffer + _input_buffer_size; if (_buffer == NULL) { _result = OE_OUT_OF_MEMORY; goto done; } /* Serialize buffer inputs (in and in-out parameters). */ _pargs_in = (oe_sgx_sleep_switchless_worker_ocall_args_t*)_input_buffer; OE_ADD_SIZE(_input_buffer_offset, sizeof(*_pargs_in)); /* There were no in nor in-out parameters. */ /* Copy args structure (now filled) to input buffer. */ memcpy(_pargs_in, &_args, sizeof(*_pargs_in)); /* Call host function. */ if ((_result = oe_call_host_function( remoteattestation_fcn_id_oe_sgx_sleep_switchless_worker_ocall, _input_buffer, _input_buffer_size, _output_buffer, _output_buffer_size, &_output_bytes_written)) != OE_OK) goto done; /* Setup output arg struct pointer. */ _pargs_out = (oe_sgx_sleep_switchless_worker_ocall_args_t*)_output_buffer; OE_ADD_SIZE(_output_buffer_offset, sizeof(*_pargs_out)); /* Check if the call succeeded. */ if ((_result = _pargs_out->_result) != OE_OK) goto done; /* Currently exactly _output_buffer_size bytes must be written. */ if (_output_bytes_written != _output_buffer_size) { _result = OE_FAILURE; goto done; } /* Unmarshal return value and out, in-out parameters. */ /* No return value. */ /* No pointers to restore for deep copy. */ /* There were no out nor in-out parameters. */ /* Retrieve propagated errno from OCALL. */ /* Errno propagation not enabled. */ _result = OE_OK; done: if (_buffer) oe_free_ocall_buffer(_buffer); return _result; } OE_EXTERNC_END
34.698373
139
0.710359
c15fd698c9dad1b47a95a096b4369a472f216a6f
173
c
C
identifier/test/test_runners/TestIdentifier_Runner.c
duduvpereira/Testes
34dae65120ec68fb96e97f71da16fbc496fa0517
[ "MIT" ]
null
null
null
identifier/test/test_runners/TestIdentifier_Runner.c
duduvpereira/Testes
34dae65120ec68fb96e97f71da16fbc496fa0517
[ "MIT" ]
null
null
null
identifier/test/test_runners/TestIdentifier_Runner.c
duduvpereira/Testes
34dae65120ec68fb96e97f71da16fbc496fa0517
[ "MIT" ]
null
null
null
#include "unity.h" #include "unity_fixture.h" TEST_GROUP_RUNNER(Identifier) { RUN_TEST_CASE(Identifier, TestIdentifier1); RUN_TEST_CASE(Identifier, TestIdentifier2); }
19.222222
45
0.791908
1e0eb26c95f717421c9279ec791cddedc682226a
458
h
C
OpenGL Engine/src/data manager/external file loaders/OBJLoader.h
nfwGytautas/GLEngine-v2
f90d77f136d5239cfd1305fd33322e16440dda70
[ "MIT" ]
null
null
null
OpenGL Engine/src/data manager/external file loaders/OBJLoader.h
nfwGytautas/GLEngine-v2
f90d77f136d5239cfd1305fd33322e16440dda70
[ "MIT" ]
26
2018-06-14T21:06:56.000Z
2018-07-28T16:56:42.000Z
OpenGL Engine/src/data manager/external file loaders/OBJLoader.h
nfwGytautas/SGE
f90d77f136d5239cfd1305fd33322e16440dda70
[ "MIT" ]
null
null
null
#pragma once #include <vector> #include <string> #include <glm\glm.hpp> class OBJLoader { public: static bool LoadOBJ(std::string filePath); static std::vector<float> loadedVertices; static std::vector<float> loadedNormals; static std::vector<float> loadedUVs; static std::vector<unsigned int> loadedIndices; static void calculateMinMax(glm::vec3& maxValues, glm::vec3& minValues, const glm::vec3& currentVertex); static void loadFallbackMesh(); };
25.444444
105
0.762009