Fedora 8 x64 and Bluetooth Keyboard


In the file of /etc/bluetooth/hcid.conf,
A line of pin_helper was not there.
So I added “pin_helper /usr/bin/bluez-pin
At the same time, the pin_helper command should be added. I took it from Fedora core 6. Then, I restarted the bluetooth service.
Finally, Apple’s Wireless Bluetooth keyboard works great.
(I didn’t have to do this with Fedora 7 at all…)

Advertisements

SSE4.1 Hack

Many SIMD integer instructions are added to E8400 and Nehalem core CPUs

So, let’s see what we can do with the instructions: http://en.wikipedia.org/wiki/SSE4#SSE4.1

Boring samples will be fibonacci or exponent e calculation?
BigInteger Implementation in C++ might be good candidate.
PMULD, MPSADBW will be powerful to use.

Posted in ASM, SIMD, SSE. Tags: , , , . Leave a Comment »

E8400 Over-clocking with GA-965P-DS3

It doesn’t overclock at all as I expected with my mother board and I believe the mother board BIOS(F130) is beta and it is not working yet. Also, FSB cannot be set as 400 no matter what I try.

Currently the E8400 is working as follows:

Intel Core 2 Duo E8400 3.0Ghz (9 * 333)
Motherboard: GA-965P-DS3 rev 1.33 BIOS F130
Memory: 1GB x 2 (5-5-5-18 @ 667)
CPU V-Core: 1.225
CPU Cooler Zalman CNP8700 LED

Image Color Filter using DirectX and Cg Fragment Shader

This diagram shows one original image at top left and two images after color filter.
The right top one is post processed by Sepia color filter at Fragment Shader.
The left bottom one is post processed by Grey color filter at Fragment Shader, which may be not clear but it is mono tone color.

I think simple color filters are easiest thing to start with.
Also, I made the fragment shader to be simplest.

Basically the DirectX program send a 4×4 color filter matrix. It is usable for color filter which take a pixel as input and modify the color using the given pixel color.

For example,

Sepia Color Filter is declared as follows:

const float sepia[4][4] =
{
0.393f, 0.769f, 0.189f, 0.0f,
0.349f, 0.686f, 0.168f, 0.0f,
0.272f, 0.534f, 0.131f, 0.0f,
1.351f, 1.203f, 2.140f, 1.0f
};

By using this 4×4 matrix, I implemented in the fragment shader as follows:

Pseudo-code
pixel.r = vector4f(pixel) * vector4f(0.393f, 0.769f, 0.189f, 0.0f,)
pixel.g = vector4f(pixel) * vector4f(0.349f, 0.686f, 0.168f, 0.0f)
pixel.b = vector4f(pixel) * vector4f(0.393f, 0.769f, 0.189f, 0.0f,)
pixel = pixel / vector4f(1.351f, 1.203f, 2.140f, 1.0f)

[Fragment Shader in Cg]

pixel main( fragment IN,
uniform sampler2D testTexture,
uniform float4 colorFilter[4])
{

pixel texture, OUT;

//Load Texture Color
texture.color = tex2D( testTexture, IN.texcoord0 );

//Color Filer
float4 result;

result.r = sum(texture.color * colorFilter[0]);
result.g = sum(texture.color * colorFilter[1]);
result.b = sum(texture.color * colorFilter[2]);
result.a = 1.0;
result /= colorFilter[3];

OUT.color = float4(result.r, result.g, result.b, result.a);
return OUT;
}

Posted in Cg, DirectX. Tags: . 2 Comments »

CUDA using Eclipse CDT (C++ Development Tool)

CUDA’s sample projects uses some automated makefile which is not initially usable by Eclipse.

1. Create Eclipse Makefile Project

2. Modify common.mk

By default, CUDA’s makefile includes common.mk. When I try to use the makefile, Eclipse complains “no target error”
So, I just added “all: $(TARGET)” in the target section in common.mk

Then, I tried Eclipse again. It complains “nvcc” not found. Great. Just modify nvcc into /usr/local/cuda/nvcc

Finally, everything works great.
Be sure that existing projects doesn’t have any side effects by modifying common.mk

My environment:
Mac Book Pro (Intel)
OS: OS X 10.5.2 (Leopard)
GPU: 8600M GT 128MB
IDE: Eclipse CDT (eclipse-cpp-europa-winter-macosx-carbon)

Posted in CUDA, MPMD. Tags: , , . 8 Comments »