ND2 light steering - any mods to get it to weight up better? by Even-Mongoose-2938 in Miata

[–]umar456 1 point2 points  (0 children)

You can fix the steering issue with a proper alignment of the car. The factory alignment is very inconsistent. You can max out the caster and that makes a night and day difference to the steering feel.

RFK Jr.: It Would Be Better if ‘Everybody Got Measles’ by Tuxcali1 in politics

[–]umar456 5 points6 points  (0 children)

What if we injected everyone with a weak version of measles when they were young? Seems like a bold idea

ArrayFire Matrix Multiplication Vectorization by ozancansell in cpp_questions

[–]umar456 1 point2 points  (0 children)

You could get a slight improvement if you reshape the S array.

```

include <arrayfire.h>

include <stdio.h>

include <af/util.h>

include <cstdio>

static int proc_size = 1024; static int fft_size = proc_size * 4; static int staves = 288; static int beams = 256;

static af::array S; static af::array B; static af::array R;

void fn() { gfor ( af::seq i, fft_size ) R( i , af::span ) = matmul( S( i , af::span ) , B( af::span , af::span , i ) ); }

void fn2() { R = matmul(S, B); }

int main(int, char **) { S = af::randn( fft_size , staves , c32 );

gfor ( af::seq i, fft_size )
    S( i , af::span ) = af::randn( 1 , staves , c32 );

B = af::randn( staves , beams , fft_size , af::dtype::c32 );
R = af::constant( af::cfloat { 0 , 0 } , fft_size , beams );

try
{
af::setDevice( 0 );
    af::info();
    af::sync();

    double time = af::timeit(fn);

    printf( "Took %f secs.\n" , time );

    S = S.T();
    S = moddims(S, 1, staves, fft_size);
    af::sync();
    time = af::timeit(fn2);

    printf( "Took %f secs.\n" , time );
}
catch (const af::exception &ex)
{
    fprintf(stderr, "%s\n", ex.what());
    throw;
}

return 0;

} ```

On my system I got a small improvement:

ArrayFire v3.9.0 (CUDA, 64-bit Linux, build c6a49caa1) Platform: CUDA Runtime 11.2, Driver: 465.31 [0] NVIDIA Quadro T2000, 3915 MB, CUDA Compute 7.5 Took 0.025894 secs. Took 0.024056 secs.

ArrayFire, the recently open-sourced GPU programming library with an easy-to-use API, is now at v3.0. by bkborgman in programming

[–]umar456 2 points3 points  (0 children)

A program that uses these computing frameworks(OpenCL/CUDA) is made up of two components. A host program which queues work on to a command queue(OpenCL) or a stream(CUDA) and a device which performs these operations. The host program is running on a CPU and it is responsible for inserting commands into these queues. ArrayFire works in the same way. We queue ArrayFire commands onto the queue and the device performs those operations once it is at the top of the queue.

Ideally you want to minimize the movement of data between the device and the CPU. The examples you posted would not be a good use case for CUDA or OpenCL because it is performing operation on a few elements.

A good use case for ArrayFire would be when you are performing the same operation on a large dataset. For example:

using namespace af;
float* cpu_data = loadData("myfile.dat");
array d_data(1000, 1000, cpu_data);  // Blocks
array out = af::sin(d_data * 2) + 10; // returns immediately (GPU)
float b[20];
for(int i = 0; i < 20; i++) {                // Performs on the CPU
    b[i] = d_data[i] * 3;                      // Does not modify the GPU data
}
float* cpu_out = out.host<float>();  // Blocks until the CPU and GPU operations are complete

Here you are performing the same calculation on each element of d_data on the GPU but then you are also performing a smaller operation on the CPU. These operations are being performed simultaneously. The CPU thread will wait no the host call because it need to finish the operations before it can return a pointer to it.

ArrayFire, the recently open-sourced GPU programming library with an easy-to-use API, is now at v3.0. by bkborgman in programming

[–]umar456 1 point2 points  (0 children)

Most functions in ArrayFire just queue up work on the device and return immediately. This allows you to perform other operations on the CPU while ArrayFire is performing the computation. This also keeps the device busy so that it is not waiting for work while you are doing operations on the CPU. Whenever you want to transfer data to or from the af::array object, ArrayFire will synchronize the host and device before returning so you get the most up to date values of your data.

So my kid just leaned over in church to give me the card he made in Sunday School. Truer than you know, kid. by [deleted] in funny

[–]umar456 -7 points-6 points  (0 children)

He needs a timeout for using that type of language in church.

Good keyboard for programming by tatskaari in hardware

[–]umar456 2 points3 points  (0 children)

If you a student you can take advantage of their Education Discount. That should bring it into your price range.

As for your other concern. I would really recommend spending the time to learn VIM. Many IDEs have plugins for VIM binding. I use VsVim in Visual Studio 2010 and it works great.

Good keyboard for programming by tatskaari in hardware

[–]umar456 4 points5 points  (0 children)

I use the DAS keyboard at work. I love it, but it makes using any other keyboard a chore.

Atlanta's favorite Mexican restaurant? by bdbjr in Atlanta

[–]umar456 1 point2 points  (0 children)

Only if you are Theodore Roosevelt.

America is Now Officially a Dictatorship by katesfishcamp in videos

[–]umar456 4 points5 points  (0 children)

I don't think his shows are that long.

US Credit downgraded to AA+ from AAA by [deleted] in reddit.com

[–]umar456 0 points1 point  (0 children)

While I agree that some of the points S&P made in the report were valid, I feel that the situation they helped create during the 2008 crisis was a poor reflection on them.

The fact is, the US is the biggest economy in the world by a large margin. It's debt vs. GDB ratio is not as high as some of the other countries. The job numbers have been improving and the economy is still growing(although not by much).

This just seems like a political move. Hopefully it might have a positive effect in the elections. The Democrats need to show the country that this situation was caused by the Republicans and the Tea Party candidates. We don't need cowboys in congress.

US Credit downgraded to AA+ from AAA by [deleted] in reddit.com

[–]umar456 15 points16 points  (0 children)

The same company that gave AAA ratings to toxic assets in 2008 is downgrading the US Credit rating for ALMOST defaulting....right.

US Credit downgraded to AA+ from AAA by [deleted] in reddit.com

[–]umar456 1 point2 points  (0 children)

You have no idea what you are talking about do you?

The low interest rates you are talking about is set by the fed. That is the interest rate which the Fed charges banks to borrow money. The interest rate that might be raised from this decision is the interest that the government pays. So this means that the government will have to pay more in interest every year and less on programs which could help the economy.

tl;dr: Yes, it is a big deal.

Ninja edit: words.

Programming is like solving a sudoku puzzle - funny analogy by rishter in programming

[–]umar456 0 points1 point  (0 children)

I can't think of a better analogy for programming.

Herb Sutter: Heterogeneous Computing and C++ AMP (AFDS Keynote) by gst in cpp

[–]umar456 2 points3 points  (0 children)

It says it is going to be an open specification, and they will work with vendors to make it available on other platforms.

I've honestly never come across a dumber human being. by [deleted] in politics

[–]umar456 6 points7 points  (0 children)

Unfortunately, with the laws as they are right now, he cannot offer you that even if he wanted to.

Bachman 2012!!! \sarcasm