repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
jepler/aocl-libm-ose
src/ref/remquo.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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, * ...
jepler/aocl-libm-ose
include/libm_special.h
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/ref/atanhf.c
<reponame>jepler/aocl-libm-ose<filename>src/ref/atanhf.c /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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...
jepler/aocl-libm-ose
src/optmized/vec/vrd2_pow.c
<reponame>jepler/aocl-libm-ose /* * Copyright (C) 2018-2020, Advanced Micro Devices. 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 co...
jepler/aocl-libm-ose
src/optmized/expm1f.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/optmized/expf.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/ref/sinpi.c
<filename>src/ref/sinpi.c /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 cop...
jepler/aocl-libm-ose
include/libm/iface.h
/* * Copyright (C) 2018-2020, Advanced Micro Devices, Inc. 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...
jepler/aocl-libm-ose
src/fast/tanf.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
include/libm_inlines_amd.h
<reponame>jepler/aocl-libm-ose /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 abov...
jepler/aocl-libm-ose
src/optmized/data/_exp_j_by_64.c
<gh_stars>10-100 /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 no...
jepler/aocl-libm-ose
src/isa/avx/fma.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/ref/acosf.c
<filename>src/ref/acosf.c /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 abov...
jepler/aocl-libm-ose
src/optmized/pow.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/isa/avx/fmaf.c
<filename>src/isa/avx/fmaf.c /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/isa/include/exp_tables.h
<filename>src/isa/include/exp_tables.h /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
scripts/log_table_generation/log_table_interleave.c
/* * Copyright (C) 2018-2020, Advanced Micro Devices, Inc. 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...
jepler/aocl-libm-ose
src/version.build.h
/* * This file is automatically generated by the build process * DO NOT EDIT! */ static const char VERSION_STRING[] = "fa9795e (modified)"; static const char* alm_get_build(void); static const char* alm_get_build(void) { return VERSION_STRING; }
jepler/aocl-libm-ose
include/libm/cpu_features.h
/* * Copyright (C) 2018-2020, Advanced Micro Devices, Inc. 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...
jepler/aocl-libm-ose
src/ref/tanpi.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/optmized/tanf.c
<gh_stars>1-10 /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 noti...
jepler/aocl-libm-ose
include/libm/types.h
/* * Copyright (C) 2018-2020, Advanced Micro Devices, Inc. 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...
jepler/aocl-libm-ose
include/libm/entry_pt.h
/* * Copyright (C) 2018-2020, Advanced Micro Devices, Inc. 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...
jepler/aocl-libm-ose
src/isa/avx2/include/trig_func.h
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/ref/atanh.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/entry_pt.c
<reponame>jepler/aocl-libm-ose<filename>src/entry_pt.c /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 c...
jepler/aocl-libm-ose
src/optmized/log.c
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
jepler/aocl-libm-ose
src/ref/ilogb.c
<gh_stars>10-100 /* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 no...
hanjt/calendar
calendar/calendar/CalenderCompontent/View/HJTCalendarView.h
// // HJTCalendarView.h // calendar // // Created by <NAME> on 16/11/26. // Copyright © 2016年 HanJiatong. All rights reserved. // #import <UIKit/UIKit.h> @class HJTCalendarView; @protocol HJTCalendarViewDelegate <NSObject> @optional - (void)calendarView:(HJTCalendarView *)calendarView didSelectDate:(NSDate *)d...
hanjt/calendar
calendar/Pods/Target Support Files/Pods-calendar/Pods-calendar-umbrella.h
<gh_stars>1-10 #import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_calendarVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_calendarVersionString[];
hanjt/calendar
calendar/calendar/CalenderCompontent/category/NSDate+convenience.h
// // NSDate+convenience.h // // Created by in 't <NAME> on 4/23/12. // Copyright (c) 2012 Vurig Media. All rights reserved. // #import <Foundation/Foundation.h> @interface NSDate (Convenience) -(NSDate *)offsetMonth:(NSInteger)numMonths; -(NSDate *)offsetDay:(NSInteger)numDays; -(NSDate *)offsetHours:(NSInteger)...
hanjt/calendar
calendar/calendar/CalenderCompontent/Model/CalculateModel.h
// // CalculateModel.h // calendar // // Created by <NAME> on 16/11/26. // Copyright © 2016年 HanJiatong. All rights reserved. // #import <UIKit/UIKit.h> @class HJTDateModel; @interface CalculateModel : NSObject /** 计算日期所在的indexPath */ + (NSIndexPath *)convertDateToIndexPath:(NSDate *)date; /** 根据日期滚...
hanjt/calendar
calendar/calendar/CalenderCompontent/Cell/HJTCalendarCell.h
<gh_stars>1-10 // // HJTCalendarCell.h // calendar // // Created by HanJiatong on 15/10/9. // Copyright (c) 2015年 HanJiatong. All rights reserved. // #import <UIKit/UIKit.h> @interface HJTCalendarCell : UICollectionViewCell /** cell所在的indexPath,由此算出当前日期*/ @property (nonatomic, strong) NSIndexPath *indexPath; - ...
hanjt/calendar
calendar/calendar/UI/ViewController.h
<reponame>hanjt/calendar // // ViewController.h // calendar // // Created by HanJiatong on 15/10/9. // Copyright (c) 2015年 HanJiatong. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
hanjt/calendar
calendar/calendar/CalenderCompontent/category/NSDate+Addtion.h
<filename>calendar/calendar/CalenderCompontent/category/NSDate+Addtion.h // // NSDate+Addtion.h // calendar // // Created by HanJiatong on 15/10/9. // Copyright (c) 2015年 HanJiatong. All rights reserved. // #import <Foundation/Foundation.h> @interface NSDate (Addtion) /** 阳历节日 */ - (NSString *)holidayName;...
Nuvoton-Israel/npcm7xx-flashtool
image_header.h
// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
Nuvoton-Israel/npcm7xx-flashtool
endian.h
<reponame>Nuvoton-Israel/npcm7xx-flashtool // Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless...
andrewmm/ncwunderground
AMMNCWundergroundModel.h
<filename>AMMNCWundergroundModel.h /* The i_saveData object must have the following structure. This should be inforced by downloadData. Other fields are permitted. root current_observation display_location full (STRING) latitude (STRING) longitude (STRING) feelsl...
andrewmm/ncwunderground
AMMNCWundergroundController.h
<gh_stars>1-10 #import "BBWeeAppController-Protocol.h" @class CLLocationManager; @class AMMNCWundergroundView; @class AMMNCWundergroundModel; @interface AMMNCWundergroundController: NSObject <BBWeeAppController, UIAlertViewDelegate> @property (nonatomic, readonly, strong) AMMNCWundergroundView *view; @property (nonat...
andrewmm/ncwunderground
AMMNCWundergroundView.h
@interface AMMNCWundergroundView: UIScrollView @property (nonatomic, assign) int pages; @property (nonatomic, readonly, assign) float baseWidth; @property (nonatomic, assign) float screenWidth; @property (nonatomic, assign) float viewHeight; @property (nonatomic, readonly, copy) NSArray *backgroundViews; @property (no...
tail-island/six_point_two_eight
include/six_point_two_eight/utilities.h
<filename>include/six_point_two_eight/utilities.h #pragma once #include <actionlib/client/simple_action_client.h> #include <cmath> #include <tf/transform_datatypes.h> #include <tf/transform_listener.h> #include <geometry_msgs/Transform.h> // 追加。 #include <geometry_msgs/Twist.h> #include <move_base_msgs/MoveBaseActio...
tail-island/six_point_two_eight
include/six_point_two_eight/make_world_models.h
#pragma once #include <nodelet/nodelet.h> #include <ros/ros.h> #include <nav_msgs/Odometry.h> #include <sensor_msgs/PointCloud2.h> #include "six_point_two_eight/point_cloud_utilities.h" #include "six_point_two_eight/utilities.h" namespace six_point_two_eight { class MakeWorldModels : public nodelet::Nodelet { p...
tail-island/six_point_two_eight
include/six_point_two_eight/move_base_server.h
#pragma once #include <actionlib/server/simple_action_server.h> #include <boost/utility/in_place_factory.hpp> #include <nodelet/nodelet.h> #include <ros/ros.h> #include <move_base_msgs/MoveBaseAction.h> #include "six_point_two_eight/utilities.h" namespace six_point_two_eight { class MoveBaseServer : public nodele...
tail-island/six_point_two_eight
include/six_point_two_eight/point_cloud_utilities.h
<reponame>tail-island/six_point_two_eight<filename>include/six_point_two_eight/point_cloud_utilities.h #ifndef SIX_POINT_TWO_EIGHT_POINT_CLOUD_UTILITIES_H #define SIX_POINT_TWO_EIGHT_POINT_CLOUD_UTILITIES_H #include <geometry_msgs/Point.h> #include <geometry_msgs/Transform.h> #include <sensor_msgs/PointCloud2.h> name...
tail-island/six_point_two_eight
include/six_point_two_eight/make_target_models.h
<filename>include/six_point_two_eight/make_target_models.h #pragma once #include <nodelet/nodelet.h> #include <ros/ros.h> #include <nav_msgs/Odometry.h> #include <sensor_msgs/PointCloud2.h> #include "six_point_two_eight/point_cloud_utilities.h" #include "six_point_two_eight/utilities.h" namespace six_point_two_eigh...
tail-island/six_point_two_eight
include/six_point_two_eight/get_point_cloud_2_server.h
#pragma once #include <actionlib/server/simple_action_server.h> #include <boost/utility/in_place_factory.hpp> #include <nodelet/nodelet.h> #include <ros/ros.h> #include <six_point_two_eight/GetPointCloud2Action.h> #include "six_point_two_eight/utilities.h" namespace six_point_two_eight { class GetPointCloud2Serve...
tail-island/six_point_two_eight
include/six_point_two_eight/register_models.h
#pragma once #include <boost/filesystem.hpp> #include <boost/range.hpp> #include <boost/range/adaptors.hpp> #include <boost/range/algorithm.hpp> #include <boost/range/numeric.hpp> #include <limits> #include <nodelet/nodelet.h> #include <ros/ros.h> #include <thread> #include <sensor_msgs/PointCloud2.h> #include "six_...
tail-island/six_point_two_eight
include/six_point_two_eight/point_cloud_2_throttle.h
<reponame>tail-island/six_point_two_eight<filename>include/six_point_two_eight/point_cloud_2_throttle.h #pragma once #include <nodelet_topic_tools/nodelet_throttle.h> #include <sensor_msgs/PointCloud2.h> namespace six_point_two_eight { using PointCloud2Throttle = nodelet_topic_tools::NodeletThrottle<sensor_msgs::Po...
NiallSmithCV/Projects
Operating-Systems-and-System-Programming/main.c
#include "VirtualMachine.h" #include <stdio.h> #include <string.h> int main(int argc, char *argv[]){ int TickTimeMS = 100; int MachineTickTime = 100; TVMMemorySize HeapSize = 0x1000000; TVMMemorySize SharedSize = 0x4000; int Offset = 1; while(Offset < argc){ if(0 == strcmp(argv[Off...
NiallSmithCV/Projects
Programming-Languages/C/calculator/Fraction.h
//HW 1 //programmer: <NAME> // Editor(s) used : Notepad ++ // compiler(s) used : VC++ 2010 Express #ifndef Fraction_h #define Fraction_h #include <iostream> using namespace std; class Fraction { public: //Functions Fraction(); Fraction(int,int); int getNum() const; int getDem() const; void setN...
Hconk/AutoKernel
autokernel_plugin/src/direct_conv/direct_conv.h
#include <stdio.h> extern "C" { #include "sys_port.h" #include "tengine_errno.h" #include "tengine_log.h" #include "vector.h" #include "tengine_ir.h" #include "tengine_op.h" #include "convolution_param.h" #include "cpu_node_ops.h" #include "module.h" } #include "HalideBuffer.h" #include "halide_direct_conv.h" void R...
Hconk/AutoKernel
autokernel_plugin/src/fc/fc.h
<reponame>Hconk/AutoKernel #include <stdio.h> #include <math.h> extern "C" { #include "sys_port.h" #include "tengine_errno.h" #include "tengine_log.h" #include "vector.h" #include "tengine_ir.h" #include "tengine_op.h" #include "../../dev/cpu/cpu_node_ops.h" // include op...
Hconk/AutoKernel
autokernel_plugin/src/softmax/softmax.h
<reponame>Hconk/AutoKernel<gh_stars>0 #include <stdio.h> #include <math.h> extern "C" { #include "sys_port.h" #include "tengine_errno.h" #include "tengine_log.h" #include "vector.h" #include "tengine_ir.h" #include "tengine_op.h" #include "../../dev/cpu/cpu_node_ops.h" // include op p...
Hconk/AutoKernel
autokernel_plugin/src/im2col_conv/im2col_conv.h
#include <stdio.h> #include <cmath> extern "C" { #include "sys_port.h" #include "tengine_errno.h" #include "tengine_log.h" #include "vector.h" #include "tengine_ir.h" #include "tengine_op.h" #include "convolution_param.h" #include "cpu_node_ops.h" #include "module.h" } #include "HalideBuffer.h" #include "halide_im2co...
Hconk/AutoKernel
autokernel_plugin/src/pool/pool.h
#include <stdio.h> #include <math.h> extern "C" { #include "sys_port.h" #include "tengine_errno.h" #include "tengine_log.h" #include "vector.h" #include "tengine_ir.h" #include "tengine_op.h" #include "../../dev/cpu/cpu_node_ops.h" // include op param header file here, lo...
sasadipo/mempool_test
mempool_template.h
#include <mutex> #include <vector> //@template memory pool for single type of object - thread safe template <class ELEM_TYPE> class MemoryPool { public: // creates new memory pool // @param count the number of ELEM_TYPE values this pool can hold (default is 200) MemoryPool(std::size_t count = 200) : m_pElems(new ...
magnatelee/cunumeric
src/cunumeric/unary/convert_util.h
/* Copyright 2021-2022 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
magnatelee/cunumeric
src/cunumeric/cunumeric_c.h
<reponame>magnatelee/cunumeric<gh_stars>0 /* Copyright 2021-2022 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *...
magnatelee/cunumeric
src/cunumeric/random/rand_util.h
/* Copyright 2021-2022 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
magnatelee/cunumeric
src/cunumeric/pitches.h
<gh_stars>0 /* Copyright 2021-2022 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
MichaelChirico/xgboost
src/data/sparse_page_source.h
/*! * Copyright 2014-2022 by XGBoost Contributors * \file sparse_page_source.h */ #ifndef XGBOOST_DATA_SPARSE_PAGE_SOURCE_H_ #define XGBOOST_DATA_SPARSE_PAGE_SOURCE_H_ #include <algorithm> // std::min #include <string> #include <utility> #include <vector> #include <future> #include <thread> #include <map> #includ...
MichaelChirico/xgboost
include/xgboost/tree_updater.h
<reponame>MichaelChirico/xgboost<gh_stars>1-10 /*! * Copyright 2014-2022 by XGBoost Contributors * \file tree_updater.h * \brief General primitive for tree learning, * Updating a collection of trees given the information. * \author <NAME> */ #ifndef XGBOOST_TREE_UPDATER_H_ #define XGBOOST_TREE_UPDATER_H_ #incl...
lthls/ocaml-bls12-381
src/primitives/fft/fft.c
#include "fft.h" #include <caml/custom.h> // IMPROVEME: can be improve it with lookups? int bitreverse(int n, int l) { int r = 0; while (l-- > 0) { r = (r << 1) | (n & 1); n = n >> 1; } return r; } // Fr void reorg_fr_coefficients(int n, int logn, value coefficients, blst_fr...
lthls/ocaml-bls12-381
src/primitives/poseidon128/poseidon128.h
#ifndef POSEIDON128_H #define POSEIDON128_H #include "blst.h" #define WIDTH 3 #define NB_FULL_ROUNDS 8 #define NB_PARTIAL_ROUNDS 56 #define BATCH_SIZE 3 #define PARTIAL_ROUND_IDX_SBOX 2 #define NB_TMP_VAR ((BATCH_SIZE - 1)) #define NB_BATCHED_PARTIAL_ROUNDS ((NB_PARTIAL_ROUNDS / BATCH_SIZE)) #define NB_UNBATCHED_PART...
lthls/ocaml-bls12-381
src/primitives/rescue/rescue.h
#ifndef RESCUE_H #define RESCUE_H #include "blst.h" #include "blst_misc.h" #define WIDTH 3 #define NB_ROUNDS 14 #define NB_CONSTANTS (NB_ROUNDS * WIDTH * 2) typedef struct rescue_ctxt_s { blst_fr s[WIDTH]; int i_round_key; } rescue_ctxt_t; size_t rescue_ctxt_sizeof(); int rescue_constants_init(blst_fr *akr, bl...
lthls/ocaml-bls12-381
src/bindings/blst_misc.h
<filename>src/bindings/blst_misc.h<gh_stars>0 #ifndef BLST_MISC #define BLST_MISC #include "blst.h" size_t blst_scalar_sizeof(); size_t blst_fr_sizeof(); int blst_fr_compare(blst_fr *s_c, blst_fr *t_c); bool blst_fr_is_equal(blst_fr *x, blst_fr *y); int blst_fr_compare(blst_fr *x_c, blst_fr *y_c); bool blst_fr_i...
lthls/ocaml-bls12-381
src/bindings/blst_wrapper.c
#include "blst.h" #include <stdio.h> #include <stdlib.h> #include <string.h> size_t blst_scalar_sizeof() { return sizeof(blst_scalar); } size_t blst_fr_sizeof() { return sizeof(blst_fr); } int blst_fr_compare(blst_fr *s_c, blst_fr *t_c) { uint64_t s_uint64[4]; uint64_t t_uint64[4]; blst_scalar *buffer = (blst_...
lthls/ocaml-bls12-381
src/bindings/blst_bindings_stubs.c
#include "blst.h" #include "blst_misc.h" #define CAML_NAME_SPACE #include "caml_bls12_381_stubs.h" #include "ocaml_integers.h" #include <caml/alloc.h> #include <caml/custom.h> #include <caml/fail.h> #include <caml/memory.h> #include <caml/mlvalues.h> #include <stdlib.h> #include <string.h> // From ocaml-ctypes: // htt...
lthls/ocaml-bls12-381
src/primitives/fft/fft.h
#ifndef FFT_H #define FFT_H #include "blst.h" #include "caml_bls12_381_stubs.h" #include <caml/custom.h> #include <caml/memory.h> #include <caml/mlvalues.h> #include <stdlib.h> #include <string.h> // H: domain_size = polynomial degree // Implementation with side effect. The FFT will be inplace, i.e. the array is // g...
lthls/ocaml-bls12-381
benchmark/blst/bench_g1.c
<gh_stars>0 void generate_random_g1(blst_fr *output) { blst_p1 *output_p1 = (blst_p1 *)malloc(sizeof(blst_p1)); blst_fp *x_fp = (blst_fp *)malloc(sizeof(blst_fp)); blst_fp *y_fp = (blst_fp *)malloc(sizeof(blst_fp)); byte output_bytes[32] = {0}; for (int i = 0; i < 32; i++) { output_bytes[i] = rand() % 256...
lthls/ocaml-bls12-381
src/primitives/poseidon128/poseidon128.c
#include "poseidon128.h" #include <stdlib.h> #include <string.h> blst_fr POSEIDON128_ARK[NB_CONSTANTS]; blst_fr POSEIDON128_MDS[WIDTH][WIDTH]; size_t poseidon128_ctxt_sizeof() { return sizeof(poseidon128_ctxt_t); } int poseidon128_constants_init(blst_fr *ark, blst_fr **mds, int ark_len, ...
lthls/ocaml-bls12-381
src/primitives/rescue/rescue.c
<gh_stars>0 #include "rescue.h" #include <stdlib.h> #include <string.h> blst_fr RESCUE_ARK[NB_CONSTANTS]; blst_fr RESCUE_MDS[WIDTH][WIDTH]; byte ALPHA_INV_BYTES[32] = { 205, 204, 204, 204, 50, 51, 51, 51, 153, 241, 152, 153, 103, 14, 127, 33, 2, 240, 115, 157, 105, 86, 74, 225, 28, 50, 114, 221, 186, 15...
lthls/ocaml-bls12-381
benchmark/blst/bench_fr.c
#include "blst.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <chrono> #define NB_RUN 10000000 void generate_random_fr(blst_fr *output) { blst_scalar *output_scalar = (blst_scalar *)malloc(sizeof(blst_scalar)); byte output_bytes[32] = {0}; for (int i = 0; i < 32; i++) { output_bytes[i...
lthls/ocaml-bls12-381
src/primitives/fft/caml_fft_stubs.c
<reponame>lthls/ocaml-bls12-381 #include "blst.h" #include "fft.h" CAMLprim value caml_fft_fr_inplace_stubs(value coefficients, value domain, value log_domain_size) { CAMLparam3(coefficients, domain, log_domain_size); fft_fr_inplace(coefficients, domain, Int_val(log_domain...
lthls/ocaml-bls12-381
src/primitives/rescue/caml_rescue_stubs.c
<reponame>lthls/ocaml-bls12-381<gh_stars>0 #include "blst.h" #include "rescue.h" #include <caml/alloc.h> #include <caml/custom.h> #include <caml/fail.h> #include <caml/memory.h> #include <caml/mlvalues.h> #include <stdlib.h> #include <string.h> #include "caml_bls12_381_stubs.h" #define Rescue_ctxt_val(v) (*((rescue_c...
chen-huicheng/WebServer
include/util/noncopyable.h
#ifndef WEBSERVER_NONCAPYABLE_H_ #define WEBSERVER_NONCAPYABLE_H_ class Noncopyable { protected: Noncopyable() {} ~Noncopyable() {} private: Noncopyable(const Noncopyable &); const Noncopyable &operator=(const Noncopyable &); }; #endif //WEBSERVER_NONCAPYABLE_H_
chen-huicheng/WebServer
include/util/util.h
#ifndef WEBSERVER_UTIL_H_ #define WEBSERVER_UTIL_H_ #include <cstdlib> #include <string> #include <map> #include <memory> #include <cerrno> #include <fcntl.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <sys/socket.h> #include <sys/epoll.h> #include <cstring> #include <unistd.h> #include <signal.h> #incl...
chen-huicheng/WebServer
include/util/config.h
#ifndef WEBSERVER_CONFIG_H_ #define WEBSERVER_CONFIG_H_ #include <unistd.h> #include <fcntl.h> #include <cstdlib> #include <cassert> #include <string> #include "util.h" #include "logger.h" using namespace std; class Config { public: Config(); ~Config(){}; void parse_arg(int argc, char *argv[]); void ...
chen-huicheng/WebServer
include/log/logger.h
<filename>include/log/logger.h #ifndef WEBSERVER_LOG_H_ #define WEBSERVER_LOG_H_ #include <cstdio> #include <cstdarg> #include <cstring> #include <time.h> #include <sys/time.h> #include "locker.h" #include "logstream.h" using namespace std; //日志级别 enum LOGLEVEL { DEBUG = 0, INFO, WARN, ERROR }; // 调用l...
chen-huicheng/WebServer
include/log/logstream.h
#ifndef WEBSERVER_LOG_STREAM_H_ #define WEBSERVER_LOG_STREAM_H_ #include <string> #include <cstdio> #include <cstring> #include <cassert> #include <unistd.h> #include "noncopyable.h" #include "locker.h" using namespace std; const size_t MIN_BUF_SIZE = 4096; const size_t MAX_BUF_SIZE = 4096 * 512; /* 异步日志 logger 调用 L...
chen-huicheng/WebServer
include/timer/timer.h
#ifndef WEBSERVER_TIMER_H_ #define WEBSERVER_TIMER_H_ #include <time.h> #include <memory> #include <vector> #include <cassert> #include "locker.h" using namespace std; class http_conn; /* 定时器类 与http_conn类使用weak_ptr相互指向 避免shared_ptr循环引用造成无法释放 cb_func :定时器超时时调用的函数 expire :定时器的到期时间 绝对时间 user_...
chen-huicheng/WebServer
include/http/http_conn.h
#ifndef WEBSERVER_HTTP_CONN_H_ #define WEBSERVER_HTTP_CONN_H_ #include <unistd.h> #include <signal.h> #include <sys/types.h> #include <sys/epoll.h> #include <fcntl.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <cassert> #include <sys/stat.h> #include <cstring> #include <string> #in...
chen-huicheng/WebServer
include/threadpool/threadpool.h
<gh_stars>1-10 #ifndef WEBSERVER_THREAD_POOL_H_ #define WEBSERVER_THREAD_POOL_H_ #include <pthread.h> #include <list> #include <exception> #include <cstdio> #include <vector> #include "logger.h" #include "locker.h" using namespace std; const int MIN_THREAD_num = 1; const int MAX_THREAD_NUM = 1024; template <typenam...
chen-huicheng/WebServer
include/http/session.h
<filename>include/http/session.h #ifndef WEBSERVER_SESSION_H_ #define WEBSERVER_SESSION_H_ #include <openssl/md5.h> #include <time.h> #include <string> #include <map> #include <list> #include "locker.h" using namespace std; enum LOGIN_STATUS //用户状态 { LOGIN = 0, UNLOGIN, FIRST_LOGIN }; struct User //用户信息 {...
chen-huicheng/WebServer
include/connection_pool/connection_pool.h
#ifndef WEBSERVER_CONNECTION_POOL_H_ #define WEBSERVER_CONNECTION_POOL_H_ #include <cstdio> #include <list> #include <mysql/mysql.h> #include <string> #include <algorithm> #include "locker.h" #include "noncopyable.h" #include "logger.h" const int MIN_CONN_NUM = 1; //数据库最少链接数 const int MAX_CONN_NUM = 1024; //数据库最多链接数 ...
chen-huicheng/WebServer
include/webserver.h
<reponame>chen-huicheng/WebServer #ifndef WEBSERVER_H_ #define WEBSERVER_H_ #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <cstdio> #include <unistd.h> #include <cerrno> #include <fcntl.h> #include <cstdlib> #include <cassert> #include <sys/epoll.h> #include <memory> #include <vector>...
chen-huicheng/WebServer
test/webbench-1.5/webbench.c
<gh_stars>1-10 /* * (C) <NAME> 1997-2004 * This is free software, see GNU Public License version 2 for * details. * * Simple forking WWW Server benchmark: * * Usage: * webbench --help * * Return codes: * 0 - sucess * 1 - benchmark failed (server is not on-line) * 2 - bad param * 3 - internal...
chen-huicheng/WebServer
include/lock/locker.h
#ifndef WEBSERVER_LOCKER_H_ #define WEBSERVER_LOCKER_H_ #include <exception> #include <pthread.h> #include <semaphore.h> #include <errno.h> #include "noncopyable.h" /* 封装信号量的类 */ class sem : private Noncopyable { public: //初始化一个为0的信号量 sem() { if (sem_init(&m_sem, 0, 0) != 0) { th...
magicdawn/node-mozjpeg
src/encode.h
<filename>src/encode.h<gh_stars>1-10 #pragma once #include <napi.h> #include "./common.h" using namespace Napi; // encode EncodeResult encode(const EncodeInput &i); // getOption MozJpegOptions getMozjpegOptions(const Napi::Object &o); // getEncodeInput EncodeInput getEncodeInput(const CallbackInfo &info); void en...
magicdawn/node-mozjpeg
src/encode_worker.h
#pragma once #include <napi.h> #include "./common.h" using namespace Napi; class MozjpegEncodeWorker : public AsyncWorker { public: MozjpegEncodeWorker(Napi::Env &env, Promise::Deferred deferred, EncodeInput i); ~MozjpegEncodeWorker(); // This code will be executed on the worker thread void Execute() overri...
magicdawn/node-mozjpeg
src/common.h
#pragma once #include <inttypes.h> #include <napi.h> struct MozJpegOptions { int quality; bool baseline; bool arithmetic; bool progressive; bool optimize_coding; int smoothing; int color_space; int quant_table; bool trellis_multipass; bool trellis_opt_zero; bool trellis_opt_table; int trellis_...
joseantonioECI/AppAuth-iOS
Source/macOS/OIDAuthorizationService+Mac.h
/*! @file OIDAuthorizationService+Mac.h @brief AppAuth iOS SDK @copyright Copyright 2016 Google Inc. All Rights Reserved. @copydetails Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obta...
jingxianwen/E3SM
cime/src/externals/mct/mpi-serial/ic_merge.c
#include "mpiP.h" /* * MPI_Intercomm_merge - Creates an intracommunicator from an intercommunicator * This is just a stub for now to support mpi function calls even in Serial * applications. In the case of a serial program, this function is a no-op and * only ever returns MPI_SUCCESS */ int MPI_Intercomm_merge(...
jingxianwen/E3SM
cime/src/externals/mct/mpi-serial/req.c
#include "mpiP.h" /* * COMPLETION */ FC_FUNC( mpi_test , MPI_TEST)(int *request, int *flag, int *status, int *ierror) { *ierror=MPI_Test( (void *)request ,flag,mpi_c_status(status)); } int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status) { Req *req; if (*req...
jingxianwen/E3SM
components/homme/src/arkode/nvector_external.h
<filename>components/homme/src/arkode/nvector_external.h /******************************************************************* * <NAME> * SMU Mathematics * Copyright 2010; all rights reserved *------------------------------------------------------------------ * This is the header file for an implementation of an NV...
jingxianwen/E3SM
cime/src/externals/mct/mpi-serial/mpif.h
! ! MPI_COMM_WORLD ! INTEGER MPI_COMM_WORLD parameter (mpi_comm_world=1) ! ! ! integer MPI_BOTTOM parameter (MPI_BOTTOM=0) ! ! source,tag ! integer MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_TAG_UB parameter (mpi_any_source=-1, mpi_any_tag= -1, mpi_tag_ub=1681915906) integer MPI_PROC_NULL, MPI_ROOT parameter (M...
jingxianwen/E3SM
cime/src/externals/pio2/tests/cunit/test_darray_vard.c
<gh_stars>1-10 /* * Tests for PIO distributed arrays. * * @author <NAME> * @date 6/4/19 */ #include <config.h> #include <pio.h> #include <pio_internal.h> #include <pio_tests.h> /* The number of tasks this test should run on. */ #define TARGET_NTASKS 4 /* The minimum number of tasks this test should run on. */ #d...
jingxianwen/E3SM
cime/src/externals/pio2/tests/cunit/test_darray_multivar3.c
/* * Tests for PIO distributed arrays. This test demonstrates problems * with the fill value that can arrise from mixing types in a * decomposition. * * @author <NAME> */ #include <config.h> #include <pio.h> #include <pio_internal.h> #include <pio_tests.h> /* The number of tasks this test should run on. */ #defi...
jingxianwen/E3SM
cime/src/externals/mct/mpi-serial/cart.c
#include "mpiP.h" /* * MPI_Cart_create * * create a new communicator, */ FC_FUNC( mpi_cart_create , MPI_CART_CREATE ) ( int *comm_old, int *ndims, int *dims, int *periods, int *reorder, int *comm_cart, int *ierr) { *ierr = MPI_Cart_create( *comm_old, *ndims, dims, periods, *reorder, ...
jingxianwen/E3SM
cime/src/externals/mct/mpi-serial/type.h
#ifndef TYPE_H #define TYPE_H /* type.h */ /* defines interface and types used for mpi-serial user-defined datatypes */ #include "mpiP.h" //for Fortran type sizes #ifdef HAVE_CONFIG_H #include <config.h> #endif //predefined type value used in typemap typedef int Simpletype; typedef struct { long disp; Simplety...