Has anyone here tried to run non graphics related code on the GPU?IE: Arbitrary math calculations

I don't know modern GPU assembly, but I assume if I did I'd be able to write a shader in GPU asm and then use something like DX9CompileVertexShader to turn it into machine code. BUT I don't know how the input and output works, once it's done with the calculations how would I retrieve the results etc.

If you google this topic you get a bunch of USELESS stuff about HIGHLEVEL shader languages Cg(dx/gl), HLSL(dx), Brook stream programming in C, Sh(gl), and advertisements for books. (all useless);not totally useless just not relevant enough

If someone's searching skills are better than mine or you have a simple example program that (for example) accumulates all the singleFP values in an array on the GPU and returns the result I would be very interested in your reply.

On a side note a snippet for 64bit programming just poped into my headSince SSE/2/3 instructions will be used more in 64bit programming aligning your local stack frames would improve code efficiency (you'd be able to use the Align xmmx instructions).push rbpmov rbp,rsppush rbxand rsp,-16sub rsp,64mov rbx,rsp;now you have 3 aligned 16byte locals at rbx, rbx+16, and rbx+32