├── output ├── .gitignore └── placehold.txt ├── plat ├── amigaos │ ├── guilib │ │ ├── dnetcgui_rev.rev │ │ ├── .gitignore │ │ ├── libbase.c │ │ ├── libreaction.a │ │ ├── morphos │ │ │ ├── LibHeader.c │ │ │ ├── clib │ │ │ │ └── dnetcgui_protos.h │ │ │ ├── dnetcgui.h │ │ │ ├── guilib_version.h │ │ │ ├── proto │ │ │ │ └── dnetcgui.h │ │ │ ├── ppcinline │ │ │ │ └── dnetcgui.h │ │ │ ├── Support.h │ │ │ ├── AppClass.h │ │ │ ├── CreateGUI.h │ │ │ └── Makefile │ │ ├── dnetcgui_rev.h │ │ ├── fd │ │ │ ├── dnetcgui_lib.fd │ │ │ └── dnetcgui_lib.sfd │ │ ├── endcode.c │ │ ├── inline4 │ │ │ └── dnetcgui.h │ │ ├── proto │ │ │ └── dnetcgui.h │ │ ├── dnetcgui.h │ │ ├── main.h │ │ ├── clib │ │ │ └── dnetcgui_protos.h │ │ ├── interfaces │ │ │ └── dnetcgui.h │ │ ├── inline │ │ │ ├── dnetcgui.h │ │ │ └── dnetcguippc.h │ │ ├── dnetcgui.xml │ │ ├── Makefile.os4 │ │ ├── prefs.h │ │ └── Makefile │ ├── tools │ │ ├── amigadate │ │ ├── icons.lha │ │ ├── strip_pup │ │ ├── genam_wrapper │ │ ├── icons_mos.lha │ │ ├── makearchive │ │ ├── amigadate.c │ │ ├── genam_wrapper.c │ │ └── strip_pup.c │ └── amVersion.c ├── os2 │ ├── dnetc.rc │ ├── dnet.ico │ ├── dnetc.ico │ ├── oldguistuff.tar.gz │ └── os2defs.h ├── riscos │ ├── package │ │ ├── !Stop,feb │ │ ├── !System │ │ │ └── 310 │ │ │ │ └── Modules │ │ │ │ ├── FPEmulator,ffa │ │ │ │ └── SharedULib,ffa │ │ ├── dnetc.ini,fff │ │ ├── !RunSingle,feb │ │ ├── !Bench,feb │ │ ├── !Run,feb │ │ ├── !RunQuiet,feb │ │ ├── !Help,feb │ │ ├── !Test,feb │ │ ├── !Config,feb │ │ └── !Update,feb │ ├── oldguistuff.tar.gz │ ├── riscos_x86.h │ ├── riscos_asm.h │ └── riscos_sup.h ├── win │ ├── w32cons.ico │ ├── w32ss.ico │ ├── strcmpi.cpp │ ├── cudaver.cmd │ ├── w32exe.h │ ├── w32ssb.cpp │ ├── w32pre.h │ ├── msvcver.cmd │ ├── w32util.h │ ├── w32ini.h │ └── w32svc.h ├── macosx │ └── cowhead.icns ├── netware │ ├── inet │ │ ├── inetlib.lib │ │ ├── makefile │ │ ├── in_netof.c │ │ ├── in_lnaof.c │ │ └── in_makea.c │ ├── misc │ │ ├── nwwatemu.lib │ │ └── makefile │ ├── client.xdc │ ├── netware6.xdc │ ├── netware6.def │ ├── nwcmisc.h │ ├── nwcconf.h │ ├── nwccons.h │ ├── netware.cpp │ ├── netware.h │ ├── what-is-what.txt │ └── nwlcomp.h ├── stream │ ├── adl.h │ ├── amdstream_setup.h │ ├── amdstream_info.h │ └── amdstream_context.h ├── opencl │ ├── ocl_setup.h │ ├── ocl_info.h │ ├── deviceid.cpp │ ├── ocl_context.h │ └── deviceid.cl ├── cuda │ ├── cuda_info.h │ ├── cuda_setup.h │ └── cuda_core_count.h ├── next │ └── next_sup.h ├── dos │ ├── cdosinet.cpp │ ├── cdosemu.h │ ├── cdoscon.h │ ├── clidos.h │ ├── cdosidle.h │ ├── cdosinet.h │ └── cdostime.h ├── x86 │ ├── x86htcount.asm │ └── x86rdtsc.asm └── amd64 │ └── x86htcount.asm ├── rc5-72 ├── pclbench │ ├── .gitignore │ ├── config.h │ ├── pclbench.mk.Linux.in │ ├── pclbench.mk.SunOS.in │ ├── README │ └── Makefile ├── gentests72.cpp ├── x86 │ ├── r72-dg2.asm │ ├── r72-dg3.asm │ ├── r72-ma4.asm │ ├── r72-dg3a.asm │ ├── r72-dgp4.asm │ ├── r72-go2a.asm │ └── r72-sgp3.asm ├── amd64 │ └── r72-snjl.asm ├── stream │ ├── r72stream-2th.cpp │ ├── r72stream-vc4-1i.cpp │ ├── r72stream-vc4cng_il.txt │ ├── r72stream-vc4nag_il.txt │ ├── r72stream-vc4-1i-src.txt │ └── r72stream-vc4-bitalign.txt ├── cellbe │ └── r72-cell.h └── opencl │ ├── ocl_common.h │ ├── rc5-ref.cpp │ └── rc5-ref.cl ├── docs ├── readme.macos ├── readme.irix ├── readme-dynix └── readme.uclib ├── multinet.opt ├── ogr ├── cellbe │ ├── ogrng-cell-ppe-wrapper.cpp │ ├── ogrng-cellv2-ppe-wrapper.cpp │ ├── ogr-cell.h │ ├── ogr-cell-spe-wrapper.c │ └── ogrng-cell.h ├── ogr.h ├── x86 │ ├── ogrng-cj1-sse2-asm.asm │ ├── ogrng-cj1-sse41-asm.asm │ ├── ogrng-cj1-sse2-lzcnt-asm.asm │ ├── ogr-a.cpp │ ├── ogr-b.cpp │ ├── ogrng-b.cpp │ ├── ogrng-cj1-sse-k8.cpp │ ├── ogrng-a.cpp │ ├── ogrng-cj1-sse2.cpp │ ├── ogrng-cj1-sse41.cpp │ ├── ogrng-cj1-sse-p4.cpp │ ├── ogrng-cj1-sse2-lzcnt.cpp │ ├── ogr-d.cpp │ └── ogr-e.cpp ├── amd64 │ ├── ogrng64-cj1-sse2-asm.asm │ ├── ogrng64-cj1-sse2-lzcnt-asm.asm │ ├── ogrng64-cj1-sse2.cpp │ ├── ogrng64-cj1-generic.cpp │ └── ogrng64-cj1-sse2-lzcnt.cpp ├── alpha │ ├── alpha-asm.h │ ├── ev67.cpp │ ├── ev4.cpp │ ├── ev67-64.cpp │ └── ev4-64.cpp ├── ansi │ ├── ogrp2_corestate.h │ ├── ogrng_corestate.h │ ├── ogrp2.h │ └── ogrp2-32.cpp ├── ppc │ ├── asm-ppc.h │ └── ogrng-ppc.cpp ├── test-stubspace.cpp ├── arm │ ├── ogr-arm.cpp │ ├── ogrng-arm1.cpp │ ├── ogrng-arm2.cpp │ └── ogrng-arm3.cpp └── 68k │ └── ogr-68k.cpp ├── .gitignore ├── .travis.yml ├── common ├── confmenu.h ├── cliident.h ├── confrwv.h ├── disphelp.h ├── pack2.h ├── pack4.h ├── pack8.h ├── pack1.h ├── cmdline.h ├── pack0.h ├── selftest.h ├── setprio.h ├── checkpt.h ├── base64.h ├── bench.h ├── coremem.h ├── iniread.h ├── probman.h ├── mail.h ├── random.h ├── unused.h ├── buffupd.h ├── version.h ├── pack.h └── lurk.h └── README.md /output/.gitignore: -------------------------------------------------------------------------------- 1 | *.o.cubin 2 | *.o.ptx 3 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/dnetcgui_rev.rev: -------------------------------------------------------------------------------- 1 | 14 2 | -------------------------------------------------------------------------------- /plat/os2/dnetc.rc: -------------------------------------------------------------------------------- 1 | ICON 1 PLAT\OS2\DNETC.ICO 2 | -------------------------------------------------------------------------------- /rc5-72/pclbench/.gitignore: -------------------------------------------------------------------------------- 1 | pclbench.mk 2 | pclbench-* 3 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/.gitignore: -------------------------------------------------------------------------------- 1 | dnetcgui_rev.i 2 | dnetcgui_rev.s 3 | -------------------------------------------------------------------------------- /docs/readme.macos: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/docs/readme.macos -------------------------------------------------------------------------------- /plat/os2/dnet.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/os2/dnet.ico -------------------------------------------------------------------------------- /plat/os2/dnetc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/os2/dnetc.ico -------------------------------------------------------------------------------- /plat/riscos/package/!Stop,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | Echo { > .exitfile } 3 | -------------------------------------------------------------------------------- /plat/win/w32cons.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/win/w32cons.ico -------------------------------------------------------------------------------- /plat/win/w32ss.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/win/w32ss.ico -------------------------------------------------------------------------------- /output/placehold.txt: -------------------------------------------------------------------------------- 1 | This is just a placeholder file to ensure that this directory gets created. 2 | -------------------------------------------------------------------------------- /rc5-72/gentests72.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/gentests72.cpp -------------------------------------------------------------------------------- /rc5-72/x86/r72-dg2.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-dg2.asm -------------------------------------------------------------------------------- /rc5-72/x86/r72-dg3.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-dg3.asm -------------------------------------------------------------------------------- /rc5-72/x86/r72-ma4.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-ma4.asm -------------------------------------------------------------------------------- /multinet.opt: -------------------------------------------------------------------------------- 1 | MULTINET:MULTINET_SOCKET_LIBRARY/SHARE 2 | SYS$SHARE:STARLET.OLB/INCLUDE=CXXL_INIT 3 | 4 | -------------------------------------------------------------------------------- /plat/macosx/cowhead.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/macosx/cowhead.icns -------------------------------------------------------------------------------- /rc5-72/amd64/r72-snjl.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/amd64/r72-snjl.asm -------------------------------------------------------------------------------- /rc5-72/x86/r72-dg3a.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-dg3a.asm -------------------------------------------------------------------------------- /rc5-72/x86/r72-dgp4.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-dgp4.asm -------------------------------------------------------------------------------- /rc5-72/x86/r72-go2a.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-go2a.asm -------------------------------------------------------------------------------- /rc5-72/x86/r72-sgp3.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/x86/r72-sgp3.asm -------------------------------------------------------------------------------- /plat/os2/oldguistuff.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/os2/oldguistuff.tar.gz -------------------------------------------------------------------------------- /plat/amigaos/guilib/libbase.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/guilib/libbase.c -------------------------------------------------------------------------------- /plat/amigaos/tools/amigadate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/tools/amigadate -------------------------------------------------------------------------------- /plat/amigaos/tools/icons.lha: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/tools/icons.lha -------------------------------------------------------------------------------- /plat/amigaos/tools/strip_pup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/tools/strip_pup -------------------------------------------------------------------------------- /plat/netware/inet/inetlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/netware/inet/inetlib.lib -------------------------------------------------------------------------------- /plat/netware/misc/nwwatemu.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/netware/misc/nwwatemu.lib -------------------------------------------------------------------------------- /plat/riscos/oldguistuff.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/riscos/oldguistuff.tar.gz -------------------------------------------------------------------------------- /plat/amigaos/tools/genam_wrapper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/tools/genam_wrapper -------------------------------------------------------------------------------- /plat/amigaos/tools/icons_mos.lha: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/tools/icons_mos.lha -------------------------------------------------------------------------------- /rc5-72/stream/r72stream-2th.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/stream/r72stream-2th.cpp -------------------------------------------------------------------------------- /plat/amigaos/guilib/libreaction.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/guilib/libreaction.a -------------------------------------------------------------------------------- /rc5-72/stream/r72stream-vc4-1i.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/stream/r72stream-vc4-1i.cpp -------------------------------------------------------------------------------- /rc5-72/stream/r72stream-vc4cng_il.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/stream/r72stream-vc4cng_il.txt -------------------------------------------------------------------------------- /rc5-72/stream/r72stream-vc4nag_il.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/stream/r72stream-vc4nag_il.txt -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/LibHeader.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/amigaos/guilib/morphos/LibHeader.c -------------------------------------------------------------------------------- /rc5-72/stream/r72stream-vc4-1i-src.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/stream/r72stream-vc4-1i-src.txt -------------------------------------------------------------------------------- /rc5-72/stream/r72stream-vc4-bitalign.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/rc5-72/stream/r72stream-vc4-bitalign.txt -------------------------------------------------------------------------------- /plat/netware/client.xdc: -------------------------------------------------------------------------------- 1 | BAGFMPK_Bag MT Safe NLM -------------------------------------------------------------------------------- /plat/netware/netware6.xdc: -------------------------------------------------------------------------------- 1 | BAGFMPK_Bag MT Safe NLM -------------------------------------------------------------------------------- /plat/riscos/package/!System/310/Modules/FPEmulator,ffa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/riscos/package/!System/310/Modules/FPEmulator,ffa -------------------------------------------------------------------------------- /plat/riscos/package/!System/310/Modules/SharedULib,ffa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcti/dnetc-client-base/HEAD/plat/riscos/package/!System/310/Modules/SharedULib,ffa -------------------------------------------------------------------------------- /ogr/cellbe/ogrng-cell-ppe-wrapper.cpp: -------------------------------------------------------------------------------- 1 | #define CORE_NAME cellv1 2 | #define OGR_NG_GET_DISPATCH_TABLE_FXN spe_ogrng_get_dispatch_table 3 | #include "ogrng-cell-ppe-common.cpp" 4 | -------------------------------------------------------------------------------- /ogr/cellbe/ogrng-cellv2-ppe-wrapper.cpp: -------------------------------------------------------------------------------- 1 | #define CORE_NAME cellv2 2 | #define OGR_NG_GET_DISPATCH_TABLE_FXN spe_ogrng_get_dispatch_table_asm 3 | #include "ogrng-cell-ppe-common.cpp" 4 | -------------------------------------------------------------------------------- /plat/riscos/package/dnetc.ini,fff: -------------------------------------------------------------------------------- 1 | [triggers] 2 | exit-flag-filename=exitfile 3 | 4 | [logging] 5 | log-file=logfile 6 | log-file-type="no limit" 7 | 8 | [buffers] 9 | checkpoint-filename=checkpoint 10 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/dnetcgui_rev.h: -------------------------------------------------------------------------------- 1 | #define VERSION 1 2 | #define REVISION 14 3 | #define DATE "13.2.2016" 4 | #define VERS "dnetcgui 1.14" 5 | #define VSTRING "dnetcgui 1.14 (13.2.2016)\r\n" 6 | #define VERSTAG "\0$VER: dnetcgui 1.14 (13.2.2016)" 7 | -------------------------------------------------------------------------------- /rc5-72/pclbench/config.h: -------------------------------------------------------------------------------- 1 | /* $Id: config.h,v 1.3 2007/10/22 16:48:35 jlawson Exp $ */ 2 | 3 | // define exactly one of these: 4 | 5 | //#define ATHLON 6 | //#define PENTIUM 7 | //#define PENTIUM4 8 | //#define ULTRASPARC 9 | //#define ULTRASPARC3 10 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/fd/dnetcgui_lib.fd: -------------------------------------------------------------------------------- 1 | ##base _DnetcBase 2 | ##bias 30 3 | ##public 4 | dnetcguiOpen(cpu,programname,iconify,vstring)(d0,a0,a1,a2) 5 | dnetcguiClose(params)(a0) 6 | dnetcguiHandleMsgs(signals)(d0) 7 | dnetcguiConsoleOut(cpu,output,overwrite)(d0/a0/d1) 8 | ##end 9 | -------------------------------------------------------------------------------- /docs/readme.irix: -------------------------------------------------------------------------------- 1 | $Id: readme.irix,v 1.3 2002/09/02 00:35:45 andreasb Exp $ 2 | 3 | Additional information for IRIX clients. 4 | ======================================== 5 | 6 | The 2.8XXX series of clients are built on Irix 6.5. They will not run 7 | on Irix releases prior to 6.5. 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cvslogs 2 | .ilist 3 | 4 | Makefile 5 | buildvars.mk 6 | 7 | dnetc 8 | dnetc.1 9 | dnetc*.tar.gz 10 | dnetc*.zip 11 | dnetc*.lha 12 | dnetc*.library 13 | 14 | dnetc.ini 15 | buff-in.* 16 | buff-out.* 17 | ckpoint 18 | logfile*.log 19 | trace.out 20 | 21 | output/ 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | sudo: true 4 | 5 | os: 6 | - linux 7 | 8 | compiler: 9 | - gcc 10 | 11 | addons: 12 | apt: 13 | packages: 14 | - yasm 15 | 16 | script: 17 | - ./configure linux-amd64 18 | - make 19 | - ./dnetc -test 20 | - ./dnetc -bench 21 | 22 | -------------------------------------------------------------------------------- /plat/stream/adl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Vyacheslav Chupyatov 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | */ 6 | 7 | void ADLinit(void); 8 | void ADLdeinit(void); 9 | int stream_cputemp(void); 10 | -------------------------------------------------------------------------------- /plat/riscos/package/!RunSingle,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | Echo <22><25> 6 | WimpSlot -min 1536K 7 | Run .Dnetc 8 | -------------------------------------------------------------------------------- /plat/riscos/package/!Bench,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | Echo <22><25> 6 | WimpSlot -min 1536K 7 | Run .Dnetc -bench 8 | -------------------------------------------------------------------------------- /docs/readme-dynix: -------------------------------------------------------------------------------- 1 | $Id: readme-dynix,v 1.2 2002/09/02 00:35:45 andreasb Exp $ 2 | 3 | Additional information for DYNIX/ptx clients. 4 | ============================================= 5 | 6 | The 2.8XXX series of clients are built on DYNIX/ptx 4.4.8. They will 7 | run on DYNIX/ptx 4.4.6, but might not run on earlier versions. 8 | 9 | -------------------------------------------------------------------------------- /plat/riscos/package/!Run,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | TaskWindow "Run .Dnetc " -wimpslot 1536K -name "dnetc" -display -quit 6 | -------------------------------------------------------------------------------- /plat/riscos/package/!RunQuiet,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | TaskWindow "Run .Dnetc " -wimpslot 1536K -name "dnetc" { > null: } 6 | -------------------------------------------------------------------------------- /plat/riscos/package/!Help,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | TaskWindow "Run .Dnetc -help" -wimpslot 1536K -name "dnetc help" -display -quit 6 | -------------------------------------------------------------------------------- /plat/riscos/package/!Test,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | TaskWindow "Run .Dnetc -test" -wimpslot 1536K -name "dnetc test" -display -quit 6 | -------------------------------------------------------------------------------- /plat/riscos/package/!Config,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | TaskWindow "Run .Dnetc -config" -wimpslot 1536K -name "dnetc config" -display -quit 6 | -------------------------------------------------------------------------------- /plat/riscos/package/!Update,feb: -------------------------------------------------------------------------------- 1 | Set Dnetc$Dir 2 | RMENSURE FPEmulator 4.00 RMLOAD System:Modules.FPEmulator 3 | RMENSURE FPEmulator 4.00 Error You need FPEmulator 4.00 or later 4 | IfThere .exitfile Then Delete .exitfile 5 | TaskWindow "Run .Dnetc -update" -wimpslot 1536K -name "dnetc update" -display -quit 6 | -------------------------------------------------------------------------------- /ogr/ogr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Currently (Aug, 9th 2000) this is only a stub to pull in the 3 | * one-and-only ogr.h. If custom 'ogr.h's should ever become necessary, 4 | * they can be (conditionally) included from here. 5 | * 6 | * $Id: ogr.h,v 1.9 2008/03/08 20:18:29 kakace Exp $ 7 | */ 8 | 9 | #include "ansi/ogrp2.h" 10 | #include "ansi/ogrng.h" 11 | -------------------------------------------------------------------------------- /rc5-72/pclbench/pclbench.mk.Linux.in: -------------------------------------------------------------------------------- 1 | # $Id: pclbench.mk.Linux.in,v 1.3 2007/10/22 16:48:35 jlawson Exp $ 2 | 3 | BASEDIR = ../.. 4 | CC = gcc 5 | CFLAGS = -O2 -I$(BASEDIR)/common -Wall 6 | LDLIBS = -lpcl 7 | 8 | TARGETS = @TARGETS@ 9 | 10 | 11 | all: $(TARGETS) 12 | 13 | clean: 14 | -rm -f $(TARGETS) 15 | 16 | # generated targets follow 17 | 18 | -------------------------------------------------------------------------------- /plat/netware/netware6.def: -------------------------------------------------------------------------------- 1 | Module LIBC.NLM 2 | Description "Distributed.net client" 3 | Copyright "Copyright 1997-2004 distributed.net" 4 | Version 0,0,0 5 | ScreenName "DNETC" 6 | StackSize 98304 7 | XDCData plat/netware/netware6.xdc 8 | FLAG_ON 4194338 9 | Debug 10 | Import @../opensource/ndk/imports/netware.imp 11 | Import @../opensource/ndk/imports/libc.imp 12 | -------------------------------------------------------------------------------- /plat/opencl/ocl_setup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2012 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: 7 | */ 8 | 9 | #ifndef OCL_SETUP_H 10 | #define OCL_SETUP_H 11 | 12 | int InitializeOpenCL(void); 13 | 14 | #endif // OCL_SETUP_H 15 | -------------------------------------------------------------------------------- /rc5-72/pclbench/pclbench.mk.SunOS.in: -------------------------------------------------------------------------------- 1 | # $Id: pclbench.mk.SunOS.in,v 1.3 2007/10/22 16:48:35 jlawson Exp $ 2 | 3 | BASEDIR = ../.. 4 | CC = CC 5 | CFLAGS = -xO5 -I$(BASEDIR)/common 6 | LDLIBS = -L. -lpcl -lcpc 7 | 8 | TARGETS = @TARGETS@ 9 | 10 | 11 | all: $(TARGETS) 12 | 13 | clean: 14 | -rm -f $(TARGETS) 15 | 16 | # generated targets follow 17 | 18 | -------------------------------------------------------------------------------- /plat/win/strcmpi.cpp: -------------------------------------------------------------------------------- 1 | #define WIN32_LEAN_AND_MEAN 2 | #include 3 | #include 4 | 5 | //! Case-insensitive string comparison 6 | /*! 7 | * \param s1 First input string to compare. 8 | * \param s2 Second input string to compare. 9 | * \return Returns -1 if s1 is lexographically less than s2, 1 10 | * if s1 is lexographycally greater than s2, or 0 if they 11 | * are equal. 12 | */ 13 | int strcmpi(const char *s1, const char *s2) 14 | { 15 | return lstrcmpi(s1, s2); 16 | } 17 | -------------------------------------------------------------------------------- /common/confmenu.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __CONFMENU_H__ 8 | #define __CONFMENU_H__ "@(#)$Id: confmenu.h,v 1.10 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | /* returns <0=error, 0=exit+nosave, >0=exit+save */ 11 | int Configure( Client *sample_client, int nottycheck ); 12 | 13 | #endif /* __CONFMENU_H__ */ 14 | -------------------------------------------------------------------------------- /docs/readme.uclib: -------------------------------------------------------------------------------- 1 | $Id: readme.uclib,v 1.3 2008/10/19 07:47:39 jlawson Exp $ 2 | 3 | Additional information for Linux/uClibc clients. 4 | ================================================ 5 | 6 | Beginning with v2.9007-489 we use a new build style using 7 | static uClibc instead of glibc. 8 | 9 | This client does not need the 'host' command. 10 | We hope, this will fix the various resolver problems which occured in the 11 | past with incompatible libc/glibc library versions. 12 | 13 | 14 | If you find bugs, report them at 15 | http://bugs.distributed.net/ 16 | -------------------------------------------------------------------------------- /plat/win/cudaver.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Exit with ERRORLEVEL containing the CUDA version level. 4 | rem For example: 2010 = CUDA 2.1 5 | rem 2000 = CUDA 2.0 6 | 7 | if "%CUDA_INC_PATH%"=="" goto notfound 8 | if not exist %CUDA_INC_PATH%\cuda.h goto notfound 9 | 10 | set cudaversion= 11 | for /f "tokens=3 usebackq" %%i in (`findstr CUDA_VERSION %CUDA_INC_PATH%\cuda.h`) do ( 12 | set cudaversion=%%i 13 | ) 14 | if "%cudaversion%"=="" goto notfound 15 | echo cudaversion=%cudaversion% 16 | exit %cudaversion% 17 | 18 | :notfound 19 | exit 0 20 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/clib/dnetcgui_protos.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not Edit! */ 2 | 3 | struct ClientGUIParams; 4 | struct WBArg; 5 | 6 | 7 | 8 | #ifndef CLIB_DNETCGUI_PROTOS_H 9 | #define CLIB_DNETCGUI_PROTOS_H 10 | 11 | #include "dnetcgui.h" 12 | 13 | ULONG dnetcguiOpen(ULONG cpu, UBYTE *programname, struct WBArg *iconname, const char *vstring); 14 | BOOL dnetcguiClose(struct ClientGUIParams *params); 15 | ULONG dnetcguiHandleMsgs(ULONG signals); 16 | VOID dnetcguiConsoleOut(ULONG cpu, UBYTE *output, BOOL overwrite); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/fd/dnetcgui_lib.sfd: -------------------------------------------------------------------------------- 1 | * This SFD file was automatically generated by fd2sfd from 2 | * dnetcgui_lib.fd and 3 | * /clib/dnetcgui_protos.h. 4 | ==base _DnetcBase 5 | ==include 6 | ==include 7 | ==bias 30 8 | ==public 9 | ULONG dnetcguiOpen(ULONG cpu, UBYTE * programname, struct WBArg * iconify, const char * vstring) (d0,a0,a1,a2) 10 | BOOL dnetcguiClose(struct ClientGUIParams * params) (a0) 11 | ULONG dnetcguiHandleMsgs(ULONG signals) (d0) 12 | VOID dnetcguiConsoleOut(ULONG cpu, UBYTE * output, BOOL overwrite) (d0,a0,d1) 13 | ==end 14 | -------------------------------------------------------------------------------- /plat/stream/amdstream_setup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Vyacheslav Chupyatov 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Special thanks for help in testing this core to: 7 | * Alexander Kamashev, PanAm, Alexei Chupyatov 8 | * 9 | * $Id: amdstream_setup.h,v 1.9 2010/05/09 10:47:37 stream Exp $ 10 | */ 11 | 12 | #ifndef AMD_STREAM_SETUP_H 13 | #define AMD_STREAM_SETUP_H 14 | 15 | #define AMD_STREAM_MAX_GPUS 16 16 | 17 | int AMDStreamInitialize(void); 18 | 19 | #endif // AMD_STREAM_SETUP_H 20 | -------------------------------------------------------------------------------- /common/cliident.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __CLIIDENT_H__ 8 | #define __CLIIDENT_H__ "@(#)$Id: cliident.h,v 1.15 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | extern void CliIdentifyModules(void); 11 | extern time_t CliGetNewestModuleTime(void); 12 | extern int CliIsDevelVersion(void); 13 | extern const char *CliGetFullVersionDescriptor(void); 14 | 15 | #endif /* __CLIIDENT_H__ */ 16 | -------------------------------------------------------------------------------- /common/confrwv.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __CONFRWV_H__ 9 | #define __CONFRWV_H__ "@(#)$Id: confrwv.h,v 1.20 2010/02/15 19:44:26 stream Exp $" 10 | 11 | int ConfigRead(Client *client); 12 | int ConfigWrite(Client *client); 13 | void ConfigWriteUniversalNews( Client *client ); 14 | int ConfigWriteRandomSubspace( Client *client, int contestid, u32 subspace ); 15 | 16 | #endif /* __CONFRWV_H__ */ 17 | -------------------------------------------------------------------------------- /common/disphelp.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __DISPHELP_H__ 8 | #define __DISPHELP_H__ "@(#)$Id: disphelp.h,v 1.8 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | /* 11 | full-screen, interactive (except for unix-ish platforms) help for 12 | an invalid option (argv[x]). 'unrecognized_option' may be NULL or "\0" 13 | */ 14 | void DisplayHelp( const char * unrecognized_option ); 15 | 16 | #endif /* __DISPHELP_H__ */ 17 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/endcode.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: endcode.c,v 1.2 2002/09/02 00:35:49 andreasb Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * ReAction GUI module for AmigaOS clients - library endcode point 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | void ENDCODE(void) 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /plat/cuda/cuda_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2009-2014 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: cuda_info.h,v 1.5 2014/02/23 21:09:09 zebe Exp $ 7 | */ 8 | 9 | #ifndef CUDA_INFO_H 10 | #define CUDA_INFO_H 11 | 12 | // returns -1 if not supported 13 | // returns 0 if no supported GPU was found 14 | int GetNumberOfDetectedCUDAGPUs(); 15 | 16 | long GetRawCUDAGPUID(int device, const char **cpuname); 17 | 18 | // returns the frequency in MHz, or 0. 19 | unsigned int GetCUDAGPUFrequency(int device); 20 | 21 | #endif // CUDA_INFO_H 22 | -------------------------------------------------------------------------------- /common/pack2.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2011 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __PACK2_H__ 9 | # define __PACK2_H__ "@(#)$Id: pack2.h,v 1.5 2011/03/31 05:07:29 jlawson Exp $" 10 | 11 | # include "pack.h" 12 | #endif 13 | 14 | /* make sure we don't get confused by predefined macros and initialise 15 | ** DNETC_PACKED to do 2-byte alignment */ 16 | #undef DNETC_PACKED 17 | #define DNETC_PACKED DNETC_ALIGNED2 18 | 19 | #ifdef DNETC_USE_PACK 20 | # pragma pack(2) 21 | #endif 22 | 23 | /* end of file */ 24 | -------------------------------------------------------------------------------- /common/pack4.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __PACK4_H__ 9 | # define __PACK4_H__ "@(#)$Id: pack4.h,v 1.3 2007/10/22 16:48:26 jlawson Exp $" 10 | 11 | # include "pack.h" 12 | #endif 13 | 14 | /* make sure we don't get confused by predefined macros and initialise 15 | ** DNETC_PACKED to do 4-byte alignment */ 16 | #undef DNETC_PACKED 17 | #define DNETC_PACKED DNETC_ALIGNED4 18 | 19 | #ifdef DNETC_USE_PACK 20 | # pragma pack(4) 21 | #endif 22 | 23 | /* end of file */ 24 | -------------------------------------------------------------------------------- /common/pack8.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __PACK8_H__ 9 | # define __PACK8_H__ "@(#)$Id: pack8.h,v 1.3 2007/10/22 16:48:26 jlawson Exp $" 10 | 11 | # include "pack.h" 12 | #endif 13 | 14 | /* make sure we don't get confused by predefined macros and initialise 15 | ** DNETC_PACKED to do 8-byte alignment */ 16 | #undef DNETC_PACKED 17 | #define DNETC_PACKED DNETC_ALIGNED8 18 | 19 | #ifdef DNETC_USE_PACK 20 | # pragma pack(8) 21 | #endif 22 | 23 | /* end of file */ 24 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse2-asm.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Assembly core for OGR-NG, SSE2 version. 3 | ; $Id: ogrng-cj1-sse2-asm.asm,v 1.8 2010/02/02 05:35:29 stream Exp $ 4 | ; 5 | ; Created by Craig Johnston (craig.johnston@dolby.com) 6 | ; 7 | 8 | cpu p4 9 | 10 | %ifdef __OMF__ ; Watcom and Borland compilers/linkers 11 | [SECTION _DATA USE32 ALIGN=16 CLASS=DATA] 12 | [SECTION _TEXT FLAT USE32 align=16 CLASS=CODE] 13 | %else 14 | [SECTION .data] 15 | [SECTION .text] 16 | %endif 17 | 18 | %include "ogrng-cj1-sse2-base.asm" 19 | 20 | global _ogr_cycle_256_cj1_sse2 21 | global ogr_cycle_256_cj1_sse2 22 | _ogr_cycle_256_cj1_sse2: 23 | ogr_cycle_256_cj1_sse2: 24 | 25 | header 26 | body 1 27 | footer 28 | -------------------------------------------------------------------------------- /common/pack1.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __PACK1_H__ 9 | # define __PACK1_H__ "@(#)$Id: pack1.h,v 1.3 2007/10/22 16:48:26 jlawson Exp $" 10 | 11 | # include "pack.h" 12 | #endif 13 | 14 | /* make sure we don't get confused by predefined macros and initialise 15 | ** DNETC_PACKED to do packing to one byte boundaries */ 16 | #undef DNETC_PACKED 17 | #define DNETC_PACKED DNETC_PACKED1 18 | 19 | #ifdef DNETC_USE_PACK 20 | # pragma pack(1) 21 | #endif 22 | 23 | /* end of file */ 24 | -------------------------------------------------------------------------------- /ogr/cellbe/ogr-cell.h: -------------------------------------------------------------------------------- 1 | #ifndef __OGR_CELL_H__ 2 | #define __OGR_CELL_H__ 3 | 4 | #define IMPLEMENT_CELL_CORES /* Required by ogr-vec.cpp */ 5 | #include "ppc/ogr-vec.cpp" /* Vectored stub structures */ 6 | #ifdef __SPU__ 7 | #include "ansi/ogrp2_corestate.h" /* Get only "State" structure */ 8 | #else 9 | #include "ansi/ogrp2_codebase.cpp" /* Get "State" structure and basic code */ 10 | #endif 11 | 12 | typedef struct 13 | { 14 | struct State state; 15 | int pnodes; 16 | } CellOGRCoreArgs; 17 | 18 | typedef union { 19 | ui64 a64; 20 | u32 a32[2]; 21 | } addr64; 22 | 23 | // #define STATIC_ASSERT(cond) { typedef int foo[(cond) ? 1 : -1]; } 24 | 25 | #endif // __OGR_CELL_H__ 26 | -------------------------------------------------------------------------------- /common/cmdline.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __CMDLINE_H__ 8 | #define __CMDLINE_H__ "@(#)$Id: cmdline.h,v 1.12 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | // runlevel=0 = parse cmdline, >0==exec modes && print messages 11 | // returns !0 if app should be terminated; (retcodeP then has exit code) 12 | int ParseCommandline( Client *client, 13 | int run_level, int argc, const char *argv[], 14 | int *retcodeP, int restarted ); 15 | 16 | #endif /* __CMDLINE_H__ */ 17 | -------------------------------------------------------------------------------- /plat/riscos/riscos_x86.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef _RISCOS_X86_H_ 8 | #define _RISCOS_X86_H_ "@(#)$Id: riscos_x86.h,v 1.2 2002/09/02 00:35:53 andreasb Exp $"; 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | const char *riscos_x86_ident(void); 15 | /* returns NULL if no x86 present otherwise name or "" if no name */ 16 | 17 | //s32 rc5_unit_func_x86( RC5UnitWork *, u32 * ); 18 | //internal 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif /* ifndef _RISCOS_X86_H_ */ 25 | -------------------------------------------------------------------------------- /rc5-72/pclbench/README: -------------------------------------------------------------------------------- 1 | $Id: README,v 1.3 2007/10/22 16:48:35 jlawson Exp $ 2 | 3 | This benchmark suite is for x86/linux. 4 | 5 | You have to install the following programs to use it: 6 | 7 | 1. perfctr (you need to patch your kernel for this) 8 | http://www.csd.uu.se/~mikpe/linux/perfctr/ 9 | 10 | 2. PCL - Performance Counter Library 11 | http://www.fz-juelich.de/zam/PCL/ 12 | 13 | 14 | To benchmark the cores you first have to build the client as usually. Don't 15 | forget to test it! (dnetc -test) 16 | Then run make here to build a bench program for every RC5-72 core in the 17 | client. 18 | Run the pclbench-* test programs to get some nice instruction/cycle count 19 | and other performance counter figures. 20 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/dnetcgui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2005 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: dnetcgui.h,v 1.2 2007/10/22 16:48:30 jlawson Exp $ 7 | * 8 | * Created by Harry Sintonen 9 | * 10 | * ---------------------------------------------------------------------- 11 | * MUI GUI module for MorphOS client - main API and GUI code 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #ifndef MUI_DNETCGUI_H 16 | #define MUI_DNETCGUI_H 17 | 18 | /* Get from AmigaOS gui header */ 19 | #include "../dnetcgui.h" 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /plat/win/w32exe.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Created by Cyrus Patel 8 | */ 9 | 10 | #ifndef __W32EXE_H__ 11 | #define __W32EXE_H__ "@(#)$Id: w32exe.h,v 1.2 2002/09/02 00:35:53 andreasb Exp $" 12 | 13 | /* is executable gui subsys? <0=err, 0=no, >0=yes */ 14 | extern int winIsGUIExecutable( const char *filename ); 15 | 16 | /* installer support */ 17 | extern int install_cmd_exever(int argc, char *argv[]); 18 | extern int install_cmd_copyfile(int argc, char *argv[]); 19 | 20 | #endif /* __W32EXE_H__ */ 21 | -------------------------------------------------------------------------------- /common/pack0.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __PACK0_H__ 9 | # define __PACK0_H__ "@(#)$Id: pack0.h,v 1.3 2007/10/22 16:48:26 jlawson Exp $" 10 | #endif 11 | 12 | #if !defined(__PACK_H__) 13 | # error "you must include pack{,1,4,8}.h first!" 14 | #endif 15 | 16 | #if defined(DNETC_USE_PACK_POP) 17 | # pragma pack(pop) 18 | #elif defined(DNETC_USE_PACK0) 19 | # pragma pack(0) 20 | #elif defined(DNETC_USE_PACK) 21 | # pragma pack() 22 | #endif 23 | 24 | /* clean up behind us */ 25 | #undef DNETC_PACKED 26 | 27 | /* end of file */ 28 | 29 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/inline4/dnetcgui.h: -------------------------------------------------------------------------------- 1 | #ifndef INLINE4_DNETCGUI_H 2 | #define INLINE4_DNETCGUI_H 3 | /* 4 | ** This file is machine generated from idltool 5 | ** Do not edit 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | /* 15 | * Inline functions for Interface "main" 16 | */ 17 | #define dnetcguiOpen(cpu, programname, iconname, vstring) IDnetc->dnetcguiOpen(cpu, programname, iconname, vstring) 18 | #define dnetcguiClose(params) IDnetc->dnetcguiClose(params) 19 | #define dnetcguiHandleMsgs(signals) IDnetc->dnetcguiHandleMsgs(signals) 20 | #define dnetcguiConsoleOut(cpu, output, overwrite) IDnetc->dnetcguiConsoleOut(cpu, output, overwrite) 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /plat/stream/amdstream_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Vyacheslav Chupyatov 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Special thanks for help in testing this core to: 7 | * Alexander Kamashev, PanAm, Alexei Chupyatov 8 | * 9 | * $Id: amdstream_info.h,v 1.4 2010/05/09 10:55:09 stream Exp $ 10 | */ 11 | 12 | #ifndef AMD_STREAM_INFO_H 13 | #define AMD_STREAM_INFO_H 14 | 15 | #include "cputypes.h" 16 | 17 | int getAMDStreamDeviceCount(void); 18 | u32 getAMDStreamDeviceFreq(int device); 19 | long getAMDStreamRawProcessorID(int device, const char **cpuname); 20 | void AMDStreamPrintExtendedGpuInfo(int device); 21 | 22 | #endif // AMD_STREAM_INFO_H 23 | -------------------------------------------------------------------------------- /common/selftest.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __SELFTEST_H__ 8 | #define __SELFTEST_H__ "@(#)$Id: selftest.h,v 1.15 2012/01/13 01:05:22 snikkel Exp $" 9 | 10 | #include "client.h" 11 | 12 | /* returns number of tests if all passed or negative number if a test failed */ 13 | long SelfTest( Client *client, unsigned int contest ); 14 | long StressTest( Client *client, unsigned int contest ); 15 | 16 | #if defined(HAVE_RC5_72_CORES) 17 | long StressRC5_72( Client *client ); /* RC5-72/stress.cpp */ 18 | #endif 19 | 20 | #endif /* __SELFTEST_H__ */ 21 | -------------------------------------------------------------------------------- /plat/next/next_sup.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __NEXT_SUP_H__ 9 | #define __NEXT_SUP_H__ "@(#)$Id: next_sup.h,v 1.3 2007/10/22 16:48:31 jlawson Exp $" 10 | 11 | #include /* size_t, off_t */ 12 | #include /* union wait, WIFEXITED */ 13 | 14 | char *strdup(const char *); 15 | int setenv (const char *,const char *, int); 16 | 17 | #define WIFTERMSIG(x) ((x).w_termsig) 18 | #define WEXITSTATUS(x) ((x).w_retcode) 19 | #define WSTOPSIG(x) ((x).w_stopsig) 20 | 21 | int waitpid(int, int *, int); 22 | 23 | #endif /* __NEXT_SUP_H__ */ 24 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/guilib_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2004-2005 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: guilib_version.h,v 1.4 2013/07/26 00:27:42 piru Exp $ 7 | * 8 | * Created by Ilkka Lehtoranta 9 | * 10 | * ---------------------------------------------------------------------- 11 | * MUI GUI module for MorphOS client - MUI application class code 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #define COMPILE_VERSION 1 16 | #define COMPILE_REVISION 3 17 | #define PROGRAM_NAME "dnetcgui.library" 18 | #define PROGRAM_VER "1.3" 19 | #define PROGRAM_DATE "(04.02.2013)" 20 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/proto/dnetcgui.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not edit! */ 2 | 3 | #ifndef PROTO_DNETCGUI_H 4 | #define PROTO_DNETCGUI_H 5 | 6 | #ifndef __NOLIBBASE__ 7 | extern struct Library * 8 | #ifdef __CONSTLIBBASEDECL__ 9 | __CONSTLIBBASEDECL__ 10 | #endif /* __CONSTLIBBASEDECL__ */ 11 | DnetcBase; 12 | #endif /* !__NOLIBBASE__ */ 13 | 14 | #include 15 | 16 | #ifdef __GNUC__ 17 | #ifdef __PPC__ 18 | #ifndef _NO_PPCINLINE 19 | #include 20 | #endif /* _NO_PPCINLINE */ 21 | #else 22 | #ifndef _NO_INLINE 23 | #include 24 | #endif /* _NO_INLINE */ 25 | #endif /* __PPC__ */ 26 | #else 27 | #include 28 | #endif /* __GNUC__ */ 29 | 30 | #endif /* !PROTO_DNETCGUI_H */ 31 | 32 | -------------------------------------------------------------------------------- /plat/win/w32ssb.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Win32/Win16 Screen Saver boot stuff. 7 | * Written by Cyrus Patel 8 | */ 9 | 10 | #if (!defined(lint) && defined(__showids__)) 11 | const char *w32ssb_cpp(void) { 12 | return "@(#)$Id: w32ssb.cpp,v 1.2 2002/09/02 00:35:53 andreasb Exp $"; } 13 | #endif 14 | 15 | #define WIN32_LEAN_AND_MEAN 16 | #include 17 | 18 | extern int PASCAL SSMain(HINSTANCE, HINSTANCE, LPSTR, int); 19 | 20 | int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszCmdLine, int nCmdShow) 21 | { 22 | return SSMain(hInst, hPrev, lpszCmdLine, nCmdShow); 23 | } 24 | -------------------------------------------------------------------------------- /ogr/amd64/ogrng64-cj1-sse2-asm.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Assembly core for OGR-NG, 64bit SSE2 asm version. 3 | ; $Id: ogrng64-cj1-sse2-asm.asm,v 1.2 2010/02/02 05:35:20 stream Exp $ 4 | ; 5 | ; Created by Craig Johnston (craig.johnston@dolby.com) 6 | ; 7 | 8 | %ifdef __NASM_VER__ 9 | cpu 686 10 | %else 11 | cpu p3 mmx sse sse2 12 | BITS 64 13 | %endif 14 | 15 | %ifdef __OMF__ ; Watcom and Borland compilers/linkers 16 | [SECTION _DATA USE32 ALIGN=16 CLASS=DATA] 17 | [SECTION _TEXT FLAT USE32 align=16 CLASS=CODE] 18 | %else 19 | [SECTION .data] 20 | [SECTION .text] 21 | %endif 22 | 23 | %include "ogrng64-cj1-base.asm" 24 | 25 | global _ogrng64_cycle_256_cj1_sse2 26 | global ogrng64_cycle_256_cj1_sse2 27 | _ogrng64_cycle_256_cj1_sse2: 28 | ogrng64_cycle_256_cj1_sse2: 29 | 30 | header 31 | body 13 32 | footer 33 | -------------------------------------------------------------------------------- /common/setprio.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __SETPRIO_H__ 8 | #define __SETPRIO_H__ "@(#)$Id: setprio.h,v 1.8 2008/12/30 20:58:42 andreasb Exp $" 9 | 10 | // 'prio' is a value on the scale of 0 to 9, where 0 is the lowest 11 | // priority and 9 is the highest priority [9 is what the priority would 12 | // be if priority were not set, ie is 'normal' priority.] 13 | // 14 | // prio 9 code should be valid, since the priority is raised when exiting. 15 | 16 | extern int SetGlobalPriority(unsigned int prio); 17 | extern int SetThreadPriority(unsigned int prio); 18 | 19 | #endif /* __SETPRIO_H__ */ 20 | -------------------------------------------------------------------------------- /plat/riscos/riscos_asm.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * RISC OS assembler support functions 8 | */ 9 | #ifndef __RISCOS_ASM_H__ 10 | #define __RISCOS_ASM_H__ "@(#)$Id: riscos_asm.h,v 1.5 2007/10/22 16:48:31 jlawson Exp $" 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern unsigned int read_monotonic_time(void); 17 | extern unsigned long ARMident(void); 18 | extern void riscos_upcall_6(void); 19 | 20 | #if 0 21 | allocate_nonzero 22 | deallocate_nonzero 23 | adcon_nonzero 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* __RISCOS_ASM_H__ */ 31 | 32 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse41-asm.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Assembly core for OGR-NG, SSE2 version. Using PEXTRD. 3 | ; $Id: ogrng-cj1-sse41-asm.asm,v 1.1 2010/02/02 05:35:41 stream Exp $ 4 | ; 5 | ; Created by Craig Johnston (craig.johnston@dolby.com) 6 | ; 7 | 8 | %ifdef __NASM_VER__ 9 | cpu p4 10 | %else 11 | cpu p4 sse4.1 12 | %endif 13 | 14 | %ifdef __OMF__ ; Watcom and Borland compilers/linkers 15 | [SECTION _DATA USE32 ALIGN=16 CLASS=DATA] 16 | [SECTION _TEXT FLAT USE32 align=16 CLASS=CODE] 17 | %else 18 | [SECTION .data] 19 | [SECTION .text] 20 | %endif 21 | 22 | %define use_pextrd 23 | %include "ogrng-cj1-sse2-base.asm" 24 | 25 | global _ogr_cycle_256_cj1_sse41 26 | global ogr_cycle_256_cj1_sse41 27 | _ogr_cycle_256_cj1_sse41: 28 | ogr_cycle_256_cj1_sse41: 29 | 30 | header 31 | body 1 32 | footer 33 | -------------------------------------------------------------------------------- /plat/dos/cdosinet.cpp: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * --------------------------------------------------------------- 8 | * still nothing... 9 | * --------------------------------------------------------------- 10 | */ 11 | const char *cdosinet_cpp(void) { 12 | return "@(#)$Id: cdosinet.cpp,v 1.2 2002/09/02 00:35:50 andreasb Exp $"; } 13 | 14 | 15 | #if 0 16 | int send( int s, char *msg, int len, int flags) 17 | { 18 | s=s; msg=msg; len=len; flags=flags; 19 | return -1; 20 | } 21 | 22 | int recv( int s, char *msg, int len, int flags) 23 | { 24 | s=s; msg=msg; len=len; flags=flags; 25 | return -1; 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /plat/netware/nwcmisc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * misc stuff that gets called from client/common code. 7 | * written by Cyrus Patel 8 | * 9 | * $Id: nwcmisc.h,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 10 | */ 11 | 12 | #ifndef __CNW_CLIENT_MISC_H_ 13 | #define __CNW_CLIENT_MISC_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | extern int nwCliInitClient( int argc, char **argv ); 20 | extern int nwCliExitClient( void ); 21 | extern const char *nwCliGetNLMBaseName( void ); 22 | extern void nwCliMillisecSleep( unsigned long millisecs ); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* __CNW_CLIENT_MISC_H_ */ 28 | -------------------------------------------------------------------------------- /plat/cuda/cuda_setup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2009 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: cuda_setup.h,v 1.3 2009/04/29 08:52:35 andreasb Exp $ 7 | */ 8 | 9 | #ifndef CUDA_SETUP_H 10 | #define CUDA_SETUP_H 11 | 12 | #define CUDA_SETUP_INVALID_DRIVER_REVISION -1 13 | #define CUDA_SETUP_MISSING_NVCUDA_DLL -2 14 | #define CUDA_SETUP_INVALID_NVCUDA_PATH -3 15 | #define CUDA_SETUP_NO_FILE_VERSION -4 16 | 17 | #define CUDA_SETUP_STREAM_FAILURE -11 18 | #define CUDA_SETUP_EVENT_FAILURE -12 19 | 20 | // returns 0 on success 21 | // i.e. a supported GPU + driver version + CUDA version was found 22 | int InitializeCUDA(void); 23 | extern int cuda_init_state; 24 | 25 | #endif // CUDA_SETUP_H 26 | -------------------------------------------------------------------------------- /plat/netware/nwcconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * misc (unsorted) stuff that gets called from client/common code. 7 | * written by Cyrus Patel 8 | * 9 | * $Id: nwcconf.h,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 10 | */ 11 | 12 | #ifndef __CNW_CONF_H_ 13 | #define __CNW_CONF_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | int nwCliGetPollingAllowedFlag(void); 20 | int nwCliAreCrunchersRestartable(void); 21 | int nwCliIsPreemptiveEnv( void ); 22 | int nwCliGetUtilizationSupressionFlag(void); 23 | 24 | void nwCliLoadSettings(const char *inifile); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* __CNW_CONF_H_ */ 30 | -------------------------------------------------------------------------------- /common/checkpt.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __CHECKPT_H__ 8 | #define __CHECKPT_H__ "@(#)$Id: checkpt.h,v 1.13 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | /* action flags */ 11 | #define CHECKPOINT_REFRESH 0x00 /* save current to checkpoint */ 12 | #define CHECKPOINT_OPEN 0x01 /* retreive state from checkpoint */ 13 | #define CHECKPOINT_CLOSE 0x02 /* delete any old checkpoint files */ 14 | 15 | /* CheckpointAction() returns !0 if checkpointing is disabled */ 16 | int CheckpointAction( Client *client, int action, 17 | unsigned int load_problem_count ); 18 | 19 | #endif /* __CHECKPT_H__ */ 20 | 21 | -------------------------------------------------------------------------------- /plat/amigaos/tools/makearchive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Build full tarbulls for AmigaOS, including icons and dir structure 4 | # by Oliver Roberts 5 | # 6 | # params ARCNAME/A,CPUNAME/A,DIRNAME/A,DOCFILE1,DOCFILE2,DOCFILE3,DOCFILE4 7 | 8 | if [ "$3" = "dnetc_mos" ]; then 9 | lha -q x plat/amigaos/tools/icons_mos.lha T: 10 | mv /T/drawer.info /T/${3}.info 11 | else 12 | lha -q x plat/amigaos/tools/icons.lha T: 13 | mv /T/${2}/drawer.info /T/${3}.info 14 | fi 15 | mv /T/${2} /T/${3} 16 | if [ "$3" = "dnetc_mos" ]; then 17 | cp -p dnetc dnetcgui.library /T/${3} 18 | elif [ "$3" = "dnetc" ]; then 19 | cp -p dnetc dnetcgui.library /T/${3} 20 | else 21 | cp -p dnetc_${2} dnetcgui.library /T/${3} 22 | fi 23 | cp -p ${4} ${5} ${6} ${7} /T/${3}/docs 24 | rm -f ${1} 25 | lha -IxrH1 a ${1} T:${3} T:${3}.info 26 | rm -fr /T/${3} /T/${3}.info /T/68k /T/ppc 27 | -------------------------------------------------------------------------------- /plat/netware/nwccons.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * client console management functions. 7 | * written by Cyrus Patel 8 | * 9 | * $Id: nwccons.h,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 10 | */ 11 | #ifndef __CNW_CLIENT_CONSOLE_H__ 12 | #define __CNW_CLIENT_CONSOLE_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | int nwCliCheckForUserBreak(void); /* RaiseExitRequestTrigger() if ^C */ 19 | int nwCliDeinitializeConsole(int dopauseonclose); 20 | int nwCliInitializeConsole(int hidden, int doingmodes); /* return 0 if ok */ 21 | int nwCliKbHit(void); 22 | int nwCliGetCh(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif /* __CNW_CLIENT_CONSOLE_H_ */ 29 | 30 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/proto/dnetcgui.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTO_DNETCGUI_H 2 | #define PROTO_DNETCGUI 3 | 4 | #include 5 | #ifndef __NOLIBBASE__ 6 | extern struct Library *DnetcBase; 7 | #endif /* __NOLIBBASE__ */ 8 | 9 | #ifdef __amigaos4__ 10 | #ifdef __USE_INLINE__ 11 | #include 12 | #endif /* __USE_INLINE__ */ 13 | #include 14 | 15 | #ifndef __NOGLOBALIFACE__ 16 | extern struct DnetcIFace *IDnetc; 17 | #endif /* __NOGLOBALIFACE__*/ 18 | 19 | #else /* __amigaos4__ */ 20 | #if defined(__GNUC__) 21 | #if defined(__PPC__) 22 | #include 23 | #else 24 | #include 25 | #endif 26 | #elif defined(__VBCC__) 27 | #ifndef __PPC__ 28 | #include 29 | #endif 30 | #else 31 | #include 32 | #endif /* __GNUC__ */ 33 | #endif /* __amigaos4__ */ 34 | #endif /* PROTO_DNETCGUI_H */ 35 | -------------------------------------------------------------------------------- /plat/amigaos/tools/amigadate.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: amigadate.c,v 1.2 2002/09/02 00:35:50 andreasb Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * Returns current date in format required for AmigaDOS version strings 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | int main(int argc, char **argv) 20 | { 21 | time_t t; 22 | struct tm *tp; 23 | 24 | t = time(NULL); 25 | tp = localtime(&t); 26 | printf("\"%d.%d.%d\"",tp->tm_mday,tp->tm_mon+1,tp->tm_year+1900); 27 | 28 | return(0); 29 | } 30 | -------------------------------------------------------------------------------- /common/base64.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __BASE64_H__ 9 | #define __BASE64_H__ "@(#)$Id: base64.h,v 1.12 2008/12/30 20:58:40 andreasb Exp $" 10 | 11 | /* 12 | On success, both functions return the number of bytes in the outbuf (not 13 | counting the terminating '\0'). On error, both return < 0. 14 | note: The outbuffer is terminated only if there is sufficient space 15 | remaining after conversion. 16 | */ 17 | 18 | int base64_encode(char *outbuf, const char *inbuf, 19 | unsigned int outbuflen, unsigned int inbuflen ); 20 | int base64_decode(char *outbuf, const char *inbuf, 21 | unsigned int outbuflen, unsigned int inbuflen ); 22 | 23 | #endif /* __BASE64_H__ */ 24 | -------------------------------------------------------------------------------- /common/bench.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __BENCH_H__ 8 | #define __BENCH_H__ "@(#)$Id: bench.h,v 1.21 2012/05/13 09:32:54 stream Exp $" 9 | 10 | #include "client.h" 11 | 12 | /* returns "rate", or -1 if core error/^C, or 0 if not supported */ 13 | long TBenchmark( Client *client, unsigned int contestid, unsigned int numsecs, int flags, u32 *p_ratehi, u32 *p_ratelo ); 14 | #define TBENCHMARK_QUIET 0x01 15 | #define TBENCHMARK_IGNBRK 0x02 16 | // do not use 0x80, it's internal to TBenchmark 17 | //#define TBENCHMARK_CALIBRATION 0x80 18 | void BenchGetBestRate(Client *client, unsigned int contestid, u32 *p_ratehi, u32 *p_ratelo); 19 | void BenchResetStaticVars(void); 20 | 21 | #endif /* __BENCH_H__ */ 22 | -------------------------------------------------------------------------------- /plat/dos/cdosemu.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Written by Cyrus Patel 8 | * 9 | * ---------------------------------------------------------------- 10 | * get informational message used by the client (from PrintBanner) 11 | * used nowhere else, and is now quite useless :) 12 | * 13 | * [it used to be the function that detected which yield method to use, 14 | * but that is now in cdosidle] 15 | * ---------------------------------------------------------------- 16 | */ 17 | #ifndef __CLIDOS_EMU_H__ 18 | #define __CLIDOS_EMU_H__ "@(#)$Id: cdosemu.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $" 19 | 20 | const char *dosCliGetEmulationDescription(void); 21 | 22 | #endif //__CLIDOS_EMU_H__ 23 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/dnetcgui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: dnetcgui.h,v 1.2 2002/09/02 00:35:49 andreasb Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * ReAction GUI module for AmigaOS clients - defines shared with client 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #ifndef DNETCGUI_H 16 | #define DNETCGUI_H 17 | 18 | #define DNETCGUI_68K 0x1 19 | #define DNETCGUI_PPC 0x2 20 | 21 | #define DNETC_MSG_FETCH 0x10 22 | #define DNETC_MSG_FLUSH 0x20 23 | #define DNETC_MSG_BENCHMARK 0x40 24 | #define DNETC_MSG_BENCHMARK_ALL 0x80 25 | #define DNETC_MSG_TEST 0x100 26 | #define DNETC_MSG_CONFIG 0x200 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /plat/dos/cdoscon.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Written by Cyrus Patel 8 | * 9 | * ----------------------------------------------------------------- 10 | * this .h yanks in all the other non-standard or dos-port specific 11 | * header files 12 | * ----------------------------------------------------------------- 13 | * 14 | */ 15 | #ifndef __CLIDOSCON_H__ 16 | #define __CLIDOSCON_H__ "@(#)$Id: cdoscon.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $" 17 | 18 | extern int dosCliConIsScreen(void); 19 | extern int dosCliConGetPos( int *colP, int *rowP ); 20 | extern int dosCliConSetPos( int acol, int arow ); 21 | extern int dosCliConGetSize( int *cols, int *rows ); 22 | extern int dosCliConClear(void); 23 | 24 | #endif /* __CLIDOSCON_H__ */ 25 | -------------------------------------------------------------------------------- /plat/netware/netware.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Catch-all source file for the distributed.net client for NetWare 7 | * written by Cyrus Patel 8 | * 9 | * (no, its not nice to do things this way, but its the only way 10 | * when one doesn't want to repeatedly muck with a shared makefile) 11 | * 12 | * $Id: netware.cpp,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 13 | */ 14 | 15 | #include "nwlemu.c" /* kernel/clib portability stubs */ 16 | #include "nwlcomp.c" /* ANSI/POSIX compatibility functions */ 17 | #include "nwmpk.c" /* MP Kernel stubs/emulation */ 18 | 19 | #include "nwccons.c" /* client console management */ 20 | #include "nwcmisc.c" /* init/exit and other misc functions */ 21 | #include "nwcconf.c" /* client-for-netware specific settings */ 22 | 23 | -------------------------------------------------------------------------------- /plat/opencl/ocl_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2014 Vyacheslav Chupyatov 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Special thanks for help in testing this core to: 7 | * Alexander Kamashev, PanAm, Alexei Chupyatov 8 | * 9 | * $Id: ocl_info.h 2014/08/19 22:18:25 gkhanna Exp $ 10 | */ 11 | 12 | #ifndef OCL_INFO_H 13 | #define OCL_INFO_H 14 | 15 | #include "cputypes.h" 16 | #if (CLIENT_OS == OS_WIN64) || (CLIENT_OS == OS_WIN32) || \ 17 | (CLIENT_OS == OS_WIN16) || (CLIENT_OS == OS_LINUX) || \ 18 | (CLIENT_OS == OS_ANDROID) 19 | #include 20 | #elif (CLIENT_OS == OS_MACOSX) 21 | #include 22 | #endif 23 | 24 | int getOpenCLDeviceCount(void); 25 | u32 getOpenCLDeviceFreq(int device); 26 | long getOpenCLRawProcessorID(int device, const char **cpuname); 27 | void OpenCLPrintExtendedGpuInfo(int device); 28 | 29 | #endif // OCL_INFO_H 30 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse2-lzcnt-asm.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Assembly core for OGR-NG, SSE2 with LZCNT version. 3 | ; $Id: ogrng-cj1-sse2-lzcnt-asm.asm,v 1.1 2010/02/02 05:35:36 stream Exp $ 4 | ; 5 | ; Created by Craig Johnston (craig.johnston@dolby.com) 6 | ; 7 | 8 | %ifdef __NASM_VER__ 9 | cpu p4 10 | %else 11 | cpu p4 12 | %if (__YASM_MAJOR__ < 1) 13 | cpu amd ; Older versions of yasm assumed lzcnt with "amd" 14 | %else 15 | cpu lzcnt 16 | %endif 17 | %endif 18 | 19 | %ifdef __OMF__ ; Watcom and Borland compilers/linkers 20 | [SECTION _DATA USE32 ALIGN=16 CLASS=DATA] 21 | [SECTION _TEXT FLAT USE32 align=16 CLASS=CODE] 22 | %else 23 | [SECTION .data] 24 | [SECTION .text] 25 | %endif 26 | 27 | %define use_lzcnt 28 | %include "ogrng-cj1-sse2-base.asm" 29 | 30 | global _ogr_cycle_256_cj1_sse2_lzcnt 31 | global ogr_cycle_256_cj1_sse2_lzcnt 32 | _ogr_cycle_256_cj1_sse2_lzcnt: 33 | ogr_cycle_256_cj1_sse2_lzcnt: 34 | 35 | header 36 | body 1 37 | footer 38 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: main.h,v 1.3 2007/10/22 16:48:30 jlawson Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * ReAction GUI module for AmigaOS clients 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | extern struct MsgPort *IDCMPPort; 16 | extern struct Gadget *GlbGadgetsP[]; 17 | extern struct Window *GlbIWindowP; 18 | extern Object *GlbWindowP; 19 | 20 | struct ConsoleLines { 21 | struct List list; 22 | ULONG numlines; 23 | }; 24 | 25 | extern struct ConsoleLines ConsoleLines68K, ConsoleLinesPPC; 26 | 27 | enum { GAD_MAINLAYOUT=1, GAD_CON68K, GAD_CONPPC, NUM_GADS }; 28 | 29 | VOID UpdateGadget(struct Window *win, struct Gadget *gad, ...); 30 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/clib/dnetcgui_protos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: dnetcgui_protos.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * ReAction GUI module for AmigaOS clients - Library function prototypes 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #ifndef CLIB_DNETCGUI_PROTOS_H 16 | #define CLIB_DNETCGUI_PROTOS_H 17 | 18 | #include "dnetcgui.h" 19 | 20 | ULONG dnetcguiOpen(ULONG cpu, UBYTE *programname, struct WBArg *iconname, const char *vstring); 21 | BOOL dnetcguiClose(struct ClientGUIParams *params); 22 | ULONG dnetcguiHandleMsgs(ULONG signals); 23 | VOID dnetcguiConsoleOut(ULONG cpu, UBYTE *output, BOOL overwrite); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /plat/opencl/deviceid.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2012 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: 7 | */ 8 | 9 | static const char deviceid_src[]= 10 | 11 | "Vy8vR2V0IGRldmljZSBJRCBiYXNlZCBvbiBjbF9hbWRfcHJlZGVmaW5lZF9tYWNyb3MgZX" 12 | "h0ZW5zaW9uIChpZiBhdmFpbGFibGUpDQovL0NPUkVOQU1FPYZRAAtpZF9zcmMNCnVpboVk" 13 | "AA1JRCgpDQp7DQojaWYgh1cAIihfX1dpbnRlclBhcmtfXykNCiAgcmV0dXJuIDU7DQojZW" 14 | "yNLAAKQmVhdmVyQ3JlZY8tAAE2ky0ABVR1cmtzjlQAATeTVAAFQ2FpY2+PKAABOJRPAAVh" 15 | "aGl0aY6kAAE5k6QACFBpdGNhaXJujs4AAjEwlXsAB3BldmVyZGWPLAABMZWnAAN5bWGQVQ" 16 | "ABMpQkAQNhcnSP9wACMTOU+AAFeXByZXOQKgABNJN2AQdKdW5pcGVyj9EAlKABB1JlZHdv" 17 | "b2SP+wCUnQEEQ2VkYZBSAJSeAQlBVElfUlY3NzCPTwGUogGHLAABM5AsAJSmAYdYAAExj1" 18 | "gAATKUpwEHTG92ZWxhbo/XAAEylKYBA0dQVY/4AZPGAgNYODaPdgCXJQACNjSOEwOVxwGQ" 19 | "cgCGwgEGbmRpZg0Ki08DhIACAX2EEgANX19rZXJuZWwgdm9pZIf8AwxJRChfX2dsb2JhbC" 20 | "CFrwMHKm91dGJ1ZoawAwIgIIYOAAVbMF0gPYjKAwQ7DQp9AA=="; -------------------------------------------------------------------------------- /common/coremem.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Allocation/free of memory used by crunchers. For crunchers that were 8 | * created with fork(), the memory is shared between client and cruncher. 9 | * Created March 2001 by Cyrus Patel 10 | * 11 | * ** header may be included by cores, so guard around c++ constructs ** 12 | */ 13 | 14 | #ifndef __COREMEM_H__ 15 | #define __COREMEM_H__ "@(#)$Id: coremem.h,v 1.5 2007/10/22 16:48:25 jlawson Exp $" 16 | 17 | #ifdef __cplusplus /* header may be included by cores */ 18 | extern "C" { 19 | #endif 20 | 21 | /* only for HAVE_MULTICRUNCH_VIA_FORK */ 22 | void cmem_select_allocator(int which); 23 | 24 | void *cmem_alloc(unsigned int sz); 25 | int cmem_free(void *mem); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* __COREMEM_H__ */ 32 | 33 | -------------------------------------------------------------------------------- /rc5-72/cellbe/r72-cell.h: -------------------------------------------------------------------------------- 1 | #ifndef __R72_CELL_H__ 2 | #define __R72_CELL_H__ 3 | 4 | #include "ccoreio.h" 5 | #include "cputypes.h" 6 | 7 | typedef struct 8 | { 9 | u32 sign1, pad1[3]; /* 16+... */ 10 | RC5_72UnitWork rc5_72unitwork; /* 44 bytes */ 11 | u32 iterations; /* 48 bytes */ 12 | u32 sign2, pad2[3]; /* pad to 16 */ 13 | } CellR72CoreArgs; 14 | 15 | #define STATIC_ASSERT(foo) { typedef int footype[(foo) ? 1 : -1]; } 16 | 17 | #define SIGN_PPU_TO_SPU_1 0xDEADFACE 18 | #define SIGN_PPU_TO_SPU_2 0xC0FFEE11 19 | #define SIGN_SPU_TO_PPU_1 0xFEEDBEEF 20 | #define SIGN_SPU_TO_PPU_2 0xC0DAC01A 21 | 22 | /* Return codes for internal bugchecks. Must be different from normal RESULT_xxx codes. */ 23 | 24 | #define RETVAL_ERR_BAD_SIGN1 55 25 | #define RETVAL_ERR_BAD_SIGN2 66 26 | #define RETVAL_ERR_TRASHED_SIGN1 77 27 | #define RETVAL_ERR_TRASHED_SIGN2 88 28 | 29 | typedef union { 30 | ui64 a64; 31 | u32 a32[2]; 32 | } addr64; 33 | 34 | #endif // __R72_CELL_H__ 35 | -------------------------------------------------------------------------------- /rc5-72/pclbench/Makefile: -------------------------------------------------------------------------------- 1 | # $Id: Makefile,v 1.3 2007/10/22 16:48:35 jlawson Exp $ 2 | 3 | all: pclbench 4 | 5 | BASEDIR = ../.. 6 | COREOBJFILES = $(wildcard $(BASEDIR)/output/r72*.o) 7 | 8 | pclbench: pclbench.mk 9 | $(MAKE) -f pclbench.mk 10 | 11 | pclbench.mk: pclbench.mk.*.in $(COREOBJFILES) 12 | -rm -f $@.tmp 13 | for core in $(COREOBJFILES) ; do \ 14 | funcname=`nm $$core | grep rc5_72_unit_func | sed -e 's/.*rc5_72_unit_func_//;s/_$$//' | head -1` ; \ 15 | test -n "$$funcname" && targets="$$targets pclbench-$$funcname" ; \ 16 | test -n "$$funcname" && echo "pclbench-$$funcname: pclbench.cpp config.h $$core" >> $@.tmp ; \ 17 | test -n "$$funcname" && echo " \$$(CC) \$$(CFLAGS) -DCOREFUNC=$$funcname pclbench.cpp $$core \$$(LDLIBS) -o \$$@" >> $@.tmp ; \ 18 | test -n "$$funcname" && echo "" >> $@.tmp ; \ 19 | done ; \ 20 | sed -e "s/@TARGETS@/$$targets/" $@.`uname -s`.in > $@ 21 | cat $@.tmp >> $@ 22 | -rm -f $@.tmp 23 | 24 | clean: 25 | -test -f pclbench.mk && make -f pclbench.mk clean 26 | -rm -f pclbench.mk 27 | -------------------------------------------------------------------------------- /ogr/amd64/ogrng64-cj1-sse2-lzcnt-asm.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Assembly core for OGR-NG, 64bit SSE2 with LZCNT asm version. 3 | ; $Id: ogrng64-cj1-sse2-lzcnt-asm.asm,v 1.2 2013/04/11 19:39:30 umccullough Exp $ 4 | ; 5 | ; Created by Craig Johnston (craig.johnston@dolby.com) 6 | ; 7 | 8 | %ifdef __NASM_VER__ 9 | cpu 686 10 | %else 11 | cpu p3 mmx sse sse2 12 | %if (__YASM_MAJOR__ < 1) || (__YASM_MAJOR__ == 1 && __YASM_MINOR__ < 2) 13 | cpu amd ; Older versions of yasm assumed lzcnt with "amd" 14 | %else 15 | cpu lzcnt 16 | %endif 17 | BITS 64 18 | %endif 19 | 20 | %ifdef __OMF__ ; Watcom and Borland compilers/linkers 21 | [SECTION _DATA USE32 ALIGN=16 CLASS=DATA] 22 | [SECTION _TEXT FLAT USE32 align=16 CLASS=CODE] 23 | %else 24 | [SECTION .data] 25 | [SECTION .text] 26 | %endif 27 | 28 | %define use_lzcnt 29 | %include "ogrng64-cj1-base.asm" 30 | 31 | global _ogrng64_cycle_256_cj1_sse2_lzcnt 32 | global ogrng64_cycle_256_cj1_sse2_lzcnt 33 | _ogrng64_cycle_256_cj1_sse2_lzcnt: 34 | ogrng64_cycle_256_cj1_sse2_lzcnt: 35 | 36 | header 37 | body 13 38 | footer 39 | -------------------------------------------------------------------------------- /common/iniread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * .ini (configuration file ala windows) file read/write routines 3 | * written by Cyrus Patel , no copyright. 4 | * 5 | */ 6 | #ifndef __INIREAD_H__ 7 | #define __INIREAD_H__ "@(#)$Id: iniread.h,v 1.37 2008/12/19 11:10:58 andreasb Exp $" 8 | 9 | unsigned long GetPrivateProfileStringB( const char *sect, const char *key, 10 | const char *defval, char *buffer, 11 | unsigned long buffsize, 12 | const char *filename ); 13 | int WritePrivateProfileStringB( const char *sect, const char *key, 14 | const char *value, const char *filename ); 15 | unsigned int GetPrivateProfileIntB( const char *sect, const char *key, 16 | int defvalue, const char *filename ); 17 | int WritePrivateProfileIntB( const char *sect, const char *key, 18 | int value, const char *filename ); 19 | 20 | #endif /* ifndef __INIREAD_H__ */ 21 | -------------------------------------------------------------------------------- /plat/amigaos/tools/genam_wrapper.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: genam_wrapper.c,v 1.2 2002/09/02 00:35:50 andreasb Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * Simple wrapper to convert the asm command line generated by configure 12 | * to be compatible with genam (-o in genam requires that no space is 13 | * inserted between -o and the filename) 14 | * ---------------------------------------------------------------------- 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | int main(int argc, char **argv) 22 | { 23 | int ret = 20; 24 | UBYTE cmd[512]; 25 | 26 | if (argc >= 4) { 27 | sprintf(cmd,"genam %s to %s -l",argv[1],argv[3]); 28 | ret = System(cmd,NULL); 29 | } 30 | 31 | return(ret); 32 | } 33 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/interfaces/dnetcgui.h: -------------------------------------------------------------------------------- 1 | #ifndef DNETCGUI_INTERFACE_DEF_H 2 | #define DNETCGUI_INTERFACE_DEF_H 3 | /* 4 | ** This file is machine generated from idltool 5 | ** Do not edit 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | struct DnetcIFace 15 | { 16 | struct InterfaceData Data; 17 | 18 | ULONG APICALL (*Obtain)(struct DnetcIFace *Self); 19 | ULONG APICALL (*Release)(struct DnetcIFace *Self); 20 | void APICALL (*Expunge)(struct DnetcIFace *Self); 21 | struct Interface * APICALL (*Clone)(struct DnetcIFace *Self); 22 | ULONG APICALL (*dnetcguiOpen)(struct DnetcIFace *Self, ULONG cpu, UBYTE * programname, struct WBArg * iconname, const char * vstring); 23 | BOOL APICALL (*dnetcguiClose)(struct DnetcIFace *Self, struct ClientGUIParams * params); 24 | ULONG APICALL (*dnetcguiHandleMsgs)(struct DnetcIFace *Self, ULONG signals); 25 | ULONG APICALL (*dnetcguiConsoleOut)(struct DnetcIFace *Self, ULONG cpu, UBYTE * output, BOOL overwrite); 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /common/probman.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __PROBMAN_H__ 8 | #define __PROBMAN_H__ "@(#)$Id: probman.h,v 1.11 2008/12/30 20:58:42 andreasb Exp $" 9 | 10 | //Return a specific Problem object or NULL if that problem doesn't exist 11 | Problem *GetProblemPointerFromIndex(unsigned int probindex); 12 | 13 | //Return the index (>=0) of a specific Problem object or -1 if not found. 14 | //Note: Problems created from Benchmark etc are not managed by ProblemManager 15 | int GetProblemIndexFromPointer( Problem *prob ); 16 | 17 | //Initialize the problem manager 18 | int InitializeProblemManager(unsigned int maxnumproblems); 19 | 20 | //Deinitialize the problem manager 21 | int DeinitializeProblemManager(void); 22 | 23 | // returns the number of problems managed by ProblemManager 24 | unsigned int GetManagedProblemCount(void); 25 | 26 | #endif /* __PROBMAN_H__ */ 27 | -------------------------------------------------------------------------------- /plat/dos/clidos.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * ----------------------------------------------------------------- 8 | * this yanks in all the other non-standard or dos-port specific .h files 9 | * ----------------------------------------------------------------- 10 | */ 11 | 12 | #ifndef __CLIDOS_H__ 13 | #define __CLIDOS_H__ "@(#)$Id: clidos.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $" 14 | 15 | //#include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "cdosemu.h" 23 | #include "cdoscon.h" 24 | #include "cdosidle.h" 25 | #include "cdostime.h" 26 | #include "cdosinet.h" 27 | 28 | #define dosCliSleep(x) delay((x)*1000) 29 | #define dosCliUSleep(x) delay((x)/1000) 30 | #define dosCliYield(x) delay(0) /* sleep/usleep may be redefined */ 31 | 32 | #endif //__CLIDOS_H__ 33 | -------------------------------------------------------------------------------- /ogr/alpha/alpha-asm.h: -------------------------------------------------------------------------------- 1 | // $Id: alpha-asm.h,v 1.3 2008/03/08 20:18:28 kakace Exp $ 2 | 3 | #if (OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM == 2) 4 | #if (SCALAR_BITS == 32) 5 | #if defined(__GNUC__) 6 | static __inline__ int __CNTLZ__(register SCALAR i) 7 | { 8 | register SCALAR j = (SCALAR)i << 32; 9 | __asm__ ("ctlz %0,%0" : "=r"(j) : "0" (j)); 10 | return (int)j; 11 | } 12 | #else 13 | static inline int __CNTLZ__(register SCALAR i) 14 | { 15 | __int64 r = asm("ctlz %a0, %v0;", (SCALAR)i << 32); 16 | return (int)r; 17 | } 18 | #endif 19 | #else /* assume SCALAR_BITS == 64 */ 20 | #if defined(__GNUC__) 21 | static __inline__ int __CNTLZ__(register SCALAR i) 22 | { 23 | __asm__ ("ctlz %0,%0" : "=r"(i) : "0" (i)); 24 | return (int)j; 25 | } 26 | #else 27 | static inline int __CNTLZ__(register SCALAR i) 28 | { 29 | __int64 r = asm("ctlz %a0, %v0;", i); 30 | return (int)r; 31 | } 32 | #endif 33 | #endif 34 | #define __CNTLZ(x) (__CNTLZ__(~(x))+1) 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/inline/dnetcgui.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not edit! */ 2 | 3 | #ifndef _INLINE_DNETCGUI_H 4 | #define _INLINE_DNETCGUI_H 5 | 6 | #ifndef __INLINE_MACROS_H 7 | #include 8 | #endif /* !__INLINE_MACROS_H */ 9 | 10 | #ifndef DNETCGUI_BASE_NAME 11 | #define DNETCGUI_BASE_NAME DnetcBase 12 | #endif /* !DNETCGUI_BASE_NAME */ 13 | 14 | #define dnetcguiClose(params) \ 15 | LP1(0x24, BOOL, dnetcguiClose, struct ClientGUIParams *, params, a0, \ 16 | , DNETCGUI_BASE_NAME) 17 | 18 | #define dnetcguiConsoleOut(cpu, output, overwrite) \ 19 | LP3NR(0x30, dnetcguiConsoleOut, ULONG, cpu, d0, UBYTE *, output, a0, BOOL, overwrite, d1, \ 20 | , DNETCGUI_BASE_NAME) 21 | 22 | #define dnetcguiHandleMsgs(signals) \ 23 | LP1(0x2a, ULONG, dnetcguiHandleMsgs, ULONG, signals, d0, \ 24 | , DNETCGUI_BASE_NAME) 25 | 26 | #define dnetcguiOpen(cpu, programname, iconify, vstring) \ 27 | LP4(0x1e, ULONG, dnetcguiOpen, ULONG, cpu, d0, UBYTE *, programname, a0, struct WBArg *, iconify, a1, const char *, vstring, a2, \ 28 | , DNETCGUI_BASE_NAME) 29 | 30 | #endif /* !_INLINE_DNETCGUI_H */ 31 | -------------------------------------------------------------------------------- /plat/win/w32pre.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Created by Cyrus Patel 7 | */ 8 | 9 | #ifndef __W32PRE_H__ 10 | #define __W32PRE_H__ "@(#)$Id: w32pre.h,v 1.2 2002/09/02 00:35:53 andreasb Exp $" 11 | 12 | int winGetMyModuleFilename(char *buffer,unsigned int len); 13 | 14 | int winGetInstanceShowCmd(void); /* get the nCmdShow */ 15 | int winGetInstanceArgc(void); /* argc */ 16 | char **winGetInstanceArgv(void); /* argv */ 17 | 18 | #ifdef _INC_WINDOWS 19 | HINSTANCE winGetInstanceHandle(void); /* get the client's instance handle */ 20 | HWND winGetParentWindow(void); 21 | void winSetSSMainVector(int (PASCAL *ssmain)(HINSTANCE,HINSTANCE,LPSTR,int)); 22 | 23 | /* this is the abstraction layer between WinMain() and realmain() */ 24 | int winClientPrelude(HINSTANCE hInstance, HINSTANCE hPrevInstance, 25 | LPSTR lpszCmdLine, int nCmdShow, int (*realmain)(int argc, char **argv)); 26 | #endif 27 | 28 | #endif /* __W32PRE_H__ */ 29 | -------------------------------------------------------------------------------- /common/mail.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __MAIL_H__ 8 | #define __MAIL_H__ "@(#)$Id: mail.h,v 1.23 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | extern void * smtp_construct_message( unsigned long sendthresh, 11 | const char *smtphost, unsigned int smtpport, 12 | const char *fromid, const char *destid, 13 | const char *rc5id ); 14 | extern int smtp_destruct_message( void *msghandle ); 15 | extern int smtp_deinitialize_message( void *msghandle ); 16 | extern int smtp_append_message( void *msghandle, const char *txt ); 17 | extern int smtp_send_message( void *msghandle ); /* if anything in spool */ 18 | extern int smtp_send_if_needed( void *msghandle ); /* if >= 90% of thresh */ 19 | extern int smtp_clear_message( void *msghandle ); 20 | extern unsigned long smtp_countspooled( void *msghandle ); 21 | 22 | #endif /* __MAIL_H__ */ 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/dcti/dnetc-client-base.svg?branch=master)](https://travis-ci.org/dcti/dnetc-client-base) 2 | 3 | disributed.net client (dnetc) public source framework 4 | =================================================== 5 | This source will only allow you to compile a harness for testing and benchmarking the performance of cores. 6 | It does not have the network or file buffer capabilities necessary to create a full client. 7 | 8 | Building 9 | -------- 10 | Ok, I just downloaded it, now what must I do? 11 | If you are on a Unix box, type "./configure list". It will show a list of supported targets. If your 12 | hardware/software isn't listed, look at how the configure script is made and write your own entry, 13 | it's not very hard. Once configure has created a Makefile for you, just type "make" and the whole 14 | thing will compile. 15 | 16 | If you are unlucky enough to not have access to the wonderfulness of Unix, you will have to look for a Makefile / Project file suitable for your machine. Look in makefile.vc (MS Visual C++), makefile.wat (Watcom for DOS, NetWare, Win16, OS/2, Win32cli), smakefile (Amiga), Platforms/beos/* (BeOS), make-vms.com (VMS). 17 | -------------------------------------------------------------------------------- /plat/amigaos/amVersion.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: amVersion.c,v 1.5 2008/12/30 20:58:44 andreasb Exp $ 7 | * 8 | * ---------------------------------------------------------------------- 9 | * AmigaOS version string/tag 10 | * ---------------------------------------------------------------------- 11 | */ 12 | 13 | #ifndef _AMIGA_VERSION_C 14 | #define _AMIGA_VERSION_C 15 | 16 | #include "version.h" 17 | #include "common/cputypes.h" 18 | 19 | #if (CLIENT_CPU == CPU_68K) 20 | const char *versionstring = "\0$VER: dnetc_68k " CLIENT_VERSIONSTRING " (" __AMIGADATE__ ")"; 21 | #elif (CLIENT_CPU == CPU_POWERPC) 22 | #if defined(__amigaos4__) || defined(__MORPHOS__) 23 | const char *versionstring = "\0$VER: dnetc " CLIENT_VERSIONSTRING " (" __AMIGADATE__ ")"; 24 | #else 25 | const char *versionstring = "\0$VER: dnetc_ppc " CLIENT_VERSIONSTRING " (" __AMIGADATE__ ")"; 26 | #endif 27 | #else 28 | #error "An AmigaOS machine with a different CPU ? Can't be right!" 29 | #endif 30 | 31 | #endif // _AMIGA_VERSION_C 32 | -------------------------------------------------------------------------------- /plat/win/msvcver.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Exit with ERRORLEVEL containing the major version number reported 4 | rem by the Microsoft CL compiler. 5 | rem This is useful for doing version-dependent behavior inside Makefiles. 6 | rem An exit value of 0 indicates no CL was found in the PATH. 7 | rem 8 | rem 12 = cl 12.00.xxxx = Visual Studio 6 (VC6/VC98) 9 | rem 13 = cl 13.00.xxxx = Visual Studio.NET 2002 (VC7.0) 10 | rem 13 = cl 13.10.xxxx = Visual Studio.NET 2003 (VC7.1) 11 | rem 14 = cl 14.00.xxxx = Visual Studio 2005 (VC8) 12 | rem 15 = cl 15.00.xxxx = Visual Studio 2008 (VC9) 13 | rem 16 = cl 16.00.xxxx = Visual Studio 2010 (VC10) 14 | rem 17 = cl 17.00.xxxx = Visual Studio 2012 (VC11) 15 | rem 18 = cl 18.00.xxxx = Visual Studio 2013 (VC12) 16 | rem 19 = cl 18.00.xxxx = Visual Studio 2015 (VC14) 17 | 18 | for %%i in (cl.exe) do if "%%~$PATH:i"=="" goto notfound 19 | 20 | set msvcversion= 21 | for /f "eol=. tokens=6-8 usebackq " %%i in (`cmd /c "cl.exe /D 2>&1 | findstr Version"`) do ( 22 | if "%%i"=="Version" set msvcversion=%%j 23 | if "%%j"=="Version" set msvcversion=%%k 24 | ) 25 | if "%msvcversion%"=="" goto notfound 26 | exit %msvcversion:~0,2% 27 | 28 | :notfound 29 | exit 0 30 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/ppcinline/dnetcgui.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not edit! */ 2 | 3 | #ifndef _PPCINLINE_DNETCGUI_H 4 | #define _PPCINLINE_DNETCGUI_H 5 | 6 | #ifndef __PPCINLINE_MACROS_H 7 | #include 8 | #endif /* !__PPCINLINE_MACROS_H */ 9 | 10 | #ifndef DNETCGUI_BASE_NAME 11 | #define DNETCGUI_BASE_NAME DnetcBase 12 | #endif /* !DNETCGUI_BASE_NAME */ 13 | 14 | #define dnetcguiClose(__p0) \ 15 | LP1(36, BOOL , dnetcguiClose, \ 16 | struct ClientGUIParams *, __p0, a0, \ 17 | , DNETCGUI_BASE_NAME, 0, 0, 0, 0, 0, 0) 18 | 19 | #define dnetcguiHandleMsgs(__p0) \ 20 | LP1(42, ULONG , dnetcguiHandleMsgs, \ 21 | ULONG , __p0, d0, \ 22 | , DNETCGUI_BASE_NAME, 0, 0, 0, 0, 0, 0) 23 | 24 | #define dnetcguiOpen(__p0, __p1, __p2, __p3) \ 25 | LP4(30, ULONG , dnetcguiOpen, \ 26 | ULONG , __p0, d0, \ 27 | UBYTE *, __p1, a0, \ 28 | struct WBArg *, __p2, a1, \ 29 | const char *, __p3, a2, \ 30 | , DNETCGUI_BASE_NAME, 0, 0, 0, 0, 0, 0) 31 | 32 | #define dnetcguiConsoleOut(__p0, __p1, __p2) \ 33 | LP3NR(48, dnetcguiConsoleOut, \ 34 | ULONG , __p0, d0, \ 35 | UBYTE *, __p1, a0, \ 36 | BOOL , __p2, d1, \ 37 | , DNETCGUI_BASE_NAME, 0, 0, 0, 0, 0, 0) 38 | 39 | #endif /* !_PPCINLINE_DNETCGUI_H */ 40 | -------------------------------------------------------------------------------- /ogr/ansi/ogrp2_corestate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1999-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ogrp2_corestate.h,v 1.1 2008/03/08 20:07:14 kakace Exp $ 7 | */ 8 | 9 | #ifndef ogrp2_corestate_H 10 | #define ogrp2_corestate_H 11 | 12 | #ifndef OGROPT_SPECIFIC_LEVEL_STRUCT 13 | struct Level { 14 | BMAP list[OGR_BITMAPS_WORDS]; 15 | BMAP dist[OGR_BITMAPS_WORDS]; 16 | BMAP comp[OGR_BITMAPS_WORDS]; 17 | int mark; 18 | int limit; 19 | }; 20 | #endif 21 | 22 | 23 | #ifndef OGROPT_SPECIFIC_STATE_STRUCT 24 | struct State { 25 | int max; /* maximum length of ruler */ 26 | int maxdepth; /* maximum number of marks in ruler */ 27 | int maxdepthm1; /* maxdepth-1 */ 28 | int half_length; /* half of max */ 29 | int half_depth; /* half of maxdepth */ 30 | int half_depth2; /* half of maxdepth, adjusted for 2nd mark */ 31 | int startdepth; 32 | int depth; 33 | struct Level Levels[MAXDEPTH]; 34 | int node_offset; /* node count cache for non-preemptive OS */ 35 | }; 36 | #endif 37 | 38 | #endif /* ogrp2_corestate_H */ 39 | -------------------------------------------------------------------------------- /plat/opencl/ocl_context.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2012-2016 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: 7 | */ 8 | 9 | #ifndef OCL_CONTEXT_INCLUDED 10 | #define OCL_CONTEXT_INCLUDED 11 | 12 | enum { 13 | CORE_NONE = 0, 14 | CORE_REF, 15 | CORE_1PIPE, 16 | CORE_2PIPE, 17 | CORE_4PIPE, 18 | CORE_CL_TOTAL 19 | }; 20 | 21 | typedef struct { 22 | u32 coreID; 23 | bool active; 24 | bool firstOnPlatform; // new platform started here (for logs) 25 | cl_platform_id platformID; // in OpenCL subsystem 26 | cl_device_id deviceID; // in OpenCL subsystem 27 | int clientDeviceNo; // client GPU index (for logs) 28 | cl_context clcontext; 29 | cl_command_queue cmdQueue; 30 | cl_mem const_buffer; 31 | cl_mem out_buffer; 32 | cl_program program; 33 | cl_kernel kernel; 34 | u32 runSize; 35 | u32 runSizeMultiplier; 36 | u32 maxWorkSize; 37 | } ocl_context_t; 38 | 39 | ocl_context_t *ocl_get_context(int device); 40 | 41 | #endif //OCL_CONTEXT_INCLUDED 42 | -------------------------------------------------------------------------------- /plat/dos/cdosidle.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Written by Cyrus Patel 8 | * 9 | */ 10 | #ifndef __CLIDOS_IDLE_H__ 11 | #define __CLIDOS_IDLE_H__ "@(#)$Id: cdosidle.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | #ifdef INCLUDING_CDOSIDLE_CPP 18 | #define __USLEEP_RET unsigned int 19 | #define __SLEEP_RET unsigned int 20 | #define __DELAY_RET unsigned int 21 | #elif defined(__WATCOMC__) 22 | #define __USLEEP_RET void 23 | #define __SLEEP_RET void 24 | #define __DELAY_RET void 25 | #else 26 | #define __USLEEP_RET unsigned int /* guess */ 27 | #define __SLEEP_RET unsigned int /* guess */ 28 | #define __DELAY_RET unsigned int /* guess */ 29 | #endif 30 | 31 | extern __DELAY_RET delay(unsigned int msecs); 32 | extern __USLEEP_RET usleep(unsigned int usecs); 33 | extern __SLEEP_RET sleep(unsigned int secs); 34 | 35 | #undef __USLEEP_RET 36 | #undef __SLEEP_RET 37 | #undef __DELAY_RET 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* __CLIDOS_IDLE_H__ */ 44 | -------------------------------------------------------------------------------- /plat/opencl/deviceid.cl: -------------------------------------------------------------------------------- 1 | //Get device ID based on cl_amd_predefined_macros extension (if available) 2 | //CORENAME=deviceid_src 3 | uint devID() 4 | { 5 | #if defined(__WinterPark__) 6 | return 5; 7 | #elif defined(__BeaverCreek__) 8 | return 6; 9 | #elif defined(__Turks__) 10 | return 7; 11 | #elif defined(__Caicos__) 12 | return 8; 13 | #elif defined(__Tahiti__) 14 | return 9; 15 | #elif defined(__Pitcairn__) 16 | return 10; 17 | #elif defined(__Capeverde__) 18 | return 11; 19 | #elif defined(__Cayman__) 20 | return 12; 21 | #elif defined(__Barts__) 22 | return 13; 23 | #elif defined(__Cypress__) 24 | return 14; 25 | #elif defined(__Juniper__) 26 | return 15; 27 | #elif defined(__Redwood__) 28 | return 16; 29 | #elif defined(__Cedar__) 30 | return 17; 31 | #elif defined(__ATI_RV770__) 32 | return 18; 33 | #elif defined(__ATI_RV730__) 34 | return 19; 35 | #elif defined(__ATI_RV710__) 36 | return 20; 37 | #elif defined(__Loveland__) 38 | return 21; 39 | #elif defined(__GPU__) 40 | return 1; 41 | #elif defined(__X86__) 42 | return 2; 43 | #elif defined(__X86_64__) 44 | return 3; 45 | #elif defined(__CPU__) 46 | return 4; 47 | #endif 48 | 49 | return 0; 50 | } 51 | 52 | __kernel void deviceID(__global uint *outbuf) 53 | { 54 | outbuf[0] = devID(); 55 | } -------------------------------------------------------------------------------- /plat/amigaos/guilib/dnetcgui.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | dnetcgui.h 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /plat/netware/misc/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Watcom makefile for watcom clib stub-out 3 | # 4 | # $Id: makefile,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 5 | # 6 | 7 | objlst = nwwatemu.obj nwpre3x.obj 8 | target = nwwatemu.lib #clib3s.lib 9 | 10 | wcc386 = wcc386 11 | wpp386 = wpp386 12 | 13 | !define p_wcc386opt /ms /wx /we /s /zp1 /5s /zl /zld /fpi87 /os 14 | !define p_asm386opt /ms /we /3s /fpi87 15 | 16 | cc_compiler_cmd = $(wcc386) $(p_wcc386opt) /dN_PLAT_NLM /dN_IAPX386 $[*.c 17 | pp_compiler_cmd = $(wpp386) $(p_wcc386opt) /dN_PLAT_NLM /dN_IAPX386 $[*.cpp 18 | assembler_cmd = wasm.exe $(p_asm386opt) $[*.asm 19 | 20 | .BEFORE 21 | @set inc386=$(inc_386) 22 | @set include=$(inc_386) 23 | @set lib386=$(lib_386) 24 | @set wcg386=$(code_386) 25 | 26 | rebuild: .symbolic 27 | #always rebuild the whole library 28 | @for %i in ($(objlst)) do @if exist %i @del %i 29 | %make $(target) 30 | 31 | .asm.obj: 32 | $(assembler_cmd) 33 | @wlib.exe -b -q -t $(target) -+ $[*.obj 34 | 35 | .c.obj: 36 | $(cc_compiler_cmd) 37 | @wlib.exe -b -q -t $(target) -+ $[*.obj 38 | 39 | .cpp.obj 40 | $(pp_compiler_cmd) 41 | @wlib.exe -b -q -t $(target) -+ $[*.obj 42 | 43 | $(target) : $(objlst) 44 | @for %i in ($(objlst)) do @if exist %i @del %i 45 | -------------------------------------------------------------------------------- /common/random.h: -------------------------------------------------------------------------------- 1 | // Hey, Emacs, this a -*-C++-*- file ! 2 | // 3 | // Copyright distributed.net 1997-2008 - All Rights Reserved 4 | // For use in distributed.net projects only. 5 | // Any other distribution or use of this source violates copyright. 6 | // 7 | // ---------------------------------------------------------------- 8 | // Random(const u32 *u32data, unsigned int u32count) is similar to 9 | // the standard C rand(), but returns a u32 (vs rand()'s 15/31/63 bits), 10 | // and it seeds itself. It can also slightly mangles the seed with data. 11 | // ---------------------------------------------------------------- 12 | 13 | #include "cputypes.h" /* for u32 */ 14 | 15 | #ifndef __RANDOM_H__ 16 | #define __RANDOM_H__ "@(#)$Id: random.h,v 1.13 2008/12/30 20:58:42 andreasb Exp $" 17 | 18 | u32 Random( const u32 * u32data, unsigned int u32count ); 19 | // count = # of u32s of data... 20 | // calling it with ( NULL, 0 ) is OK... 21 | // calls InitRandom() and/or InitRandom2() if they haven't been called yet 22 | // Returns: a random u32, mangled slightly with data... 23 | 24 | void InitRandom(void); 25 | // Initialize random number generator (added 12.15.97) 26 | 27 | void InitRandom2(const char *p); 28 | // Initialize random number generator, using string p to 29 | // influence seed value. 30 | 31 | #endif /* __RANDOM_H__ */ 32 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/inline/dnetcguippc.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not edit! */ 2 | 3 | #ifndef _PPCINLINE_DNETCGUI_H 4 | #define _PPCINLINE_DNETCGUI_H 5 | 6 | #ifndef __PPCINLINE_MACROS_H 7 | #include 8 | #endif /* !__PPCINLINE_MACROS_H */ 9 | 10 | #ifndef DNETCGUI_BASE_NAME 11 | #define DNETCGUI_BASE_NAME DnetcBase 12 | #endif /* !DNETCGUI_BASE_NAME */ 13 | 14 | #define dnetcguiClose(params) \ 15 | LP1(0x24, BOOL, dnetcguiClose, struct ClientGUIParams *, params, a0, \ 16 | , DNETCGUI_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0) 17 | 18 | #define dnetcguiConsoleOut(cpu, output, overwrite) \ 19 | LP3NR(0x30, dnetcguiConsoleOut, ULONG, cpu, d0, UBYTE *, output, a0, BOOL, overwrite, d1, \ 20 | , DNETCGUI_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0) 21 | 22 | #define dnetcguiHandleMsgs(signals) \ 23 | LP1(0x2a, ULONG, dnetcguiHandleMsgs, ULONG, signals, d0, \ 24 | , DNETCGUI_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0) 25 | 26 | #define dnetcguiOpen(cpu, programname, iconify, vstring) \ 27 | LP4(0x1e, ULONG, dnetcguiOpen, ULONG, cpu, d0, UBYTE *, programname, a0, struct WBArg *, iconify, a1, const char *, vstring, a2, \ 28 | , DNETCGUI_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0) 29 | 30 | #endif /* !_PPCINLINE_DNETCGUI_H */ 31 | -------------------------------------------------------------------------------- /ogr/ansi/ogrng_corestate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1999-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ogrng_corestate.h,v 1.1 2008/03/09 13:22:34 kakace Exp $ 7 | */ 8 | 9 | #ifndef ogrng_corestate_H 10 | #define ogrng_corestate_H 11 | 12 | #ifndef OGROPT_SPECIFIC_LEVEL_STRUCT 13 | /* 14 | ** Level datas. 15 | */ 16 | struct OgrLevel { 17 | BMAP list[OGRNG_BITMAPS_WORDS]; 18 | BMAP dist[OGRNG_BITMAPS_WORDS]; 19 | BMAP comp[OGRNG_BITMAPS_WORDS]; 20 | int mark; 21 | int limit; 22 | }; 23 | #endif 24 | 25 | 26 | #ifndef OGROPT_SPECIFIC_STATE_STRUCT 27 | /* 28 | ** Full state. 29 | */ 30 | struct OgrState { 31 | int max; /* Maximum length of the ruler */ 32 | int maxdepth; /* maximum number of marks in ruler */ 33 | int maxdepthm1; /* maxdepth-1 */ 34 | int half_depth; /* half of maxdepth */ 35 | int half_depth2; /* half of maxdepth, adjusted for 2nd mark */ 36 | int startdepth; /* Initial depth */ 37 | int stopdepth; /* May be lower than startdepth */ 38 | int depth; /* Current depth */ 39 | struct OgrLevel Levels[OGR_MAXDEPTH]; 40 | }; 41 | #endif 42 | 43 | #endif /* ogrng_corestate_H */ 44 | -------------------------------------------------------------------------------- /plat/netware/netware.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Catch-all header file for the distributed.net client for NetWare 7 | * written by Cyrus Patel 8 | * 9 | * $Id: netware.h,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 10 | */ 11 | 12 | #ifndef __NETWARE_CLIENT_H__ 13 | #define __NETWARE_CLIENT_H__ 14 | 15 | #include "nwlemu.h" /* kernel/clib portability stubs */ 16 | #include "nwlcomp.h" /* ANSI/POSIX compatibility functions */ 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | #include /* emulation library for */ 22 | extern void __MPKDelayThread( unsigned int millisecs ); 23 | extern int __MPKSetThreadAffinity( int cpunum ); 24 | extern int __MPKEnableThreadPreemption( void ); 25 | extern int __MPKDisableThreadPreemption( void ); 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #include "nwccons.h" /* client console management */ 31 | #include "nwcmisc.h" /* misc other functions called from client code */ 32 | #include "nwcconf.h" /* client-for-netware specific configuration options */ 33 | 34 | #if defined(HAVE_POLLPROC_SUPPORT) 35 | #include "nwcpprun.h" 36 | #endif 37 | 38 | #endif /* __NETWARE_CLIENT_H__ */ 39 | -------------------------------------------------------------------------------- /ogr/x86/ogr-a.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2001-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Wrapper around ogr.cpp for all processor WITH a fast bsr instruction. 7 | * (ie, PPro, PII, PIII) 8 | * 9 | * $Id: ogr-a.cpp,v 1.8 2008/12/30 20:58:44 andreasb Exp $ 10 | */ 11 | 12 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table 13 | 14 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - '100% asm' */ 15 | #ifdef __WATCOMC__ 16 | /* "imul reg,constant" look faster */ 17 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'yes' (default) */ 18 | #else 19 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 1 /* 0/1 - 'yes' (default) */ 20 | #endif 21 | 22 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 23 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 24 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 25 | 26 | #ifdef __WATCOMC__ 27 | /* Have assembly routine */ 28 | #define OGROPT_ALTERNATE_COMP_LEFT_LIST_RIGHT 1 /* 0/1 - 'std' (default) */ 29 | #else 30 | #define OGROPT_ALTERNATE_COMP_LEFT_LIST_RIGHT 0 /* 0/1 - 'std' (default) */ 31 | #endif 32 | 33 | #include "asm-x86-p2.h" 34 | #include "ansi/ogrp2-32.h" 35 | #include "ansi/ogrp2_codebase.cpp" 36 | -------------------------------------------------------------------------------- /plat/netware/inet/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Watcom makefile for tcpip.nlm and netdb.nlm replacements 3 | # (ie, things that should have been in clib/resolv, but aren't) 4 | # 5 | # $Id: makefile,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 6 | # 7 | 8 | objlst = nhtohnls.obj in_aton.obj in_ntoa.obj in_makea.obj & 9 | in_netof.obj in_lnaof.obj hostname.obj hbyname.obj 10 | target = inetlib.lib 11 | 12 | wcc386 = wcc386 13 | wpp386 = wpp386 14 | 15 | !define p_wcc386opt /ms /wx /we /s /zp1 /5s /zl /zld /fpi87 /os 16 | !define p_asm386opt /ms /we /3s /fpi87 17 | 18 | cc_compiler_cmd = $(wcc386) $(p_wcc386opt) /dN_PLAT_NLM /dN_IAPX386 $[*.c 19 | pp_compiler_cmd = $(wpp386) $(p_wcc386opt) /dN_PLAT_NLM /dN_IAPX386 $[*.cpp 20 | assembler_cmd = wasm.exe $(p_asm386opt) $[*.asm 21 | 22 | .BEFORE 23 | @set inc386=$(inc_386) 24 | @set include=$(inc_386) 25 | @set lib386=$(lib_386) 26 | @set wcg386=$(code_386) 27 | 28 | rebuild: .symbolic 29 | #always rebuild the whole library 30 | %make $(target) 31 | 32 | .asm.obj: 33 | $(assembler_cmd) 34 | @wlib.exe -b -q -t $(target) -+ $[*.obj 35 | 36 | .c.obj: 37 | $(cc_compiler_cmd) 38 | @wlib.exe -b -q -t $(target) -+ $[*.obj 39 | 40 | .cpp.obj 41 | $(pp_compiler_cmd) 42 | @wlib.exe -b -q -t $(target) -+ $[*.obj 43 | 44 | $(target) : $(objlst) 45 | @for %i in ($(objlst)) do @if exist %i @del %i 46 | -------------------------------------------------------------------------------- /plat/riscos/riscos_sup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * By Kevin Bracey and Chris Berry 7 | * 8 | * $Id: riscos_sup.h,v 1.8 2008/12/30 20:58:44 andreasb Exp $ 9 | */ 10 | #ifndef __RISCOS_SUP_H__ 11 | #define __RISCOS_SUP_H__ 12 | 13 | //#include "riscos_x86.h" 14 | #include "riscos_asm.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | int riscos_check_taskwindow(void); 21 | //static const char *riscos_x86_ident(void); 22 | static unsigned int riscos_hsleep(unsigned long hsecs); 23 | //const char *riscos_x86_determine_name(void); 24 | int riscos_count_cpus(void); 25 | void riscos_clear_screen(void); 26 | void riscos_backspace(void); 27 | static const char *riscos_get_local_directory(const char *appname); 28 | const char *riscos_localise_filename(const char *filename); 29 | int riscos_find_local_directory(const char *progname); 30 | int riscos_versioncode(void); 31 | char *riscos_version(void); 32 | 33 | //unsigned int sleep(unsigned int s); /* unistd replacement */ 34 | //void usleep(unsigned int us); /* unistd replacement */ 35 | //void sched_yield(void); /* if (riscos_check_taskwindow()) riscos_upcall_6(); */ 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif /* __RISCOS_SUP_H__ */ 42 | -------------------------------------------------------------------------------- /ogr/x86/ogr-b.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2001-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Wrapper around ogr.cpp for all processor WITHOUT a fast bsr instruction. 7 | * (ie, 386, 486, Pentium, P4, K5, K6, K7, Cyrix(all), etc) 8 | * 9 | * $Id: ogr-b.cpp,v 1.8 2008/12/30 20:58:44 andreasb Exp $ 10 | */ 11 | 12 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table_nobsr 13 | 14 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 15 | #ifdef __WATCOMC__ 16 | /* "imul reg,constant" look faster */ 17 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'yes' (default) */ 18 | #else 19 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 1 /* 0/1 - 'yes' (default) */ 20 | #endif 21 | 22 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 23 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 24 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 25 | 26 | #ifdef __WATCOMC__ 27 | /* Have assembly routine */ 28 | #define OGROPT_ALTERNATE_COMP_LEFT_LIST_RIGHT 1 /* 0/1 - 'std' (default) */ 29 | #else 30 | #define OGROPT_ALTERNATE_COMP_LEFT_LIST_RIGHT 0 /* 0/1 - 'std' (default) */ 31 | #endif 32 | 33 | #include "asm-x86-p2.h" 34 | #include "ansi/ogrp2-32.h" 35 | #include "ansi/ogrp2_codebase.cpp" 36 | -------------------------------------------------------------------------------- /plat/netware/what-is-what.txt: -------------------------------------------------------------------------------- 1 | 2 | $Id: what-is-what.txt,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 3 | 4 | The platforms/NetWare directory consists of... 5 | 6 | client.xdc The 'bagfile'. Created with mpkxdc -n 7 | (all threads are MT safe, and can run on any available CPU) 8 | 9 | obsolete.cpp This is the client for NetWare code July/1998 10 | 11 | ./inet/ stubs for functions in TCPIP.NLM and NETDB.NLM 12 | gethostname, inet_addr/network/aton/etc, 13 | gethostby[name|addr] 14 | 15 | ./misc/ custom prelude and Watcom static clib avoidance stubs 16 | nwpre3x.c The coolest replacement for prelude.c :) 17 | nwwatemu.c Avoid gunk, er, I mean "Watcom CLIB3S.LIB" 18 | 19 | ./nwl*.* library stubs/replacements 20 | nwlemu.c NetWare specific kernel/CLIB calls not 21 | available on all NetWare versions 22 | nwmpk.c stubs/emulation for MPK* API first introduced 23 | with NetWare 5.x 24 | nwlcomp.c misc ANSI/POSIX functions not available (or 25 | poorly implemented). ftime(), usleep(), etc. 26 | 27 | ./nwc*.* functions called from the client's common code 28 | nwccons.c Console management stuff 29 | nwcconf.c Read-in client-for-netware specific settings 30 | nwcmisc.c Everything else (mostly short) 31 | -------------------------------------------------------------------------------- /ogr/ppc/asm-ppc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1999-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | */ 6 | 7 | #ifndef __ASM_PPC_H__ 8 | #define __ASM_PPC_H__ "@(#)$Id: asm-ppc.h,v 1.5 2008/12/30 20:58:43 andreasb Exp $" 9 | 10 | #if defined(__GNUC__) /*================================================*/ 11 | 12 | #if defined(ASM_POWER) 13 | #define __CNTLZ__(i) ({ int x; __asm__ ("cntlz %0,%0" : "=r" (x) : "0" (i)); x;}) 14 | #elif (SCALAR_BITS == 64) && defined(__ppc64__) 15 | #define __CNTLZ__(i) ({ int x; __asm__ ("cntlzd %0,%1" : "=r" (x) : "0" (i)); x;}) 16 | #elif defined(ASM_PPC) || defined(__PPC__) || defined(__POWERPC__) 17 | #define __CNTLZ__(i) ({ int x; __asm__ ("cntlzw %0,%1" : "=r" (x) : "0" (i)); x;}) 18 | #endif 19 | 20 | #if defined(__APPLE_CC__) 21 | #define __BALIGN __asm__ __volatile__ (".align 4"::) 22 | #elif !defined(_AIX) 23 | #define __BALIGN __asm__ __volatile__ (" .balignl 32,0x60000000"; nop; nop : : ) 24 | #endif 25 | 26 | #elif defined(__xlC__) /*================================================*/ 27 | 28 | #include 29 | #define __CNTLZ__(x) __cntlz4(x) 30 | 31 | #elif defined(__MWERKS__) /*================================================*/ 32 | 33 | #define __CNTLZ__(x) __cntlzw(x) 34 | 35 | #endif /* compiler */ 36 | 37 | #endif /* __ASM_PPC_H__ */ 38 | -------------------------------------------------------------------------------- /ogr/test-stubspace.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "stubsplit.h" 5 | 6 | int marks, depth, threshold; 7 | int stubsx; 8 | long long stubs; 9 | 10 | int callback(void *userdata, struct Stub *stub) 11 | { 12 | if (stub->length < depth) { 13 | stub_split(stub, callback, 0); 14 | } else { 15 | if (threshold > 0) { 16 | int t = 0; 17 | for (int i = 0; i < stub->length; i++) { 18 | t += stub->diffs[i]; 19 | } 20 | if (t > threshold) { 21 | return 1; 22 | } 23 | } 24 | stubsx++; 25 | if (stubsx == 1000000) { 26 | stubs += stubsx; 27 | stubsx = 0; 28 | printf("\033[K%d %d %Ld...", marks, depth, stubs); 29 | for (int i = 0; i < stub->length; i++) { 30 | printf("%d ", stub->diffs[i]); 31 | } 32 | printf("\r"); 33 | fflush(stdout); 34 | } 35 | } 36 | return 1; 37 | } 38 | 39 | int main(int argc, char *argv[]) 40 | { 41 | if (argc < 3) { 42 | printf("Usage: test-stubsplit marks depth [threshold]\n"); 43 | return 1; 44 | } 45 | 46 | marks = atoi(argv[1]); 47 | depth = atoi(argv[2]); 48 | if (argc >= 4) { 49 | threshold = atoi(argv[3]); 50 | } 51 | 52 | struct Stub stub; 53 | stub.marks = marks; 54 | stub.length = 0; 55 | stubs = 0; 56 | stub_split(&stub, callback, 0); 57 | stubs += stubsx; 58 | printf("\033[K%d %d %Ld\n", marks, depth, stubs); 59 | 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /plat/netware/inet/in_netof.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Classification: arpa 3 | * Service: Internet Network Library 4 | * Author: Cyrus Patel 5 | * Copyright: none 6 | * 7 | * $Log: in_netof.c,v $ 8 | * Revision 1.2 2002/09/02 00:35:51 andreasb 9 | * sync: merged changes from release-2-7111 branch between 10 | * 2000-07-11 and release-2-7111_20020901 into trunk 11 | * 12 | * Revision 1.1.2.1 2001/01/21 15:10:30 cyp 13 | * restructure and discard of obsolete elements 14 | * 15 | * Revision 1.1.2.1 1999/11/14 20:44:22 cyp 16 | * all new 17 | * 18 | * 19 | */ 20 | 21 | #if defined(__showids__) 22 | const char *in_netof_c(void) { 23 | return "$Id: in_netof.c,v 1.2 2002/09/02 00:35:51 andreasb Exp $"; } 24 | #endif 25 | 26 | 27 | #include /* struct in_addr */ 28 | #include /* inet_netof() */ 29 | 30 | 31 | unsigned long inet_netof( struct in_addr inaddr ) 32 | { 33 | unsigned long i = (((unsigned long)(inaddr.S_un.S_un_b.s_b4)) ) | 34 | (((unsigned long)(inaddr.S_un.S_un_b.s_b3)) << 8) | 35 | (((unsigned long)(inaddr.S_un.S_un_b.s_b2)) << 16) | 36 | (((unsigned long)(inaddr.S_un.S_un_b.s_b1)) << 24); 37 | if (((long)(i) & 0x80000000) == 0) 38 | i = (i & 0xff000000UL) >> 24; 39 | else if (((long)(i) & 0xc0000000) == 0x80000000) 40 | i = (i & 0xffff0000UL) >> 16; 41 | else 42 | i = (i & 0xffffff00UL) >> 8; 43 | return i; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /plat/win/w32util.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Created by Cyrus Patel 8 | */ 9 | 10 | #ifndef __W32UTIL_H__ 11 | #define __W32UTIL_H__ "@(#)$Id: w32util.h,v 1.2 2002/09/02 00:35:53 andreasb Exp $" 12 | 13 | #ifdef _INC_WINDOWS 14 | /* ScreenSaver boot vector (initialized from w32ss.cpp if linked) */ 15 | extern int (PASCAL *__SSMAIN)(HINSTANCE,HINSTANCE,LPSTR,int); 16 | #endif 17 | 18 | /* get DOS style version: (major*100)+minor. major is >=20 if NT */ 19 | extern long winGetVersion(void); 20 | 21 | /* Table of Windows OSes and their version numbers returned by 22 | GetVersionEx() and winGetVersion(): 23 | 24 | OS dwMajorVersion.dwMinorVersion winGetVersion() 25 | Windows 3.x ?.? 3?? ??? 26 | Windows 95 4.0 400 27 | Windows 98 4.10 410 28 | Windows Me 4.90 490 29 | Windows NT 3.51 3.51 2351 30 | Windows NT 4.0 4.0 2400 31 | Windows 2000 5.0 2500 32 | Windows XP 5.1 2510 33 | Windows .NET Server 5.1 2510 ??? 34 | 35 | */ 36 | 37 | #endif /* __W32UTIL_H__ */ 38 | -------------------------------------------------------------------------------- /ogr/alpha/ev67.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | 8 | #include "ansi/ogrp2-32.h" 9 | 10 | 11 | const char *ogr_ev67_cpp(void) { 12 | return "@(#)$Id: ev67.cpp,v 1.7 2008/12/30 20:58:43 andreasb Exp $"; } 13 | 14 | #if defined(__GNUC__) 15 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - "100% asm" */ 16 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 17 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 18 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 19 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 20 | #else /* Compaq CC */ 21 | #include 22 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - "100% asm" */ 23 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 24 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 25 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 26 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 27 | #endif 28 | 29 | #define ALPHA_CIX 30 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table_cix 31 | 32 | #include "baseincs.h" //for endian detection 33 | #include "alpha/alpha-asm.h" 34 | #include "ansi/ogrp2_codebase.cpp" 35 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/Makefile.os4: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for dnetcgui.library 3 | # 4 | 5 | TARGET = ../../../dnetcgui.library 6 | 7 | # 8 | ## 9 | # 10 | 11 | CC = ppc-amigaos-gcc 12 | RM = delete 13 | STRIP = ppc-amigaos-strip -R.comment 14 | 15 | CFLAGS = -O2 -fomit-frame-pointer -fno-exceptions -fstrict-aliasing -I. -I../../../plat/amigaos -D__USE_INLINE__ -D__USE_BASETYPE__ -mcrt=clib2-ts 16 | LDFLAGS = -nostartfiles -mcrt=clib2-ts 17 | LDLIBS = 18 | OBJDIR = ../../../output 19 | OBJS = $(OBJDIR)/LibBase.o $(OBJDIR)/main.o $(OBJDIR)/prefs.o $(OBJDIR)/dnetcgui_68k.o 20 | 21 | # 22 | # target 23 | # 24 | 25 | $(TARGET): $(OBJS) 26 | $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) 27 | $(STRIP) $@ 28 | 29 | $(OBJDIR)/LibBase.o: LibBase.c common.h dnetcgui_rev.h 30 | $(CC) $(CFLAGS) -o $@ -c $< 31 | 32 | $(OBJDIR)/main.o: main.c common.h main.h prefs.h 33 | $(CC) $(CFLAGS) -o $@ -c $< 34 | 35 | $(OBJDIR)/prefs.o: prefs.c common.h main.h prefs.h 36 | $(CC) $(CFLAGS) -o $@ -c $< 37 | 38 | $(OBJDIR)/dnetcgui_68k.o: dnetcgui_68k.c 39 | $(CC) $(CFLAGS) -o $@ -c $< 40 | 41 | dnetcgui_68k.c: fd/dnetcgui_lib.sfd 42 | fdtrans $< -c 43 | 44 | includes: fd/dnetcgui_lib.fd clib/dnetcgui_protos.h 45 | fd2inline fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > inline/dnetcgui.h 46 | # fd2inline -proto fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > proto/dnetcgui.h 47 | fd2inline_ -powerup fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > inline/dnetcguippc.h 48 | # fd2inline -powerup -proto fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > proto/dnetcguippc.h 49 | -------------------------------------------------------------------------------- /ogr/alpha/ev4.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | 8 | #include "ansi/ogrp2-32.h" 9 | 10 | #error Fixme: Obsolete file. Merged into ogrp2-32.cpp 11 | 12 | 13 | const char *ogr_ev4_cpp(void) { 14 | return "@(#)$Id: ev4.cpp,v 1.5 2008/12/30 20:58:43 andreasb Exp $"; } 15 | 16 | #if defined(__GNUC__) 17 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 18 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 19 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 20 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 21 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 22 | #else /* Compaq CC */ 23 | #include 24 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 25 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 26 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 27 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 28 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 29 | #endif 30 | 31 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table_ev4 32 | 33 | #include "baseincs.h" //for endian detection 34 | #include "alpha/alpha-asm.h" 35 | #include "ansi/ogrp2_codebase.cpp" 36 | -------------------------------------------------------------------------------- /ogr/ansi/ogrp2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1999-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | #ifndef __OGRP2_H__ 8 | #define __OGRP2_H__ "@(#)$Id: ogrp2.h,v 1.4 2008/03/08 20:18:31 kakace Exp $" 9 | 10 | #include "ansi/ogr-interface.h" 11 | 12 | /* ===================================================================== */ 13 | 14 | #define OGR_BITMAPS_LENGTH 160 15 | 16 | 17 | /* specifies the number of ruler diffs can be represented. 18 | ** Warning: increasing this will cause all structures based 19 | ** on workunit_t in packets.h to change, possibly breaking 20 | ** network and buffer structure operations. 21 | */ 22 | #define STUB_MAX 10 23 | #define MAXDEPTH 30 24 | 25 | #ifndef __SUNPRO_CC 26 | #include "pack1.h" 27 | #else 28 | #undef DNETC_PACKED 29 | #define DNETC_PACKED 30 | #endif 31 | 32 | struct Stub { /* size is 24 */ 33 | u16 marks; /* N-mark ruler to which this stub applies */ 34 | u16 length; /* number of valid elements in the stub[] array */ 35 | u16 diffs[STUB_MAX]; /* first differences in ruler */ 36 | } DNETC_PACKED; 37 | 38 | struct WorkStub { /* size is 28 */ 39 | struct Stub stub; /* stub we're working on */ 40 | u32 worklength; /* depth of current state */ 41 | } DNETC_PACKED; 42 | 43 | #ifndef __SUNPRO_CC 44 | #include "pack0.h" 45 | #else 46 | #undef DNETC_PACKED 47 | #endif 48 | 49 | 50 | #endif /* __OGRP2_H__ */ 51 | 52 | -------------------------------------------------------------------------------- /plat/win/w32ini.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Created by Cyrus Patel 8 | */ 9 | 10 | #ifndef __W32CONF_H__ 11 | #define __W32CONF_H__ "@(#)$Id: w32ini.h,v 1.2 2002/09/02 00:35:53 andreasb Exp $" 12 | 13 | /* the next four funcs follow the same format at [Get|Write]ProfileString(). 14 | For win32 (registry) HKLM\SoftWare\D C T I\sect.key = value 15 | For win16 (win.ini) [D C T I]sect.key = value 16 | ('D C T I' expands to "Distributed Computing Technologies, Inc.") 17 | 'sect' is optional. If NULL or "", the format becomes key=value. 18 | */ 19 | extern int WriteDCTIProfileString( const char *sect, const char *key, 20 | const char *val); 21 | extern unsigned int GetDCTIProfileString(const char *sect, const char *key, 22 | const char *defaultval, char *buf, 23 | unsigned int bufsize ); 24 | extern int WriteDCTIProfileInt(const char *sect, const char *entry, 25 | int val ); 26 | extern int GetDCTIProfileInt(const char *sect, const char *entry, 27 | int defaultval); 28 | 29 | /* use something other than "Distributed Computing Technologies, Inc." */ 30 | extern const char *SetDCTIProfileContext(const char *ctx); 31 | 32 | #endif /* __W32CONF_H__ */ 33 | -------------------------------------------------------------------------------- /plat/netware/inet/in_lnaof.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Classification: arpa 3 | * Service: Internet Network Library 4 | * Copyright: none 5 | * Author: Cyrus Patel 6 | * 7 | * $Log: in_lnaof.c,v $ 8 | * Revision 1.2 2002/09/02 00:35:51 andreasb 9 | * sync: merged changes from release-2-7111 branch between 10 | * 2000-07-11 and release-2-7111_20020901 into trunk 11 | * 12 | * Revision 1.1.2.1 2001/01/21 15:10:30 cyp 13 | * restructure and discard of obsolete elements 14 | * 15 | * Revision 1.1.2.1 1999/11/14 20:44:22 cyp 16 | * all new 17 | * 18 | * 19 | */ 20 | 21 | #if defined(__showids__) 22 | const char *in_lnaof_c(void) { 23 | return "$Id: in_lnaof.c,v 1.2 2002/09/02 00:35:51 andreasb Exp $"; } 24 | #endif 25 | 26 | #include /* struct in_addr */ 27 | #include /* inet_lnaof() */ 28 | 29 | /* 30 | * inet_lnaof( struct in_addr ) return the local network address part 31 | * of an internet address. 32 | */ 33 | 34 | 35 | unsigned long inet_lnaof( struct in_addr inaddr ) 36 | { 37 | unsigned long i = (((unsigned long)(inaddr.S_un.S_un_b.s_b4)) ) | 38 | (((unsigned long)(inaddr.S_un.S_un_b.s_b3)) << 8) | 39 | (((unsigned long)(inaddr.S_un.S_un_b.s_b2)) << 16) | 40 | (((unsigned long)(inaddr.S_un.S_un_b.s_b1)) << 24); 41 | if (((long)(i) & 0x80000000) == 0) 42 | i &= 0x00ffffffUL; 43 | else if (((long)(i) & 0xc0000000) == 0x80000000) 44 | i &= 0x0000ffffUL; 45 | else 46 | i &= 0x000000ffUL; 47 | return i; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/Support.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2004-2005 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: Support.h,v 1.2 2007/10/22 16:48:30 jlawson Exp $ 7 | * 8 | * Created by Ilkka Lehtoranta 9 | * 10 | * ---------------------------------------------------------------------- 11 | * MUI GUI module for MorphOS client - MUI application class code 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #ifndef __SUPPORT_H__ 16 | #define __SUPPORT_H__ 17 | 18 | static inline BYTE strncmp(CONST_STRPTR a, CONST_STRPTR b, ULONG length) 19 | { 20 | BYTE c = 0; 21 | 22 | while (length) 23 | { 24 | c = *a++ - *b++; 25 | length--; 26 | 27 | if (c != 0) 28 | break; 29 | } 30 | 31 | return c; 32 | } 33 | 34 | static inline ULONG strlen(const char *str) 35 | { 36 | ULONG len = 0; 37 | 38 | for (;;) 39 | { 40 | if (*str++ == '\0') 41 | break; 42 | 43 | len++; 44 | } 45 | 46 | return len; 47 | } 48 | 49 | static inline void strcpy(char *dst, const char *src) 50 | { 51 | UBYTE c; 52 | 53 | do 54 | { 55 | c = *src++; 56 | *dst++ = c; 57 | } 58 | while (c); 59 | } 60 | 61 | static inline void strncpy(char *dst, const char *src, ULONG max) 62 | { 63 | UBYTE c; 64 | 65 | for (;;) 66 | { 67 | max--; 68 | 69 | if ((max == 0) || ((c = *src++) == 0)) 70 | break; 71 | 72 | *dst++ = c; 73 | } 74 | 75 | *dst = '\0'; 76 | } 77 | 78 | #endif /* __SUPPORT_H__ */ 79 | -------------------------------------------------------------------------------- /plat/cuda/cuda_core_count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2014 - All rights reserved. 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: cuda_core_count.h,v 1.0 2014/02/25 22:19:04 ertyu Exp $ 7 | */ 8 | 9 | #ifndef CUDA_CORE_COUNT_H 10 | #define CUDA_CORE_COUNT_H 11 | 12 | // Number of cores per MP (varies with SM version) 13 | // from NVIDIA CUDA SDK sample code 'deviceQuery' 14 | // http://docs.nvidia.com/cuda/cuda-samples/index.html#device-query 15 | typedef struct 16 | { 17 | int SM; // 0xMm (hexidecimal notation) 18 | // M = SM Major version, m = SM minor version 19 | int Cores; 20 | } sSMtoCores; 21 | sSMtoCores CUDACoresPerSM[] = 22 | { 23 | { 0x10, 8 }, // Tesla Generation (SM 1.0) G80 class 24 | { 0x11, 8 }, // Tesla Generation (SM 1.1) G8x class 25 | { 0x12, 8 }, // Tesla Generation (SM 1.2) G9x class 26 | { 0x13, 8 }, // Tesla Generation (SM 1.3) GT200 class 27 | { 0x20, 32 }, // Fermi Generation (SM 2.0) GF100 class 28 | { 0x21, 48 }, // Fermi Generation (SM 2.1) GF10x class 29 | { 0x30, 192}, // Kepler Generation (SM 3.0) GK10x class 30 | { 0x35, 192}, // Kepler Generation (SM 3.5) GK11x class 31 | { -1, -1 } 32 | }; 33 | 34 | inline int getCUDACoresPerSM (int major, int minor) 35 | { 36 | int index = 0; 37 | int SM = (major << 4) + minor; 38 | 39 | while (CUDACoresPerSM[index].SM != -1) { 40 | if (CUDACoresPerSM[index].SM == SM ) { 41 | return CUDACoresPerSM[index].Cores; 42 | } 43 | index++; 44 | } 45 | return -1; 46 | } 47 | 48 | #endif // CUDA_CORE_COUNT_H 49 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/prefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: prefs.h,v 1.3 2007/10/22 16:48:30 jlawson Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * ReAction GUI module for AmigaOS clients 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #define PREFSFLAG_STARTICONIFIED 0x01 16 | #define PREFSFLAG_SHOWCONTITLES 0x02 17 | #define PREFSFLAG_SHOWICON 0x04 18 | #define PREFSFLAG_SHOWMENU 0x08 19 | #define PREFSFLAG_SNAPSHOT 0x10 20 | 21 | #define PREFSFLAGMASK ~0x1f 22 | 23 | #define FLAGTOBOOL(flags,flag) ((flags & flag) == flag) 24 | #define ISFLAGSET(flags,flag) (flags & flag) 25 | 26 | #ifdef __amigaos4__ 27 | #pragma pack(2) 28 | #endif 29 | 30 | struct GUIPrefs { 31 | UWORD structsize; 32 | UWORD prefsver; 33 | 34 | struct TextAttr font; 35 | UWORD winx; 36 | UWORD winy; 37 | UWORD winwidth; 38 | UWORD winheight; 39 | UWORD winposmode; 40 | UWORD maxlines; 41 | ULONG flags; 42 | ULONG flagsfreemask; 43 | }; 44 | 45 | #ifdef __amigaos4__ 46 | #pragma pack() 47 | #endif 48 | 49 | extern struct GUIPrefs Prefs; 50 | extern struct Window *PrefsWin; 51 | extern Object *PrefsWinObj; 52 | 53 | VOID OpenPrefsWindow(UBYTE *screentitle); 54 | VOID ClosePrefsWindow(VOID); 55 | VOID HandlePrefsWindow(VOID); 56 | VOID PrefsDefaults(struct Screen *scr); 57 | VOID LoadPrefs(VOID); 58 | -------------------------------------------------------------------------------- /rc5-72/opencl/ocl_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2009-2014 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ocl_info.h 2014/08/19 22:18:25 gkhanna Exp $ 7 | */ 8 | 9 | #ifndef OCL_COMMON_H 10 | #define OCL_COMMON_H 11 | 12 | #include "cputypes.h" 13 | #if (CLIENT_OS == OS_WIN64) || (CLIENT_OS == OS_WIN32) || \ 14 | (CLIENT_OS == OS_WIN16) || (CLIENT_OS == OS_LINUX) || \ 15 | (CLIENT_OS == OS_ANDROID) 16 | #include 17 | #elif (CLIENT_OS == OS_MACOSX) 18 | #include 19 | #endif 20 | #include "ccoreio.h" 21 | #include "logstuff.h" // LogScreen() 22 | #include "triggers.h" 23 | #include "ocl_context.h" 24 | 25 | #define P 0xB7E15163 26 | #define Q 0x9E3779B9 27 | 28 | #define SHL(x, s) ((u32) ((x) << ((s) & 31))) 29 | #define SHR(x, s) ((u32) ((x) >> (32 - ((s) & 31)))) 30 | #define ROTL(x, s) ((u32) (SHL((x), (s)) | SHR((x), (s)))) 31 | #define ROTL3(x) ROTL(x, 3) 32 | #define SWAP32(x) (((((x) >> 24) | ((x) << 24)) | (((x) & 0x00ff0000) >> 8)) | (((x) & 0x0000ff00 ) << 8)) 33 | 34 | void key_incr(u32 *hi, u32 *mid, u32 *lo, u32 incr); 35 | u32 sub72(u32 m1, u32 h1, u32 m2, u32 h2); 36 | //inline u32 swap32(u32 a); 37 | void OCLReinitializeDevice(ocl_context_t *cont); 38 | 39 | s32 rc5_72_unit_func_ansi_ref (RC5_72UnitWork *rc5_72unitwork); 40 | cl_int ocl_diagnose(cl_int result, const char *where, ocl_context_t *cont); 41 | const char* clStrError(cl_int status); 42 | bool BuildCLProgram(ocl_context_t *cont, const char* programText, const char *kernelName); 43 | 44 | #endif //OCL_COMMON_H 45 | -------------------------------------------------------------------------------- /ogr/alpha/ev67-64.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | 8 | #include "ansi/ogrp2-64.h" 9 | 10 | 11 | const char *ogr_ev67_64_cpp(void) { 12 | return "@(#)$Id: ev67-64.cpp,v 1.4 2008/12/30 20:58:43 andreasb Exp $"; } 13 | 14 | #if defined(__GNUC__) 15 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - "100% asm" */ 16 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'yes' (default) */ 17 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 18 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 19 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 20 | //#define OGROPT_ALTERNATE_COMP_LEFT_LIST_RIGHT 1 /* 0/1 - register based */ 21 | #else /* Compaq CC */ 22 | #include 23 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - "100% asm" */ 24 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'yes' (default) */ 25 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 26 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 27 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 28 | //#define OGROPT_ALTERNATE_COMP_LEFT_LIST_RIGHT 1 /* 0/1 - register based */ 29 | #endif 30 | 31 | #define ALPHA_CIX 32 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table_cix_64 33 | 34 | #include "baseincs.h" //for endian detection 35 | #include "alpha/alpha-asm.h" 36 | #include "ansi/ogrp2_codebase.cpp" 37 | -------------------------------------------------------------------------------- /ogr/alpha/ev4-64.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | 8 | #include "ansi/ogrp2-64.h" 9 | 10 | /* Baseline implementation. 11 | * Due to changes in OGR-P2 code design, the implementations provided by this 12 | * file and the baseline ogr-64.cpp (renamed to ogrp2-64.cpp) have been swapped. 13 | */ 14 | 15 | const char *ogr_ev4_64_cpp(void) { 16 | return "@(#)$Id: ev4-64.cpp,v 1.4 2008/12/30 20:58:43 andreasb Exp $"; } 17 | 18 | #if defined(__GNUC__) 19 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 20 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 21 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 22 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 23 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 24 | #else /* Compaq CC */ 25 | #include 26 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 27 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 28 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 29 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 30 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 31 | #endif 32 | 33 | #define OGR_GET_DISPATCH_TABLE_FXN ogr64_get_dispatch_table_ev4 34 | 35 | #include "baseincs.h" //for endian detection 36 | #include "alpha/alpha-asm.h" 37 | #include "ansi/ogrp2_codebase.cpp" 38 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/AppClass.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2004-2005 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: AppClass.h,v 1.3 2012/06/24 12:36:38 piru Exp $ 7 | * 8 | * Created by Ilkka Lehtoranta 9 | * 10 | * ---------------------------------------------------------------------- 11 | * MUI GUI module for MorphOS client - MUI application class code 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #ifndef DNETC_APPCLASS_H 16 | #define DNETC_APPCLASS_H 17 | 18 | #ifndef DNETC_LIBHEADER_H 19 | #include "LibHeader.h" 20 | #endif 21 | 22 | struct Application_Data 23 | { 24 | Object *mainwnd, *list; 25 | Object *req; 26 | ULONG Paused; 27 | }; 28 | 29 | #define TAG_BASE 0xfece0000 30 | 31 | #define MUIM_MyApplication_NativeCall (TAG_BASE + 0xf001) 32 | #define MUIM_MyApplication_OpenMainWindow (TAG_BASE + 0xf002) 33 | #define MUIM_MyApplication_InsertNode (TAG_BASE + 0xf003) 34 | #define MUIM_MyApplication_GetMenuItem (TAG_BASE + 0xf004) 35 | #define MUIM_MyApplication_CloseReq (TAG_BASE + 0xf005) 36 | #define MUIM_MyApplication_UnIconified (TAG_BASE + 0xf006) 37 | #define MUIM_MyApplication_ClearConsole (TAG_BASE + 0xf007) 38 | 39 | struct MUIP_MyApplication_NativeCall { ULONG MethodID; ULONG (*func)(ULONG *); ULONG param1; }; 40 | struct MUIP_MyApplication_InsertNode { ULONG MethodID; CONST_STRPTR output; ULONG overwrite; }; 41 | struct MUIP_MyApplication_GetMenuItem { ULONG MethodID; ULONG menu; }; 42 | 43 | DISPATCHERPROTO(MyApp_Dispatcher); 44 | 45 | #endif /* DNETC_APPCLASS_H */ 46 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/CreateGUI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2004-2005 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: CreateGUI.h,v 1.3 2012/06/24 12:36:39 piru Exp $ 7 | * 8 | * Created by Ilkka Lehtoranta 9 | * 10 | * ---------------------------------------------------------------------- 11 | * MUI GUI module for MorphOS client - MUI application class code 12 | * ---------------------------------------------------------------------- 13 | */ 14 | 15 | #ifndef DNETC_CREATEGUI_H 16 | #define DNETC_CREATEGUI_H 17 | 18 | #include "../dnetcgui.h" 19 | 20 | #ifndef DNETC_LIBHEADER_H 21 | #include "LibHeader.h" 22 | #endif 23 | 24 | #ifndef MAKE_ID 25 | #define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d)) 26 | #endif 27 | 28 | #define MENUBASE 0x8000 29 | 30 | enum { MENU_IGNORE_ID = MENUBASE, MENU_MUISETTINGS_ID, MENU_ABOUT_ID, MENU_QUIT_ID, MENU_CLEAR_ID, 31 | MENU_PPCPAUSE_ID, MENU_PPCRESTART_ID, MENU_PPCBENCHMARK_ID, MENU_PPCBENCHMARKALL_ID, 32 | MENU_PPCTEST_ID, MENU_PPCCONFIG_ID, MENU_PPCFETCH_ID, MENU_PPCFLUSH_ID, MENU_PPCUPDATE_ID, MENU_PPCSHUTDOWN_ID }; 33 | 34 | #define DNETC_MSG_RESTART 0x001 35 | #define DNETC_MSG_SHUTDOWN 0x002 36 | #define DNETC_MSG_PAUSE 0x004 37 | #define DNETC_MSG_UNPAUSE 0x008 38 | 39 | struct ObjStore 40 | { 41 | Object *wnd, *req, *lst; 42 | }; 43 | 44 | Object *CreateGUI (struct IClass *cl, Object *obj, struct ObjStore *os, struct DnetcLibrary *LibBase); 45 | VOID HodgePodge (struct Library *MyMUIMasterBase); 46 | 47 | #endif /* DNETC_CREATEGUI_H */ 48 | -------------------------------------------------------------------------------- /plat/amigaos/tools/strip_pup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: strip_pup.c,v 1.2 2002/09/02 00:35:50 andreasb Exp $ 7 | * 8 | * Created by Oliver Roberts 9 | * 10 | * ---------------------------------------------------------------------- 11 | * Strip symbols PowerUp relocatable ELF - requires strip and vlink (from 12 | * VBCC). This is quite messy, but there is no other way with 13 | * gcc/PowerUp :( 14 | * ---------------------------------------------------------------------- 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | int main(int argc, char **argv) 22 | { 23 | int ret = 20; 24 | UBYTE cmd[512]; 25 | 26 | if (argc >= 2) { 27 | /* First strip pass */ 28 | sprintf(cmd,"ppc-amigaos-strip -S -x -X --strip-unneeded -R .comment %s",argv[1]); 29 | ret = System(cmd,NULL); 30 | if (!ret) { // success 31 | /* Run vlink to remove other unnecessary symbols, etc */ 32 | sprintf(cmd,"vlink -r -S -b elf32powerup -o dnetc.puptmp %s",argv[1]); 33 | ret = System(cmd,NULL); 34 | if (!ret) { // success 35 | DeleteFile(argv[1]); 36 | Rename("dnetc.puptmp",argv[1]); 37 | sprintf(cmd,"ppc-amigaos-strip -S -x -X --strip-unneeded -R .comment %s",argv[1]); 38 | ret = System(cmd,NULL); 39 | SetProtection(argv[1],FIBF_OTR_READ | FIBF_OTR_WRITE | FIBF_OTR_EXECUTE | FIBF_OTR_DELETE); 40 | } 41 | } 42 | } 43 | 44 | return(ret); 45 | } 46 | -------------------------------------------------------------------------------- /plat/win/w32svc.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * Created by Cyrus Patel 8 | */ 9 | 10 | #ifndef __W32SVC_H__ 11 | #define __W32SVC_H__ "@(#)$Id: w32svc.h,v 1.2 2002/09/02 00:35:53 andreasb Exp $" 12 | 13 | int win32CliUninstallService(int quiet); 14 | /*returns 0 on success. quiet is used internally by the service itself */ 15 | 16 | int win32CliInstallService(int quiet); 17 | /*returns 0 on success. quiet is used internally by the service itself */ 18 | 19 | int win32CliStartService(int argc, char **argv); 20 | /* equivalent of "net start ... ", but works for 9x as well. */ 21 | 22 | int win32CliInitializeService(int argc, char **argv, int (*)(int, char **)); 23 | /* new style InitializeService. Returns 0 if service started ok */ 24 | 25 | int win32CliServiceRunning(void); 26 | /* returns !0 if *running* as a service */ 27 | 28 | int win32CliIsServiceInstalled(void); 29 | /* returns <0=err, 0=no, >0=yes */ 30 | 31 | int win32CliSendServiceControlMessage(int msg); /* NT only! */ 32 | /* msg == SERVICE_CONTROL_STOP|PAUSE|CONTINUE|(re)START */ 33 | #define CLIENT_SERVICE_CONTROL_RESTART 128 //service control # 34 | /* <0=err, 0=all stopped or not installed */ 35 | 36 | /* compatibility with old version (in)dependant stuff */ 37 | #define winInstallClient(_quiet) win32CliInstallService(_quiet) 38 | #define winUninstallClient(_quiet) win32CliUninstallService(_quiet) 39 | 40 | #endif /* __W32SVC_H__ */ 41 | -------------------------------------------------------------------------------- /plat/netware/nwlcomp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2002 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * ANSI/POSIX functions not available for NetWare 7 | * Written by Cyrus Patel 8 | * 9 | * $Id: nwlcomp.h,v 1.2 2002/09/02 00:35:51 andreasb Exp $ 10 | */ 11 | 12 | #ifndef __CNW_LCOMPAT_H_ 13 | #define __CNW_LCOMPAT_H_ 14 | 15 | #include /* time_t and time(time_t *) */ 16 | /* note: nw's time_t is *unsigned* */ 17 | #pragma pack(1) 18 | struct timeb { /* from */ 19 | time_t time; /* seconds since the Epoch */ 20 | unsigned short millitm; /* + milliseconds since the Epoch */ 21 | short timezone; /* minutes west of CUT */ 22 | short dstflag; /* DST == non-zero */ 23 | }; 24 | #pragma pack() 25 | 26 | /* ------------------------------------------------------------------- */ 27 | 28 | #ifdef __cplusplus /* avoid pulling in *any* non-standard headers */ 29 | extern "C" { 30 | #endif 31 | 32 | extern int ftime(struct timeb *__tb); /* ANSI (should be in time.h) */ 33 | extern int daylight; /* this is really extern */ 34 | extern int timezone; /* this is really extern. intentionally 'int' */ 35 | 36 | extern void usleep(unsigned long); /* BSD 4.3 (should be unistd.h) */ 37 | extern unsigned int sleep(unsigned int); /* POSIX 1 (should be unistd.h) */ 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* __CNW_LCOMPAT_H_ */ 44 | -------------------------------------------------------------------------------- /rc5-72/opencl/rc5-ref.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2012 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: 7 | */ 8 | 9 | static const char ocl_rc572_ref_src[]= 10 | 11 | "GCNkZWZpbmUgU0hMKHgsIHMpICgodWludIQIABR4KSA8PCAoKHMpICYgMzEpKSkNCoowAA" 12 | "FSlDAACD4+ICgzMiAtjTYAizcAA1JPVIhoAAZyb3RhdGWHbgADeCwghncAAXOPLQABM4SG" 13 | "AI8rAIahAAEzjI4AA1dBUISvAAMoKHiEgwAIMjQpIHwgKHiEvwCHDAANKHgmMHgwMGZmMD" 14 | "AwMIWoAAE4jBgAhhoABCk8PDiE5QCK5wAMUCAweEI3RTE1MTYziv0ADFEgMHg5RTM3NzlC" 15 | "OYQuACwvL0NPUkVOQU1FPW9jbF9yYzU3Ml9yZWZfc3JjDQpfX2tlcm5lbCB2b2lkII0hAA" 16 | "0oIF9fY29uc3RhbnQghHcBGiAqcmM1XzcydW5pdHdvcmssIF9fZ2xvYmFshx8ADW91dGJ1" 17 | "ZikNCnsNCiCGMwAFTFszXTuJDgAEU1syNosPAARBLCBCih0ABmksaixrO4ThAAkgIExbMl" 18 | "0gPSCOcAANWzBdOyAgIC8vTDBoaYVVAANMWzGTJwABMYknAANtaWSHKAABMJNPAAEyiU8A" 19 | "AmxvjHgABis9IGdldIfbAAZfaWQoMCmKwwAHbDFfdDEgPYbWAYSAAI8cAAMyID2HJAADKy" 20 | "AohccAhc8Bh68ABjJdICY9IIbVAYTxAYUbAQNpZiiGOgABPIZeAAEphD4BhUMBiHQAAzBf" 21 | "dIpzAAEwh3MAASCGGAADKz0xhw8Ah+YAhXAChDMAhrYAAX2LKQGGGwCEpgCE0gCGawEGZm" 22 | "9yIChThiEBFVAsIGkgPSAxOyBpIDwgMjY7IGkrK4WPAAUgIFNbaYVeAAlbaS0xXSArIFGH" 23 | "qwGFQAAHQSA9IEIgPYU+AAlqID0gayA9IDCHpgAGayA8IDMqhE0AA2srK4ZhAA0oaSArID" 24 | "EpICUgMjYshTEAAihqiBIAhDsDif8AhFgAh3kAhnEDhIYABisoQStCKYgFAYR3AANMW2qI" 25 | "IwABKIQMAIYiAAEsiygAhQYBhKYAj1MCATSEywCE/gAMOwkvL3BsYWluX2xvhL4ChM4Aj3" 26 | "8CATWGLACEXwKILAACaGmJQwECaT2ENwEEPD0xMoo2AYvGAIVdBAxBXkIsQikrU1syKmmG" 27 | "FwOGwACFegQFQl5BLEGHHQACKzGGNgOEvQGHIwIDQSA9kREDAjZdkSwCEmlkeCA9IGF0b2" 28 | "1pY19hZGQoJoaWAwRbMF0shHMBAisgiC8ChdMDBHZhbCCX7wKFmQIBQpN2AAE3hnYAhJ8C" 29 | "hD8AAXyE0QIBOIbSAgEwhBsBCkZ1bGwgbWF0Y2iGxAKHgQADaWR4hNQDA3ZhbIiYAgN9DQ" 30 | "oA"; -------------------------------------------------------------------------------- /plat/amigaos/guilib/morphos/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for MorphOS dnetcgui.library 3 | # 4 | 5 | TARGET = ../../../../dnetcgui.library 6 | #TARGET = dnetcgui.library 7 | # 8 | ## 9 | # 10 | 11 | # If you use another compiler change the following line: 12 | CC = ppc-morphos-gcc 13 | CDEFS = -DUSE_INLINE_STDARG 14 | CWARN = -Wall -Wno-parentheses -Wno-missing-braces 15 | CFLAGS = -noixemul -O2 $(CDEFS) $(CWARN) -fomit-frame-pointer -finline-functions -mstring -mmultiple 16 | LDFLAGS = -noixemul -nostartfiles -nostdlib 17 | 18 | OBJS = LibHeader.o LibInit.o AppClass.o MUIGUI.o CreateGUI.o ListClass.o 19 | 20 | # 21 | # target 22 | # 23 | 24 | .PHONY: all clean 25 | 26 | all: $(TARGET) 27 | 28 | clean: 29 | rm -f $(OBJS) $(TARGET) $(TARGET).db 30 | 31 | $(TARGET): $(OBJS) 32 | $(CC) $(LDFLAGS) -o $@.db $(OBJS) -labox 33 | ppc-morphos-strip --strip-unneeded --strip-debug --remove-section .comment -o $@ $@.db 34 | -flushlib dnetcgui.library 35 | 36 | GLOBAL = LibHeader.h CreateGUI.h dnetcgui.h ../dnetcgui.h 37 | LibHeader.o : LibHeader.c $(GLOBAL) guilib_version.h 38 | LibInit.o : LibInit.c $(GLOBAL) AppClass.h ListClass.h 39 | AppClass.o : AppClass.c $(GLOBAL) AppClass.h ListClass.h 40 | ListClass.o : ListClass.c $(GLOBAL) ListClass.h 41 | CreateGUI.o : CreateGUI.c $(GLOBAL) guilib_version.h 42 | MUIGUI.o : MUIGUI.c $(GLOBAL) 43 | 44 | 45 | includes: ../fd/dnetcgui_lib.fd ../clib/dnetcgui_protos.h 46 | mkdir -p clib proto ppcinline 47 | cvinclude.pl --fd ../fd/dnetcgui_lib.fd --clib ../clib/dnetcgui_protos.h --outclib clib/dnetcgui_protos.h 48 | cvinclude.pl --fd ../fd/dnetcgui_lib.fd --clib ../clib/dnetcgui_protos.h --proto proto/dnetcgui.h 49 | cvinclude.pl --fd ../fd/dnetcgui_lib.fd --clib ../clib/dnetcgui_protos.h --inlines ppcinline/dnetcgui.h 50 | -------------------------------------------------------------------------------- /common/unused.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2003 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | */ 6 | 7 | #ifndef __UNUSED_H__ 8 | #define __UNUSED_H__ "@(#)$Id: unused.h,v 1.3 2007/10/22 16:48:28 jlawson Exp $" 9 | 10 | /* This file is a bit empty at the moment because it's meant to be 11 | ** extended for all the compilers encountered by this code. If it 12 | ** doesn't work for you, put an 13 | ** 14 | ** #ifdef (compiler) 15 | ** 16 | ** but please not based on OS/platform around this and add #elif's as 17 | ** necessary. 18 | ** 19 | ** #else */ 20 | 21 | /* gcc's __attribute__((unused)) only works for C and not C++. So we 22 | ** have to use a useless/non-effective reference to make the compiler 23 | ** believe we know what we're doing. There are several ways to do so: 24 | ** A bad way is 25 | ** 26 | ** #define DNETC_UNUSED_PARAM(x) (x = x) - bad! 27 | ** 28 | ** because it will break on C++ references and call the = operator 29 | ** on classes which might have undesired side-effects. Better is 30 | ** 31 | ** #define DNETC_UNUSED_PARAM(x) {if (&x) {}} 32 | ** 33 | ** but might not get optimised away by the compiler. Third there's 34 | ** an unassigned rvalue like 35 | ** 36 | ** #define DNETC_UNUSED_PARAM ((void)x) 37 | ** 38 | ** which might still cause senselessness warnings on some compilers 39 | ** though. We choose the last option for now. */ 40 | 41 | #define DNETC_UNUSED_PARAM(x) ((void)x) 42 | 43 | /* all occurences of DNETC_UNUSED should actually be fixed to not have 44 | ** those variables in the first place */ 45 | #define DNETC_UNUSED(x) DNETC_UNUSED_PARAM(x) 46 | 47 | /* #endif */ 48 | 49 | #endif /* __UNUSED_H__ */ 50 | -------------------------------------------------------------------------------- /ogr/ansi/ogrp2-32.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Implementation : Each of the three bitmaps "list", "dist" and "comp" is 7 | * made of five 32-bit scalars. 8 | * 9 | * $Id: ogrp2-32.cpp,v 1.1 2008/03/08 20:07:14 kakace Exp $ 10 | */ 11 | 12 | #include "ansi/ogrp2-32.h" 13 | 14 | #if (CLIENT_CPU == CPU_ALPHA) 15 | #includ "baseincs.h" // For endianness detection. 16 | #if defined(__GNUC__) 17 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 18 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 19 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 20 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 21 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 22 | #else /* Compaq CC */ 23 | #include 24 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 25 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* 0/1 - 'no' */ 26 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 27 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 28 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 29 | #endif 30 | #endif 31 | 32 | /* 33 | ** Define the name of the dispatch table. 34 | ** Each core shall define a unique name. 35 | */ 36 | #if !defined(OGR_GET_DISPATCH_TABLE_FXN) 37 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table 38 | #endif 39 | 40 | 41 | #include "ansi/ogrp2_codebase.cpp" 42 | -------------------------------------------------------------------------------- /plat/amigaos/guilib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for dnetcgui.library 3 | # 4 | 5 | TARGET = ../../../dnetcgui.library 6 | 7 | # 8 | ## 9 | # 10 | 11 | CC = gcc 12 | RM = delete 13 | CFLAGS = -m68000 -msmall-code -O2 -fomit-frame-pointer -fpermissive -fno-exceptions -fstrict-aliasing -I../../../plat/amigaos 14 | LDFLAGS = -noixemul -nostartfiles -s -L. 15 | LDLIBS = -lreaction 16 | OBJDIR = ../../../output 17 | REACTOR_OBJS = gui.o $(OBJDIR)/guistrings.o 18 | #OBJS = $(OBJDIR)/LibBase.o $(OBJDIR)/main.o $(REACTOR_OBJS) 19 | OBJS = $(OBJDIR)/LibBase.o $(OBJDIR)/main.o $(OBJDIR)/prefs.o 20 | 21 | # 22 | # target 23 | # 24 | 25 | $(TARGET): $(OBJS) $(OBJDIR)/endcode.o 26 | $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) -lgcc -lnixmain -lnix -lamiga $(OBJDIR)/endcode.o 27 | 28 | $(OBJDIR)/LibBase.o: LibBase.c common.h dnetcgui_rev.h 29 | $(CC) $(CFLAGS) -o $@ -c $< 30 | 31 | $(OBJDIR)/main.o: main.c common.h main.h prefs.h 32 | $(CC) $(CFLAGS) -o $@ -c $< 33 | 34 | $(OBJDIR)/prefs.o: prefs.c common.h main.h prefs.h 35 | $(CC) $(CFLAGS) -o $@ -c $< 36 | 37 | $(OBJDIR)/endcode.o: endcode.c 38 | $(CC) $(CFLAGS) -o $@ -c $< 39 | 40 | $(OBJDIR)/guistrings.o: $(OBJDIR)/guistrings.s gui.cd 41 | phxass $< to $@ sc sd=a4 INCPATH sc:include/ SET CATCOMP_ARRAY 42 | 43 | $(OBJDIR)/guistrings.s: gui.cd 44 | catcomp gui.cd cfile guistrings.h asmfile $(OBJDIR)/guistrings.s xdef 45 | 46 | includes: fd/dnetcgui_lib.fd clib/dnetcgui_protos.h 47 | fd2inline fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > inline/dnetcgui.h 48 | # fd2inline -proto fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > proto/dnetcgui.h 49 | fd2inline_ -powerup fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > inline/dnetcguippc.h 50 | # fd2inline -powerup -proto fd/dnetcgui_lib.fd clib/dnetcgui_protos.h > proto/dnetcguippc.h 51 | -------------------------------------------------------------------------------- /ogr/ppc/ogrng-ppc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1999-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ogrng-ppc.cpp,v 1.4 2008/03/29 21:54:12 kakace Exp $ 7 | */ 8 | 9 | #include "ansi/ogrng-32.h" 10 | 11 | 12 | #if defined(ASM_PPC) || defined(__PPC__) || defined(__POWERPC__) 13 | 14 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - '100% asm' */ 15 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0-1 - '100% asm' */ 16 | 17 | /*========================================================================*/ 18 | 19 | #include "asm-ppc.h" 20 | 21 | #if (OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM == 2) && defined(__CNTLZ__) 22 | #define __CNTLZ(x) (__CNTLZ__(~(x))+1) 23 | #endif 24 | 25 | 26 | /* 27 | ** Define the name of the dispatch table. 28 | */ 29 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table 30 | 31 | #include "ansi/ogrng_codebase.cpp" 32 | 33 | 34 | /* 35 | ** Check the settings again since we have to make sure ogr_create() 36 | ** produces compatible datas. 37 | */ 38 | #if defined(HAVE_FLEGE_PPC_CORES) && (OGROPT_ALTERNATE_CYCLE > 0) 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | int cycle_ppc_scalar_256(struct OgrState *state, int *pnodes, const u16 *choose); 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, 49 | const u16* pchoose) 50 | { 51 | return cycle_ppc_scalar_256(oState, pnodes, pchoose); 52 | } 53 | #endif 54 | 55 | #else 56 | #error use this only with ppc since it may contain ppc assembly 57 | #endif 58 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-b.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_mmx 6 | 7 | #include "ansi/ogrng_codebase.cpp" 8 | 9 | #include "ccoreio.h" /* CDECL */ 10 | #include /* offsetof */ 11 | 12 | extern "C" int CDECL ogr_cycle_256_rt1_mmx(struct OgrState *oState, int *pnodes, const u16* pchoose); 13 | 14 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 15 | { 16 | /* Check that size of cruncher thread work area is correct */ 17 | 18 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 19 | 20 | /* Check structures layout and alignment to match assembly */ 21 | 22 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 23 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 24 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 25 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 26 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 27 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 28 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 29 | 30 | STATIC_ASSERT(sizeof(struct OgrLevel) == 104); 31 | STATIC_ASSERT(sizeof(oState->Levels) == 104 * OGR_MAXDEPTH); 32 | 33 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 34 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 35 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 36 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 37 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 38 | 39 | return ogr_cycle_256_rt1_mmx(oState, pnodes, pchoose); 40 | } 41 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse-k8.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_cj1_sse_k8 6 | 7 | #include "ansi/ogrng_codebase.cpp" 8 | 9 | #include "ccoreio.h" /* CDECL */ 10 | #include /* offsetof */ 11 | 12 | extern "C" int CDECL ogr_cycle_256_cj1_sse_k8(struct OgrState *oState, int *pnodes, const u16* pchoose); 13 | 14 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 15 | { 16 | /* Check that size of cruncher thread work area is correct */ 17 | 18 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 19 | 20 | /* Check structures layout and alignment to match assembly */ 21 | 22 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 23 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 24 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 25 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 26 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 27 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 28 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 29 | 30 | STATIC_ASSERT(sizeof(struct OgrLevel) == 104); 31 | STATIC_ASSERT(sizeof(oState->Levels) == 104 * OGR_MAXDEPTH); 32 | 33 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 34 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 35 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 36 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 37 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 38 | 39 | return ogr_cycle_256_cj1_sse_k8(oState, pnodes, pchoose); 40 | } 41 | -------------------------------------------------------------------------------- /plat/os2/os2defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2003 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | 8 | #ifndef __OS2DEFS_H__ 9 | #define __OS2DEFS_H__ "@(#)$Id: os2defs.h,v 1.4 2007/10/22 16:48:31 jlawson Exp $" 10 | 11 | #define INCL_DOSPROCESS /* For Disk functions */ 12 | #define INCL_DOSFILEMGR /* For Dos_Delete */ 13 | #define INCL_ERRORS /* DOS error values */ 14 | #define INCL_DOSMISC /* DosQuerySysInfo() */ 15 | #define INCL_WINWORKPLACE /* Workplace shell objects */ 16 | #define INCL_VIO /* OS/2 text graphics functions */ 17 | #define INCL_DOS 18 | #define INCL_SUB 19 | #define INCL_KBD 20 | #include 21 | 22 | extern "C" { 23 | #ifndef __WATCOMC__ 24 | // all compilers I have use sys/types.h (patrick) 25 | #include 26 | #include 27 | #else 28 | #include 29 | #endif 30 | // defined isprint, ... for EMX and Watcom 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include // for stat() 37 | #include 38 | #define BSD_SELECT 39 | #include 40 | #include 41 | } 42 | 43 | #ifndef _MAX_PATH 44 | #define _MAX_PATH 255 45 | #endif 46 | 47 | int os2CliUninstallClient(int do_the_uninstall_without_feedback); 48 | int os2CliInstallClient(int do_the_install_without_feedback, const char *exename); 49 | int os2CliSendSignal(int action, const char *exename); 50 | 51 | #define DNETC_MSG_RESTART 0x00 52 | #define DNETC_MSG_SHUTDOWN 0x01 53 | #define DNETC_MSG_PAUSE 0x02 54 | #define DNETC_MSG_UNPAUSE 0x03 55 | 56 | int os2GetPIDList(const char *procname, long *pidlist, int maxnumpids); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-a.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-32.h" 2 | 3 | #include "x86/asm-x86.h" 4 | 5 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - '100% asm' */ 6 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 7 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_asm1 8 | 9 | #include "ansi/ogrng_codebase.cpp" 10 | 11 | #include "ccoreio.h" /* CDECL */ 12 | #include /* offsetof */ 13 | 14 | extern "C" int CDECL ogr_cycle_256_rt1(struct OgrState *oState, int *pnodes, const u16* pchoose); 15 | 16 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 17 | { 18 | /* Check that size of cruncher thread work area is correct */ 19 | 20 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 21 | 22 | /* Check structures layout and alignment to match assembly */ 23 | 24 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 25 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 26 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 27 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 28 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 29 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 30 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 31 | 32 | STATIC_ASSERT(sizeof(struct OgrLevel) == 104); 33 | STATIC_ASSERT(sizeof(oState->Levels) == 104 * OGR_MAXDEPTH); 34 | 35 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 36 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 37 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 38 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 39 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 40 | 41 | return ogr_cycle_256_rt1(oState, pnodes, pchoose); 42 | } 43 | -------------------------------------------------------------------------------- /plat/dos/cdosinet.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2002 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * ------------------------------------------- 8 | * just stubs... 9 | * ------------------------------------------- 10 | * 11 | */ 12 | #ifndef __CLIDOS_INET_H__ 13 | #define __CLIDOS_INET_H__ "@(#)$Id: cdosinet.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $" 14 | 15 | typedef int SOCKET; 16 | 17 | #if defined(DJGPP) 18 | #include //ntohl() and htonl() 19 | #elif defined(__WATCOMC__) //we can do better 20 | unsigned short ntohs( unsigned short ); 21 | unsigned short htons( unsigned short ); 22 | unsigned long ntohl( unsigned long ); 23 | unsigned long htonl( unsigned long ); 24 | #pragma aux htons = 0x86 0xc4 /* xchg al,ah */ \ 25 | parm [ax] value[ax] modify exact[ax] 26 | #pragma aux (htons) ntohs; /* ntohs is identical to htons */ 27 | #ifdef __386__ 28 | #pragma aux htonl = 0x86 0xc4 0xc1 0xc0 0x10 0x86 0xc4 \ 29 | parm [eax] value[eax] modify exact[eax] 30 | /* xchg al,ah rol eax,16 xchg al,ah */ 31 | #pragma aux (htonl) ntohl; /* ntohl is identical to htonl */ 32 | #else 33 | #define ntohl(x) ((((x)&0xff)<<24) | (((x)>>24)&0xff) | \ 34 | (((x)&0xff00)<<8) | (((x)>>8)&0xff00)) 35 | #define htonl(x) ntohl(x) 36 | #endif 37 | #else 38 | #define ntohs(x) ((((x)&0xff)<<8) | (((x)>>8)&0xff)) 39 | #define htons(x) ntohs(x) 40 | #define ntohl(x) ((((x)&0xff)<<24) | (((x)>>24)&0xff) | \ 41 | (((x)&0xff00)<<8) | (((x)>>8)&0xff00)) 42 | #define htonl(x) ntohl(x) 43 | #endif 44 | 45 | #endif //__CLIDOS_INET_H__ 46 | -------------------------------------------------------------------------------- /ogr/arm/ogr-arm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | */ 7 | 8 | #include "ansi/ogrp2-32.h" 9 | 10 | 11 | const char *ogr_arm_cpp(void) { 12 | return "@(#)$Id: ogr-arm.cpp,v 1.4 2008/12/30 20:58:43 andreasb Exp $"; } 13 | 14 | #if defined(ASM_ARM) 15 | 16 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 1 /* 0-2 - partial support */ 17 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 1 /* 0/1 - 'yes' (default) */ 18 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 19 | #define OGROPT_HAVE_OGR_CYCLE_ASM 1 /* 0-2 - 'yes' */ 20 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 21 | 22 | #if defined(__GNUC__) 23 | #if (OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM == 1) 24 | static __inline__ int __CNTLZ__(register SCALAR input, 25 | const char bitarray[]) 26 | { 27 | register int temp, result; 28 | __asm__ ("mov %0,#0\n\t" \ 29 | "cmp %1,#0xffff0000\n\t" \ 30 | "movcs %1,%1,lsl#16\n\t" \ 31 | "addcs %0,%0,#16\n\t" \ 32 | "cmp %1,#0xff000000\n\t" \ 33 | "movcs %1,%1,lsl#8\n\t" \ 34 | "ldrb %1,[%3,%1,lsr#24]\n\t" \ 35 | "addcs %0,%0,#8\n\t" \ 36 | "add %0,%0,%1" \ 37 | : "=r" (result), "=r" (temp) 38 | : "1" (input), "r" ((unsigned int)bitarray)); 39 | return result; 40 | } 41 | #define __CNTLZ_ARRAY_BASED(x) __CNTLZ__(x) 42 | #endif 43 | #endif /* __GNUC__ */ 44 | 45 | #endif /* ASM_ARM */ 46 | 47 | #include "ansi/ogrp2_codebase.cpp" 48 | -------------------------------------------------------------------------------- /rc5-72/opencl/rc5-ref.cl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2012 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: 7 | */ 8 | #define SHL(x, s) ((uint) ((x) << ((s) & 31))) 9 | #define SHR(x, s) ((uint) ((x) >> (32 - ((s) & 31)))) 10 | #define ROTL(x, s) rotate((uint)x, (uint)s) 11 | #define ROTL3(x) rotate((uint)x,(uint)3) 12 | #define SWAP(x) ((x >> 24) | (x << 24) | ((x&0x00ff0000) >> 8) | ((x&0x0000ff00)<<8)) 13 | 14 | #define P 0xB7E15163 15 | #define Q 0x9E3779B9 16 | 17 | //CORENAME=ocl_rc572_ref_src 18 | __kernel void ocl_rc572_ref( __constant uint *rc5_72unitwork, __global uint *outbuf) 19 | { 20 | uint L[3]; 21 | uint S[26]; 22 | uint A, B; 23 | uint i,j,k; 24 | 25 | L[2] = rc5_72unitwork[0]; //L0hi; 26 | L[1] = rc5_72unitwork[1]; //L0mid; 27 | L[0] = rc5_72unitwork[2]; //L0lo; 28 | 29 | L[2] += get_global_id(0); 30 | uint l1_t1 = SWAP(L[1]); 31 | uint l1_t2 = l1_t1 + (L[2] >> 8); 32 | L[2] &= 0x000000ff; 33 | if(l1_t2 < l1_t1) 34 | { 35 | uint l0_t = SWAP(L[0]); 36 | l0_t +=1; 37 | L[0] = SWAP(l0_t); 38 | } 39 | L[1] = SWAP(l1_t2); 40 | 41 | 42 | for (S[0] = P, i = 1; i < 26; i++) 43 | S[i] = S[i-1] + Q; 44 | 45 | for (A = B = i = j = k = 0; 46 | k < 3*26; k++, i = (i + 1) % 26, j = (j + 1) % 3) 47 | { 48 | A = S[i] = ROTL3(S[i]+(A+B)); 49 | B = L[j] = ROTL(L[j]+(A+B),(A+B)); 50 | } 51 | A = rc5_72unitwork[4] + S[0]; //plain_lo 52 | B = rc5_72unitwork[5] + S[1]; //plain_hi 53 | for (i=1; i<=12; i++) 54 | { 55 | A = ROTL(A^B,B)+S[2*i]; 56 | B = ROTL(B^A,A)+S[2*i+1]; 57 | } 58 | 59 | if(A == rc5_72unitwork[6]) 60 | { 61 | uint idx = atomic_add(&outbuf[0], 1) + 1; 62 | uint val = get_global_id(0); 63 | if(B == rc5_72unitwork[7]) 64 | val |= 0x80000000; //Full match 65 | outbuf[idx] = val; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /ogr/arm/ogrng-arm1.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ogrng-arm1.cpp,v 1.4 2011/11/11 18:49:25 teichp Exp $ 7 | */ 8 | 9 | #include "ansi/ogrng-32.h" 10 | 11 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - 'no' */ 12 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 13 | 14 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_arm1 15 | 16 | #include "ansi/ogrng_codebase.cpp" 17 | 18 | #include "ccoreio.h" /* CDECL */ 19 | #include /* offsetof */ 20 | 21 | extern "C" int CDECL ogr_cycle_256_arm1(struct OgrState *oState, int *pnodes, const u16* pchoose); 22 | 23 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 24 | { 25 | /* Check structures layout and alignment to match assembly */ 26 | 27 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 28 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 29 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 30 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 31 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 32 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 33 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 34 | 35 | STATIC_ASSERT(sizeof(struct OgrLevel) == 104); 36 | STATIC_ASSERT(sizeof(oState->Levels) == 104 * OGR_MAXDEPTH); 37 | 38 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 39 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 40 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 41 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 42 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 43 | 44 | return ogr_cycle_256_arm1(oState, pnodes, pchoose); 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /ogr/arm/ogrng-arm2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ogrng-arm2.cpp,v 1.3 2011/11/11 18:49:25 teichp Exp $ 7 | */ 8 | 9 | #include "ansi/ogrng-32.h" 10 | 11 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - 'no' */ 12 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 13 | 14 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_arm2 15 | 16 | #include "ansi/ogrng_codebase.cpp" 17 | 18 | #include "ccoreio.h" /* CDECL */ 19 | #include /* offsetof */ 20 | 21 | extern "C" int CDECL ogr_cycle_256_arm2(struct OgrState *oState, int *pnodes, const u16* pchoose); 22 | 23 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 24 | { 25 | /* Check structures layout and alignment to match assembly */ 26 | 27 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 28 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 29 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 30 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 31 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 32 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 33 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 34 | 35 | STATIC_ASSERT(sizeof(struct OgrLevel) == 104); 36 | STATIC_ASSERT(sizeof(oState->Levels) == 104 * OGR_MAXDEPTH); 37 | 38 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 39 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 40 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 41 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 42 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 43 | 44 | return ogr_cycle_256_arm2(oState, pnodes, pchoose); 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /ogr/arm/ogrng-arm3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2002-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * $Id: ogrng-arm3.cpp,v 1.1 2011/11/11 18:49:25 teichp Exp $ 7 | */ 8 | 9 | #include "ansi/ogrng-32.h" 10 | 11 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - 'no' */ 12 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 13 | 14 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_arm3 15 | 16 | #include "ansi/ogrng_codebase.cpp" 17 | 18 | #include "ccoreio.h" /* CDECL */ 19 | #include /* offsetof */ 20 | 21 | extern "C" int CDECL ogr_cycle_256_arm3(struct OgrState *oState, int *pnodes, const u16* pchoose); 22 | 23 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 24 | { 25 | /* Check structures layout and alignment to match assembly */ 26 | 27 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 28 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 29 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 30 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 31 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 32 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 33 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 34 | 35 | STATIC_ASSERT(sizeof(struct OgrLevel) == 104); 36 | STATIC_ASSERT(sizeof(oState->Levels) == 104 * OGR_MAXDEPTH); 37 | 38 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 39 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 40 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 41 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 42 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 43 | 44 | return ogr_cycle_256_arm3(oState, pnodes, pchoose); 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /ogr/68k/ogr-68k.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2001-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Wrapper around ogr.cpp for all m68k processors 7 | */ 8 | 9 | #include "ansi/ogrp2-32.h" 10 | 11 | 12 | #if defined(mc68060) 13 | const char *ogr_68060_cpp(void) 14 | #elif defined(mc68040) 15 | const char *ogr_68040_cpp(void) 16 | #elif defined(mc68030) 17 | const char *ogr_68030_cpp(void) 18 | #elif defined(mc68020) 19 | const char *ogr_68020_cpp(void) 20 | #else 21 | const char *ogr_68000_cpp(void) 22 | #endif 23 | { return "@(#)$Id: ogr-68k.cpp,v 1.4 2008/12/30 20:58:43 andreasb Exp $"; } 24 | 25 | /* 26 | ** The following macro is defined on the command line for each target CPU 27 | ** #define OGR_GET_DISPATCH_TABLE_FXN 28 | */ 29 | 30 | // For reference purpose : 31 | // #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' (default) */ 32 | // #define OGROPT_STRENGTH_REDUCE_CHOOSE 1 /* 0/1 - 'yes' (default) */ 33 | // #define OGROPT_CYCLE_CACHE_ALIGN 0 /* 0/1 - 'no' (default) */ 34 | 35 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 36 | #define OGROPT_HAVE_OGR_CYCLE_ASM 0 /* 0-2 - 'no' (default) */ 37 | 38 | #if defined(ASM_68K) 39 | #if !defined(mc68040) /* 68000/020/030/060 */ 40 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 0 /* GCC is better */ 41 | #endif 42 | #endif 43 | 44 | #include "asm-68k.h" 45 | 46 | #if defined(__BALIGN) 47 | #define OGROPT_CYCLE_CACHE_ALIGN 1 /* balign */ 48 | #else 49 | #define OGROPT_CYCLE_CACHE_ALIGN 0 /* no balign */ 50 | #endif 51 | 52 | #if defined(__CNTLZ) 53 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* Full asm support */ 54 | #elif defined(__CNTLZ_ARRAY_BASED) 55 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 1 /* Partial asm support */ 56 | #endif 57 | 58 | #include "ansi/ogrp2_codebase.cpp" 59 | -------------------------------------------------------------------------------- /plat/x86/x86htcount.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright distributed.net 2003-2004 - All Rights Reserved 3 | ; For use in distributed.net projects only. 4 | ; Any other distribution or use of this source violates copyright. 5 | ; 6 | ; x86 Processor feature identification for distributed.net effort 7 | ; 8 | ; Written for distributed.net by Steven Nikkel, Nov 2003 9 | ; 10 | ; $Id: x86htcount.asm,v 1.2 2007/10/22 16:48:32 jlawson Exp $ 11 | ; 12 | ; return u32 13 | 14 | %ifndef __OMF__ 15 | %ifdef OS2 16 | %define __OMF__ 17 | %endif 18 | %endif 19 | 20 | %ifdef __OMF__ ; Watcom+OS/2 or Borland+Win32 21 | [SECTION _DATA CLASS=DATA USE32 PUBLIC ALIGN=16] 22 | [SECTION _TEXT CLASS=CODE USE32 PUBLIC ALIGN=16] 23 | %define __DATASECT__ [SECTION _DATA] 24 | %define __CODESECT__ [SECTION _TEXT] 25 | %else 26 | %define __DATASECT__ [SECTION .data] 27 | %define __CODESECT__ [SECTION .text] 28 | %endif 29 | 30 | global x86htcount,_x86htcount 31 | 32 | %define CPU_F_HYPERTHREAD 00010000h 33 | 34 | __CODESECT__ 35 | _x86htcount: 36 | x86htcount: 37 | 38 | push ebx 39 | push ecx 40 | push edx 41 | push esi 42 | push edi 43 | 44 | mov esi, 0h 45 | 46 | ; See if CPUID instruction is supported ... 47 | ; ... Get copies of EFLAGS into eax and ecx 48 | pushf 49 | pop eax 50 | mov ecx, eax 51 | 52 | ; ... Toggle the ID bit in one copy and store 53 | ; to the EFLAGS reg 54 | xor eax, 200000h 55 | push eax 56 | popf 57 | 58 | ; ... Get the (hopefully modified) EFLAGS 59 | pushf 60 | pop eax 61 | 62 | ; ... Compare and test result 63 | cmp ecx, eax 64 | je near NotSupported 65 | 66 | Standard: 67 | mov eax, 1h 68 | cpuid 69 | HT_test: 70 | test edx, 10000000h ; Test for Hyper-Threading support 71 | jz Return 72 | and ebx, 00FF0000h 73 | shr ebx, 16 74 | mov esi, ebx 75 | 76 | NotSupported: 77 | Return: 78 | mov eax, esi 79 | 80 | pop edi 81 | pop esi 82 | pop edx 83 | pop ecx 84 | pop ebx 85 | 86 | ret 87 | -------------------------------------------------------------------------------- /common/buffupd.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C++-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2008 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | #ifndef __BUFFUPD_H__ 8 | #define __BUFFUPD_H__ "@(#)$Id: buffupd.h,v 1.17 2008/12/30 20:58:41 andreasb Exp $" 9 | 10 | // pass flags ORd with BUFFERUPDATE_FETCH/*_FLUSH. 11 | // if interactive, prints "Input buffer full. No fetch required" etc. 12 | // returns updated flags or < 0 if failed. (offlinemode!=0/NetOpen() etc) 13 | 14 | // BUFFUPDCHECK_* bits are for use with BufferCheckIfUpdateNeeded(). 15 | // For a longer description of how they are used refer to buffbase.cpp 16 | 17 | #define BUFFERUPDATE_FETCH 0x01 /* do or check_need_for fetch */ 18 | #define BUFFERUPDATE_FLUSH 0x02 /* do or check_need_for flush */ 19 | #define BUFFUPDCHECK_TOPOFF 0x20 /* fill_even_if_not_completely_empty */ 20 | #define BUFFUPDCHECK_EITHER 0x40 /* either true sets both true */ 21 | #define BUFFERUPDATE_LASTBIT 0x40 /* first free is _LASTBIT<<1 */ 22 | 23 | int BufferUpdate( Client *client, int updatereq_flags, int interactive ); 24 | 25 | int BufferCheckIfUpdateNeeded(Client *client, int contestid, int upd_flags); 26 | 27 | /* these next 3 (and the following BufferNetUpdate() proto) 28 | ** are internal to BufferUpdate()<->Buffer[Net|File]Update() 29 | */ 30 | #define BUFFERUPDATE_STATE_NEWS (BUFFERUPDATE_LASTBIT<<1) 31 | #define BUFFERUPDATE_STATE_TRANSERR (BUFFERUPDATE_LASTBIT<<2) 32 | #define BUFFERUPDATE_STATE_MSGPOSTED (BUFFERUPDATE_LASTBIT<<3) 33 | int BufferNetUpdate(Client *client,int updatereq_flags, int break_pending, 34 | int interactive, char *loaderflags_map); 35 | 36 | // define any/all/some of the following to TRACE_OUT(x) for sectional tracing 37 | // to get an effect you must define TRACE in all .cpp files that include this header 38 | #define TRACE_BUFFUPD(x) //TRACE_OUT(x) 39 | 40 | #endif /* __BUFFUPD_H__ */ 41 | -------------------------------------------------------------------------------- /plat/netware/inet/in_makea.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Classification: arpa 3 | * Service: Internet Network Library 4 | * Author: Cyrus Patel 5 | * Copyright: none 6 | * 7 | * $Log: in_makea.c,v $ 8 | * Revision 1.2 2002/09/02 00:35:51 andreasb 9 | * sync: merged changes from release-2-7111 branch between 10 | * 2000-07-11 and release-2-7111_20020901 into trunk 11 | * 12 | * Revision 1.1.2.1 2001/01/21 15:10:30 cyp 13 | * restructure and discard of obsolete elements 14 | * 15 | * Revision 1.1.2.1 1999/11/14 20:44:22 cyp 16 | * all new 17 | * 18 | * 19 | */ 20 | 21 | #if defined(__showids__) 22 | const char *in_makea(void) { 23 | return "$Id: in_makea.c,v 1.2 2002/09/02 00:35:51 andreasb Exp $"; } 24 | #endif 25 | 26 | 27 | #include /* struct in_addr */ 28 | #include /* inet_makeaddr() */ 29 | 30 | /* 31 | inet_makeaddr() makes an internet host address in network byte order 32 | by combining the network number net with the local address host 33 | in network net, both in local byte order. 34 | */ 35 | 36 | struct in_addr inet_makeaddr( u_long net, u_long host ) 37 | { 38 | struct in_addr inaddr; 39 | 40 | if ( net < 0x80ul ) /* IN_CLASSA_MAX */ 41 | { 42 | net <<= 24; /* IN_CLASSA_NSHIFT */ 43 | host &= 0x00fffffful; /* IN_CLASSA_HOST */ 44 | } 45 | else if ( net < 0x10000ul ) /* IN_CLASSB_MAX */ 46 | { 47 | net <<= 16; /* IN_CLASSB_NSHIFT */ 48 | host &= 0x0000fffful; /* IN_CLASSB_HOST */ 49 | } 50 | else if ( net < 0x1000000ul ) /* IN_CLASSC_NET */ 51 | { 52 | net <<= 8; /* IN_CLASSC_NSHIFT */ 53 | host &= 0x000000fful; /* IN_CLASSC_HOST */ 54 | } 55 | 56 | host |= net; 57 | inaddr.S_un.S_addr = 0; 58 | inaddr.S_un.S_un_b.s_b4 = host & 0Xff; 59 | inaddr.S_un.S_un_b.s_b3 = (host >> 8) & 0Xff; 60 | inaddr.S_un.S_un_b.s_b2 = (host >> 16) & 0Xff; 61 | inaddr.S_un.S_un_b.s_b1 = (host >> 24) & 0Xff; 62 | return inaddr; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /ogr/amd64/ogrng64-cj1-sse2.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng64_get_dispatch_table_cj1_sse2 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogrng64_cycle_256_cj1_sse2(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check structures layout and alignment to match assembly */ 31 | 32 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 33 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 34 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 35 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 36 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 37 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 38 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 39 | 40 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 41 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 42 | 43 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 44 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 45 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 46 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 47 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 48 | 49 | return ogrng64_cycle_256_cj1_sse2(oState, pnodes, pchoose); 50 | } 51 | -------------------------------------------------------------------------------- /plat/amd64/x86htcount.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright distributed.net 2003-2009 - All Rights Reserved 3 | ; For use in distributed.net projects only. 4 | ; Any other distribution or use of this source violates copyright. 5 | ; 6 | ; x86 Processor feature identification for distributed.net effort 7 | ; 8 | ; Written for distributed.net by Steven Nikkel, Nov 2003 9 | ; 10 | ; $Id: x86htcount.asm,v 1.3 2009/12/27 13:52:32 andreasb Exp $ 11 | ; 12 | ; return u32 13 | 14 | 15 | BITS 64 16 | 17 | 18 | %ifndef __OMF__ 19 | %ifdef OS2 20 | %define __OMF__ 21 | %endif 22 | %endif 23 | 24 | %ifdef __OMF__ ; Watcom+OS/2 or Borland+Win32 25 | [SECTION _DATA CLASS=DATA USE32 PUBLIC ALIGN=16] 26 | [SECTION _TEXT CLASS=CODE USE32 PUBLIC ALIGN=16] 27 | %define __DATASECT__ [SECTION _DATA] 28 | %define __CODESECT__ [SECTION _TEXT] 29 | %else 30 | %define __DATASECT__ [SECTION .data] 31 | %define __CODESECT__ [SECTION .text] 32 | %endif 33 | 34 | global x86htcount,_x86htcount 35 | 36 | %define CPU_F_HYPERTHREAD 00010000h 37 | 38 | __CODESECT__ 39 | _x86htcount: 40 | x86htcount: 41 | 42 | push rbx 43 | push rcx 44 | push rdx 45 | push rsi 46 | push rdi 47 | 48 | mov esi, 0h 49 | 50 | ; See if CPUID instruction is supported ... 51 | ; ... Get copies of EFLAGS into eax and ecx 52 | pushfq 53 | pop rax 54 | mov ecx, eax 55 | 56 | ; ... Toggle the ID bit in one copy and store 57 | ; to the EFLAGS reg 58 | xor eax, 200000h 59 | push rax 60 | popfq 61 | 62 | ; ... Get the (hopefully modified) EFLAGS 63 | pushfq 64 | pop rax 65 | 66 | ; ... Compare and test result 67 | cmp ecx, eax 68 | je near NotSupported 69 | 70 | Standard: 71 | mov eax, 1h 72 | cpuid 73 | HT_test: 74 | test edx, 10000000h ; Test for Hyper-Threading support 75 | jz Return 76 | and ebx, 00FF0000h 77 | shr ebx, 16 78 | mov esi, ebx 79 | 80 | NotSupported: 81 | Return: 82 | mov eax, esi 83 | 84 | pop rdi 85 | pop rsi 86 | pop rdx 87 | pop rcx 88 | pop rbx 89 | 90 | ret 91 | -------------------------------------------------------------------------------- /ogr/amd64/ogrng64-cj1-generic.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng64_get_dispatch_table_cj1_generic 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogrng64_cycle_256_cj1_generic(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check structures layout and alignment to match assembly */ 31 | 32 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 33 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 34 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 35 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 36 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 37 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 38 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 39 | 40 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 41 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 42 | 43 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 44 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 45 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 46 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 47 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 48 | 49 | return ogrng64_cycle_256_cj1_generic(oState, pnodes, pchoose); 50 | } 51 | -------------------------------------------------------------------------------- /ogr/amd64/ogrng64-cj1-sse2-lzcnt.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng64_get_dispatch_table_cj1_sse2_lzcnt 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogrng64_cycle_256_cj1_sse2_lzcnt(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check structures layout and alignment to match assembly */ 31 | 32 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 33 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 34 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 35 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 36 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 37 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 38 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 39 | 40 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 41 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 42 | 43 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 44 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 45 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 46 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 47 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 48 | 49 | return ogrng64_cycle_256_cj1_sse2_lzcnt(oState, pnodes, pchoose); 50 | } 51 | -------------------------------------------------------------------------------- /plat/x86/x86rdtsc.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright distributed.net 2005 - All Rights Reserved 3 | ; For use in distributed.net projects only. 4 | ; Any other distribution or use of this source violates copyright. 5 | ; 6 | ; x86 Processor frequency identification for distributed.net effort 7 | ; returns output of rdtsc if available 8 | ; 9 | ; $Id: x86rdtsc.asm,v 1.2 2007/10/22 16:48:32 jlawson Exp $ 10 | ; 11 | ; return u64 12 | 13 | %ifndef __OMF__ 14 | %ifdef OS2 15 | %define __OMF__ 16 | %endif 17 | %endif 18 | 19 | %ifdef __OMF__ ; Watcom+OS/2 or Borland+Win32 20 | [SECTION _DATA CLASS=DATA USE32 PUBLIC ALIGN=16] 21 | [SECTION _TEXT CLASS=CODE USE32 PUBLIC ALIGN=16] 22 | %define __DATASECT__ [SECTION _DATA] 23 | %define __CODESECT__ [SECTION _TEXT] 24 | %else 25 | %define __DATASECT__ [SECTION .data] 26 | %define __CODESECT__ [SECTION .text] 27 | %endif 28 | 29 | global x86rdtsc,_x86rdtsc 30 | 31 | __CODESECT__ 32 | _x86rdtsc: 33 | x86rdtsc: 34 | 35 | push ebx 36 | push ecx 37 | push edx 38 | push esi 39 | push edi 40 | 41 | ; See if CPUID instruction is supported ... 42 | ; ... Get copies of EFLAGS into eax and ecx 43 | pushf 44 | pop eax 45 | mov ecx, eax 46 | 47 | ; ... Toggle the ID bit in one copy and store 48 | ; to the EFLAGS reg 49 | xor eax, 200000h 50 | push eax 51 | popf 52 | 53 | ; ... Get the (hopefully modified) EFLAGS 54 | pushf 55 | pop eax 56 | 57 | ; ... Compare and test result 58 | cmp ecx, eax 59 | je near NotSupported 60 | 61 | Standard: 62 | xor eax, eax 63 | cpuid 64 | cmp eax, 1 ; See if CPUID code 1 is supported 65 | jb near NotSupported 66 | 67 | mov eax,1 68 | cpuid 69 | test edx,00000010h ; See if Time-Stamp Counter is supported 70 | jz near NotSupported 71 | 72 | pop edi 73 | pop esi 74 | pop edx 75 | pop ecx 76 | pop ebx 77 | 78 | rdtsc ; result is returned in edx:eax 79 | ret 80 | 81 | NotSupported: 82 | pop edi 83 | pop esi 84 | pop edx 85 | pop ecx 86 | pop ebx 87 | xor eax,eax 88 | xor edx,edx 89 | ret 90 | -------------------------------------------------------------------------------- /plat/stream/amdstream_context.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Vyacheslav Chupyatov 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Special thanks for help in testing this core to: 7 | * Alexander Kamashev, PanAm, Alexei Chupyatov 8 | * 9 | * $Id: amdstream_context.h,v 1.12 2012/01/14 13:45:09 sla Exp $ 10 | */ 11 | 12 | #ifndef AMD_STREAM_CONTEXT_H 13 | #define AMD_STREAM_CONTEXT_H 14 | 15 | #include "cputypes.h" 16 | 17 | #include 18 | #include 19 | 20 | 21 | enum 22 | { 23 | CORE_NONE, // must be zero 24 | #ifdef HAVE_RC5_72_CORES 25 | CORE_IL4N, 26 | CORE_IL4NA, 27 | CORE_IL42T, 28 | CORE_IL4_1I, 29 | #endif 30 | #ifdef HAVE_OGR_CORES 31 | CORE_IL_OGRNG_BASIC, 32 | #endif 33 | CORE_IL_TOTAL 34 | }; 35 | 36 | typedef struct { 37 | int clientDeviceNo; // client GPU index (for logs) 38 | 39 | CALdevice device; 40 | CALdeviceattribs attribs; 41 | CALcontext ctx; 42 | 43 | CALresource outputRes0, outputRes1; 44 | CALresource constRes0, constRes1; 45 | CALresource globalRes0, globalRes1; 46 | 47 | CALmodule module0, module1; 48 | 49 | CALmem outputMem0, outputMem1; 50 | CALmem constMem0, constMem1; 51 | CALmem globalMem0, globalMem1; 52 | 53 | CALfunc func0, func1; 54 | CALname outName0, constName0, outName1, constName1; 55 | CALname globalName0, globalName1; 56 | 57 | CALimage image; 58 | 59 | CALint domainSizeY; 60 | CALint domainSizeX; 61 | unsigned maxIters; 62 | 63 | CALcounter idleCounter; 64 | 65 | u32 coreID; 66 | bool active; 67 | 68 | u32 USEcount; //# of Unexpected Stop Errors 69 | } stream_context_t; 70 | 71 | stream_context_t *stream_get_context(int device); 72 | 73 | void AMDStreamReinitializeDevice(stream_context_t *cont); 74 | 75 | typedef CALresult (CALAPIENTRYP PFNCALCTXWAITFOREVENTS)(CALcontext ctx, CALevent *event, CALuint num, CALuint flags); 76 | extern PFNCALCTXWAITFOREVENTS calCtxWaitForEvents; 77 | extern u32 isCalCtxWaitForEventsSupported; 78 | 79 | #endif // AMD_STREAM_CONTEXT_H 80 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse2.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_cj1_sse2 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogr_cycle_256_cj1_sse2(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check that size of cruncher thread work area is correct */ 31 | 32 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 33 | 34 | /* Check structures layout and alignment to match assembly */ 35 | 36 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 37 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 38 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 39 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 40 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 41 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 42 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 43 | 44 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 45 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 46 | 47 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 48 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 49 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 50 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 51 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 52 | 53 | return ogr_cycle_256_cj1_sse2(oState, pnodes, pchoose); 54 | } 55 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse41.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_cj1_sse41 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogr_cycle_256_cj1_sse41(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check that size of cruncher thread work area is correct */ 31 | 32 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 33 | 34 | /* Check structures layout and alignment to match assembly */ 35 | 36 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 37 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 38 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 39 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 40 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 41 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 42 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 43 | 44 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 45 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 46 | 47 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 48 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 49 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 50 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 51 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 52 | 53 | return ogr_cycle_256_cj1_sse41(oState, pnodes, pchoose); 54 | } 55 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse-p4.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_cj1_sse_p4 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogr_cycle_256_cj1_sse_p4(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check that size of cruncher thread work area is correct */ 31 | 32 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 33 | 34 | /* Check structures layout and alignment to match assembly */ 35 | 36 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 37 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 38 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 39 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 40 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 41 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 42 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 43 | 44 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 45 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 46 | 47 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 48 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 49 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 50 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 51 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 52 | 53 | return ogr_cycle_256_cj1_sse_p4(oState, pnodes, pchoose); 54 | } 55 | -------------------------------------------------------------------------------- /ogr/x86/ogrng-cj1-sse2-lzcnt.cpp: -------------------------------------------------------------------------------- 1 | #include "ansi/ogrng-64.h" 2 | 3 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 0 /* 0-2 - 'no' */ 4 | #define OGROPT_ALTERNATE_CYCLE 1 /* 0/1 - 'yes' */ 5 | #define OGR_NG_GET_DISPATCH_TABLE_FXN ogrng_get_dispatch_table_cj1_sse2_lzcnt 6 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 7 | 8 | /* 9 | ** Level datas. 10 | */ 11 | struct OgrLevel { 12 | BMAP list[OGRNG_BITMAPS_WORDS]; 13 | BMAP dist[OGRNG_BITMAPS_WORDS]; 14 | BMAP comp[OGRNG_BITMAPS_WORDS]; 15 | int mark; 16 | int limit; 17 | int pad0; 18 | int pad1; 19 | }; 20 | 21 | #include "ansi/ogrng_codebase.cpp" 22 | 23 | #include "ccoreio.h" /* CDECL */ 24 | #include /* offsetof */ 25 | 26 | extern "C" int CDECL ogr_cycle_256_cj1_sse2_lzcnt(struct OgrState *oState, int *pnodes, const u16* pchoose); 27 | 28 | static int ogr_cycle_256(struct OgrState *oState, int *pnodes, const u16* pchoose) 29 | { 30 | /* Check that size of cruncher thread work area is correct */ 31 | 32 | STATIC_ASSERT(sizeof(struct OgrState) <= OGRNG_PROBLEM_SIZE); 33 | 34 | /* Check structures layout and alignment to match assembly */ 35 | 36 | STATIC_ASSERT(offsetof(struct OgrState, max) == 0 ); 37 | STATIC_ASSERT(offsetof(struct OgrState, maxdepthm1) == 8 ); 38 | STATIC_ASSERT(offsetof(struct OgrState, half_depth) == 12); 39 | STATIC_ASSERT(offsetof(struct OgrState, half_depth2) == 16); 40 | STATIC_ASSERT(offsetof(struct OgrState, stopdepth) == 24); 41 | STATIC_ASSERT(offsetof(struct OgrState, depth) == 28); 42 | STATIC_ASSERT(offsetof(struct OgrState, Levels) == 32); 43 | 44 | STATIC_ASSERT(sizeof(struct OgrLevel) == 112); 45 | STATIC_ASSERT(sizeof(oState->Levels) == 112 * OGR_MAXDEPTH); 46 | 47 | STATIC_ASSERT(offsetof(struct OgrLevel, list) == 0); 48 | STATIC_ASSERT(offsetof(struct OgrLevel, dist) == 32); 49 | STATIC_ASSERT(offsetof(struct OgrLevel, comp) == 64); 50 | STATIC_ASSERT(offsetof(struct OgrLevel, mark) == 96); 51 | STATIC_ASSERT(offsetof(struct OgrLevel, limit) == 100); 52 | 53 | return ogr_cycle_256_cj1_sse2_lzcnt(oState, pnodes, pchoose); 54 | } 55 | -------------------------------------------------------------------------------- /ogr/cellbe/ogr-cell-spe-wrapper.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 1997-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | */ 6 | /* 7 | const char *ogr_cell_spe_wrapper_cpp(void) { 8 | return "@(#)$Id: ogr-cell-spe-wrapper.c,v 1.9 2008/12/30 20:58:43 andreasb Exp $"; } 9 | */ 10 | 11 | #ifndef CORE_NAME 12 | #define CORE_NAME cellv1 13 | #endif 14 | 15 | #include 16 | #include "ccoreio.h" 17 | #include "cputypes.h" 18 | #include "ogr-cell.h" 19 | #include 20 | 21 | #include "ansi/ogr_dat.cpp" 22 | 23 | #define SPE_CORE_FUNCTION(name) SPE_CORE_FUNCTION2(name) 24 | #define SPE_CORE_FUNCTION2(name) ogr_cycle_ ## name ## _spe_core 25 | 26 | #ifdef __cplusplus 27 | extern "C" 28 | #endif 29 | s32 CDECL SPE_CORE_FUNCTION(CORE_NAME) ( struct State*, int*, const unsigned char* ); 30 | 31 | CellOGRCoreArgs myCellOGRCoreArgs __attribute__((aligned (128))); 32 | 33 | #define DMA_ID 31 34 | 35 | int main(unsigned long long speid, addr64 argp, addr64 envp) 36 | { 37 | // Check size of structures, these offsets must match assembly 38 | STATIC_ASSERT(sizeof(struct Level) == 80); 39 | STATIC_ASSERT(sizeof(CellOGRCoreArgs) == 2464); 40 | STATIC_ASSERT(offsetof(CellOGRCoreArgs, state.Levels) == 32); 41 | 42 | (void)speid; (void)envp; 43 | 44 | // One DMA used in program 45 | mfc_write_tag_mask(1< 8 | * 9 | * ------------------------------------------------------------------ 10 | * POSIX gettimeofday() and clock_gettime() 11 | * 12 | * gettimeofday caveat: the timezone.tz_dsttime member is not accurate. 13 | * There is no way to translate the ANSI timezone variable to the 14 | * dsttime DST_* code. 15 | * ------------------------------------------------------------------ 16 | */ 17 | #ifndef __CLIDOS_TIME_H__ 18 | #define __CLIDOS_TIME_H__ "@(#)$Id: cdostime.h,v 1.2 2002/09/02 00:35:50 andreasb Exp $" 19 | 20 | #pragma pack(1) 21 | struct timeval { long tv_sec; long tv_usec; }; /* seconds and microsecs */ 22 | struct timespec { long tv_sec; long tv_nsec; }; /* seconds and nanosecs */ 23 | struct __timezone {int tz_minuteswest, tz_dsttime; }; 24 | #pragma pack(); 25 | 26 | #undef timezone 27 | #define timezone __timezone 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | int gettimeofday( struct timeval *, struct timezone * ); 34 | int clock_gettime( int /* actually clockid_t */, struct timespec * ); 35 | int getmicrotime( struct timeval * ); /* named in honor of BSD kernel */ 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #define DST_NONE 0 /* not on dst */ 42 | #define DST_USA 1 /* USA style dst */ 43 | #define DST_AUST 2 /* Australian style dst */ 44 | #define DST_WET 3 /* Western European dst */ 45 | #define DST_MET 4 /* Middle European dst */ 46 | #define DST_EET 5 /* Eastern European dst */ 47 | #define DST_CAN 6 /* Canada */ 48 | #define DST_GB 7 /* Great Britain and Eire */ 49 | #define DST_RUM 8 /* Rumania */ 50 | #define DST_TUR 9 /* Turkey */ 51 | #define DST_AUSTALT 10 /* Australian style with shift in 1986 */ 52 | 53 | typedef int clockid_t; 54 | #ifndef CLOCK_REALTIME 55 | #define CLOCK_REALTIME 0 /* supposed to be in */ 56 | #endif 57 | #define CLOCK_VIRTUAL 1 58 | #define CLOCK_PROF 2 59 | #define CLOCK_MONOTONIC 3 60 | 61 | #endif //__CLIDOS_TIME_H__ 62 | -------------------------------------------------------------------------------- /common/version.h: -------------------------------------------------------------------------------- 1 | /* -*-C-*- 2 | * 3 | * Copyright distributed.net 1997-2011 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | * 7 | * DO NOT USE C++ style comments ('//') in this file! 8 | * 9 | * --------------------------------------------------------------------- 10 | * Version bump guide: 11 | * "2.7106.435" 12 | * | | | | 13 | * | | | `--- Significant changes, eg serious bugs squashed, in 14 | * | | | ./common/ code, or simply a significant number (your call) 15 | * | | | of bug fixes, gets a "build fraction" change. 16 | * | | `------- New cores, for any platform, *requires* a "build version" 17 | * | | change, ie 2.7103.x to 2.7104.x. This is needed to be able 18 | * | | to isolate bad blocks in the master keyspace bitmap. 19 | * | | New significant feature(s) also increment build version. 20 | * | `--------- A "client contest" change follows a code freeze at which 21 | * | point the client is assumed to be stable. Code that 22 | * | would make clients incompatible with previous clients or 23 | * | proxies must be a accompanied by 'client contest' change. 24 | * `----------- Denotes a client rewrite. 25 | * --------------------------------------------------------------------- 26 | */ 27 | #ifndef __VERSION_H__ 28 | #define __VERSION_H__ "@(#)$Id: version.h,v 1.103 2012/05/17 17:58:24 stream Exp $" 29 | 30 | /* BETA etc is handled internally/at-runtime by cliident.cpp. */ 31 | /* Do not adjust for BETA here, particularly CLIENT_VERSIONSTRING. */ 32 | 33 | /* DO NOT USE C++ style comments ('//') in this file! */ 34 | 35 | #define CLIENT_MAJOR_VER 2 36 | #define CLIENT_CONTEST 91 37 | #define CLIENT_BUILD 14 38 | #define CLIENT_BUILD_FRAC 523 39 | #define CLIENT_VERSIONSTRING "2.9114-523" 40 | 41 | /* combined version used in packets etc. ... */ 42 | #define CLIENT_VERSION ( (((u32)(CLIENT_CONTEST)) * 1000000UL) + \ 43 | (((u32)(CLIENT_BUILD)) * 10000UL) + \ 44 | (((u32)(CLIENT_BUILD_FRAC)) * 1UL) ) 45 | 46 | #endif /* __VERSION_H__ */ 47 | 48 | 49 | -------------------------------------------------------------------------------- /common/pack.h: -------------------------------------------------------------------------------- 1 | /* Hey, Emacs, this a -*-C-*- file ! 2 | * 3 | * Copyright distributed.net 1997-2003 - All Rights Reserved 4 | * For use in distributed.net projects only. 5 | * Any other distribution or use of this source violates copyright. 6 | */ 7 | 8 | #ifndef __PACK_H__ 9 | #define __PACK_H__ "@(#)$Id: pack.h,v 1.3 2007/10/22 16:48:26 jlawson Exp $" 10 | 11 | /* DNETC_USE_PACK will make pack[0-8].h use #pragma pack 12 | ** 13 | ** definition of DNETC_USE_PACK_POP or DNETC_USE_PACK0 will make 14 | ** pack0.h use #pragma pack(pop) or pack(0) respectively when 15 | ** switching off packing/alignment. If only DNETC_USE_PACK is defined, 16 | ** pack0.h will use #pragma pack() */ 17 | 18 | #if defined(__GNUC__) && ((__GNUC__ > 2) || \ 19 | ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 91))) 20 | /* newer versions of gcc use a vendor-specific attribute. */ 21 | #define DNETC_PACKED1 __attribute__((packed)) 22 | #define DNETC_ALIGNED2 __attribute__((aligned(2))) 23 | #define DNETC_ALIGNED4 __attribute__((aligned(4))) 24 | #define DNETC_ALIGNED8 __attribute__((aligned(8))) 25 | #define DNETC_ALIGNED16 __attribute__((aligned(16))) 26 | #define DNETC_ALIGNED32 __attribute__((aligned(32))) 27 | 28 | #elif defined(__GNUC__) 29 | /* use pack() on old gcc's. */ 30 | #define DNETC_USE_PACK 1 31 | 32 | #elif defined(MIPSpro) 33 | /* don't use anything on MIPSpro. */ 34 | #pragma warning "no packed structures!" 35 | 36 | #elif defined(_MSC_VER) && (_MSC_VER >= 800) 37 | /* Visual C++ prints an infomational warning with pack changes. */ 38 | #pragma warning(disable:4103) 39 | #define DNETC_USE_PACK 1 40 | 41 | #elif defined(__xlC__) 42 | /* IBM xlC has pack but doesn't support pack() - instead we have to 43 | ** use pack(pop) or pack(unpack) */ 44 | #define DNETC_USE_PACK 1 45 | #define DNETC_USE_PACK_POP 1 46 | 47 | #else 48 | /* use pack() on anything we don't know. */ 49 | #define DNETC_USE_PACK 1 50 | #endif 51 | 52 | 53 | /* If these weren't defined above, then just define them to 54 | ** nothing. */ 55 | #ifndef DNETC_PACKED1 56 | # define DNETC_PACKED1 57 | # define DNETC_ALIGNED2 58 | # define DNETC_ALIGNED4 59 | # define DNETC_ALIGNED8 60 | # define DNETC_ALIGNED16 61 | # define DNETC_ALIGNED32 62 | #endif 63 | 64 | #endif /* __PACK_H__ */ 65 | -------------------------------------------------------------------------------- /common/lurk.h: -------------------------------------------------------------------------------- 1 | // Hey, Emacs, this a -*-C++-*- file ! 2 | // 3 | // Copyright distributed.net 1997-2008 - All Rights Reserved 4 | // For use in distributed.net projects only. 5 | // Any other distribution or use of this source violates copyright. 6 | // 7 | 8 | #ifndef __LURK_H__ 9 | #define __LURK_H__ "@(#)$Id: lurk.h,v 1.30 2008/12/30 20:58:41 andreasb Exp $" 10 | 11 | /* lurk: fetch/flush if modem goes online but also go online if fetch/flush needed */ 12 | #define CONNECT_LURK 0x01 13 | 14 | /* lurkonly: connect only if modem goes online. equivalent to lurk+offlinemode? */ 15 | #define CONNECT_LURKONLY 0x02 16 | 17 | /* ifacemask: limit the interfaces to watch for conn on */ 18 | #define CONNECT_IFACEMASK 0x04 19 | 20 | /* dodbyscript: run this script to initiate a dialup connection */ 21 | #define CONNECT_DODBYSCRIPT 0x08 22 | 23 | /* dodbyprofile: use this profile when initiating a dialup connection */ 24 | #define CONNECT_DODBYPROFILE 0x10 25 | #define CONNECT_DOD (CONNECT_DODBYSCRIPT|CONNECT_DODBYPROFILE) 26 | 27 | struct dialup_conf 28 | { 29 | int lurkmode; // 0 = disabled, 1=CONNECT_LURK, 2=CONNECT_LURKONLY 30 | int dialwhenneeded; // 0 = we don't handle dial, !0 we dial/hangup 31 | char connprofile[64]; // Used by win32 for name of DUN connection to use. 32 | char connifacemask[64]; // a list of interfaces to monitor for online state 33 | char connstartcmd[64]; // name of script to call to start connection 34 | char connstopcmd[64]; // name of script to call to stop connection 35 | }; 36 | 37 | // initialization/stop. -> 0=success, !0 = failure 38 | int LurkStart(int nonetworking, struct dialup_conf *); 39 | int LurkStop(void); 40 | 41 | // state info 42 | int LurkIsWatching(void); //Start() was ok and CONNECT_LURK|LURKONLY|DOD */ 43 | int LurkIsWatcherPassive(void); //Start was ok and lurkmode is CONNECT_LURKONLY 44 | int LurkIsConnected(void); // test (and say) connection state 45 | const char **LurkGetConnectionProfileList(void); //get the list of conn profiles 46 | int LurkGetCapabilityFlags(void); //return supported CONNECT_* bits 47 | 48 | // methods used for dialup initiation/hangup 49 | int LurkDialIfNeeded(int ignore_lurkonly_flag); // -> 0=success, !0 = failure 50 | int LurkHangupIfNeeded(void); // -> 0=success, !0 = failure 51 | 52 | #endif /* __LURK_H__ */ 53 | 54 | -------------------------------------------------------------------------------- /ogr/x86/ogr-d.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2001-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Wrapper around ogr64.cpp for assembly x86 64-bit cores. 7 | * 8 | * $Id: ogr-d.cpp,v 1.5 2008/12/30 20:58:44 andreasb Exp $ 9 | */ 10 | 11 | #include 12 | #include "cputypes.h" /* HAVE_I64 */ 13 | #include "ccoreio.h" /* CDECL */ 14 | 15 | #ifdef HAVE_I64 16 | 17 | /* 18 | * Intensive optimizations not required, we need only support functions. 19 | * Default settings are Ok, only OGROPT_HAVE_OGR_CYCLE_ASM changed. 20 | */ 21 | 22 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - '100% asm' */ 23 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 1 /* 0/1 - 'yes' (default) */ 24 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 25 | #define OGROPT_HAVE_OGR_CYCLE_ASM 1 /* 0-2 - 'yes', need found_one() */ 26 | 27 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table_asm_mmx 28 | 29 | #include "asm-x86-p2.h" 30 | #include "ansi/ogrp2-64.h" 31 | #include "ansi/ogrp2_codebase.cpp" 32 | 33 | /* 34 | * This is a manager for all 64-bit assembly X86 OGR cores. 35 | * 36 | * See comments in ogr-c.cpp regarding calling conventions and function names. 37 | */ 38 | 39 | #if defined(__cplusplus) 40 | extern "C" { 41 | #endif 42 | 43 | #define CYCLE_THUNK(func) \ 44 | extern "C" int CDECL ogr_##func##_asm( \ 45 | void *state, \ 46 | int *pnodes, \ 47 | int with_time_constraints, \ 48 | unsigned char const *choose_dat, \ 49 | int (CDECL *found_one_cdecl_func)(const struct State *oState) \ 50 | ); \ 51 | static int ogr_cycle(void *state, int *pnodes, int with_time_constraints) \ 52 | { \ 53 | return ogr_##func##_asm(state, pnodes, with_time_constraints, ogr_choose_dat, found_one_cdecl_thunk); \ 54 | } 55 | 56 | static int CDECL found_one_cdecl_thunk(const struct State *oState) 57 | { 58 | STATIC_ASSERT( sizeof(struct Level) == 0x50 ); 59 | STATIC_ASSERT( offsetof(struct State, Levels) == 32 ); 60 | STATIC_ASSERT( offsetof(struct State, node_offset) == 0x980 ); 61 | 62 | return found_one(oState); 63 | } 64 | 65 | CYCLE_THUNK(watcom_rt1_mmx64); 66 | 67 | #if defined(__cplusplus) 68 | } 69 | #endif 70 | 71 | #endif // HAVE_I64 72 | -------------------------------------------------------------------------------- /ogr/x86/ogr-e.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright distributed.net 2001-2008 - All Rights Reserved 3 | * For use in distributed.net projects only. 4 | * Any other distribution or use of this source violates copyright. 5 | * 6 | * Wrapper around ogr64.cpp for assembly x86 64-bit cores. 7 | * 8 | * $Id: ogr-e.cpp,v 1.5 2008/12/30 20:58:44 andreasb Exp $ 9 | */ 10 | 11 | #include 12 | #include "cputypes.h" /* HAVE_I64 */ 13 | #include "ccoreio.h" /* CDECL */ 14 | 15 | #ifdef HAVE_I64 16 | 17 | /* 18 | * Intensive optimizations not required, we need only support functions. 19 | * Default settings are Ok, only OGROPT_HAVE_OGR_CYCLE_ASM changed. 20 | */ 21 | 22 | #define OGROPT_HAVE_FIND_FIRST_ZERO_BIT_ASM 2 /* 0-2 - '100% asm' */ 23 | #define OGROPT_STRENGTH_REDUCE_CHOOSE 1 /* 0/1 - 'yes' (default) */ 24 | #define OGROPT_NO_FUNCTION_INLINE 0 /* 0/1 - 'no' (default) */ 25 | #define OGROPT_HAVE_OGR_CYCLE_ASM 1 /* 0-2 - 'yes', need found_one() */ 26 | 27 | #define OGR_GET_DISPATCH_TABLE_FXN ogr_get_dispatch_table_asm_mmx_amd 28 | 29 | #include "asm-x86-p2.h" 30 | #include "ansi/ogrp2-64.h" 31 | #include "ansi/ogrp2_codebase.cpp" 32 | 33 | /* 34 | * This is a manager for all 64-bit assembly X86 OGR cores. 35 | * 36 | * See comments in ogr-c.cpp regarding calling conventions and function names. 37 | */ 38 | 39 | #if defined(__cplusplus) 40 | extern "C" { 41 | #endif 42 | 43 | #define CYCLE_THUNK(func) \ 44 | extern "C" int CDECL ogr_##func##_asm( \ 45 | void *state, \ 46 | int *pnodes, \ 47 | int with_time_constraints, \ 48 | unsigned char const *choose_dat, \ 49 | int (CDECL *found_one_cdecl_func)(const struct State *oState) \ 50 | ); \ 51 | static int ogr_cycle(void *state, int *pnodes, int with_time_constraints) \ 52 | { \ 53 | return ogr_##func##_asm(state, pnodes, with_time_constraints, ogr_choose_dat, found_one_cdecl_thunk); \ 54 | } 55 | 56 | static int CDECL found_one_cdecl_thunk(const struct State *oState) 57 | { 58 | STATIC_ASSERT( sizeof(struct Level) == 0x50 ); 59 | STATIC_ASSERT( offsetof(struct State, Levels) == 32 ); 60 | STATIC_ASSERT( offsetof(struct State, node_offset) == 0x980 ); 61 | 62 | return found_one(oState); 63 | } 64 | 65 | CYCLE_THUNK(watcom_rt1_mmx64_amd); 66 | 67 | #if defined(__cplusplus) 68 | } 69 | #endif 70 | 71 | #endif // HAVE_I64 72 | -------------------------------------------------------------------------------- /ogr/cellbe/ogrng-cell.h: -------------------------------------------------------------------------------- 1 | #ifndef __OGR_CELL_H__ 2 | #define __OGR_CELL_H__ 3 | 4 | #define IMPLEMENT_CELL_CORES /* Required by ogr-vec.cpp */ 5 | #undef HAVE_FLEGE_PPC_CORES /* Don't use PPC assembly */ 6 | #include "ppc/ogrng-vec.cpp" /* Vectored stub structures */ 7 | 8 | #define OGROPT_SPECIFIC_LEVEL_STRUCT 9 | /* 10 | ** Level datas - mark and limit can be loaded as SPU vectors 11 | */ 12 | #ifdef __SPU__ 13 | #define fake_vector(var) __vector int var 14 | #else 15 | #define fake_vector(var) int var; int var##pad[3] 16 | #endif 17 | struct OgrLevel { 18 | BMAP list[OGRNG_BITMAPS_WORDS]; 19 | BMAP dist[OGRNG_BITMAPS_WORDS]; 20 | BMAP comp[OGRNG_BITMAPS_WORDS]; 21 | fake_vector(mark); 22 | fake_vector(limit); 23 | }; 24 | 25 | #ifdef __SPU__ 26 | #include "ansi/ogrng_corestate.h" /* Get only "State" structure */ 27 | #else 28 | #include "ansi/ogrng_codebase.cpp" /* Get "State" structure and basic code */ 29 | #endif 30 | 31 | #define SIGN_PPU_TO_SPU_1 0xDEADFACE 32 | #define SIGN_PPU_TO_SPU_2 0xC0FFEE11 33 | #define SIGN_SPU_TO_PPU_1 0xFEEDBEEF 34 | #define SIGN_SPU_TO_PPU_2 0xC0DAC01A 35 | 36 | /* Return codes for internal bugchecks. (OGR-NG-cycle normal exit code is always zero) */ 37 | 38 | #define RETVAL_ERR_BAD_SIGN1 55 39 | #define RETVAL_ERR_BAD_SIGN2 66 40 | #define RETVAL_ERR_TRASHED_SIGN1 77 41 | #define RETVAL_ERR_TRASHED_SIGN2 88 42 | 43 | typedef struct 44 | { 45 | u32 sign1, pad1[3]; /* force padding of 'state' to 16 */ 46 | 47 | struct OgrState state; 48 | int pnodes; 49 | int ret_depth; 50 | u32 upchoose; 51 | 52 | u32 sign2; 53 | 54 | u32 cache_misses; /* have to load new element */ 55 | u32 cache_hits; /* cached data used */ 56 | u32 cache_purges; /* have to purge old entry before load of new one */ 57 | u32 cache_search_iters; /* elements checked before decision */ 58 | u32 cache_maxlen; /* storage blocks in cache */ 59 | u32 cache_curlen; /* used storage blocks */ 60 | 61 | } CellOGRCoreArgs; 62 | 63 | typedef union { 64 | ui64 a64; 65 | u32 a32[2]; 66 | } addr64; 67 | 68 | /* 69 | * Enable run-time collection of LS cache history usage. 70 | * Use for debugging only, may seriously affect performance. 71 | */ 72 | // #define GET_CACHE_STATS 73 | 74 | // #define STATIC_ASSERT(cond) { typedef int foo[(cond) ? 1 : -1]; } 75 | 76 | #endif // __OGR_CELL_H__ 77 | --------------------------------------------------------------------------------