Go to advanced search

by Bakul Shah
Tue May 21, 2013 11:14 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 27395

Re: Something the Pi is not good at - calculating Pi

It has been suggested that advantage can be taken of the GPU even without knowing about its internals. That is by using the OpenGL ES API. This may well be true, but then in my quick Googling around of have not seen anyone anywhere doing that for any platform with OpenGL. ES or otherwise. I would s...
by Bakul Shah
Tue May 21, 2013 10:08 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 27395

Re: Something the Pi is not good at - calculating Pi

The Pi digit problem may not be amenable to a GPU solution on the Pi board compared with the ARM CPU and FPU (that people keep conveniently forgetting about), and while I may not have time to determine it, there are people who can, and I'm going to enlist their help. More about that in the next pos...
by Bakul Shah
Tue May 21, 2013 9:52 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 27395

Re: Something the Pi is not good at - calculating Pi

Bakul, A nice summary but I am slightly puzzled by one point. We have already established the title of this discussion thread is false. Probably a good thing in hindsight : - ) Do you mean that the Pi is a good platform for calculating pi? I would say that the Pi is an acceptable platform for the j...
by Bakul Shah
Mon May 20, 2013 10:38 pm
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 27395

Re: Something the Pi is not good at - calculating Pi

There are several intermingled threads. We have already established the title of this discussion thread is false. Probably a good thing in hindsight : - ) There are several algorithms that are much faster at computing pi (AGM, Chudnovksy etc.) than the old "schoolboy method". An integral component o...
by Bakul Shah
Sat May 18, 2013 11:33 pm
Forum: Other programming languages
Topic: Flumoxed - C To Pascal code conversion
Replies: 7
Views: 2031

Re: Flumoxed - C To Pascal code conversion

I am guessing either you are running this as a normal user or you didn't open /dev/mem and put the resulting file descriptor in mem_fd. But there is no need for GetMem(). You can even do something like the following if you don't care about wasting an open file descriptor! gpioreg := Fpmmap(Nil, BLOC...
by Bakul Shah
Fri May 17, 2013 9:13 pm
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 27395

Re: Something the Pi is not good at - calculating Pi

If anyone who can read actually goes and looks at the honorable Ooura-san's source (http://left404.com/misc/files/pi_css5/pi_css5_src.tgz), they will see references to FFT, which a few folks here should recognize as the Fast Fourier Transform. In particular, there is a curious note about "Number of...
by Bakul Shah
Fri May 17, 2013 6:51 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 27395

Re: Something the Pi is not good at - calculating Pi

Takuya Ooura's pi_css5 program on the Raspi computes the first million digits of Pi in under 79 seconds (compared to under 3s on a 3.6Ghz AMD FX). So I'd say the Raspi is plenty fast!

And Jim, AFAIK programs computing first N digits of π don't benefit by using a GPU!
by Bakul Shah
Wed May 01, 2013 6:01 am
Forum: Troubleshooting
Topic: SOLVED overclocking apparently works for RAM and not for CPU
Replies: 6
Views: 964

Re: overclocking apparently works for RAM and not for CPU

IIRC you have to add

force_turbo=1

to config.txt. Without this it will only ramp up the processor clock as needed.
by Bakul Shah
Mon Apr 29, 2013 9:21 am
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 186476

Re: USB redux

In general moving the FIQ code to the GPU is quite simple but doesn't really get you very much (it's just removing a very small piece of code that probably executes something like 0.01% of the CPU). This is much better; I didn't think it would be quite so simple. Anyway, if you did just that, would...
by Bakul Shah
Mon Apr 29, 2013 7:27 am
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 186476

Re: USB redux

The crux of the matter is, the hardware within the R-pi was never intended to be a PC-level host. The Designware OTG controller is just that - an on-the-go USB controller which has "dual role" capability - in that it can act as either a host or a device - but as an OTG host would only ever be expec...
by Bakul Shah
Fri Apr 26, 2013 9:35 am
Forum: Off topic discussion
Topic: Parallella: A Supercomputer For Everyone
Replies: 156
Views: 43457

Re: Parallella: A Supercomputer For Everyone

Designing school timetables is notoriously difficult. Timetable construction is an NP-complete problem. See Jeff Kingston's paper on timetable construction complexity. Available on his home page @ Uni of Sydney. It also points to some free software for High school timetabling. A good survey o timet...
by Bakul Shah
Wed Apr 24, 2013 7:13 am
Forum: Off topic discussion
Topic: Parallella: A Supercomputer For Everyone
Replies: 156
Views: 43457

Re: Parallella: A Supercomputer For Everyone

Extracting parallelism from general programs is incredibly hard and may be impossible. However, there are many problems that are inherently parallel (some kinds of image processing, wind tunnel simulation, weather simulation, quantum chromodynamics) and mapping them onto a parallel machine is not h...
by Bakul Shah
Sun Apr 21, 2013 7:54 pm
Forum: General discussion
Topic: How fast (slow) is the Rasperry Pi?
Replies: 37
Views: 5197

Re: How fast (slow) is the Rasperry Pi?

Engineering is not about an "ideal" design but about "good enough" design [..] My work ethic revolves around the concept of personal pride in one's work and "good enough" is never good enough; you should always do your best. You misunderstand. Pride in one's work and a good enough design are not in...
by Bakul Shah
Sat Apr 20, 2013 11:05 pm
Forum: General discussion
Topic: How fast (slow) is the Rasperry Pi?
Replies: 37
Views: 5197

Re: How fast (slow) is the Rasperry Pi?

This is of course not meant as criticism of the Raspberry Pi, far from it. Merely putting things into perspective. The Pi was designed with certain use cases in mind. It's perhaps not the ideal platform for video editing or number crunching. ;) It really depends. Engineering is not about an "ideal"...
by Bakul Shah
Sat Apr 20, 2013 7:47 pm
Forum: Plan 9
Topic: keyboard problems
Replies: 4
Views: 13000

Re: keyboard problems

If you keyboard is in the list on this page http://elinux.org/RPi_VerifiedPeripherals then start looking at power issues. Note that this list is for Linux . Many peripherals on this list don't work on Plan9. I have the same microsoft 2000 keyboard and can conform it doesn't work. I just use another...
by Bakul Shah
Fri Apr 12, 2013 10:17 pm
Forum: Plan 9
Topic: the swedish chef and his kbmap
Replies: 1
Views: 7519

Re: the swedish chef and his kbmap

I don't see a swedish kbmap in /sys/lib/kbmap but there is a /sys/lib/kbmap/no -- may be you can create /sys/lib/kbmap/se from it? The format of this file seems pretty simple: table# scancode unicode . IIRC table 0 is unshifted, 1 is shifted, 2 is alt, 3 is altgr, 4 is control. "man 3 kbmap" for det...
by Bakul Shah
Sun Apr 07, 2013 4:14 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 3338

Re: Another possible method to access GPIO

It depends. Convenience functions for your own use are best left in bashrc instead of cluttering up ~/bin. If they evolve into something more useful, you can move them to your own bin and clean them up a bit, add usage and so on. If they are more generally useful they can migrate to a more general p...
by Bakul Shah
Sun Apr 07, 2013 3:56 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 3338

Re: Another possible method to access GPIO

For interactive use you can stick them in ~/.bashrc. If you want to use them from other scripts, stick them in a file and set env var BASH_ENV to the path for this file. See bash manpage for exact details. Edit: if you add new definitions to .bashrc, to make them visible in your currently running sh...
by Bakul Shah
Sun Apr 07, 2013 3:36 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 3338

Re: Another possible method to access GPIO

Instead of all this rigmarole, you can just use functions. For instance setpin() { echo $2 >/sys/class/gpio/gpio$1/value } Or if you prefer, setpin() { sudo sh -c "echo $2 >/sys/class/gpio/gpio$1/value" } Though I generally don't like embedding dangerous commands like sudo in scripts or functions. I...
by Bakul Shah
Tue Apr 02, 2013 9:41 am
Forum: Bare metal, Assembly language
Topic: Memory Paging
Replies: 16
Views: 5806

Re: Memory Paging

That said, I was reading about memory paging, and I asked myself the following question: is there anyway to access a concrete physical address from a program? I was looking how GPIO were accessed, and I saw some references to 0x20000000 (BCM2708_PERI_BASE), and I thought: how does the MMU know when...
by Bakul Shah
Mon Apr 01, 2013 6:55 am
Forum: HATs and other add-ons
Topic: Setup code rejected by C++ compiler
Replies: 10
Views: 2217

Re: Setup code rejected by C++ compiler

Why not just use char* gpio_mem_orig = new char[BLOCK_SIZE + PAGE_SIZE-1]; malloc() returns a void* and while C allows assigning it to any pointer, C++ doesn't. You should use new in C++ as malloc() is a C-ism (though if I were you, I'd just leave the original C alone and wrap a corresponding header...
by Bakul Shah
Sun Mar 31, 2013 8:20 pm
Forum: Bare metal, Assembly language
Topic: Memory Paging
Replies: 16
Views: 5806

Re: Memory Paging

So swapping to/from disk (or not) is a side effect of a page fault meaning an application accessed a memory page that was marked as protected from that application. As a historical note and terminology nit, when I first started on unix, way back in the late 70s, they didn't have virtual memory. The...
by Bakul Shah
Sun Mar 31, 2013 6:17 pm
Forum: Other projects
Topic: LambdaPi
Replies: 9
Views: 4120

Re: LambdaPi

Given that you are compiling to asm, is there any benefit to flat closures? As opposed to? One way or another, I need to implement closures, flat closures give a handy speed boost at the cost of additional memory usage. As opposed to just storing a static link (to the lexically closest surrounding ...
by Bakul Shah
Sat Mar 30, 2013 12:03 am
Forum: Other projects
Topic: LambdaPi
Replies: 9
Views: 4120

Re: LambdaPi

Good to see this progress, Simon!

Given that you are compiling to asm, is there any benefit to flat closures?
by Bakul Shah
Thu Mar 28, 2013 8:10 am
Forum: Troubleshooting
Topic: borderline sdcard or a bug?
Replies: 2
Views: 464

borderline sdcard or a bug?

Strange symptom: I can read/write an SDcard fine on a Mac but it will no longer boot the RPi it was plugged in for the last 9 months or so. This particular RPi worked fine until the last RPI-update. What happens is the green LED blinks 3 times in rapid succession every few seconds. [This supposedly ...

Go to advanced search