By Isse#

Hello sirs my name is rajeet and today im actually gonna have to be very serious.

Today I want to introduce you to durgasoft and da mr Nagoor Babu sir.

Nagoor Babu is a sun certified real time expert, he teach the java and python!


Recently nagoor babu sir released his core java online courses on youtube. FOR FREE!!! (free as in gratis not libre linux dogs))

i have personally completed nagoo babu sirs java course (dont believe me idiot linux dog? ok i post proof


now i am gonna move to america and steal the whiteys jobs,,,,

i highly recommend java as da beginner language because it's fast and low resource usage!

of course everything is sun certified and led by da best real time expert in all of india!

have fun on your programming journey sirs!

of course visit da durgasoft at: durgasoft http://durgasoft.com/

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?”
― Brian Kernighan

“Don’t comment bad code—rewrite it.”
― Brian W. Kernighan

"कराटे चिकन"
- mr nagoor babu sir

as an example i will show you how to do hello world in java (cleanest fastest method)

*** -> package magic;import org.lwjgl.opencl.Util;import org.lwjgl.opencl.CLMem;import org.lwjgl.opencl.CLCommandQueue;import org.lwjgl.BufferUtils;import org.lwjgl.PointerBuffer;import org.lwjgl.opencl.CLProgram;import org.lwjgl.opencl.CLKernel;import java.nio.IntBuffer;import java.util.List;import org.lwjgl.opencl.CL;import org.lwjgl.opencl.CLContext;import org.lwjgl.opencl.CLDevice;import org.lwjgl.opencl.CLPlatform;import static org.lwjgl.opencl.CL10.*;public class OpenCLHello {static String letters = "HeloWrd ";static final String source =""+"kernel void decode(global const int *a, global int *answer){"+"unsigned int xid=get_global_id(0);"+"answer[xid]=a[xid]-1;"+"}";static final IntBuffer a = toIntBuffer(new int[]{1, 2, 3, 3, 4, 8, 5, 4, 6, 3, 7});static final IntBuffer answer = BufferUtils.createIntBuffer(11);public static void main(String[] args) throws Exception{CL.create();CLPlatform platform = CLPlatform.getPlatforms().get(0);List<CLDevice> devices = platform.getDevices(CL_DEVICE_TYPE_GPU);CLContext context = CLContext.create(platform, devices, null, null, null);CLCommandQueue queue = clCreateCommandQueue(context, devices.get(0), CL_QUEUE_PROFILING_ENABLE, null);CLMem aMem = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, a, null);clEnqueueWriteBuffer(queue, aMem, 1, 0, a, null, null);CLMem answerMem = clCreateBuffer(context, CL_MEM_WRITE_ONLY | CL_MEM_COPY_HOST_PTR, answer, null);clFinish(queue);CLProgram program = clCreateProgramWithSource(context, source, null);Util.checkCLError(clBuildProgram(program, devices.get(0), "", null));CLKernel kernel = clCreateKernel(program, "decode", null);PointerBuffer kernel1DGlobalWorkSize = BufferUtils.createPointerBuffer(1);kernel1DGlobalWorkSize.put(0, 11);kernel.setArg(0, aMem);kernel.setArg(1, answerMem);clEnqueueNDRangeKernel(queue, kernel, 1, null, kernel1DGlobalWorkSize, null, null, null);clEnqueueReadBuffer(queue, answerMem, 1, 0, answer, null, null);clFinish(queue);print(answer);clReleaseKernel(kernel);clReleaseProgram(program);clReleaseMemObject(aMem);clReleaseMemObject(answerMem);clReleaseCommandQueue(queue);clReleaseContext(context);CL.destroy();}static IntBuffer toIntBuffer(int[] ints) {IntBuffer buf = BufferUtils.createIntBuffer(ints.length).put(ints);buf.rewind();return buf;}static void print(IntBuffer answer2) {for (int i = 0; i < answer2.capacity(); i++) {System.out.print(letters.charAt(answer2.get(i) ));}System.out.println("");}}

bugs: you tell me genius

Pub: Aug 06 2019 03:30 UTC
Edit: Aug 06 2019 03:31 UTC
Views: 329