Updates and fixes to 1991/davidguy
The README.md file has been format and typo checked. The Makefile was updated slightly to disable implicit int warning and also to include certain header files for the syscalls used. This is not strictly necessary but since some systems (like macOS) do have problems with some functions not being declared this was done as it does not have an adverse effect.
This commit is contained in:
1 parent
2772dc8827
commit
478e620eaa
3 files changed
+19
-11
No files matched your search
@@ -40,7 +40,7 @@ include ../../var.mk
|
||||
#
|
||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
||||
-Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare \
|
||||
-Wno-deprecated-non-prototype
|
||||
-Wno-deprecated-non-prototype -Wno-implicit-int
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
@@ -63,7 +63,7 @@ CDEFINE=
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
CINCLUDE=
|
||||
CINCLUDE= -include sys/types.h -include sys/socket.h -include unistd.h
|
||||
|
||||
# Optimization
|
||||
#
|
||||
|
||||
@@ -106,15 +106,15 @@ be computed by a boolean circuit. In addition, intermediate values
|
||||
computed by the circuit can be shared between neighboring cells,
|
||||
reducing the number of gates per cell required. These ideas
|
||||
have been used before, to compute the next generation through a
|
||||
series of bit blits. Instead of doing this, we map values in the
|
||||
circuit to bits in registers, so that the next generation can be
|
||||
computed efficiently within registers, minimizing memory accesses.
|
||||
As a result, the computation of the next generation is performed
|
||||
with about 1.6 instructions per life cell, consisting of .125
|
||||
memory accesses, .17 shifts, and 1.3 logic operations. The net
|
||||
result is that the time to transfer the bits to the X server, and
|
||||
for the X server to draw them on the screen, dominates the time to
|
||||
compute the next generation.
|
||||
series of [bit blits](https://en.wikipedia.org/wiki/Bit_blit).
|
||||
|
||||
Instead of doing this, we map values in the circuit to bits in registers, so
|
||||
that the next generation can be computed efficiently within registers,
|
||||
minimizing memory access. As a result, the computation of the next generation
|
||||
is performed with about 1.6 instructions per life cell, consisting of .125
|
||||
memory accesses, .17 shifts, and 1.3 logic operations. The net result is that
|
||||
the time to transfer the bits to the X server, and for the X server to draw them
|
||||
on the screen, dominates the time to compute the next generation.
|
||||
|
||||
|
||||
## Copyright and CC BY-SA 4.0 License:
|
||||
|
||||
@@ -1129,6 +1129,14 @@ him): `k` for forward, `h` for left and `l` for right. This version also has a
|
||||
more useful way to exit, just entering `q` followed by enter.
|
||||
|
||||
|
||||
## [1991/davidguy](1991/davidguy/davidguy.c) ([README.md](1991/davidguy/README.md]))
|
||||
|
||||
As some systems like macOS can be particular about not declaring functions Cody
|
||||
added to the Makefile some `-include` options. These appear to not be strictly
|
||||
necessary but it was done due to other syscalls being a problem not being
|
||||
declared first.
|
||||
|
||||
|
||||
## [1991/dds](1991/dds/dds.c) ([README.md](1991/dds/README.md]))
|
||||
|
||||
Cody fixed a segfault that prevented this entry from working in any condition
|
||||
|
||||
Reference in new issue
Block a user