Creating real bool type for simulation in physics
Hello, I use freebsd/amd64 (RELENG_6) for simulation in physics. I am working on the Ising model: an assembly of spins (micromagnets) which interact and which are in one of two states (up or down). Until now I use char to define the state of each spin (-1 or 1), however, I remarked that most time is spent on memory I/O. Most of bits are unused. I think that if I can use just one bit per spin, I can have something much faster. I need advices on how to use it. I guess I can't define a new type with a 1/8 byte height (or one bit), yes ? What variable (int, char...) do you recommend to use for a sempron 64 bits. I think I'll need to define new operators (opaque operators, built with bit operators) to switch my spins or use directly the following: & | ^ ~ ... May I gain speed using MMX registers or something like this ? How can I do this ? Here is my basic and multithreaded program: http://scienceclue.ath.cx/download/ising_lps_0.2.tar.bz2 Thanks Mathieu P. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Why do we have the orm device?
In message: <[EMAIL PROTECTED]> Darren Pilgrim <[EMAIL PROTECTED]> writes: : I see it on all of my machines and have never seen it used by anything. : The orm(4) man page says it's part of ISA bus support and is designed : to claim ROMs sitting in the memory address space, but doesn't go into : any detail why it's necessary to prevent other drivers from using ROM : addresses. : : So why do we have this device? The ROMs that sit on the ISA bus in expansion cards and as part of video support cannot be used for other purposes. orm prevents that by allocating those resources. This prevents collisions with old ISA devices like 16-bit PC Card bridges, many network cards that have shared memory, as well as some scsi cards that also do the same. Many of these ISA devices have the ability to set which address range to use. If there's a ROM where the driver picks, then it just won't work. You can't have two devices decode the same address. Warner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Creating real bool type for simulation in physics
In the last episode (Mar 13), Mathieu Prevot said: > I use freebsd/amd64 (RELENG_6) for simulation in physics. I am > working on the Ising model: an assembly of spins (micromagnets) which > interact and which are in one of two states (up or down). Until now I > use char to define the state of each spin (-1 or 1), however, I > remarked that most time is spent on memory I/O. Most of bits are > unused. > > I think that if I can use just one bit per spin, I can have something > much faster. I need advices on how to use it. I guess I can't define > a new type with a 1/8 byte height (or one bit), yes ? What variable > (int, char...) do you recommend to use for a sempron 64 bits. I think > I'll need to define new operators (opaque operators, built with bit > operators) to switch my spins or use directly the following: & | ^ ~ > ... Take a look at the "bitstring" functions, which let you allocate an array of "bits" and manipulate them individually. They're documented in the bitstring manpage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Modifying and compiling openpam / passwd.c
Hello, I'm working on a personal-learning project using FreeBSD 5.4 that requires me to recompile passwd.c. My deliema is simple: I want to be able to make changes to /usr/src/contrib/openpam/lib/pam_get_authtok.c and have these changes compiled into passwd. First I ran "make all install" in /usr/src/usr.bin/passwd but this did not incorporate the changes into the passwd executable. Thinking that I need to rebuild OpenPAM, I have been trying to run ./configure in /usr/src/contrib/openpam, however when I run "make all" the make errors out by saying: ../libtool: line 321: s%^.*/%%: No such file or directory [snip - many more libtool errors between these] ../libtool: line 718: -e: command not found : compile: cannot determine name of library object from `' *** Error code 1 I am writing this question to the hackers list because it does not appear (to me) to be a regular user question. Rebuilding ps was simple enough, but I must be missing something with passwd. Thank you for your consideration, J. Hunt _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"