8000 sgminer/algorithm.h at master · Vap0rz/sgminer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"ADL_SDK","path":"ADL_SDK","contentType":"directory"},{"name":"algorithm","path":"algorithm","contentType":"directory"},{"name":"ccan","path":"ccan","contentType":"directory"},{"name":"doc","path":"doc","contentType":"directory"},{"name":"kernel","path":"kernel","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"m4","path":"m4","contentType":"directory"},{"name":"man","path":"man","contentType":"directory"},{"name":"ocl","path":"ocl","contentType":"directory"},{"name":"sph","path":"sph","contentType":"directory"},{"name":"submodules","path":"submodules","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"winbuild","path":"winbuild","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".gitmodules","path":".gitmodules","contentType":"file"},{"name":"API.class","path":"API.class","contentType":"file"},{"name":"API.java","path":"API.java","contentType":"file"},{"name":"AUTHORS.md","path":"AUTHORS.md","contentType":"file"},{"name":"COPYING","path":"COPYING","contentType":"file"},{"name":"ChangeLog","path":"ChangeLog","contentType":"file"},{"name":"MCast.class","path":"MCast.class","contentType":"file"},{"name":"MCast.java","path":"MCast.java","contentType":"file"},{"name":"Makefile.am","path":"Makefile.am","contentType":"file"},{"name":"NEWS.md","path":"NEWS.md","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"adl.c","path":"adl.c","contentType":"file"},{"name":"adl.h","path":"adl.h","contentType":"file"},{"name":"adl_functions.h","path":"adl_functions.h","contentType":"file"},{"name":"algorithm.c","path":"algorithm.c","contentType":"file"},{"name":"algorithm.h","path":"algorithm.h","contentType":"file"},{"name":"api-example.c","path":"api-example.c","contentType":"file"},{"name":"api-example.php","path":"api-example.php","contentType":"file"},{"name":"api-example.py","path":"api-example.py","contentType":"file"},{"name":"api.c","path":"api.c","contentType":"file"},{"name":"api.h","path":"api.h","contentType":"file"},{"name":"arg-nonnull.h","path":"arg-nonnull.h","contentType":"file"},{"name":"autogen.sh","path":"autogen.sh","contentType":"file"},{"name":"bench_block.h","path":"bench_block.h","contentType":"file"},{"name":"c++defs.h","path":"c++defs.h","contentType":"file"},{"name":"compat.h","path":"compat.h","contentType":"file"},{"name":"config_parser.c","path":"config_parser.c","contentType":"file"},{"name":"config_parser.h","path":"config_parser.h","contentType":"file"},{"name":"configure.ac","path":"configure.ac","contentType":"file"},{"name":"driver-opencl.c","path":"driver-opencl.c","contentType":"file"},{"name":"driver-opencl.h","path":"driver-opencl.h","contentType":"file"},{"name":"elist.h","path":"elist.h","contentType":"file"},{"name":"events.c","path":"events.c","contentType":"file"},{"name":"events.h","path":"events.h","contentType":"file"},{"name":"example.bat","path":"example.bat","contentType":"file"},{"name":"example.conf","path":"example.conf","contentType":"file"},{"name":"findnonce.c","path":"findnonce.c","contentType":"file"},{"name":"findnonce.h","path":"findnonce.h","contentType":"file"},{"name":"hexdump.c","path":"hexdump.c","contentType":"file"},{"name":"logging.c","path":"logging.c","contentType":"file"},{"name":"logging.h","path":"logging.h","contentType":"file"},{"name":"miner.h","path":"miner.h","contentType":"file"},{"name":"miner.php","path":"miner.php","contentType":"file"},{"name":"mknsis.sh","path":"mknsis.sh","contentType":"file"},{"name":"ocl.c","path":"ocl.c","contentType":"file"},{"name":"ocl.h","path":"ocl.h","contentType":"file"},{"name":"pool.c","path":"pool.c","contentType":"file"},{"name":"pool.h","path":"pool.h","contentType":"file"},{"name":"sgminer.c","path":"sgminer.c","contentType":"file"},{"name":"sha2.c","path":"sha2.c","contentType":"file"},{"name":"sha2.h","path":"sha2.h","contentType":"file"},{"name":"uthash.h","path":"uthash.h","contentType":"file"},{"name":"util.c","path":"util.c","contentType":"file"},{"name":"util.h","path":"util.h","contentType":"file"},{"name":"warn-on-use.h","path":"warn-on-use.h","contentType":"file"}],"totalCount":69}},"fileTreeProcessingTime":3.470325,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":140115157,"defaultBranch":"master","name":"sgminer","ownerLogin":"Vap0rz","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-07-07T20:32:16.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/4156441?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1614309545.175298","canEdit":false,"refType":"branch","currentOid":"8bf1c1807cca1ca0ec0f87b452e3d1cb395f0b1b"},"path":"algorithm.h","currentUser":null,"blob":{"rawLines":["#ifndef ALGORITHM_H","#define ALGORITHM_H","","#ifdef __APPLE_CC__","#include \u003cOpenCL/opencl.h\u003e","#else","#include \u003cCL/cl.h\u003e","#endif","","#include \u003cinttypes.h\u003e","#include \u003cstdbool.h\u003e","#include \"ocl/build_kernel.h\" // For the build_kernel_data type","","typedef enum {"," ALGO_UNK,"," ALGO_SCRYPT,"," ALGO_NSCRYPT,"," ALGO_X11,"," ALGO_X13,"," ALGO_X14,"," ALGO_X15,"," ALGO_KECCAK,"," ALGO_QUARK,"," ALGO_TWE,"," ALGO_FUGUE,"," ALGO_NIST,"," ALGO_FRESH,"," ALGO_WHIRL,"," ALGO_NEOSCRYPT,"," ALGO_WHIRLPOOLX,"," ALGO_LYRA2RE,"," ALGO_PLUCK","} algorithm_type_t;","","extern const char *algorithm_type_str[];","","extern void gen_hash(const unsigned char *data, unsigned int len, unsigned char *hash);","","struct __clState;","struct _dev_blk_ctx;","struct _build_kernel_data;","struct cgpu_info;","struct work;","","/* Describes the Scrypt parameters and hashing functions used to mine"," * a specific coin."," */","typedef struct _algorithm_t {"," char name[20]; /* Human-readable identifier */"," algorithm_type_t type; //algorithm type"," const char *kernelfile; /* alternate kernel file */"," uint32_t n; /* N (CPU/Memory tradeoff parameter) */"," uint8_t nfactor; /* Factor of N above (n = 2^nfactor) */"," double diff_multiplier1;"," double diff_multiplier2;"," double share_diff_multiplier;"," uint32_t xintensity_shift;"," uint32_t intensity_shift;"," uint32_t found_idx;"," unsigned long long diff_numerator;"," uint32_t diff1targ;"," size_t n_extra_kernels;"," long rw_buffer_size;"," cl_command_queue_properties cq_properties;"," void(*regenhash)(struct work *);"," cl_int(*queue_kernel)(struct __clState *, struct _dev_blk_ctx *, cl_uint);"," void(*gen_hash)(const unsigned char *, unsigned int, unsigned char *);"," void(*set_compile_options)(struct _build_kernel_data *, struct cgpu_info *, struct _algorithm_t *);","} algorithm_t;","","typedef struct _algorithm_settings_t","{","\tconst char *name;","\talgorithm_type_t type;","\tconst char *kernelfile;","\tdouble diff_multiplier1;","\tdouble diff_multiplier2;","\tdouble share_diff_multiplier;","\tuint32_t xintensity_shift;","\tuint32_t intensity_shift;","\tuint32_t found_idx;","\tunsigned long long diff_numerator;","\tuint32_t diff1targ;","\tsize_t n_extra_kernels;","\tlong rw_buffer_size;","\tcl_command_queue_properties cq_properties;","\tvoid (*regenhash)(struct work *);","\tcl_int (*queue_kernel)(struct __clState *, struct _dev_blk_ctx *, cl_uint);","\tvoid (*gen_hash)(const unsigned char *, unsigned int, unsigned char *);","\tvoid (*set_compile_options)(build_kernel_data *, struct cgpu_info *, algorithm_t *);","} algorithm_settings_t;","","/* Set default parameters based on name. */","void set_algorithm(algorithm_t* algo, const char* name);","","/* Set to specific N factor. */","void set_algorithm_nfactor(algorithm_t* algo, const uint8_t nfactor);","","/* Compare two algorithm parameters */","bool cmp_algorithm(const algorithm_t* algo1, const algorithm_t* algo2);","","#endif /* ALGORITHM_H */"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/Vap0rz/sgminer/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"algorithm.h","displayUrl":"https://github.com/Vap0rz/sgminer/blob/master/algorithm.h?raw=true","headerInfo":{"blobSize":"2.78 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"b2527d1","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FVap0rz%2Fsgminer%2Fblob%2Fmaster%2Falgorithm.h","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"102","truncatedSloc":"90"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"C","languageID":41,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/Vap0rz/sgminer/blob/master/algorithm.h","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/Vap0rz/sgminer/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/Vap0rz/sgminer/raw/refs/heads/master/algorithm.h","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"ALGORITHM_H","kind":"macro","ident_start":28,"ident_end":39,"extent_start":20,"extent_end":40,"fully_qualified_name":"ALGORITHM_H","ident_utf16":{"start":{"line_number":1,"utf16_col":8},"end":{"line_number":1,"utf16_col":19}},"extent_utf16":{"start":{"line_number":1,"utf16_col":0},"end":{"line_number":2,"utf16_col":0}}},{"name":"algorithm_type_t","kind":"type","ident_start":501,"ident_end":517,"extent_start":231,"extent_end":518,"fully_qualified_name":"algorithm_type_t","ident_utf16":{"start":{"line_number":32,"utf16_col":2},"end":{"line_number":32,"utf16_col":18}},"extent_utf16":{"start":{"line_number":13,"utf16_col":0},"end":{"line_number":32,"utf16_col":19}}},{"name":"gen_hash","kind":"function","ident_start":574,"ident_end":582,"extent_start":574,"extent_end":648,"fully_qualified_name":"gen_hash","ident_utf16":{"start":{"line_number":36,"utf16_col":12},"end":{"line_number":36,"utf16_col":20}},"extent_utf16":{"start":{"line_number":36,"utf16_col":12},"end":{"line_number":36,"utf16_col":86}}},{"name":"_algorithm_t","kind":"class","ident_start":858,"ident_end":870,"extent_start":851,"extent_end":1758,"fully_qualified_name":"_algorithm_t","ident_utf16":{"start":{"line_number":47,"utf16_col":15},"end":{"line_number":47,"utf16_col":27}},"extent_utf16":{"start":{"line_number":47,"utf16_col":8},"end":{"line_number":68,"utf16_col":1}}},{"name":"algorithm_t","kind":"type","ident_start":1759,"ident_end":1770,"extent_start":843,"extent_end":1771,"fully_qualified_name":"algorithm_t","ident_utf16":{"start":{"line_number":68,"utf16_col":2},"end":{"line_number":68,"utf16_col":13}},"extent_utf16":{"start":{"line_number":47,"utf16_col":0},"end":{"line_number":68,"utf16_col":14}}},{"name":"_algorithm_settings_t","kind":"class","ident_start":1788,"ident_end":1809,"extent_start":1781,"extent_end":2481,"fully_qualified_name":"_algorithm_settings_t","ident_utf16":{"start":{"line_number":70,"utf16_col":15},"end":{"line_number":70,"utf16_col":36}},"extent_utf16":{"start":{"line_number":70,"utf16_col":8},"end":{"line_number":90,"utf16_col":1}}},{"name":"algorithm_settings_t","kind":"type","ident_start":2482,"ident_end":2502,"extent_start":1773,"extent_end":2503,"fully_qualified_name":"algorithm_settings_t","ident_utf16":{"start":{"line_number":90,"utf16_col":2},"end":{"line_number":90,"utf16_col":22}},"extent_utf16":{"start":{"line_number":70,"utf16_col":0},"end":{"line_number":90,"utf16_col":23}}},{"name":"set_algorithm","kind":"function","ident_start":2554,"ident_end":2567,"extent_start":2554,"extent_end":2604,"fully_qualified_name":"set_algorithm","ident_utf16":{"start":{"line_number":93,"utf16_col":5},"end":{"line_number":93,"utf16_col":18}},"extent_utf16":{"start":{"line_number":93,"utf16_col":5},"end":{"line_number":93,"utf16_col":55}}},{"name":"set_algorithm_nfactor","kind":"function","ident_start":2644,"ident_end":2665,"extent_start":2644,"extent_end":2707,"fully_qualified_name":"set_algorithm_nfactor","ident_utf16":{"start":{"line_number":96,"utf16_col":5},"end":{"line_number":96,"utf16_col":26}},"extent_utf16":{"start":{"line_number":96,"utf16_col":5},"end":{"line_number":96,"utf16_col":68}}},{"name":"cmp_algorithm","kind":"function","ident_start":2754,"ident_end":2767,"extent_start":2754,"extent_end":2819,"fully_qualified_name":"cmp_algorithm","ident_utf16":{"start":{"line_number":99,"utf16_col":5},"end":{"line_number":99,"utf16_col":18}},"extent_utf16":{"start":{"line_number":99,"utf16_col":5},"end":{"line_number":99,"utf16_col":70}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/Vap0rz/sgminer/branches":{"post":"EFOb_mhiHn0u_xIWVlQL4F-yGj35JoBQywhrPO4rUIJNSaORKE9Cdi_FvPma8n0IyGnNILNUeDHMrfvOWzBpXQ"},"/repos/preferences":{"post":"gkneE2GesMrAEsSCrytu3u2BibuOrL2tLClA2SxC1NrIsyY0-PAGy_Aj56FmKk5S3nfPb2-YryIJFRScUcRYpw"}}},"title":"sgminer/algorithm.h at master · Vap0rz/sgminer","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0