1. Homepage
  2. Programming
  3. 159.735 Assignment 5: Quantum warp drive engine

159.735 Assignment 5: Quantum warp drive engine

Engage in a Conversation
Massey159.735Studies in Parallel and Distributed SystemsCUDAC++Quantum warp drive engine

159.735 Assignment 5 CourseNana.COM

You have been commissioned to help design a new quantum warp drive engine. Since this engine is designed to drive spaceships through hyper- space, you will need to deal with spatial dimensions greater than 3. CourseNana.COM

Given an N-dimensional sphere of radius, r, centred at the origin of an N-dimensional coordinate system, first complete a sequential function to count the number of integer coordinate points inside the sphere. Here are some examples to allow you to check your work: CourseNana.COM

1. A1-dimensionalsphereofradius25.5has51integercoordinatepoints: CourseNana.COM

{(±25,±24,±23,··· ,±1,0)} CourseNana.COM

  1. A2-dimensionalsphereofradius2.05has13integercoordinatepoints within the sphere:
    {(0, 0), (1, 0), (2, 0), (1, 0), (2, 0), (1, 1), (1, 1), (1, 1), (1, 1), (0, 2), (0, 1), (0, 1), (0, 2)} CourseNana.COM

  2. A3-dimensionalsphereofradius1.5has19integercoordinatepoints inside the sphere:
    {(1, 0, 0), (1, 0, 1), (1, 0, 1), (1, 1, 0), (1, 1, 0), (1, 0, 0), (1, 0, 1), (1,0,1),(1,1,0),(1,1,0),(0,0,0),(0,1,0),(0,1,1),(0,1,1),(0,1,0), (0, 1, 1), (0, 1, 1), (0, 0, 1), (0, 0, 1)} CourseNana.COM

A small start up program will be provided, where you are asked to com- plete the sequential function count_inside. This function will be invoked for a number of different values of r and N. The pseudo-code for the se- quential implementation goes like: CourseNana.COM

for (n=0; n < ntrials; ++n) {
  radius = selected_at_random()
  ndim = select_at_random()
  // Invoke function to count inside integer coordinates
  count = count_inside(radius, ndim)

} CourseNana.COM

Having completed the sequential program, then develop an implemen- tation to run on your GPU. CourseNana.COM

You will need to decide what your kernel function will do and how to organize your threads. It is also likely you will encounter some limitations on your graphics card that will affect performance and the values for r and N that will actually work. CourseNana.COM

CourseNana.COM

Submission CourseNana.COM

Please submit your C or C++ source code together with a brief report. In your report you should address at least the following. Marks will be awarded for discussions that demonstrate clear understanding on GPU architectures. CourseNana.COM

  • State the graphics card you used together with any relevant specs. CourseNana.COM

  • Briefly describe your algorithm for counting the number of integer CourseNana.COM

    coordinates within an N-sphere CourseNana.COM

  • Provide a description on how you parallelized the above problem. CourseNana.COM

  • Present appropriate performance data, and comment on your result. CourseNana.COM

    Due date: TBD
    This assignment is worth 20% of your final grade
    CourseNana.COM

    Appendix: Coding Hints CourseNana.COM

    To convert a decimal integer number, num, into a number in base B, you can use a number of possible algorithms, for example: CourseNana.COM

    idx = 0;
    while (num != 0) {
    
      rem = num % B;
      num = num / B;
      digit[idx] = rem;
      ++idx;
    

    } CourseNana.COM

    Examples: 120810 = 101110002, 120810 = 11222023, 120810 = 22708, · · · . CourseNana.COM

    You can use cudaMalloc() to create a single data word, not just arrays, on the GPU device. Also, you can use cudaMemset() to initialize a device value and you can use cudaMemcpy() to copy single data words from the device to the host. CourseNana.COM

    You will probably encounter a situation where a number of threads can modify a single value. Clearly, this would have to be done atomically. The CUDA library provides a (overloaded) function atomicAdd() that makes this easy.  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Massey代写,159.735代写,Studies in Parallel and Distributed Systems代写,CUDA代写,C++代写,Quantum warp drive engine代写,Massey代编,159.735代编,Studies in Parallel and Distributed Systems代编,CUDA代编,C++代编,Quantum warp drive engine代编,Massey代考,159.735代考,Studies in Parallel and Distributed Systems代考,CUDA代考,C++代考,Quantum warp drive engine代考,Masseyhelp,159.735help,Studies in Parallel and Distributed Systemshelp,CUDAhelp,C++help,Quantum warp drive enginehelp,Massey作业代写,159.735作业代写,Studies in Parallel and Distributed Systems作业代写,CUDA作业代写,C++作业代写,Quantum warp drive engine作业代写,Massey编程代写,159.735编程代写,Studies in Parallel and Distributed Systems编程代写,CUDA编程代写,C++编程代写,Quantum warp drive engine编程代写,Masseyprogramming help,159.735programming help,Studies in Parallel and Distributed Systemsprogramming help,CUDAprogramming help,C++programming help,Quantum warp drive engineprogramming help,Masseyassignment help,159.735assignment help,Studies in Parallel and Distributed Systemsassignment help,CUDAassignment help,C++assignment help,Quantum warp drive engineassignment help,Masseysolution,159.735solution,Studies in Parallel and Distributed Systemssolution,CUDAsolution,C++solution,Quantum warp drive enginesolution,